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

109 lines
2.5 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"
)
// RedfishError Contains an error payload from a Redfish Service.
type RedfishError struct {
Error RedfishErrorError `json:"error"`
}
// NewRedfishError instantiates a new RedfishError 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 NewRedfishError(error_ RedfishErrorError) *RedfishError {
this := RedfishError{}
this.Error = error_
return &this
}
// NewRedfishErrorWithDefaults instantiates a new RedfishError 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 NewRedfishErrorWithDefaults() *RedfishError {
this := RedfishError{}
return &this
}
// GetError returns the Error field value
func (o *RedfishError) GetError() RedfishErrorError {
if o == nil {
var ret RedfishErrorError
return ret
}
return o.Error
}
// GetErrorOk returns a tuple with the Error field value
// and a boolean to check if the value has been set.
func (o *RedfishError) GetErrorOk() (*RedfishErrorError, bool) {
if o == nil {
return nil, false
}
return &o.Error, true
}
// SetError sets field value
func (o *RedfishError) SetError(v RedfishErrorError) {
o.Error = v
}
func (o RedfishError) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["error"] = o.Error
}
return json.Marshal(toSerialize)
}
type NullableRedfishError struct {
value *RedfishError
isSet bool
}
func (v NullableRedfishError) Get() *RedfishError {
return v.value
}
func (v *NullableRedfishError) Set(val *RedfishError) {
v.value = val
v.isSet = true
}
func (v NullableRedfishError) IsSet() bool {
return v.isSet
}
func (v *NullableRedfishError) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRedfishError(val *RedfishError) *NullableRedfishError {
return &NullableRedfishError{value: val, isSet: true}
}
func (v NullableRedfishError) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRedfishError) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}