mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
265 lines
6.4 KiB
Go
265 lines
6.4 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 IamScheme type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamScheme{}
|
|
|
|
// IamScheme struct for IamScheme
|
|
type IamScheme struct {
|
|
Description *string `json:"description,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Primary *bool `json:"primary,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamScheme IamScheme
|
|
|
|
// NewIamScheme instantiates a new IamScheme 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 NewIamScheme() *IamScheme {
|
|
this := IamScheme{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamSchemeWithDefaults instantiates a new IamScheme 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 NewIamSchemeWithDefaults() *IamScheme {
|
|
this := IamScheme{}
|
|
return &this
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *IamScheme) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamScheme) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *IamScheme) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *IamScheme) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *IamScheme) 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 *IamScheme) 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 *IamScheme) 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 *IamScheme) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetPrimary returns the Primary field value if set, zero value otherwise.
|
|
func (o *IamScheme) GetPrimary() bool {
|
|
if o == nil || IsNil(o.Primary) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Primary
|
|
}
|
|
|
|
// GetPrimaryOk returns a tuple with the Primary field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamScheme) GetPrimaryOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Primary) {
|
|
return nil, false
|
|
}
|
|
return o.Primary, true
|
|
}
|
|
|
|
// HasPrimary returns a boolean if a field has been set.
|
|
func (o *IamScheme) HasPrimary() bool {
|
|
if o != nil && !IsNil(o.Primary) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrimary gets a reference to the given bool and assigns it to the Primary field.
|
|
func (o *IamScheme) SetPrimary(v bool) {
|
|
o.Primary = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *IamScheme) GetType() string {
|
|
if o == nil || IsNil(o.Type) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamScheme) GetTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Type) {
|
|
return nil, false
|
|
}
|
|
return o.Type, true
|
|
}
|
|
|
|
// HasType returns a boolean if a field has been set.
|
|
func (o *IamScheme) HasType() bool {
|
|
if o != nil && !IsNil(o.Type) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
|
func (o *IamScheme) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o IamScheme) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamScheme) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Primary) {
|
|
toSerialize["primary"] = o.Primary
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamScheme) UnmarshalJSON(data []byte) (err error) {
|
|
varIamScheme := _IamScheme{}
|
|
|
|
err = json.Unmarshal(data, &varIamScheme)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamScheme(varIamScheme)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "primary")
|
|
delete(additionalProperties, "type")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamScheme struct {
|
|
value *IamScheme
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamScheme) Get() *IamScheme {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamScheme) Set(val *IamScheme) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamScheme) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamScheme) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamScheme(val *IamScheme) *NullableIamScheme {
|
|
return &NullableIamScheme{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamScheme) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamScheme) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|