Files
sdk/model_team_team_channels.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 TeamTeamChannels type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamTeamChannels{}
// TeamTeamChannels struct for TeamTeamChannels
type TeamTeamChannels struct {
// Channels is every channel of every space the caller's org owns, each with the work facet it carries.
Channels []TeamTeamChannel `json:"channels,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamTeamChannels TeamTeamChannels
// NewTeamTeamChannels instantiates a new TeamTeamChannels 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 NewTeamTeamChannels() *TeamTeamChannels {
this := TeamTeamChannels{}
return &this
}
// NewTeamTeamChannelsWithDefaults instantiates a new TeamTeamChannels 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 NewTeamTeamChannelsWithDefaults() *TeamTeamChannels {
this := TeamTeamChannels{}
return &this
}
// GetChannels returns the Channels field value if set, zero value otherwise.
func (o *TeamTeamChannels) GetChannels() []TeamTeamChannel {
if o == nil || IsNil(o.Channels) {
var ret []TeamTeamChannel
return ret
}
return o.Channels
}
// GetChannelsOk returns a tuple with the Channels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamTeamChannels) GetChannelsOk() ([]TeamTeamChannel, bool) {
if o == nil || IsNil(o.Channels) {
return nil, false
}
return o.Channels, true
}
// HasChannels returns a boolean if a field has been set.
func (o *TeamTeamChannels) HasChannels() bool {
if o != nil && !IsNil(o.Channels) {
return true
}
return false
}
// SetChannels gets a reference to the given []TeamTeamChannel and assigns it to the Channels field.
func (o *TeamTeamChannels) SetChannels(v []TeamTeamChannel) {
o.Channels = v
}
func (o TeamTeamChannels) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamTeamChannels) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Channels) {
toSerialize["channels"] = o.Channels
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TeamTeamChannels) UnmarshalJSON(data []byte) (err error) {
varTeamTeamChannels := _TeamTeamChannels{}
err = json.Unmarshal(data, &varTeamTeamChannels)
if err != nil {
return err
}
*o = TeamTeamChannels(varTeamTeamChannels)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "channels")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamTeamChannels struct {
value *TeamTeamChannels
isSet bool
}
func (v NullableTeamTeamChannels) Get() *TeamTeamChannels {
return v.value
}
func (v *NullableTeamTeamChannels) Set(val *TeamTeamChannels) {
v.value = val
v.isSet = true
}
func (v NullableTeamTeamChannels) IsSet() bool {
return v.isSet
}
func (v *NullableTeamTeamChannels) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamTeamChannels(val *TeamTeamChannels) *NullableTeamTeamChannels {
return &NullableTeamTeamChannels{value: val, isSet: true}
}
func (v NullableTeamTeamChannels) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamTeamChannels) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}