go-redfish/client/model_status.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
4.3 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"
)
// Status struct for Status
type Status struct {
Health *Health `json:"Health,omitempty"`
HealthRollup *Health `json:"HealthRollup,omitempty"`
State *State `json:"State,omitempty"`
}
// NewStatus instantiates a new Status 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 NewStatus() *Status {
this := Status{}
return &this
}
// NewStatusWithDefaults instantiates a new Status 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 NewStatusWithDefaults() *Status {
this := Status{}
return &this
}
// GetHealth returns the Health field value if set, zero value otherwise.
func (o *Status) GetHealth() Health {
if o == nil || o.Health == nil {
var ret Health
return ret
}
return *o.Health
}
// GetHealthOk returns a tuple with the Health field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Status) GetHealthOk() (*Health, bool) {
if o == nil || o.Health == nil {
return nil, false
}
return o.Health, true
}
// HasHealth returns a boolean if a field has been set.
func (o *Status) HasHealth() bool {
if o != nil && o.Health != nil {
return true
}
return false
}
// SetHealth gets a reference to the given Health and assigns it to the Health field.
func (o *Status) SetHealth(v Health) {
o.Health = &v
}
// GetHealthRollup returns the HealthRollup field value if set, zero value otherwise.
func (o *Status) GetHealthRollup() Health {
if o == nil || o.HealthRollup == nil {
var ret Health
return ret
}
return *o.HealthRollup
}
// GetHealthRollupOk returns a tuple with the HealthRollup field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Status) GetHealthRollupOk() (*Health, bool) {
if o == nil || o.HealthRollup == nil {
return nil, false
}
return o.HealthRollup, true
}
// HasHealthRollup returns a boolean if a field has been set.
func (o *Status) HasHealthRollup() bool {
if o != nil && o.HealthRollup != nil {
return true
}
return false
}
// SetHealthRollup gets a reference to the given Health and assigns it to the HealthRollup field.
func (o *Status) SetHealthRollup(v Health) {
o.HealthRollup = &v
}
// GetState returns the State field value if set, zero value otherwise.
func (o *Status) GetState() State {
if o == nil || o.State == nil {
var ret State
return ret
}
return *o.State
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Status) GetStateOk() (*State, bool) {
if o == nil || o.State == nil {
return nil, false
}
return o.State, true
}
// HasState returns a boolean if a field has been set.
func (o *Status) HasState() bool {
if o != nil && o.State != nil {
return true
}
return false
}
// SetState gets a reference to the given State and assigns it to the State field.
func (o *Status) SetState(v State) {
o.State = &v
}
func (o Status) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Health != nil {
toSerialize["Health"] = o.Health
}
if o.HealthRollup != nil {
toSerialize["HealthRollup"] = o.HealthRollup
}
if o.State != nil {
toSerialize["State"] = o.State
}
return json.Marshal(toSerialize)
}
type NullableStatus struct {
value *Status
isSet bool
}
func (v NullableStatus) Get() *Status {
return v.value
}
func (v *NullableStatus) Set(val *Status) {
v.value = val
v.isSet = true
}
func (v NullableStatus) IsSet() bool {
return v.isSet
}
func (v *NullableStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStatus(val *Status) *NullableStatus {
return &NullableStatus{value: val, isSet: true}
}
func (v NullableStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}