mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
191 lines
4.7 KiB
Go
191 lines
4.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 IamFilter type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamFilter{}
|
|
|
|
// IamFilter struct for IamFilter
|
|
type IamFilter struct {
|
|
MaxResults *int64 `json:"maxResults,omitempty"`
|
|
Supported *bool `json:"supported,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamFilter IamFilter
|
|
|
|
// NewIamFilter instantiates a new IamFilter 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 NewIamFilter() *IamFilter {
|
|
this := IamFilter{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamFilterWithDefaults instantiates a new IamFilter 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 NewIamFilterWithDefaults() *IamFilter {
|
|
this := IamFilter{}
|
|
return &this
|
|
}
|
|
|
|
// GetMaxResults returns the MaxResults field value if set, zero value otherwise.
|
|
func (o *IamFilter) GetMaxResults() int64 {
|
|
if o == nil || IsNil(o.MaxResults) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.MaxResults
|
|
}
|
|
|
|
// GetMaxResultsOk returns a tuple with the MaxResults field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamFilter) GetMaxResultsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.MaxResults) {
|
|
return nil, false
|
|
}
|
|
return o.MaxResults, true
|
|
}
|
|
|
|
// HasMaxResults returns a boolean if a field has been set.
|
|
func (o *IamFilter) HasMaxResults() bool {
|
|
if o != nil && !IsNil(o.MaxResults) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMaxResults gets a reference to the given int64 and assigns it to the MaxResults field.
|
|
func (o *IamFilter) SetMaxResults(v int64) {
|
|
o.MaxResults = &v
|
|
}
|
|
|
|
// GetSupported returns the Supported field value if set, zero value otherwise.
|
|
func (o *IamFilter) GetSupported() bool {
|
|
if o == nil || IsNil(o.Supported) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Supported
|
|
}
|
|
|
|
// GetSupportedOk returns a tuple with the Supported field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamFilter) GetSupportedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Supported) {
|
|
return nil, false
|
|
}
|
|
return o.Supported, true
|
|
}
|
|
|
|
// HasSupported returns a boolean if a field has been set.
|
|
func (o *IamFilter) HasSupported() bool {
|
|
if o != nil && !IsNil(o.Supported) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSupported gets a reference to the given bool and assigns it to the Supported field.
|
|
func (o *IamFilter) SetSupported(v bool) {
|
|
o.Supported = &v
|
|
}
|
|
|
|
func (o IamFilter) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamFilter) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.MaxResults) {
|
|
toSerialize["maxResults"] = o.MaxResults
|
|
}
|
|
if !IsNil(o.Supported) {
|
|
toSerialize["supported"] = o.Supported
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamFilter) UnmarshalJSON(data []byte) (err error) {
|
|
varIamFilter := _IamFilter{}
|
|
|
|
err = json.Unmarshal(data, &varIamFilter)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamFilter(varIamFilter)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "maxResults")
|
|
delete(additionalProperties, "supported")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamFilter struct {
|
|
value *IamFilter
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamFilter) Get() *IamFilter {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamFilter) Set(val *IamFilter) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamFilter) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamFilter) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamFilter(val *IamFilter) *NullableIamFilter {
|
|
return &NullableIamFilter{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamFilter) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamFilter) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|