mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
154 lines
4.4 KiB
Go
154 lines
4.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 IamApplicationListResult type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamApplicationListResult{}
|
|
|
|
// IamApplicationListResult struct for IamApplicationListResult
|
|
type IamApplicationListResult struct {
|
|
Applications []IamApplication `json:"applications,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamApplicationListResult IamApplicationListResult
|
|
|
|
// NewIamApplicationListResult instantiates a new IamApplicationListResult 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 NewIamApplicationListResult() *IamApplicationListResult {
|
|
this := IamApplicationListResult{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamApplicationListResultWithDefaults instantiates a new IamApplicationListResult 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 NewIamApplicationListResultWithDefaults() *IamApplicationListResult {
|
|
this := IamApplicationListResult{}
|
|
return &this
|
|
}
|
|
|
|
// GetApplications returns the Applications field value if set, zero value otherwise.
|
|
func (o *IamApplicationListResult) GetApplications() []IamApplication {
|
|
if o == nil || IsNil(o.Applications) {
|
|
var ret []IamApplication
|
|
return ret
|
|
}
|
|
return o.Applications
|
|
}
|
|
|
|
// GetApplicationsOk returns a tuple with the Applications field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamApplicationListResult) GetApplicationsOk() ([]IamApplication, bool) {
|
|
if o == nil || IsNil(o.Applications) {
|
|
return nil, false
|
|
}
|
|
return o.Applications, true
|
|
}
|
|
|
|
// HasApplications returns a boolean if a field has been set.
|
|
func (o *IamApplicationListResult) HasApplications() bool {
|
|
if o != nil && !IsNil(o.Applications) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetApplications gets a reference to the given []IamApplication and assigns it to the Applications field.
|
|
func (o *IamApplicationListResult) SetApplications(v []IamApplication) {
|
|
o.Applications = v
|
|
}
|
|
|
|
func (o IamApplicationListResult) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamApplicationListResult) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Applications) {
|
|
toSerialize["applications"] = o.Applications
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamApplicationListResult) UnmarshalJSON(data []byte) (err error) {
|
|
varIamApplicationListResult := _IamApplicationListResult{}
|
|
|
|
err = json.Unmarshal(data, &varIamApplicationListResult)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamApplicationListResult(varIamApplicationListResult)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "applications")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamApplicationListResult struct {
|
|
value *IamApplicationListResult
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamApplicationListResult) Get() *IamApplicationListResult {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamApplicationListResult) Set(val *IamApplicationListResult) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamApplicationListResult) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamApplicationListResult) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamApplicationListResult(val *IamApplicationListResult) *NullableIamApplicationListResult {
|
|
return &NullableIamApplicationListResult{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamApplicationListResult) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamApplicationListResult) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|