mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
3.9 KiB
Go
155 lines
3.9 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 AgentAgentList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentAgentList{}
|
|
|
|
// AgentAgentList struct for AgentAgentList
|
|
type AgentAgentList struct {
|
|
// Agents is the org's agents, each carrying its recorded run count.
|
|
Agents []AgentAgentView `json:"agents,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentAgentList AgentAgentList
|
|
|
|
// NewAgentAgentList instantiates a new AgentAgentList 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 NewAgentAgentList() *AgentAgentList {
|
|
this := AgentAgentList{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentAgentListWithDefaults instantiates a new AgentAgentList 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 NewAgentAgentListWithDefaults() *AgentAgentList {
|
|
this := AgentAgentList{}
|
|
return &this
|
|
}
|
|
|
|
// GetAgents returns the Agents field value if set, zero value otherwise.
|
|
func (o *AgentAgentList) GetAgents() []AgentAgentView {
|
|
if o == nil || IsNil(o.Agents) {
|
|
var ret []AgentAgentView
|
|
return ret
|
|
}
|
|
return o.Agents
|
|
}
|
|
|
|
// GetAgentsOk returns a tuple with the Agents field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentList) GetAgentsOk() ([]AgentAgentView, bool) {
|
|
if o == nil || IsNil(o.Agents) {
|
|
return nil, false
|
|
}
|
|
return o.Agents, true
|
|
}
|
|
|
|
// HasAgents returns a boolean if a field has been set.
|
|
func (o *AgentAgentList) HasAgents() bool {
|
|
if o != nil && !IsNil(o.Agents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAgents gets a reference to the given []AgentAgentView and assigns it to the Agents field.
|
|
func (o *AgentAgentList) SetAgents(v []AgentAgentView) {
|
|
o.Agents = v
|
|
}
|
|
|
|
func (o AgentAgentList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentAgentList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Agents) {
|
|
toSerialize["agents"] = o.Agents
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentAgentList) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentAgentList := _AgentAgentList{}
|
|
|
|
err = json.Unmarshal(data, &varAgentAgentList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentAgentList(varAgentAgentList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "agents")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentAgentList struct {
|
|
value *AgentAgentList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentAgentList) Get() *AgentAgentList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentAgentList) Set(val *AgentAgentList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentAgentList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentAgentList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentAgentList(val *AgentAgentList) *NullableAgentAgentList {
|
|
return &NullableAgentAgentList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentAgentList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentAgentList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|