/* STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service API version: 3alpha1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package sqlserverflexalpha import ( "encoding/json" ) // checks if the UpdateInstancePartiallyRequestPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateInstancePartiallyRequestPayload{} /* types and functions for backupSchedule */ // isNotNullableString type UpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeType = *string func getUpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeTypeOk(arg UpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeType) (ret UpdateInstancePartiallyRequestPayloadGetBackupScheduleRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeType(arg *UpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeType, val UpdateInstancePartiallyRequestPayloadGetBackupScheduleRetType) { *arg = &val } type UpdateInstancePartiallyRequestPayloadGetBackupScheduleArgType = string type UpdateInstancePartiallyRequestPayloadGetBackupScheduleRetType = string /* types and functions for flavorId */ // isNotNullableString type UpdateInstancePartiallyRequestPayloadGetFlavorIdAttributeType = *string func getUpdateInstancePartiallyRequestPayloadGetFlavorIdAttributeTypeOk(arg UpdateInstancePartiallyRequestPayloadGetFlavorIdAttributeType) (ret UpdateInstancePartiallyRequestPayloadGetFlavorIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateInstancePartiallyRequestPayloadGetFlavorIdAttributeType(arg *UpdateInstancePartiallyRequestPayloadGetFlavorIdAttributeType, val UpdateInstancePartiallyRequestPayloadGetFlavorIdRetType) { *arg = &val } type UpdateInstancePartiallyRequestPayloadGetFlavorIdArgType = string type UpdateInstancePartiallyRequestPayloadGetFlavorIdRetType = string /* types and functions for name */ // isNotNullableString type UpdateInstancePartiallyRequestPayloadGetNameAttributeType = *string func getUpdateInstancePartiallyRequestPayloadGetNameAttributeTypeOk(arg UpdateInstancePartiallyRequestPayloadGetNameAttributeType) (ret UpdateInstancePartiallyRequestPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateInstancePartiallyRequestPayloadGetNameAttributeType(arg *UpdateInstancePartiallyRequestPayloadGetNameAttributeType, val UpdateInstancePartiallyRequestPayloadGetNameRetType) { *arg = &val } 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 */ // isEnumRef type UpdateInstancePartiallyRequestPayloadGetReplicasAttributeType = *ReplicasOpt type UpdateInstancePartiallyRequestPayloadGetReplicasArgType = ReplicasOpt type UpdateInstancePartiallyRequestPayloadGetReplicasRetType = ReplicasOpt func getUpdateInstancePartiallyRequestPayloadGetReplicasAttributeTypeOk(arg UpdateInstancePartiallyRequestPayloadGetReplicasAttributeType) (ret UpdateInstancePartiallyRequestPayloadGetReplicasRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateInstancePartiallyRequestPayloadGetReplicasAttributeType(arg *UpdateInstancePartiallyRequestPayloadGetReplicasAttributeType, val UpdateInstancePartiallyRequestPayloadGetReplicasRetType) { *arg = &val } /* types and functions for retentionDays */ // isInteger type UpdateInstancePartiallyRequestPayloadGetRetentionDaysAttributeType = *int64 type UpdateInstancePartiallyRequestPayloadGetRetentionDaysArgType = int64 type UpdateInstancePartiallyRequestPayloadGetRetentionDaysRetType = int64 func getUpdateInstancePartiallyRequestPayloadGetRetentionDaysAttributeTypeOk(arg UpdateInstancePartiallyRequestPayloadGetRetentionDaysAttributeType) (ret UpdateInstancePartiallyRequestPayloadGetRetentionDaysRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateInstancePartiallyRequestPayloadGetRetentionDaysAttributeType(arg *UpdateInstancePartiallyRequestPayloadGetRetentionDaysAttributeType, val UpdateInstancePartiallyRequestPayloadGetRetentionDaysRetType) { *arg = &val } /* types and functions for storage */ // isModel type UpdateInstancePartiallyRequestPayloadGetStorageAttributeType = *StorageUpdate type UpdateInstancePartiallyRequestPayloadGetStorageArgType = StorageUpdate type UpdateInstancePartiallyRequestPayloadGetStorageRetType = StorageUpdate func getUpdateInstancePartiallyRequestPayloadGetStorageAttributeTypeOk(arg UpdateInstancePartiallyRequestPayloadGetStorageAttributeType) (ret UpdateInstancePartiallyRequestPayloadGetStorageRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateInstancePartiallyRequestPayloadGetStorageAttributeType(arg *UpdateInstancePartiallyRequestPayloadGetStorageAttributeType, val UpdateInstancePartiallyRequestPayloadGetStorageRetType) { *arg = &val } /* types and functions for version */ // isEnumRef type UpdateInstancePartiallyRequestPayloadGetVersionAttributeType = *InstanceVersionOpt type UpdateInstancePartiallyRequestPayloadGetVersionArgType = InstanceVersionOpt type UpdateInstancePartiallyRequestPayloadGetVersionRetType = InstanceVersionOpt func getUpdateInstancePartiallyRequestPayloadGetVersionAttributeTypeOk(arg UpdateInstancePartiallyRequestPayloadGetVersionAttributeType) (ret UpdateInstancePartiallyRequestPayloadGetVersionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateInstancePartiallyRequestPayloadGetVersionAttributeType(arg *UpdateInstancePartiallyRequestPayloadGetVersionAttributeType, val UpdateInstancePartiallyRequestPayloadGetVersionRetType) { *arg = &val } // UpdateInstancePartiallyRequestPayload struct for UpdateInstancePartiallyRequestPayload type UpdateInstancePartiallyRequestPayload struct { // 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"` Storage UpdateInstancePartiallyRequestPayloadGetStorageAttributeType `json:"storage,omitempty"` Version UpdateInstancePartiallyRequestPayloadGetVersionAttributeType `json:"version,omitempty"` } // NewUpdateInstancePartiallyRequestPayload instantiates a new UpdateInstancePartiallyRequestPayload 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 NewUpdateInstancePartiallyRequestPayload() *UpdateInstancePartiallyRequestPayload { this := UpdateInstancePartiallyRequestPayload{} return &this } // NewUpdateInstancePartiallyRequestPayloadWithDefaults instantiates a new UpdateInstancePartiallyRequestPayload 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 NewUpdateInstancePartiallyRequestPayloadWithDefaults() *UpdateInstancePartiallyRequestPayload { this := UpdateInstancePartiallyRequestPayload{} return &this } // GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. func (o *UpdateInstancePartiallyRequestPayload) GetBackupSchedule() (res UpdateInstancePartiallyRequestPayloadGetBackupScheduleRetType) { res, _ = o.GetBackupScheduleOk() return } // GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateInstancePartiallyRequestPayload) GetBackupScheduleOk() (ret UpdateInstancePartiallyRequestPayloadGetBackupScheduleRetType, ok bool) { return getUpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule) } // HasBackupSchedule returns a boolean if a field has been set. func (o *UpdateInstancePartiallyRequestPayload) HasBackupSchedule() bool { _, ok := o.GetBackupScheduleOk() return ok } // SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. func (o *UpdateInstancePartiallyRequestPayload) SetBackupSchedule(v UpdateInstancePartiallyRequestPayloadGetBackupScheduleRetType) { setUpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeType(&o.BackupSchedule, v) } // GetFlavorId returns the FlavorId field value if set, zero value otherwise. func (o *UpdateInstancePartiallyRequestPayload) GetFlavorId() (res UpdateInstancePartiallyRequestPayloadGetFlavorIdRetType) { res, _ = o.GetFlavorIdOk() return } // GetFlavorIdOk returns a tuple with the FlavorId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateInstancePartiallyRequestPayload) GetFlavorIdOk() (ret UpdateInstancePartiallyRequestPayloadGetFlavorIdRetType, ok bool) { return getUpdateInstancePartiallyRequestPayloadGetFlavorIdAttributeTypeOk(o.FlavorId) } // HasFlavorId returns a boolean if a field has been set. func (o *UpdateInstancePartiallyRequestPayload) HasFlavorId() bool { _, ok := o.GetFlavorIdOk() return ok } // SetFlavorId gets a reference to the given string and assigns it to the FlavorId field. func (o *UpdateInstancePartiallyRequestPayload) SetFlavorId(v UpdateInstancePartiallyRequestPayloadGetFlavorIdRetType) { setUpdateInstancePartiallyRequestPayloadGetFlavorIdAttributeType(&o.FlavorId, v) } // GetName returns the Name field value if set, zero value otherwise. func (o *UpdateInstancePartiallyRequestPayload) GetName() (res UpdateInstancePartiallyRequestPayloadGetNameRetType) { res, _ = o.GetNameOk() return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateInstancePartiallyRequestPayload) GetNameOk() (ret UpdateInstancePartiallyRequestPayloadGetNameRetType, ok bool) { return getUpdateInstancePartiallyRequestPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *UpdateInstancePartiallyRequestPayload) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. func (o *UpdateInstancePartiallyRequestPayload) SetName(v UpdateInstancePartiallyRequestPayloadGetNameRetType) { 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() return } // GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateInstancePartiallyRequestPayload) GetReplicasOk() (ret UpdateInstancePartiallyRequestPayloadGetReplicasRetType, ok bool) { return getUpdateInstancePartiallyRequestPayloadGetReplicasAttributeTypeOk(o.Replicas) } // HasReplicas returns a boolean if a field has been set. func (o *UpdateInstancePartiallyRequestPayload) HasReplicas() bool { _, ok := o.GetReplicasOk() return ok } // SetReplicas gets a reference to the given ReplicasOpt and assigns it to the Replicas field. func (o *UpdateInstancePartiallyRequestPayload) SetReplicas(v UpdateInstancePartiallyRequestPayloadGetReplicasRetType) { setUpdateInstancePartiallyRequestPayloadGetReplicasAttributeType(&o.Replicas, v) } // GetRetentionDays returns the RetentionDays field value if set, zero value otherwise. func (o *UpdateInstancePartiallyRequestPayload) GetRetentionDays() (res UpdateInstancePartiallyRequestPayloadGetRetentionDaysRetType) { res, _ = o.GetRetentionDaysOk() return } // GetRetentionDaysOk returns a tuple with the RetentionDays field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateInstancePartiallyRequestPayload) GetRetentionDaysOk() (ret UpdateInstancePartiallyRequestPayloadGetRetentionDaysRetType, ok bool) { return getUpdateInstancePartiallyRequestPayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays) } // HasRetentionDays returns a boolean if a field has been set. func (o *UpdateInstancePartiallyRequestPayload) HasRetentionDays() bool { _, ok := o.GetRetentionDaysOk() return ok } // SetRetentionDays gets a reference to the given int64 and assigns it to the RetentionDays field. func (o *UpdateInstancePartiallyRequestPayload) SetRetentionDays(v UpdateInstancePartiallyRequestPayloadGetRetentionDaysRetType) { setUpdateInstancePartiallyRequestPayloadGetRetentionDaysAttributeType(&o.RetentionDays, v) } // GetStorage returns the Storage field value if set, zero value otherwise. func (o *UpdateInstancePartiallyRequestPayload) GetStorage() (res UpdateInstancePartiallyRequestPayloadGetStorageRetType) { res, _ = o.GetStorageOk() return } // GetStorageOk returns a tuple with the Storage field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateInstancePartiallyRequestPayload) GetStorageOk() (ret UpdateInstancePartiallyRequestPayloadGetStorageRetType, ok bool) { return getUpdateInstancePartiallyRequestPayloadGetStorageAttributeTypeOk(o.Storage) } // HasStorage returns a boolean if a field has been set. func (o *UpdateInstancePartiallyRequestPayload) HasStorage() bool { _, ok := o.GetStorageOk() return ok } // SetStorage gets a reference to the given StorageUpdate and assigns it to the Storage field. func (o *UpdateInstancePartiallyRequestPayload) SetStorage(v UpdateInstancePartiallyRequestPayloadGetStorageRetType) { setUpdateInstancePartiallyRequestPayloadGetStorageAttributeType(&o.Storage, v) } // GetVersion returns the Version field value if set, zero value otherwise. func (o *UpdateInstancePartiallyRequestPayload) GetVersion() (res UpdateInstancePartiallyRequestPayloadGetVersionRetType) { res, _ = o.GetVersionOk() return } // GetVersionOk returns a tuple with the Version field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateInstancePartiallyRequestPayload) GetVersionOk() (ret UpdateInstancePartiallyRequestPayloadGetVersionRetType, ok bool) { return getUpdateInstancePartiallyRequestPayloadGetVersionAttributeTypeOk(o.Version) } // HasVersion returns a boolean if a field has been set. func (o *UpdateInstancePartiallyRequestPayload) HasVersion() bool { _, ok := o.GetVersionOk() return ok } // SetVersion gets a reference to the given InstanceVersionOpt and assigns it to the Version field. func (o *UpdateInstancePartiallyRequestPayload) SetVersion(v UpdateInstancePartiallyRequestPayloadGetVersionRetType) { setUpdateInstancePartiallyRequestPayloadGetVersionAttributeType(&o.Version, v) } func (o UpdateInstancePartiallyRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateInstancePartiallyRequestPayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { toSerialize["BackupSchedule"] = val } if val, ok := getUpdateInstancePartiallyRequestPayloadGetFlavorIdAttributeTypeOk(o.FlavorId); ok { toSerialize["FlavorId"] = val } 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 } if val, ok := getUpdateInstancePartiallyRequestPayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok { toSerialize["RetentionDays"] = val } if val, ok := getUpdateInstancePartiallyRequestPayloadGetStorageAttributeTypeOk(o.Storage); ok { toSerialize["Storage"] = val } if val, ok := getUpdateInstancePartiallyRequestPayloadGetVersionAttributeTypeOk(o.Version); ok { toSerialize["Version"] = val } return toSerialize, nil } type NullableUpdateInstancePartiallyRequestPayload struct { value *UpdateInstancePartiallyRequestPayload isSet bool } func (v NullableUpdateInstancePartiallyRequestPayload) Get() *UpdateInstancePartiallyRequestPayload { return v.value } func (v *NullableUpdateInstancePartiallyRequestPayload) Set(val *UpdateInstancePartiallyRequestPayload) { v.value = val v.isSet = true } func (v NullableUpdateInstancePartiallyRequestPayload) IsSet() bool { return v.isSet } func (v *NullableUpdateInstancePartiallyRequestPayload) Unset() { v.value = nil v.isSet = false } func NewNullableUpdateInstancePartiallyRequestPayload(val *UpdateInstancePartiallyRequestPayload) *NullableUpdateInstancePartiallyRequestPayload { return &NullableUpdateInstancePartiallyRequestPayload{value: val, isSet: true} } func (v NullableUpdateInstancePartiallyRequestPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUpdateInstancePartiallyRequestPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }