mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
3.7 KiB
Go
155 lines
3.7 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 BotBotRuns type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BotBotRuns{}
|
|
|
|
// BotBotRuns struct for BotBotRuns
|
|
type BotBotRuns struct {
|
|
// Bots is the org's live runs. Always an array, never null.
|
|
Bots []BotBotRun `json:"bots,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BotBotRuns BotBotRuns
|
|
|
|
// NewBotBotRuns instantiates a new BotBotRuns 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 NewBotBotRuns() *BotBotRuns {
|
|
this := BotBotRuns{}
|
|
return &this
|
|
}
|
|
|
|
// NewBotBotRunsWithDefaults instantiates a new BotBotRuns 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 NewBotBotRunsWithDefaults() *BotBotRuns {
|
|
this := BotBotRuns{}
|
|
return &this
|
|
}
|
|
|
|
// GetBots returns the Bots field value if set, zero value otherwise.
|
|
func (o *BotBotRuns) GetBots() []BotBotRun {
|
|
if o == nil || IsNil(o.Bots) {
|
|
var ret []BotBotRun
|
|
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 *BotBotRuns) GetBotsOk() ([]BotBotRun, 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 *BotBotRuns) HasBots() bool {
|
|
if o != nil && !IsNil(o.Bots) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBots gets a reference to the given []BotBotRun and assigns it to the Bots field.
|
|
func (o *BotBotRuns) SetBots(v []BotBotRun) {
|
|
o.Bots = v
|
|
}
|
|
|
|
func (o BotBotRuns) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BotBotRuns) 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 *BotBotRuns) UnmarshalJSON(data []byte) (err error) {
|
|
varBotBotRuns := _BotBotRuns{}
|
|
|
|
err = json.Unmarshal(data, &varBotBotRuns)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BotBotRuns(varBotBotRuns)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "bots")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBotBotRuns struct {
|
|
value *BotBotRuns
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBotBotRuns) Get() *BotBotRuns {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBotBotRuns) Set(val *BotBotRuns) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBotBotRuns) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBotBotRuns) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBotBotRuns(val *BotBotRuns) *NullableBotBotRuns {
|
|
return &NullableBotBotRuns{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBotBotRuns) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBotBotRuns) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|