mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
3.8 KiB
Go
155 lines
3.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 StudioGraph type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &StudioGraph{}
|
|
|
|
// StudioGraph struct for StudioGraph
|
|
type StudioGraph struct {
|
|
// Steps are the graph's steps, 1 to 64 of them.
|
|
Steps []StudioSpec `json:"steps,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _StudioGraph StudioGraph
|
|
|
|
// NewStudioGraph instantiates a new StudioGraph 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 NewStudioGraph() *StudioGraph {
|
|
this := StudioGraph{}
|
|
return &this
|
|
}
|
|
|
|
// NewStudioGraphWithDefaults instantiates a new StudioGraph 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 NewStudioGraphWithDefaults() *StudioGraph {
|
|
this := StudioGraph{}
|
|
return &this
|
|
}
|
|
|
|
// GetSteps returns the Steps field value if set, zero value otherwise.
|
|
func (o *StudioGraph) GetSteps() []StudioSpec {
|
|
if o == nil || IsNil(o.Steps) {
|
|
var ret []StudioSpec
|
|
return ret
|
|
}
|
|
return o.Steps
|
|
}
|
|
|
|
// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioGraph) GetStepsOk() ([]StudioSpec, bool) {
|
|
if o == nil || IsNil(o.Steps) {
|
|
return nil, false
|
|
}
|
|
return o.Steps, true
|
|
}
|
|
|
|
// HasSteps returns a boolean if a field has been set.
|
|
func (o *StudioGraph) HasSteps() bool {
|
|
if o != nil && !IsNil(o.Steps) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSteps gets a reference to the given []StudioSpec and assigns it to the Steps field.
|
|
func (o *StudioGraph) SetSteps(v []StudioSpec) {
|
|
o.Steps = v
|
|
}
|
|
|
|
func (o StudioGraph) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o StudioGraph) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Steps) {
|
|
toSerialize["steps"] = o.Steps
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *StudioGraph) UnmarshalJSON(data []byte) (err error) {
|
|
varStudioGraph := _StudioGraph{}
|
|
|
|
err = json.Unmarshal(data, &varStudioGraph)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = StudioGraph(varStudioGraph)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "steps")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableStudioGraph struct {
|
|
value *StudioGraph
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableStudioGraph) Get() *StudioGraph {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableStudioGraph) Set(val *StudioGraph) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableStudioGraph) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableStudioGraph) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableStudioGraph(val *StudioGraph) *NullableStudioGraph {
|
|
return &NullableStudioGraph{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableStudioGraph) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableStudioGraph) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|