terraform-provider-stackitp.../pkg/postgresflexalpha/model_storage_update.go

128 lines
3.5 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 StorageUpdate type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StorageUpdate{}
/*
types and functions for size
*/
// isLong
type StorageUpdateGetSizeAttributeType = *int64
type StorageUpdateGetSizeArgType = int64
type StorageUpdateGetSizeRetType = int64
func getStorageUpdateGetSizeAttributeTypeOk(arg StorageUpdateGetSizeAttributeType) (ret StorageUpdateGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStorageUpdateGetSizeAttributeType(arg *StorageUpdateGetSizeAttributeType, val StorageUpdateGetSizeRetType) {
*arg = &val
}
// StorageUpdate The object containing information about the storage size and class.
type StorageUpdate struct {
// The storage size in Gigabytes.
Size StorageUpdateGetSizeAttributeType `json:"size,omitempty"`
}
// NewStorageUpdate instantiates a new StorageUpdate 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 NewStorageUpdate() *StorageUpdate {
this := StorageUpdate{}
return &this
}
// NewStorageUpdateWithDefaults instantiates a new StorageUpdate 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 NewStorageUpdateWithDefaults() *StorageUpdate {
this := StorageUpdate{}
return &this
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *StorageUpdate) GetSize() (res StorageUpdateGetSizeRetType) {
res, _ = o.GetSizeOk()
return
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StorageUpdate) GetSizeOk() (ret StorageUpdateGetSizeRetType, ok bool) {
return getStorageUpdateGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
func (o *StorageUpdate) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *StorageUpdate) SetSize(v StorageUpdateGetSizeRetType) {
setStorageUpdateGetSizeAttributeType(&o.Size, v)
}
func (o StorageUpdate) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getStorageUpdateGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
return toSerialize, nil
}
type NullableStorageUpdate struct {
value *StorageUpdate
isSet bool
}
func (v NullableStorageUpdate) Get() *StorageUpdate {
return v.value
}
func (v *NullableStorageUpdate) Set(val *StorageUpdate) {
v.value = val
v.isSet = true
}
func (v NullableStorageUpdate) IsSet() bool {
return v.isSet
}
func (v *NullableStorageUpdate) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStorageUpdate(val *StorageUpdate) *NullableStorageUpdate {
return &NullableStorageUpdate{value: val, isSet: true}
}
func (v NullableStorageUpdate) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStorageUpdate) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}