go-redfish/client/model_create_virtual_disk_request_body.go
James Gu c442eb5bcb Upgrade openapi generator to v5.1.0
Upgraded openapi generator version to 5.1.0 for the support of nullable
values for optional fields; Added missing "Disabled" enum value to the
BootSourceOverrideEnabled model in the openapi schema.

Signed-off-by: James Gu <james.gu@att.com>
Change-Id: Ia3e0b018be13079d2085ef61ed2e797bcfd25fd7
2021-05-05 10:18:32 -04:00

167 lines
4.2 KiB
Go

/*
* 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)
}