mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
7.9 KiB
Go
307 lines
7.9 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 FlowFlowUpdate type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FlowFlowUpdate{}
|
|
|
|
// FlowFlowUpdate struct for FlowFlowUpdate
|
|
type FlowFlowUpdate struct {
|
|
Data interface{} `json:"data,omitempty"`
|
|
// Description replaces the description when present.
|
|
Description *string `json:"description,omitempty"`
|
|
// Locked freezes or unfreezes the workflow against edits when present.
|
|
Locked *bool `json:"locked,omitempty"`
|
|
// Name renames the workflow when present.
|
|
Name *string `json:"name,omitempty"`
|
|
// Workflow is the workflow's UUID, taken from the path.
|
|
Workflow *string `json:"workflow,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FlowFlowUpdate FlowFlowUpdate
|
|
|
|
// NewFlowFlowUpdate instantiates a new FlowFlowUpdate 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 NewFlowFlowUpdate() *FlowFlowUpdate {
|
|
this := FlowFlowUpdate{}
|
|
return &this
|
|
}
|
|
|
|
// NewFlowFlowUpdateWithDefaults instantiates a new FlowFlowUpdate 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 NewFlowFlowUpdateWithDefaults() *FlowFlowUpdate {
|
|
this := FlowFlowUpdate{}
|
|
return &this
|
|
}
|
|
|
|
// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *FlowFlowUpdate) GetData() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Data
|
|
}
|
|
|
|
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *FlowFlowUpdate) GetDataOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Data) {
|
|
return nil, false
|
|
}
|
|
return &o.Data, true
|
|
}
|
|
|
|
// HasData returns a boolean if a field has been set.
|
|
func (o *FlowFlowUpdate) HasData() bool {
|
|
if o != nil && !IsNil(o.Data) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetData gets a reference to the given interface{} and assigns it to the Data field.
|
|
func (o *FlowFlowUpdate) SetData(v interface{}) {
|
|
o.Data = v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *FlowFlowUpdate) 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 *FlowFlowUpdate) 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 *FlowFlowUpdate) 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 *FlowFlowUpdate) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetLocked returns the Locked field value if set, zero value otherwise.
|
|
func (o *FlowFlowUpdate) GetLocked() bool {
|
|
if o == nil || IsNil(o.Locked) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Locked
|
|
}
|
|
|
|
// GetLockedOk returns a tuple with the Locked field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowFlowUpdate) GetLockedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Locked) {
|
|
return nil, false
|
|
}
|
|
return o.Locked, true
|
|
}
|
|
|
|
// HasLocked returns a boolean if a field has been set.
|
|
func (o *FlowFlowUpdate) HasLocked() bool {
|
|
if o != nil && !IsNil(o.Locked) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLocked gets a reference to the given bool and assigns it to the Locked field.
|
|
func (o *FlowFlowUpdate) SetLocked(v bool) {
|
|
o.Locked = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *FlowFlowUpdate) 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 *FlowFlowUpdate) 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 *FlowFlowUpdate) 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 *FlowFlowUpdate) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetWorkflow returns the Workflow field value if set, zero value otherwise.
|
|
func (o *FlowFlowUpdate) GetWorkflow() string {
|
|
if o == nil || IsNil(o.Workflow) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Workflow
|
|
}
|
|
|
|
// GetWorkflowOk returns a tuple with the Workflow field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowFlowUpdate) GetWorkflowOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Workflow) {
|
|
return nil, false
|
|
}
|
|
return o.Workflow, true
|
|
}
|
|
|
|
// HasWorkflow returns a boolean if a field has been set.
|
|
func (o *FlowFlowUpdate) HasWorkflow() bool {
|
|
if o != nil && !IsNil(o.Workflow) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWorkflow gets a reference to the given string and assigns it to the Workflow field.
|
|
func (o *FlowFlowUpdate) SetWorkflow(v string) {
|
|
o.Workflow = &v
|
|
}
|
|
|
|
func (o FlowFlowUpdate) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FlowFlowUpdate) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Data != nil {
|
|
toSerialize["data"] = o.Data
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Locked) {
|
|
toSerialize["locked"] = o.Locked
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Workflow) {
|
|
toSerialize["workflow"] = o.Workflow
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FlowFlowUpdate) UnmarshalJSON(data []byte) (err error) {
|
|
varFlowFlowUpdate := _FlowFlowUpdate{}
|
|
|
|
err = json.Unmarshal(data, &varFlowFlowUpdate)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FlowFlowUpdate(varFlowFlowUpdate)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "data")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "locked")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "workflow")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFlowFlowUpdate struct {
|
|
value *FlowFlowUpdate
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFlowFlowUpdate) Get() *FlowFlowUpdate {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFlowFlowUpdate) Set(val *FlowFlowUpdate) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFlowFlowUpdate) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFlowFlowUpdate) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFlowFlowUpdate(val *FlowFlowUpdate) *NullableFlowFlowUpdate {
|
|
return &NullableFlowFlowUpdate{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFlowFlowUpdate) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFlowFlowUpdate) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|