Skip to content

Commit

Permalink
added extensions block support in Elastigroup Azure (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
chandra1-n authored Oct 8, 2024
1 parent 3d780f7 commit b4e93eb
Showing 1 changed file with 126 additions and 0 deletions.
126 changes: 126 additions & 0 deletions service/elastigroup/providers/azure/v3/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ type LaunchSpecification struct {
Tags []*Tags `json:"tags,omitempty"`
LoadBalancersConfig *LoadBalancersConfig `json:"loadBalancersConfig,omitempty"`
ShutdownScript *string `json:"shutdownScript,omitempty"`
Extensions []*Extensions `json:"extensions,omitempty"`

forceSendFields []string
nullFields []string
Expand Down Expand Up @@ -258,6 +259,29 @@ type Dimensions struct {
nullFields []string
}

type Extensions struct {
APIVersion *string `json:"apiVersion,omitempty"`
EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
MinorVersionAutoUpgrade *bool `json:"minorVersionAutoUpgrade,omitempty"`
Name *string `json:"name,omitempty"`
ProtectedSettingsFromKeyVault *ProtectedSettingsFromKeyVault `json:"protectedSettingsFromKeyVault,omitempty"`
ProtectedSettings map[string]interface{} `json:"protectedSettings,omitempty"`
PublicSettings map[string]interface{} `json:"publicSettings,omitempty"`
Publisher *string `json:"publisher,omitempty"`
Type *string `json:"type,omitempty"`

forceSendFields []string
nullFields []string
}

type ProtectedSettingsFromKeyVault struct {
SecretUrl *string `json:"secretUrl,omitempty"`
SourceVault *string `json:"sourceVault,omitempty"`

forceSendFields []string
nullFields []string
}

type CreateGroupInput struct {
Group *Group `json:"group,omitempty"`
}
Expand Down Expand Up @@ -710,6 +734,13 @@ func (o *LaunchSpecification) SetTags(v []*Tags) *LaunchSpecification {
return o
}

func (o *LaunchSpecification) SetExtensions(v []*Extensions) *LaunchSpecification {
if o.Extensions = v; o.Extensions == nil {
o.nullFields = append(o.nullFields, "Extensions")
}
return o
}

// endregion

// region Image
Expand Down Expand Up @@ -1299,3 +1330,98 @@ func (o *Dimensions) SetValue(v *string) *Dimensions {
}
return o
}

// endregion

// region Extension

func (o Extensions) MarshalJSON() ([]byte, error) {
type noMethod Extensions
raw := noMethod(o)
return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields)
}

func (o *Extensions) SetName(v *string) *Extensions {
if o.Name = v; o.Name == nil {
o.nullFields = append(o.nullFields, "Name")
}
return o
}

func (o *Extensions) SetType(v *string) *Extensions {
if o.Type = v; o.Type == nil {
o.nullFields = append(o.nullFields, "Type")
}
return o
}

func (o *Extensions) SetPublisher(v *string) *Extensions {
if o.Publisher = v; o.Publisher == nil {
o.nullFields = append(o.nullFields, "Publisher")
}
return o
}

func (o *Extensions) SetAPIVersion(v *string) *Extensions {
if o.APIVersion = v; o.APIVersion == nil {
o.nullFields = append(o.nullFields, "APIVersion")
}
return o
}

func (o *Extensions) SetMinorVersionAutoUpgrade(v *bool) *Extensions {
if o.MinorVersionAutoUpgrade = v; o.MinorVersionAutoUpgrade == nil {
o.nullFields = append(o.nullFields, "MinorVersionAutoUpgrade")
}
return o
}

func (o *Extensions) SetEnableAutomaticUpgrade(v *bool) *Extensions {
if o.EnableAutomaticUpgrade = v; o.EnableAutomaticUpgrade == nil {
o.nullFields = append(o.nullFields, "EnableAutomaticUpgrade")
}
return o
}

func (o *Extensions) SetProtectedSettings(v map[string]interface{}) *Extensions {
if o.ProtectedSettings = v; o.ProtectedSettings == nil {
o.nullFields = append(o.nullFields, "ProtectedSettings")
}
return o
}

func (o *Extensions) SetProtectedSettingsFromKeyVault(v *ProtectedSettingsFromKeyVault) *Extensions {
if o.ProtectedSettingsFromKeyVault = v; o.ProtectedSettingsFromKeyVault == nil {
o.nullFields = append(o.nullFields, "ProtectedSettingsFromKeyVault")
}
return o
}

func (o *Extensions) SetPublicSettings(v map[string]interface{}) *Extensions {
if o.PublicSettings = v; o.PublicSettings == nil {
o.nullFields = append(o.nullFields, "PublicSettings")
}
return o
}

// endregion

func (o ProtectedSettingsFromKeyVault) MarshalJSON() ([]byte, error) {
type noMethod ProtectedSettingsFromKeyVault
raw := noMethod(o)
return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields)
}

func (o *ProtectedSettingsFromKeyVault) SetSecretUrl(v *string) *ProtectedSettingsFromKeyVault {
if o.SecretUrl = v; o.SecretUrl == nil {
o.nullFields = append(o.nullFields, "SecretUrl")
}
return o
}

func (o *ProtectedSettingsFromKeyVault) SetSourceVault(v *string) *ProtectedSettingsFromKeyVault {
if o.SourceVault = v; o.SourceVault == nil {
o.nullFields = append(o.nullFields, "SourceVault")
}
return o
}

0 comments on commit b4e93eb

Please sign in to comment.