mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
417 lines
10 KiB
Go
417 lines
10 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 IamAnswer type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamAnswer{}
|
|
|
|
// IamAnswer struct for IamAnswer
|
|
type IamAnswer struct {
|
|
// Code is a STABLE machine-readable reason, where the human `msg` is deliberately generic. `msg` is prose for a person and several distinct causes legitimately share one sentence; a caller that must BRANCH on the cause — or tell its own user which of them happened — cannot parse prose. Optional, so every existing envelope is byte-identical and no SDK changes.
|
|
Code *string `json:"code,omitempty"`
|
|
Data interface{} `json:"data,omitempty"`
|
|
Data2 interface{} `json:"data2,omitempty"`
|
|
Data3 interface{} `json:"data3,omitempty"`
|
|
Msg *string `json:"msg,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Status *string `json:"status,omitempty"`
|
|
Sub *string `json:"sub,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamAnswer IamAnswer
|
|
|
|
// NewIamAnswer instantiates a new IamAnswer 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 NewIamAnswer() *IamAnswer {
|
|
this := IamAnswer{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamAnswerWithDefaults instantiates a new IamAnswer 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 NewIamAnswerWithDefaults() *IamAnswer {
|
|
this := IamAnswer{}
|
|
return &this
|
|
}
|
|
|
|
// GetCode returns the Code field value if set, zero value otherwise.
|
|
func (o *IamAnswer) GetCode() string {
|
|
if o == nil || IsNil(o.Code) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Code
|
|
}
|
|
|
|
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamAnswer) GetCodeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Code) {
|
|
return nil, false
|
|
}
|
|
return o.Code, true
|
|
}
|
|
|
|
// HasCode returns a boolean if a field has been set.
|
|
func (o *IamAnswer) HasCode() bool {
|
|
if o != nil && !IsNil(o.Code) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCode gets a reference to the given string and assigns it to the Code field.
|
|
func (o *IamAnswer) SetCode(v string) {
|
|
o.Code = &v
|
|
}
|
|
|
|
// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *IamAnswer) 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 *IamAnswer) 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 *IamAnswer) 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 *IamAnswer) SetData(v interface{}) {
|
|
o.Data = v
|
|
}
|
|
|
|
// GetData2 returns the Data2 field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *IamAnswer) GetData2() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Data2
|
|
}
|
|
|
|
// GetData2Ok returns a tuple with the Data2 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 *IamAnswer) GetData2Ok() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Data2) {
|
|
return nil, false
|
|
}
|
|
return &o.Data2, true
|
|
}
|
|
|
|
// HasData2 returns a boolean if a field has been set.
|
|
func (o *IamAnswer) HasData2() bool {
|
|
if o != nil && !IsNil(o.Data2) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetData2 gets a reference to the given interface{} and assigns it to the Data2 field.
|
|
func (o *IamAnswer) SetData2(v interface{}) {
|
|
o.Data2 = v
|
|
}
|
|
|
|
// GetData3 returns the Data3 field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *IamAnswer) GetData3() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Data3
|
|
}
|
|
|
|
// GetData3Ok returns a tuple with the Data3 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 *IamAnswer) GetData3Ok() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Data3) {
|
|
return nil, false
|
|
}
|
|
return &o.Data3, true
|
|
}
|
|
|
|
// HasData3 returns a boolean if a field has been set.
|
|
func (o *IamAnswer) HasData3() bool {
|
|
if o != nil && !IsNil(o.Data3) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetData3 gets a reference to the given interface{} and assigns it to the Data3 field.
|
|
func (o *IamAnswer) SetData3(v interface{}) {
|
|
o.Data3 = v
|
|
}
|
|
|
|
// GetMsg returns the Msg field value if set, zero value otherwise.
|
|
func (o *IamAnswer) 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 *IamAnswer) 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 *IamAnswer) 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 *IamAnswer) SetMsg(v string) {
|
|
o.Msg = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *IamAnswer) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamAnswer) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *IamAnswer) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *IamAnswer) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *IamAnswer) 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 *IamAnswer) 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 *IamAnswer) 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 *IamAnswer) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetSub returns the Sub field value if set, zero value otherwise.
|
|
func (o *IamAnswer) GetSub() string {
|
|
if o == nil || IsNil(o.Sub) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Sub
|
|
}
|
|
|
|
// GetSubOk returns a tuple with the Sub field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamAnswer) GetSubOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Sub) {
|
|
return nil, false
|
|
}
|
|
return o.Sub, true
|
|
}
|
|
|
|
// HasSub returns a boolean if a field has been set.
|
|
func (o *IamAnswer) HasSub() bool {
|
|
if o != nil && !IsNil(o.Sub) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSub gets a reference to the given string and assigns it to the Sub field.
|
|
func (o *IamAnswer) SetSub(v string) {
|
|
o.Sub = &v
|
|
}
|
|
|
|
func (o IamAnswer) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamAnswer) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Code) {
|
|
toSerialize["code"] = o.Code
|
|
}
|
|
if o.Data != nil {
|
|
toSerialize["data"] = o.Data
|
|
}
|
|
if o.Data2 != nil {
|
|
toSerialize["data2"] = o.Data2
|
|
}
|
|
if o.Data3 != nil {
|
|
toSerialize["data3"] = o.Data3
|
|
}
|
|
if !IsNil(o.Msg) {
|
|
toSerialize["msg"] = o.Msg
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Sub) {
|
|
toSerialize["sub"] = o.Sub
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamAnswer) UnmarshalJSON(data []byte) (err error) {
|
|
varIamAnswer := _IamAnswer{}
|
|
|
|
err = json.Unmarshal(data, &varIamAnswer)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamAnswer(varIamAnswer)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "code")
|
|
delete(additionalProperties, "data")
|
|
delete(additionalProperties, "data2")
|
|
delete(additionalProperties, "data3")
|
|
delete(additionalProperties, "msg")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "sub")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamAnswer struct {
|
|
value *IamAnswer
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamAnswer) Get() *IamAnswer {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamAnswer) Set(val *IamAnswer) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamAnswer) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamAnswer) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamAnswer(val *IamAnswer) *NullableIamAnswer {
|
|
return &NullableIamAnswer{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamAnswer) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamAnswer) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|