Files
sdk/model_platform_declared_resp.go

267 lines
7.5 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 PlatformDeclaredResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlatformDeclaredResp{}
// PlatformDeclaredResp struct for PlatformDeclaredResp
type PlatformDeclaredResp struct {
Apps []PlatformDeclared `json:"apps,omitempty"`
CdUnavailable *PlatformUnreadable `json:"cdUnavailable,omitempty"`
// Org is the directory read — the caller's own, or another when a SuperAdmin asked to act as it.
Org *string `json:"org,omitempty"`
// Unreadable are the org's values files that do not parse, so they are not among apps. Absent when every file parsed.
Unreadable []PlatformUnreadableFile `json:"unreadable,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PlatformDeclaredResp PlatformDeclaredResp
// NewPlatformDeclaredResp instantiates a new PlatformDeclaredResp 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 NewPlatformDeclaredResp() *PlatformDeclaredResp {
this := PlatformDeclaredResp{}
return &this
}
// NewPlatformDeclaredRespWithDefaults instantiates a new PlatformDeclaredResp 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 NewPlatformDeclaredRespWithDefaults() *PlatformDeclaredResp {
this := PlatformDeclaredResp{}
return &this
}
// GetApps returns the Apps field value if set, zero value otherwise.
func (o *PlatformDeclaredResp) GetApps() []PlatformDeclared {
if o == nil || IsNil(o.Apps) {
var ret []PlatformDeclared
return ret
}
return o.Apps
}
// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDeclaredResp) GetAppsOk() ([]PlatformDeclared, bool) {
if o == nil || IsNil(o.Apps) {
return nil, false
}
return o.Apps, true
}
// HasApps returns a boolean if a field has been set.
func (o *PlatformDeclaredResp) HasApps() bool {
if o != nil && !IsNil(o.Apps) {
return true
}
return false
}
// SetApps gets a reference to the given []PlatformDeclared and assigns it to the Apps field.
func (o *PlatformDeclaredResp) SetApps(v []PlatformDeclared) {
o.Apps = v
}
// GetCdUnavailable returns the CdUnavailable field value if set, zero value otherwise.
func (o *PlatformDeclaredResp) GetCdUnavailable() PlatformUnreadable {
if o == nil || IsNil(o.CdUnavailable) {
var ret PlatformUnreadable
return ret
}
return *o.CdUnavailable
}
// GetCdUnavailableOk returns a tuple with the CdUnavailable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDeclaredResp) GetCdUnavailableOk() (*PlatformUnreadable, bool) {
if o == nil || IsNil(o.CdUnavailable) {
return nil, false
}
return o.CdUnavailable, true
}
// HasCdUnavailable returns a boolean if a field has been set.
func (o *PlatformDeclaredResp) HasCdUnavailable() bool {
if o != nil && !IsNil(o.CdUnavailable) {
return true
}
return false
}
// SetCdUnavailable gets a reference to the given PlatformUnreadable and assigns it to the CdUnavailable field.
func (o *PlatformDeclaredResp) SetCdUnavailable(v PlatformUnreadable) {
o.CdUnavailable = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *PlatformDeclaredResp) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDeclaredResp) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *PlatformDeclaredResp) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *PlatformDeclaredResp) SetOrg(v string) {
o.Org = &v
}
// GetUnreadable returns the Unreadable field value if set, zero value otherwise.
func (o *PlatformDeclaredResp) GetUnreadable() []PlatformUnreadableFile {
if o == nil || IsNil(o.Unreadable) {
var ret []PlatformUnreadableFile
return ret
}
return o.Unreadable
}
// GetUnreadableOk returns a tuple with the Unreadable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformDeclaredResp) GetUnreadableOk() ([]PlatformUnreadableFile, bool) {
if o == nil || IsNil(o.Unreadable) {
return nil, false
}
return o.Unreadable, true
}
// HasUnreadable returns a boolean if a field has been set.
func (o *PlatformDeclaredResp) HasUnreadable() bool {
if o != nil && !IsNil(o.Unreadable) {
return true
}
return false
}
// SetUnreadable gets a reference to the given []PlatformUnreadableFile and assigns it to the Unreadable field.
func (o *PlatformDeclaredResp) SetUnreadable(v []PlatformUnreadableFile) {
o.Unreadable = v
}
func (o PlatformDeclaredResp) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PlatformDeclaredResp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Apps) {
toSerialize["apps"] = o.Apps
}
if !IsNil(o.CdUnavailable) {
toSerialize["cdUnavailable"] = o.CdUnavailable
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Unreadable) {
toSerialize["unreadable"] = o.Unreadable
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PlatformDeclaredResp) UnmarshalJSON(data []byte) (err error) {
varPlatformDeclaredResp := _PlatformDeclaredResp{}
err = json.Unmarshal(data, &varPlatformDeclaredResp)
if err != nil {
return err
}
*o = PlatformDeclaredResp(varPlatformDeclaredResp)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "apps")
delete(additionalProperties, "cdUnavailable")
delete(additionalProperties, "org")
delete(additionalProperties, "unreadable")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePlatformDeclaredResp struct {
value *PlatformDeclaredResp
isSet bool
}
func (v NullablePlatformDeclaredResp) Get() *PlatformDeclaredResp {
return v.value
}
func (v *NullablePlatformDeclaredResp) Set(val *PlatformDeclaredResp) {
v.value = val
v.isSet = true
}
func (v NullablePlatformDeclaredResp) IsSet() bool {
return v.isSet
}
func (v *NullablePlatformDeclaredResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlatformDeclaredResp(val *PlatformDeclaredResp) *NullablePlatformDeclaredResp {
return &NullablePlatformDeclaredResp{value: val, isSet: true}
}
func (v NullablePlatformDeclaredResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlatformDeclaredResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}