mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
302 lines
8.1 KiB
Go
302 lines
8.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 IamListResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamListResponse{}
|
|
|
|
// IamListResponse struct for IamListResponse
|
|
type IamListResponse struct {
|
|
Resources []interface{} `json:"Resources,omitempty"`
|
|
ItemsPerPage *int64 `json:"itemsPerPage,omitempty"`
|
|
Schemas []string `json:"schemas,omitempty"`
|
|
StartIndex *int64 `json:"startIndex,omitempty"`
|
|
TotalResults *int64 `json:"totalResults,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamListResponse IamListResponse
|
|
|
|
// NewIamListResponse instantiates a new IamListResponse 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 NewIamListResponse() *IamListResponse {
|
|
this := IamListResponse{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamListResponseWithDefaults instantiates a new IamListResponse 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 NewIamListResponseWithDefaults() *IamListResponse {
|
|
this := IamListResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetResources returns the Resources field value if set, zero value otherwise.
|
|
func (o *IamListResponse) GetResources() []interface{} {
|
|
if o == nil || IsNil(o.Resources) {
|
|
var ret []interface{}
|
|
return ret
|
|
}
|
|
return o.Resources
|
|
}
|
|
|
|
// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamListResponse) GetResourcesOk() ([]interface{}, bool) {
|
|
if o == nil || IsNil(o.Resources) {
|
|
return nil, false
|
|
}
|
|
return o.Resources, true
|
|
}
|
|
|
|
// HasResources returns a boolean if a field has been set.
|
|
func (o *IamListResponse) HasResources() bool {
|
|
if o != nil && !IsNil(o.Resources) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResources gets a reference to the given []interface{} and assigns it to the Resources field.
|
|
func (o *IamListResponse) SetResources(v []interface{}) {
|
|
o.Resources = v
|
|
}
|
|
|
|
// GetItemsPerPage returns the ItemsPerPage field value if set, zero value otherwise.
|
|
func (o *IamListResponse) GetItemsPerPage() int64 {
|
|
if o == nil || IsNil(o.ItemsPerPage) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.ItemsPerPage
|
|
}
|
|
|
|
// GetItemsPerPageOk returns a tuple with the ItemsPerPage field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamListResponse) GetItemsPerPageOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.ItemsPerPage) {
|
|
return nil, false
|
|
}
|
|
return o.ItemsPerPage, true
|
|
}
|
|
|
|
// HasItemsPerPage returns a boolean if a field has been set.
|
|
func (o *IamListResponse) HasItemsPerPage() bool {
|
|
if o != nil && !IsNil(o.ItemsPerPage) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetItemsPerPage gets a reference to the given int64 and assigns it to the ItemsPerPage field.
|
|
func (o *IamListResponse) SetItemsPerPage(v int64) {
|
|
o.ItemsPerPage = &v
|
|
}
|
|
|
|
// GetSchemas returns the Schemas field value if set, zero value otherwise.
|
|
func (o *IamListResponse) 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 *IamListResponse) 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 *IamListResponse) 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 *IamListResponse) SetSchemas(v []string) {
|
|
o.Schemas = v
|
|
}
|
|
|
|
// GetStartIndex returns the StartIndex field value if set, zero value otherwise.
|
|
func (o *IamListResponse) GetStartIndex() int64 {
|
|
if o == nil || IsNil(o.StartIndex) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.StartIndex
|
|
}
|
|
|
|
// GetStartIndexOk returns a tuple with the StartIndex field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamListResponse) GetStartIndexOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.StartIndex) {
|
|
return nil, false
|
|
}
|
|
return o.StartIndex, true
|
|
}
|
|
|
|
// HasStartIndex returns a boolean if a field has been set.
|
|
func (o *IamListResponse) HasStartIndex() bool {
|
|
if o != nil && !IsNil(o.StartIndex) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStartIndex gets a reference to the given int64 and assigns it to the StartIndex field.
|
|
func (o *IamListResponse) SetStartIndex(v int64) {
|
|
o.StartIndex = &v
|
|
}
|
|
|
|
// GetTotalResults returns the TotalResults field value if set, zero value otherwise.
|
|
func (o *IamListResponse) GetTotalResults() int64 {
|
|
if o == nil || IsNil(o.TotalResults) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.TotalResults
|
|
}
|
|
|
|
// GetTotalResultsOk returns a tuple with the TotalResults field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamListResponse) GetTotalResultsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.TotalResults) {
|
|
return nil, false
|
|
}
|
|
return o.TotalResults, true
|
|
}
|
|
|
|
// HasTotalResults returns a boolean if a field has been set.
|
|
func (o *IamListResponse) HasTotalResults() bool {
|
|
if o != nil && !IsNil(o.TotalResults) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotalResults gets a reference to the given int64 and assigns it to the TotalResults field.
|
|
func (o *IamListResponse) SetTotalResults(v int64) {
|
|
o.TotalResults = &v
|
|
}
|
|
|
|
func (o IamListResponse) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamListResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Resources) {
|
|
toSerialize["Resources"] = o.Resources
|
|
}
|
|
if !IsNil(o.ItemsPerPage) {
|
|
toSerialize["itemsPerPage"] = o.ItemsPerPage
|
|
}
|
|
if !IsNil(o.Schemas) {
|
|
toSerialize["schemas"] = o.Schemas
|
|
}
|
|
if !IsNil(o.StartIndex) {
|
|
toSerialize["startIndex"] = o.StartIndex
|
|
}
|
|
if !IsNil(o.TotalResults) {
|
|
toSerialize["totalResults"] = o.TotalResults
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamListResponse) UnmarshalJSON(data []byte) (err error) {
|
|
varIamListResponse := _IamListResponse{}
|
|
|
|
err = json.Unmarshal(data, &varIamListResponse)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamListResponse(varIamListResponse)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "Resources")
|
|
delete(additionalProperties, "itemsPerPage")
|
|
delete(additionalProperties, "schemas")
|
|
delete(additionalProperties, "startIndex")
|
|
delete(additionalProperties, "totalResults")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamListResponse struct {
|
|
value *IamListResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamListResponse) Get() *IamListResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamListResponse) Set(val *IamListResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamListResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamListResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamListResponse(val *IamListResponse) *NullableIamListResponse {
|
|
return &NullableIamListResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamListResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamListResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|