mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
1485 lines
44 KiB
Go
1485 lines
44 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 AgentSessionView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentSessionView{}
|
|
|
|
// AgentSessionView struct for AgentSessionView
|
|
type AgentSessionView 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 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"`
|
|
// 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 _AgentSessionView AgentSessionView
|
|
|
|
// NewAgentSessionView instantiates a new AgentSessionView 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 NewAgentSessionView() *AgentSessionView {
|
|
this := AgentSessionView{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentSessionViewWithDefaults instantiates a new AgentSessionView 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 NewAgentSessionViewWithDefaults() *AgentSessionView {
|
|
this := AgentSessionView{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccount returns the Account field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetAccount(v string) {
|
|
o.Account = &v
|
|
}
|
|
|
|
// GetActor returns the Actor field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetActor(v string) {
|
|
o.Actor = &v
|
|
}
|
|
|
|
// GetAgent returns the Agent field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetAgent(v string) {
|
|
o.Agent = &v
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetBase(v string) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetBranch returns the Branch field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetBranch(v string) {
|
|
o.Branch = &v
|
|
}
|
|
|
|
// GetChannel returns the Channel field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetChannel(v string) {
|
|
o.Channel = &v
|
|
}
|
|
|
|
// GetChildren returns the Children field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetChildren(v int64) {
|
|
o.Children = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetCreatedAt(v string) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetCwd returns the Cwd field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetCwd(v string) {
|
|
o.Cwd = &v
|
|
}
|
|
|
|
// GetEndedAt returns the EndedAt field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetEndedAt(v string) {
|
|
o.EndedAt = &v
|
|
}
|
|
|
|
// GetEnvironment returns the Environment field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetEnvironment(v string) {
|
|
o.Environment = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetError(v string) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetEvents returns the Events field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetEvents(v int64) {
|
|
o.Events = &v
|
|
}
|
|
|
|
// GetHost returns the Host field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetHost(v string) {
|
|
o.Host = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetLastEvent returns the LastEvent field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetLastEvent(v AgentLastEventView) {
|
|
o.LastEvent = &v
|
|
}
|
|
|
|
// GetMode returns the Mode field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetMode(v string) {
|
|
o.Mode = &v
|
|
}
|
|
|
|
// GetOrg returns the Org field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetOrg(v string) {
|
|
o.Org = &v
|
|
}
|
|
|
|
// GetParentSessionId returns the ParentSessionId field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetParentSessionId(v string) {
|
|
o.ParentSessionId = &v
|
|
}
|
|
|
|
// GetPr returns the Pr field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetPr(v string) {
|
|
o.Pr = &v
|
|
}
|
|
|
|
// GetProgress returns the Progress field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetProgress(v AgentSessionProgress) {
|
|
o.Progress = &v
|
|
}
|
|
|
|
// GetProject returns the Project field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetProject(v string) {
|
|
o.Project = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
// GetPublished returns the Published field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetPublished(v bool) {
|
|
o.Published = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetRepo(v string) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
// GetRootSessionId returns the RootSessionId field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetRootSessionId(v string) {
|
|
o.RootSessionId = &v
|
|
}
|
|
|
|
// GetSandbox returns the Sandbox field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetSandbox(v string) {
|
|
o.Sandbox = &v
|
|
}
|
|
|
|
// GetStartedAt returns the StartedAt field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetStartedAt(v string) {
|
|
o.StartedAt = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetTarget returns the Target field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetTarget(v string) {
|
|
o.Target = &v
|
|
}
|
|
|
|
// GetTaskRunId returns the TaskRunId field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetTaskRunId(v string) {
|
|
o.TaskRunId = &v
|
|
}
|
|
|
|
// GetTaskWorkflowId returns the TaskWorkflowId field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetTaskWorkflowId(v string) {
|
|
o.TaskWorkflowId = &v
|
|
}
|
|
|
|
// GetTerminal returns the Terminal field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetTerminal(v string) {
|
|
o.Terminal = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) 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 *AgentSessionView) SetUpdatedAt(v string) {
|
|
o.UpdatedAt = &v
|
|
}
|
|
|
|
func (o AgentSessionView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentSessionView) 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.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.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 *AgentSessionView) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentSessionView := _AgentSessionView{}
|
|
|
|
err = json.Unmarshal(data, &varAgentSessionView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentSessionView(varAgentSessionView)
|
|
|
|
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, "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, "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 NullableAgentSessionView struct {
|
|
value *AgentSessionView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentSessionView) Get() *AgentSessionView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentSessionView) Set(val *AgentSessionView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentSessionView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentSessionView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentSessionView(val *AgentSessionView) *NullableAgentSessionView {
|
|
return &NullableAgentSessionView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentSessionView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentSessionView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|