mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
687 lines
20 KiB
Go
687 lines
20 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 AgentAgentRunView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentAgentRunView{}
|
|
|
|
// AgentAgentRunView struct for AgentAgentRunView
|
|
type AgentAgentRunView struct {
|
|
// Actor is the \"org/sub\" identity the run was executed and billed AS. Empty means there was no PERSON — a schedule or a service token — which is a different fact from \"we do not know\", and the difference is what an audit asks about.
|
|
Actor *string `json:"actor,omitempty"`
|
|
// What an operator needs to answer \"what ran, for whom, and what did it do\" — and, through traceId, to leave this record for the waterfall of the very same run rather than a search that hopefully lands near it. Agent is on the row because the org-wide feed lists runs across agents, and a run that cannot name its agent is an orphan in exactly the view built to make sense of many of them. Every field is omitempty: a run recorded before these columns existed reports absence rather than a zero it never measured.
|
|
Agent *string `json:"agent,omitempty"`
|
|
// CompletionTokens is the same measurement for what the model produced, on the same final completion. It is a count of TOKENS, not of turns and not of money.
|
|
CompletionTokens *int64 `json:"completionTokens,omitempty"`
|
|
// CreatedAt is when the run finished, RFC 3339 in UTC to the second — the duration above already says how long it had been going.
|
|
CreatedAt *string `json:"createdAt,omitempty"`
|
|
// DurationMs is wall-clock milliseconds around the completion, including a failover's retries. It is time SPENT, not time billed.
|
|
DurationMs *int64 `json:"durationMs,omitempty"`
|
|
// Error is why an \"ok\"-less run failed, as the failing call reported it. Empty on every successful run.
|
|
Error *string `json:"error,omitempty"`
|
|
// ID is the run's handle, minted as \"run_\" + 32 hex characters. It is the key the metering ledger records this run's per-round token spend under, so it is how a bill and a run are joined.
|
|
Id *string `json:"id,omitempty"`
|
|
// Input is the text the run was given, verbatim.
|
|
Input *string `json:"input,omitempty"`
|
|
// MicroUSD is what the run spent, integer micro-USD. Absent when nothing was metered.
|
|
MicroUsd *int64 `json:"micro_usd,omitempty"`
|
|
// Model is the model that actually SERVED this run, which is not always the one the agent is defined on — a failover records what answered. Normalized to our name on the way out; the stored row is left exactly as it happened, because a run is a record and rewriting it would be worse than the name it carries.
|
|
Model *string `json:"model,omitempty"`
|
|
// Output is what the model produced. Empty on an error run, and empty is also a legitimate answer from a run that succeeded with nothing to say — Status is what separates those.
|
|
Output *string `json:"output,omitempty"`
|
|
// PromptTokens is what the gateway reported for the run's FINAL completion, and only that one — a tool loop's earlier rounds are the metering ledger's account, joined by this run's id. Reading it as the run's total spend undercounts a loop.
|
|
PromptTokens *int64 `json:"promptTokens,omitempty"`
|
|
// Status is the run's outcome, and there are exactly two: \"ok\" when the model answered, \"error\" when it did not. It is written when the run ends, so no row here is in flight.
|
|
Status *string `json:"status,omitempty"`
|
|
// ToolCalls is how many tool dispatches the run made — a count of ACTIONS, which is a different measurement from the token counts above and from the turns a build reports. Zero is a run that answered straight from the model.
|
|
ToolCalls *int64 `json:"toolCalls,omitempty"`
|
|
// TraceID is the trace this run IS, so the record and its spans are one thing to move between: it opens the waterfall for THIS run rather than a search that lands near it. Empty when the process had no tracer, never a fabricated id.
|
|
TraceId *string `json:"traceId,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentAgentRunView AgentAgentRunView
|
|
|
|
// NewAgentAgentRunView instantiates a new AgentAgentRunView 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 NewAgentAgentRunView() *AgentAgentRunView {
|
|
this := AgentAgentRunView{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentAgentRunViewWithDefaults instantiates a new AgentAgentRunView 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 NewAgentAgentRunViewWithDefaults() *AgentAgentRunView {
|
|
this := AgentAgentRunView{}
|
|
return &this
|
|
}
|
|
|
|
// GetActor returns the Actor field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetActor() string {
|
|
if o == nil || IsNil(o.Actor) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Actor
|
|
}
|
|
|
|
// GetActorOk returns a tuple with the Actor field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetActorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Actor) {
|
|
return nil, false
|
|
}
|
|
return o.Actor, true
|
|
}
|
|
|
|
// HasActor returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasActor() bool {
|
|
if o != nil && !IsNil(o.Actor) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetActor gets a reference to the given string and assigns it to the Actor field.
|
|
func (o *AgentAgentRunView) SetActor(v string) {
|
|
o.Actor = &v
|
|
}
|
|
|
|
// GetAgent returns the Agent field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetAgent() string {
|
|
if o == nil || IsNil(o.Agent) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Agent
|
|
}
|
|
|
|
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetAgentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Agent) {
|
|
return nil, false
|
|
}
|
|
return o.Agent, true
|
|
}
|
|
|
|
// HasAgent returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasAgent() bool {
|
|
if o != nil && !IsNil(o.Agent) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAgent gets a reference to the given string and assigns it to the Agent field.
|
|
func (o *AgentAgentRunView) SetAgent(v string) {
|
|
o.Agent = &v
|
|
}
|
|
|
|
// GetCompletionTokens returns the CompletionTokens field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetCompletionTokens() int64 {
|
|
if o == nil || IsNil(o.CompletionTokens) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CompletionTokens
|
|
}
|
|
|
|
// GetCompletionTokensOk returns a tuple with the CompletionTokens field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetCompletionTokensOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CompletionTokens) {
|
|
return nil, false
|
|
}
|
|
return o.CompletionTokens, true
|
|
}
|
|
|
|
// HasCompletionTokens returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasCompletionTokens() bool {
|
|
if o != nil && !IsNil(o.CompletionTokens) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCompletionTokens gets a reference to the given int64 and assigns it to the CompletionTokens field.
|
|
func (o *AgentAgentRunView) SetCompletionTokens(v int64) {
|
|
o.CompletionTokens = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) 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 *AgentAgentRunView) 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 *AgentAgentRunView) 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 *AgentAgentRunView) SetCreatedAt(v string) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetDurationMs returns the DurationMs field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetDurationMs() int64 {
|
|
if o == nil || IsNil(o.DurationMs) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.DurationMs
|
|
}
|
|
|
|
// GetDurationMsOk returns a tuple with the DurationMs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetDurationMsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.DurationMs) {
|
|
return nil, false
|
|
}
|
|
return o.DurationMs, true
|
|
}
|
|
|
|
// HasDurationMs returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasDurationMs() bool {
|
|
if o != nil && !IsNil(o.DurationMs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDurationMs gets a reference to the given int64 and assigns it to the DurationMs field.
|
|
func (o *AgentAgentRunView) SetDurationMs(v int64) {
|
|
o.DurationMs = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetError() string {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetErrorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given string and assigns it to the Error field.
|
|
func (o *AgentAgentRunView) SetError(v string) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) 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 *AgentAgentRunView) 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 *AgentAgentRunView) 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 *AgentAgentRunView) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetInput returns the Input field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetInput() string {
|
|
if o == nil || IsNil(o.Input) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Input
|
|
}
|
|
|
|
// GetInputOk returns a tuple with the Input field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetInputOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Input) {
|
|
return nil, false
|
|
}
|
|
return o.Input, true
|
|
}
|
|
|
|
// HasInput returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasInput() bool {
|
|
if o != nil && !IsNil(o.Input) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInput gets a reference to the given string and assigns it to the Input field.
|
|
func (o *AgentAgentRunView) SetInput(v string) {
|
|
o.Input = &v
|
|
}
|
|
|
|
// GetMicroUsd returns the MicroUsd field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetMicroUsd() int64 {
|
|
if o == nil || IsNil(o.MicroUsd) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.MicroUsd
|
|
}
|
|
|
|
// GetMicroUsdOk returns a tuple with the MicroUsd field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetMicroUsdOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.MicroUsd) {
|
|
return nil, false
|
|
}
|
|
return o.MicroUsd, true
|
|
}
|
|
|
|
// HasMicroUsd returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasMicroUsd() bool {
|
|
if o != nil && !IsNil(o.MicroUsd) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMicroUsd gets a reference to the given int64 and assigns it to the MicroUsd field.
|
|
func (o *AgentAgentRunView) SetMicroUsd(v int64) {
|
|
o.MicroUsd = &v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) 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 *AgentAgentRunView) 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 *AgentAgentRunView) 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 *AgentAgentRunView) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetOutput returns the Output field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetOutput() string {
|
|
if o == nil || IsNil(o.Output) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Output
|
|
}
|
|
|
|
// GetOutputOk returns a tuple with the Output field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetOutputOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Output) {
|
|
return nil, false
|
|
}
|
|
return o.Output, true
|
|
}
|
|
|
|
// HasOutput returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasOutput() bool {
|
|
if o != nil && !IsNil(o.Output) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOutput gets a reference to the given string and assigns it to the Output field.
|
|
func (o *AgentAgentRunView) SetOutput(v string) {
|
|
o.Output = &v
|
|
}
|
|
|
|
// GetPromptTokens returns the PromptTokens field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetPromptTokens() int64 {
|
|
if o == nil || IsNil(o.PromptTokens) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.PromptTokens
|
|
}
|
|
|
|
// GetPromptTokensOk returns a tuple with the PromptTokens field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetPromptTokensOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.PromptTokens) {
|
|
return nil, false
|
|
}
|
|
return o.PromptTokens, true
|
|
}
|
|
|
|
// HasPromptTokens returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasPromptTokens() bool {
|
|
if o != nil && !IsNil(o.PromptTokens) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPromptTokens gets a reference to the given int64 and assigns it to the PromptTokens field.
|
|
func (o *AgentAgentRunView) SetPromptTokens(v int64) {
|
|
o.PromptTokens = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) 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 *AgentAgentRunView) 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 *AgentAgentRunView) 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 *AgentAgentRunView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetToolCalls returns the ToolCalls field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetToolCalls() int64 {
|
|
if o == nil || IsNil(o.ToolCalls) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.ToolCalls
|
|
}
|
|
|
|
// GetToolCallsOk returns a tuple with the ToolCalls field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetToolCallsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.ToolCalls) {
|
|
return nil, false
|
|
}
|
|
return o.ToolCalls, true
|
|
}
|
|
|
|
// HasToolCalls returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasToolCalls() bool {
|
|
if o != nil && !IsNil(o.ToolCalls) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetToolCalls gets a reference to the given int64 and assigns it to the ToolCalls field.
|
|
func (o *AgentAgentRunView) SetToolCalls(v int64) {
|
|
o.ToolCalls = &v
|
|
}
|
|
|
|
// GetTraceId returns the TraceId field value if set, zero value otherwise.
|
|
func (o *AgentAgentRunView) GetTraceId() string {
|
|
if o == nil || IsNil(o.TraceId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.TraceId
|
|
}
|
|
|
|
// GetTraceIdOk returns a tuple with the TraceId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentAgentRunView) GetTraceIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.TraceId) {
|
|
return nil, false
|
|
}
|
|
return o.TraceId, true
|
|
}
|
|
|
|
// HasTraceId returns a boolean if a field has been set.
|
|
func (o *AgentAgentRunView) HasTraceId() bool {
|
|
if o != nil && !IsNil(o.TraceId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTraceId gets a reference to the given string and assigns it to the TraceId field.
|
|
func (o *AgentAgentRunView) SetTraceId(v string) {
|
|
o.TraceId = &v
|
|
}
|
|
|
|
func (o AgentAgentRunView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentAgentRunView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Actor) {
|
|
toSerialize["actor"] = o.Actor
|
|
}
|
|
if !IsNil(o.Agent) {
|
|
toSerialize["agent"] = o.Agent
|
|
}
|
|
if !IsNil(o.CompletionTokens) {
|
|
toSerialize["completionTokens"] = o.CompletionTokens
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.DurationMs) {
|
|
toSerialize["durationMs"] = o.DurationMs
|
|
}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Input) {
|
|
toSerialize["input"] = o.Input
|
|
}
|
|
if !IsNil(o.MicroUsd) {
|
|
toSerialize["micro_usd"] = o.MicroUsd
|
|
}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
if !IsNil(o.Output) {
|
|
toSerialize["output"] = o.Output
|
|
}
|
|
if !IsNil(o.PromptTokens) {
|
|
toSerialize["promptTokens"] = o.PromptTokens
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.ToolCalls) {
|
|
toSerialize["toolCalls"] = o.ToolCalls
|
|
}
|
|
if !IsNil(o.TraceId) {
|
|
toSerialize["traceId"] = o.TraceId
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentAgentRunView) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentAgentRunView := _AgentAgentRunView{}
|
|
|
|
err = json.Unmarshal(data, &varAgentAgentRunView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentAgentRunView(varAgentAgentRunView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "actor")
|
|
delete(additionalProperties, "agent")
|
|
delete(additionalProperties, "completionTokens")
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "durationMs")
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "input")
|
|
delete(additionalProperties, "micro_usd")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "output")
|
|
delete(additionalProperties, "promptTokens")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "toolCalls")
|
|
delete(additionalProperties, "traceId")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentAgentRunView struct {
|
|
value *AgentAgentRunView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentAgentRunView) Get() *AgentAgentRunView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentAgentRunView) Set(val *AgentAgentRunView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentAgentRunView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentAgentRunView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentAgentRunView(val *AgentAgentRunView) *NullableAgentAgentRunView {
|
|
return &NullableAgentAgentRunView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentAgentRunView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentAgentRunView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|