## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
483 lines
19 KiB
Go
483 lines
19 KiB
Go
/*
|
|
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"
|
|
)
|
|
|
|
// checks if the CreateInstanceRequestPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CreateInstanceRequestPayload{}
|
|
|
|
/*
|
|
types and functions for backupSchedule
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateInstanceRequestPayloadGetBackupScheduleAttributeType = *string
|
|
|
|
func getCreateInstanceRequestPayloadGetBackupScheduleAttributeTypeOk(arg CreateInstanceRequestPayloadGetBackupScheduleAttributeType) (ret CreateInstanceRequestPayloadGetBackupScheduleRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateInstanceRequestPayloadGetBackupScheduleAttributeType(arg *CreateInstanceRequestPayloadGetBackupScheduleAttributeType, val CreateInstanceRequestPayloadGetBackupScheduleRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateInstanceRequestPayloadGetBackupScheduleArgType = string
|
|
type CreateInstanceRequestPayloadGetBackupScheduleRetType = string
|
|
|
|
/*
|
|
types and functions for encryption
|
|
*/
|
|
|
|
// isModel
|
|
type CreateInstanceRequestPayloadGetEncryptionAttributeType = *InstanceEncryption
|
|
type CreateInstanceRequestPayloadGetEncryptionArgType = InstanceEncryption
|
|
type CreateInstanceRequestPayloadGetEncryptionRetType = InstanceEncryption
|
|
|
|
func getCreateInstanceRequestPayloadGetEncryptionAttributeTypeOk(arg CreateInstanceRequestPayloadGetEncryptionAttributeType) (ret CreateInstanceRequestPayloadGetEncryptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateInstanceRequestPayloadGetEncryptionAttributeType(arg *CreateInstanceRequestPayloadGetEncryptionAttributeType, val CreateInstanceRequestPayloadGetEncryptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for flavorId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateInstanceRequestPayloadGetFlavorIdAttributeType = *string
|
|
|
|
func getCreateInstanceRequestPayloadGetFlavorIdAttributeTypeOk(arg CreateInstanceRequestPayloadGetFlavorIdAttributeType) (ret CreateInstanceRequestPayloadGetFlavorIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateInstanceRequestPayloadGetFlavorIdAttributeType(arg *CreateInstanceRequestPayloadGetFlavorIdAttributeType, val CreateInstanceRequestPayloadGetFlavorIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateInstanceRequestPayloadGetFlavorIdArgType = string
|
|
type CreateInstanceRequestPayloadGetFlavorIdRetType = string
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateInstanceRequestPayloadGetNameAttributeType = *string
|
|
|
|
func getCreateInstanceRequestPayloadGetNameAttributeTypeOk(arg CreateInstanceRequestPayloadGetNameAttributeType) (ret CreateInstanceRequestPayloadGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateInstanceRequestPayloadGetNameAttributeType(arg *CreateInstanceRequestPayloadGetNameAttributeType, val CreateInstanceRequestPayloadGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateInstanceRequestPayloadGetNameArgType = string
|
|
type CreateInstanceRequestPayloadGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for network
|
|
*/
|
|
|
|
// isModel
|
|
type CreateInstanceRequestPayloadGetNetworkAttributeType = *InstanceNetwork
|
|
type CreateInstanceRequestPayloadGetNetworkArgType = InstanceNetwork
|
|
type CreateInstanceRequestPayloadGetNetworkRetType = InstanceNetwork
|
|
|
|
func getCreateInstanceRequestPayloadGetNetworkAttributeTypeOk(arg CreateInstanceRequestPayloadGetNetworkAttributeType) (ret CreateInstanceRequestPayloadGetNetworkRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateInstanceRequestPayloadGetNetworkAttributeType(arg *CreateInstanceRequestPayloadGetNetworkAttributeType, val CreateInstanceRequestPayloadGetNetworkRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for replicas
|
|
*/
|
|
|
|
// isEnumRef
|
|
type CreateInstanceRequestPayloadGetReplicasAttributeType = *Replicas
|
|
type CreateInstanceRequestPayloadGetReplicasArgType = Replicas
|
|
type CreateInstanceRequestPayloadGetReplicasRetType = Replicas
|
|
|
|
func getCreateInstanceRequestPayloadGetReplicasAttributeTypeOk(arg CreateInstanceRequestPayloadGetReplicasAttributeType) (ret CreateInstanceRequestPayloadGetReplicasRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateInstanceRequestPayloadGetReplicasAttributeType(arg *CreateInstanceRequestPayloadGetReplicasAttributeType, val CreateInstanceRequestPayloadGetReplicasRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for retentionDays
|
|
*/
|
|
|
|
// isInteger
|
|
type CreateInstanceRequestPayloadGetRetentionDaysAttributeType = *int64
|
|
type CreateInstanceRequestPayloadGetRetentionDaysArgType = int64
|
|
type CreateInstanceRequestPayloadGetRetentionDaysRetType = int64
|
|
|
|
func getCreateInstanceRequestPayloadGetRetentionDaysAttributeTypeOk(arg CreateInstanceRequestPayloadGetRetentionDaysAttributeType) (ret CreateInstanceRequestPayloadGetRetentionDaysRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateInstanceRequestPayloadGetRetentionDaysAttributeType(arg *CreateInstanceRequestPayloadGetRetentionDaysAttributeType, val CreateInstanceRequestPayloadGetRetentionDaysRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for storage
|
|
*/
|
|
|
|
// isModel
|
|
type CreateInstanceRequestPayloadGetStorageAttributeType = *StorageCreate
|
|
type CreateInstanceRequestPayloadGetStorageArgType = StorageCreate
|
|
type CreateInstanceRequestPayloadGetStorageRetType = StorageCreate
|
|
|
|
func getCreateInstanceRequestPayloadGetStorageAttributeTypeOk(arg CreateInstanceRequestPayloadGetStorageAttributeType) (ret CreateInstanceRequestPayloadGetStorageRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateInstanceRequestPayloadGetStorageAttributeType(arg *CreateInstanceRequestPayloadGetStorageAttributeType, val CreateInstanceRequestPayloadGetStorageRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for version
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateInstanceRequestPayloadGetVersionAttributeType = *string
|
|
|
|
func getCreateInstanceRequestPayloadGetVersionAttributeTypeOk(arg CreateInstanceRequestPayloadGetVersionAttributeType) (ret CreateInstanceRequestPayloadGetVersionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateInstanceRequestPayloadGetVersionAttributeType(arg *CreateInstanceRequestPayloadGetVersionAttributeType, val CreateInstanceRequestPayloadGetVersionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateInstanceRequestPayloadGetVersionArgType = string
|
|
type CreateInstanceRequestPayloadGetVersionRetType = string
|
|
|
|
// CreateInstanceRequestPayload struct for CreateInstanceRequestPayload
|
|
type CreateInstanceRequestPayload struct {
|
|
// 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"`
|
|
Encryption CreateInstanceRequestPayloadGetEncryptionAttributeType `json:"encryption,omitempty"`
|
|
// The id of the instance flavor.
|
|
// REQUIRED
|
|
FlavorId CreateInstanceRequestPayloadGetFlavorIdAttributeType `json:"flavorId" required:"true"`
|
|
// The name of the instance.
|
|
// REQUIRED
|
|
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.
|
|
// Can be cast to int32 without loss of precision.
|
|
// REQUIRED
|
|
RetentionDays CreateInstanceRequestPayloadGetRetentionDaysAttributeType `json:"retentionDays" required:"true"`
|
|
// REQUIRED
|
|
Storage CreateInstanceRequestPayloadGetStorageAttributeType `json:"storage" required:"true"`
|
|
// The Postgres version used for the instance. See [Versions Endpoint](/documentation/postgres-flex-service/version/v3alpha1#tag/Version) for supported version parameters.
|
|
// REQUIRED
|
|
Version CreateInstanceRequestPayloadGetVersionAttributeType `json:"version" required:"true"`
|
|
}
|
|
|
|
type _CreateInstanceRequestPayload CreateInstanceRequestPayload
|
|
|
|
// NewCreateInstanceRequestPayload instantiates a new CreateInstanceRequestPayload 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 NewCreateInstanceRequestPayload(backupSchedule CreateInstanceRequestPayloadGetBackupScheduleArgType, flavorId CreateInstanceRequestPayloadGetFlavorIdArgType, name CreateInstanceRequestPayloadGetNameArgType, network CreateInstanceRequestPayloadGetNetworkArgType, replicas CreateInstanceRequestPayloadGetReplicasArgType, retentionDays CreateInstanceRequestPayloadGetRetentionDaysArgType, storage CreateInstanceRequestPayloadGetStorageArgType, version CreateInstanceRequestPayloadGetVersionArgType) *CreateInstanceRequestPayload {
|
|
this := CreateInstanceRequestPayload{}
|
|
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)
|
|
setCreateInstanceRequestPayloadGetVersionAttributeType(&this.Version, version)
|
|
return &this
|
|
}
|
|
|
|
// NewCreateInstanceRequestPayloadWithDefaults instantiates a new CreateInstanceRequestPayload object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewCreateInstanceRequestPayloadWithDefaults() *CreateInstanceRequestPayload {
|
|
this := CreateInstanceRequestPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetBackupSchedule returns the BackupSchedule field value
|
|
func (o *CreateInstanceRequestPayload) GetBackupSchedule() (ret CreateInstanceRequestPayloadGetBackupScheduleRetType) {
|
|
ret, _ = o.GetBackupScheduleOk()
|
|
return ret
|
|
}
|
|
|
|
// GetBackupScheduleOk returns a tuple with the BackupSchedule field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateInstanceRequestPayload) GetBackupScheduleOk() (ret CreateInstanceRequestPayloadGetBackupScheduleRetType, ok bool) {
|
|
return getCreateInstanceRequestPayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule)
|
|
}
|
|
|
|
// SetBackupSchedule sets field value
|
|
func (o *CreateInstanceRequestPayload) SetBackupSchedule(v CreateInstanceRequestPayloadGetBackupScheduleRetType) {
|
|
setCreateInstanceRequestPayloadGetBackupScheduleAttributeType(&o.BackupSchedule, v)
|
|
}
|
|
|
|
// GetEncryption returns the Encryption field value if set, zero value otherwise.
|
|
func (o *CreateInstanceRequestPayload) GetEncryption() (res CreateInstanceRequestPayloadGetEncryptionRetType) {
|
|
res, _ = o.GetEncryptionOk()
|
|
return
|
|
}
|
|
|
|
// GetEncryptionOk returns a tuple with the Encryption field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateInstanceRequestPayload) GetEncryptionOk() (ret CreateInstanceRequestPayloadGetEncryptionRetType, ok bool) {
|
|
return getCreateInstanceRequestPayloadGetEncryptionAttributeTypeOk(o.Encryption)
|
|
}
|
|
|
|
// HasEncryption returns a boolean if a field has been set.
|
|
func (o *CreateInstanceRequestPayload) HasEncryption() bool {
|
|
_, ok := o.GetEncryptionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetEncryption gets a reference to the given InstanceEncryption and assigns it to the Encryption field.
|
|
func (o *CreateInstanceRequestPayload) SetEncryption(v CreateInstanceRequestPayloadGetEncryptionRetType) {
|
|
setCreateInstanceRequestPayloadGetEncryptionAttributeType(&o.Encryption, v)
|
|
}
|
|
|
|
// GetFlavorId returns the FlavorId field value
|
|
func (o *CreateInstanceRequestPayload) GetFlavorId() (ret CreateInstanceRequestPayloadGetFlavorIdRetType) {
|
|
ret, _ = o.GetFlavorIdOk()
|
|
return ret
|
|
}
|
|
|
|
// GetFlavorIdOk returns a tuple with the FlavorId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateInstanceRequestPayload) GetFlavorIdOk() (ret CreateInstanceRequestPayloadGetFlavorIdRetType, ok bool) {
|
|
return getCreateInstanceRequestPayloadGetFlavorIdAttributeTypeOk(o.FlavorId)
|
|
}
|
|
|
|
// SetFlavorId sets field value
|
|
func (o *CreateInstanceRequestPayload) SetFlavorId(v CreateInstanceRequestPayloadGetFlavorIdRetType) {
|
|
setCreateInstanceRequestPayloadGetFlavorIdAttributeType(&o.FlavorId, v)
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *CreateInstanceRequestPayload) GetName() (ret CreateInstanceRequestPayloadGetNameRetType) {
|
|
ret, _ = o.GetNameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateInstanceRequestPayload) GetNameOk() (ret CreateInstanceRequestPayloadGetNameRetType, ok bool) {
|
|
return getCreateInstanceRequestPayloadGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *CreateInstanceRequestPayload) SetName(v CreateInstanceRequestPayloadGetNameRetType) {
|
|
setCreateInstanceRequestPayloadGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// 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
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateInstanceRequestPayload) GetNetworkOk() (ret CreateInstanceRequestPayloadGetNetworkRetType, ok bool) {
|
|
return getCreateInstanceRequestPayloadGetNetworkAttributeTypeOk(o.Network)
|
|
}
|
|
|
|
// SetNetwork sets field value
|
|
func (o *CreateInstanceRequestPayload) SetNetwork(v CreateInstanceRequestPayloadGetNetworkRetType) {
|
|
setCreateInstanceRequestPayloadGetNetworkAttributeType(&o.Network, v)
|
|
}
|
|
|
|
// GetReplicas returns the Replicas field value
|
|
func (o *CreateInstanceRequestPayload) GetReplicas() (ret CreateInstanceRequestPayloadGetReplicasRetType) {
|
|
ret, _ = o.GetReplicasOk()
|
|
return ret
|
|
}
|
|
|
|
// GetReplicasOk returns a tuple with the Replicas field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateInstanceRequestPayload) GetReplicasOk() (ret CreateInstanceRequestPayloadGetReplicasRetType, ok bool) {
|
|
return getCreateInstanceRequestPayloadGetReplicasAttributeTypeOk(o.Replicas)
|
|
}
|
|
|
|
// SetReplicas sets field value
|
|
func (o *CreateInstanceRequestPayload) SetReplicas(v CreateInstanceRequestPayloadGetReplicasRetType) {
|
|
setCreateInstanceRequestPayloadGetReplicasAttributeType(&o.Replicas, v)
|
|
}
|
|
|
|
// GetRetentionDays returns the RetentionDays field value
|
|
func (o *CreateInstanceRequestPayload) GetRetentionDays() (ret CreateInstanceRequestPayloadGetRetentionDaysRetType) {
|
|
ret, _ = o.GetRetentionDaysOk()
|
|
return ret
|
|
}
|
|
|
|
// GetRetentionDaysOk returns a tuple with the RetentionDays field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateInstanceRequestPayload) GetRetentionDaysOk() (ret CreateInstanceRequestPayloadGetRetentionDaysRetType, ok bool) {
|
|
return getCreateInstanceRequestPayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays)
|
|
}
|
|
|
|
// SetRetentionDays sets field value
|
|
func (o *CreateInstanceRequestPayload) SetRetentionDays(v CreateInstanceRequestPayloadGetRetentionDaysRetType) {
|
|
setCreateInstanceRequestPayloadGetRetentionDaysAttributeType(&o.RetentionDays, v)
|
|
}
|
|
|
|
// GetStorage returns the Storage field value
|
|
func (o *CreateInstanceRequestPayload) GetStorage() (ret CreateInstanceRequestPayloadGetStorageRetType) {
|
|
ret, _ = o.GetStorageOk()
|
|
return ret
|
|
}
|
|
|
|
// GetStorageOk returns a tuple with the Storage field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateInstanceRequestPayload) GetStorageOk() (ret CreateInstanceRequestPayloadGetStorageRetType, ok bool) {
|
|
return getCreateInstanceRequestPayloadGetStorageAttributeTypeOk(o.Storage)
|
|
}
|
|
|
|
// SetStorage sets field value
|
|
func (o *CreateInstanceRequestPayload) SetStorage(v CreateInstanceRequestPayloadGetStorageRetType) {
|
|
setCreateInstanceRequestPayloadGetStorageAttributeType(&o.Storage, v)
|
|
}
|
|
|
|
// GetVersion returns the Version field value
|
|
func (o *CreateInstanceRequestPayload) GetVersion() (ret CreateInstanceRequestPayloadGetVersionRetType) {
|
|
ret, _ = o.GetVersionOk()
|
|
return ret
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateInstanceRequestPayload) GetVersionOk() (ret CreateInstanceRequestPayloadGetVersionRetType, ok bool) {
|
|
return getCreateInstanceRequestPayloadGetVersionAttributeTypeOk(o.Version)
|
|
}
|
|
|
|
// SetVersion sets field value
|
|
func (o *CreateInstanceRequestPayload) SetVersion(v CreateInstanceRequestPayloadGetVersionRetType) {
|
|
setCreateInstanceRequestPayloadGetVersionAttributeType(&o.Version, v)
|
|
}
|
|
|
|
func (o CreateInstanceRequestPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getCreateInstanceRequestPayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok {
|
|
toSerialize["BackupSchedule"] = val
|
|
}
|
|
if val, ok := getCreateInstanceRequestPayloadGetEncryptionAttributeTypeOk(o.Encryption); ok {
|
|
toSerialize["Encryption"] = val
|
|
}
|
|
if val, ok := getCreateInstanceRequestPayloadGetFlavorIdAttributeTypeOk(o.FlavorId); ok {
|
|
toSerialize["FlavorId"] = val
|
|
}
|
|
if val, ok := getCreateInstanceRequestPayloadGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getCreateInstanceRequestPayloadGetNetworkAttributeTypeOk(o.Network); ok {
|
|
toSerialize["Network"] = val
|
|
}
|
|
if val, ok := getCreateInstanceRequestPayloadGetReplicasAttributeTypeOk(o.Replicas); ok {
|
|
toSerialize["Replicas"] = val
|
|
}
|
|
if val, ok := getCreateInstanceRequestPayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok {
|
|
toSerialize["RetentionDays"] = val
|
|
}
|
|
if val, ok := getCreateInstanceRequestPayloadGetStorageAttributeTypeOk(o.Storage); ok {
|
|
toSerialize["Storage"] = val
|
|
}
|
|
if val, ok := getCreateInstanceRequestPayloadGetVersionAttributeTypeOk(o.Version); ok {
|
|
toSerialize["Version"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCreateInstanceRequestPayload struct {
|
|
value *CreateInstanceRequestPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCreateInstanceRequestPayload) Get() *CreateInstanceRequestPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCreateInstanceRequestPayload) Set(val *CreateInstanceRequestPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCreateInstanceRequestPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCreateInstanceRequestPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCreateInstanceRequestPayload(val *CreateInstanceRequestPayload) *NullableCreateInstanceRequestPayload {
|
|
return &NullableCreateInstanceRequestPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCreateInstanceRequestPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCreateInstanceRequestPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|