mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
801 lines
26 KiB
Go
801 lines
26 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 AgentCodingStartIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentCodingStartIn{}
|
|
|
|
// AgentCodingStartIn struct for AgentCodingStartIn
|
|
type AgentCodingStartIn struct {
|
|
// After names a previous run's session, and starts this one from where that one stopped instead of from the repository's default. It is how a follow-up instruction — \"now add tests for it\" — builds on work already done rather than beginning again on a fresh clone: the follow-up resumes the earlier run's sandbox and works in its tree, files, installs and all, while that sandbox is kept; one reaped by then is cloned again from the earlier branch. The follow-up writes the SAME branch the earlier run did, on top of its commits, so one piece of work is one branch and one pull request however many instructions it takes. It pushes without force, so it only ever adds to that branch. When the earlier run was on another repository, or kept its work local, there is no branch to carry on and the follow-up writes a new one. Branch names the branch instead. A caller who already knows the branch may pass Base directly. Base wins if both are given.
|
|
After *string `json:"after,omitempty"`
|
|
// AgentRef names a configured agent to run as, which is how an org pins a harness, a model and a prompt to a name. Empty runs the default agent.
|
|
AgentRef *string `json:"agentRef,omitempty"`
|
|
// Base is the branch to start from. Empty takes the repository's default. The run never writes here — it writes the agent branch it answers with.
|
|
Base *string `json:"base,omitempty"`
|
|
// Branch names the branch the run writes, as `agent/<name>`: pass the name alone, or with the prefix. Runs write only under `agent/`, never to Base or to the default branch, so the name is letters, digits, `.`, `_` and `-`. Empty takes `agent/` and the first part of the run's session id, or the earlier run's branch when After names one. A branch that already exists on the repository is carried on, not replaced: the run starts from it and adds commits, and its pull request is the one it already has.
|
|
Branch *string `json:"branch,omitempty"`
|
|
// Desktop asks for a run with a SCREEN — an image carrying an X server — for a task that has to drive a browser or another windowed program. False, the default, is a headless checkout, which is what writing code needs.
|
|
Desktop *bool `json:"desktop,omitempty"`
|
|
// Effort is how hard that model reasons: low, medium or high. Empty takes the model's own default. Taken by the dev and codex harnesses, like Model.
|
|
Effort *string `json:"effort,omitempty"`
|
|
// Issue is the issue this run resolves: its number on Repo (`464` or `#464`), or `owner/name#464` for an issue in another repository. Its pull request says `Closes <issue>`, so merging the work closes the issue. Empty, or 0, is a run no issue asked for.
|
|
Issue *string `json:"issue,omitempty"`
|
|
// Mode is what the run may do to the repository: `build` edits, commits and pushes its branch; `plan` reads the repository and answers with a plan, writing nothing — its sandbox is handed a credential that can only read and no push step runs, and the plan arrives as the run's final status. `setup` is a plan put to one question: its agent explores the checkout, installs and checks what it finds, and ends with the codebase's environment, which is kept as the proposal at /v1/environment/{repo} until someone saves it. Empty is `build`. A plan or a setup runs in our sandbox only: a claimed machine clones and pushes with its own credential, so one routed to a machine is refused.
|
|
Mode *string `json:"mode,omitempty"`
|
|
// Model is the model the run's agent thinks with, by the id GET /v1/models lists. Empty takes the platform's coding model. The dev and codex harnesses take it; the others do not think with a model we name, so naming one for them is refused.
|
|
Model *string `json:"model,omitempty"`
|
|
// Project scopes the run to one board's work when the org keeps more than one. Empty is the org's default.
|
|
Project *string `json:"project,omitempty"`
|
|
// Prompt is the task, in the words you would use with a colleague who has the checkout open. It is the whole instruction: there is no second field for context, and a prompt that names files and the outcome it wants gets a run that does not have to guess either.
|
|
Prompt *string `json:"prompt,omitempty"`
|
|
// Pull is whether the run opens a pull request for what it pushed. Unset, it pushes the branch and opens none: a pull request is the step after the work, taken when it is ready, and a run resumed with `after` adds to the same branch. True opens one when the run changed something.
|
|
Pull *bool `json:"pull,omitempty"`
|
|
// Reply is WHERE THE RUN NARRATES ITSELF, when the surface that started it has somewhere for it to talk. Empty means nobody is listening and the run simply does not narrate — which is the app surface's case, because /v1/agent/coding hands back a session id and the session stream is a better progress feed than any message could be. IT IS NOT A FIELD A MODEL FILLS IN. A run asked for in a conversation is dispatched with the address that conversation is happening at, written over whatever arrived here (apps/agents/replyto.go). A model naming a channel is a model naming a channel it was not spoken to in, so the value it chose is discarded rather than argued with — which is the same rule that left the org and the subject off this type entirely.
|
|
Reply *AgentReply `json:"reply,omitempty"`
|
|
// Repo is what to work on: a repository's name, `owner/name` in the caller's own org, or the site a repository serves (`hanzo.ai`), as the person said it. The engine resolves it against the org's own repositories — a name that matches none is refused with the nearest ones — and finds the clone URL and the push credential from the org itself, so this says WHICH repository and never how to reach it. A repository on GitHub is named by GitHub's address, `github.com/owner/name` — or `owner/name` when the owner is not the org's own — and runs there directly: it is admitted when the caller's own connected GitHub may push to it, or when the caller administers the org and the org's installation holds it, and refused otherwise. A repository the caller can read and not push to — a public repository, or one their GitHub reads — is cloned read-only: the run works, commits in its workspace, and pushes nothing; its change is kept as the run's artifacts. Empty runs in an empty workspace: a fresh git repository in the sandbox, with nothing cloned and nothing pushed.
|
|
Repo *string `json:"repo,omitempty"`
|
|
// TargetID routes the run to a registered machine the org has claimed instead of to a sandbox in our cluster. Empty runs it here, which is the usual case.
|
|
TargetId *string `json:"targetId,omitempty"`
|
|
// Task is Prompt under the name a caller asking for work tends to reach for. The two are one field: Prompt wins when both are given.
|
|
Task *string `json:"task,omitempty"`
|
|
// TimeoutSeconds bounds the whole run. Unset takes the default budget; a run that hits the bound is stopped and reports what it had done by then.
|
|
TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"`
|
|
// Tool is which harness runs the prompt — dev | claude | codex | python | node — and Desktop is whether the run needs a screen. Both are empty by default, which is `dev` with no screen, and that default is what every caller gets until it says otherwise. They are two fields because they are two questions. The harness decides what argv starts; the screen decides which image carries an X server. A caller may want claude WITH a browser it can see, and a single enum would have made that combination unsayable.
|
|
Tool *string `json:"tool,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentCodingStartIn AgentCodingStartIn
|
|
|
|
// NewAgentCodingStartIn instantiates a new AgentCodingStartIn 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 NewAgentCodingStartIn() *AgentCodingStartIn {
|
|
this := AgentCodingStartIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentCodingStartInWithDefaults instantiates a new AgentCodingStartIn 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 NewAgentCodingStartInWithDefaults() *AgentCodingStartIn {
|
|
this := AgentCodingStartIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetAfter returns the After field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetAfter() string {
|
|
if o == nil || IsNil(o.After) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.After
|
|
}
|
|
|
|
// GetAfterOk returns a tuple with the After field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetAfterOk() (*string, bool) {
|
|
if o == nil || IsNil(o.After) {
|
|
return nil, false
|
|
}
|
|
return o.After, true
|
|
}
|
|
|
|
// HasAfter returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasAfter() bool {
|
|
if o != nil && !IsNil(o.After) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAfter gets a reference to the given string and assigns it to the After field.
|
|
func (o *AgentCodingStartIn) SetAfter(v string) {
|
|
o.After = &v
|
|
}
|
|
|
|
// GetAgentRef returns the AgentRef field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetAgentRef() string {
|
|
if o == nil || IsNil(o.AgentRef) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AgentRef
|
|
}
|
|
|
|
// GetAgentRefOk returns a tuple with the AgentRef field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetAgentRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AgentRef) {
|
|
return nil, false
|
|
}
|
|
return o.AgentRef, true
|
|
}
|
|
|
|
// HasAgentRef returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasAgentRef() bool {
|
|
if o != nil && !IsNil(o.AgentRef) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAgentRef gets a reference to the given string and assigns it to the AgentRef field.
|
|
func (o *AgentCodingStartIn) SetAgentRef(v string) {
|
|
o.AgentRef = &v
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) SetBase(v string) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetBranch returns the Branch field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) SetBranch(v string) {
|
|
o.Branch = &v
|
|
}
|
|
|
|
// GetDesktop returns the Desktop field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetDesktop() bool {
|
|
if o == nil || IsNil(o.Desktop) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Desktop
|
|
}
|
|
|
|
// GetDesktopOk returns a tuple with the Desktop field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetDesktopOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Desktop) {
|
|
return nil, false
|
|
}
|
|
return o.Desktop, true
|
|
}
|
|
|
|
// HasDesktop returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasDesktop() bool {
|
|
if o != nil && !IsNil(o.Desktop) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDesktop gets a reference to the given bool and assigns it to the Desktop field.
|
|
func (o *AgentCodingStartIn) SetDesktop(v bool) {
|
|
o.Desktop = &v
|
|
}
|
|
|
|
// GetEffort returns the Effort field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) SetEffort(v string) {
|
|
o.Effort = &v
|
|
}
|
|
|
|
// GetIssue returns the Issue field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetIssue() string {
|
|
if o == nil || IsNil(o.Issue) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Issue
|
|
}
|
|
|
|
// GetIssueOk returns a tuple with the Issue field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetIssueOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Issue) {
|
|
return nil, false
|
|
}
|
|
return o.Issue, true
|
|
}
|
|
|
|
// HasIssue returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasIssue() bool {
|
|
if o != nil && !IsNil(o.Issue) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIssue gets a reference to the given string and assigns it to the Issue field.
|
|
func (o *AgentCodingStartIn) SetIssue(v string) {
|
|
o.Issue = &v
|
|
}
|
|
|
|
// GetMode returns the Mode field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetMode() string {
|
|
if o == nil || IsNil(o.Mode) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Mode
|
|
}
|
|
|
|
// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetModeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Mode) {
|
|
return nil, false
|
|
}
|
|
return o.Mode, true
|
|
}
|
|
|
|
// HasMode returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasMode() bool {
|
|
if o != nil && !IsNil(o.Mode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMode gets a reference to the given string and assigns it to the Mode field.
|
|
func (o *AgentCodingStartIn) SetMode(v string) {
|
|
o.Mode = &v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetProject returns the Project field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) SetProject(v string) {
|
|
o.Project = &v
|
|
}
|
|
|
|
// GetPrompt returns the Prompt field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) SetPrompt(v string) {
|
|
o.Prompt = &v
|
|
}
|
|
|
|
// GetPull returns the Pull field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetPull() bool {
|
|
if o == nil || IsNil(o.Pull) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Pull
|
|
}
|
|
|
|
// GetPullOk returns a tuple with the Pull field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetPullOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Pull) {
|
|
return nil, false
|
|
}
|
|
return o.Pull, true
|
|
}
|
|
|
|
// HasPull returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasPull() bool {
|
|
if o != nil && !IsNil(o.Pull) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPull gets a reference to the given bool and assigns it to the Pull field.
|
|
func (o *AgentCodingStartIn) SetPull(v bool) {
|
|
o.Pull = &v
|
|
}
|
|
|
|
// GetReply returns the Reply field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetReply() AgentReply {
|
|
if o == nil || IsNil(o.Reply) {
|
|
var ret AgentReply
|
|
return ret
|
|
}
|
|
return *o.Reply
|
|
}
|
|
|
|
// GetReplyOk returns a tuple with the Reply field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetReplyOk() (*AgentReply, bool) {
|
|
if o == nil || IsNil(o.Reply) {
|
|
return nil, false
|
|
}
|
|
return o.Reply, true
|
|
}
|
|
|
|
// HasReply returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasReply() bool {
|
|
if o != nil && !IsNil(o.Reply) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReply gets a reference to the given AgentReply and assigns it to the Reply field.
|
|
func (o *AgentCodingStartIn) SetReply(v AgentReply) {
|
|
o.Reply = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) SetRepo(v string) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
// GetTargetId returns the TargetId field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetTargetId() string {
|
|
if o == nil || IsNil(o.TargetId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.TargetId
|
|
}
|
|
|
|
// GetTargetIdOk returns a tuple with the TargetId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetTargetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.TargetId) {
|
|
return nil, false
|
|
}
|
|
return o.TargetId, true
|
|
}
|
|
|
|
// HasTargetId returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasTargetId() bool {
|
|
if o != nil && !IsNil(o.TargetId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTargetId gets a reference to the given string and assigns it to the TargetId field.
|
|
func (o *AgentCodingStartIn) SetTargetId(v string) {
|
|
o.TargetId = &v
|
|
}
|
|
|
|
// GetTask returns the Task field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetTask() string {
|
|
if o == nil || IsNil(o.Task) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Task
|
|
}
|
|
|
|
// GetTaskOk returns a tuple with the Task field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetTaskOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Task) {
|
|
return nil, false
|
|
}
|
|
return o.Task, true
|
|
}
|
|
|
|
// HasTask returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasTask() bool {
|
|
if o != nil && !IsNil(o.Task) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTask gets a reference to the given string and assigns it to the Task field.
|
|
func (o *AgentCodingStartIn) SetTask(v string) {
|
|
o.Task = &v
|
|
}
|
|
|
|
// GetTimeoutSeconds returns the TimeoutSeconds field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) 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 *AgentCodingStartIn) SetTimeoutSeconds(v int64) {
|
|
o.TimeoutSeconds = &v
|
|
}
|
|
|
|
// GetTool returns the Tool field value if set, zero value otherwise.
|
|
func (o *AgentCodingStartIn) GetTool() string {
|
|
if o == nil || IsNil(o.Tool) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Tool
|
|
}
|
|
|
|
// GetToolOk returns a tuple with the Tool field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentCodingStartIn) GetToolOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Tool) {
|
|
return nil, false
|
|
}
|
|
return o.Tool, true
|
|
}
|
|
|
|
// HasTool returns a boolean if a field has been set.
|
|
func (o *AgentCodingStartIn) HasTool() bool {
|
|
if o != nil && !IsNil(o.Tool) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTool gets a reference to the given string and assigns it to the Tool field.
|
|
func (o *AgentCodingStartIn) SetTool(v string) {
|
|
o.Tool = &v
|
|
}
|
|
|
|
func (o AgentCodingStartIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentCodingStartIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.After) {
|
|
toSerialize["after"] = o.After
|
|
}
|
|
if !IsNil(o.AgentRef) {
|
|
toSerialize["agentRef"] = o.AgentRef
|
|
}
|
|
if !IsNil(o.Base) {
|
|
toSerialize["base"] = o.Base
|
|
}
|
|
if !IsNil(o.Branch) {
|
|
toSerialize["branch"] = o.Branch
|
|
}
|
|
if !IsNil(o.Desktop) {
|
|
toSerialize["desktop"] = o.Desktop
|
|
}
|
|
if !IsNil(o.Effort) {
|
|
toSerialize["effort"] = o.Effort
|
|
}
|
|
if !IsNil(o.Issue) {
|
|
toSerialize["issue"] = o.Issue
|
|
}
|
|
if !IsNil(o.Mode) {
|
|
toSerialize["mode"] = o.Mode
|
|
}
|
|
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.Pull) {
|
|
toSerialize["pull"] = o.Pull
|
|
}
|
|
if !IsNil(o.Reply) {
|
|
toSerialize["reply"] = o.Reply
|
|
}
|
|
if !IsNil(o.Repo) {
|
|
toSerialize["repo"] = o.Repo
|
|
}
|
|
if !IsNil(o.TargetId) {
|
|
toSerialize["targetId"] = o.TargetId
|
|
}
|
|
if !IsNil(o.Task) {
|
|
toSerialize["task"] = o.Task
|
|
}
|
|
if !IsNil(o.TimeoutSeconds) {
|
|
toSerialize["timeoutSeconds"] = o.TimeoutSeconds
|
|
}
|
|
if !IsNil(o.Tool) {
|
|
toSerialize["tool"] = o.Tool
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentCodingStartIn) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentCodingStartIn := _AgentCodingStartIn{}
|
|
|
|
err = json.Unmarshal(data, &varAgentCodingStartIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentCodingStartIn(varAgentCodingStartIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "after")
|
|
delete(additionalProperties, "agentRef")
|
|
delete(additionalProperties, "base")
|
|
delete(additionalProperties, "branch")
|
|
delete(additionalProperties, "desktop")
|
|
delete(additionalProperties, "effort")
|
|
delete(additionalProperties, "issue")
|
|
delete(additionalProperties, "mode")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "project")
|
|
delete(additionalProperties, "prompt")
|
|
delete(additionalProperties, "pull")
|
|
delete(additionalProperties, "reply")
|
|
delete(additionalProperties, "repo")
|
|
delete(additionalProperties, "targetId")
|
|
delete(additionalProperties, "task")
|
|
delete(additionalProperties, "timeoutSeconds")
|
|
delete(additionalProperties, "tool")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentCodingStartIn struct {
|
|
value *AgentCodingStartIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentCodingStartIn) Get() *AgentCodingStartIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentCodingStartIn) Set(val *AgentCodingStartIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentCodingStartIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentCodingStartIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentCodingStartIn(val *AgentCodingStartIn) *NullableAgentCodingStartIn {
|
|
return &NullableAgentCodingStartIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentCodingStartIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentCodingStartIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|