/* 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 InstanceStorageRange type satisfies the MappedNullable interface at compile time var _ MappedNullable = &InstanceStorageRange{} /* types and functions for max */ // isInteger type InstanceStorageRangeGetMaxAttributeType = *int64 type InstanceStorageRangeGetMaxArgType = int64 type InstanceStorageRangeGetMaxRetType = int64 func getInstanceStorageRangeGetMaxAttributeTypeOk(arg InstanceStorageRangeGetMaxAttributeType) (ret InstanceStorageRangeGetMaxRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setInstanceStorageRangeGetMaxAttributeType(arg *InstanceStorageRangeGetMaxAttributeType, val InstanceStorageRangeGetMaxRetType) { *arg = &val } /* types and functions for min */ // isInteger type InstanceStorageRangeGetMinAttributeType = *int64 type InstanceStorageRangeGetMinArgType = int64 type InstanceStorageRangeGetMinRetType = int64 func getInstanceStorageRangeGetMinAttributeTypeOk(arg InstanceStorageRangeGetMinAttributeType) (ret InstanceStorageRangeGetMinRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setInstanceStorageRangeGetMinAttributeType(arg *InstanceStorageRangeGetMinAttributeType, val InstanceStorageRangeGetMinRetType) { *arg = &val } // InstanceStorageRange Contains the minimum and maximum storage space. type InstanceStorageRange struct { // The maximum available amount of storage. // Can be cast to int32 without loss of precision. // REQUIRED Max InstanceStorageRangeGetMaxAttributeType `json:"max" required:"true"` // The minimum available amount of storage. // Can be cast to int32 without loss of precision. // REQUIRED Min InstanceStorageRangeGetMinAttributeType `json:"min" required:"true"` } type _InstanceStorageRange InstanceStorageRange // NewInstanceStorageRange instantiates a new InstanceStorageRange 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 NewInstanceStorageRange(max InstanceStorageRangeGetMaxArgType, min InstanceStorageRangeGetMinArgType) *InstanceStorageRange { this := InstanceStorageRange{} setInstanceStorageRangeGetMaxAttributeType(&this.Max, max) setInstanceStorageRangeGetMinAttributeType(&this.Min, min) return &this } // NewInstanceStorageRangeWithDefaults instantiates a new InstanceStorageRange 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 NewInstanceStorageRangeWithDefaults() *InstanceStorageRange { this := InstanceStorageRange{} return &this } // GetMax returns the Max field value func (o *InstanceStorageRange) GetMax() (ret InstanceStorageRangeGetMaxRetType) { ret, _ = o.GetMaxOk() return ret } // GetMaxOk returns a tuple with the Max field value // and a boolean to check if the value has been set. func (o *InstanceStorageRange) GetMaxOk() (ret InstanceStorageRangeGetMaxRetType, ok bool) { return getInstanceStorageRangeGetMaxAttributeTypeOk(o.Max) } // SetMax sets field value func (o *InstanceStorageRange) SetMax(v InstanceStorageRangeGetMaxRetType) { setInstanceStorageRangeGetMaxAttributeType(&o.Max, v) } // GetMin returns the Min field value func (o *InstanceStorageRange) GetMin() (ret InstanceStorageRangeGetMinRetType) { ret, _ = o.GetMinOk() return ret } // GetMinOk returns a tuple with the Min field value // and a boolean to check if the value has been set. func (o *InstanceStorageRange) GetMinOk() (ret InstanceStorageRangeGetMinRetType, ok bool) { return getInstanceStorageRangeGetMinAttributeTypeOk(o.Min) } // SetMin sets field value func (o *InstanceStorageRange) SetMin(v InstanceStorageRangeGetMinRetType) { setInstanceStorageRangeGetMinAttributeType(&o.Min, v) } func (o InstanceStorageRange) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getInstanceStorageRangeGetMaxAttributeTypeOk(o.Max); ok { toSerialize["Max"] = val } if val, ok := getInstanceStorageRangeGetMinAttributeTypeOk(o.Min); ok { toSerialize["Min"] = val } return toSerialize, nil } type NullableInstanceStorageRange struct { value *InstanceStorageRange isSet bool } func (v NullableInstanceStorageRange) Get() *InstanceStorageRange { return v.value } func (v *NullableInstanceStorageRange) Set(val *InstanceStorageRange) { v.value = val v.isSet = true } func (v NullableInstanceStorageRange) IsSet() bool { return v.isSet } func (v *NullableInstanceStorageRange) Unset() { v.value = nil v.isSet = false } func NewNullableInstanceStorageRange(val *InstanceStorageRange) *NullableInstanceStorageRange { return &NullableInstanceStorageRange{value: val, isSet: true} } func (v NullableInstanceStorageRange) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableInstanceStorageRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }