Files
sdk/model_studio_run_create.go

418 lines
11 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 StudioRunCreate type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StudioRunCreate{}
// StudioRunCreate struct for StudioRunCreate
type StudioRunCreate struct {
// Brand is a brand id; its tokens are brand.* in the graph.
Brand *string `json:"brand,omitempty"`
// Flow is a flow id.
Flow *string `json:"flow,omitempty"`
Graph *StudioGraph `json:"graph,omitempty"`
// Input are the values the inputs schema asks for.
Input map[string]interface{} `json:"input,omitempty"`
// Parent makes this run the next version of that run.
Parent *string `json:"parent,omitempty"`
Shared *bool `json:"shared,omitempty"`
// Template is a template id.
Template *string `json:"template,omitempty"`
Title *string `json:"title,omitempty"`
AdditionalProperties map[string]interface{}
}
type _StudioRunCreate StudioRunCreate
// NewStudioRunCreate instantiates a new StudioRunCreate 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 NewStudioRunCreate() *StudioRunCreate {
this := StudioRunCreate{}
return &this
}
// NewStudioRunCreateWithDefaults instantiates a new StudioRunCreate 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 NewStudioRunCreateWithDefaults() *StudioRunCreate {
this := StudioRunCreate{}
return &this
}
// GetBrand returns the Brand field value if set, zero value otherwise.
func (o *StudioRunCreate) GetBrand() string {
if o == nil || IsNil(o.Brand) {
var ret string
return ret
}
return *o.Brand
}
// GetBrandOk returns a tuple with the Brand field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioRunCreate) GetBrandOk() (*string, bool) {
if o == nil || IsNil(o.Brand) {
return nil, false
}
return o.Brand, true
}
// HasBrand returns a boolean if a field has been set.
func (o *StudioRunCreate) HasBrand() bool {
if o != nil && !IsNil(o.Brand) {
return true
}
return false
}
// SetBrand gets a reference to the given string and assigns it to the Brand field.
func (o *StudioRunCreate) SetBrand(v string) {
o.Brand = &v
}
// GetFlow returns the Flow field value if set, zero value otherwise.
func (o *StudioRunCreate) GetFlow() string {
if o == nil || IsNil(o.Flow) {
var ret string
return ret
}
return *o.Flow
}
// GetFlowOk returns a tuple with the Flow field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioRunCreate) GetFlowOk() (*string, bool) {
if o == nil || IsNil(o.Flow) {
return nil, false
}
return o.Flow, true
}
// HasFlow returns a boolean if a field has been set.
func (o *StudioRunCreate) HasFlow() bool {
if o != nil && !IsNil(o.Flow) {
return true
}
return false
}
// SetFlow gets a reference to the given string and assigns it to the Flow field.
func (o *StudioRunCreate) SetFlow(v string) {
o.Flow = &v
}
// GetGraph returns the Graph field value if set, zero value otherwise.
func (o *StudioRunCreate) GetGraph() StudioGraph {
if o == nil || IsNil(o.Graph) {
var ret StudioGraph
return ret
}
return *o.Graph
}
// GetGraphOk returns a tuple with the Graph field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioRunCreate) GetGraphOk() (*StudioGraph, bool) {
if o == nil || IsNil(o.Graph) {
return nil, false
}
return o.Graph, true
}
// HasGraph returns a boolean if a field has been set.
func (o *StudioRunCreate) HasGraph() bool {
if o != nil && !IsNil(o.Graph) {
return true
}
return false
}
// SetGraph gets a reference to the given StudioGraph and assigns it to the Graph field.
func (o *StudioRunCreate) SetGraph(v StudioGraph) {
o.Graph = &v
}
// GetInput returns the Input field value if set, zero value otherwise.
func (o *StudioRunCreate) GetInput() map[string]interface{} {
if o == nil || IsNil(o.Input) {
var ret map[string]interface{}
return ret
}
return o.Input
}
// GetInputOk returns a tuple with the Input field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioRunCreate) GetInputOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Input) {
return map[string]interface{}{}, false
}
return o.Input, true
}
// HasInput returns a boolean if a field has been set.
func (o *StudioRunCreate) HasInput() bool {
if o != nil && !IsNil(o.Input) {
return true
}
return false
}
// SetInput gets a reference to the given map[string]interface{} and assigns it to the Input field.
func (o *StudioRunCreate) SetInput(v map[string]interface{}) {
o.Input = v
}
// GetParent returns the Parent field value if set, zero value otherwise.
func (o *StudioRunCreate) GetParent() string {
if o == nil || IsNil(o.Parent) {
var ret string
return ret
}
return *o.Parent
}
// GetParentOk returns a tuple with the Parent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioRunCreate) GetParentOk() (*string, bool) {
if o == nil || IsNil(o.Parent) {
return nil, false
}
return o.Parent, true
}
// HasParent returns a boolean if a field has been set.
func (o *StudioRunCreate) HasParent() bool {
if o != nil && !IsNil(o.Parent) {
return true
}
return false
}
// SetParent gets a reference to the given string and assigns it to the Parent field.
func (o *StudioRunCreate) SetParent(v string) {
o.Parent = &v
}
// GetShared returns the Shared field value if set, zero value otherwise.
func (o *StudioRunCreate) GetShared() bool {
if o == nil || IsNil(o.Shared) {
var ret bool
return ret
}
return *o.Shared
}
// GetSharedOk returns a tuple with the Shared field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioRunCreate) GetSharedOk() (*bool, bool) {
if o == nil || IsNil(o.Shared) {
return nil, false
}
return o.Shared, true
}
// HasShared returns a boolean if a field has been set.
func (o *StudioRunCreate) HasShared() bool {
if o != nil && !IsNil(o.Shared) {
return true
}
return false
}
// SetShared gets a reference to the given bool and assigns it to the Shared field.
func (o *StudioRunCreate) SetShared(v bool) {
o.Shared = &v
}
// GetTemplate returns the Template field value if set, zero value otherwise.
func (o *StudioRunCreate) GetTemplate() string {
if o == nil || IsNil(o.Template) {
var ret string
return ret
}
return *o.Template
}
// GetTemplateOk returns a tuple with the Template field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioRunCreate) GetTemplateOk() (*string, bool) {
if o == nil || IsNil(o.Template) {
return nil, false
}
return o.Template, true
}
// HasTemplate returns a boolean if a field has been set.
func (o *StudioRunCreate) HasTemplate() bool {
if o != nil && !IsNil(o.Template) {
return true
}
return false
}
// SetTemplate gets a reference to the given string and assigns it to the Template field.
func (o *StudioRunCreate) SetTemplate(v string) {
o.Template = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *StudioRunCreate) 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 *StudioRunCreate) 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 *StudioRunCreate) 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 *StudioRunCreate) SetTitle(v string) {
o.Title = &v
}
func (o StudioRunCreate) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StudioRunCreate) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Brand) {
toSerialize["brand"] = o.Brand
}
if !IsNil(o.Flow) {
toSerialize["flow"] = o.Flow
}
if !IsNil(o.Graph) {
toSerialize["graph"] = o.Graph
}
if !IsNil(o.Input) {
toSerialize["input"] = o.Input
}
if !IsNil(o.Parent) {
toSerialize["parent"] = o.Parent
}
if !IsNil(o.Shared) {
toSerialize["shared"] = o.Shared
}
if !IsNil(o.Template) {
toSerialize["template"] = o.Template
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *StudioRunCreate) UnmarshalJSON(data []byte) (err error) {
varStudioRunCreate := _StudioRunCreate{}
err = json.Unmarshal(data, &varStudioRunCreate)
if err != nil {
return err
}
*o = StudioRunCreate(varStudioRunCreate)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "brand")
delete(additionalProperties, "flow")
delete(additionalProperties, "graph")
delete(additionalProperties, "input")
delete(additionalProperties, "parent")
delete(additionalProperties, "shared")
delete(additionalProperties, "template")
delete(additionalProperties, "title")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableStudioRunCreate struct {
value *StudioRunCreate
isSet bool
}
func (v NullableStudioRunCreate) Get() *StudioRunCreate {
return v.value
}
func (v *NullableStudioRunCreate) Set(val *StudioRunCreate) {
v.value = val
v.isSet = true
}
func (v NullableStudioRunCreate) IsSet() bool {
return v.isSet
}
func (v *NullableStudioRunCreate) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStudioRunCreate(val *StudioRunCreate) *NullableStudioRunCreate {
return &NullableStudioRunCreate{value: val, isSet: true}
}
func (v NullableStudioRunCreate) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStudioRunCreate) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}