Fix: pgsql fix (#10)

* fix: remove license header from files

* fix: updated docs and sample
---------

Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
This commit is contained in:
Marcel S. Henselin 2025-12-22 09:23:53 +01:00 committed by GitHub
parent 99f2853ae5
commit 9e04ab2630
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 1159 additions and 1412 deletions

View file

@ -1,5 +1,3 @@
// Copyright (c) STACKIT
/*
PostgreSQL Flex API

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
*/
@ -223,9 +203,6 @@ type CreateInstanceRequestPayloadGetVersionRetType = string
// CreateInstanceRequestPayload struct for CreateInstanceRequestPayload
type CreateInstanceRequestPayload struct {
// 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"`
@ -235,8 +212,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"`
// REQUIRED
Replicas CreateInstanceRequestPayloadGetReplicasAttributeType `json:"replicas" required:"true"`
// How long backups are retained. The value can only be between 32 and 365 days.
@ -256,12 +234,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, replicas CreateInstanceRequestPayloadGetReplicasArgType, retentionDays CreateInstanceRequestPayloadGetRetentionDaysArgType, storage CreateInstanceRequestPayloadGetStorageArgType, version CreateInstanceRequestPayloadGetVersionArgType) *CreateInstanceRequestPayload {
func NewCreateInstanceRequestPayload(backupSchedule CreateInstanceRequestPayloadGetBackupScheduleArgType, flavorId CreateInstanceRequestPayloadGetFlavorIdArgType, name CreateInstanceRequestPayloadGetNameArgType, network CreateInstanceRequestPayloadGetNetworkArgType, replicas CreateInstanceRequestPayloadGetReplicasArgType, 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)
setCreateInstanceRequestPayloadGetReplicasAttributeType(&this.Replicas, replicas)
setCreateInstanceRequestPayloadGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays)
setCreateInstanceRequestPayloadGetStorageAttributeType(&this.Storage, storage)
@ -277,23 +255,6 @@ func NewCreateInstanceRequestPayloadWithDefaults() *CreateInstanceRequestPayload
return &this
}
// GetAcl returns the Acl field value
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.
func (o *CreateInstanceRequestPayload) GetAclOk() (ret CreateInstanceRequestPayloadGetAclRetType, ok bool) {
return getCreateInstanceRequestPayloadGetAclAttributeTypeOk(o.Acl)
}
// SetAcl sets field value
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()
@ -368,25 +329,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 InstanceNetwork and assigns it to the Network field.
// SetNetwork sets field value
func (o *CreateInstanceRequestPayload) SetNetwork(v CreateInstanceRequestPayloadGetNetworkRetType) {
setCreateInstanceRequestPayloadGetNetworkAttributeType(&o.Network, v)
}
@ -461,9 +416,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

@ -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
*/
@ -141,6 +121,26 @@ func setGetInstanceResponseGetNameAttributeType(arg *GetInstanceResponseGetNameA
type GetInstanceResponseGetNameArgType = string
type GetInstanceResponseGetNameRetType = string
/*
types and functions for network
*/
// isModel
type GetInstanceResponseGetNetworkAttributeType = *InstanceNetwork
type GetInstanceResponseGetNetworkArgType = InstanceNetwork
type GetInstanceResponseGetNetworkRetType = InstanceNetwork
func getGetInstanceResponseGetNetworkAttributeTypeOk(arg GetInstanceResponseGetNetworkAttributeType) (ret GetInstanceResponseGetNetworkRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetInstanceResponseGetNetworkAttributeType(arg *GetInstanceResponseGetNetworkAttributeType, val GetInstanceResponseGetNetworkRetType) {
*arg = &val
}
/*
types and functions for replicas
*/
@ -244,9 +244,6 @@ type GetInstanceResponseGetVersionRetType = string
// 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"`
@ -263,6 +260,8 @@ type GetInstanceResponse struct {
// REQUIRED
Name GetInstanceResponseGetNameAttributeType `json:"name" required:"true"`
// REQUIRED
Network GetInstanceResponseGetNetworkAttributeType `json:"network" required:"true"`
// REQUIRED
Replicas GetInstanceResponseGetReplicasAttributeType `json:"replicas" required:"true"`
// How long backups are retained. The value can only be between 32 and 365 days.
// Can be cast to int32 without loss of precision.
@ -283,14 +282,14 @@ 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, flavorId GetInstanceResponseGetFlavorIdArgType, id GetInstanceResponseGetIdArgType, isDeletable GetInstanceResponsegetIsDeletableArgType, name GetInstanceResponseGetNameArgType, replicas GetInstanceResponseGetReplicasArgType, retentionDays GetInstanceResponseGetRetentionDaysArgType, status GetInstanceResponseGetStatusArgType, storage GetInstanceResponseGetStorageArgType, version GetInstanceResponseGetVersionArgType) *GetInstanceResponse {
func NewGetInstanceResponse(backupSchedule GetInstanceResponseGetBackupScheduleArgType, 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)
setGetInstanceResponseGetFlavorIdAttributeType(&this.FlavorId, flavorId)
setGetInstanceResponseGetIdAttributeType(&this.Id, id)
setGetInstanceResponsegetIsDeletableAttributeType(&this.IsDeletable, isDeletable)
setGetInstanceResponseGetNameAttributeType(&this.Name, name)
setGetInstanceResponseGetNetworkAttributeType(&this.Network, network)
setGetInstanceResponseGetReplicasAttributeType(&this.Replicas, replicas)
setGetInstanceResponseGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays)
setGetInstanceResponseGetStatusAttributeType(&this.Status, status)
@ -307,23 +306,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()
@ -409,6 +391,23 @@ func (o *GetInstanceResponse) SetName(v GetInstanceResponseGetNameRetType) {
setGetInstanceResponseGetNameAttributeType(&o.Name, v)
}
// GetNetwork returns the Network field value
func (o *GetInstanceResponse) GetNetwork() (ret GetInstanceResponseGetNetworkRetType) {
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 *GetInstanceResponse) GetNetworkOk() (ret GetInstanceResponseGetNetworkRetType, ok bool) {
return getGetInstanceResponseGetNetworkAttributeTypeOk(o.Network)
}
// SetNetwork sets field value
func (o *GetInstanceResponse) SetNetwork(v GetInstanceResponseGetNetworkRetType) {
setGetInstanceResponseGetNetworkAttributeType(&o.Network, v)
}
// GetReplicas returns the Replicas field value
func (o *GetInstanceResponse) GetReplicas() (ret GetInstanceResponseGetReplicasRetType) {
ret, _ = o.GetReplicasOk()
@ -496,9 +495,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
}
@ -514,6 +510,9 @@ func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) {
if val, ok := getGetInstanceResponseGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getGetInstanceResponseGetNetworkAttributeTypeOk(o.Network); ok {
toSerialize["Network"] = val
}
if val, ok := getGetInstanceResponseGetReplicasAttributeTypeOk(o.Replicas); ok {
toSerialize["Replicas"] = val
}

View file

@ -12,7 +12,6 @@ package postgresflexalpha
import (
"encoding/json"
"fmt"
)
// checks if the InstanceNetwork type satisfies the MappedNullable interface at compile time
@ -22,111 +21,7 @@ var _ MappedNullable = &InstanceNetwork{}
types and functions for accessScope
*/
// isEnum
// InstanceNetworkAccessScope The access scope of the instance. It defines if the instance is public or airgapped.
// value type for enums
type InstanceNetworkAccessScope string
// List of AccessScope
const (
INSTANCENETWORKACCESS_SCOPE_PUBLIC InstanceNetworkAccessScope = "PUBLIC"
INSTANCENETWORKACCESS_SCOPE_SNA InstanceNetworkAccessScope = "SNA"
)
// All allowed values of InstanceNetwork enum
var AllowedInstanceNetworkAccessScopeEnumValues = []InstanceNetworkAccessScope{
"PUBLIC",
"SNA",
}
func (v *InstanceNetworkAccessScope) UnmarshalJSON(src []byte) error {
// use a type alias to prevent infinite recursion during unmarshal,
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
type TmpJson InstanceNetworkAccessScope
var value TmpJson
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
// Allow unmarshalling zero value for testing purposes
var zeroValue TmpJson
if value == zeroValue {
return nil
}
enumTypeValue := InstanceNetworkAccessScope(value)
for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid InstanceNetwork", value)
}
// NewInstanceNetworkAccessScopeFromValue returns a pointer to a valid InstanceNetworkAccessScope
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewInstanceNetworkAccessScopeFromValue(v InstanceNetworkAccessScope) (*InstanceNetworkAccessScope, error) {
ev := InstanceNetworkAccessScope(v)
if ev.IsValid() {
return &ev, nil
} else {
return nil, fmt.Errorf("invalid value '%v' for InstanceNetworkAccessScope: valid values are %v", v, AllowedInstanceNetworkAccessScopeEnumValues)
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v InstanceNetworkAccessScope) IsValid() bool {
for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to AccessScopeAccessScope value
func (v InstanceNetworkAccessScope) Ptr() *InstanceNetworkAccessScope {
return &v
}
type NullableInstanceNetworkAccessScope struct {
value *InstanceNetworkAccessScope
isSet bool
}
func (v NullableInstanceNetworkAccessScope) Get() *InstanceNetworkAccessScope {
return v.value
}
func (v *NullableInstanceNetworkAccessScope) Set(val *InstanceNetworkAccessScope) {
v.value = val
v.isSet = true
}
func (v NullableInstanceNetworkAccessScope) IsSet() bool {
return v.isSet
}
func (v *NullableInstanceNetworkAccessScope) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInstanceNetworkAccessScope(val *InstanceNetworkAccessScope) *NullableInstanceNetworkAccessScope {
return &NullableInstanceNetworkAccessScope{value: val, isSet: true}
}
func (v NullableInstanceNetworkAccessScope) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInstanceNetworkAccessScope) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
// isEnumRef
type InstanceNetworkGetAccessScopeAttributeType = *InstanceNetworkAccessScope
type InstanceNetworkGetAccessScopeArgType = InstanceNetworkAccessScope
type InstanceNetworkGetAccessScopeRetType = InstanceNetworkAccessScope
@ -142,11 +37,76 @@ func setInstanceNetworkGetAccessScopeAttributeType(arg *InstanceNetworkGetAccess
*arg = &val
}
// InstanceNetwork The network configuration of the instance. ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.
/*
types and functions for acl
*/
// isArray
type InstanceNetworkGetAclAttributeType = *[]string
type InstanceNetworkGetAclArgType = []string
type InstanceNetworkGetAclRetType = []string
func getInstanceNetworkGetAclAttributeTypeOk(arg InstanceNetworkGetAclAttributeType) (ret InstanceNetworkGetAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setInstanceNetworkGetAclAttributeType(arg *InstanceNetworkGetAclAttributeType, val InstanceNetworkGetAclRetType) {
*arg = &val
}
/*
types and functions for instanceAddress
*/
// isNotNullableString
type InstanceNetworkGetInstanceAddressAttributeType = *string
func getInstanceNetworkGetInstanceAddressAttributeTypeOk(arg InstanceNetworkGetInstanceAddressAttributeType) (ret InstanceNetworkGetInstanceAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setInstanceNetworkGetInstanceAddressAttributeType(arg *InstanceNetworkGetInstanceAddressAttributeType, val InstanceNetworkGetInstanceAddressRetType) {
*arg = &val
}
type InstanceNetworkGetInstanceAddressArgType = string
type InstanceNetworkGetInstanceAddressRetType = string
/*
types and functions for routerAddress
*/
// isNotNullableString
type InstanceNetworkGetRouterAddressAttributeType = *string
func getInstanceNetworkGetRouterAddressAttributeTypeOk(arg InstanceNetworkGetRouterAddressAttributeType) (ret InstanceNetworkGetRouterAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setInstanceNetworkGetRouterAddressAttributeType(arg *InstanceNetworkGetRouterAddressAttributeType, val InstanceNetworkGetRouterAddressRetType) {
*arg = &val
}
type InstanceNetworkGetRouterAddressArgType = string
type InstanceNetworkGetRouterAddressRetType = string
// InstanceNetwork The access configuration of the instance
type InstanceNetwork struct {
// The access scope of the instance. It defines if the instance is public or airgapped.
AccessScope InstanceNetworkGetAccessScopeAttributeType `json:"accessScope,omitempty"`
// List of IPV4 cidr.
// REQUIRED
AccessScope InstanceNetworkGetAccessScopeAttributeType `json:"accessScope" required:"true"`
Acl InstanceNetworkGetAclAttributeType `json:"acl" required:"true"`
InstanceAddress InstanceNetworkGetInstanceAddressAttributeType `json:"instanceAddress,omitempty"`
RouterAddress InstanceNetworkGetRouterAddressAttributeType `json:"routerAddress,omitempty"`
}
type _InstanceNetwork InstanceNetwork
@ -155,9 +115,9 @@ type _InstanceNetwork InstanceNetwork
// 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 NewInstanceNetwork(accessScope InstanceNetworkGetAccessScopeArgType) *InstanceNetwork {
func NewInstanceNetwork(acl InstanceNetworkGetAclArgType) *InstanceNetwork {
this := InstanceNetwork{}
setInstanceNetworkGetAccessScopeAttributeType(&this.AccessScope, accessScope)
setInstanceNetworkGetAclAttributeType(&this.Acl, acl)
return &this
}
@ -166,33 +126,111 @@ func NewInstanceNetwork(accessScope InstanceNetworkGetAccessScopeArgType) *Insta
// but it doesn't guarantee that properties required by API are set
func NewInstanceNetworkWithDefaults() *InstanceNetwork {
this := InstanceNetwork{}
var accessScope InstanceNetworkAccessScope = "PUBLIC"
var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC
this.AccessScope = &accessScope
return &this
}
// GetAccessScope returns the AccessScope field value
func (o *InstanceNetwork) GetAccessScope() (ret InstanceNetworkGetAccessScopeRetType) {
ret, _ = o.GetAccessScopeOk()
return ret
// GetAccessScope returns the AccessScope field value if set, zero value otherwise.
func (o *InstanceNetwork) GetAccessScope() (res InstanceNetworkGetAccessScopeRetType) {
res, _ = o.GetAccessScopeOk()
return
}
// GetAccessScopeOk returns a tuple with the AccessScope field value
// GetAccessScopeOk returns a tuple with the AccessScope field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstanceNetwork) GetAccessScopeOk() (ret InstanceNetworkGetAccessScopeRetType, ok bool) {
return getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope)
}
// SetAccessScope sets field value
// HasAccessScope returns a boolean if a field has been set.
func (o *InstanceNetwork) HasAccessScope() bool {
_, ok := o.GetAccessScopeOk()
return ok
}
// SetAccessScope gets a reference to the given InstanceNetworkAccessScope and assigns it to the AccessScope field.
func (o *InstanceNetwork) SetAccessScope(v InstanceNetworkGetAccessScopeRetType) {
setInstanceNetworkGetAccessScopeAttributeType(&o.AccessScope, v)
}
// GetAcl returns the Acl field value
func (o *InstanceNetwork) GetAcl() (ret InstanceNetworkGetAclRetType) {
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 *InstanceNetwork) GetAclOk() (ret InstanceNetworkGetAclRetType, ok bool) {
return getInstanceNetworkGetAclAttributeTypeOk(o.Acl)
}
// SetAcl sets field value
func (o *InstanceNetwork) SetAcl(v InstanceNetworkGetAclRetType) {
setInstanceNetworkGetAclAttributeType(&o.Acl, v)
}
// GetInstanceAddress returns the InstanceAddress field value if set, zero value otherwise.
func (o *InstanceNetwork) GetInstanceAddress() (res InstanceNetworkGetInstanceAddressRetType) {
res, _ = o.GetInstanceAddressOk()
return
}
// GetInstanceAddressOk returns a tuple with the InstanceAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstanceNetwork) GetInstanceAddressOk() (ret InstanceNetworkGetInstanceAddressRetType, ok bool) {
return getInstanceNetworkGetInstanceAddressAttributeTypeOk(o.InstanceAddress)
}
// HasInstanceAddress returns a boolean if a field has been set.
func (o *InstanceNetwork) HasInstanceAddress() bool {
_, ok := o.GetInstanceAddressOk()
return ok
}
// SetInstanceAddress gets a reference to the given string and assigns it to the InstanceAddress field.
func (o *InstanceNetwork) SetInstanceAddress(v InstanceNetworkGetInstanceAddressRetType) {
setInstanceNetworkGetInstanceAddressAttributeType(&o.InstanceAddress, v)
}
// GetRouterAddress returns the RouterAddress field value if set, zero value otherwise.
func (o *InstanceNetwork) GetRouterAddress() (res InstanceNetworkGetRouterAddressRetType) {
res, _ = o.GetRouterAddressOk()
return
}
// GetRouterAddressOk returns a tuple with the RouterAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstanceNetwork) GetRouterAddressOk() (ret InstanceNetworkGetRouterAddressRetType, ok bool) {
return getInstanceNetworkGetRouterAddressAttributeTypeOk(o.RouterAddress)
}
// HasRouterAddress returns a boolean if a field has been set.
func (o *InstanceNetwork) HasRouterAddress() bool {
_, ok := o.GetRouterAddressOk()
return ok
}
// SetRouterAddress gets a reference to the given string and assigns it to the RouterAddress field.
func (o *InstanceNetwork) SetRouterAddress(v InstanceNetworkGetRouterAddressRetType) {
setInstanceNetworkGetRouterAddressAttributeType(&o.RouterAddress, v)
}
func (o InstanceNetwork) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope); ok {
toSerialize["AccessScope"] = val
}
if val, ok := getInstanceNetworkGetAclAttributeTypeOk(o.Acl); ok {
toSerialize["Acl"] = val
}
if val, ok := getInstanceNetworkGetInstanceAddressAttributeTypeOk(o.InstanceAddress); ok {
toSerialize["InstanceAddress"] = val
}
if val, ok := getInstanceNetworkGetRouterAddressAttributeTypeOk(o.RouterAddress); ok {
toSerialize["RouterAddress"] = val
}
return toSerialize, nil
}

View file

@ -0,0 +1,115 @@
/*
PostgreSQL Flex API
This is the documentation for the STACKIT Postgres Flex service
API version: 3alpha1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package postgresflexalpha
import (
"encoding/json"
"fmt"
)
// InstanceNetworkAccessScope The access scope of the instance. It defines if the instance is public or airgapped.
type InstanceNetworkAccessScope string
// List of instance.network.accessScope
const (
INSTANCENETWORKACCESSSCOPE_PUBLIC InstanceNetworkAccessScope = "PUBLIC"
INSTANCENETWORKACCESSSCOPE_SNA InstanceNetworkAccessScope = "SNA"
)
// All allowed values of InstanceNetworkAccessScope enum
var AllowedInstanceNetworkAccessScopeEnumValues = []InstanceNetworkAccessScope{
"PUBLIC",
"SNA",
}
func (v *InstanceNetworkAccessScope) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
// Allow unmarshalling zero value for testing purposes
var zeroValue string
if value == zeroValue {
return nil
}
enumTypeValue := InstanceNetworkAccessScope(value)
for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid InstanceNetworkAccessScope", value)
}
// NewInstanceNetworkAccessScopeFromValue returns a pointer to a valid InstanceNetworkAccessScope
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewInstanceNetworkAccessScopeFromValue(v string) (*InstanceNetworkAccessScope, error) {
ev := InstanceNetworkAccessScope(v)
if ev.IsValid() {
return &ev, nil
} else {
return nil, fmt.Errorf("invalid value '%v' for InstanceNetworkAccessScope: valid values are %v", v, AllowedInstanceNetworkAccessScopeEnumValues)
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v InstanceNetworkAccessScope) IsValid() bool {
for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to instance.network.accessScope value
func (v InstanceNetworkAccessScope) Ptr() *InstanceNetworkAccessScope {
return &v
}
type NullableInstanceNetworkAccessScope struct {
value *InstanceNetworkAccessScope
isSet bool
}
func (v NullableInstanceNetworkAccessScope) Get() *InstanceNetworkAccessScope {
return v.value
}
func (v *NullableInstanceNetworkAccessScope) Set(val *InstanceNetworkAccessScope) {
v.value = val
v.isSet = true
}
func (v NullableInstanceNetworkAccessScope) IsSet() bool {
return v.isSet
}
func (v *NullableInstanceNetworkAccessScope) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInstanceNetworkAccessScope(val *InstanceNetworkAccessScope) *NullableInstanceNetworkAccessScope {
return &NullableInstanceNetworkAccessScope{value: val, isSet: true}
}
func (v NullableInstanceNetworkAccessScope) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInstanceNetworkAccessScope) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
PostgreSQL Flex API
This is the documentation for the STACKIT Postgres Flex service
API version: 3alpha1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package postgresflexalpha

View file

@ -9,50 +9,3 @@ API version: 3alpha1
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package postgresflexalpha
import (
"testing"
)
// isEnum
func TestInstanceNetworkAccessScope_UnmarshalJSON(t *testing.T) {
type args struct {
src []byte
}
tests := []struct {
name string
args args
wantErr bool
}{
{
name: `success - possible enum value no. 1`,
args: args{
src: []byte(`"PUBLIC"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 2`,
args: args{
src: []byte(`"SNA"`),
},
wantErr: false,
},
{
name: "fail",
args: args{
src: []byte("\"FOOBAR\""),
},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
v := InstanceNetworkAccessScope("")
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}

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 = *InstanceNetwork
type UpdateInstancePartiallyRequestPayloadGetNetworkArgType = InstanceNetwork
type UpdateInstancePartiallyRequestPayloadGetNetworkRetType = InstanceNetwork
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
*/
@ -183,14 +183,13 @@ type UpdateInstancePartiallyRequestPayloadGetVersionRetType = string
// 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"`
// How long backups are retained. The value can only be between 32 and 365 days.
// Can be cast to int32 without loss of precision.
@ -217,29 +216,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()
@ -309,6 +285,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 InstanceNetwork 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()
@ -403,9 +402,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
}
@ -415,6 +411,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 = *InstanceNetwork
type UpdateInstanceRequestPayloadGetNetworkArgType = InstanceNetwork
type UpdateInstanceRequestPayloadGetNetworkRetType = InstanceNetwork
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
*/
@ -183,9 +183,6 @@ type UpdateInstanceRequestPayloadGetVersionRetType = string
// 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"`
@ -196,6 +193,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"`
// How long backups are retained. The value can only be between 32 and 365 days.
// Can be cast to int32 without loss of precision.
@ -214,12 +213,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)
@ -235,23 +234,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()
@ -303,6 +285,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()
@ -373,9 +372,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
}
@ -385,6 +381,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
}