c442eb5bcb
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
289 lines
7.1 KiB
Go
289 lines
7.1 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"
|
|
)
|
|
|
|
// Message struct for Message
|
|
type Message struct {
|
|
Message *string `json:"Message,omitempty"`
|
|
MessageArgs *[]string `json:"MessageArgs,omitempty"`
|
|
MessageId string `json:"MessageId"`
|
|
RelatedProperties *[]string `json:"RelatedProperties,omitempty"`
|
|
Resolution *string `json:"Resolution,omitempty"`
|
|
Severity *string `json:"Severity,omitempty"`
|
|
}
|
|
|
|
// NewMessage instantiates a new Message 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 NewMessage(messageId string) *Message {
|
|
this := Message{}
|
|
this.MessageId = messageId
|
|
return &this
|
|
}
|
|
|
|
// NewMessageWithDefaults instantiates a new Message 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 NewMessageWithDefaults() *Message {
|
|
this := Message{}
|
|
return &this
|
|
}
|
|
|
|
// GetMessage returns the Message field value if set, zero value otherwise.
|
|
func (o *Message) GetMessage() string {
|
|
if o == nil || o.Message == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Message
|
|
}
|
|
|
|
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Message) GetMessageOk() (*string, bool) {
|
|
if o == nil || o.Message == nil {
|
|
return nil, false
|
|
}
|
|
return o.Message, true
|
|
}
|
|
|
|
// HasMessage returns a boolean if a field has been set.
|
|
func (o *Message) HasMessage() bool {
|
|
if o != nil && o.Message != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
|
func (o *Message) SetMessage(v string) {
|
|
o.Message = &v
|
|
}
|
|
|
|
// GetMessageArgs returns the MessageArgs field value if set, zero value otherwise.
|
|
func (o *Message) GetMessageArgs() []string {
|
|
if o == nil || o.MessageArgs == nil {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return *o.MessageArgs
|
|
}
|
|
|
|
// GetMessageArgsOk returns a tuple with the MessageArgs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Message) GetMessageArgsOk() (*[]string, bool) {
|
|
if o == nil || o.MessageArgs == nil {
|
|
return nil, false
|
|
}
|
|
return o.MessageArgs, true
|
|
}
|
|
|
|
// HasMessageArgs returns a boolean if a field has been set.
|
|
func (o *Message) HasMessageArgs() bool {
|
|
if o != nil && o.MessageArgs != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMessageArgs gets a reference to the given []string and assigns it to the MessageArgs field.
|
|
func (o *Message) SetMessageArgs(v []string) {
|
|
o.MessageArgs = &v
|
|
}
|
|
|
|
// GetMessageId returns the MessageId field value
|
|
func (o *Message) GetMessageId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.MessageId
|
|
}
|
|
|
|
// GetMessageIdOk returns a tuple with the MessageId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Message) GetMessageIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.MessageId, true
|
|
}
|
|
|
|
// SetMessageId sets field value
|
|
func (o *Message) SetMessageId(v string) {
|
|
o.MessageId = v
|
|
}
|
|
|
|
// GetRelatedProperties returns the RelatedProperties field value if set, zero value otherwise.
|
|
func (o *Message) GetRelatedProperties() []string {
|
|
if o == nil || o.RelatedProperties == nil {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return *o.RelatedProperties
|
|
}
|
|
|
|
// GetRelatedPropertiesOk returns a tuple with the RelatedProperties field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Message) GetRelatedPropertiesOk() (*[]string, bool) {
|
|
if o == nil || o.RelatedProperties == nil {
|
|
return nil, false
|
|
}
|
|
return o.RelatedProperties, true
|
|
}
|
|
|
|
// HasRelatedProperties returns a boolean if a field has been set.
|
|
func (o *Message) HasRelatedProperties() bool {
|
|
if o != nil && o.RelatedProperties != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRelatedProperties gets a reference to the given []string and assigns it to the RelatedProperties field.
|
|
func (o *Message) SetRelatedProperties(v []string) {
|
|
o.RelatedProperties = &v
|
|
}
|
|
|
|
// GetResolution returns the Resolution field value if set, zero value otherwise.
|
|
func (o *Message) GetResolution() string {
|
|
if o == nil || o.Resolution == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Resolution
|
|
}
|
|
|
|
// GetResolutionOk returns a tuple with the Resolution field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Message) GetResolutionOk() (*string, bool) {
|
|
if o == nil || o.Resolution == nil {
|
|
return nil, false
|
|
}
|
|
return o.Resolution, true
|
|
}
|
|
|
|
// HasResolution returns a boolean if a field has been set.
|
|
func (o *Message) HasResolution() bool {
|
|
if o != nil && o.Resolution != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResolution gets a reference to the given string and assigns it to the Resolution field.
|
|
func (o *Message) SetResolution(v string) {
|
|
o.Resolution = &v
|
|
}
|
|
|
|
// GetSeverity returns the Severity field value if set, zero value otherwise.
|
|
func (o *Message) GetSeverity() string {
|
|
if o == nil || o.Severity == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Severity
|
|
}
|
|
|
|
// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Message) GetSeverityOk() (*string, bool) {
|
|
if o == nil || o.Severity == nil {
|
|
return nil, false
|
|
}
|
|
return o.Severity, true
|
|
}
|
|
|
|
// HasSeverity returns a boolean if a field has been set.
|
|
func (o *Message) HasSeverity() bool {
|
|
if o != nil && o.Severity != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSeverity gets a reference to the given string and assigns it to the Severity field.
|
|
func (o *Message) SetSeverity(v string) {
|
|
o.Severity = &v
|
|
}
|
|
|
|
func (o Message) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Message != nil {
|
|
toSerialize["Message"] = o.Message
|
|
}
|
|
if o.MessageArgs != nil {
|
|
toSerialize["MessageArgs"] = o.MessageArgs
|
|
}
|
|
if true {
|
|
toSerialize["MessageId"] = o.MessageId
|
|
}
|
|
if o.RelatedProperties != nil {
|
|
toSerialize["RelatedProperties"] = o.RelatedProperties
|
|
}
|
|
if o.Resolution != nil {
|
|
toSerialize["Resolution"] = o.Resolution
|
|
}
|
|
if o.Severity != nil {
|
|
toSerialize["Severity"] = o.Severity
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableMessage struct {
|
|
value *Message
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableMessage) Get() *Message {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableMessage) Set(val *Message) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableMessage) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableMessage) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableMessage(val *Message) *NullableMessage {
|
|
return &NullableMessage{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableMessage) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableMessage) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|