From 318d2e09623dfe550624c87defde81451e2b4a64 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Tue, 30 Dec 2025 07:57:33 +0100 Subject: [PATCH] feat: work savenew api version with acl in network segment --- .../model_create_instance_request_payload.go | 73 +++----------- ...create_instance_request_payload_network.go | 48 +++++++++- pkg/sqlserverflexalpha/model_error.go | 2 +- .../model_get_instance_response.go | 46 +-------- ...date_instance_partially_request_payload.go | 95 +++++++++---------- .../model_update_instance_request_payload.go | 89 +++++++++-------- 6 files changed, 151 insertions(+), 202 deletions(-) diff --git a/pkg/sqlserverflexalpha/model_create_instance_request_payload.go b/pkg/sqlserverflexalpha/model_create_instance_request_payload.go index ff990d79..44ed29b9 100644 --- a/pkg/sqlserverflexalpha/model_create_instance_request_payload.go +++ b/pkg/sqlserverflexalpha/model_create_instance_request_payload.go @@ -17,26 +17,6 @@ import ( // checks if the CreateInstanceRequestPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateInstanceRequestPayload{} -/* - types and functions for acl -*/ - -// isArray -type CreateInstanceRequestPayloadGetAclAttributeType = *[]string -type CreateInstanceRequestPayloadGetAclArgType = []string -type CreateInstanceRequestPayloadGetAclRetType = []string - -func getCreateInstanceRequestPayloadGetAclAttributeTypeOk(arg CreateInstanceRequestPayloadGetAclAttributeType) (ret CreateInstanceRequestPayloadGetAclRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateInstanceRequestPayloadGetAclAttributeType(arg *CreateInstanceRequestPayloadGetAclAttributeType, val CreateInstanceRequestPayloadGetAclRetType) { - *arg = &val -} - /* types and functions for backupSchedule */ @@ -202,9 +182,6 @@ func setCreateInstanceRequestPayloadGetVersionAttributeType(arg *CreateInstanceR // CreateInstanceRequestPayload struct for CreateInstanceRequestPayload type CreateInstanceRequestPayload struct { - // Deprecated: List of IPV4 cidr. - // REQUIRED - Acl CreateInstanceRequestPayloadGetAclAttributeType `json:"acl" required:"true"` // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. // REQUIRED BackupSchedule CreateInstanceRequestPayloadGetBackupScheduleAttributeType `json:"backupSchedule" required:"true"` @@ -214,8 +191,9 @@ type CreateInstanceRequestPayload struct { FlavorId CreateInstanceRequestPayloadGetFlavorIdAttributeType `json:"flavorId" required:"true"` // The name of the instance. // REQUIRED - Name CreateInstanceRequestPayloadGetNameAttributeType `json:"name" required:"true"` - Network CreateInstanceRequestPayloadGetNetworkAttributeType `json:"network,omitempty"` + Name CreateInstanceRequestPayloadGetNameAttributeType `json:"name" required:"true"` + // REQUIRED + Network CreateInstanceRequestPayloadGetNetworkAttributeType `json:"network" required:"true"` // The days for how long the backup files should be stored before cleaned up. 30 to 365 // Can be cast to int32 without loss of precision. // REQUIRED @@ -232,12 +210,12 @@ type _CreateInstanceRequestPayload CreateInstanceRequestPayload // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateInstanceRequestPayload(acl CreateInstanceRequestPayloadGetAclArgType, backupSchedule CreateInstanceRequestPayloadGetBackupScheduleArgType, flavorId CreateInstanceRequestPayloadGetFlavorIdArgType, name CreateInstanceRequestPayloadGetNameArgType, retentionDays CreateInstanceRequestPayloadGetRetentionDaysArgType, storage CreateInstanceRequestPayloadGetStorageArgType, version CreateInstanceRequestPayloadGetVersionArgType) *CreateInstanceRequestPayload { +func NewCreateInstanceRequestPayload(backupSchedule CreateInstanceRequestPayloadGetBackupScheduleArgType, flavorId CreateInstanceRequestPayloadGetFlavorIdArgType, name CreateInstanceRequestPayloadGetNameArgType, network CreateInstanceRequestPayloadGetNetworkArgType, retentionDays CreateInstanceRequestPayloadGetRetentionDaysArgType, storage CreateInstanceRequestPayloadGetStorageArgType, version CreateInstanceRequestPayloadGetVersionArgType) *CreateInstanceRequestPayload { this := CreateInstanceRequestPayload{} - setCreateInstanceRequestPayloadGetAclAttributeType(&this.Acl, acl) setCreateInstanceRequestPayloadGetBackupScheduleAttributeType(&this.BackupSchedule, backupSchedule) setCreateInstanceRequestPayloadGetFlavorIdAttributeType(&this.FlavorId, flavorId) setCreateInstanceRequestPayloadGetNameAttributeType(&this.Name, name) + setCreateInstanceRequestPayloadGetNetworkAttributeType(&this.Network, network) setCreateInstanceRequestPayloadGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays) setCreateInstanceRequestPayloadGetStorageAttributeType(&this.Storage, storage) setCreateInstanceRequestPayloadGetVersionAttributeType(&this.Version, version) @@ -252,26 +230,6 @@ func NewCreateInstanceRequestPayloadWithDefaults() *CreateInstanceRequestPayload return &this } -// GetAcl returns the Acl field value -// Deprecated -func (o *CreateInstanceRequestPayload) GetAcl() (ret CreateInstanceRequestPayloadGetAclRetType) { - ret, _ = o.GetAclOk() - return ret -} - -// GetAclOk returns a tuple with the Acl field value -// and a boolean to check if the value has been set. -// Deprecated -func (o *CreateInstanceRequestPayload) GetAclOk() (ret CreateInstanceRequestPayloadGetAclRetType, ok bool) { - return getCreateInstanceRequestPayloadGetAclAttributeTypeOk(o.Acl) -} - -// SetAcl sets field value -// Deprecated -func (o *CreateInstanceRequestPayload) SetAcl(v CreateInstanceRequestPayloadGetAclRetType) { - setCreateInstanceRequestPayloadGetAclAttributeType(&o.Acl, v) -} - // GetBackupSchedule returns the BackupSchedule field value func (o *CreateInstanceRequestPayload) GetBackupSchedule() (ret CreateInstanceRequestPayloadGetBackupScheduleRetType) { ret, _ = o.GetBackupScheduleOk() @@ -346,25 +304,19 @@ func (o *CreateInstanceRequestPayload) SetName(v CreateInstanceRequestPayloadGet setCreateInstanceRequestPayloadGetNameAttributeType(&o.Name, v) } -// GetNetwork returns the Network field value if set, zero value otherwise. -func (o *CreateInstanceRequestPayload) GetNetwork() (res CreateInstanceRequestPayloadGetNetworkRetType) { - res, _ = o.GetNetworkOk() - return +// GetNetwork returns the Network field value +func (o *CreateInstanceRequestPayload) GetNetwork() (ret CreateInstanceRequestPayloadGetNetworkRetType) { + ret, _ = o.GetNetworkOk() + return ret } -// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise +// GetNetworkOk returns a tuple with the Network field value // and a boolean to check if the value has been set. func (o *CreateInstanceRequestPayload) GetNetworkOk() (ret CreateInstanceRequestPayloadGetNetworkRetType, ok bool) { return getCreateInstanceRequestPayloadGetNetworkAttributeTypeOk(o.Network) } -// HasNetwork returns a boolean if a field has been set. -func (o *CreateInstanceRequestPayload) HasNetwork() bool { - _, ok := o.GetNetworkOk() - return ok -} - -// SetNetwork gets a reference to the given CreateInstanceRequestPayloadNetwork and assigns it to the Network field. +// SetNetwork sets field value func (o *CreateInstanceRequestPayload) SetNetwork(v CreateInstanceRequestPayloadGetNetworkRetType) { setCreateInstanceRequestPayloadGetNetworkAttributeType(&o.Network, v) } @@ -422,9 +374,6 @@ func (o *CreateInstanceRequestPayload) SetVersion(v CreateInstanceRequestPayload func (o CreateInstanceRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getCreateInstanceRequestPayloadGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } if val, ok := getCreateInstanceRequestPayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { toSerialize["BackupSchedule"] = val } diff --git a/pkg/sqlserverflexalpha/model_create_instance_request_payload_network.go b/pkg/sqlserverflexalpha/model_create_instance_request_payload_network.go index 816601d3..ebec8b99 100644 --- a/pkg/sqlserverflexalpha/model_create_instance_request_payload_network.go +++ b/pkg/sqlserverflexalpha/model_create_instance_request_payload_network.go @@ -37,17 +37,43 @@ func setCreateInstanceRequestPayloadNetworkGetAccessScopeAttributeType(arg *Crea *arg = &val } +/* + types and functions for acl +*/ + +// isArray +type CreateInstanceRequestPayloadNetworkGetAclAttributeType = *[]string +type CreateInstanceRequestPayloadNetworkGetAclArgType = []string +type CreateInstanceRequestPayloadNetworkGetAclRetType = []string + +func getCreateInstanceRequestPayloadNetworkGetAclAttributeTypeOk(arg CreateInstanceRequestPayloadNetworkGetAclAttributeType) (ret CreateInstanceRequestPayloadNetworkGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateInstanceRequestPayloadNetworkGetAclAttributeType(arg *CreateInstanceRequestPayloadNetworkGetAclAttributeType, val CreateInstanceRequestPayloadNetworkGetAclRetType) { + *arg = &val +} + // CreateInstanceRequestPayloadNetwork the network configuration of the instance. type CreateInstanceRequestPayloadNetwork struct { AccessScope CreateInstanceRequestPayloadNetworkGetAccessScopeAttributeType `json:"accessScope,omitempty"` + // List of IPV4 cidr. + // REQUIRED + Acl CreateInstanceRequestPayloadNetworkGetAclAttributeType `json:"acl" required:"true"` } +type _CreateInstanceRequestPayloadNetwork CreateInstanceRequestPayloadNetwork + // NewCreateInstanceRequestPayloadNetwork instantiates a new CreateInstanceRequestPayloadNetwork object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateInstanceRequestPayloadNetwork() *CreateInstanceRequestPayloadNetwork { +func NewCreateInstanceRequestPayloadNetwork(acl CreateInstanceRequestPayloadNetworkGetAclArgType) *CreateInstanceRequestPayloadNetwork { this := CreateInstanceRequestPayloadNetwork{} + setCreateInstanceRequestPayloadNetworkGetAclAttributeType(&this.Acl, acl) return &this } @@ -84,11 +110,31 @@ func (o *CreateInstanceRequestPayloadNetwork) SetAccessScope(v CreateInstanceReq setCreateInstanceRequestPayloadNetworkGetAccessScopeAttributeType(&o.AccessScope, v) } +// GetAcl returns the Acl field value +func (o *CreateInstanceRequestPayloadNetwork) GetAcl() (ret CreateInstanceRequestPayloadNetworkGetAclRetType) { + ret, _ = o.GetAclOk() + return ret +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *CreateInstanceRequestPayloadNetwork) GetAclOk() (ret CreateInstanceRequestPayloadNetworkGetAclRetType, ok bool) { + return getCreateInstanceRequestPayloadNetworkGetAclAttributeTypeOk(o.Acl) +} + +// SetAcl sets field value +func (o *CreateInstanceRequestPayloadNetwork) SetAcl(v CreateInstanceRequestPayloadNetworkGetAclRetType) { + setCreateInstanceRequestPayloadNetworkGetAclAttributeType(&o.Acl, v) +} + func (o CreateInstanceRequestPayloadNetwork) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateInstanceRequestPayloadNetworkGetAccessScopeAttributeTypeOk(o.AccessScope); ok { toSerialize["AccessScope"] = val } + if val, ok := getCreateInstanceRequestPayloadNetworkGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val + } return toSerialize, nil } diff --git a/pkg/sqlserverflexalpha/model_error.go b/pkg/sqlserverflexalpha/model_error.go index 31d53693..8fa98e4e 100644 --- a/pkg/sqlserverflexalpha/model_error.go +++ b/pkg/sqlserverflexalpha/model_error.go @@ -114,7 +114,7 @@ type Error struct { TraceId ErrorGetTraceIdAttributeType `json:"traceId" required:"true" validate:"required,traceID"` // Describes in which state the api was when the error happened. // REQUIRED - Type ErrorGetTypeAttributeType `json:"type" required:"true" validate:"required,errorType"` + Type ErrorGetTypeAttributeType `json:"type" required:"true"` } type _Error Error diff --git a/pkg/sqlserverflexalpha/model_get_instance_response.go b/pkg/sqlserverflexalpha/model_get_instance_response.go index d86ee586..d753a2c7 100644 --- a/pkg/sqlserverflexalpha/model_get_instance_response.go +++ b/pkg/sqlserverflexalpha/model_get_instance_response.go @@ -17,26 +17,6 @@ import ( // checks if the GetInstanceResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetInstanceResponse{} -/* - types and functions for acl -*/ - -// isArray -type GetInstanceResponseGetAclAttributeType = *[]string -type GetInstanceResponseGetAclArgType = []string -type GetInstanceResponseGetAclRetType = []string - -func getGetInstanceResponseGetAclAttributeTypeOk(arg GetInstanceResponseGetAclAttributeType) (ret GetInstanceResponseGetAclRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setGetInstanceResponseGetAclAttributeType(arg *GetInstanceResponseGetAclAttributeType, val GetInstanceResponseGetAclRetType) { - *arg = &val -} - /* types and functions for backupSchedule */ @@ -303,9 +283,6 @@ func setGetInstanceResponseGetVersionAttributeType(arg *GetInstanceResponseGetVe // GetInstanceResponse struct for GetInstanceResponse type GetInstanceResponse struct { - // List of IPV4 cidr. - // REQUIRED - Acl GetInstanceResponseGetAclAttributeType `json:"acl" required:"true"` // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. // REQUIRED BackupSchedule GetInstanceResponseGetBackupScheduleAttributeType `json:"backupSchedule" required:"true"` @@ -346,9 +323,8 @@ type _GetInstanceResponse GetInstanceResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGetInstanceResponse(acl GetInstanceResponseGetAclArgType, backupSchedule GetInstanceResponseGetBackupScheduleArgType, edition GetInstanceResponseGetEditionArgType, flavorId GetInstanceResponseGetFlavorIdArgType, id GetInstanceResponseGetIdArgType, isDeletable GetInstanceResponsegetIsDeletableArgType, name GetInstanceResponseGetNameArgType, network GetInstanceResponseGetNetworkArgType, replicas GetInstanceResponseGetReplicasArgType, retentionDays GetInstanceResponseGetRetentionDaysArgType, status GetInstanceResponseGetStatusArgType, storage GetInstanceResponseGetStorageArgType, version GetInstanceResponseGetVersionArgType) *GetInstanceResponse { +func NewGetInstanceResponse(backupSchedule GetInstanceResponseGetBackupScheduleArgType, edition GetInstanceResponseGetEditionArgType, flavorId GetInstanceResponseGetFlavorIdArgType, id GetInstanceResponseGetIdArgType, isDeletable GetInstanceResponsegetIsDeletableArgType, name GetInstanceResponseGetNameArgType, network GetInstanceResponseGetNetworkArgType, replicas GetInstanceResponseGetReplicasArgType, retentionDays GetInstanceResponseGetRetentionDaysArgType, status GetInstanceResponseGetStatusArgType, storage GetInstanceResponseGetStorageArgType, version GetInstanceResponseGetVersionArgType) *GetInstanceResponse { this := GetInstanceResponse{} - setGetInstanceResponseGetAclAttributeType(&this.Acl, acl) setGetInstanceResponseGetBackupScheduleAttributeType(&this.BackupSchedule, backupSchedule) setGetInstanceResponseGetEditionAttributeType(&this.Edition, edition) setGetInstanceResponseGetFlavorIdAttributeType(&this.FlavorId, flavorId) @@ -372,23 +348,6 @@ func NewGetInstanceResponseWithDefaults() *GetInstanceResponse { return &this } -// GetAcl returns the Acl field value -func (o *GetInstanceResponse) GetAcl() (ret GetInstanceResponseGetAclRetType) { - ret, _ = o.GetAclOk() - return ret -} - -// GetAclOk returns a tuple with the Acl field value -// and a boolean to check if the value has been set. -func (o *GetInstanceResponse) GetAclOk() (ret GetInstanceResponseGetAclRetType, ok bool) { - return getGetInstanceResponseGetAclAttributeTypeOk(o.Acl) -} - -// SetAcl sets field value -func (o *GetInstanceResponse) SetAcl(v GetInstanceResponseGetAclRetType) { - setGetInstanceResponseGetAclAttributeType(&o.Acl, v) -} - // GetBackupSchedule returns the BackupSchedule field value func (o *GetInstanceResponse) GetBackupSchedule() (ret GetInstanceResponseGetBackupScheduleRetType) { ret, _ = o.GetBackupScheduleOk() @@ -618,9 +577,6 @@ func (o *GetInstanceResponse) SetVersion(v GetInstanceResponseGetVersionRetType) func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getGetInstanceResponseGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } if val, ok := getGetInstanceResponseGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { toSerialize["BackupSchedule"] = val } diff --git a/pkg/sqlserverflexalpha/model_update_instance_partially_request_payload.go b/pkg/sqlserverflexalpha/model_update_instance_partially_request_payload.go index cfe78435..c3ed94fa 100644 --- a/pkg/sqlserverflexalpha/model_update_instance_partially_request_payload.go +++ b/pkg/sqlserverflexalpha/model_update_instance_partially_request_payload.go @@ -17,26 +17,6 @@ import ( // checks if the UpdateInstancePartiallyRequestPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateInstancePartiallyRequestPayload{} -/* - types and functions for acl -*/ - -// isArray -type UpdateInstancePartiallyRequestPayloadGetAclAttributeType = *[]string -type UpdateInstancePartiallyRequestPayloadGetAclArgType = []string -type UpdateInstancePartiallyRequestPayloadGetAclRetType = []string - -func getUpdateInstancePartiallyRequestPayloadGetAclAttributeTypeOk(arg UpdateInstancePartiallyRequestPayloadGetAclAttributeType) (ret UpdateInstancePartiallyRequestPayloadGetAclRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateInstancePartiallyRequestPayloadGetAclAttributeType(arg *UpdateInstancePartiallyRequestPayloadGetAclAttributeType, val UpdateInstancePartiallyRequestPayloadGetAclRetType) { - *arg = &val -} - /* types and functions for backupSchedule */ @@ -100,6 +80,26 @@ func setUpdateInstancePartiallyRequestPayloadGetNameAttributeType(arg *UpdateIns type UpdateInstancePartiallyRequestPayloadGetNameArgType = string type UpdateInstancePartiallyRequestPayloadGetNameRetType = string +/* + types and functions for network +*/ + +// isModel +type UpdateInstancePartiallyRequestPayloadGetNetworkAttributeType = *UpdateInstancePartiallyRequestPayloadNetwork +type UpdateInstancePartiallyRequestPayloadGetNetworkArgType = UpdateInstancePartiallyRequestPayloadNetwork +type UpdateInstancePartiallyRequestPayloadGetNetworkRetType = UpdateInstancePartiallyRequestPayloadNetwork + +func getUpdateInstancePartiallyRequestPayloadGetNetworkAttributeTypeOk(arg UpdateInstancePartiallyRequestPayloadGetNetworkAttributeType) (ret UpdateInstancePartiallyRequestPayloadGetNetworkRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateInstancePartiallyRequestPayloadGetNetworkAttributeType(arg *UpdateInstancePartiallyRequestPayloadGetNetworkAttributeType, val UpdateInstancePartiallyRequestPayloadGetNetworkRetType) { + *arg = &val +} + /* types and functions for replicas */ @@ -182,14 +182,13 @@ func setUpdateInstancePartiallyRequestPayloadGetVersionAttributeType(arg *Update // UpdateInstancePartiallyRequestPayload struct for UpdateInstancePartiallyRequestPayload type UpdateInstancePartiallyRequestPayload struct { - // List of IPV4 cidr. - Acl UpdateInstancePartiallyRequestPayloadGetAclAttributeType `json:"acl,omitempty"` // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. BackupSchedule UpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` // The id of the instance flavor. FlavorId UpdateInstancePartiallyRequestPayloadGetFlavorIdAttributeType `json:"flavorId,omitempty"` // The name of the instance. Name UpdateInstancePartiallyRequestPayloadGetNameAttributeType `json:"name,omitempty"` + Network UpdateInstancePartiallyRequestPayloadGetNetworkAttributeType `json:"network,omitempty"` Replicas UpdateInstancePartiallyRequestPayloadGetReplicasAttributeType `json:"replicas,omitempty"` // Can be cast to int32 without loss of precision. RetentionDays UpdateInstancePartiallyRequestPayloadGetRetentionDaysAttributeType `json:"retentionDays,omitempty"` @@ -214,29 +213,6 @@ func NewUpdateInstancePartiallyRequestPayloadWithDefaults() *UpdateInstanceParti return &this } -// GetAcl returns the Acl field value if set, zero value otherwise. -func (o *UpdateInstancePartiallyRequestPayload) GetAcl() (res UpdateInstancePartiallyRequestPayloadGetAclRetType) { - res, _ = o.GetAclOk() - return -} - -// GetAclOk returns a tuple with the Acl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateInstancePartiallyRequestPayload) GetAclOk() (ret UpdateInstancePartiallyRequestPayloadGetAclRetType, ok bool) { - return getUpdateInstancePartiallyRequestPayloadGetAclAttributeTypeOk(o.Acl) -} - -// HasAcl returns a boolean if a field has been set. -func (o *UpdateInstancePartiallyRequestPayload) HasAcl() bool { - _, ok := o.GetAclOk() - return ok -} - -// SetAcl gets a reference to the given []string and assigns it to the Acl field. -func (o *UpdateInstancePartiallyRequestPayload) SetAcl(v UpdateInstancePartiallyRequestPayloadGetAclRetType) { - setUpdateInstancePartiallyRequestPayloadGetAclAttributeType(&o.Acl, v) -} - // GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. func (o *UpdateInstancePartiallyRequestPayload) GetBackupSchedule() (res UpdateInstancePartiallyRequestPayloadGetBackupScheduleRetType) { res, _ = o.GetBackupScheduleOk() @@ -306,6 +282,29 @@ func (o *UpdateInstancePartiallyRequestPayload) SetName(v UpdateInstancePartiall setUpdateInstancePartiallyRequestPayloadGetNameAttributeType(&o.Name, v) } +// GetNetwork returns the Network field value if set, zero value otherwise. +func (o *UpdateInstancePartiallyRequestPayload) GetNetwork() (res UpdateInstancePartiallyRequestPayloadGetNetworkRetType) { + res, _ = o.GetNetworkOk() + return +} + +// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePartiallyRequestPayload) GetNetworkOk() (ret UpdateInstancePartiallyRequestPayloadGetNetworkRetType, ok bool) { + return getUpdateInstancePartiallyRequestPayloadGetNetworkAttributeTypeOk(o.Network) +} + +// HasNetwork returns a boolean if a field has been set. +func (o *UpdateInstancePartiallyRequestPayload) HasNetwork() bool { + _, ok := o.GetNetworkOk() + return ok +} + +// SetNetwork gets a reference to the given UpdateInstancePartiallyRequestPayloadNetwork and assigns it to the Network field. +func (o *UpdateInstancePartiallyRequestPayload) SetNetwork(v UpdateInstancePartiallyRequestPayloadGetNetworkRetType) { + setUpdateInstancePartiallyRequestPayloadGetNetworkAttributeType(&o.Network, v) +} + // GetReplicas returns the Replicas field value if set, zero value otherwise. func (o *UpdateInstancePartiallyRequestPayload) GetReplicas() (res UpdateInstancePartiallyRequestPayloadGetReplicasRetType) { res, _ = o.GetReplicasOk() @@ -400,9 +399,6 @@ func (o *UpdateInstancePartiallyRequestPayload) SetVersion(v UpdateInstanceParti func (o UpdateInstancePartiallyRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getUpdateInstancePartiallyRequestPayloadGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } if val, ok := getUpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { toSerialize["BackupSchedule"] = val } @@ -412,6 +408,9 @@ func (o UpdateInstancePartiallyRequestPayload) ToMap() (map[string]interface{}, if val, ok := getUpdateInstancePartiallyRequestPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } + if val, ok := getUpdateInstancePartiallyRequestPayloadGetNetworkAttributeTypeOk(o.Network); ok { + toSerialize["Network"] = val + } if val, ok := getUpdateInstancePartiallyRequestPayloadGetReplicasAttributeTypeOk(o.Replicas); ok { toSerialize["Replicas"] = val } diff --git a/pkg/sqlserverflexalpha/model_update_instance_request_payload.go b/pkg/sqlserverflexalpha/model_update_instance_request_payload.go index c978ab68..bec80e3a 100644 --- a/pkg/sqlserverflexalpha/model_update_instance_request_payload.go +++ b/pkg/sqlserverflexalpha/model_update_instance_request_payload.go @@ -17,26 +17,6 @@ import ( // checks if the UpdateInstanceRequestPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateInstanceRequestPayload{} -/* - types and functions for acl -*/ - -// isArray -type UpdateInstanceRequestPayloadGetAclAttributeType = *[]string -type UpdateInstanceRequestPayloadGetAclArgType = []string -type UpdateInstanceRequestPayloadGetAclRetType = []string - -func getUpdateInstanceRequestPayloadGetAclAttributeTypeOk(arg UpdateInstanceRequestPayloadGetAclAttributeType) (ret UpdateInstanceRequestPayloadGetAclRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setUpdateInstanceRequestPayloadGetAclAttributeType(arg *UpdateInstanceRequestPayloadGetAclAttributeType, val UpdateInstanceRequestPayloadGetAclRetType) { - *arg = &val -} - /* types and functions for backupSchedule */ @@ -100,6 +80,26 @@ func setUpdateInstanceRequestPayloadGetNameAttributeType(arg *UpdateInstanceRequ type UpdateInstanceRequestPayloadGetNameArgType = string type UpdateInstanceRequestPayloadGetNameRetType = string +/* + types and functions for network +*/ + +// isModel +type UpdateInstanceRequestPayloadGetNetworkAttributeType = *CreateInstanceRequestPayloadNetwork +type UpdateInstanceRequestPayloadGetNetworkArgType = CreateInstanceRequestPayloadNetwork +type UpdateInstanceRequestPayloadGetNetworkRetType = CreateInstanceRequestPayloadNetwork + +func getUpdateInstanceRequestPayloadGetNetworkAttributeTypeOk(arg UpdateInstanceRequestPayloadGetNetworkAttributeType) (ret UpdateInstanceRequestPayloadGetNetworkRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateInstanceRequestPayloadGetNetworkAttributeType(arg *UpdateInstanceRequestPayloadGetNetworkAttributeType, val UpdateInstanceRequestPayloadGetNetworkRetType) { + *arg = &val +} + /* types and functions for replicas */ @@ -182,9 +182,6 @@ func setUpdateInstanceRequestPayloadGetVersionAttributeType(arg *UpdateInstanceR // UpdateInstanceRequestPayload struct for UpdateInstanceRequestPayload type UpdateInstanceRequestPayload struct { - // List of IPV4 cidr. - // REQUIRED - Acl UpdateInstanceRequestPayloadGetAclAttributeType `json:"acl" required:"true"` // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. // REQUIRED BackupSchedule UpdateInstanceRequestPayloadGetBackupScheduleAttributeType `json:"backupSchedule" required:"true"` @@ -195,6 +192,8 @@ type UpdateInstanceRequestPayload struct { // REQUIRED Name UpdateInstanceRequestPayloadGetNameAttributeType `json:"name" required:"true"` // REQUIRED + Network UpdateInstanceRequestPayloadGetNetworkAttributeType `json:"network" required:"true"` + // REQUIRED Replicas UpdateInstanceRequestPayloadGetReplicasAttributeType `json:"replicas" required:"true"` // The days for how long the backup files should be stored before cleaned up. 30 to 365 // Can be cast to int32 without loss of precision. @@ -212,12 +211,12 @@ type _UpdateInstanceRequestPayload UpdateInstanceRequestPayload // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUpdateInstanceRequestPayload(acl UpdateInstanceRequestPayloadGetAclArgType, backupSchedule UpdateInstanceRequestPayloadGetBackupScheduleArgType, flavorId UpdateInstanceRequestPayloadGetFlavorIdArgType, name UpdateInstanceRequestPayloadGetNameArgType, replicas UpdateInstanceRequestPayloadGetReplicasArgType, retentionDays UpdateInstanceRequestPayloadGetRetentionDaysArgType, storage UpdateInstanceRequestPayloadGetStorageArgType, version UpdateInstanceRequestPayloadGetVersionArgType) *UpdateInstanceRequestPayload { +func NewUpdateInstanceRequestPayload(backupSchedule UpdateInstanceRequestPayloadGetBackupScheduleArgType, flavorId UpdateInstanceRequestPayloadGetFlavorIdArgType, name UpdateInstanceRequestPayloadGetNameArgType, network UpdateInstanceRequestPayloadGetNetworkArgType, replicas UpdateInstanceRequestPayloadGetReplicasArgType, retentionDays UpdateInstanceRequestPayloadGetRetentionDaysArgType, storage UpdateInstanceRequestPayloadGetStorageArgType, version UpdateInstanceRequestPayloadGetVersionArgType) *UpdateInstanceRequestPayload { this := UpdateInstanceRequestPayload{} - setUpdateInstanceRequestPayloadGetAclAttributeType(&this.Acl, acl) setUpdateInstanceRequestPayloadGetBackupScheduleAttributeType(&this.BackupSchedule, backupSchedule) setUpdateInstanceRequestPayloadGetFlavorIdAttributeType(&this.FlavorId, flavorId) setUpdateInstanceRequestPayloadGetNameAttributeType(&this.Name, name) + setUpdateInstanceRequestPayloadGetNetworkAttributeType(&this.Network, network) setUpdateInstanceRequestPayloadGetReplicasAttributeType(&this.Replicas, replicas) setUpdateInstanceRequestPayloadGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays) setUpdateInstanceRequestPayloadGetStorageAttributeType(&this.Storage, storage) @@ -233,23 +232,6 @@ func NewUpdateInstanceRequestPayloadWithDefaults() *UpdateInstanceRequestPayload return &this } -// GetAcl returns the Acl field value -func (o *UpdateInstanceRequestPayload) GetAcl() (ret UpdateInstanceRequestPayloadGetAclRetType) { - ret, _ = o.GetAclOk() - return ret -} - -// GetAclOk returns a tuple with the Acl field value -// and a boolean to check if the value has been set. -func (o *UpdateInstanceRequestPayload) GetAclOk() (ret UpdateInstanceRequestPayloadGetAclRetType, ok bool) { - return getUpdateInstanceRequestPayloadGetAclAttributeTypeOk(o.Acl) -} - -// SetAcl sets field value -func (o *UpdateInstanceRequestPayload) SetAcl(v UpdateInstanceRequestPayloadGetAclRetType) { - setUpdateInstanceRequestPayloadGetAclAttributeType(&o.Acl, v) -} - // GetBackupSchedule returns the BackupSchedule field value func (o *UpdateInstanceRequestPayload) GetBackupSchedule() (ret UpdateInstanceRequestPayloadGetBackupScheduleRetType) { ret, _ = o.GetBackupScheduleOk() @@ -301,6 +283,23 @@ func (o *UpdateInstanceRequestPayload) SetName(v UpdateInstanceRequestPayloadGet setUpdateInstanceRequestPayloadGetNameAttributeType(&o.Name, v) } +// GetNetwork returns the Network field value +func (o *UpdateInstanceRequestPayload) GetNetwork() (ret UpdateInstanceRequestPayloadGetNetworkRetType) { + ret, _ = o.GetNetworkOk() + return ret +} + +// GetNetworkOk returns a tuple with the Network field value +// and a boolean to check if the value has been set. +func (o *UpdateInstanceRequestPayload) GetNetworkOk() (ret UpdateInstanceRequestPayloadGetNetworkRetType, ok bool) { + return getUpdateInstanceRequestPayloadGetNetworkAttributeTypeOk(o.Network) +} + +// SetNetwork sets field value +func (o *UpdateInstanceRequestPayload) SetNetwork(v UpdateInstanceRequestPayloadGetNetworkRetType) { + setUpdateInstanceRequestPayloadGetNetworkAttributeType(&o.Network, v) +} + // GetReplicas returns the Replicas field value func (o *UpdateInstanceRequestPayload) GetReplicas() (ret UpdateInstanceRequestPayloadGetReplicasRetType) { ret, _ = o.GetReplicasOk() @@ -371,9 +370,6 @@ func (o *UpdateInstanceRequestPayload) SetVersion(v UpdateInstanceRequestPayload func (o UpdateInstanceRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getUpdateInstanceRequestPayloadGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } if val, ok := getUpdateInstanceRequestPayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { toSerialize["BackupSchedule"] = val } @@ -383,6 +379,9 @@ func (o UpdateInstanceRequestPayload) ToMap() (map[string]interface{}, error) { if val, ok := getUpdateInstanceRequestPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } + if val, ok := getUpdateInstanceRequestPayloadGetNetworkAttributeTypeOk(o.Network); ok { + toSerialize["Network"] = val + } if val, ok := getUpdateInstanceRequestPayloadGetReplicasAttributeTypeOk(o.Replicas); ok { toSerialize["Replicas"] = val }