![James Gu](/assets/img/avatar_default.png)
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
181 lines
5.0 KiB
Go
181 lines
5.0 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"
|
|
)
|
|
|
|
// SimpleUpdateRequestBody struct for SimpleUpdateRequestBody
|
|
type SimpleUpdateRequestBody struct {
|
|
ImageURI string `json:"ImageURI"`
|
|
Targets *[]string `json:"Targets,omitempty"`
|
|
TransferProtocolType *TransferProtocolType `json:"TransferProtocolType,omitempty"`
|
|
}
|
|
|
|
// NewSimpleUpdateRequestBody instantiates a new SimpleUpdateRequestBody 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 NewSimpleUpdateRequestBody(imageURI string) *SimpleUpdateRequestBody {
|
|
this := SimpleUpdateRequestBody{}
|
|
this.ImageURI = imageURI
|
|
return &this
|
|
}
|
|
|
|
// NewSimpleUpdateRequestBodyWithDefaults instantiates a new SimpleUpdateRequestBody 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 NewSimpleUpdateRequestBodyWithDefaults() *SimpleUpdateRequestBody {
|
|
this := SimpleUpdateRequestBody{}
|
|
return &this
|
|
}
|
|
|
|
// GetImageURI returns the ImageURI field value
|
|
func (o *SimpleUpdateRequestBody) GetImageURI() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.ImageURI
|
|
}
|
|
|
|
// GetImageURIOk returns a tuple with the ImageURI field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SimpleUpdateRequestBody) GetImageURIOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.ImageURI, true
|
|
}
|
|
|
|
// SetImageURI sets field value
|
|
func (o *SimpleUpdateRequestBody) SetImageURI(v string) {
|
|
o.ImageURI = v
|
|
}
|
|
|
|
// GetTargets returns the Targets field value if set, zero value otherwise.
|
|
func (o *SimpleUpdateRequestBody) GetTargets() []string {
|
|
if o == nil || o.Targets == nil {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return *o.Targets
|
|
}
|
|
|
|
// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SimpleUpdateRequestBody) GetTargetsOk() (*[]string, bool) {
|
|
if o == nil || o.Targets == nil {
|
|
return nil, false
|
|
}
|
|
return o.Targets, true
|
|
}
|
|
|
|
// HasTargets returns a boolean if a field has been set.
|
|
func (o *SimpleUpdateRequestBody) HasTargets() bool {
|
|
if o != nil && o.Targets != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTargets gets a reference to the given []string and assigns it to the Targets field.
|
|
func (o *SimpleUpdateRequestBody) SetTargets(v []string) {
|
|
o.Targets = &v
|
|
}
|
|
|
|
// GetTransferProtocolType returns the TransferProtocolType field value if set, zero value otherwise.
|
|
func (o *SimpleUpdateRequestBody) GetTransferProtocolType() TransferProtocolType {
|
|
if o == nil || o.TransferProtocolType == nil {
|
|
var ret TransferProtocolType
|
|
return ret
|
|
}
|
|
return *o.TransferProtocolType
|
|
}
|
|
|
|
// GetTransferProtocolTypeOk returns a tuple with the TransferProtocolType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SimpleUpdateRequestBody) GetTransferProtocolTypeOk() (*TransferProtocolType, bool) {
|
|
if o == nil || o.TransferProtocolType == nil {
|
|
return nil, false
|
|
}
|
|
return o.TransferProtocolType, true
|
|
}
|
|
|
|
// HasTransferProtocolType returns a boolean if a field has been set.
|
|
func (o *SimpleUpdateRequestBody) HasTransferProtocolType() bool {
|
|
if o != nil && o.TransferProtocolType != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTransferProtocolType gets a reference to the given TransferProtocolType and assigns it to the TransferProtocolType field.
|
|
func (o *SimpleUpdateRequestBody) SetTransferProtocolType(v TransferProtocolType) {
|
|
o.TransferProtocolType = &v
|
|
}
|
|
|
|
func (o SimpleUpdateRequestBody) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if true {
|
|
toSerialize["ImageURI"] = o.ImageURI
|
|
}
|
|
if o.Targets != nil {
|
|
toSerialize["Targets"] = o.Targets
|
|
}
|
|
if o.TransferProtocolType != nil {
|
|
toSerialize["TransferProtocolType"] = o.TransferProtocolType
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableSimpleUpdateRequestBody struct {
|
|
value *SimpleUpdateRequestBody
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSimpleUpdateRequestBody) Get() *SimpleUpdateRequestBody {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSimpleUpdateRequestBody) Set(val *SimpleUpdateRequestBody) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSimpleUpdateRequestBody) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSimpleUpdateRequestBody) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSimpleUpdateRequestBody(val *SimpleUpdateRequestBody) *NullableSimpleUpdateRequestBody {
|
|
return &NullableSimpleUpdateRequestBody{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSimpleUpdateRequestBody) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSimpleUpdateRequestBody) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|