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

705 lines
20 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"
"time"
)
// SoftwareInventory This schema defines an inventory of software components.
type SoftwareInventory struct {
OdataType string `json:"@odata.type"`
OdataId string `json:"@odata.id"`
OdataContext *string `json:"@odata.context,omitempty"`
OdataEtag *string `json:"@odata.etag,omitempty"`
Description NullableString `json:"Description,omitempty"`
Id string `json:"Id"`
LowestSupportedVersion NullableString `json:"LowestSupportedVersion,omitempty"`
Manufacturer NullableString `json:"Manufacturer,omitempty"`
Name string `json:"Name"`
RelatedItem *[]IdRef `json:"RelatedItem,omitempty"`
RelatedItemodataCount NullableInt32 `json:"RelatedItem@odata.count,omitempty"`
ReleaseDate NullableTime `json:"ReleaseDate,omitempty"`
SoftwareId *string `json:"SoftwareId,omitempty"`
Status *Status `json:"Status,omitempty"`
UefiDevicePaths *[]string `json:"UefiDevicePaths,omitempty"`
Updateable NullableBool `json:"Updateable"`
Version NullableString `json:"Version"`
}
// NewSoftwareInventory instantiates a new SoftwareInventory 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 NewSoftwareInventory(odataType string, odataId string, id string, name string, updateable NullableBool, version NullableString) *SoftwareInventory {
this := SoftwareInventory{}
this.OdataType = odataType
this.OdataId = odataId
this.Id = id
this.Name = name
this.Updateable = updateable
this.Version = version
return &this
}
// NewSoftwareInventoryWithDefaults instantiates a new SoftwareInventory 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 NewSoftwareInventoryWithDefaults() *SoftwareInventory {
this := SoftwareInventory{}
return &this
}
// GetOdataType returns the OdataType field value
func (o *SoftwareInventory) 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 *SoftwareInventory) GetOdataTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.OdataType, true
}
// SetOdataType sets field value
func (o *SoftwareInventory) SetOdataType(v string) {
o.OdataType = v
}
// GetOdataId returns the OdataId field value
func (o *SoftwareInventory) 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 *SoftwareInventory) GetOdataIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.OdataId, true
}
// SetOdataId sets field value
func (o *SoftwareInventory) SetOdataId(v string) {
o.OdataId = v
}
// GetOdataContext returns the OdataContext field value if set, zero value otherwise.
func (o *SoftwareInventory) 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 *SoftwareInventory) 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 *SoftwareInventory) 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 *SoftwareInventory) SetOdataContext(v string) {
o.OdataContext = &v
}
// GetOdataEtag returns the OdataEtag field value if set, zero value otherwise.
func (o *SoftwareInventory) GetOdataEtag() string {
if o == nil || o.OdataEtag == nil {
var ret string
return ret
}
return *o.OdataEtag
}
// GetOdataEtagOk returns a tuple with the OdataEtag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SoftwareInventory) GetOdataEtagOk() (*string, bool) {
if o == nil || o.OdataEtag == nil {
return nil, false
}
return o.OdataEtag, true
}
// HasOdataEtag returns a boolean if a field has been set.
func (o *SoftwareInventory) HasOdataEtag() bool {
if o != nil && o.OdataEtag != nil {
return true
}
return false
}
// SetOdataEtag gets a reference to the given string and assigns it to the OdataEtag field.
func (o *SoftwareInventory) SetOdataEtag(v string) {
o.OdataEtag = &v
}
// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *SoftwareInventory) 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 *SoftwareInventory) 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 *SoftwareInventory) 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 *SoftwareInventory) SetDescription(v string) {
o.Description.Set(&v)
}
// SetDescriptionNil sets the value for Description to be an explicit nil
func (o *SoftwareInventory) SetDescriptionNil() {
o.Description.Set(nil)
}
// UnsetDescription ensures that no value is present for Description, not even an explicit nil
func (o *SoftwareInventory) UnsetDescription() {
o.Description.Unset()
}
// GetId returns the Id field value
func (o *SoftwareInventory) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *SoftwareInventory) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *SoftwareInventory) SetId(v string) {
o.Id = v
}
// GetLowestSupportedVersion returns the LowestSupportedVersion field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *SoftwareInventory) GetLowestSupportedVersion() string {
if o == nil || o.LowestSupportedVersion.Get() == nil {
var ret string
return ret
}
return *o.LowestSupportedVersion.Get()
}
// GetLowestSupportedVersionOk returns a tuple with the LowestSupportedVersion 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 *SoftwareInventory) GetLowestSupportedVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.LowestSupportedVersion.Get(), o.LowestSupportedVersion.IsSet()
}
// HasLowestSupportedVersion returns a boolean if a field has been set.
func (o *SoftwareInventory) HasLowestSupportedVersion() bool {
if o != nil && o.LowestSupportedVersion.IsSet() {
return true
}
return false
}
// SetLowestSupportedVersion gets a reference to the given NullableString and assigns it to the LowestSupportedVersion field.
func (o *SoftwareInventory) SetLowestSupportedVersion(v string) {
o.LowestSupportedVersion.Set(&v)
}
// SetLowestSupportedVersionNil sets the value for LowestSupportedVersion to be an explicit nil
func (o *SoftwareInventory) SetLowestSupportedVersionNil() {
o.LowestSupportedVersion.Set(nil)
}
// UnsetLowestSupportedVersion ensures that no value is present for LowestSupportedVersion, not even an explicit nil
func (o *SoftwareInventory) UnsetLowestSupportedVersion() {
o.LowestSupportedVersion.Unset()
}
// GetManufacturer returns the Manufacturer field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *SoftwareInventory) GetManufacturer() string {
if o == nil || o.Manufacturer.Get() == nil {
var ret string
return ret
}
return *o.Manufacturer.Get()
}
// GetManufacturerOk returns a tuple with the Manufacturer 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 *SoftwareInventory) GetManufacturerOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Manufacturer.Get(), o.Manufacturer.IsSet()
}
// HasManufacturer returns a boolean if a field has been set.
func (o *SoftwareInventory) HasManufacturer() bool {
if o != nil && o.Manufacturer.IsSet() {
return true
}
return false
}
// SetManufacturer gets a reference to the given NullableString and assigns it to the Manufacturer field.
func (o *SoftwareInventory) SetManufacturer(v string) {
o.Manufacturer.Set(&v)
}
// SetManufacturerNil sets the value for Manufacturer to be an explicit nil
func (o *SoftwareInventory) SetManufacturerNil() {
o.Manufacturer.Set(nil)
}
// UnsetManufacturer ensures that no value is present for Manufacturer, not even an explicit nil
func (o *SoftwareInventory) UnsetManufacturer() {
o.Manufacturer.Unset()
}
// GetName returns the Name field value
func (o *SoftwareInventory) 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 *SoftwareInventory) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *SoftwareInventory) SetName(v string) {
o.Name = v
}
// GetRelatedItem returns the RelatedItem field value if set, zero value otherwise.
func (o *SoftwareInventory) GetRelatedItem() []IdRef {
if o == nil || o.RelatedItem == nil {
var ret []IdRef
return ret
}
return *o.RelatedItem
}
// GetRelatedItemOk returns a tuple with the RelatedItem field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SoftwareInventory) GetRelatedItemOk() (*[]IdRef, bool) {
if o == nil || o.RelatedItem == nil {
return nil, false
}
return o.RelatedItem, true
}
// HasRelatedItem returns a boolean if a field has been set.
func (o *SoftwareInventory) HasRelatedItem() bool {
if o != nil && o.RelatedItem != nil {
return true
}
return false
}
// SetRelatedItem gets a reference to the given []IdRef and assigns it to the RelatedItem field.
func (o *SoftwareInventory) SetRelatedItem(v []IdRef) {
o.RelatedItem = &v
}
// GetRelatedItemodataCount returns the RelatedItemodataCount field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *SoftwareInventory) GetRelatedItemodataCount() int32 {
if o == nil || o.RelatedItemodataCount.Get() == nil {
var ret int32
return ret
}
return *o.RelatedItemodataCount.Get()
}
// GetRelatedItemodataCountOk returns a tuple with the RelatedItemodataCount 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 *SoftwareInventory) GetRelatedItemodataCountOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.RelatedItemodataCount.Get(), o.RelatedItemodataCount.IsSet()
}
// HasRelatedItemodataCount returns a boolean if a field has been set.
func (o *SoftwareInventory) HasRelatedItemodataCount() bool {
if o != nil && o.RelatedItemodataCount.IsSet() {
return true
}
return false
}
// SetRelatedItemodataCount gets a reference to the given NullableInt32 and assigns it to the RelatedItemodataCount field.
func (o *SoftwareInventory) SetRelatedItemodataCount(v int32) {
o.RelatedItemodataCount.Set(&v)
}
// SetRelatedItemodataCountNil sets the value for RelatedItemodataCount to be an explicit nil
func (o *SoftwareInventory) SetRelatedItemodataCountNil() {
o.RelatedItemodataCount.Set(nil)
}
// UnsetRelatedItemodataCount ensures that no value is present for RelatedItemodataCount, not even an explicit nil
func (o *SoftwareInventory) UnsetRelatedItemodataCount() {
o.RelatedItemodataCount.Unset()
}
// GetReleaseDate returns the ReleaseDate field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *SoftwareInventory) GetReleaseDate() time.Time {
if o == nil || o.ReleaseDate.Get() == nil {
var ret time.Time
return ret
}
return *o.ReleaseDate.Get()
}
// GetReleaseDateOk returns a tuple with the ReleaseDate 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 *SoftwareInventory) GetReleaseDateOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.ReleaseDate.Get(), o.ReleaseDate.IsSet()
}
// HasReleaseDate returns a boolean if a field has been set.
func (o *SoftwareInventory) HasReleaseDate() bool {
if o != nil && o.ReleaseDate.IsSet() {
return true
}
return false
}
// SetReleaseDate gets a reference to the given NullableTime and assigns it to the ReleaseDate field.
func (o *SoftwareInventory) SetReleaseDate(v time.Time) {
o.ReleaseDate.Set(&v)
}
// SetReleaseDateNil sets the value for ReleaseDate to be an explicit nil
func (o *SoftwareInventory) SetReleaseDateNil() {
o.ReleaseDate.Set(nil)
}
// UnsetReleaseDate ensures that no value is present for ReleaseDate, not even an explicit nil
func (o *SoftwareInventory) UnsetReleaseDate() {
o.ReleaseDate.Unset()
}
// GetSoftwareId returns the SoftwareId field value if set, zero value otherwise.
func (o *SoftwareInventory) GetSoftwareId() string {
if o == nil || o.SoftwareId == nil {
var ret string
return ret
}
return *o.SoftwareId
}
// GetSoftwareIdOk returns a tuple with the SoftwareId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SoftwareInventory) GetSoftwareIdOk() (*string, bool) {
if o == nil || o.SoftwareId == nil {
return nil, false
}
return o.SoftwareId, true
}
// HasSoftwareId returns a boolean if a field has been set.
func (o *SoftwareInventory) HasSoftwareId() bool {
if o != nil && o.SoftwareId != nil {
return true
}
return false
}
// SetSoftwareId gets a reference to the given string and assigns it to the SoftwareId field.
func (o *SoftwareInventory) SetSoftwareId(v string) {
o.SoftwareId = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *SoftwareInventory) 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 *SoftwareInventory) 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 *SoftwareInventory) 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 *SoftwareInventory) SetStatus(v Status) {
o.Status = &v
}
// GetUefiDevicePaths returns the UefiDevicePaths field value if set, zero value otherwise.
func (o *SoftwareInventory) GetUefiDevicePaths() []string {
if o == nil || o.UefiDevicePaths == nil {
var ret []string
return ret
}
return *o.UefiDevicePaths
}
// GetUefiDevicePathsOk returns a tuple with the UefiDevicePaths field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SoftwareInventory) GetUefiDevicePathsOk() (*[]string, bool) {
if o == nil || o.UefiDevicePaths == nil {
return nil, false
}
return o.UefiDevicePaths, true
}
// HasUefiDevicePaths returns a boolean if a field has been set.
func (o *SoftwareInventory) HasUefiDevicePaths() bool {
if o != nil && o.UefiDevicePaths != nil {
return true
}
return false
}
// SetUefiDevicePaths gets a reference to the given []string and assigns it to the UefiDevicePaths field.
func (o *SoftwareInventory) SetUefiDevicePaths(v []string) {
o.UefiDevicePaths = &v
}
// GetUpdateable returns the Updateable field value
// If the value is explicit nil, the zero value for bool will be returned
func (o *SoftwareInventory) GetUpdateable() bool {
if o == nil || o.Updateable.Get() == nil {
var ret bool
return ret
}
return *o.Updateable.Get()
}
// GetUpdateableOk returns a tuple with the Updateable field value
// 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 *SoftwareInventory) GetUpdateableOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.Updateable.Get(), o.Updateable.IsSet()
}
// SetUpdateable sets field value
func (o *SoftwareInventory) SetUpdateable(v bool) {
o.Updateable.Set(&v)
}
// GetVersion returns the Version field value
// If the value is explicit nil, the zero value for string will be returned
func (o *SoftwareInventory) GetVersion() string {
if o == nil || o.Version.Get() == nil {
var ret string
return ret
}
return *o.Version.Get()
}
// GetVersionOk returns a tuple with the Version field value
// 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 *SoftwareInventory) GetVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Version.Get(), o.Version.IsSet()
}
// SetVersion sets field value
func (o *SoftwareInventory) SetVersion(v string) {
o.Version.Set(&v)
}
func (o SoftwareInventory) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
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.OdataEtag != nil {
toSerialize["@odata.etag"] = o.OdataEtag
}
if o.Description.IsSet() {
toSerialize["Description"] = o.Description.Get()
}
if true {
toSerialize["Id"] = o.Id
}
if o.LowestSupportedVersion.IsSet() {
toSerialize["LowestSupportedVersion"] = o.LowestSupportedVersion.Get()
}
if o.Manufacturer.IsSet() {
toSerialize["Manufacturer"] = o.Manufacturer.Get()
}
if true {
toSerialize["Name"] = o.Name
}
if o.RelatedItem != nil {
toSerialize["RelatedItem"] = o.RelatedItem
}
if o.RelatedItemodataCount.IsSet() {
toSerialize["RelatedItem@odata.count"] = o.RelatedItemodataCount.Get()
}
if o.ReleaseDate.IsSet() {
toSerialize["ReleaseDate"] = o.ReleaseDate.Get()
}
if o.SoftwareId != nil {
toSerialize["SoftwareId"] = o.SoftwareId
}
if o.Status != nil {
toSerialize["Status"] = o.Status
}
if o.UefiDevicePaths != nil {
toSerialize["UefiDevicePaths"] = o.UefiDevicePaths
}
if true {
toSerialize["Updateable"] = o.Updateable.Get()
}
if true {
toSerialize["Version"] = o.Version.Get()
}
return json.Marshal(toSerialize)
}
type NullableSoftwareInventory struct {
value *SoftwareInventory
isSet bool
}
func (v NullableSoftwareInventory) Get() *SoftwareInventory {
return v.value
}
func (v *NullableSoftwareInventory) Set(val *SoftwareInventory) {
v.value = val
v.isSet = true
}
func (v NullableSoftwareInventory) IsSet() bool {
return v.isSet
}
func (v *NullableSoftwareInventory) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSoftwareInventory(val *SoftwareInventory) *NullableSoftwareInventory {
return &NullableSoftwareInventory{value: val, isSet: true}
}
func (v NullableSoftwareInventory) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSoftwareInventory) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}