/* 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 StorageCreate type satisfies the MappedNullable interface at compile time var _ MappedNullable = &StorageCreate{} /* types and functions for performanceClass */ // isNotNullableString type StorageCreateGetPerformanceClassAttributeType = *string func getStorageCreateGetPerformanceClassAttributeTypeOk(arg StorageCreateGetPerformanceClassAttributeType) (ret StorageCreateGetPerformanceClassRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setStorageCreateGetPerformanceClassAttributeType(arg *StorageCreateGetPerformanceClassAttributeType, val StorageCreateGetPerformanceClassRetType) { *arg = &val } type StorageCreateGetPerformanceClassArgType = string type StorageCreateGetPerformanceClassRetType = string /* types and functions for size */ // isLong type StorageCreateGetSizeAttributeType = *int64 type StorageCreateGetSizeArgType = int64 type StorageCreateGetSizeRetType = int64 func getStorageCreateGetSizeAttributeTypeOk(arg StorageCreateGetSizeAttributeType) (ret StorageCreateGetSizeRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setStorageCreateGetSizeAttributeType(arg *StorageCreateGetSizeAttributeType, val StorageCreateGetSizeRetType) { *arg = &val } // StorageCreate The object containing information about the storage size and class. type StorageCreate struct { // The storage class for the storage. // REQUIRED PerformanceClass StorageCreateGetPerformanceClassAttributeType `json:"performanceClass" required:"true"` // The storage size in Gigabytes. // REQUIRED Size StorageCreateGetSizeAttributeType `json:"size" required:"true"` } type _StorageCreate StorageCreate // NewStorageCreate instantiates a new StorageCreate 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 NewStorageCreate(performanceClass StorageCreateGetPerformanceClassArgType, size StorageCreateGetSizeArgType) *StorageCreate { this := StorageCreate{} setStorageCreateGetPerformanceClassAttributeType(&this.PerformanceClass, performanceClass) setStorageCreateGetSizeAttributeType(&this.Size, size) return &this } // NewStorageCreateWithDefaults instantiates a new StorageCreate 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 NewStorageCreateWithDefaults() *StorageCreate { this := StorageCreate{} return &this } // GetPerformanceClass returns the PerformanceClass field value func (o *StorageCreate) GetPerformanceClass() (ret StorageCreateGetPerformanceClassRetType) { ret, _ = o.GetPerformanceClassOk() return ret } // GetPerformanceClassOk returns a tuple with the PerformanceClass field value // and a boolean to check if the value has been set. func (o *StorageCreate) GetPerformanceClassOk() (ret StorageCreateGetPerformanceClassRetType, ok bool) { return getStorageCreateGetPerformanceClassAttributeTypeOk(o.PerformanceClass) } // SetPerformanceClass sets field value func (o *StorageCreate) SetPerformanceClass(v StorageCreateGetPerformanceClassRetType) { setStorageCreateGetPerformanceClassAttributeType(&o.PerformanceClass, v) } // GetSize returns the Size field value func (o *StorageCreate) GetSize() (ret StorageCreateGetSizeRetType) { ret, _ = o.GetSizeOk() return ret } // GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. func (o *StorageCreate) GetSizeOk() (ret StorageCreateGetSizeRetType, ok bool) { return getStorageCreateGetSizeAttributeTypeOk(o.Size) } // SetSize sets field value func (o *StorageCreate) SetSize(v StorageCreateGetSizeRetType) { setStorageCreateGetSizeAttributeType(&o.Size, v) } func (o StorageCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getStorageCreateGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok { toSerialize["PerformanceClass"] = val } if val, ok := getStorageCreateGetSizeAttributeTypeOk(o.Size); ok { toSerialize["Size"] = val } return toSerialize, nil } type NullableStorageCreate struct { value *StorageCreate isSet bool } func (v NullableStorageCreate) Get() *StorageCreate { return v.value } func (v *NullableStorageCreate) Set(val *StorageCreate) { v.value = val v.isSet = true } func (v NullableStorageCreate) IsSet() bool { return v.isSet } func (v *NullableStorageCreate) Unset() { v.value = nil v.isSet = false } func NewNullableStorageCreate(val *StorageCreate) *NullableStorageCreate { return &NullableStorageCreate{value: val, isSet: true} } func (v NullableStorageCreate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableStorageCreate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }