mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
8.8 KiB
Go
345 lines
8.8 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 BotBotRun type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BotBotRun{}
|
|
|
|
// BotBotRun struct for BotBotRun
|
|
type BotBotRun struct {
|
|
// RunID is the run's id in the bot runtime, and the node id its live VNC session is registered under.
|
|
RunId *string `json:"runId,omitempty"`
|
|
// SessionURL is the live session the hanzo.app /vnc panel embeds to watch or attach to this run. Derived here from the run id, never sent by the runtime.
|
|
SessionUrl *string `json:"sessionUrl,omitempty"`
|
|
// StartedAt is when the run began, RFC 3339, as the runtime stamped it.
|
|
StartedAt *string `json:"startedAt,omitempty"`
|
|
// Status is the run's state as the runtime reports it; \"running\" when the runtime names none of its own.
|
|
Status *string `json:"status,omitempty"`
|
|
// Surface is what the bot drives: the desktop or terminal sandbox it runs in.
|
|
Surface *string `json:"surface,omitempty"`
|
|
// Task is the instruction the bot is executing.
|
|
Task *string `json:"task,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BotBotRun BotBotRun
|
|
|
|
// NewBotBotRun instantiates a new BotBotRun 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 NewBotBotRun() *BotBotRun {
|
|
this := BotBotRun{}
|
|
return &this
|
|
}
|
|
|
|
// NewBotBotRunWithDefaults instantiates a new BotBotRun 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 NewBotBotRunWithDefaults() *BotBotRun {
|
|
this := BotBotRun{}
|
|
return &this
|
|
}
|
|
|
|
// GetRunId returns the RunId field value if set, zero value otherwise.
|
|
func (o *BotBotRun) GetRunId() string {
|
|
if o == nil || IsNil(o.RunId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RunId
|
|
}
|
|
|
|
// GetRunIdOk returns a tuple with the RunId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BotBotRun) GetRunIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RunId) {
|
|
return nil, false
|
|
}
|
|
return o.RunId, true
|
|
}
|
|
|
|
// HasRunId returns a boolean if a field has been set.
|
|
func (o *BotBotRun) HasRunId() bool {
|
|
if o != nil && !IsNil(o.RunId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRunId gets a reference to the given string and assigns it to the RunId field.
|
|
func (o *BotBotRun) SetRunId(v string) {
|
|
o.RunId = &v
|
|
}
|
|
|
|
// GetSessionUrl returns the SessionUrl field value if set, zero value otherwise.
|
|
func (o *BotBotRun) GetSessionUrl() string {
|
|
if o == nil || IsNil(o.SessionUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SessionUrl
|
|
}
|
|
|
|
// GetSessionUrlOk returns a tuple with the SessionUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BotBotRun) GetSessionUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SessionUrl) {
|
|
return nil, false
|
|
}
|
|
return o.SessionUrl, true
|
|
}
|
|
|
|
// HasSessionUrl returns a boolean if a field has been set.
|
|
func (o *BotBotRun) HasSessionUrl() bool {
|
|
if o != nil && !IsNil(o.SessionUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSessionUrl gets a reference to the given string and assigns it to the SessionUrl field.
|
|
func (o *BotBotRun) SetSessionUrl(v string) {
|
|
o.SessionUrl = &v
|
|
}
|
|
|
|
// GetStartedAt returns the StartedAt field value if set, zero value otherwise.
|
|
func (o *BotBotRun) 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 *BotBotRun) 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 *BotBotRun) 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 *BotBotRun) SetStartedAt(v string) {
|
|
o.StartedAt = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *BotBotRun) 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 *BotBotRun) 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 *BotBotRun) 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 *BotBotRun) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetSurface returns the Surface field value if set, zero value otherwise.
|
|
func (o *BotBotRun) GetSurface() string {
|
|
if o == nil || IsNil(o.Surface) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Surface
|
|
}
|
|
|
|
// GetSurfaceOk returns a tuple with the Surface field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BotBotRun) GetSurfaceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Surface) {
|
|
return nil, false
|
|
}
|
|
return o.Surface, true
|
|
}
|
|
|
|
// HasSurface returns a boolean if a field has been set.
|
|
func (o *BotBotRun) HasSurface() bool {
|
|
if o != nil && !IsNil(o.Surface) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSurface gets a reference to the given string and assigns it to the Surface field.
|
|
func (o *BotBotRun) SetSurface(v string) {
|
|
o.Surface = &v
|
|
}
|
|
|
|
// GetTask returns the Task field value if set, zero value otherwise.
|
|
func (o *BotBotRun) GetTask() string {
|
|
if o == nil || IsNil(o.Task) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Task
|
|
}
|
|
|
|
// GetTaskOk returns a tuple with the Task field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BotBotRun) GetTaskOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Task) {
|
|
return nil, false
|
|
}
|
|
return o.Task, true
|
|
}
|
|
|
|
// HasTask returns a boolean if a field has been set.
|
|
func (o *BotBotRun) HasTask() bool {
|
|
if o != nil && !IsNil(o.Task) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTask gets a reference to the given string and assigns it to the Task field.
|
|
func (o *BotBotRun) SetTask(v string) {
|
|
o.Task = &v
|
|
}
|
|
|
|
func (o BotBotRun) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BotBotRun) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.RunId) {
|
|
toSerialize["runId"] = o.RunId
|
|
}
|
|
if !IsNil(o.SessionUrl) {
|
|
toSerialize["sessionUrl"] = o.SessionUrl
|
|
}
|
|
if !IsNil(o.StartedAt) {
|
|
toSerialize["startedAt"] = o.StartedAt
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Surface) {
|
|
toSerialize["surface"] = o.Surface
|
|
}
|
|
if !IsNil(o.Task) {
|
|
toSerialize["task"] = o.Task
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BotBotRun) UnmarshalJSON(data []byte) (err error) {
|
|
varBotBotRun := _BotBotRun{}
|
|
|
|
err = json.Unmarshal(data, &varBotBotRun)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BotBotRun(varBotBotRun)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "runId")
|
|
delete(additionalProperties, "sessionUrl")
|
|
delete(additionalProperties, "startedAt")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "surface")
|
|
delete(additionalProperties, "task")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBotBotRun struct {
|
|
value *BotBotRun
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBotBotRun) Get() *BotBotRun {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBotBotRun) Set(val *BotBotRun) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBotBotRun) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBotBotRun) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBotBotRun(val *BotBotRun) *NullableBotBotRun {
|
|
return &NullableBotBotRun{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBotBotRun) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBotBotRun) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|