mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
191 lines
4.8 KiB
Go
191 lines
4.8 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 IamCreateInput type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamCreateInput{}
|
|
|
|
// IamCreateInput struct for IamCreateInput
|
|
type IamCreateInput struct {
|
|
Password *string `json:"password,omitempty"`
|
|
User *IamUser `json:"user,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamCreateInput IamCreateInput
|
|
|
|
// NewIamCreateInput instantiates a new IamCreateInput 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 NewIamCreateInput() *IamCreateInput {
|
|
this := IamCreateInput{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamCreateInputWithDefaults instantiates a new IamCreateInput 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 NewIamCreateInputWithDefaults() *IamCreateInput {
|
|
this := IamCreateInput{}
|
|
return &this
|
|
}
|
|
|
|
// GetPassword returns the Password field value if set, zero value otherwise.
|
|
func (o *IamCreateInput) GetPassword() string {
|
|
if o == nil || IsNil(o.Password) {
|
|
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 *IamCreateInput) GetPasswordOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Password) {
|
|
return nil, false
|
|
}
|
|
return o.Password, true
|
|
}
|
|
|
|
// HasPassword returns a boolean if a field has been set.
|
|
func (o *IamCreateInput) HasPassword() bool {
|
|
if o != nil && !IsNil(o.Password) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPassword gets a reference to the given string and assigns it to the Password field.
|
|
func (o *IamCreateInput) SetPassword(v string) {
|
|
o.Password = &v
|
|
}
|
|
|
|
// GetUser returns the User field value if set, zero value otherwise.
|
|
func (o *IamCreateInput) GetUser() IamUser {
|
|
if o == nil || IsNil(o.User) {
|
|
var ret IamUser
|
|
return ret
|
|
}
|
|
return *o.User
|
|
}
|
|
|
|
// GetUserOk returns a tuple with the User field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamCreateInput) GetUserOk() (*IamUser, bool) {
|
|
if o == nil || IsNil(o.User) {
|
|
return nil, false
|
|
}
|
|
return o.User, true
|
|
}
|
|
|
|
// HasUser returns a boolean if a field has been set.
|
|
func (o *IamCreateInput) HasUser() bool {
|
|
if o != nil && !IsNil(o.User) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUser gets a reference to the given IamUser and assigns it to the User field.
|
|
func (o *IamCreateInput) SetUser(v IamUser) {
|
|
o.User = &v
|
|
}
|
|
|
|
func (o IamCreateInput) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamCreateInput) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Password) {
|
|
toSerialize["password"] = o.Password
|
|
}
|
|
if !IsNil(o.User) {
|
|
toSerialize["user"] = o.User
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamCreateInput) UnmarshalJSON(data []byte) (err error) {
|
|
varIamCreateInput := _IamCreateInput{}
|
|
|
|
err = json.Unmarshal(data, &varIamCreateInput)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamCreateInput(varIamCreateInput)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "password")
|
|
delete(additionalProperties, "user")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamCreateInput struct {
|
|
value *IamCreateInput
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamCreateInput) Get() *IamCreateInput {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamCreateInput) Set(val *IamCreateInput) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamCreateInput) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamCreateInput) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamCreateInput(val *IamCreateInput) *NullableIamCreateInput {
|
|
return &NullableIamCreateInput{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamCreateInput) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamCreateInput) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|