go-redfish/client/model_boot.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

188 lines
6.0 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"
)
// Boot struct for Boot
type Boot struct {
BootSourceOverrideEnabled *BootSourceOverrideEnabled `json:"BootSourceOverrideEnabled,omitempty"`
BootSourceOverrideTarget *BootSource `json:"BootSourceOverrideTarget,omitempty"`
BootSourceOverrideTargetRedfishAllowableValues *[]BootSource `json:"BootSourceOverrideTarget@Redfish.AllowableValues,omitempty"`
}
// NewBoot instantiates a new Boot 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 NewBoot() *Boot {
this := Boot{}
return &this
}
// NewBootWithDefaults instantiates a new Boot 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 NewBootWithDefaults() *Boot {
this := Boot{}
return &this
}
// GetBootSourceOverrideEnabled returns the BootSourceOverrideEnabled field value if set, zero value otherwise.
func (o *Boot) GetBootSourceOverrideEnabled() BootSourceOverrideEnabled {
if o == nil || o.BootSourceOverrideEnabled == nil {
var ret BootSourceOverrideEnabled
return ret
}
return *o.BootSourceOverrideEnabled
}
// GetBootSourceOverrideEnabledOk returns a tuple with the BootSourceOverrideEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Boot) GetBootSourceOverrideEnabledOk() (*BootSourceOverrideEnabled, bool) {
if o == nil || o.BootSourceOverrideEnabled == nil {
return nil, false
}
return o.BootSourceOverrideEnabled, true
}
// HasBootSourceOverrideEnabled returns a boolean if a field has been set.
func (o *Boot) HasBootSourceOverrideEnabled() bool {
if o != nil && o.BootSourceOverrideEnabled != nil {
return true
}
return false
}
// SetBootSourceOverrideEnabled gets a reference to the given BootSourceOverrideEnabled and assigns it to the BootSourceOverrideEnabled field.
func (o *Boot) SetBootSourceOverrideEnabled(v BootSourceOverrideEnabled) {
o.BootSourceOverrideEnabled = &v
}
// GetBootSourceOverrideTarget returns the BootSourceOverrideTarget field value if set, zero value otherwise.
func (o *Boot) GetBootSourceOverrideTarget() BootSource {
if o == nil || o.BootSourceOverrideTarget == nil {
var ret BootSource
return ret
}
return *o.BootSourceOverrideTarget
}
// GetBootSourceOverrideTargetOk returns a tuple with the BootSourceOverrideTarget field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Boot) GetBootSourceOverrideTargetOk() (*BootSource, bool) {
if o == nil || o.BootSourceOverrideTarget == nil {
return nil, false
}
return o.BootSourceOverrideTarget, true
}
// HasBootSourceOverrideTarget returns a boolean if a field has been set.
func (o *Boot) HasBootSourceOverrideTarget() bool {
if o != nil && o.BootSourceOverrideTarget != nil {
return true
}
return false
}
// SetBootSourceOverrideTarget gets a reference to the given BootSource and assigns it to the BootSourceOverrideTarget field.
func (o *Boot) SetBootSourceOverrideTarget(v BootSource) {
o.BootSourceOverrideTarget = &v
}
// GetBootSourceOverrideTargetRedfishAllowableValues returns the BootSourceOverrideTargetRedfishAllowableValues field value if set, zero value otherwise.
func (o *Boot) GetBootSourceOverrideTargetRedfishAllowableValues() []BootSource {
if o == nil || o.BootSourceOverrideTargetRedfishAllowableValues == nil {
var ret []BootSource
return ret
}
return *o.BootSourceOverrideTargetRedfishAllowableValues
}
// GetBootSourceOverrideTargetRedfishAllowableValuesOk returns a tuple with the BootSourceOverrideTargetRedfishAllowableValues field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Boot) GetBootSourceOverrideTargetRedfishAllowableValuesOk() (*[]BootSource, bool) {
if o == nil || o.BootSourceOverrideTargetRedfishAllowableValues == nil {
return nil, false
}
return o.BootSourceOverrideTargetRedfishAllowableValues, true
}
// HasBootSourceOverrideTargetRedfishAllowableValues returns a boolean if a field has been set.
func (o *Boot) HasBootSourceOverrideTargetRedfishAllowableValues() bool {
if o != nil && o.BootSourceOverrideTargetRedfishAllowableValues != nil {
return true
}
return false
}
// SetBootSourceOverrideTargetRedfishAllowableValues gets a reference to the given []BootSource and assigns it to the BootSourceOverrideTargetRedfishAllowableValues field.
func (o *Boot) SetBootSourceOverrideTargetRedfishAllowableValues(v []BootSource) {
o.BootSourceOverrideTargetRedfishAllowableValues = &v
}
func (o Boot) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.BootSourceOverrideEnabled != nil {
toSerialize["BootSourceOverrideEnabled"] = o.BootSourceOverrideEnabled
}
if o.BootSourceOverrideTarget != nil {
toSerialize["BootSourceOverrideTarget"] = o.BootSourceOverrideTarget
}
if o.BootSourceOverrideTargetRedfishAllowableValues != nil {
toSerialize["BootSourceOverrideTarget@Redfish.AllowableValues"] = o.BootSourceOverrideTargetRedfishAllowableValues
}
return json.Marshal(toSerialize)
}
type NullableBoot struct {
value *Boot
isSet bool
}
func (v NullableBoot) Get() *Boot {
return v.value
}
func (v *NullableBoot) Set(val *Boot) {
v.value = val
v.isSet = true
}
func (v NullableBoot) IsSet() bool {
return v.isSet
}
func (v *NullableBoot) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBoot(val *Boot) *NullableBoot {
return &NullableBoot{value: val, isSet: true}
}
func (v NullableBoot) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBoot) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}