Files
sdk/model_bot_bot_roster.go

155 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 BotBotRoster type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BotBotRoster{}
// BotBotRoster struct for BotBotRoster
type BotBotRoster struct {
// Bots is one entry per bot, each carrying the member account uuid and the Person reference the space roster addresses it by. Empty means the org has no bots — not that the roster could not be read, which is an error.
Bots []BotBotMember `json:"bots,omitempty"`
AdditionalProperties map[string]interface{}
}
type _BotBotRoster BotBotRoster
// NewBotBotRoster instantiates a new BotBotRoster 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 NewBotBotRoster() *BotBotRoster {
this := BotBotRoster{}
return &this
}
// NewBotBotRosterWithDefaults instantiates a new BotBotRoster 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 NewBotBotRosterWithDefaults() *BotBotRoster {
this := BotBotRoster{}
return &this
}
// GetBots returns the Bots field value if set, zero value otherwise.
func (o *BotBotRoster) GetBots() []BotBotMember {
if o == nil || IsNil(o.Bots) {
var ret []BotBotMember
return ret
}
return o.Bots
}
// GetBotsOk returns a tuple with the Bots field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BotBotRoster) GetBotsOk() ([]BotBotMember, bool) {
if o == nil || IsNil(o.Bots) {
return nil, false
}
return o.Bots, true
}
// HasBots returns a boolean if a field has been set.
func (o *BotBotRoster) HasBots() bool {
if o != nil && !IsNil(o.Bots) {
return true
}
return false
}
// SetBots gets a reference to the given []BotBotMember and assigns it to the Bots field.
func (o *BotBotRoster) SetBots(v []BotBotMember) {
o.Bots = v
}
func (o BotBotRoster) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BotBotRoster) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Bots) {
toSerialize["bots"] = o.Bots
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *BotBotRoster) UnmarshalJSON(data []byte) (err error) {
varBotBotRoster := _BotBotRoster{}
err = json.Unmarshal(data, &varBotBotRoster)
if err != nil {
return err
}
*o = BotBotRoster(varBotBotRoster)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "bots")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableBotBotRoster struct {
value *BotBotRoster
isSet bool
}
func (v NullableBotBotRoster) Get() *BotBotRoster {
return v.value
}
func (v *NullableBotBotRoster) Set(val *BotBotRoster) {
v.value = val
v.isSet = true
}
func (v NullableBotBotRoster) IsSet() bool {
return v.isSet
}
func (v *NullableBotBotRoster) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBotBotRoster(val *BotBotRoster) *NullableBotBotRoster {
return &NullableBotBotRoster{value: val, isSet: true}
}
func (v NullableBotBotRoster) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBotBotRoster) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}