/* 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 StorageCreate type satisfies the MappedNullable interface at compile time var _ MappedNullable = &StorageCreate{} /* types and functions for class */ // isNotNullableString type StorageCreateGetClassAttributeType = *string func getStorageCreateGetClassAttributeTypeOk(arg StorageCreateGetClassAttributeType) (ret StorageCreateGetClassRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setStorageCreateGetClassAttributeType(arg *StorageCreateGetClassAttributeType, val StorageCreateGetClassRetType) { *arg = &val } type StorageCreateGetClassArgType = string type StorageCreateGetClassRetType = 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 Class StorageCreateGetClassAttributeType `json:"class" 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(class StorageCreateGetClassArgType, size StorageCreateGetSizeArgType) *StorageCreate { this := StorageCreate{} setStorageCreateGetClassAttributeType(&this.Class, class) 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 } // GetClass returns the Class field value func (o *StorageCreate) GetClass() (ret StorageCreateGetClassRetType) { ret, _ = o.GetClassOk() return ret } // GetClassOk returns a tuple with the Class field value // and a boolean to check if the value has been set. func (o *StorageCreate) GetClassOk() (ret StorageCreateGetClassRetType, ok bool) { return getStorageCreateGetClassAttributeTypeOk(o.Class) } // SetClass sets field value func (o *StorageCreate) SetClass(v StorageCreateGetClassRetType) { setStorageCreateGetClassAttributeType(&o.Class, 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 := getStorageCreateGetClassAttributeTypeOk(o.Class); ok { toSerialize["Class"] = 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) }