mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
3.8 KiB
Go
155 lines
3.8 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 AgentRunList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentRunList{}
|
|
|
|
// AgentRunList struct for AgentRunList
|
|
type AgentRunList struct {
|
|
// Runs is the agent's executions, newest first.
|
|
Runs []AgentAgentRunView `json:"runs,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentRunList AgentRunList
|
|
|
|
// NewAgentRunList instantiates a new AgentRunList 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 NewAgentRunList() *AgentRunList {
|
|
this := AgentRunList{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentRunListWithDefaults instantiates a new AgentRunList 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 NewAgentRunListWithDefaults() *AgentRunList {
|
|
this := AgentRunList{}
|
|
return &this
|
|
}
|
|
|
|
// GetRuns returns the Runs field value if set, zero value otherwise.
|
|
func (o *AgentRunList) GetRuns() []AgentAgentRunView {
|
|
if o == nil || IsNil(o.Runs) {
|
|
var ret []AgentAgentRunView
|
|
return ret
|
|
}
|
|
return o.Runs
|
|
}
|
|
|
|
// GetRunsOk returns a tuple with the Runs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRunList) GetRunsOk() ([]AgentAgentRunView, bool) {
|
|
if o == nil || IsNil(o.Runs) {
|
|
return nil, false
|
|
}
|
|
return o.Runs, true
|
|
}
|
|
|
|
// HasRuns returns a boolean if a field has been set.
|
|
func (o *AgentRunList) HasRuns() bool {
|
|
if o != nil && !IsNil(o.Runs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRuns gets a reference to the given []AgentAgentRunView and assigns it to the Runs field.
|
|
func (o *AgentRunList) SetRuns(v []AgentAgentRunView) {
|
|
o.Runs = v
|
|
}
|
|
|
|
func (o AgentRunList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentRunList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Runs) {
|
|
toSerialize["runs"] = o.Runs
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentRunList) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentRunList := _AgentRunList{}
|
|
|
|
err = json.Unmarshal(data, &varAgentRunList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentRunList(varAgentRunList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "runs")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentRunList struct {
|
|
value *AgentRunList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentRunList) Get() *AgentRunList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentRunList) Set(val *AgentRunList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentRunList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentRunList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentRunList(val *AgentRunList) *NullableAgentRunList {
|
|
return &NullableAgentRunList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentRunList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentRunList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|