feat: work savenew api version with acl in network segment

This commit is contained in:
Marcel_Henselin 2025-12-30 07:57:33 +01:00
parent 5cab4b79ee
commit 318d2e0962
6 changed files with 151 additions and 202 deletions

View file

@ -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
}

View file

@ -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
}

View file

@ -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

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}