Files
sdk/model_studio_flow_write.go

339 lines
8.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 StudioFlowWrite type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StudioFlowWrite{}
// StudioFlowWrite struct for StudioFlowWrite
type StudioFlowWrite struct {
Description *string `json:"description,omitempty"`
Graph *StudioGraph `json:"graph,omitempty"`
Inputs map[string]interface{} `json:"inputs,omitempty"`
Kind *string `json:"kind,omitempty"`
Name *string `json:"name,omitempty"`
Shared *bool `json:"shared,omitempty"`
AdditionalProperties map[string]interface{}
}
type _StudioFlowWrite StudioFlowWrite
// NewStudioFlowWrite instantiates a new StudioFlowWrite 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 NewStudioFlowWrite() *StudioFlowWrite {
this := StudioFlowWrite{}
return &this
}
// NewStudioFlowWriteWithDefaults instantiates a new StudioFlowWrite 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 NewStudioFlowWriteWithDefaults() *StudioFlowWrite {
this := StudioFlowWrite{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) SetDescription(v string) {
o.Description = &v
}
// GetGraph returns the Graph field value if set, zero value otherwise.
func (o *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) SetGraph(v StudioGraph) {
o.Graph = &v
}
// GetInputs returns the Inputs field value if set, zero value otherwise.
func (o *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) SetInputs(v map[string]interface{}) {
o.Inputs = v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) SetKind(v string) {
o.Kind = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *StudioFlowWrite) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioFlowWrite) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *StudioFlowWrite) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *StudioFlowWrite) SetName(v string) {
o.Name = &v
}
// GetShared returns the Shared field value if set, zero value otherwise.
func (o *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) 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 *StudioFlowWrite) SetShared(v bool) {
o.Shared = &v
}
func (o StudioFlowWrite) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StudioFlowWrite) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Graph) {
toSerialize["graph"] = o.Graph
}
if !IsNil(o.Inputs) {
toSerialize["inputs"] = o.Inputs
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Shared) {
toSerialize["shared"] = o.Shared
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *StudioFlowWrite) UnmarshalJSON(data []byte) (err error) {
varStudioFlowWrite := _StudioFlowWrite{}
err = json.Unmarshal(data, &varStudioFlowWrite)
if err != nil {
return err
}
*o = StudioFlowWrite(varStudioFlowWrite)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "description")
delete(additionalProperties, "graph")
delete(additionalProperties, "inputs")
delete(additionalProperties, "kind")
delete(additionalProperties, "name")
delete(additionalProperties, "shared")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableStudioFlowWrite struct {
value *StudioFlowWrite
isSet bool
}
func (v NullableStudioFlowWrite) Get() *StudioFlowWrite {
return v.value
}
func (v *NullableStudioFlowWrite) Set(val *StudioFlowWrite) {
v.value = val
v.isSet = true
}
func (v NullableStudioFlowWrite) IsSet() bool {
return v.isSet
}
func (v *NullableStudioFlowWrite) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStudioFlowWrite(val *StudioFlowWrite) *NullableStudioFlowWrite {
return &NullableStudioFlowWrite{value: val, isSet: true}
}
func (v NullableStudioFlowWrite) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStudioFlowWrite) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}