mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
687 lines
21 KiB
Go
687 lines
21 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 AgentCreateAgentIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentCreateAgentIn{}
|
|
|
|
// AgentCreateAgentIn struct for AgentCreateAgentIn
|
|
type AgentCreateAgentIn struct {
|
|
// Avatar and Emoji are how the agent APPEARS. An image wins when both are given — it is the thing somebody made — and both empty leaves the agent drawn as its initial. Validated by iam/pkg/schema, the same rule a person's avatar passes, so the 96 KiB bound and the accepted URL forms are stated once for every subject that has a face.
|
|
Avatar *string `json:"avatar,omitempty"`
|
|
// The budget, required. An agent is not creatable without one: a zero cap would mean no limit and no record of its spend, which is what a budget exists to remove. Integer micro-USD; the CLI converts dollars before sending.
|
|
CapMicroUsd *int64 `json:"cap_micro_usd,omitempty"`
|
|
// ComputeRef optionally binds this bot to a visor machine. Opaque here, bounded at 256 characters, and not resolved — this package stores the reference and the binding's lifecycle belongs elsewhere.
|
|
ComputeRef *string `json:"computeRef,omitempty"`
|
|
// Description is the one line published as the description of the `agent_<name>` tool, which is how another agent decides whether to call this one. Optional, and worth writing for exactly that reason.
|
|
Description *string `json:"description,omitempty"`
|
|
// Emoji is the single glyph shown when there is no image. An image WINS when both are given — it is the thing somebody made — and both empty leaves the agent drawn as its initial.
|
|
Emoji *string `json:"emoji,omitempty"`
|
|
// ExecutionMode is one-shot or long-running. Empty takes one-shot, which runs only when something POSTs to it. long-running additionally requires Schedule, and counts against a per-org cap that answers 409 when it is full.
|
|
ExecutionMode *string `json:"executionMode,omitempty"`
|
|
// Instructions is the system prompt, up to 32 KiB, stored verbatim. This is what the model reads; Description is what other CALLERS read.
|
|
Instructions *string `json:"instructions,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 names the model to run on. Omit it to take the deployment's configured default; name one and it is checked against the gateway's served catalogue here, so a model this deployment cannot serve is refused now rather than at the first run. Stored under our own name for it, whatever spelling arrives.
|
|
Model *string `json:"model,omitempty"`
|
|
// Name is the agent's org-unique handle and the only required field. It must match ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$, and a name already taken in this org is a 409 rather than an overwrite. It is permanent: no update route moves it.
|
|
Name *string `json:"name,omitempty"`
|
|
// Parent is the agent spawning this one — its id or name, in the caller's org. The new agent answers to the org its parent answers to, and a parent outside the caller's org is not found: an agent is never spawned into a principal its creator does not answer to. Omitted for an agent a person defines. Set once; no update moves it.
|
|
Parent *string `json:"parent,omitempty"`
|
|
// Period is the window the cap resets on: day, week or month.
|
|
Period *string `json:"period,omitempty"`
|
|
// Schedule is the 5-field cron a long-running agent fires on, parsed here so a bad expression is a 400 and not an agent that silently never runs. Required with long-running; DISCARDED for one-shot rather than stored unused.
|
|
Schedule *string `json:"schedule,omitempty"`
|
|
// ServiceAccountID optionally names the IAM agent service account (<org>-<agent>) a scheduled run should be billed AS, so an autonomous run is attributable to a principal rather than only to the org. Same 256-character bound, also unresolved here.
|
|
ServiceAccountId *string `json:"serviceAccountId,omitempty"`
|
|
// Tools are the tool names this agent may call. Omitted or empty grants NONE — that default is the agent's authority and is not widened anywhere. The single entry \"*\" means whatever the fleet's MCP server serves at the time of each run.
|
|
Tools []string `json:"tools,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentCreateAgentIn AgentCreateAgentIn
|
|
|
|
// NewAgentCreateAgentIn instantiates a new AgentCreateAgentIn 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 NewAgentCreateAgentIn() *AgentCreateAgentIn {
|
|
this := AgentCreateAgentIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentCreateAgentInWithDefaults instantiates a new AgentCreateAgentIn 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 NewAgentCreateAgentInWithDefaults() *AgentCreateAgentIn {
|
|
this := AgentCreateAgentIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetAvatar returns the Avatar field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetAvatar(v string) {
|
|
o.Avatar = &v
|
|
}
|
|
|
|
// GetCapMicroUsd returns the CapMicroUsd field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetCapMicroUsd(v int64) {
|
|
o.CapMicroUsd = &v
|
|
}
|
|
|
|
// GetComputeRef returns the ComputeRef field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetComputeRef(v string) {
|
|
o.ComputeRef = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetEmoji returns the Emoji field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetEmoji(v string) {
|
|
o.Emoji = &v
|
|
}
|
|
|
|
// GetExecutionMode returns the ExecutionMode field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetExecutionMode(v string) {
|
|
o.ExecutionMode = &v
|
|
}
|
|
|
|
// GetInstructions returns the Instructions field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetInstructions(v string) {
|
|
o.Instructions = &v
|
|
}
|
|
|
|
// GetMaxTaskMicroUsd returns the MaxTaskMicroUsd field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetMaxTaskMicroUsd(v int64) {
|
|
o.MaxTaskMicroUsd = &v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetParent returns the Parent field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetParent(v string) {
|
|
o.Parent = &v
|
|
}
|
|
|
|
// GetPeriod returns the Period field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetPeriod(v string) {
|
|
o.Period = &v
|
|
}
|
|
|
|
// GetSchedule returns the Schedule field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetSchedule(v string) {
|
|
o.Schedule = &v
|
|
}
|
|
|
|
// GetServiceAccountId returns the ServiceAccountId field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetServiceAccountId(v string) {
|
|
o.ServiceAccountId = &v
|
|
}
|
|
|
|
// GetTools returns the Tools field value if set, zero value otherwise.
|
|
func (o *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) 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 *AgentCreateAgentIn) SetTools(v []string) {
|
|
o.Tools = v
|
|
}
|
|
|
|
func (o AgentCreateAgentIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentCreateAgentIn) 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.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Emoji) {
|
|
toSerialize["emoji"] = o.Emoji
|
|
}
|
|
if !IsNil(o.ExecutionMode) {
|
|
toSerialize["executionMode"] = o.ExecutionMode
|
|
}
|
|
if !IsNil(o.Instructions) {
|
|
toSerialize["instructions"] = o.Instructions
|
|
}
|
|
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.Schedule) {
|
|
toSerialize["schedule"] = o.Schedule
|
|
}
|
|
if !IsNil(o.ServiceAccountId) {
|
|
toSerialize["serviceAccountId"] = o.ServiceAccountId
|
|
}
|
|
if !IsNil(o.Tools) {
|
|
toSerialize["tools"] = o.Tools
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentCreateAgentIn) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentCreateAgentIn := _AgentCreateAgentIn{}
|
|
|
|
err = json.Unmarshal(data, &varAgentCreateAgentIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentCreateAgentIn(varAgentCreateAgentIn)
|
|
|
|
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, "description")
|
|
delete(additionalProperties, "emoji")
|
|
delete(additionalProperties, "executionMode")
|
|
delete(additionalProperties, "instructions")
|
|
delete(additionalProperties, "max_task_micro_usd")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "parent")
|
|
delete(additionalProperties, "period")
|
|
delete(additionalProperties, "schedule")
|
|
delete(additionalProperties, "serviceAccountId")
|
|
delete(additionalProperties, "tools")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentCreateAgentIn struct {
|
|
value *AgentCreateAgentIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentCreateAgentIn) Get() *AgentCreateAgentIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentCreateAgentIn) Set(val *AgentCreateAgentIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentCreateAgentIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentCreateAgentIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentCreateAgentIn(val *AgentCreateAgentIn) *NullableAgentCreateAgentIn {
|
|
return &NullableAgentCreateAgentIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentCreateAgentIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentCreateAgentIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|