Files
sdk/model_auto_create_flow_req.go

269 lines
7.4 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 AutoCreateFlowReq type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AutoCreateFlowReq{}
// AutoCreateFlowReq struct for AutoCreateFlowReq
type AutoCreateFlowReq struct {
// DisplayName names the flow's initial draft version.
DisplayName *string `json:"displayName,omitempty"`
// ExternalID is the caller's own id for this flow. Optional.
ExternalId *string `json:"externalId,omitempty"`
// FolderID groups the flow in the builder's tree. Optional.
FolderId *string `json:"folderId,omitempty"`
// Trigger is the root of the step tree — how the flow starts, and the action chain that follows. Optional: a flow may be created empty and edited later.
Trigger *AutoFlowTrigger `json:"trigger,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AutoCreateFlowReq AutoCreateFlowReq
// NewAutoCreateFlowReq instantiates a new AutoCreateFlowReq 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 NewAutoCreateFlowReq() *AutoCreateFlowReq {
this := AutoCreateFlowReq{}
return &this
}
// NewAutoCreateFlowReqWithDefaults instantiates a new AutoCreateFlowReq 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 NewAutoCreateFlowReqWithDefaults() *AutoCreateFlowReq {
this := AutoCreateFlowReq{}
return &this
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *AutoCreateFlowReq) 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 *AutoCreateFlowReq) 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 *AutoCreateFlowReq) 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 *AutoCreateFlowReq) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
func (o *AutoCreateFlowReq) GetExternalId() string {
if o == nil || IsNil(o.ExternalId) {
var ret string
return ret
}
return *o.ExternalId
}
// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoCreateFlowReq) GetExternalIdOk() (*string, bool) {
if o == nil || IsNil(o.ExternalId) {
return nil, false
}
return o.ExternalId, true
}
// HasExternalId returns a boolean if a field has been set.
func (o *AutoCreateFlowReq) HasExternalId() bool {
if o != nil && !IsNil(o.ExternalId) {
return true
}
return false
}
// SetExternalId gets a reference to the given string and assigns it to the ExternalId field.
func (o *AutoCreateFlowReq) SetExternalId(v string) {
o.ExternalId = &v
}
// GetFolderId returns the FolderId field value if set, zero value otherwise.
func (o *AutoCreateFlowReq) GetFolderId() string {
if o == nil || IsNil(o.FolderId) {
var ret string
return ret
}
return *o.FolderId
}
// GetFolderIdOk returns a tuple with the FolderId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoCreateFlowReq) GetFolderIdOk() (*string, bool) {
if o == nil || IsNil(o.FolderId) {
return nil, false
}
return o.FolderId, true
}
// HasFolderId returns a boolean if a field has been set.
func (o *AutoCreateFlowReq) HasFolderId() bool {
if o != nil && !IsNil(o.FolderId) {
return true
}
return false
}
// SetFolderId gets a reference to the given string and assigns it to the FolderId field.
func (o *AutoCreateFlowReq) SetFolderId(v string) {
o.FolderId = &v
}
// GetTrigger returns the Trigger field value if set, zero value otherwise.
func (o *AutoCreateFlowReq) 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 *AutoCreateFlowReq) 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 *AutoCreateFlowReq) 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 *AutoCreateFlowReq) SetTrigger(v AutoFlowTrigger) {
o.Trigger = &v
}
func (o AutoCreateFlowReq) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AutoCreateFlowReq) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.ExternalId) {
toSerialize["externalId"] = o.ExternalId
}
if !IsNil(o.FolderId) {
toSerialize["folderId"] = o.FolderId
}
if !IsNil(o.Trigger) {
toSerialize["trigger"] = o.Trigger
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AutoCreateFlowReq) UnmarshalJSON(data []byte) (err error) {
varAutoCreateFlowReq := _AutoCreateFlowReq{}
err = json.Unmarshal(data, &varAutoCreateFlowReq)
if err != nil {
return err
}
*o = AutoCreateFlowReq(varAutoCreateFlowReq)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "displayName")
delete(additionalProperties, "externalId")
delete(additionalProperties, "folderId")
delete(additionalProperties, "trigger")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAutoCreateFlowReq struct {
value *AutoCreateFlowReq
isSet bool
}
func (v NullableAutoCreateFlowReq) Get() *AutoCreateFlowReq {
return v.value
}
func (v *NullableAutoCreateFlowReq) Set(val *AutoCreateFlowReq) {
v.value = val
v.isSet = true
}
func (v NullableAutoCreateFlowReq) IsSet() bool {
return v.isSet
}
func (v *NullableAutoCreateFlowReq) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAutoCreateFlowReq(val *AutoCreateFlowReq) *NullableAutoCreateFlowReq {
return &NullableAutoCreateFlowReq{value: val, isSet: true}
}
func (v NullableAutoCreateFlowReq) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAutoCreateFlowReq) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}