mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
265 lines
6.7 KiB
Go
265 lines
6.7 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 IamSetAvatarInput type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamSetAvatarInput{}
|
|
|
|
// IamSetAvatarInput struct for IamSetAvatarInput
|
|
type IamSetAvatarInput struct {
|
|
Avatar *string `json:"avatar,omitempty"`
|
|
Emoji *string `json:"emoji,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Owner *string `json:"owner,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamSetAvatarInput IamSetAvatarInput
|
|
|
|
// NewIamSetAvatarInput instantiates a new IamSetAvatarInput 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 NewIamSetAvatarInput() *IamSetAvatarInput {
|
|
this := IamSetAvatarInput{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamSetAvatarInputWithDefaults instantiates a new IamSetAvatarInput 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 NewIamSetAvatarInputWithDefaults() *IamSetAvatarInput {
|
|
this := IamSetAvatarInput{}
|
|
return &this
|
|
}
|
|
|
|
// GetAvatar returns the Avatar field value if set, zero value otherwise.
|
|
func (o *IamSetAvatarInput) GetAvatar() string {
|
|
if o == nil || IsNil(o.Avatar) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Avatar
|
|
}
|
|
|
|
// GetAvatarOk returns a tuple with the Avatar field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamSetAvatarInput) GetAvatarOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Avatar) {
|
|
return nil, false
|
|
}
|
|
return o.Avatar, true
|
|
}
|
|
|
|
// HasAvatar returns a boolean if a field has been set.
|
|
func (o *IamSetAvatarInput) HasAvatar() bool {
|
|
if o != nil && !IsNil(o.Avatar) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAvatar gets a reference to the given string and assigns it to the Avatar field.
|
|
func (o *IamSetAvatarInput) SetAvatar(v string) {
|
|
o.Avatar = &v
|
|
}
|
|
|
|
// GetEmoji returns the Emoji field value if set, zero value otherwise.
|
|
func (o *IamSetAvatarInput) GetEmoji() string {
|
|
if o == nil || IsNil(o.Emoji) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Emoji
|
|
}
|
|
|
|
// GetEmojiOk returns a tuple with the Emoji field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamSetAvatarInput) GetEmojiOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Emoji) {
|
|
return nil, false
|
|
}
|
|
return o.Emoji, true
|
|
}
|
|
|
|
// HasEmoji returns a boolean if a field has been set.
|
|
func (o *IamSetAvatarInput) HasEmoji() bool {
|
|
if o != nil && !IsNil(o.Emoji) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEmoji gets a reference to the given string and assigns it to the Emoji field.
|
|
func (o *IamSetAvatarInput) SetEmoji(v string) {
|
|
o.Emoji = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *IamSetAvatarInput) 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 *IamSetAvatarInput) 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 *IamSetAvatarInput) 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 *IamSetAvatarInput) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *IamSetAvatarInput) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamSetAvatarInput) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *IamSetAvatarInput) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *IamSetAvatarInput) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
func (o IamSetAvatarInput) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamSetAvatarInput) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Avatar) {
|
|
toSerialize["avatar"] = o.Avatar
|
|
}
|
|
if !IsNil(o.Emoji) {
|
|
toSerialize["emoji"] = o.Emoji
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamSetAvatarInput) UnmarshalJSON(data []byte) (err error) {
|
|
varIamSetAvatarInput := _IamSetAvatarInput{}
|
|
|
|
err = json.Unmarshal(data, &varIamSetAvatarInput)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamSetAvatarInput(varIamSetAvatarInput)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "avatar")
|
|
delete(additionalProperties, "emoji")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "owner")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamSetAvatarInput struct {
|
|
value *IamSetAvatarInput
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamSetAvatarInput) Get() *IamSetAvatarInput {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamSetAvatarInput) Set(val *IamSetAvatarInput) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamSetAvatarInput) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamSetAvatarInput) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamSetAvatarInput(val *IamSetAvatarInput) *NullableIamSetAvatarInput {
|
|
return &NullableIamSetAvatarInput{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamSetAvatarInput) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamSetAvatarInput) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|