/* * 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" ) // Manager Redfish manager resource. type Manager struct { // The name of the resource. Id *string `json:"Id,omitempty"` // The name of the resource. Name string `json:"Name"` UUID *string `json:"UUID,omitempty"` ServiceEntryPointUUID *string `json:"ServiceEntryPointUUID,omitempty"` // The type of a resource. OdataType string `json:"@odata.type"` // The unique identifier for a resource. OdataId string `json:"@odata.id"` // The OData description of a payload. OdataContext *string `json:"@odata.context,omitempty"` // redfish copyright RedfishCopyright *string `json:"@Redfish.Copyright,omitempty"` Model NullableString `json:"Model,omitempty"` ManagerType *ManagerType `json:"ManagerType,omitempty"` Status *Status `json:"Status,omitempty"` DateTime NullableString `json:"DateTime,omitempty"` // The time offset from UTC that the DateTime property is set to in format: +06:00 . DateTimeLocalOffset NullableString `json:"DateTimeLocalOffset,omitempty"` // description Description NullableString `json:"Description,omitempty"` EthernetInterfaces *IdRef `json:"EthernetInterfaces,omitempty"` FirmwareVersion NullableString `json:"FirmwareVersion,omitempty"` Links *ManagerLinks `json:"Links,omitempty"` PowerState *PowerState `json:"PowerState,omitempty"` VirtualMedia *IdRef `json:"VirtualMedia,omitempty"` } // NewManager instantiates a new Manager 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 NewManager(name string, odataType string, odataId string) *Manager { this := Manager{} this.Name = name this.OdataType = odataType this.OdataId = odataId return &this } // NewManagerWithDefaults instantiates a new Manager 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 NewManagerWithDefaults() *Manager { this := Manager{} return &this } // GetId returns the Id field value if set, zero value otherwise. func (o *Manager) GetId() string { if o == nil || o.Id == nil { var ret string return ret } return *o.Id } // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetIdOk() (*string, bool) { if o == nil || o.Id == nil { return nil, false } return o.Id, true } // HasId returns a boolean if a field has been set. func (o *Manager) HasId() bool { if o != nil && o.Id != nil { return true } return false } // SetId gets a reference to the given string and assigns it to the Id field. func (o *Manager) SetId(v string) { o.Id = &v } // GetName returns the Name field value func (o *Manager) 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 *Manager) GetNameOk() (*string, bool) { if o == nil { return nil, false } return &o.Name, true } // SetName sets field value func (o *Manager) SetName(v string) { o.Name = v } // GetUUID returns the UUID field value if set, zero value otherwise. func (o *Manager) GetUUID() string { if o == nil || o.UUID == nil { var ret string return ret } return *o.UUID } // GetUUIDOk returns a tuple with the UUID field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetUUIDOk() (*string, bool) { if o == nil || o.UUID == nil { return nil, false } return o.UUID, true } // HasUUID returns a boolean if a field has been set. func (o *Manager) HasUUID() bool { if o != nil && o.UUID != nil { return true } return false } // SetUUID gets a reference to the given string and assigns it to the UUID field. func (o *Manager) SetUUID(v string) { o.UUID = &v } // GetServiceEntryPointUUID returns the ServiceEntryPointUUID field value if set, zero value otherwise. func (o *Manager) GetServiceEntryPointUUID() string { if o == nil || o.ServiceEntryPointUUID == nil { var ret string return ret } return *o.ServiceEntryPointUUID } // GetServiceEntryPointUUIDOk returns a tuple with the ServiceEntryPointUUID field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetServiceEntryPointUUIDOk() (*string, bool) { if o == nil || o.ServiceEntryPointUUID == nil { return nil, false } return o.ServiceEntryPointUUID, true } // HasServiceEntryPointUUID returns a boolean if a field has been set. func (o *Manager) HasServiceEntryPointUUID() bool { if o != nil && o.ServiceEntryPointUUID != nil { return true } return false } // SetServiceEntryPointUUID gets a reference to the given string and assigns it to the ServiceEntryPointUUID field. func (o *Manager) SetServiceEntryPointUUID(v string) { o.ServiceEntryPointUUID = &v } // GetOdataType returns the OdataType field value func (o *Manager) GetOdataType() string { if o == nil { var ret string return ret } return o.OdataType } // GetOdataTypeOk returns a tuple with the OdataType field value // and a boolean to check if the value has been set. func (o *Manager) GetOdataTypeOk() (*string, bool) { if o == nil { return nil, false } return &o.OdataType, true } // SetOdataType sets field value func (o *Manager) SetOdataType(v string) { o.OdataType = v } // GetOdataId returns the OdataId field value func (o *Manager) GetOdataId() string { if o == nil { var ret string return ret } return o.OdataId } // GetOdataIdOk returns a tuple with the OdataId field value // and a boolean to check if the value has been set. func (o *Manager) GetOdataIdOk() (*string, bool) { if o == nil { return nil, false } return &o.OdataId, true } // SetOdataId sets field value func (o *Manager) SetOdataId(v string) { o.OdataId = v } // GetOdataContext returns the OdataContext field value if set, zero value otherwise. func (o *Manager) GetOdataContext() string { if o == nil || o.OdataContext == nil { var ret string return ret } return *o.OdataContext } // GetOdataContextOk returns a tuple with the OdataContext field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetOdataContextOk() (*string, bool) { if o == nil || o.OdataContext == nil { return nil, false } return o.OdataContext, true } // HasOdataContext returns a boolean if a field has been set. func (o *Manager) HasOdataContext() bool { if o != nil && o.OdataContext != nil { return true } return false } // SetOdataContext gets a reference to the given string and assigns it to the OdataContext field. func (o *Manager) SetOdataContext(v string) { o.OdataContext = &v } // GetRedfishCopyright returns the RedfishCopyright field value if set, zero value otherwise. func (o *Manager) GetRedfishCopyright() string { if o == nil || o.RedfishCopyright == nil { var ret string return ret } return *o.RedfishCopyright } // GetRedfishCopyrightOk returns a tuple with the RedfishCopyright field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetRedfishCopyrightOk() (*string, bool) { if o == nil || o.RedfishCopyright == nil { return nil, false } return o.RedfishCopyright, true } // HasRedfishCopyright returns a boolean if a field has been set. func (o *Manager) HasRedfishCopyright() bool { if o != nil && o.RedfishCopyright != nil { return true } return false } // SetRedfishCopyright gets a reference to the given string and assigns it to the RedfishCopyright field. func (o *Manager) SetRedfishCopyright(v string) { o.RedfishCopyright = &v } // GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Manager) GetModel() string { if o == nil || o.Model.Get() == nil { var ret string return ret } return *o.Model.Get() } // GetModelOk returns a tuple with the Model 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 *Manager) GetModelOk() (*string, bool) { if o == nil { return nil, false } return o.Model.Get(), o.Model.IsSet() } // HasModel returns a boolean if a field has been set. func (o *Manager) HasModel() bool { if o != nil && o.Model.IsSet() { return true } return false } // SetModel gets a reference to the given NullableString and assigns it to the Model field. func (o *Manager) SetModel(v string) { o.Model.Set(&v) } // SetModelNil sets the value for Model to be an explicit nil func (o *Manager) SetModelNil() { o.Model.Set(nil) } // UnsetModel ensures that no value is present for Model, not even an explicit nil func (o *Manager) UnsetModel() { o.Model.Unset() } // GetManagerType returns the ManagerType field value if set, zero value otherwise. func (o *Manager) GetManagerType() ManagerType { if o == nil || o.ManagerType == nil { var ret ManagerType return ret } return *o.ManagerType } // GetManagerTypeOk returns a tuple with the ManagerType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetManagerTypeOk() (*ManagerType, bool) { if o == nil || o.ManagerType == nil { return nil, false } return o.ManagerType, true } // HasManagerType returns a boolean if a field has been set. func (o *Manager) HasManagerType() bool { if o != nil && o.ManagerType != nil { return true } return false } // SetManagerType gets a reference to the given ManagerType and assigns it to the ManagerType field. func (o *Manager) SetManagerType(v ManagerType) { o.ManagerType = &v } // GetStatus returns the Status field value if set, zero value otherwise. func (o *Manager) 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 *Manager) 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 *Manager) 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 *Manager) SetStatus(v Status) { o.Status = &v } // GetDateTime returns the DateTime field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Manager) GetDateTime() string { if o == nil || o.DateTime.Get() == nil { var ret string return ret } return *o.DateTime.Get() } // GetDateTimeOk returns a tuple with the DateTime 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 *Manager) GetDateTimeOk() (*string, bool) { if o == nil { return nil, false } return o.DateTime.Get(), o.DateTime.IsSet() } // HasDateTime returns a boolean if a field has been set. func (o *Manager) HasDateTime() bool { if o != nil && o.DateTime.IsSet() { return true } return false } // SetDateTime gets a reference to the given NullableString and assigns it to the DateTime field. func (o *Manager) SetDateTime(v string) { o.DateTime.Set(&v) } // SetDateTimeNil sets the value for DateTime to be an explicit nil func (o *Manager) SetDateTimeNil() { o.DateTime.Set(nil) } // UnsetDateTime ensures that no value is present for DateTime, not even an explicit nil func (o *Manager) UnsetDateTime() { o.DateTime.Unset() } // GetDateTimeLocalOffset returns the DateTimeLocalOffset field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Manager) GetDateTimeLocalOffset() string { if o == nil || o.DateTimeLocalOffset.Get() == nil { var ret string return ret } return *o.DateTimeLocalOffset.Get() } // GetDateTimeLocalOffsetOk returns a tuple with the DateTimeLocalOffset 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 *Manager) GetDateTimeLocalOffsetOk() (*string, bool) { if o == nil { return nil, false } return o.DateTimeLocalOffset.Get(), o.DateTimeLocalOffset.IsSet() } // HasDateTimeLocalOffset returns a boolean if a field has been set. func (o *Manager) HasDateTimeLocalOffset() bool { if o != nil && o.DateTimeLocalOffset.IsSet() { return true } return false } // SetDateTimeLocalOffset gets a reference to the given NullableString and assigns it to the DateTimeLocalOffset field. func (o *Manager) SetDateTimeLocalOffset(v string) { o.DateTimeLocalOffset.Set(&v) } // SetDateTimeLocalOffsetNil sets the value for DateTimeLocalOffset to be an explicit nil func (o *Manager) SetDateTimeLocalOffsetNil() { o.DateTimeLocalOffset.Set(nil) } // UnsetDateTimeLocalOffset ensures that no value is present for DateTimeLocalOffset, not even an explicit nil func (o *Manager) UnsetDateTimeLocalOffset() { o.DateTimeLocalOffset.Unset() } // GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Manager) GetDescription() string { if o == nil || o.Description.Get() == nil { var ret string return ret } return *o.Description.Get() } // GetDescriptionOk returns a tuple with the Description 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 *Manager) GetDescriptionOk() (*string, bool) { if o == nil { return nil, false } return o.Description.Get(), o.Description.IsSet() } // HasDescription returns a boolean if a field has been set. func (o *Manager) HasDescription() bool { if o != nil && o.Description.IsSet() { return true } return false } // SetDescription gets a reference to the given NullableString and assigns it to the Description field. func (o *Manager) SetDescription(v string) { o.Description.Set(&v) } // SetDescriptionNil sets the value for Description to be an explicit nil func (o *Manager) SetDescriptionNil() { o.Description.Set(nil) } // UnsetDescription ensures that no value is present for Description, not even an explicit nil func (o *Manager) UnsetDescription() { o.Description.Unset() } // GetEthernetInterfaces returns the EthernetInterfaces field value if set, zero value otherwise. func (o *Manager) GetEthernetInterfaces() IdRef { if o == nil || o.EthernetInterfaces == nil { var ret IdRef return ret } return *o.EthernetInterfaces } // GetEthernetInterfacesOk returns a tuple with the EthernetInterfaces field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetEthernetInterfacesOk() (*IdRef, bool) { if o == nil || o.EthernetInterfaces == nil { return nil, false } return o.EthernetInterfaces, true } // HasEthernetInterfaces returns a boolean if a field has been set. func (o *Manager) HasEthernetInterfaces() bool { if o != nil && o.EthernetInterfaces != nil { return true } return false } // SetEthernetInterfaces gets a reference to the given IdRef and assigns it to the EthernetInterfaces field. func (o *Manager) SetEthernetInterfaces(v IdRef) { o.EthernetInterfaces = &v } // GetFirmwareVersion returns the FirmwareVersion field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Manager) GetFirmwareVersion() string { if o == nil || o.FirmwareVersion.Get() == nil { var ret string return ret } return *o.FirmwareVersion.Get() } // GetFirmwareVersionOk returns a tuple with the FirmwareVersion 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 *Manager) GetFirmwareVersionOk() (*string, bool) { if o == nil { return nil, false } return o.FirmwareVersion.Get(), o.FirmwareVersion.IsSet() } // HasFirmwareVersion returns a boolean if a field has been set. func (o *Manager) HasFirmwareVersion() bool { if o != nil && o.FirmwareVersion.IsSet() { return true } return false } // SetFirmwareVersion gets a reference to the given NullableString and assigns it to the FirmwareVersion field. func (o *Manager) SetFirmwareVersion(v string) { o.FirmwareVersion.Set(&v) } // SetFirmwareVersionNil sets the value for FirmwareVersion to be an explicit nil func (o *Manager) SetFirmwareVersionNil() { o.FirmwareVersion.Set(nil) } // UnsetFirmwareVersion ensures that no value is present for FirmwareVersion, not even an explicit nil func (o *Manager) UnsetFirmwareVersion() { o.FirmwareVersion.Unset() } // GetLinks returns the Links field value if set, zero value otherwise. func (o *Manager) GetLinks() ManagerLinks { if o == nil || o.Links == nil { var ret ManagerLinks return ret } return *o.Links } // GetLinksOk returns a tuple with the Links field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetLinksOk() (*ManagerLinks, bool) { if o == nil || o.Links == nil { return nil, false } return o.Links, true } // HasLinks returns a boolean if a field has been set. func (o *Manager) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } // SetLinks gets a reference to the given ManagerLinks and assigns it to the Links field. func (o *Manager) SetLinks(v ManagerLinks) { o.Links = &v } // GetPowerState returns the PowerState field value if set, zero value otherwise. func (o *Manager) GetPowerState() PowerState { if o == nil || o.PowerState == nil { var ret PowerState return ret } return *o.PowerState } // GetPowerStateOk returns a tuple with the PowerState field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetPowerStateOk() (*PowerState, bool) { if o == nil || o.PowerState == nil { return nil, false } return o.PowerState, true } // HasPowerState returns a boolean if a field has been set. func (o *Manager) HasPowerState() bool { if o != nil && o.PowerState != nil { return true } return false } // SetPowerState gets a reference to the given PowerState and assigns it to the PowerState field. func (o *Manager) SetPowerState(v PowerState) { o.PowerState = &v } // GetVirtualMedia returns the VirtualMedia field value if set, zero value otherwise. func (o *Manager) GetVirtualMedia() IdRef { if o == nil || o.VirtualMedia == nil { var ret IdRef return ret } return *o.VirtualMedia } // GetVirtualMediaOk returns a tuple with the VirtualMedia field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Manager) GetVirtualMediaOk() (*IdRef, bool) { if o == nil || o.VirtualMedia == nil { return nil, false } return o.VirtualMedia, true } // HasVirtualMedia returns a boolean if a field has been set. func (o *Manager) HasVirtualMedia() bool { if o != nil && o.VirtualMedia != nil { return true } return false } // SetVirtualMedia gets a reference to the given IdRef and assigns it to the VirtualMedia field. func (o *Manager) SetVirtualMedia(v IdRef) { o.VirtualMedia = &v } func (o Manager) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["Id"] = o.Id } if true { toSerialize["Name"] = o.Name } if o.UUID != nil { toSerialize["UUID"] = o.UUID } if o.ServiceEntryPointUUID != nil { toSerialize["ServiceEntryPointUUID"] = o.ServiceEntryPointUUID } if true { toSerialize["@odata.type"] = o.OdataType } if true { toSerialize["@odata.id"] = o.OdataId } if o.OdataContext != nil { toSerialize["@odata.context"] = o.OdataContext } if o.RedfishCopyright != nil { toSerialize["@Redfish.Copyright"] = o.RedfishCopyright } if o.Model.IsSet() { toSerialize["Model"] = o.Model.Get() } if o.ManagerType != nil { toSerialize["ManagerType"] = o.ManagerType } if o.Status != nil { toSerialize["Status"] = o.Status } if o.DateTime.IsSet() { toSerialize["DateTime"] = o.DateTime.Get() } if o.DateTimeLocalOffset.IsSet() { toSerialize["DateTimeLocalOffset"] = o.DateTimeLocalOffset.Get() } if o.Description.IsSet() { toSerialize["Description"] = o.Description.Get() } if o.EthernetInterfaces != nil { toSerialize["EthernetInterfaces"] = o.EthernetInterfaces } if o.FirmwareVersion.IsSet() { toSerialize["FirmwareVersion"] = o.FirmwareVersion.Get() } if o.Links != nil { toSerialize["Links"] = o.Links } if o.PowerState != nil { toSerialize["PowerState"] = o.PowerState } if o.VirtualMedia != nil { toSerialize["VirtualMedia"] = o.VirtualMedia } return json.Marshal(toSerialize) } type NullableManager struct { value *Manager isSet bool } func (v NullableManager) Get() *Manager { return v.value } func (v *NullableManager) Set(val *Manager) { v.value = val v.isSet = true } func (v NullableManager) IsSet() bool { return v.isSet } func (v *NullableManager) Unset() { v.value = nil v.isSet = false } func NewNullableManager(val *Manager) *NullableManager { return &NullableManager{value: val, isSet: true} } func (v NullableManager) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableManager) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }