Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added extensions block support in Elastigroup Azure #326

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
Loading