/* 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 FlavorStorageRange type satisfies the MappedNullable interface at compile time var _ MappedNullable = &FlavorStorageRange{} /* types and functions for max */ // isInteger type FlavorStorageRangeGetMaxAttributeType = *int64 type FlavorStorageRangeGetMaxArgType = int64 type FlavorStorageRangeGetMaxRetType = int64 func getFlavorStorageRangeGetMaxAttributeTypeOk(arg FlavorStorageRangeGetMaxAttributeType) (ret FlavorStorageRangeGetMaxRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setFlavorStorageRangeGetMaxAttributeType(arg *FlavorStorageRangeGetMaxAttributeType, val FlavorStorageRangeGetMaxRetType) { *arg = &val } /* types and functions for min */ // isInteger type FlavorStorageRangeGetMinAttributeType = *int64 type FlavorStorageRangeGetMinArgType = int64 type FlavorStorageRangeGetMinRetType = int64 func getFlavorStorageRangeGetMinAttributeTypeOk(arg FlavorStorageRangeGetMinAttributeType) (ret FlavorStorageRangeGetMinRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setFlavorStorageRangeGetMinAttributeType(arg *FlavorStorageRangeGetMinAttributeType, val FlavorStorageRangeGetMinRetType) { *arg = &val } // FlavorStorageRange range of maximum and minimum storage which can be ordered for the flavor in Gigabyte. type FlavorStorageRange struct { // maximum storage which can be ordered for the flavor in Gigabyte. // Can be cast to int32 without loss of precision. // REQUIRED Max FlavorStorageRangeGetMaxAttributeType `json:"max" required:"true"` // minimum storage which is required to order in Gigabyte. // Can be cast to int32 without loss of precision. // REQUIRED Min FlavorStorageRangeGetMinAttributeType `json:"min" required:"true"` } type _FlavorStorageRange FlavorStorageRange // NewFlavorStorageRange instantiates a new FlavorStorageRange 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 NewFlavorStorageRange(max FlavorStorageRangeGetMaxArgType, min FlavorStorageRangeGetMinArgType) *FlavorStorageRange { this := FlavorStorageRange{} setFlavorStorageRangeGetMaxAttributeType(&this.Max, max) setFlavorStorageRangeGetMinAttributeType(&this.Min, min) return &this } // NewFlavorStorageRangeWithDefaults instantiates a new FlavorStorageRange 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 NewFlavorStorageRangeWithDefaults() *FlavorStorageRange { this := FlavorStorageRange{} return &this } // GetMax returns the Max field value func (o *FlavorStorageRange) GetMax() (ret FlavorStorageRangeGetMaxRetType) { 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 *FlavorStorageRange) GetMaxOk() (ret FlavorStorageRangeGetMaxRetType, ok bool) { return getFlavorStorageRangeGetMaxAttributeTypeOk(o.Max) } // SetMax sets field value func (o *FlavorStorageRange) SetMax(v FlavorStorageRangeGetMaxRetType) { setFlavorStorageRangeGetMaxAttributeType(&o.Max, v) } // GetMin returns the Min field value func (o *FlavorStorageRange) GetMin() (ret FlavorStorageRangeGetMinRetType) { 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 *FlavorStorageRange) GetMinOk() (ret FlavorStorageRangeGetMinRetType, ok bool) { return getFlavorStorageRangeGetMinAttributeTypeOk(o.Min) } // SetMin sets field value func (o *FlavorStorageRange) SetMin(v FlavorStorageRangeGetMinRetType) { setFlavorStorageRangeGetMinAttributeType(&o.Min, v) } func (o FlavorStorageRange) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getFlavorStorageRangeGetMaxAttributeTypeOk(o.Max); ok { toSerialize["Max"] = val } if val, ok := getFlavorStorageRangeGetMinAttributeTypeOk(o.Min); ok { toSerialize["Min"] = val } return toSerialize, nil } type NullableFlavorStorageRange struct { value *FlavorStorageRange isSet bool } func (v NullableFlavorStorageRange) Get() *FlavorStorageRange { return v.value } func (v *NullableFlavorStorageRange) Set(val *FlavorStorageRange) { v.value = val v.isSet = true } func (v NullableFlavorStorageRange) IsSet() bool { return v.isSet } func (v *NullableFlavorStorageRange) Unset() { v.value = nil v.isSet = false } func NewNullableFlavorStorageRange(val *FlavorStorageRange) *NullableFlavorStorageRange { return &NullableFlavorStorageRange{value: val, isSet: true} } func (v NullableFlavorStorageRange) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableFlavorStorageRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }