Files
sdk/model_platform_cd_resp.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 PlatformCdResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlatformCdResp{}
// PlatformCdResp struct for PlatformCdResp
type PlatformCdResp struct {
Applications []PlatformCDApp `json:"applications,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PlatformCdResp PlatformCdResp
// NewPlatformCdResp instantiates a new PlatformCdResp 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 NewPlatformCdResp() *PlatformCdResp {
this := PlatformCdResp{}
return &this
}
// NewPlatformCdRespWithDefaults instantiates a new PlatformCdResp 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 NewPlatformCdRespWithDefaults() *PlatformCdResp {
this := PlatformCdResp{}
return &this
}
// GetApplications returns the Applications field value if set, zero value otherwise.
func (o *PlatformCdResp) GetApplications() []PlatformCDApp {
if o == nil || IsNil(o.Applications) {
var ret []PlatformCDApp
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 *PlatformCdResp) GetApplicationsOk() ([]PlatformCDApp, 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 *PlatformCdResp) HasApplications() bool {
if o != nil && !IsNil(o.Applications) {
return true
}
return false
}
// SetApplications gets a reference to the given []PlatformCDApp and assigns it to the Applications field.
func (o *PlatformCdResp) SetApplications(v []PlatformCDApp) {
o.Applications = v
}
func (o PlatformCdResp) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlatformCdResp) 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 *PlatformCdResp) UnmarshalJSON(data []byte) (err error) {
varPlatformCdResp := _PlatformCdResp{}
err = json.Unmarshal(data, &varPlatformCdResp)
if err != nil {
return err
}
*o = PlatformCdResp(varPlatformCdResp)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "applications")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePlatformCdResp struct {
value *PlatformCdResp
isSet bool
}
func (v NullablePlatformCdResp) Get() *PlatformCdResp {
return v.value
}
func (v *NullablePlatformCdResp) Set(val *PlatformCdResp) {
v.value = val
v.isSet = true
}
func (v NullablePlatformCdResp) IsSet() bool {
return v.isSet
}
func (v *NullablePlatformCdResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlatformCdResp(val *PlatformCdResp) *NullablePlatformCdResp {
return &NullablePlatformCdResp{value: val, isSet: true}
}
func (v NullablePlatformCdResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlatformCdResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}