Files
sdk/model_iam_config.go

450 lines
12 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 IamConfig type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IamConfig{}
// IamConfig struct for IamConfig
type IamConfig struct {
AuthenticationSchemes []IamScheme `json:"authenticationSchemes,omitempty"`
Bulk *IamBulk `json:"bulk,omitempty"`
ChangePassword *IamToggle `json:"changePassword,omitempty"`
DocumentationUri *string `json:"documentationUri,omitempty"`
Etag *IamToggle `json:"etag,omitempty"`
Filter *IamFilter `json:"filter,omitempty"`
Patch *IamToggle `json:"patch,omitempty"`
Schemas []string `json:"schemas,omitempty"`
Sort *IamToggle `json:"sort,omitempty"`
AdditionalProperties map[string]interface{}
}
type _IamConfig IamConfig
// NewIamConfig instantiates a new IamConfig 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 NewIamConfig() *IamConfig {
this := IamConfig{}
return &this
}
// NewIamConfigWithDefaults instantiates a new IamConfig 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 NewIamConfigWithDefaults() *IamConfig {
this := IamConfig{}
return &this
}
// GetAuthenticationSchemes returns the AuthenticationSchemes field value if set, zero value otherwise.
func (o *IamConfig) GetAuthenticationSchemes() []IamScheme {
if o == nil || IsNil(o.AuthenticationSchemes) {
var ret []IamScheme
return ret
}
return o.AuthenticationSchemes
}
// GetAuthenticationSchemesOk returns a tuple with the AuthenticationSchemes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamConfig) GetAuthenticationSchemesOk() ([]IamScheme, bool) {
if o == nil || IsNil(o.AuthenticationSchemes) {
return nil, false
}
return o.AuthenticationSchemes, true
}
// HasAuthenticationSchemes returns a boolean if a field has been set.
func (o *IamConfig) HasAuthenticationSchemes() bool {
if o != nil && !IsNil(o.AuthenticationSchemes) {
return true
}
return false
}
// SetAuthenticationSchemes gets a reference to the given []IamScheme and assigns it to the AuthenticationSchemes field.
func (o *IamConfig) SetAuthenticationSchemes(v []IamScheme) {
o.AuthenticationSchemes = v
}
// GetBulk returns the Bulk field value if set, zero value otherwise.
func (o *IamConfig) GetBulk() IamBulk {
if o == nil || IsNil(o.Bulk) {
var ret IamBulk
return ret
}
return *o.Bulk
}
// GetBulkOk returns a tuple with the Bulk field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamConfig) GetBulkOk() (*IamBulk, bool) {
if o == nil || IsNil(o.Bulk) {
return nil, false
}
return o.Bulk, true
}
// HasBulk returns a boolean if a field has been set.
func (o *IamConfig) HasBulk() bool {
if o != nil && !IsNil(o.Bulk) {
return true
}
return false
}
// SetBulk gets a reference to the given IamBulk and assigns it to the Bulk field.
func (o *IamConfig) SetBulk(v IamBulk) {
o.Bulk = &v
}
// GetChangePassword returns the ChangePassword field value if set, zero value otherwise.
func (o *IamConfig) GetChangePassword() IamToggle {
if o == nil || IsNil(o.ChangePassword) {
var ret IamToggle
return ret
}
return *o.ChangePassword
}
// GetChangePasswordOk returns a tuple with the ChangePassword field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamConfig) GetChangePasswordOk() (*IamToggle, bool) {
if o == nil || IsNil(o.ChangePassword) {
return nil, false
}
return o.ChangePassword, true
}
// HasChangePassword returns a boolean if a field has been set.
func (o *IamConfig) HasChangePassword() bool {
if o != nil && !IsNil(o.ChangePassword) {
return true
}
return false
}
// SetChangePassword gets a reference to the given IamToggle and assigns it to the ChangePassword field.
func (o *IamConfig) SetChangePassword(v IamToggle) {
o.ChangePassword = &v
}
// GetDocumentationUri returns the DocumentationUri field value if set, zero value otherwise.
func (o *IamConfig) GetDocumentationUri() string {
if o == nil || IsNil(o.DocumentationUri) {
var ret string
return ret
}
return *o.DocumentationUri
}
// GetDocumentationUriOk returns a tuple with the DocumentationUri field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamConfig) GetDocumentationUriOk() (*string, bool) {
if o == nil || IsNil(o.DocumentationUri) {
return nil, false
}
return o.DocumentationUri, true
}
// HasDocumentationUri returns a boolean if a field has been set.
func (o *IamConfig) HasDocumentationUri() bool {
if o != nil && !IsNil(o.DocumentationUri) {
return true
}
return false
}
// SetDocumentationUri gets a reference to the given string and assigns it to the DocumentationUri field.
func (o *IamConfig) SetDocumentationUri(v string) {
o.DocumentationUri = &v
}
// GetEtag returns the Etag field value if set, zero value otherwise.
func (o *IamConfig) GetEtag() IamToggle {
if o == nil || IsNil(o.Etag) {
var ret IamToggle
return ret
}
return *o.Etag
}
// GetEtagOk returns a tuple with the Etag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamConfig) GetEtagOk() (*IamToggle, bool) {
if o == nil || IsNil(o.Etag) {
return nil, false
}
return o.Etag, true
}
// HasEtag returns a boolean if a field has been set.
func (o *IamConfig) HasEtag() bool {
if o != nil && !IsNil(o.Etag) {
return true
}
return false
}
// SetEtag gets a reference to the given IamToggle and assigns it to the Etag field.
func (o *IamConfig) SetEtag(v IamToggle) {
o.Etag = &v
}
// GetFilter returns the Filter field value if set, zero value otherwise.
func (o *IamConfig) GetFilter() IamFilter {
if o == nil || IsNil(o.Filter) {
var ret IamFilter
return ret
}
return *o.Filter
}
// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamConfig) GetFilterOk() (*IamFilter, bool) {
if o == nil || IsNil(o.Filter) {
return nil, false
}
return o.Filter, true
}
// HasFilter returns a boolean if a field has been set.
func (o *IamConfig) HasFilter() bool {
if o != nil && !IsNil(o.Filter) {
return true
}
return false
}
// SetFilter gets a reference to the given IamFilter and assigns it to the Filter field.
func (o *IamConfig) SetFilter(v IamFilter) {
o.Filter = &v
}
// GetPatch returns the Patch field value if set, zero value otherwise.
func (o *IamConfig) GetPatch() IamToggle {
if o == nil || IsNil(o.Patch) {
var ret IamToggle
return ret
}
return *o.Patch
}
// GetPatchOk returns a tuple with the Patch field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamConfig) GetPatchOk() (*IamToggle, bool) {
if o == nil || IsNil(o.Patch) {
return nil, false
}
return o.Patch, true
}
// HasPatch returns a boolean if a field has been set.
func (o *IamConfig) HasPatch() bool {
if o != nil && !IsNil(o.Patch) {
return true
}
return false
}
// SetPatch gets a reference to the given IamToggle and assigns it to the Patch field.
func (o *IamConfig) SetPatch(v IamToggle) {
o.Patch = &v
}
// GetSchemas returns the Schemas field value if set, zero value otherwise.
func (o *IamConfig) GetSchemas() []string {
if o == nil || IsNil(o.Schemas) {
var ret []string
return ret
}
return o.Schemas
}
// GetSchemasOk returns a tuple with the Schemas field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamConfig) GetSchemasOk() ([]string, bool) {
if o == nil || IsNil(o.Schemas) {
return nil, false
}
return o.Schemas, true
}
// HasSchemas returns a boolean if a field has been set.
func (o *IamConfig) HasSchemas() bool {
if o != nil && !IsNil(o.Schemas) {
return true
}
return false
}
// SetSchemas gets a reference to the given []string and assigns it to the Schemas field.
func (o *IamConfig) SetSchemas(v []string) {
o.Schemas = v
}
// GetSort returns the Sort field value if set, zero value otherwise.
func (o *IamConfig) GetSort() IamToggle {
if o == nil || IsNil(o.Sort) {
var ret IamToggle
return ret
}
return *o.Sort
}
// GetSortOk returns a tuple with the Sort field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamConfig) GetSortOk() (*IamToggle, bool) {
if o == nil || IsNil(o.Sort) {
return nil, false
}
return o.Sort, true
}
// HasSort returns a boolean if a field has been set.
func (o *IamConfig) HasSort() bool {
if o != nil && !IsNil(o.Sort) {
return true
}
return false
}
// SetSort gets a reference to the given IamToggle and assigns it to the Sort field.
func (o *IamConfig) SetSort(v IamToggle) {
o.Sort = &v
}
func (o IamConfig) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o IamConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AuthenticationSchemes) {
toSerialize["authenticationSchemes"] = o.AuthenticationSchemes
}
if !IsNil(o.Bulk) {
toSerialize["bulk"] = o.Bulk
}
if !IsNil(o.ChangePassword) {
toSerialize["changePassword"] = o.ChangePassword
}
if !IsNil(o.DocumentationUri) {
toSerialize["documentationUri"] = o.DocumentationUri
}
if !IsNil(o.Etag) {
toSerialize["etag"] = o.Etag
}
if !IsNil(o.Filter) {
toSerialize["filter"] = o.Filter
}
if !IsNil(o.Patch) {
toSerialize["patch"] = o.Patch
}
if !IsNil(o.Schemas) {
toSerialize["schemas"] = o.Schemas
}
if !IsNil(o.Sort) {
toSerialize["sort"] = o.Sort
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *IamConfig) UnmarshalJSON(data []byte) (err error) {
varIamConfig := _IamConfig{}
err = json.Unmarshal(data, &varIamConfig)
if err != nil {
return err
}
*o = IamConfig(varIamConfig)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "authenticationSchemes")
delete(additionalProperties, "bulk")
delete(additionalProperties, "changePassword")
delete(additionalProperties, "documentationUri")
delete(additionalProperties, "etag")
delete(additionalProperties, "filter")
delete(additionalProperties, "patch")
delete(additionalProperties, "schemas")
delete(additionalProperties, "sort")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableIamConfig struct {
value *IamConfig
isSet bool
}
func (v NullableIamConfig) Get() *IamConfig {
return v.value
}
func (v *NullableIamConfig) Set(val *IamConfig) {
v.value = val
v.isSet = true
}
func (v NullableIamConfig) IsSet() bool {
return v.isSet
}
func (v *NullableIamConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIamConfig(val *IamConfig) *NullableIamConfig {
return &NullableIamConfig{value: val, isSet: true}
}
func (v NullableIamConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIamConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}