mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
535 lines
15 KiB
Go
535 lines
15 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 AgentRoutedRunOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentRoutedRunOut{}
|
|
|
|
// AgentRoutedRunOut struct for AgentRoutedRunOut
|
|
type AgentRoutedRunOut struct {
|
|
// Base is the branch to start FROM. Empty means the repository's default — resolve it on the machine, since the machine is the one holding the clone.
|
|
Base *string `json:"base,omitempty"`
|
|
// Branch is the ref the run must push its work to, and the ONLY one it is permitted to write: the forge's ref policy refuses anything else from this run's credential. It is decided at dispatch and exists before the work does.
|
|
Branch *string `json:"branch,omitempty"`
|
|
// CloneURL is how to fetch the repository. It carries NO credential — the machine authenticates with the git identity it already holds — which is why this whole shape is safe to hand to a claimed runner.
|
|
CloneUrl *string `json:"cloneUrl,omitempty"`
|
|
// Effort is how hard that model reasons: low, medium or high. Empty is the model's own default.
|
|
Effort *string `json:"effort,omitempty"`
|
|
// Instructions are the person's own instructions for their runs, as they set them in their settings: the machine's harness reads them as its user's, the way AGENTS.md or CLAUDE.md in its home is read. Empty when they set none.
|
|
Instructions *string `json:"instructions,omitempty"`
|
|
// Model is the model the person asked the run's agent to think with, by the id GET /v1/models lists. Empty is the machine's own default.
|
|
Model *string `json:"model,omitempty"`
|
|
// Project is the product slug the run is filed under, so the machine can tag what it produces. Empty when the dispatch named none.
|
|
Project *string `json:"project,omitempty"`
|
|
// Prompt is the task, in full, as the person wrote it. There is no second field for context.
|
|
Prompt *string `json:"prompt,omitempty"`
|
|
// Repo is the repository to work in and CloneURL is how to fetch it.
|
|
Repo *string `json:"repo,omitempty"`
|
|
// SessionID is the live session opened at dispatch; the machine streams its turns into it.
|
|
SessionId *string `json:"sessionId,omitempty"`
|
|
// TimeoutSeconds bounds the run on the machine; 0 means the machine's own default.
|
|
TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentRoutedRunOut AgentRoutedRunOut
|
|
|
|
// NewAgentRoutedRunOut instantiates a new AgentRoutedRunOut 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 NewAgentRoutedRunOut() *AgentRoutedRunOut {
|
|
this := AgentRoutedRunOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentRoutedRunOutWithDefaults instantiates a new AgentRoutedRunOut 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 NewAgentRoutedRunOutWithDefaults() *AgentRoutedRunOut {
|
|
this := AgentRoutedRunOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) GetBase() string {
|
|
if o == nil || IsNil(o.Base) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Base
|
|
}
|
|
|
|
// GetBaseOk returns a tuple with the Base field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRoutedRunOut) GetBaseOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Base) {
|
|
return nil, false
|
|
}
|
|
return o.Base, true
|
|
}
|
|
|
|
// HasBase returns a boolean if a field has been set.
|
|
func (o *AgentRoutedRunOut) HasBase() bool {
|
|
if o != nil && !IsNil(o.Base) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBase gets a reference to the given string and assigns it to the Base field.
|
|
func (o *AgentRoutedRunOut) SetBase(v string) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetBranch returns the Branch field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) GetBranch() string {
|
|
if o == nil || IsNil(o.Branch) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Branch
|
|
}
|
|
|
|
// GetBranchOk returns a tuple with the Branch field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRoutedRunOut) GetBranchOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Branch) {
|
|
return nil, false
|
|
}
|
|
return o.Branch, true
|
|
}
|
|
|
|
// HasBranch returns a boolean if a field has been set.
|
|
func (o *AgentRoutedRunOut) HasBranch() bool {
|
|
if o != nil && !IsNil(o.Branch) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBranch gets a reference to the given string and assigns it to the Branch field.
|
|
func (o *AgentRoutedRunOut) SetBranch(v string) {
|
|
o.Branch = &v
|
|
}
|
|
|
|
// GetCloneUrl returns the CloneUrl field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) GetCloneUrl() string {
|
|
if o == nil || IsNil(o.CloneUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CloneUrl
|
|
}
|
|
|
|
// GetCloneUrlOk returns a tuple with the CloneUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRoutedRunOut) GetCloneUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CloneUrl) {
|
|
return nil, false
|
|
}
|
|
return o.CloneUrl, true
|
|
}
|
|
|
|
// HasCloneUrl returns a boolean if a field has been set.
|
|
func (o *AgentRoutedRunOut) HasCloneUrl() bool {
|
|
if o != nil && !IsNil(o.CloneUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCloneUrl gets a reference to the given string and assigns it to the CloneUrl field.
|
|
func (o *AgentRoutedRunOut) SetCloneUrl(v string) {
|
|
o.CloneUrl = &v
|
|
}
|
|
|
|
// GetEffort returns the Effort field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) GetEffort() string {
|
|
if o == nil || IsNil(o.Effort) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Effort
|
|
}
|
|
|
|
// GetEffortOk returns a tuple with the Effort field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRoutedRunOut) GetEffortOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Effort) {
|
|
return nil, false
|
|
}
|
|
return o.Effort, true
|
|
}
|
|
|
|
// HasEffort returns a boolean if a field has been set.
|
|
func (o *AgentRoutedRunOut) HasEffort() bool {
|
|
if o != nil && !IsNil(o.Effort) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEffort gets a reference to the given string and assigns it to the Effort field.
|
|
func (o *AgentRoutedRunOut) SetEffort(v string) {
|
|
o.Effort = &v
|
|
}
|
|
|
|
// GetInstructions returns the Instructions field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) 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 *AgentRoutedRunOut) 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 *AgentRoutedRunOut) 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 *AgentRoutedRunOut) SetInstructions(v string) {
|
|
o.Instructions = &v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) 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 *AgentRoutedRunOut) 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 *AgentRoutedRunOut) 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 *AgentRoutedRunOut) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetProject returns the Project field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) GetProject() string {
|
|
if o == nil || IsNil(o.Project) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Project
|
|
}
|
|
|
|
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRoutedRunOut) GetProjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Project) {
|
|
return nil, false
|
|
}
|
|
return o.Project, true
|
|
}
|
|
|
|
// HasProject returns a boolean if a field has been set.
|
|
func (o *AgentRoutedRunOut) HasProject() bool {
|
|
if o != nil && !IsNil(o.Project) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProject gets a reference to the given string and assigns it to the Project field.
|
|
func (o *AgentRoutedRunOut) SetProject(v string) {
|
|
o.Project = &v
|
|
}
|
|
|
|
// GetPrompt returns the Prompt field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) GetPrompt() string {
|
|
if o == nil || IsNil(o.Prompt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Prompt
|
|
}
|
|
|
|
// GetPromptOk returns a tuple with the Prompt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRoutedRunOut) GetPromptOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Prompt) {
|
|
return nil, false
|
|
}
|
|
return o.Prompt, true
|
|
}
|
|
|
|
// HasPrompt returns a boolean if a field has been set.
|
|
func (o *AgentRoutedRunOut) HasPrompt() bool {
|
|
if o != nil && !IsNil(o.Prompt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrompt gets a reference to the given string and assigns it to the Prompt field.
|
|
func (o *AgentRoutedRunOut) SetPrompt(v string) {
|
|
o.Prompt = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) GetRepo() string {
|
|
if o == nil || IsNil(o.Repo) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Repo
|
|
}
|
|
|
|
// GetRepoOk returns a tuple with the Repo field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRoutedRunOut) GetRepoOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Repo) {
|
|
return nil, false
|
|
}
|
|
return o.Repo, true
|
|
}
|
|
|
|
// HasRepo returns a boolean if a field has been set.
|
|
func (o *AgentRoutedRunOut) HasRepo() bool {
|
|
if o != nil && !IsNil(o.Repo) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepo gets a reference to the given string and assigns it to the Repo field.
|
|
func (o *AgentRoutedRunOut) SetRepo(v string) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
// GetSessionId returns the SessionId field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) GetSessionId() string {
|
|
if o == nil || IsNil(o.SessionId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SessionId
|
|
}
|
|
|
|
// GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRoutedRunOut) GetSessionIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SessionId) {
|
|
return nil, false
|
|
}
|
|
return o.SessionId, true
|
|
}
|
|
|
|
// HasSessionId returns a boolean if a field has been set.
|
|
func (o *AgentRoutedRunOut) HasSessionId() bool {
|
|
if o != nil && !IsNil(o.SessionId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSessionId gets a reference to the given string and assigns it to the SessionId field.
|
|
func (o *AgentRoutedRunOut) SetSessionId(v string) {
|
|
o.SessionId = &v
|
|
}
|
|
|
|
// GetTimeoutSeconds returns the TimeoutSeconds field value if set, zero value otherwise.
|
|
func (o *AgentRoutedRunOut) GetTimeoutSeconds() int64 {
|
|
if o == nil || IsNil(o.TimeoutSeconds) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.TimeoutSeconds
|
|
}
|
|
|
|
// GetTimeoutSecondsOk returns a tuple with the TimeoutSeconds field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentRoutedRunOut) GetTimeoutSecondsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.TimeoutSeconds) {
|
|
return nil, false
|
|
}
|
|
return o.TimeoutSeconds, true
|
|
}
|
|
|
|
// HasTimeoutSeconds returns a boolean if a field has been set.
|
|
func (o *AgentRoutedRunOut) HasTimeoutSeconds() bool {
|
|
if o != nil && !IsNil(o.TimeoutSeconds) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTimeoutSeconds gets a reference to the given int64 and assigns it to the TimeoutSeconds field.
|
|
func (o *AgentRoutedRunOut) SetTimeoutSeconds(v int64) {
|
|
o.TimeoutSeconds = &v
|
|
}
|
|
|
|
func (o AgentRoutedRunOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentRoutedRunOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Base) {
|
|
toSerialize["base"] = o.Base
|
|
}
|
|
if !IsNil(o.Branch) {
|
|
toSerialize["branch"] = o.Branch
|
|
}
|
|
if !IsNil(o.CloneUrl) {
|
|
toSerialize["cloneUrl"] = o.CloneUrl
|
|
}
|
|
if !IsNil(o.Effort) {
|
|
toSerialize["effort"] = o.Effort
|
|
}
|
|
if !IsNil(o.Instructions) {
|
|
toSerialize["instructions"] = o.Instructions
|
|
}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
if !IsNil(o.Project) {
|
|
toSerialize["project"] = o.Project
|
|
}
|
|
if !IsNil(o.Prompt) {
|
|
toSerialize["prompt"] = o.Prompt
|
|
}
|
|
if !IsNil(o.Repo) {
|
|
toSerialize["repo"] = o.Repo
|
|
}
|
|
if !IsNil(o.SessionId) {
|
|
toSerialize["sessionId"] = o.SessionId
|
|
}
|
|
if !IsNil(o.TimeoutSeconds) {
|
|
toSerialize["timeoutSeconds"] = o.TimeoutSeconds
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentRoutedRunOut) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentRoutedRunOut := _AgentRoutedRunOut{}
|
|
|
|
err = json.Unmarshal(data, &varAgentRoutedRunOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentRoutedRunOut(varAgentRoutedRunOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "base")
|
|
delete(additionalProperties, "branch")
|
|
delete(additionalProperties, "cloneUrl")
|
|
delete(additionalProperties, "effort")
|
|
delete(additionalProperties, "instructions")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "project")
|
|
delete(additionalProperties, "prompt")
|
|
delete(additionalProperties, "repo")
|
|
delete(additionalProperties, "sessionId")
|
|
delete(additionalProperties, "timeoutSeconds")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentRoutedRunOut struct {
|
|
value *AgentRoutedRunOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentRoutedRunOut) Get() *AgentRoutedRunOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentRoutedRunOut) Set(val *AgentRoutedRunOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentRoutedRunOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentRoutedRunOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentRoutedRunOut(val *AgentRoutedRunOut) *NullableAgentRoutedRunOut {
|
|
return &NullableAgentRoutedRunOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentRoutedRunOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentRoutedRunOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|