mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
915 lines
28 KiB
Go
915 lines
28 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 AgentAgentView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentAgentView{}
|
|
|
|
// AgentAgentView struct for AgentAgentView
|
|
type AgentAgentView struct {
|
|
// Avatar is an image the agent is drawn as — a link to one, or the bytes inline as a data URL, up to 96 KiB. Emoji is the one glyph a caller picked when they had no image. At most one is ever set; neither means the agent is drawn as its initial, the same way a person with no photo is. Both are iam/pkg/schema's Mark, so a face means the same thing on an agent as it does on a person or an org. Avatar is the agent's picture: an image URL, or the image itself inline as a data URL up to 96 KiB. Empty when the agent has no image.
|
|
Avatar *string `json:"avatar,omitempty"`
|
|
// CapMicroUSD is the total this agent may spend within one Period, as an integer number of micro-USD (1,000,000 = $1). It is required at creation: a cap of zero would mean no limit and no per-agent spend record at all.
|
|
CapMicroUsd *int64 `json:"cap_micro_usd,omitempty"`
|
|
// ComputeRef is the visor machine this bot is bound to, opaque here: this package stores and echoes it, and the binding's lifecycle belongs elsewhere. Empty means unbound, which is what every one-shot agent is.
|
|
ComputeRef *string `json:"computeRef,omitempty"`
|
|
// ConsumedMicroUSD is what has been spent in the current period, in micro-USD. It is settled from what the gateway reported, not from the quote.
|
|
ConsumedMicroUsd *int64 `json:"consumed_micro_usd,omitempty"`
|
|
// CreatedAt is when the agent was defined, RFC 3339 in UTC to the second.
|
|
CreatedAt *string `json:"createdAt,omitempty"`
|
|
// Description is the one line another agent reads when deciding whether to call this one: the tool catalogue publishes it as the description of `agent_<name>`, falling back to \"agent <name>\" when it is empty. It is not part of the prompt — Instructions is — so writing the behaviour here reaches the caller and not the model.
|
|
Description *string `json:"description,omitempty"`
|
|
// Emoji is the single glyph a caller picked when they had no image. At most one of avatar and emoji is ever set; neither means the agent is drawn as its initial, the same way a person with no photo is.
|
|
Emoji *string `json:"emoji,omitempty"`
|
|
// ExecutionMode is one-shot or long-running, and it decides who may start this agent. one-shot runs only when something POSTs to it; long-running is additionally invoked by the scheduler on Schedule, once a minute against the cron. An org's long-running agents are capped, so a switch INTO it can be refused with 409.
|
|
ExecutionMode *string `json:"executionMode,omitempty"`
|
|
// ID is the agent's stable handle, minted here as \"agent_\" + 32 hex characters of crypto/rand. A caller cannot choose it, and it never changes — unlike Name, which is the other way to address the same agent.
|
|
Id *string `json:"id,omitempty"`
|
|
// Lineage is every agent above this one, nearest first — the parent, its parent, and so on to the agent a person defined. All of them are in this org, so the principal this agent answers to is theirs.
|
|
Lineage []string `json:"lineage,omitempty"`
|
|
// MaxTaskMicroUSD is the ceiling for a single run, in micro-USD. A session cannot exceed it even when the period cap still has room, so one runaway task cannot consume a month.
|
|
MaxTaskMicroUsd *int64 `json:"max_task_micro_usd,omitempty"`
|
|
// Model is the Zen model this agent runs on, and it is always OUR name for it: writes normalize through cloud.ZenModel and the read normalizes again, so an upstream family name never leaves here even from a row written before that rule existed. A create that named none took the deployment's configured default, so this is where a caller learns which model it actually got.
|
|
Model *string `json:"model,omitempty"`
|
|
// Name is the agent's org-unique handle, matching ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. It addresses the agent everywhere ID does, it is what a run row records, and it is the suffix of the `agent_<name>` tool other agents call this one by. Set once at create; no update route moves it, because moving it would orphan that history.
|
|
Name *string `json:"name,omitempty"`
|
|
// Parent is the agent that spawned this one; absent for an agent a person defined.
|
|
Parent *string `json:"parent,omitempty"`
|
|
// Period is the window the cap resets on: day, week or month.
|
|
Period *string `json:"period,omitempty"`
|
|
// Runs is how many executions the org has recorded against this agent, counted at read time. The list and update reads count the WHOLE history; the detail read reports the size of the RecentRuns page it carries, which stops at 20 — so a detail row saying 20 means \"at least 20\", not \"exactly 20\".
|
|
Runs *int64 `json:"runs,omitempty"`
|
|
// Schedule is the 5-field cron the scheduler fires a long-running agent on, evaluated once a minute. Required for long-running and DROPPED for one-shot — a one-shot agent's schedule is not stored, so absence here is the mode's answer rather than a value nobody set.
|
|
Schedule *string `json:"schedule,omitempty"`
|
|
// ServiceAccountID is the IAM agent service account (<org>-<agent>) a scheduled run is billed AS. It is what makes an autonomous run attributable to a principal rather than only to the org; empty means the org itself wears the spend.
|
|
ServiceAccountId *string `json:"serviceAccountId,omitempty"`
|
|
// Status is the agent's readiness: \"ready\", or \"retired\" for a built-in whose member has left Hanzo's team. A retired agent is left out of the list and still answers a get by its handle. Server-set; no route accepts it.
|
|
Status *string `json:"status,omitempty"`
|
|
// Tools are the tool names this agent may call, and the list IS the authority: an agent that declares none gets none. The single entry \"*\" means whatever the fleet's MCP server serves at the moment of the run, resolved per run rather than frozen here, which is how the default assistant reaches subsystems that shipped after it was defined. Empty array, never null.
|
|
Tools []string `json:"tools,omitempty"`
|
|
// UpdatedAt is the last time any field above was written, same format. It moves on an update to the DEFINITION and never on a run, so a busy agent nobody has edited keeps an old one.
|
|
UpdatedAt *string `json:"updatedAt,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentAgentView AgentAgentView
|
|
|
|
// NewAgentAgentView instantiates a new AgentAgentView 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 NewAgentAgentView() *AgentAgentView {
|
|
this := AgentAgentView{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentAgentViewWithDefaults instantiates a new AgentAgentView 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 NewAgentAgentViewWithDefaults() *AgentAgentView {
|
|
this := AgentAgentView{}
|
|
return &this
|
|
}
|
|
|
|
// GetAvatar returns the Avatar field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetAvatar() string {
|
|
if o == nil || IsNil(o.Avatar) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Avatar
|
|
}
|
|
|
|
// GetAvatarOk returns a tuple with the Avatar field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetAvatarOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Avatar) {
|
|
return nil, false
|
|
}
|
|
return o.Avatar, true
|
|
}
|
|
|
|
// HasAvatar returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasAvatar() bool {
|
|
if o != nil && !IsNil(o.Avatar) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAvatar gets a reference to the given string and assigns it to the Avatar field.
|
|
func (o *AgentAgentView) SetAvatar(v string) {
|
|
o.Avatar = &v
|
|
}
|
|
|
|
// GetCapMicroUsd returns the CapMicroUsd field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetCapMicroUsd() int64 {
|
|
if o == nil || IsNil(o.CapMicroUsd) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CapMicroUsd
|
|
}
|
|
|
|
// GetCapMicroUsdOk returns a tuple with the CapMicroUsd field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetCapMicroUsdOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CapMicroUsd) {
|
|
return nil, false
|
|
}
|
|
return o.CapMicroUsd, true
|
|
}
|
|
|
|
// HasCapMicroUsd returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasCapMicroUsd() bool {
|
|
if o != nil && !IsNil(o.CapMicroUsd) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCapMicroUsd gets a reference to the given int64 and assigns it to the CapMicroUsd field.
|
|
func (o *AgentAgentView) SetCapMicroUsd(v int64) {
|
|
o.CapMicroUsd = &v
|
|
}
|
|
|
|
// GetComputeRef returns the ComputeRef field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetComputeRef() string {
|
|
if o == nil || IsNil(o.ComputeRef) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ComputeRef
|
|
}
|
|
|
|
// GetComputeRefOk returns a tuple with the ComputeRef field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetComputeRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ComputeRef) {
|
|
return nil, false
|
|
}
|
|
return o.ComputeRef, true
|
|
}
|
|
|
|
// HasComputeRef returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasComputeRef() bool {
|
|
if o != nil && !IsNil(o.ComputeRef) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetComputeRef gets a reference to the given string and assigns it to the ComputeRef field.
|
|
func (o *AgentAgentView) SetComputeRef(v string) {
|
|
o.ComputeRef = &v
|
|
}
|
|
|
|
// GetConsumedMicroUsd returns the ConsumedMicroUsd field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetConsumedMicroUsd() int64 {
|
|
if o == nil || IsNil(o.ConsumedMicroUsd) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.ConsumedMicroUsd
|
|
}
|
|
|
|
// GetConsumedMicroUsdOk returns a tuple with the ConsumedMicroUsd field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetConsumedMicroUsdOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.ConsumedMicroUsd) {
|
|
return nil, false
|
|
}
|
|
return o.ConsumedMicroUsd, true
|
|
}
|
|
|
|
// HasConsumedMicroUsd returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasConsumedMicroUsd() bool {
|
|
if o != nil && !IsNil(o.ConsumedMicroUsd) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConsumedMicroUsd gets a reference to the given int64 and assigns it to the ConsumedMicroUsd field.
|
|
func (o *AgentAgentView) SetConsumedMicroUsd(v int64) {
|
|
o.ConsumedMicroUsd = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetCreatedAt() string {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetCreatedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
|
|
func (o *AgentAgentView) SetCreatedAt(v string) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *AgentAgentView) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetEmoji returns the Emoji field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetEmoji() string {
|
|
if o == nil || IsNil(o.Emoji) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Emoji
|
|
}
|
|
|
|
// GetEmojiOk returns a tuple with the Emoji field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetEmojiOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Emoji) {
|
|
return nil, false
|
|
}
|
|
return o.Emoji, true
|
|
}
|
|
|
|
// HasEmoji returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasEmoji() bool {
|
|
if o != nil && !IsNil(o.Emoji) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEmoji gets a reference to the given string and assigns it to the Emoji field.
|
|
func (o *AgentAgentView) SetEmoji(v string) {
|
|
o.Emoji = &v
|
|
}
|
|
|
|
// GetExecutionMode returns the ExecutionMode field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetExecutionMode() string {
|
|
if o == nil || IsNil(o.ExecutionMode) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ExecutionMode
|
|
}
|
|
|
|
// GetExecutionModeOk returns a tuple with the ExecutionMode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetExecutionModeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ExecutionMode) {
|
|
return nil, false
|
|
}
|
|
return o.ExecutionMode, true
|
|
}
|
|
|
|
// HasExecutionMode returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasExecutionMode() bool {
|
|
if o != nil && !IsNil(o.ExecutionMode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExecutionMode gets a reference to the given string and assigns it to the ExecutionMode field.
|
|
func (o *AgentAgentView) SetExecutionMode(v string) {
|
|
o.ExecutionMode = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *AgentAgentView) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetLineage returns the Lineage field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetLineage() []string {
|
|
if o == nil || IsNil(o.Lineage) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Lineage
|
|
}
|
|
|
|
// GetLineageOk returns a tuple with the Lineage field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetLineageOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Lineage) {
|
|
return nil, false
|
|
}
|
|
return o.Lineage, true
|
|
}
|
|
|
|
// HasLineage returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasLineage() bool {
|
|
if o != nil && !IsNil(o.Lineage) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLineage gets a reference to the given []string and assigns it to the Lineage field.
|
|
func (o *AgentAgentView) SetLineage(v []string) {
|
|
o.Lineage = v
|
|
}
|
|
|
|
// GetMaxTaskMicroUsd returns the MaxTaskMicroUsd field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetMaxTaskMicroUsd() int64 {
|
|
if o == nil || IsNil(o.MaxTaskMicroUsd) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.MaxTaskMicroUsd
|
|
}
|
|
|
|
// GetMaxTaskMicroUsdOk returns a tuple with the MaxTaskMicroUsd field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetMaxTaskMicroUsdOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.MaxTaskMicroUsd) {
|
|
return nil, false
|
|
}
|
|
return o.MaxTaskMicroUsd, true
|
|
}
|
|
|
|
// HasMaxTaskMicroUsd returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasMaxTaskMicroUsd() bool {
|
|
if o != nil && !IsNil(o.MaxTaskMicroUsd) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMaxTaskMicroUsd gets a reference to the given int64 and assigns it to the MaxTaskMicroUsd field.
|
|
func (o *AgentAgentView) SetMaxTaskMicroUsd(v int64) {
|
|
o.MaxTaskMicroUsd = &v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetModel() string {
|
|
if o == nil || IsNil(o.Model) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Model
|
|
}
|
|
|
|
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetModelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Model) {
|
|
return nil, false
|
|
}
|
|
return o.Model, true
|
|
}
|
|
|
|
// HasModel returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasModel() bool {
|
|
if o != nil && !IsNil(o.Model) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModel gets a reference to the given string and assigns it to the Model field.
|
|
func (o *AgentAgentView) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *AgentAgentView) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetParent returns the Parent field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetParent() string {
|
|
if o == nil || IsNil(o.Parent) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Parent
|
|
}
|
|
|
|
// GetParentOk returns a tuple with the Parent field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetParentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Parent) {
|
|
return nil, false
|
|
}
|
|
return o.Parent, true
|
|
}
|
|
|
|
// HasParent returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasParent() bool {
|
|
if o != nil && !IsNil(o.Parent) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetParent gets a reference to the given string and assigns it to the Parent field.
|
|
func (o *AgentAgentView) SetParent(v string) {
|
|
o.Parent = &v
|
|
}
|
|
|
|
// GetPeriod returns the Period field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetPeriod() string {
|
|
if o == nil || IsNil(o.Period) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Period
|
|
}
|
|
|
|
// GetPeriodOk returns a tuple with the Period field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetPeriodOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Period) {
|
|
return nil, false
|
|
}
|
|
return o.Period, true
|
|
}
|
|
|
|
// HasPeriod returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasPeriod() bool {
|
|
if o != nil && !IsNil(o.Period) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPeriod gets a reference to the given string and assigns it to the Period field.
|
|
func (o *AgentAgentView) SetPeriod(v string) {
|
|
o.Period = &v
|
|
}
|
|
|
|
// GetRuns returns the Runs field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetRuns() int64 {
|
|
if o == nil || IsNil(o.Runs) {
|
|
var ret int64
|
|
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 *AgentAgentView) GetRunsOk() (*int64, 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 *AgentAgentView) HasRuns() bool {
|
|
if o != nil && !IsNil(o.Runs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRuns gets a reference to the given int64 and assigns it to the Runs field.
|
|
func (o *AgentAgentView) SetRuns(v int64) {
|
|
o.Runs = &v
|
|
}
|
|
|
|
// GetSchedule returns the Schedule field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetSchedule() string {
|
|
if o == nil || IsNil(o.Schedule) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Schedule
|
|
}
|
|
|
|
// GetScheduleOk returns a tuple with the Schedule field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetScheduleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Schedule) {
|
|
return nil, false
|
|
}
|
|
return o.Schedule, true
|
|
}
|
|
|
|
// HasSchedule returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasSchedule() bool {
|
|
if o != nil && !IsNil(o.Schedule) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSchedule gets a reference to the given string and assigns it to the Schedule field.
|
|
func (o *AgentAgentView) SetSchedule(v string) {
|
|
o.Schedule = &v
|
|
}
|
|
|
|
// GetServiceAccountId returns the ServiceAccountId field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetServiceAccountId() string {
|
|
if o == nil || IsNil(o.ServiceAccountId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ServiceAccountId
|
|
}
|
|
|
|
// GetServiceAccountIdOk returns a tuple with the ServiceAccountId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetServiceAccountIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ServiceAccountId) {
|
|
return nil, false
|
|
}
|
|
return o.ServiceAccountId, true
|
|
}
|
|
|
|
// HasServiceAccountId returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasServiceAccountId() bool {
|
|
if o != nil && !IsNil(o.ServiceAccountId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetServiceAccountId gets a reference to the given string and assigns it to the ServiceAccountId field.
|
|
func (o *AgentAgentView) SetServiceAccountId(v string) {
|
|
o.ServiceAccountId = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *AgentAgentView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetTools returns the Tools field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetTools() []string {
|
|
if o == nil || IsNil(o.Tools) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Tools
|
|
}
|
|
|
|
// GetToolsOk returns a tuple with the Tools field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetToolsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Tools) {
|
|
return nil, false
|
|
}
|
|
return o.Tools, true
|
|
}
|
|
|
|
// HasTools returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasTools() bool {
|
|
if o != nil && !IsNil(o.Tools) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTools gets a reference to the given []string and assigns it to the Tools field.
|
|
func (o *AgentAgentView) SetTools(v []string) {
|
|
o.Tools = v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *AgentAgentView) GetUpdatedAt() string {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UpdatedAt
|
|
}
|
|
|
|
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentView) GetUpdatedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.UpdatedAt, true
|
|
}
|
|
|
|
// HasUpdatedAt returns a boolean if a field has been set.
|
|
func (o *AgentAgentView) HasUpdatedAt() bool {
|
|
if o != nil && !IsNil(o.UpdatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
|
|
func (o *AgentAgentView) SetUpdatedAt(v string) {
|
|
o.UpdatedAt = &v
|
|
}
|
|
|
|
func (o AgentAgentView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentAgentView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Avatar) {
|
|
toSerialize["avatar"] = o.Avatar
|
|
}
|
|
if !IsNil(o.CapMicroUsd) {
|
|
toSerialize["cap_micro_usd"] = o.CapMicroUsd
|
|
}
|
|
if !IsNil(o.ComputeRef) {
|
|
toSerialize["computeRef"] = o.ComputeRef
|
|
}
|
|
if !IsNil(o.ConsumedMicroUsd) {
|
|
toSerialize["consumed_micro_usd"] = o.ConsumedMicroUsd
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Emoji) {
|
|
toSerialize["emoji"] = o.Emoji
|
|
}
|
|
if !IsNil(o.ExecutionMode) {
|
|
toSerialize["executionMode"] = o.ExecutionMode
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Lineage) {
|
|
toSerialize["lineage"] = o.Lineage
|
|
}
|
|
if !IsNil(o.MaxTaskMicroUsd) {
|
|
toSerialize["max_task_micro_usd"] = o.MaxTaskMicroUsd
|
|
}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Parent) {
|
|
toSerialize["parent"] = o.Parent
|
|
}
|
|
if !IsNil(o.Period) {
|
|
toSerialize["period"] = o.Period
|
|
}
|
|
if !IsNil(o.Runs) {
|
|
toSerialize["runs"] = o.Runs
|
|
}
|
|
if !IsNil(o.Schedule) {
|
|
toSerialize["schedule"] = o.Schedule
|
|
}
|
|
if !IsNil(o.ServiceAccountId) {
|
|
toSerialize["serviceAccountId"] = o.ServiceAccountId
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Tools) {
|
|
toSerialize["tools"] = o.Tools
|
|
}
|
|
if !IsNil(o.UpdatedAt) {
|
|
toSerialize["updatedAt"] = o.UpdatedAt
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentAgentView) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentAgentView := _AgentAgentView{}
|
|
|
|
err = json.Unmarshal(data, &varAgentAgentView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentAgentView(varAgentAgentView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "avatar")
|
|
delete(additionalProperties, "cap_micro_usd")
|
|
delete(additionalProperties, "computeRef")
|
|
delete(additionalProperties, "consumed_micro_usd")
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "emoji")
|
|
delete(additionalProperties, "executionMode")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "lineage")
|
|
delete(additionalProperties, "max_task_micro_usd")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "parent")
|
|
delete(additionalProperties, "period")
|
|
delete(additionalProperties, "runs")
|
|
delete(additionalProperties, "schedule")
|
|
delete(additionalProperties, "serviceAccountId")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "tools")
|
|
delete(additionalProperties, "updatedAt")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentAgentView struct {
|
|
value *AgentAgentView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentAgentView) Get() *AgentAgentView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentAgentView) Set(val *AgentAgentView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentAgentView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentAgentView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentAgentView(val *AgentAgentView) *NullableAgentAgentView {
|
|
return &NullableAgentAgentView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentAgentView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentAgentView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|