Skip to content

Commit

Permalink
Added isEnabled attribute in headroom.automatic
Browse files Browse the repository at this point in the history
Added `isEnabled` attribute in `headroom.automatic`
  • Loading branch information
chandra1-n committed Dec 11, 2023
1 parent d4775b2 commit f353668
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/service/ocean/providers/azure_np/create/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func main() {
},
Headroom: &azure_np.Headroom{
Automatic: &azure_np.Automatic{
IsEnabled: spotinst.Bool(true),
Percentage: spotinst.Int(5),
},
},
Expand Down
10 changes: 9 additions & 1 deletion service/ocean/providers/azure_np/cluster_np.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ type Headroom struct {
}

type Automatic struct {
Percentage *int `json:"percentage,omitempty"`
IsEnabled *bool `json:"isEnabled,omitempty"`
Percentage *int `json:"percentage,omitempty"`

forceSendFields []string
nullFields []string
Expand Down Expand Up @@ -575,6 +576,13 @@ func (o Automatic) MarshalJSON() ([]byte, error) {
return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields)
}

func (o *Automatic) SetIsEnabled(v *bool) *Automatic {
if o.IsEnabled = v; o.IsEnabled == nil {
o.nullFields = append(o.nullFields, "IsEnabled")
}
return o
}

func (o *Automatic) SetPercentage(v *int) *Automatic {
if o.Percentage = v; o.Percentage == nil {
o.nullFields = append(o.nullFields, "Percentage")
Expand Down

0 comments on commit f353668

Please sign in to comment.