Files
sdk/model_iam_keys_list_response.go

154 lines
4.0 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 IamKeysListResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IamKeysListResponse{}
// IamKeysListResponse struct for IamKeysListResponse
type IamKeysListResponse struct {
Keys []IamKey `json:"keys,omitempty"`
AdditionalProperties map[string]interface{}
}
type _IamKeysListResponse IamKeysListResponse
// NewIamKeysListResponse instantiates a new IamKeysListResponse 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 NewIamKeysListResponse() *IamKeysListResponse {
this := IamKeysListResponse{}
return &this
}
// NewIamKeysListResponseWithDefaults instantiates a new IamKeysListResponse 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 NewIamKeysListResponseWithDefaults() *IamKeysListResponse {
this := IamKeysListResponse{}
return &this
}
// GetKeys returns the Keys field value if set, zero value otherwise.
func (o *IamKeysListResponse) GetKeys() []IamKey {
if o == nil || IsNil(o.Keys) {
var ret []IamKey
return ret
}
return o.Keys
}
// GetKeysOk returns a tuple with the Keys field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamKeysListResponse) GetKeysOk() ([]IamKey, bool) {
if o == nil || IsNil(o.Keys) {
return nil, false
}
return o.Keys, true
}
// HasKeys returns a boolean if a field has been set.
func (o *IamKeysListResponse) HasKeys() bool {
if o != nil && !IsNil(o.Keys) {
return true
}
return false
}
// SetKeys gets a reference to the given []IamKey and assigns it to the Keys field.
func (o *IamKeysListResponse) SetKeys(v []IamKey) {
o.Keys = v
}
func (o IamKeysListResponse) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o IamKeysListResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Keys) {
toSerialize["keys"] = o.Keys
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *IamKeysListResponse) UnmarshalJSON(data []byte) (err error) {
varIamKeysListResponse := _IamKeysListResponse{}
err = json.Unmarshal(data, &varIamKeysListResponse)
if err != nil {
return err
}
*o = IamKeysListResponse(varIamKeysListResponse)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "keys")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableIamKeysListResponse struct {
value *IamKeysListResponse
isSet bool
}
func (v NullableIamKeysListResponse) Get() *IamKeysListResponse {
return v.value
}
func (v *NullableIamKeysListResponse) Set(val *IamKeysListResponse) {
v.value = val
v.isSet = true
}
func (v NullableIamKeysListResponse) IsSet() bool {
return v.isSet
}
func (v *NullableIamKeysListResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIamKeysListResponse(val *IamKeysListResponse) *NullableIamKeysListResponse {
return &NullableIamKeysListResponse{value: val, isSet: true}
}
func (v NullableIamKeysListResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIamKeysListResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}