Files
sdk/model_social_org_apps_write.go

155 lines
4.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 SocialOrgAppsWrite type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SocialOrgAppsWrite{}
// SocialOrgAppsWrite struct for SocialOrgAppsWrite
type SocialOrgAppsWrite struct {
// Apps are the networks the caller is changing. The rest stay as they are.
Apps []SocialOrgAppWrite `json:"apps,omitempty"`
AdditionalProperties map[string]interface{}
}
type _SocialOrgAppsWrite SocialOrgAppsWrite
// NewSocialOrgAppsWrite instantiates a new SocialOrgAppsWrite 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 NewSocialOrgAppsWrite() *SocialOrgAppsWrite {
this := SocialOrgAppsWrite{}
return &this
}
// NewSocialOrgAppsWriteWithDefaults instantiates a new SocialOrgAppsWrite 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 NewSocialOrgAppsWriteWithDefaults() *SocialOrgAppsWrite {
this := SocialOrgAppsWrite{}
return &this
}
// GetApps returns the Apps field value if set, zero value otherwise.
func (o *SocialOrgAppsWrite) GetApps() []SocialOrgAppWrite {
if o == nil || IsNil(o.Apps) {
var ret []SocialOrgAppWrite
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 *SocialOrgAppsWrite) GetAppsOk() ([]SocialOrgAppWrite, 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 *SocialOrgAppsWrite) HasApps() bool {
if o != nil && !IsNil(o.Apps) {
return true
}
return false
}
// SetApps gets a reference to the given []SocialOrgAppWrite and assigns it to the Apps field.
func (o *SocialOrgAppsWrite) SetApps(v []SocialOrgAppWrite) {
o.Apps = v
}
func (o SocialOrgAppsWrite) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SocialOrgAppsWrite) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Apps) {
toSerialize["apps"] = o.Apps
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *SocialOrgAppsWrite) UnmarshalJSON(data []byte) (err error) {
varSocialOrgAppsWrite := _SocialOrgAppsWrite{}
err = json.Unmarshal(data, &varSocialOrgAppsWrite)
if err != nil {
return err
}
*o = SocialOrgAppsWrite(varSocialOrgAppsWrite)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "apps")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableSocialOrgAppsWrite struct {
value *SocialOrgAppsWrite
isSet bool
}
func (v NullableSocialOrgAppsWrite) Get() *SocialOrgAppsWrite {
return v.value
}
func (v *NullableSocialOrgAppsWrite) Set(val *SocialOrgAppsWrite) {
v.value = val
v.isSet = true
}
func (v NullableSocialOrgAppsWrite) IsSet() bool {
return v.isSet
}
func (v *NullableSocialOrgAppsWrite) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSocialOrgAppsWrite(val *SocialOrgAppsWrite) *NullableSocialOrgAppsWrite {
return &NullableSocialOrgAppsWrite{value: val, isSet: true}
}
func (v NullableSocialOrgAppsWrite) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSocialOrgAppsWrite) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}