mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
678 lines
17 KiB
Go
678 lines
17 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 StudioStep type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &StudioStep{}
|
|
|
|
// StudioStep struct for StudioStep
|
|
type StudioStep struct {
|
|
// Attempt is how many times the step has started.
|
|
Attempt *int64 `json:"attempt,omitempty"`
|
|
CostCents *int64 `json:"cost_cents,omitempty"`
|
|
Error *StudioProblem `json:"error,omitempty"`
|
|
// Executor is where the step runs: gateway, studio.render, render or flow.run.
|
|
Executor *string `json:"executor,omitempty"`
|
|
Finished *string `json:"finished,omitempty"`
|
|
Id *string `json:"id,omitempty"`
|
|
// Items is how many items a step with each fanned out to.
|
|
Items *int64 `json:"items,omitempty"`
|
|
// Message is what the step is doing now, for a person.
|
|
Message *string `json:"message,omitempty"`
|
|
Op *string `json:"op,omitempty"`
|
|
// Outputs are the Library item ids the step made.
|
|
Outputs []string `json:"outputs,omitempty"`
|
|
Progress *float64 `json:"progress,omitempty"`
|
|
Started *string `json:"started,omitempty"`
|
|
// Status is pending, queued, running, succeeded, failed, canceled or skipped.
|
|
Status *string `json:"status,omitempty"`
|
|
Text *string `json:"text,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _StudioStep StudioStep
|
|
|
|
// NewStudioStep instantiates a new StudioStep 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 NewStudioStep() *StudioStep {
|
|
this := StudioStep{}
|
|
return &this
|
|
}
|
|
|
|
// NewStudioStepWithDefaults instantiates a new StudioStep 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 NewStudioStepWithDefaults() *StudioStep {
|
|
this := StudioStep{}
|
|
return &this
|
|
}
|
|
|
|
// GetAttempt returns the Attempt field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetAttempt() int64 {
|
|
if o == nil || IsNil(o.Attempt) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Attempt
|
|
}
|
|
|
|
// GetAttemptOk returns a tuple with the Attempt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetAttemptOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Attempt) {
|
|
return nil, false
|
|
}
|
|
return o.Attempt, true
|
|
}
|
|
|
|
// HasAttempt returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasAttempt() bool {
|
|
if o != nil && !IsNil(o.Attempt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAttempt gets a reference to the given int64 and assigns it to the Attempt field.
|
|
func (o *StudioStep) SetAttempt(v int64) {
|
|
o.Attempt = &v
|
|
}
|
|
|
|
// GetCostCents returns the CostCents field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetCostCents() int64 {
|
|
if o == nil || IsNil(o.CostCents) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CostCents
|
|
}
|
|
|
|
// GetCostCentsOk returns a tuple with the CostCents field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetCostCentsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CostCents) {
|
|
return nil, false
|
|
}
|
|
return o.CostCents, true
|
|
}
|
|
|
|
// HasCostCents returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasCostCents() bool {
|
|
if o != nil && !IsNil(o.CostCents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCostCents gets a reference to the given int64 and assigns it to the CostCents field.
|
|
func (o *StudioStep) SetCostCents(v int64) {
|
|
o.CostCents = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetError() StudioProblem {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret StudioProblem
|
|
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 *StudioStep) GetErrorOk() (*StudioProblem, 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 *StudioStep) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given StudioProblem and assigns it to the Error field.
|
|
func (o *StudioStep) SetError(v StudioProblem) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetExecutor returns the Executor field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetExecutor() string {
|
|
if o == nil || IsNil(o.Executor) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Executor
|
|
}
|
|
|
|
// GetExecutorOk returns a tuple with the Executor field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetExecutorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Executor) {
|
|
return nil, false
|
|
}
|
|
return o.Executor, true
|
|
}
|
|
|
|
// HasExecutor returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasExecutor() bool {
|
|
if o != nil && !IsNil(o.Executor) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExecutor gets a reference to the given string and assigns it to the Executor field.
|
|
func (o *StudioStep) SetExecutor(v string) {
|
|
o.Executor = &v
|
|
}
|
|
|
|
// GetFinished returns the Finished field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetFinished() string {
|
|
if o == nil || IsNil(o.Finished) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Finished
|
|
}
|
|
|
|
// GetFinishedOk returns a tuple with the Finished field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetFinishedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Finished) {
|
|
return nil, false
|
|
}
|
|
return o.Finished, true
|
|
}
|
|
|
|
// HasFinished returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasFinished() bool {
|
|
if o != nil && !IsNil(o.Finished) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFinished gets a reference to the given string and assigns it to the Finished field.
|
|
func (o *StudioStep) SetFinished(v string) {
|
|
o.Finished = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *StudioStep) 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 *StudioStep) 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 *StudioStep) 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 *StudioStep) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetItems returns the Items field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetItems() int64 {
|
|
if o == nil || IsNil(o.Items) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Items
|
|
}
|
|
|
|
// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetItemsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Items) {
|
|
return nil, false
|
|
}
|
|
return o.Items, true
|
|
}
|
|
|
|
// HasItems returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasItems() bool {
|
|
if o != nil && !IsNil(o.Items) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetItems gets a reference to the given int64 and assigns it to the Items field.
|
|
func (o *StudioStep) SetItems(v int64) {
|
|
o.Items = &v
|
|
}
|
|
|
|
// GetMessage returns the Message field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetMessage() string {
|
|
if o == nil || IsNil(o.Message) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Message
|
|
}
|
|
|
|
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetMessageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Message) {
|
|
return nil, false
|
|
}
|
|
return o.Message, true
|
|
}
|
|
|
|
// HasMessage returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasMessage() bool {
|
|
if o != nil && !IsNil(o.Message) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
|
func (o *StudioStep) SetMessage(v string) {
|
|
o.Message = &v
|
|
}
|
|
|
|
// GetOp returns the Op field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetOp() string {
|
|
if o == nil || IsNil(o.Op) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Op
|
|
}
|
|
|
|
// GetOpOk returns a tuple with the Op field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetOpOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Op) {
|
|
return nil, false
|
|
}
|
|
return o.Op, true
|
|
}
|
|
|
|
// HasOp returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasOp() bool {
|
|
if o != nil && !IsNil(o.Op) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOp gets a reference to the given string and assigns it to the Op field.
|
|
func (o *StudioStep) SetOp(v string) {
|
|
o.Op = &v
|
|
}
|
|
|
|
// GetOutputs returns the Outputs field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetOutputs() []string {
|
|
if o == nil || IsNil(o.Outputs) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Outputs
|
|
}
|
|
|
|
// GetOutputsOk returns a tuple with the Outputs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetOutputsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Outputs) {
|
|
return nil, false
|
|
}
|
|
return o.Outputs, true
|
|
}
|
|
|
|
// HasOutputs returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasOutputs() bool {
|
|
if o != nil && !IsNil(o.Outputs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOutputs gets a reference to the given []string and assigns it to the Outputs field.
|
|
func (o *StudioStep) SetOutputs(v []string) {
|
|
o.Outputs = v
|
|
}
|
|
|
|
// GetProgress returns the Progress field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetProgress() float64 {
|
|
if o == nil || IsNil(o.Progress) {
|
|
var ret float64
|
|
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 *StudioStep) GetProgressOk() (*float64, 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 *StudioStep) HasProgress() bool {
|
|
if o != nil && !IsNil(o.Progress) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProgress gets a reference to the given float64 and assigns it to the Progress field.
|
|
func (o *StudioStep) SetProgress(v float64) {
|
|
o.Progress = &v
|
|
}
|
|
|
|
// GetStarted returns the Started field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetStarted() string {
|
|
if o == nil || IsNil(o.Started) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Started
|
|
}
|
|
|
|
// GetStartedOk returns a tuple with the Started field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetStartedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Started) {
|
|
return nil, false
|
|
}
|
|
return o.Started, true
|
|
}
|
|
|
|
// HasStarted returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasStarted() bool {
|
|
if o != nil && !IsNil(o.Started) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStarted gets a reference to the given string and assigns it to the Started field.
|
|
func (o *StudioStep) SetStarted(v string) {
|
|
o.Started = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *StudioStep) 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 *StudioStep) 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 *StudioStep) 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 *StudioStep) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise.
|
|
func (o *StudioStep) GetText() string {
|
|
if o == nil || IsNil(o.Text) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Text
|
|
}
|
|
|
|
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioStep) GetTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Text) {
|
|
return nil, false
|
|
}
|
|
return o.Text, true
|
|
}
|
|
|
|
// HasText returns a boolean if a field has been set.
|
|
func (o *StudioStep) HasText() bool {
|
|
if o != nil && !IsNil(o.Text) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetText gets a reference to the given string and assigns it to the Text field.
|
|
func (o *StudioStep) SetText(v string) {
|
|
o.Text = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *StudioStep) 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 *StudioStep) 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 *StudioStep) 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 *StudioStep) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
func (o StudioStep) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o StudioStep) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Attempt) {
|
|
toSerialize["attempt"] = o.Attempt
|
|
}
|
|
if !IsNil(o.CostCents) {
|
|
toSerialize["cost_cents"] = o.CostCents
|
|
}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.Executor) {
|
|
toSerialize["executor"] = o.Executor
|
|
}
|
|
if !IsNil(o.Finished) {
|
|
toSerialize["finished"] = o.Finished
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Items) {
|
|
toSerialize["items"] = o.Items
|
|
}
|
|
if !IsNil(o.Message) {
|
|
toSerialize["message"] = o.Message
|
|
}
|
|
if !IsNil(o.Op) {
|
|
toSerialize["op"] = o.Op
|
|
}
|
|
if !IsNil(o.Outputs) {
|
|
toSerialize["outputs"] = o.Outputs
|
|
}
|
|
if !IsNil(o.Progress) {
|
|
toSerialize["progress"] = o.Progress
|
|
}
|
|
if !IsNil(o.Started) {
|
|
toSerialize["started"] = o.Started
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Text) {
|
|
toSerialize["text"] = o.Text
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *StudioStep) UnmarshalJSON(data []byte) (err error) {
|
|
varStudioStep := _StudioStep{}
|
|
|
|
err = json.Unmarshal(data, &varStudioStep)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = StudioStep(varStudioStep)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "attempt")
|
|
delete(additionalProperties, "cost_cents")
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "executor")
|
|
delete(additionalProperties, "finished")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "items")
|
|
delete(additionalProperties, "message")
|
|
delete(additionalProperties, "op")
|
|
delete(additionalProperties, "outputs")
|
|
delete(additionalProperties, "progress")
|
|
delete(additionalProperties, "started")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "text")
|
|
delete(additionalProperties, "title")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableStudioStep struct {
|
|
value *StudioStep
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableStudioStep) Get() *StudioStep {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableStudioStep) Set(val *StudioStep) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableStudioStep) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableStudioStep) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableStudioStep(val *StudioStep) *NullableStudioStep {
|
|
return &NullableStudioStep{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableStudioStep) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableStudioStep) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|