mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
563 lines
14 KiB
Go
563 lines
14 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 StudioTemplate type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &StudioTemplate{}
|
|
|
|
// StudioTemplate struct for StudioTemplate
|
|
type StudioTemplate struct {
|
|
Created *string `json:"created,omitempty"`
|
|
Creator *string `json:"creator,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
Graph *StudioGraph `json:"graph,omitempty"`
|
|
// ID is a catalog slug (image, poster) or an org template's id.
|
|
Id *string `json:"id,omitempty"`
|
|
Inputs map[string]interface{} `json:"inputs,omitempty"`
|
|
Kind *string `json:"kind,omitempty"`
|
|
Org *string `json:"org,omitempty"`
|
|
// Preview is an asset id or https URL of a still that shows what it makes.
|
|
Preview *string `json:"preview,omitempty"`
|
|
Shared *bool `json:"shared,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
Updated *string `json:"updated,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _StudioTemplate StudioTemplate
|
|
|
|
// NewStudioTemplate instantiates a new StudioTemplate 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 NewStudioTemplate() *StudioTemplate {
|
|
this := StudioTemplate{}
|
|
return &this
|
|
}
|
|
|
|
// NewStudioTemplateWithDefaults instantiates a new StudioTemplate 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 NewStudioTemplateWithDefaults() *StudioTemplate {
|
|
this := StudioTemplate{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreated returns the Created field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) GetCreated() string {
|
|
if o == nil || IsNil(o.Created) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Created
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioTemplate) GetCreatedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Created) {
|
|
return nil, false
|
|
}
|
|
return o.Created, true
|
|
}
|
|
|
|
// HasCreated returns a boolean if a field has been set.
|
|
func (o *StudioTemplate) HasCreated() bool {
|
|
if o != nil && !IsNil(o.Created) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreated gets a reference to the given string and assigns it to the Created field.
|
|
func (o *StudioTemplate) SetCreated(v string) {
|
|
o.Created = &v
|
|
}
|
|
|
|
// GetCreator returns the Creator field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) GetCreator() string {
|
|
if o == nil || IsNil(o.Creator) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Creator
|
|
}
|
|
|
|
// GetCreatorOk returns a tuple with the Creator field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioTemplate) GetCreatorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Creator) {
|
|
return nil, false
|
|
}
|
|
return o.Creator, true
|
|
}
|
|
|
|
// HasCreator returns a boolean if a field has been set.
|
|
func (o *StudioTemplate) HasCreator() bool {
|
|
if o != nil && !IsNil(o.Creator) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreator gets a reference to the given string and assigns it to the Creator field.
|
|
func (o *StudioTemplate) SetCreator(v string) {
|
|
o.Creator = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioTemplate) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *StudioTemplate) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *StudioTemplate) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetGraph returns the Graph field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) SetGraph(v StudioGraph) {
|
|
o.Graph = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetInputs returns the Inputs field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) GetInputs() map[string]interface{} {
|
|
if o == nil || IsNil(o.Inputs) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.Inputs
|
|
}
|
|
|
|
// GetInputsOk returns a tuple with the Inputs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioTemplate) GetInputsOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Inputs) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.Inputs, true
|
|
}
|
|
|
|
// HasInputs returns a boolean if a field has been set.
|
|
func (o *StudioTemplate) HasInputs() bool {
|
|
if o != nil && !IsNil(o.Inputs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInputs gets a reference to the given map[string]interface{} and assigns it to the Inputs field.
|
|
func (o *StudioTemplate) SetInputs(v map[string]interface{}) {
|
|
o.Inputs = v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetOrg returns the Org field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) SetOrg(v string) {
|
|
o.Org = &v
|
|
}
|
|
|
|
// GetPreview returns the Preview field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) GetPreview() string {
|
|
if o == nil || IsNil(o.Preview) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Preview
|
|
}
|
|
|
|
// GetPreviewOk returns a tuple with the Preview field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioTemplate) GetPreviewOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Preview) {
|
|
return nil, false
|
|
}
|
|
return o.Preview, true
|
|
}
|
|
|
|
// HasPreview returns a boolean if a field has been set.
|
|
func (o *StudioTemplate) HasPreview() bool {
|
|
if o != nil && !IsNil(o.Preview) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPreview gets a reference to the given string and assigns it to the Preview field.
|
|
func (o *StudioTemplate) SetPreview(v string) {
|
|
o.Preview = &v
|
|
}
|
|
|
|
// GetShared returns the Shared field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) SetShared(v bool) {
|
|
o.Shared = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) 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 *StudioTemplate) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetUpdated returns the Updated field value if set, zero value otherwise.
|
|
func (o *StudioTemplate) GetUpdated() string {
|
|
if o == nil || IsNil(o.Updated) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Updated
|
|
}
|
|
|
|
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioTemplate) GetUpdatedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Updated) {
|
|
return nil, false
|
|
}
|
|
return o.Updated, true
|
|
}
|
|
|
|
// HasUpdated returns a boolean if a field has been set.
|
|
func (o *StudioTemplate) HasUpdated() bool {
|
|
if o != nil && !IsNil(o.Updated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdated gets a reference to the given string and assigns it to the Updated field.
|
|
func (o *StudioTemplate) SetUpdated(v string) {
|
|
o.Updated = &v
|
|
}
|
|
|
|
func (o StudioTemplate) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o StudioTemplate) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Created) {
|
|
toSerialize["created"] = o.Created
|
|
}
|
|
if !IsNil(o.Creator) {
|
|
toSerialize["creator"] = o.Creator
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Graph) {
|
|
toSerialize["graph"] = o.Graph
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Inputs) {
|
|
toSerialize["inputs"] = o.Inputs
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Org) {
|
|
toSerialize["org"] = o.Org
|
|
}
|
|
if !IsNil(o.Preview) {
|
|
toSerialize["preview"] = o.Preview
|
|
}
|
|
if !IsNil(o.Shared) {
|
|
toSerialize["shared"] = o.Shared
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
if !IsNil(o.Updated) {
|
|
toSerialize["updated"] = o.Updated
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *StudioTemplate) UnmarshalJSON(data []byte) (err error) {
|
|
varStudioTemplate := _StudioTemplate{}
|
|
|
|
err = json.Unmarshal(data, &varStudioTemplate)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = StudioTemplate(varStudioTemplate)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "created")
|
|
delete(additionalProperties, "creator")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "graph")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "inputs")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "org")
|
|
delete(additionalProperties, "preview")
|
|
delete(additionalProperties, "shared")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "updated")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableStudioTemplate struct {
|
|
value *StudioTemplate
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableStudioTemplate) Get() *StudioTemplate {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableStudioTemplate) Set(val *StudioTemplate) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableStudioTemplate) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableStudioTemplate) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableStudioTemplate(val *StudioTemplate) *NullableStudioTemplate {
|
|
return &NullableStudioTemplate{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableStudioTemplate) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableStudioTemplate) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|