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
325 lines
9.0 KiB
Go
325 lines
9.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"
|
|
)
|
|
|
|
// InsertMediaRequestBody struct for InsertMediaRequestBody
|
|
type InsertMediaRequestBody struct {
|
|
Image string `json:"Image"`
|
|
Inserted *bool `json:"Inserted,omitempty"`
|
|
Password *string `json:"Password,omitempty"`
|
|
TransferMethod *TransferMethod `json:"TransferMethod,omitempty"`
|
|
TransferProtocolType *TransferProtocolType `json:"TransferProtocolType,omitempty"`
|
|
UserName *string `json:"UserName,omitempty"`
|
|
WriteProtected *bool `json:"WriteProtected,omitempty"`
|
|
}
|
|
|
|
// NewInsertMediaRequestBody instantiates a new InsertMediaRequestBody 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 NewInsertMediaRequestBody(image string) *InsertMediaRequestBody {
|
|
this := InsertMediaRequestBody{}
|
|
this.Image = image
|
|
return &this
|
|
}
|
|
|
|
// NewInsertMediaRequestBodyWithDefaults instantiates a new InsertMediaRequestBody 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 NewInsertMediaRequestBodyWithDefaults() *InsertMediaRequestBody {
|
|
this := InsertMediaRequestBody{}
|
|
return &this
|
|
}
|
|
|
|
// GetImage returns the Image field value
|
|
func (o *InsertMediaRequestBody) GetImage() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Image
|
|
}
|
|
|
|
// GetImageOk returns a tuple with the Image field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsertMediaRequestBody) GetImageOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Image, true
|
|
}
|
|
|
|
// SetImage sets field value
|
|
func (o *InsertMediaRequestBody) SetImage(v string) {
|
|
o.Image = v
|
|
}
|
|
|
|
// GetInserted returns the Inserted field value if set, zero value otherwise.
|
|
func (o *InsertMediaRequestBody) GetInserted() bool {
|
|
if o == nil || o.Inserted == nil {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Inserted
|
|
}
|
|
|
|
// GetInsertedOk returns a tuple with the Inserted field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsertMediaRequestBody) GetInsertedOk() (*bool, bool) {
|
|
if o == nil || o.Inserted == nil {
|
|
return nil, false
|
|
}
|
|
return o.Inserted, true
|
|
}
|
|
|
|
// HasInserted returns a boolean if a field has been set.
|
|
func (o *InsertMediaRequestBody) HasInserted() bool {
|
|
if o != nil && o.Inserted != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInserted gets a reference to the given bool and assigns it to the Inserted field.
|
|
func (o *InsertMediaRequestBody) SetInserted(v bool) {
|
|
o.Inserted = &v
|
|
}
|
|
|
|
// GetPassword returns the Password field value if set, zero value otherwise.
|
|
func (o *InsertMediaRequestBody) GetPassword() string {
|
|
if o == nil || o.Password == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Password
|
|
}
|
|
|
|
// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsertMediaRequestBody) GetPasswordOk() (*string, bool) {
|
|
if o == nil || o.Password == nil {
|
|
return nil, false
|
|
}
|
|
return o.Password, true
|
|
}
|
|
|
|
// HasPassword returns a boolean if a field has been set.
|
|
func (o *InsertMediaRequestBody) HasPassword() bool {
|
|
if o != nil && o.Password != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPassword gets a reference to the given string and assigns it to the Password field.
|
|
func (o *InsertMediaRequestBody) SetPassword(v string) {
|
|
o.Password = &v
|
|
}
|
|
|
|
// GetTransferMethod returns the TransferMethod field value if set, zero value otherwise.
|
|
func (o *InsertMediaRequestBody) GetTransferMethod() TransferMethod {
|
|
if o == nil || o.TransferMethod == nil {
|
|
var ret TransferMethod
|
|
return ret
|
|
}
|
|
return *o.TransferMethod
|
|
}
|
|
|
|
// GetTransferMethodOk returns a tuple with the TransferMethod field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsertMediaRequestBody) GetTransferMethodOk() (*TransferMethod, bool) {
|
|
if o == nil || o.TransferMethod == nil {
|
|
return nil, false
|
|
}
|
|
return o.TransferMethod, true
|
|
}
|
|
|
|
// HasTransferMethod returns a boolean if a field has been set.
|
|
func (o *InsertMediaRequestBody) HasTransferMethod() bool {
|
|
if o != nil && o.TransferMethod != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTransferMethod gets a reference to the given TransferMethod and assigns it to the TransferMethod field.
|
|
func (o *InsertMediaRequestBody) SetTransferMethod(v TransferMethod) {
|
|
o.TransferMethod = &v
|
|
}
|
|
|
|
// GetTransferProtocolType returns the TransferProtocolType field value if set, zero value otherwise.
|
|
func (o *InsertMediaRequestBody) 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 *InsertMediaRequestBody) 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 *InsertMediaRequestBody) 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 *InsertMediaRequestBody) SetTransferProtocolType(v TransferProtocolType) {
|
|
o.TransferProtocolType = &v
|
|
}
|
|
|
|
// GetUserName returns the UserName field value if set, zero value otherwise.
|
|
func (o *InsertMediaRequestBody) GetUserName() string {
|
|
if o == nil || o.UserName == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UserName
|
|
}
|
|
|
|
// GetUserNameOk returns a tuple with the UserName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsertMediaRequestBody) GetUserNameOk() (*string, bool) {
|
|
if o == nil || o.UserName == nil {
|
|
return nil, false
|
|
}
|
|
return o.UserName, true
|
|
}
|
|
|
|
// HasUserName returns a boolean if a field has been set.
|
|
func (o *InsertMediaRequestBody) HasUserName() bool {
|
|
if o != nil && o.UserName != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUserName gets a reference to the given string and assigns it to the UserName field.
|
|
func (o *InsertMediaRequestBody) SetUserName(v string) {
|
|
o.UserName = &v
|
|
}
|
|
|
|
// GetWriteProtected returns the WriteProtected field value if set, zero value otherwise.
|
|
func (o *InsertMediaRequestBody) GetWriteProtected() bool {
|
|
if o == nil || o.WriteProtected == nil {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.WriteProtected
|
|
}
|
|
|
|
// GetWriteProtectedOk returns a tuple with the WriteProtected field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InsertMediaRequestBody) GetWriteProtectedOk() (*bool, bool) {
|
|
if o == nil || o.WriteProtected == nil {
|
|
return nil, false
|
|
}
|
|
return o.WriteProtected, true
|
|
}
|
|
|
|
// HasWriteProtected returns a boolean if a field has been set.
|
|
func (o *InsertMediaRequestBody) HasWriteProtected() bool {
|
|
if o != nil && o.WriteProtected != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWriteProtected gets a reference to the given bool and assigns it to the WriteProtected field.
|
|
func (o *InsertMediaRequestBody) SetWriteProtected(v bool) {
|
|
o.WriteProtected = &v
|
|
}
|
|
|
|
func (o InsertMediaRequestBody) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if true {
|
|
toSerialize["Image"] = o.Image
|
|
}
|
|
if o.Inserted != nil {
|
|
toSerialize["Inserted"] = o.Inserted
|
|
}
|
|
if o.Password != nil {
|
|
toSerialize["Password"] = o.Password
|
|
}
|
|
if o.TransferMethod != nil {
|
|
toSerialize["TransferMethod"] = o.TransferMethod
|
|
}
|
|
if o.TransferProtocolType != nil {
|
|
toSerialize["TransferProtocolType"] = o.TransferProtocolType
|
|
}
|
|
if o.UserName != nil {
|
|
toSerialize["UserName"] = o.UserName
|
|
}
|
|
if o.WriteProtected != nil {
|
|
toSerialize["WriteProtected"] = o.WriteProtected
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableInsertMediaRequestBody struct {
|
|
value *InsertMediaRequestBody
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableInsertMediaRequestBody) Get() *InsertMediaRequestBody {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableInsertMediaRequestBody) Set(val *InsertMediaRequestBody) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableInsertMediaRequestBody) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableInsertMediaRequestBody) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableInsertMediaRequestBody(val *InsertMediaRequestBody) *NullableInsertMediaRequestBody {
|
|
return &NullableInsertMediaRequestBody{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableInsertMediaRequestBody) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableInsertMediaRequestBody) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|