mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.2 KiB
Go
231 lines
6.2 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 AutoCreateVersionIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AutoCreateVersionIn{}
|
|
|
|
// AutoCreateVersionIn struct for AutoCreateVersionIn
|
|
type AutoCreateVersionIn struct {
|
|
// DisplayName names the new version.
|
|
DisplayName *string `json:"displayName,omitempty"`
|
|
// ID is the flow to add a version to, from the path.
|
|
Id *string `json:"id,omitempty"`
|
|
// Trigger is the root of the version's step tree. Optional: a version with no trigger is created invalid, and cannot run until one is set.
|
|
Trigger *AutoFlowTrigger `json:"trigger,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AutoCreateVersionIn AutoCreateVersionIn
|
|
|
|
// NewAutoCreateVersionIn instantiates a new AutoCreateVersionIn 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 NewAutoCreateVersionIn() *AutoCreateVersionIn {
|
|
this := AutoCreateVersionIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewAutoCreateVersionInWithDefaults instantiates a new AutoCreateVersionIn 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 NewAutoCreateVersionInWithDefaults() *AutoCreateVersionIn {
|
|
this := AutoCreateVersionIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
|
func (o *AutoCreateVersionIn) GetDisplayName() string {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DisplayName
|
|
}
|
|
|
|
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoCreateVersionIn) GetDisplayNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
return nil, false
|
|
}
|
|
return o.DisplayName, true
|
|
}
|
|
|
|
// HasDisplayName returns a boolean if a field has been set.
|
|
func (o *AutoCreateVersionIn) HasDisplayName() bool {
|
|
if o != nil && !IsNil(o.DisplayName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
|
func (o *AutoCreateVersionIn) SetDisplayName(v string) {
|
|
o.DisplayName = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *AutoCreateVersionIn) 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 *AutoCreateVersionIn) 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 *AutoCreateVersionIn) 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 *AutoCreateVersionIn) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetTrigger returns the Trigger field value if set, zero value otherwise.
|
|
func (o *AutoCreateVersionIn) GetTrigger() AutoFlowTrigger {
|
|
if o == nil || IsNil(o.Trigger) {
|
|
var ret AutoFlowTrigger
|
|
return ret
|
|
}
|
|
return *o.Trigger
|
|
}
|
|
|
|
// GetTriggerOk returns a tuple with the Trigger field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoCreateVersionIn) GetTriggerOk() (*AutoFlowTrigger, bool) {
|
|
if o == nil || IsNil(o.Trigger) {
|
|
return nil, false
|
|
}
|
|
return o.Trigger, true
|
|
}
|
|
|
|
// HasTrigger returns a boolean if a field has been set.
|
|
func (o *AutoCreateVersionIn) HasTrigger() bool {
|
|
if o != nil && !IsNil(o.Trigger) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTrigger gets a reference to the given AutoFlowTrigger and assigns it to the Trigger field.
|
|
func (o *AutoCreateVersionIn) SetTrigger(v AutoFlowTrigger) {
|
|
o.Trigger = &v
|
|
}
|
|
|
|
func (o AutoCreateVersionIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AutoCreateVersionIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.DisplayName) {
|
|
toSerialize["displayName"] = o.DisplayName
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Trigger) {
|
|
toSerialize["trigger"] = o.Trigger
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AutoCreateVersionIn) UnmarshalJSON(data []byte) (err error) {
|
|
varAutoCreateVersionIn := _AutoCreateVersionIn{}
|
|
|
|
err = json.Unmarshal(data, &varAutoCreateVersionIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AutoCreateVersionIn(varAutoCreateVersionIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "displayName")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "trigger")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAutoCreateVersionIn struct {
|
|
value *AutoCreateVersionIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAutoCreateVersionIn) Get() *AutoCreateVersionIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAutoCreateVersionIn) Set(val *AutoCreateVersionIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAutoCreateVersionIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAutoCreateVersionIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAutoCreateVersionIn(val *AutoCreateVersionIn) *NullableAutoCreateVersionIn {
|
|
return &NullableAutoCreateVersionIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAutoCreateVersionIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAutoCreateVersionIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|