Files
sdk/model_agent_update_agent_in.go

649 lines
19 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 AgentUpdateAgentIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentUpdateAgentIn{}
// AgentUpdateAgentIn struct for AgentUpdateAgentIn
type AgentUpdateAgentIn struct {
// Avatar and Emoji re-draw the agent. Sending either replaces the pair, so setting an image clears a glyph and \"\" for both goes back to the initial — there is no state where a row holds two answers.
Avatar *string `json:"avatar,omitempty"`
// The budget, any part of it. Changing the period opens a new window.
CapMicroUsd *int64 `json:"cap_micro_usd,omitempty"`
// ComputeRef re-binds (or, with \"\", unbinds) the visor machine. Opaque here.
ComputeRef *string `json:"computeRef,omitempty"`
// Description replaces the line other agents read in the tool catalogue.
Description *string `json:"description,omitempty"`
// Emoji re-draws the agent as a glyph. Sending either of the pair replaces BOTH, so setting a glyph clears an image and \"\" for both goes back to the initial — there is no state where a row holds two answers.
Emoji *string `json:"emoji,omitempty"`
// ExecutionMode switches between one-shot and long-running. The RESULTING mode+schedule are validated together, so switching to long-running without a stored or supplied cron is refused rather than accepted into an agent the scheduler would skip forever. A switch INTO long-running counts against the per-org cap and can be a 409.
ExecutionMode *string `json:"executionMode,omitempty"`
// Instructions replaces the system prompt whole, up to 32 KiB. There is no append: a prompt is one text, and sending \"\" clears it.
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 re-points the agent at another model, checked against the gateway's served catalogue exactly as create checks it. Empty STRING is refused — say nothing to keep the current one. Past runs keep the model that served them.
Model *string `json:"model,omitempty"`
// Period is the window the cap resets on: day, week or month.
Period *string `json:"period,omitempty"`
// Ref is the agent to update — its public id or org-unique name, from the path.
Ref *string `json:"ref,omitempty"`
// Schedule replaces the cron. It is validated against the mode this update leaves behind, and dropped if that mode is one-shot.
Schedule *string `json:"schedule,omitempty"`
// ServiceAccountID re-points (or, with \"\", clears) the IAM service account a scheduled run is billed as. Clearing it puts that spend back on the org.
ServiceAccountId *string `json:"serviceAccountId,omitempty"`
// Tools replaces the whole allow-list, it does not add to it. Sending [] takes every tool away, which is the only way to say that.
Tools []string `json:"tools,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentUpdateAgentIn AgentUpdateAgentIn
// NewAgentUpdateAgentIn instantiates a new AgentUpdateAgentIn 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 NewAgentUpdateAgentIn() *AgentUpdateAgentIn {
this := AgentUpdateAgentIn{}
return &this
}
// NewAgentUpdateAgentInWithDefaults instantiates a new AgentUpdateAgentIn 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 NewAgentUpdateAgentInWithDefaults() *AgentUpdateAgentIn {
this := AgentUpdateAgentIn{}
return &this
}
// GetAvatar returns the Avatar field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetAvatar(v string) {
o.Avatar = &v
}
// GetCapMicroUsd returns the CapMicroUsd field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetCapMicroUsd(v int64) {
o.CapMicroUsd = &v
}
// GetComputeRef returns the ComputeRef field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetComputeRef(v string) {
o.ComputeRef = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetDescription(v string) {
o.Description = &v
}
// GetEmoji returns the Emoji field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetEmoji(v string) {
o.Emoji = &v
}
// GetExecutionMode returns the ExecutionMode field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetExecutionMode(v string) {
o.ExecutionMode = &v
}
// GetInstructions returns the Instructions field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetInstructions(v string) {
o.Instructions = &v
}
// GetMaxTaskMicroUsd returns the MaxTaskMicroUsd field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetMaxTaskMicroUsd(v int64) {
o.MaxTaskMicroUsd = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetModel(v string) {
o.Model = &v
}
// GetPeriod returns the Period field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetPeriod(v string) {
o.Period = &v
}
// GetRef returns the Ref field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) GetRef() string {
if o == nil || IsNil(o.Ref) {
var ret string
return ret
}
return *o.Ref
}
// GetRefOk returns a tuple with the Ref field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentUpdateAgentIn) GetRefOk() (*string, bool) {
if o == nil || IsNil(o.Ref) {
return nil, false
}
return o.Ref, true
}
// HasRef returns a boolean if a field has been set.
func (o *AgentUpdateAgentIn) HasRef() bool {
if o != nil && !IsNil(o.Ref) {
return true
}
return false
}
// SetRef gets a reference to the given string and assigns it to the Ref field.
func (o *AgentUpdateAgentIn) SetRef(v string) {
o.Ref = &v
}
// GetSchedule returns the Schedule field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetSchedule(v string) {
o.Schedule = &v
}
// GetServiceAccountId returns the ServiceAccountId field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetServiceAccountId(v string) {
o.ServiceAccountId = &v
}
// GetTools returns the Tools field value if set, zero value otherwise.
func (o *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) 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 *AgentUpdateAgentIn) SetTools(v []string) {
o.Tools = v
}
func (o AgentUpdateAgentIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentUpdateAgentIn) 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.Period) {
toSerialize["period"] = o.Period
}
if !IsNil(o.Ref) {
toSerialize["ref"] = o.Ref
}
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 *AgentUpdateAgentIn) UnmarshalJSON(data []byte) (err error) {
varAgentUpdateAgentIn := _AgentUpdateAgentIn{}
err = json.Unmarshal(data, &varAgentUpdateAgentIn)
if err != nil {
return err
}
*o = AgentUpdateAgentIn(varAgentUpdateAgentIn)
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, "period")
delete(additionalProperties, "ref")
delete(additionalProperties, "schedule")
delete(additionalProperties, "serviceAccountId")
delete(additionalProperties, "tools")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentUpdateAgentIn struct {
value *AgentUpdateAgentIn
isSet bool
}
func (v NullableAgentUpdateAgentIn) Get() *AgentUpdateAgentIn {
return v.value
}
func (v *NullableAgentUpdateAgentIn) Set(val *AgentUpdateAgentIn) {
v.value = val
v.isSet = true
}
func (v NullableAgentUpdateAgentIn) IsSet() bool {
return v.isSet
}
func (v *NullableAgentUpdateAgentIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentUpdateAgentIn(val *AgentUpdateAgentIn) *NullableAgentUpdateAgentIn {
return &NullableAgentUpdateAgentIn{value: val, isSet: true}
}
func (v NullableAgentUpdateAgentIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentUpdateAgentIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}