Files
sdk/model_auto_flow_trigger.go

377 lines
9.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 AutoFlowTrigger type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AutoFlowTrigger{}
// AutoFlowTrigger struct for AutoFlowTrigger
type AutoFlowTrigger struct {
DisplayName *string `json:"displayName,omitempty"`
Name *string `json:"name,omitempty"`
NextAction *AutoFlowAction `json:"nextAction,omitempty"`
Settings *AutoStepSettings `json:"settings,omitempty"`
Strategy *string `json:"strategy,omitempty"`
// PIECE_TRIGGER | EMPTY
Type *string `json:"type,omitempty"`
Valid *bool `json:"valid,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AutoFlowTrigger AutoFlowTrigger
// NewAutoFlowTrigger instantiates a new AutoFlowTrigger 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 NewAutoFlowTrigger() *AutoFlowTrigger {
this := AutoFlowTrigger{}
return &this
}
// NewAutoFlowTriggerWithDefaults instantiates a new AutoFlowTrigger 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 NewAutoFlowTriggerWithDefaults() *AutoFlowTrigger {
this := AutoFlowTrigger{}
return &this
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *AutoFlowTrigger) 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 *AutoFlowTrigger) 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 *AutoFlowTrigger) 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 *AutoFlowTrigger) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AutoFlowTrigger) 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 *AutoFlowTrigger) 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 *AutoFlowTrigger) 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 *AutoFlowTrigger) SetName(v string) {
o.Name = &v
}
// GetNextAction returns the NextAction field value if set, zero value otherwise.
func (o *AutoFlowTrigger) GetNextAction() AutoFlowAction {
if o == nil || IsNil(o.NextAction) {
var ret AutoFlowAction
return ret
}
return *o.NextAction
}
// GetNextActionOk returns a tuple with the NextAction field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowTrigger) GetNextActionOk() (*AutoFlowAction, bool) {
if o == nil || IsNil(o.NextAction) {
return nil, false
}
return o.NextAction, true
}
// HasNextAction returns a boolean if a field has been set.
func (o *AutoFlowTrigger) HasNextAction() bool {
if o != nil && !IsNil(o.NextAction) {
return true
}
return false
}
// SetNextAction gets a reference to the given AutoFlowAction and assigns it to the NextAction field.
func (o *AutoFlowTrigger) SetNextAction(v AutoFlowAction) {
o.NextAction = &v
}
// GetSettings returns the Settings field value if set, zero value otherwise.
func (o *AutoFlowTrigger) GetSettings() AutoStepSettings {
if o == nil || IsNil(o.Settings) {
var ret AutoStepSettings
return ret
}
return *o.Settings
}
// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowTrigger) GetSettingsOk() (*AutoStepSettings, bool) {
if o == nil || IsNil(o.Settings) {
return nil, false
}
return o.Settings, true
}
// HasSettings returns a boolean if a field has been set.
func (o *AutoFlowTrigger) HasSettings() bool {
if o != nil && !IsNil(o.Settings) {
return true
}
return false
}
// SetSettings gets a reference to the given AutoStepSettings and assigns it to the Settings field.
func (o *AutoFlowTrigger) SetSettings(v AutoStepSettings) {
o.Settings = &v
}
// GetStrategy returns the Strategy field value if set, zero value otherwise.
func (o *AutoFlowTrigger) GetStrategy() string {
if o == nil || IsNil(o.Strategy) {
var ret string
return ret
}
return *o.Strategy
}
// GetStrategyOk returns a tuple with the Strategy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowTrigger) GetStrategyOk() (*string, bool) {
if o == nil || IsNil(o.Strategy) {
return nil, false
}
return o.Strategy, true
}
// HasStrategy returns a boolean if a field has been set.
func (o *AutoFlowTrigger) HasStrategy() bool {
if o != nil && !IsNil(o.Strategy) {
return true
}
return false
}
// SetStrategy gets a reference to the given string and assigns it to the Strategy field.
func (o *AutoFlowTrigger) SetStrategy(v string) {
o.Strategy = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *AutoFlowTrigger) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowTrigger) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *AutoFlowTrigger) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *AutoFlowTrigger) SetType(v string) {
o.Type = &v
}
// GetValid returns the Valid field value if set, zero value otherwise.
func (o *AutoFlowTrigger) GetValid() bool {
if o == nil || IsNil(o.Valid) {
var ret bool
return ret
}
return *o.Valid
}
// GetValidOk returns a tuple with the Valid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowTrigger) GetValidOk() (*bool, bool) {
if o == nil || IsNil(o.Valid) {
return nil, false
}
return o.Valid, true
}
// HasValid returns a boolean if a field has been set.
func (o *AutoFlowTrigger) HasValid() bool {
if o != nil && !IsNil(o.Valid) {
return true
}
return false
}
// SetValid gets a reference to the given bool and assigns it to the Valid field.
func (o *AutoFlowTrigger) SetValid(v bool) {
o.Valid = &v
}
func (o AutoFlowTrigger) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AutoFlowTrigger) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.NextAction) {
toSerialize["nextAction"] = o.NextAction
}
if !IsNil(o.Settings) {
toSerialize["settings"] = o.Settings
}
if !IsNil(o.Strategy) {
toSerialize["strategy"] = o.Strategy
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.Valid) {
toSerialize["valid"] = o.Valid
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AutoFlowTrigger) UnmarshalJSON(data []byte) (err error) {
varAutoFlowTrigger := _AutoFlowTrigger{}
err = json.Unmarshal(data, &varAutoFlowTrigger)
if err != nil {
return err
}
*o = AutoFlowTrigger(varAutoFlowTrigger)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "displayName")
delete(additionalProperties, "name")
delete(additionalProperties, "nextAction")
delete(additionalProperties, "settings")
delete(additionalProperties, "strategy")
delete(additionalProperties, "type")
delete(additionalProperties, "valid")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAutoFlowTrigger struct {
value *AutoFlowTrigger
isSet bool
}
func (v NullableAutoFlowTrigger) Get() *AutoFlowTrigger {
return v.value
}
func (v *NullableAutoFlowTrigger) Set(val *AutoFlowTrigger) {
v.value = val
v.isSet = true
}
func (v NullableAutoFlowTrigger) IsSet() bool {
return v.isSet
}
func (v *NullableAutoFlowTrigger) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAutoFlowTrigger(val *AutoFlowTrigger) *NullableAutoFlowTrigger {
return &NullableAutoFlowTrigger{value: val, isSet: true}
}
func (v NullableAutoFlowTrigger) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAutoFlowTrigger) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}