/* * Redfish OAPI specification * * Partial Redfish OAPI specification for a limited client * * API version: 0.0.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package client import ( "encoding/json" ) // CreateVirtualDiskRequestBody struct for CreateVirtualDiskRequestBody type CreateVirtualDiskRequestBody struct { VolumeType VolumeType `json:"VolumeType"` Name string `json:"Name"` Drives []IdRef `json:"Drives"` } // NewCreateVirtualDiskRequestBody instantiates a new CreateVirtualDiskRequestBody 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 NewCreateVirtualDiskRequestBody(volumeType VolumeType, name string, drives []IdRef) *CreateVirtualDiskRequestBody { this := CreateVirtualDiskRequestBody{} this.VolumeType = volumeType this.Name = name this.Drives = drives return &this } // NewCreateVirtualDiskRequestBodyWithDefaults instantiates a new CreateVirtualDiskRequestBody 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 NewCreateVirtualDiskRequestBodyWithDefaults() *CreateVirtualDiskRequestBody { this := CreateVirtualDiskRequestBody{} return &this } // GetVolumeType returns the VolumeType field value func (o *CreateVirtualDiskRequestBody) GetVolumeType() VolumeType { if o == nil { var ret VolumeType return ret } return o.VolumeType } // GetVolumeTypeOk returns a tuple with the VolumeType field value // and a boolean to check if the value has been set. func (o *CreateVirtualDiskRequestBody) GetVolumeTypeOk() (*VolumeType, bool) { if o == nil { return nil, false } return &o.VolumeType, true } // SetVolumeType sets field value func (o *CreateVirtualDiskRequestBody) SetVolumeType(v VolumeType) { o.VolumeType = v } // GetName returns the Name field value func (o *CreateVirtualDiskRequestBody) GetName() string { if o == nil { var ret string return ret } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. func (o *CreateVirtualDiskRequestBody) GetNameOk() (*string, bool) { if o == nil { return nil, false } return &o.Name, true } // SetName sets field value func (o *CreateVirtualDiskRequestBody) SetName(v string) { o.Name = v } // GetDrives returns the Drives field value func (o *CreateVirtualDiskRequestBody) GetDrives() []IdRef { if o == nil { var ret []IdRef return ret } return o.Drives } // GetDrivesOk returns a tuple with the Drives field value // and a boolean to check if the value has been set. func (o *CreateVirtualDiskRequestBody) GetDrivesOk() (*[]IdRef, bool) { if o == nil { return nil, false } return &o.Drives, true } // SetDrives sets field value func (o *CreateVirtualDiskRequestBody) SetDrives(v []IdRef) { o.Drives = v } func (o CreateVirtualDiskRequestBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["VolumeType"] = o.VolumeType } if true { toSerialize["Name"] = o.Name } if true { toSerialize["Drives"] = o.Drives } return json.Marshal(toSerialize) } type NullableCreateVirtualDiskRequestBody struct { value *CreateVirtualDiskRequestBody isSet bool } func (v NullableCreateVirtualDiskRequestBody) Get() *CreateVirtualDiskRequestBody { return v.value } func (v *NullableCreateVirtualDiskRequestBody) Set(val *CreateVirtualDiskRequestBody) { v.value = val v.isSet = true } func (v NullableCreateVirtualDiskRequestBody) IsSet() bool { return v.isSet } func (v *NullableCreateVirtualDiskRequestBody) Unset() { v.value = nil v.isSet = false } func NewNullableCreateVirtualDiskRequestBody(val *CreateVirtualDiskRequestBody) *NullableCreateVirtualDiskRequestBody { return &NullableCreateVirtualDiskRequestBody{value: val, isSet: true} } func (v NullableCreateVirtualDiskRequestBody) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableCreateVirtualDiskRequestBody) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }