Files
sdk/model_agent_agent_detail.go

991 lines
31 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 AgentAgentDetail type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentAgentDetail{}
// AgentAgentDetail struct for AgentAgentDetail
type AgentAgentDetail 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"`
// Instructions is the agent's system prompt, verbatim, up to 32 KiB. It is the one field the list read withholds, because it is the agent's whole behaviour and a page of them would be a page of prompts.
Instructions *string `json:"instructions,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"`
// RecentRuns is the agent's 20 most recent executions, newest first. It is a window on the history, not the history: the count beside it is `runs`.
RecentRuns []AgentAgentRunView `json:"recentRuns,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 _AgentAgentDetail AgentAgentDetail
// NewAgentAgentDetail instantiates a new AgentAgentDetail 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 NewAgentAgentDetail() *AgentAgentDetail {
this := AgentAgentDetail{}
return &this
}
// NewAgentAgentDetailWithDefaults instantiates a new AgentAgentDetail 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 NewAgentAgentDetailWithDefaults() *AgentAgentDetail {
this := AgentAgentDetail{}
return &this
}
// GetAvatar returns the Avatar field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetAvatar(v string) {
o.Avatar = &v
}
// GetCapMicroUsd returns the CapMicroUsd field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetCapMicroUsd(v int64) {
o.CapMicroUsd = &v
}
// GetComputeRef returns the ComputeRef field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetComputeRef(v string) {
o.ComputeRef = &v
}
// GetConsumedMicroUsd returns the ConsumedMicroUsd field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetConsumedMicroUsd(v int64) {
o.ConsumedMicroUsd = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetDescription(v string) {
o.Description = &v
}
// GetEmoji returns the Emoji field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetEmoji(v string) {
o.Emoji = &v
}
// GetExecutionMode returns the ExecutionMode field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetExecutionMode(v string) {
o.ExecutionMode = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetId(v string) {
o.Id = &v
}
// GetInstructions returns the Instructions field value if set, zero value otherwise.
func (o *AgentAgentDetail) GetInstructions() string {
if o == nil || IsNil(o.Instructions) {
var ret string
return ret
}
return *o.Instructions
}
// GetInstructionsOk returns a tuple with the Instructions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentAgentDetail) GetInstructionsOk() (*string, bool) {
if o == nil || IsNil(o.Instructions) {
return nil, false
}
return o.Instructions, true
}
// HasInstructions returns a boolean if a field has been set.
func (o *AgentAgentDetail) HasInstructions() bool {
if o != nil && !IsNil(o.Instructions) {
return true
}
return false
}
// SetInstructions gets a reference to the given string and assigns it to the Instructions field.
func (o *AgentAgentDetail) SetInstructions(v string) {
o.Instructions = &v
}
// GetLineage returns the Lineage field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetLineage(v []string) {
o.Lineage = v
}
// GetMaxTaskMicroUsd returns the MaxTaskMicroUsd field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetMaxTaskMicroUsd(v int64) {
o.MaxTaskMicroUsd = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetModel(v string) {
o.Model = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetName(v string) {
o.Name = &v
}
// GetParent returns the Parent field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetParent(v string) {
o.Parent = &v
}
// GetPeriod returns the Period field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetPeriod(v string) {
o.Period = &v
}
// GetRecentRuns returns the RecentRuns field value if set, zero value otherwise.
func (o *AgentAgentDetail) GetRecentRuns() []AgentAgentRunView {
if o == nil || IsNil(o.RecentRuns) {
var ret []AgentAgentRunView
return ret
}
return o.RecentRuns
}
// GetRecentRunsOk returns a tuple with the RecentRuns field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentAgentDetail) GetRecentRunsOk() ([]AgentAgentRunView, bool) {
if o == nil || IsNil(o.RecentRuns) {
return nil, false
}
return o.RecentRuns, true
}
// HasRecentRuns returns a boolean if a field has been set.
func (o *AgentAgentDetail) HasRecentRuns() bool {
if o != nil && !IsNil(o.RecentRuns) {
return true
}
return false
}
// SetRecentRuns gets a reference to the given []AgentAgentRunView and assigns it to the RecentRuns field.
func (o *AgentAgentDetail) SetRecentRuns(v []AgentAgentRunView) {
o.RecentRuns = v
}
// GetRuns returns the Runs field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetRuns(v int64) {
o.Runs = &v
}
// GetSchedule returns the Schedule field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetSchedule(v string) {
o.Schedule = &v
}
// GetServiceAccountId returns the ServiceAccountId field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetServiceAccountId(v string) {
o.ServiceAccountId = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetStatus(v string) {
o.Status = &v
}
// GetTools returns the Tools field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetTools(v []string) {
o.Tools = v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) 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 *AgentAgentDetail) SetUpdatedAt(v string) {
o.UpdatedAt = &v
}
func (o AgentAgentDetail) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentAgentDetail) 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.Instructions) {
toSerialize["instructions"] = o.Instructions
}
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.RecentRuns) {
toSerialize["recentRuns"] = o.RecentRuns
}
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 *AgentAgentDetail) UnmarshalJSON(data []byte) (err error) {
varAgentAgentDetail := _AgentAgentDetail{}
err = json.Unmarshal(data, &varAgentAgentDetail)
if err != nil {
return err
}
*o = AgentAgentDetail(varAgentAgentDetail)
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, "instructions")
delete(additionalProperties, "lineage")
delete(additionalProperties, "max_task_micro_usd")
delete(additionalProperties, "model")
delete(additionalProperties, "name")
delete(additionalProperties, "parent")
delete(additionalProperties, "period")
delete(additionalProperties, "recentRuns")
delete(additionalProperties, "runs")
delete(additionalProperties, "schedule")
delete(additionalProperties, "serviceAccountId")
delete(additionalProperties, "status")
delete(additionalProperties, "tools")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentAgentDetail struct {
value *AgentAgentDetail
isSet bool
}
func (v NullableAgentAgentDetail) Get() *AgentAgentDetail {
return v.value
}
func (v *NullableAgentAgentDetail) Set(val *AgentAgentDetail) {
v.value = val
v.isSet = true
}
func (v NullableAgentAgentDetail) IsSet() bool {
return v.isSet
}
func (v *NullableAgentAgentDetail) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentAgentDetail(val *AgentAgentDetail) *NullableAgentAgentDetail {
return &NullableAgentAgentDetail{value: val, isSet: true}
}
func (v NullableAgentAgentDetail) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentAgentDetail) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}