Files
sdk/model_iam_reply.go

266 lines
6.3 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the IamReply type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IamReply{}
// IamReply struct for IamReply
type IamReply struct {
Action *string `json:"action,omitempty"`
Data interface{} `json:"data,omitempty"`
Msg *string `json:"msg,omitempty"`
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _IamReply IamReply
// NewIamReply instantiates a new IamReply 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 NewIamReply() *IamReply {
this := IamReply{}
return &this
}
// NewIamReplyWithDefaults instantiates a new IamReply 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 NewIamReplyWithDefaults() *IamReply {
this := IamReply{}
return &this
}
// GetAction returns the Action field value if set, zero value otherwise.
func (o *IamReply) GetAction() string {
if o == nil || IsNil(o.Action) {
var ret string
return ret
}
return *o.Action
}
// GetActionOk returns a tuple with the Action field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamReply) GetActionOk() (*string, bool) {
if o == nil || IsNil(o.Action) {
return nil, false
}
return o.Action, true
}
// HasAction returns a boolean if a field has been set.
func (o *IamReply) HasAction() bool {
if o != nil && !IsNil(o.Action) {
return true
}
return false
}
// SetAction gets a reference to the given string and assigns it to the Action field.
func (o *IamReply) SetAction(v string) {
o.Action = &v
}
// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *IamReply) GetData() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Data
}
// GetDataOk returns a tuple with the Data 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 *IamReply) GetDataOk() (*interface{}, bool) {
if o == nil || IsNil(o.Data) {
return nil, false
}
return &o.Data, true
}
// HasData returns a boolean if a field has been set.
func (o *IamReply) HasData() bool {
if o != nil && !IsNil(o.Data) {
return true
}
return false
}
// SetData gets a reference to the given interface{} and assigns it to the Data field.
func (o *IamReply) SetData(v interface{}) {
o.Data = v
}
// GetMsg returns the Msg field value if set, zero value otherwise.
func (o *IamReply) GetMsg() string {
if o == nil || IsNil(o.Msg) {
var ret string
return ret
}
return *o.Msg
}
// GetMsgOk returns a tuple with the Msg field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamReply) GetMsgOk() (*string, bool) {
if o == nil || IsNil(o.Msg) {
return nil, false
}
return o.Msg, true
}
// HasMsg returns a boolean if a field has been set.
func (o *IamReply) HasMsg() bool {
if o != nil && !IsNil(o.Msg) {
return true
}
return false
}
// SetMsg gets a reference to the given string and assigns it to the Msg field.
func (o *IamReply) SetMsg(v string) {
o.Msg = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *IamReply) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
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 *IamReply) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *IamReply) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *IamReply) SetStatus(v string) {
o.Status = &v
}
func (o IamReply) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o IamReply) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Action) {
toSerialize["action"] = o.Action
}
if o.Data != nil {
toSerialize["data"] = o.Data
}
if !IsNil(o.Msg) {
toSerialize["msg"] = o.Msg
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *IamReply) UnmarshalJSON(data []byte) (err error) {
varIamReply := _IamReply{}
err = json.Unmarshal(data, &varIamReply)
if err != nil {
return err
}
*o = IamReply(varIamReply)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "action")
delete(additionalProperties, "data")
delete(additionalProperties, "msg")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableIamReply struct {
value *IamReply
isSet bool
}
func (v NullableIamReply) Get() *IamReply {
return v.value
}
func (v *NullableIamReply) Set(val *IamReply) {
v.value = val
v.isSet = true
}
func (v NullableIamReply) IsSet() bool {
return v.isSet
}
func (v *NullableIamReply) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIamReply(val *IamReply) *NullableIamReply {
return &NullableIamReply{value: val, isSet: true}
}
func (v NullableIamReply) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIamReply) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}