/* * 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" ) // MemorySummary struct for MemorySummary type MemorySummary struct { TotalSystemMemoryGiB NullableFloat32 `json:"TotalSystemMemoryGiB,omitempty"` TotalSystemPersistentMemoryGiB NullableFloat32 `json:"TotalSystemPersistentMemoryGiB,omitempty"` Status *Status `json:"Status,omitempty"` } // NewMemorySummary instantiates a new MemorySummary 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 NewMemorySummary() *MemorySummary { this := MemorySummary{} return &this } // NewMemorySummaryWithDefaults instantiates a new MemorySummary 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 NewMemorySummaryWithDefaults() *MemorySummary { this := MemorySummary{} return &this } // GetTotalSystemMemoryGiB returns the TotalSystemMemoryGiB field value if set, zero value otherwise (both if not set or set to explicit null). func (o *MemorySummary) GetTotalSystemMemoryGiB() float32 { if o == nil || o.TotalSystemMemoryGiB.Get() == nil { var ret float32 return ret } return *o.TotalSystemMemoryGiB.Get() } // GetTotalSystemMemoryGiBOk returns a tuple with the TotalSystemMemoryGiB field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *MemorySummary) GetTotalSystemMemoryGiBOk() (*float32, bool) { if o == nil { return nil, false } return o.TotalSystemMemoryGiB.Get(), o.TotalSystemMemoryGiB.IsSet() } // HasTotalSystemMemoryGiB returns a boolean if a field has been set. func (o *MemorySummary) HasTotalSystemMemoryGiB() bool { if o != nil && o.TotalSystemMemoryGiB.IsSet() { return true } return false } // SetTotalSystemMemoryGiB gets a reference to the given NullableFloat32 and assigns it to the TotalSystemMemoryGiB field. func (o *MemorySummary) SetTotalSystemMemoryGiB(v float32) { o.TotalSystemMemoryGiB.Set(&v) } // SetTotalSystemMemoryGiBNil sets the value for TotalSystemMemoryGiB to be an explicit nil func (o *MemorySummary) SetTotalSystemMemoryGiBNil() { o.TotalSystemMemoryGiB.Set(nil) } // UnsetTotalSystemMemoryGiB ensures that no value is present for TotalSystemMemoryGiB, not even an explicit nil func (o *MemorySummary) UnsetTotalSystemMemoryGiB() { o.TotalSystemMemoryGiB.Unset() } // GetTotalSystemPersistentMemoryGiB returns the TotalSystemPersistentMemoryGiB field value if set, zero value otherwise (both if not set or set to explicit null). func (o *MemorySummary) GetTotalSystemPersistentMemoryGiB() float32 { if o == nil || o.TotalSystemPersistentMemoryGiB.Get() == nil { var ret float32 return ret } return *o.TotalSystemPersistentMemoryGiB.Get() } // GetTotalSystemPersistentMemoryGiBOk returns a tuple with the TotalSystemPersistentMemoryGiB field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *MemorySummary) GetTotalSystemPersistentMemoryGiBOk() (*float32, bool) { if o == nil { return nil, false } return o.TotalSystemPersistentMemoryGiB.Get(), o.TotalSystemPersistentMemoryGiB.IsSet() } // HasTotalSystemPersistentMemoryGiB returns a boolean if a field has been set. func (o *MemorySummary) HasTotalSystemPersistentMemoryGiB() bool { if o != nil && o.TotalSystemPersistentMemoryGiB.IsSet() { return true } return false } // SetTotalSystemPersistentMemoryGiB gets a reference to the given NullableFloat32 and assigns it to the TotalSystemPersistentMemoryGiB field. func (o *MemorySummary) SetTotalSystemPersistentMemoryGiB(v float32) { o.TotalSystemPersistentMemoryGiB.Set(&v) } // SetTotalSystemPersistentMemoryGiBNil sets the value for TotalSystemPersistentMemoryGiB to be an explicit nil func (o *MemorySummary) SetTotalSystemPersistentMemoryGiBNil() { o.TotalSystemPersistentMemoryGiB.Set(nil) } // UnsetTotalSystemPersistentMemoryGiB ensures that no value is present for TotalSystemPersistentMemoryGiB, not even an explicit nil func (o *MemorySummary) UnsetTotalSystemPersistentMemoryGiB() { o.TotalSystemPersistentMemoryGiB.Unset() } // GetStatus returns the Status field value if set, zero value otherwise. func (o *MemorySummary) GetStatus() Status { if o == nil || o.Status == nil { var ret Status return ret } return *o.Status } // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *MemorySummary) GetStatusOk() (*Status, bool) { if o == nil || o.Status == nil { return nil, false } return o.Status, true } // HasStatus returns a boolean if a field has been set. func (o *MemorySummary) HasStatus() bool { if o != nil && o.Status != nil { return true } return false } // SetStatus gets a reference to the given Status and assigns it to the Status field. func (o *MemorySummary) SetStatus(v Status) { o.Status = &v } func (o MemorySummary) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.TotalSystemMemoryGiB.IsSet() { toSerialize["TotalSystemMemoryGiB"] = o.TotalSystemMemoryGiB.Get() } if o.TotalSystemPersistentMemoryGiB.IsSet() { toSerialize["TotalSystemPersistentMemoryGiB"] = o.TotalSystemPersistentMemoryGiB.Get() } if o.Status != nil { toSerialize["Status"] = o.Status } return json.Marshal(toSerialize) } type NullableMemorySummary struct { value *MemorySummary isSet bool } func (v NullableMemorySummary) Get() *MemorySummary { return v.value } func (v *NullableMemorySummary) Set(val *MemorySummary) { v.value = val v.isSet = true } func (v NullableMemorySummary) IsSet() bool { return v.isSet } func (v *NullableMemorySummary) Unset() { v.value = nil v.isSet = false } func NewNullableMemorySummary(val *MemorySummary) *NullableMemorySummary { return &NullableMemorySummary{value: val, isSet: true} } func (v NullableMemorySummary) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableMemorySummary) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }