Files
sdk/model_agent_session_detail.go

1561 lines
47 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 AgentSessionDetail type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentSessionDetail{}
// AgentSessionDetail struct for AgentSessionDetail
type AgentSessionDetail struct {
// Account is which subscription or API account under that provider served it. Together with Provider it is what a login revoke matches on to stop the sessions a withdrawn account was paying for.
Account *string `json:"account,omitempty"`
// Actor is WHO this session belongs to, as \"org/sub\" — the same identity a run is billed under. A register that names none takes the calling principal. It is what scopes a login revoke, so a session with the wrong actor is a session the right person cannot stop.
Actor *string `json:"actor,omitempty"`
// Agent is the label the surface running this session calls itself by (\"hanzo-dev\"), up to 128 characters. Required at register. It is free text, not a reference: it need not name a defined agent, and nothing resolves it.
Agent *string `json:"agent,omitempty"`
// Base is the branch the run started from. Empty when it took the repository's default and did not say which.
Base *string `json:"base,omitempty"`
// Branch is the branch the run pushes its work to, and the only one it may write.
Branch *string `json:"branch,omitempty"`
// Channel is the collaborative channel this run was started in (HIP-0523), empty when it came from anywhere else — a CLI, a schedule, an API call. It is what lets a space view show the runs of one channel beside its messages.
Channel *string `json:"channel,omitempty"`
// Children is the session's DIRECT children, one level down, each with its own counts. The promoted `children` integer beside it is how many there are; this is who they are. For the whole subtree, read the tree.
ChildSessions []AgentSessionView `json:"childSessions,omitempty"`
// Children is the DIRECT fan-out — how many sessions name this one as parent — and not the size of the subtree. Read the tree for that.
Children *int64 `json:"children,omitempty"`
// CreatedAt is when the row was written, same format. Every path that opens a session stamps it and StartedAt from one clock reading, so the two are equal on every session this surface has ever produced.
CreatedAt *string `json:"createdAt,omitempty"`
// Cwd is the directory the session is working in NOW, not the one it started in: a linked shell moves around, and a card showing where `hanzo link` was run answers \"which work is this\" with something that was true once.
Cwd *string `json:"cwd,omitempty"`
// EndedAt is when it reached done or error, same format. Empty while it is still running or paused, which is how absence reads here: not over yet.
EndedAt *string `json:"endedAt,omitempty"`
// Environment is where the run executes: \"sandbox\" for a Hanzo sandbox, or the id of the org's machine it was routed to (the same id Target carries).
Environment *string `json:"environment,omitempty"`
// Error explains why the session ended in error, when it did. Empty for any other status.
Error *string `json:"error,omitempty"`
// Events is how many turns the session's log holds, counted at read time. It is the whole log, however few of them RecentEvents carries.
Events *int64 `json:"events,omitempty"`
// Execution context (mission-control): the machine/repo/cwd a card shows and the run-target a session is dispatched to. Omitted when a surface didn't report it.
Host *string `json:"host,omitempty"`
// ID is the session's handle, minted here as \"sess_\" + 32 hex characters. Every later read, patch, event append and control command is addressed with it, and a caller cannot choose it.
Id *string `json:"id,omitempty"`
// Kind is what sort of run this session is the view of — \"coding\" for a coding run. Empty for a session no run tagged.
Kind *string `json:"kind,omitempty"`
// LastEvent is the compact latest-activity line for the list projection (nil in register/patch/tree responses; set by list + detail). It lets a swipe card show a live one-line preview without fetching full detail.
LastEvent *AgentLastEventView `json:"lastEvent,omitempty"`
// Mode is what the run may do to its repository: \"build\" edits, commits and pushes its branch; \"plan\" reads and answers with a plan, writing nothing. Empty for a session no run tagged.
Mode *string `json:"mode,omitempty"`
// Org is the caller's OWN tenant, echoed so a client can build the public build URL (/builds/:org/:project) without a second call or a guess. It is never another tenant's — every read is org-scoped before it gets here.
Org *string `json:"org,omitempty"`
// ParentSessionID is the session that spawned this one, making this a subagent of it. Empty means this session is a root — a flow of its own. A parent always belongs to the same org, so a tree never crosses a tenant.
ParentSessionId *string `json:"parentSessionId,omitempty"`
// PR is the address of the pull request the run proposed. Empty until it proposes one, and for a run that changed nothing.
Pr *string `json:"pr,omitempty"`
// Progress is how far along this run is — a share of its goal, a phase, and a line saying what it is doing. Always present, so a board never branches on whether it is there; `phase` says \"unknown\" when nothing has estimated it. It is a MODEL ESTIMATE wherever `estimated` is true, and the row's own word where it is false. See progress.go.
Progress *AgentSessionProgress `json:"progress,omitempty"`
// The readable build: the product this session built and whether its story is public (provenance.go).
Project *string `json:"project,omitempty"`
// Provider is the linked AI account's provider (claude | codex | hanzo | …) that served this run. Empty when the surface did not say.
Provider *string `json:"provider,omitempty"`
// Published is the author's decision to let anyone read this session's story at the public build route. It only ever widens READ access to a session that already exists and grants nothing else; false, an unpublished session is invisible there no matter who asks. It cannot be true without a Project, because that route is keyed on (org, project).
Published *bool `json:"published,omitempty"`
// RecentEvents is the 50 most recent turns, OLDEST of those first — a transcript to read down, not a feed. The promoted `events` integer says how many the log holds in total; page the rest from a seq.
RecentEvents []AgentEventView `json:"recentEvents,omitempty"`
// Repo is the code the session is working on, as the surface reported it. It is truth the SURFACE states, so it is a label rather than something resolved here.
Repo *string `json:"repo,omitempty"`
// RootSessionID is the top of this session's tree, inherited from the parent and shared by every node in one flow. A root session's own id, when it has no parent. It is the key one indexed read pulls a whole flow by, and what ?root= narrows a list or a stream to.
RootSessionId *string `json:"rootSessionId,omitempty"`
// Sandbox is the id of the sandbox the run works in (\"m_\" and 24 hex), the handle its terminal and its screen are opened with (/v1/sandbox/{id}/terminal, /screen). Set when the run leases it, and kept once the run gives it back, when the id opens nothing. Empty for a run that never leased one — a routed run, or a turn that only talked.
Sandbox *string `json:"sandbox,omitempty"`
// StartedAt is when the session opened, RFC 3339 in UTC to the second.
StartedAt *string `json:"startedAt,omitempty"`
// Status is one of exactly four: running, paused, done, error. running and paused are LIVE; done and error are TERMINAL and monotonic — once a session reaches one it can never go back, because reopening a finished run would fabricate liveness. A control command never moves it: the surface running the agent reports the new status, and until it does the command is only recorded.
Status *string `json:"status,omitempty"`
// Target is the registered run-target this session is dispatched to — a machine the org claimed, resolved same-org when it was set, so it can never point at another tenant's computer. Empty means the session names no machine.
Target *string `json:"target,omitempty"`
// TaskRunID is that workflow's particular run. A workflow is the definition and a run is one execution of it, which is why both are carried.
TaskRunId *string `json:"taskRunId,omitempty"`
// TaskWorkflowID is the hanzoai/tasks durable workflow that actually EXECUTES this session — this registry is the view, control and stream layer over it. Set, a control command is FORWARDED to that engine; empty, the running surface polls for commands instead, which is every session today.
TaskWorkflowId *string `json:"taskWorkflowId,omitempty"`
// Terminal is where this session can be WATCHED — the URL the machine published for its live terminal. Omitted when it publishes none.
Terminal *string `json:"terminal,omitempty"`
// Title is the human line a card shows (\"ship the landing page\"), up to 512 characters. Free text, and the one field a surface may rewrite as the work turns out to be something else.
Title *string `json:"title,omitempty"`
// UpdatedAt is the session's last-activity clock, same format. It moves on a write to the row — a status, a title, a re-dispatch — AND on every appended turn, because the append bumps it in the same transaction. The list is ordered on CreatedAt, so this is the field that says whether a session is still saying anything.
UpdatedAt *string `json:"updatedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentSessionDetail AgentSessionDetail
// NewAgentSessionDetail instantiates a new AgentSessionDetail 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 NewAgentSessionDetail() *AgentSessionDetail {
this := AgentSessionDetail{}
return &this
}
// NewAgentSessionDetailWithDefaults instantiates a new AgentSessionDetail 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 NewAgentSessionDetailWithDefaults() *AgentSessionDetail {
this := AgentSessionDetail{}
return &this
}
// GetAccount returns the Account field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetAccount() string {
if o == nil || IsNil(o.Account) {
var ret string
return ret
}
return *o.Account
}
// GetAccountOk returns a tuple with the Account field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetAccountOk() (*string, bool) {
if o == nil || IsNil(o.Account) {
return nil, false
}
return o.Account, true
}
// HasAccount returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasAccount() bool {
if o != nil && !IsNil(o.Account) {
return true
}
return false
}
// SetAccount gets a reference to the given string and assigns it to the Account field.
func (o *AgentSessionDetail) SetAccount(v string) {
o.Account = &v
}
// GetActor returns the Actor field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetActor(v string) {
o.Actor = &v
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetAgent(v string) {
o.Agent = &v
}
// GetBase returns the Base field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetBase(v string) {
o.Base = &v
}
// GetBranch returns the Branch field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetBranch(v string) {
o.Branch = &v
}
// GetChannel returns the Channel field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetChannel() string {
if o == nil || IsNil(o.Channel) {
var ret string
return ret
}
return *o.Channel
}
// GetChannelOk returns a tuple with the Channel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetChannelOk() (*string, bool) {
if o == nil || IsNil(o.Channel) {
return nil, false
}
return o.Channel, true
}
// HasChannel returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasChannel() bool {
if o != nil && !IsNil(o.Channel) {
return true
}
return false
}
// SetChannel gets a reference to the given string and assigns it to the Channel field.
func (o *AgentSessionDetail) SetChannel(v string) {
o.Channel = &v
}
// GetChildSessions returns the ChildSessions field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetChildSessions() []AgentSessionView {
if o == nil || IsNil(o.ChildSessions) {
var ret []AgentSessionView
return ret
}
return o.ChildSessions
}
// GetChildSessionsOk returns a tuple with the ChildSessions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetChildSessionsOk() ([]AgentSessionView, bool) {
if o == nil || IsNil(o.ChildSessions) {
return nil, false
}
return o.ChildSessions, true
}
// HasChildSessions returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasChildSessions() bool {
if o != nil && !IsNil(o.ChildSessions) {
return true
}
return false
}
// SetChildSessions gets a reference to the given []AgentSessionView and assigns it to the ChildSessions field.
func (o *AgentSessionDetail) SetChildSessions(v []AgentSessionView) {
o.ChildSessions = v
}
// GetChildren returns the Children field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetChildren() int64 {
if o == nil || IsNil(o.Children) {
var ret int64
return ret
}
return *o.Children
}
// GetChildrenOk returns a tuple with the Children field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetChildrenOk() (*int64, bool) {
if o == nil || IsNil(o.Children) {
return nil, false
}
return o.Children, true
}
// HasChildren returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasChildren() bool {
if o != nil && !IsNil(o.Children) {
return true
}
return false
}
// SetChildren gets a reference to the given int64 and assigns it to the Children field.
func (o *AgentSessionDetail) SetChildren(v int64) {
o.Children = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetCwd returns the Cwd field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetCwd() string {
if o == nil || IsNil(o.Cwd) {
var ret string
return ret
}
return *o.Cwd
}
// GetCwdOk returns a tuple with the Cwd field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetCwdOk() (*string, bool) {
if o == nil || IsNil(o.Cwd) {
return nil, false
}
return o.Cwd, true
}
// HasCwd returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasCwd() bool {
if o != nil && !IsNil(o.Cwd) {
return true
}
return false
}
// SetCwd gets a reference to the given string and assigns it to the Cwd field.
func (o *AgentSessionDetail) SetCwd(v string) {
o.Cwd = &v
}
// GetEndedAt returns the EndedAt field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetEndedAt() string {
if o == nil || IsNil(o.EndedAt) {
var ret string
return ret
}
return *o.EndedAt
}
// GetEndedAtOk returns a tuple with the EndedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetEndedAtOk() (*string, bool) {
if o == nil || IsNil(o.EndedAt) {
return nil, false
}
return o.EndedAt, true
}
// HasEndedAt returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasEndedAt() bool {
if o != nil && !IsNil(o.EndedAt) {
return true
}
return false
}
// SetEndedAt gets a reference to the given string and assigns it to the EndedAt field.
func (o *AgentSessionDetail) SetEndedAt(v string) {
o.EndedAt = &v
}
// GetEnvironment returns the Environment field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetEnvironment() string {
if o == nil || IsNil(o.Environment) {
var ret string
return ret
}
return *o.Environment
}
// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetEnvironmentOk() (*string, bool) {
if o == nil || IsNil(o.Environment) {
return nil, false
}
return o.Environment, true
}
// HasEnvironment returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasEnvironment() bool {
if o != nil && !IsNil(o.Environment) {
return true
}
return false
}
// SetEnvironment gets a reference to the given string and assigns it to the Environment field.
func (o *AgentSessionDetail) SetEnvironment(v string) {
o.Environment = &v
}
// GetError returns the Error field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetError(v string) {
o.Error = &v
}
// GetEvents returns the Events field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetEvents() int64 {
if o == nil || IsNil(o.Events) {
var ret int64
return ret
}
return *o.Events
}
// GetEventsOk returns a tuple with the Events field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetEventsOk() (*int64, bool) {
if o == nil || IsNil(o.Events) {
return nil, false
}
return o.Events, true
}
// HasEvents returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasEvents() bool {
if o != nil && !IsNil(o.Events) {
return true
}
return false
}
// SetEvents gets a reference to the given int64 and assigns it to the Events field.
func (o *AgentSessionDetail) SetEvents(v int64) {
o.Events = &v
}
// GetHost returns the Host field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetHost() string {
if o == nil || IsNil(o.Host) {
var ret string
return ret
}
return *o.Host
}
// GetHostOk returns a tuple with the Host field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetHostOk() (*string, bool) {
if o == nil || IsNil(o.Host) {
return nil, false
}
return o.Host, true
}
// HasHost returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasHost() bool {
if o != nil && !IsNil(o.Host) {
return true
}
return false
}
// SetHost gets a reference to the given string and assigns it to the Host field.
func (o *AgentSessionDetail) SetHost(v string) {
o.Host = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetId(v string) {
o.Id = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetKind() string {
if o == nil || IsNil(o.Kind) {
var ret string
return ret
}
return *o.Kind
}
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetKindOk() (*string, bool) {
if o == nil || IsNil(o.Kind) {
return nil, false
}
return o.Kind, true
}
// HasKind returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasKind() bool {
if o != nil && !IsNil(o.Kind) {
return true
}
return false
}
// SetKind gets a reference to the given string and assigns it to the Kind field.
func (o *AgentSessionDetail) SetKind(v string) {
o.Kind = &v
}
// GetLastEvent returns the LastEvent field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetLastEvent() AgentLastEventView {
if o == nil || IsNil(o.LastEvent) {
var ret AgentLastEventView
return ret
}
return *o.LastEvent
}
// GetLastEventOk returns a tuple with the LastEvent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetLastEventOk() (*AgentLastEventView, bool) {
if o == nil || IsNil(o.LastEvent) {
return nil, false
}
return o.LastEvent, true
}
// HasLastEvent returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasLastEvent() bool {
if o != nil && !IsNil(o.LastEvent) {
return true
}
return false
}
// SetLastEvent gets a reference to the given AgentLastEventView and assigns it to the LastEvent field.
func (o *AgentSessionDetail) SetLastEvent(v AgentLastEventView) {
o.LastEvent = &v
}
// GetMode returns the Mode field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetMode(v string) {
o.Mode = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *AgentSessionDetail) SetOrg(v string) {
o.Org = &v
}
// GetParentSessionId returns the ParentSessionId field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetParentSessionId() string {
if o == nil || IsNil(o.ParentSessionId) {
var ret string
return ret
}
return *o.ParentSessionId
}
// GetParentSessionIdOk returns a tuple with the ParentSessionId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetParentSessionIdOk() (*string, bool) {
if o == nil || IsNil(o.ParentSessionId) {
return nil, false
}
return o.ParentSessionId, true
}
// HasParentSessionId returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasParentSessionId() bool {
if o != nil && !IsNil(o.ParentSessionId) {
return true
}
return false
}
// SetParentSessionId gets a reference to the given string and assigns it to the ParentSessionId field.
func (o *AgentSessionDetail) SetParentSessionId(v string) {
o.ParentSessionId = &v
}
// GetPr returns the Pr field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetPr() string {
if o == nil || IsNil(o.Pr) {
var ret string
return ret
}
return *o.Pr
}
// GetPrOk returns a tuple with the Pr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetPrOk() (*string, bool) {
if o == nil || IsNil(o.Pr) {
return nil, false
}
return o.Pr, true
}
// HasPr returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasPr() bool {
if o != nil && !IsNil(o.Pr) {
return true
}
return false
}
// SetPr gets a reference to the given string and assigns it to the Pr field.
func (o *AgentSessionDetail) SetPr(v string) {
o.Pr = &v
}
// GetProgress returns the Progress field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetProgress() AgentSessionProgress {
if o == nil || IsNil(o.Progress) {
var ret AgentSessionProgress
return ret
}
return *o.Progress
}
// GetProgressOk returns a tuple with the Progress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetProgressOk() (*AgentSessionProgress, bool) {
if o == nil || IsNil(o.Progress) {
return nil, false
}
return o.Progress, true
}
// HasProgress returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasProgress() bool {
if o != nil && !IsNil(o.Progress) {
return true
}
return false
}
// SetProgress gets a reference to the given AgentSessionProgress and assigns it to the Progress field.
func (o *AgentSessionDetail) SetProgress(v AgentSessionProgress) {
o.Progress = &v
}
// GetProject returns the Project field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetProject(v string) {
o.Project = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *AgentSessionDetail) SetProvider(v string) {
o.Provider = &v
}
// GetPublished returns the Published field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetPublished() bool {
if o == nil || IsNil(o.Published) {
var ret bool
return ret
}
return *o.Published
}
// GetPublishedOk returns a tuple with the Published field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetPublishedOk() (*bool, bool) {
if o == nil || IsNil(o.Published) {
return nil, false
}
return o.Published, true
}
// HasPublished returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasPublished() bool {
if o != nil && !IsNil(o.Published) {
return true
}
return false
}
// SetPublished gets a reference to the given bool and assigns it to the Published field.
func (o *AgentSessionDetail) SetPublished(v bool) {
o.Published = &v
}
// GetRecentEvents returns the RecentEvents field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetRecentEvents() []AgentEventView {
if o == nil || IsNil(o.RecentEvents) {
var ret []AgentEventView
return ret
}
return o.RecentEvents
}
// GetRecentEventsOk returns a tuple with the RecentEvents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetRecentEventsOk() ([]AgentEventView, bool) {
if o == nil || IsNil(o.RecentEvents) {
return nil, false
}
return o.RecentEvents, true
}
// HasRecentEvents returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasRecentEvents() bool {
if o != nil && !IsNil(o.RecentEvents) {
return true
}
return false
}
// SetRecentEvents gets a reference to the given []AgentEventView and assigns it to the RecentEvents field.
func (o *AgentSessionDetail) SetRecentEvents(v []AgentEventView) {
o.RecentEvents = v
}
// GetRepo returns the Repo field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetRepo(v string) {
o.Repo = &v
}
// GetRootSessionId returns the RootSessionId field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetRootSessionId() string {
if o == nil || IsNil(o.RootSessionId) {
var ret string
return ret
}
return *o.RootSessionId
}
// GetRootSessionIdOk returns a tuple with the RootSessionId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetRootSessionIdOk() (*string, bool) {
if o == nil || IsNil(o.RootSessionId) {
return nil, false
}
return o.RootSessionId, true
}
// HasRootSessionId returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasRootSessionId() bool {
if o != nil && !IsNil(o.RootSessionId) {
return true
}
return false
}
// SetRootSessionId gets a reference to the given string and assigns it to the RootSessionId field.
func (o *AgentSessionDetail) SetRootSessionId(v string) {
o.RootSessionId = &v
}
// GetSandbox returns the Sandbox field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetSandbox() string {
if o == nil || IsNil(o.Sandbox) {
var ret string
return ret
}
return *o.Sandbox
}
// GetSandboxOk returns a tuple with the Sandbox field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetSandboxOk() (*string, bool) {
if o == nil || IsNil(o.Sandbox) {
return nil, false
}
return o.Sandbox, true
}
// HasSandbox returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasSandbox() bool {
if o != nil && !IsNil(o.Sandbox) {
return true
}
return false
}
// SetSandbox gets a reference to the given string and assigns it to the Sandbox field.
func (o *AgentSessionDetail) SetSandbox(v string) {
o.Sandbox = &v
}
// GetStartedAt returns the StartedAt field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetStartedAt() string {
if o == nil || IsNil(o.StartedAt) {
var ret string
return ret
}
return *o.StartedAt
}
// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetStartedAtOk() (*string, bool) {
if o == nil || IsNil(o.StartedAt) {
return nil, false
}
return o.StartedAt, true
}
// HasStartedAt returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasStartedAt() bool {
if o != nil && !IsNil(o.StartedAt) {
return true
}
return false
}
// SetStartedAt gets a reference to the given string and assigns it to the StartedAt field.
func (o *AgentSessionDetail) SetStartedAt(v string) {
o.StartedAt = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) 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 *AgentSessionDetail) SetStatus(v string) {
o.Status = &v
}
// GetTarget returns the Target field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetTarget() string {
if o == nil || IsNil(o.Target) {
var ret string
return ret
}
return *o.Target
}
// GetTargetOk returns a tuple with the Target field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetTargetOk() (*string, bool) {
if o == nil || IsNil(o.Target) {
return nil, false
}
return o.Target, true
}
// HasTarget returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasTarget() bool {
if o != nil && !IsNil(o.Target) {
return true
}
return false
}
// SetTarget gets a reference to the given string and assigns it to the Target field.
func (o *AgentSessionDetail) SetTarget(v string) {
o.Target = &v
}
// GetTaskRunId returns the TaskRunId field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetTaskRunId() string {
if o == nil || IsNil(o.TaskRunId) {
var ret string
return ret
}
return *o.TaskRunId
}
// GetTaskRunIdOk returns a tuple with the TaskRunId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetTaskRunIdOk() (*string, bool) {
if o == nil || IsNil(o.TaskRunId) {
return nil, false
}
return o.TaskRunId, true
}
// HasTaskRunId returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasTaskRunId() bool {
if o != nil && !IsNil(o.TaskRunId) {
return true
}
return false
}
// SetTaskRunId gets a reference to the given string and assigns it to the TaskRunId field.
func (o *AgentSessionDetail) SetTaskRunId(v string) {
o.TaskRunId = &v
}
// GetTaskWorkflowId returns the TaskWorkflowId field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetTaskWorkflowId() string {
if o == nil || IsNil(o.TaskWorkflowId) {
var ret string
return ret
}
return *o.TaskWorkflowId
}
// GetTaskWorkflowIdOk returns a tuple with the TaskWorkflowId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetTaskWorkflowIdOk() (*string, bool) {
if o == nil || IsNil(o.TaskWorkflowId) {
return nil, false
}
return o.TaskWorkflowId, true
}
// HasTaskWorkflowId returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasTaskWorkflowId() bool {
if o != nil && !IsNil(o.TaskWorkflowId) {
return true
}
return false
}
// SetTaskWorkflowId gets a reference to the given string and assigns it to the TaskWorkflowId field.
func (o *AgentSessionDetail) SetTaskWorkflowId(v string) {
o.TaskWorkflowId = &v
}
// GetTerminal returns the Terminal field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetTerminal() string {
if o == nil || IsNil(o.Terminal) {
var ret string
return ret
}
return *o.Terminal
}
// GetTerminalOk returns a tuple with the Terminal field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetTerminalOk() (*string, bool) {
if o == nil || IsNil(o.Terminal) {
return nil, false
}
return o.Terminal, true
}
// HasTerminal returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasTerminal() bool {
if o != nil && !IsNil(o.Terminal) {
return true
}
return false
}
// SetTerminal gets a reference to the given string and assigns it to the Terminal field.
func (o *AgentSessionDetail) SetTerminal(v string) {
o.Terminal = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetTitle() string {
if o == nil || IsNil(o.Title) {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetTitleOk() (*string, bool) {
if o == nil || IsNil(o.Title) {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasTitle() bool {
if o != nil && !IsNil(o.Title) {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *AgentSessionDetail) SetTitle(v string) {
o.Title = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *AgentSessionDetail) GetUpdatedAt() string {
if o == nil || IsNil(o.UpdatedAt) {
var ret string
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentSessionDetail) GetUpdatedAtOk() (*string, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *AgentSessionDetail) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
func (o *AgentSessionDetail) SetUpdatedAt(v string) {
o.UpdatedAt = &v
}
func (o AgentSessionDetail) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentSessionDetail) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Account) {
toSerialize["account"] = o.Account
}
if !IsNil(o.Actor) {
toSerialize["actor"] = o.Actor
}
if !IsNil(o.Agent) {
toSerialize["agent"] = o.Agent
}
if !IsNil(o.Base) {
toSerialize["base"] = o.Base
}
if !IsNil(o.Branch) {
toSerialize["branch"] = o.Branch
}
if !IsNil(o.Channel) {
toSerialize["channel"] = o.Channel
}
if !IsNil(o.ChildSessions) {
toSerialize["childSessions"] = o.ChildSessions
}
if !IsNil(o.Children) {
toSerialize["children"] = o.Children
}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.Cwd) {
toSerialize["cwd"] = o.Cwd
}
if !IsNil(o.EndedAt) {
toSerialize["endedAt"] = o.EndedAt
}
if !IsNil(o.Environment) {
toSerialize["environment"] = o.Environment
}
if !IsNil(o.Error) {
toSerialize["error"] = o.Error
}
if !IsNil(o.Events) {
toSerialize["events"] = o.Events
}
if !IsNil(o.Host) {
toSerialize["host"] = o.Host
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.LastEvent) {
toSerialize["lastEvent"] = o.LastEvent
}
if !IsNil(o.Mode) {
toSerialize["mode"] = o.Mode
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.ParentSessionId) {
toSerialize["parentSessionId"] = o.ParentSessionId
}
if !IsNil(o.Pr) {
toSerialize["pr"] = o.Pr
}
if !IsNil(o.Progress) {
toSerialize["progress"] = o.Progress
}
if !IsNil(o.Project) {
toSerialize["project"] = o.Project
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
if !IsNil(o.Published) {
toSerialize["published"] = o.Published
}
if !IsNil(o.RecentEvents) {
toSerialize["recentEvents"] = o.RecentEvents
}
if !IsNil(o.Repo) {
toSerialize["repo"] = o.Repo
}
if !IsNil(o.RootSessionId) {
toSerialize["rootSessionId"] = o.RootSessionId
}
if !IsNil(o.Sandbox) {
toSerialize["sandbox"] = o.Sandbox
}
if !IsNil(o.StartedAt) {
toSerialize["startedAt"] = o.StartedAt
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Target) {
toSerialize["target"] = o.Target
}
if !IsNil(o.TaskRunId) {
toSerialize["taskRunId"] = o.TaskRunId
}
if !IsNil(o.TaskWorkflowId) {
toSerialize["taskWorkflowId"] = o.TaskWorkflowId
}
if !IsNil(o.Terminal) {
toSerialize["terminal"] = o.Terminal
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentSessionDetail) UnmarshalJSON(data []byte) (err error) {
varAgentSessionDetail := _AgentSessionDetail{}
err = json.Unmarshal(data, &varAgentSessionDetail)
if err != nil {
return err
}
*o = AgentSessionDetail(varAgentSessionDetail)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "account")
delete(additionalProperties, "actor")
delete(additionalProperties, "agent")
delete(additionalProperties, "base")
delete(additionalProperties, "branch")
delete(additionalProperties, "channel")
delete(additionalProperties, "childSessions")
delete(additionalProperties, "children")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "cwd")
delete(additionalProperties, "endedAt")
delete(additionalProperties, "environment")
delete(additionalProperties, "error")
delete(additionalProperties, "events")
delete(additionalProperties, "host")
delete(additionalProperties, "id")
delete(additionalProperties, "kind")
delete(additionalProperties, "lastEvent")
delete(additionalProperties, "mode")
delete(additionalProperties, "org")
delete(additionalProperties, "parentSessionId")
delete(additionalProperties, "pr")
delete(additionalProperties, "progress")
delete(additionalProperties, "project")
delete(additionalProperties, "provider")
delete(additionalProperties, "published")
delete(additionalProperties, "recentEvents")
delete(additionalProperties, "repo")
delete(additionalProperties, "rootSessionId")
delete(additionalProperties, "sandbox")
delete(additionalProperties, "startedAt")
delete(additionalProperties, "status")
delete(additionalProperties, "target")
delete(additionalProperties, "taskRunId")
delete(additionalProperties, "taskWorkflowId")
delete(additionalProperties, "terminal")
delete(additionalProperties, "title")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentSessionDetail struct {
value *AgentSessionDetail
isSet bool
}
func (v NullableAgentSessionDetail) Get() *AgentSessionDetail {
return v.value
}
func (v *NullableAgentSessionDetail) Set(val *AgentSessionDetail) {
v.value = val
v.isSet = true
}
func (v NullableAgentSessionDetail) IsSet() bool {
return v.isSet
}
func (v *NullableAgentSessionDetail) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentSessionDetail(val *AgentSessionDetail) *NullableAgentSessionDetail {
return &NullableAgentSessionDetail{value: val, isSet: true}
}
func (v NullableAgentSessionDetail) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentSessionDetail) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}