mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
7.7 KiB
Go
307 lines
7.7 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 StudioSpec type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &StudioSpec{}
|
|
|
|
// StudioSpec struct for StudioSpec
|
|
type StudioSpec struct {
|
|
// Each fans the step out: a {{path}} naming an array, run once per item (at most 64), its outputs the items' outputs in order.
|
|
Each *string `json:"each,omitempty"`
|
|
// ID names the step within its graph: a lowercase letter, then up to 31 lowercase letters, digits or underscores.
|
|
Id *string `json:"id,omitempty"`
|
|
// Op is what the step does: chat, image.generate, image.edit, voice.speak, music.generate, video.generate, model.generate, studio.render, render.html, render.document, render.slides, render.composition or video.edit.
|
|
Op *string `json:"op,omitempty"`
|
|
// Title is what a person sees for the step.
|
|
Title *string `json:"title,omitempty"`
|
|
// With are the op's parameters. Values may reference other steps.
|
|
With map[string]interface{} `json:"with,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _StudioSpec StudioSpec
|
|
|
|
// NewStudioSpec instantiates a new StudioSpec 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 NewStudioSpec() *StudioSpec {
|
|
this := StudioSpec{}
|
|
return &this
|
|
}
|
|
|
|
// NewStudioSpecWithDefaults instantiates a new StudioSpec 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 NewStudioSpecWithDefaults() *StudioSpec {
|
|
this := StudioSpec{}
|
|
return &this
|
|
}
|
|
|
|
// GetEach returns the Each field value if set, zero value otherwise.
|
|
func (o *StudioSpec) GetEach() string {
|
|
if o == nil || IsNil(o.Each) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Each
|
|
}
|
|
|
|
// GetEachOk returns a tuple with the Each field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioSpec) GetEachOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Each) {
|
|
return nil, false
|
|
}
|
|
return o.Each, true
|
|
}
|
|
|
|
// HasEach returns a boolean if a field has been set.
|
|
func (o *StudioSpec) HasEach() bool {
|
|
if o != nil && !IsNil(o.Each) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEach gets a reference to the given string and assigns it to the Each field.
|
|
func (o *StudioSpec) SetEach(v string) {
|
|
o.Each = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *StudioSpec) 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 *StudioSpec) 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 *StudioSpec) 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 *StudioSpec) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetOp returns the Op field value if set, zero value otherwise.
|
|
func (o *StudioSpec) 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 *StudioSpec) 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 *StudioSpec) 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 *StudioSpec) SetOp(v string) {
|
|
o.Op = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *StudioSpec) 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 *StudioSpec) 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 *StudioSpec) 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 *StudioSpec) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetWith returns the With field value if set, zero value otherwise.
|
|
func (o *StudioSpec) GetWith() map[string]interface{} {
|
|
if o == nil || IsNil(o.With) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.With
|
|
}
|
|
|
|
// GetWithOk returns a tuple with the With field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioSpec) GetWithOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.With) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.With, true
|
|
}
|
|
|
|
// HasWith returns a boolean if a field has been set.
|
|
func (o *StudioSpec) HasWith() bool {
|
|
if o != nil && !IsNil(o.With) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWith gets a reference to the given map[string]interface{} and assigns it to the With field.
|
|
func (o *StudioSpec) SetWith(v map[string]interface{}) {
|
|
o.With = v
|
|
}
|
|
|
|
func (o StudioSpec) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o StudioSpec) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Each) {
|
|
toSerialize["each"] = o.Each
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Op) {
|
|
toSerialize["op"] = o.Op
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
if !IsNil(o.With) {
|
|
toSerialize["with"] = o.With
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *StudioSpec) UnmarshalJSON(data []byte) (err error) {
|
|
varStudioSpec := _StudioSpec{}
|
|
|
|
err = json.Unmarshal(data, &varStudioSpec)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = StudioSpec(varStudioSpec)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "each")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "op")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "with")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableStudioSpec struct {
|
|
value *StudioSpec
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableStudioSpec) Get() *StudioSpec {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableStudioSpec) Set(val *StudioSpec) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableStudioSpec) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableStudioSpec) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableStudioSpec(val *StudioSpec) *NullableStudioSpec {
|
|
return &NullableStudioSpec{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableStudioSpec) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableStudioSpec) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|