mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
6.1 KiB
Go
228 lines
6.1 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 IamManagedAccount type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamManagedAccount{}
|
|
|
|
// IamManagedAccount struct for IamManagedAccount
|
|
type IamManagedAccount struct {
|
|
Application *string `json:"application,omitempty"`
|
|
SigninUrl *string `json:"signinUrl,omitempty"`
|
|
Username *string `json:"username,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamManagedAccount IamManagedAccount
|
|
|
|
// NewIamManagedAccount instantiates a new IamManagedAccount 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 NewIamManagedAccount() *IamManagedAccount {
|
|
this := IamManagedAccount{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamManagedAccountWithDefaults instantiates a new IamManagedAccount 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 NewIamManagedAccountWithDefaults() *IamManagedAccount {
|
|
this := IamManagedAccount{}
|
|
return &this
|
|
}
|
|
|
|
// GetApplication returns the Application field value if set, zero value otherwise.
|
|
func (o *IamManagedAccount) GetApplication() string {
|
|
if o == nil || IsNil(o.Application) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Application
|
|
}
|
|
|
|
// GetApplicationOk returns a tuple with the Application field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamManagedAccount) GetApplicationOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Application) {
|
|
return nil, false
|
|
}
|
|
return o.Application, true
|
|
}
|
|
|
|
// HasApplication returns a boolean if a field has been set.
|
|
func (o *IamManagedAccount) HasApplication() bool {
|
|
if o != nil && !IsNil(o.Application) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetApplication gets a reference to the given string and assigns it to the Application field.
|
|
func (o *IamManagedAccount) SetApplication(v string) {
|
|
o.Application = &v
|
|
}
|
|
|
|
// GetSigninUrl returns the SigninUrl field value if set, zero value otherwise.
|
|
func (o *IamManagedAccount) GetSigninUrl() string {
|
|
if o == nil || IsNil(o.SigninUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SigninUrl
|
|
}
|
|
|
|
// GetSigninUrlOk returns a tuple with the SigninUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamManagedAccount) GetSigninUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SigninUrl) {
|
|
return nil, false
|
|
}
|
|
return o.SigninUrl, true
|
|
}
|
|
|
|
// HasSigninUrl returns a boolean if a field has been set.
|
|
func (o *IamManagedAccount) HasSigninUrl() bool {
|
|
if o != nil && !IsNil(o.SigninUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSigninUrl gets a reference to the given string and assigns it to the SigninUrl field.
|
|
func (o *IamManagedAccount) SetSigninUrl(v string) {
|
|
o.SigninUrl = &v
|
|
}
|
|
|
|
// GetUsername returns the Username field value if set, zero value otherwise.
|
|
func (o *IamManagedAccount) GetUsername() string {
|
|
if o == nil || IsNil(o.Username) {
|
|
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 *IamManagedAccount) GetUsernameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Username) {
|
|
return nil, false
|
|
}
|
|
return o.Username, true
|
|
}
|
|
|
|
// HasUsername returns a boolean if a field has been set.
|
|
func (o *IamManagedAccount) HasUsername() bool {
|
|
if o != nil && !IsNil(o.Username) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUsername gets a reference to the given string and assigns it to the Username field.
|
|
func (o *IamManagedAccount) SetUsername(v string) {
|
|
o.Username = &v
|
|
}
|
|
|
|
func (o IamManagedAccount) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamManagedAccount) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Application) {
|
|
toSerialize["application"] = o.Application
|
|
}
|
|
if !IsNil(o.SigninUrl) {
|
|
toSerialize["signinUrl"] = o.SigninUrl
|
|
}
|
|
if !IsNil(o.Username) {
|
|
toSerialize["username"] = o.Username
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamManagedAccount) UnmarshalJSON(data []byte) (err error) {
|
|
varIamManagedAccount := _IamManagedAccount{}
|
|
|
|
err = json.Unmarshal(data, &varIamManagedAccount)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamManagedAccount(varIamManagedAccount)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "application")
|
|
delete(additionalProperties, "signinUrl")
|
|
delete(additionalProperties, "username")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamManagedAccount struct {
|
|
value *IamManagedAccount
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamManagedAccount) Get() *IamManagedAccount {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamManagedAccount) Set(val *IamManagedAccount) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamManagedAccount) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamManagedAccount) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamManagedAccount(val *IamManagedAccount) *NullableIamManagedAccount {
|
|
return &NullableIamManagedAccount{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamManagedAccount) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamManagedAccount) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|