Files
sdk/model_auto_flow_version.go

450 lines
12 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 AutoFlowVersion type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AutoFlowVersion{}
// AutoFlowVersion struct for AutoFlowVersion
type AutoFlowVersion struct {
Created *int64 `json:"created,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
FlowId *string `json:"flowId,omitempty"`
Id *string `json:"id,omitempty"`
SchemaVersion *string `json:"schemaVersion,omitempty"`
State *string `json:"state,omitempty"`
Trigger *AutoFlowTrigger `json:"trigger,omitempty"`
Updated *int64 `json:"updated,omitempty"`
Valid *bool `json:"valid,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AutoFlowVersion AutoFlowVersion
// NewAutoFlowVersion instantiates a new AutoFlowVersion 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 NewAutoFlowVersion() *AutoFlowVersion {
this := AutoFlowVersion{}
return &this
}
// NewAutoFlowVersionWithDefaults instantiates a new AutoFlowVersion 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 NewAutoFlowVersionWithDefaults() *AutoFlowVersion {
this := AutoFlowVersion{}
return &this
}
// GetCreated returns the Created field value if set, zero value otherwise.
func (o *AutoFlowVersion) GetCreated() int64 {
if o == nil || IsNil(o.Created) {
var ret int64
return ret
}
return *o.Created
}
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowVersion) GetCreatedOk() (*int64, bool) {
if o == nil || IsNil(o.Created) {
return nil, false
}
return o.Created, true
}
// HasCreated returns a boolean if a field has been set.
func (o *AutoFlowVersion) HasCreated() bool {
if o != nil && !IsNil(o.Created) {
return true
}
return false
}
// SetCreated gets a reference to the given int64 and assigns it to the Created field.
func (o *AutoFlowVersion) SetCreated(v int64) {
o.Created = &v
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *AutoFlowVersion) 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 *AutoFlowVersion) 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 *AutoFlowVersion) 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 *AutoFlowVersion) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetFlowId returns the FlowId field value if set, zero value otherwise.
func (o *AutoFlowVersion) GetFlowId() string {
if o == nil || IsNil(o.FlowId) {
var ret string
return ret
}
return *o.FlowId
}
// GetFlowIdOk returns a tuple with the FlowId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowVersion) GetFlowIdOk() (*string, bool) {
if o == nil || IsNil(o.FlowId) {
return nil, false
}
return o.FlowId, true
}
// HasFlowId returns a boolean if a field has been set.
func (o *AutoFlowVersion) HasFlowId() bool {
if o != nil && !IsNil(o.FlowId) {
return true
}
return false
}
// SetFlowId gets a reference to the given string and assigns it to the FlowId field.
func (o *AutoFlowVersion) SetFlowId(v string) {
o.FlowId = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *AutoFlowVersion) 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 *AutoFlowVersion) 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 *AutoFlowVersion) 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 *AutoFlowVersion) SetId(v string) {
o.Id = &v
}
// GetSchemaVersion returns the SchemaVersion field value if set, zero value otherwise.
func (o *AutoFlowVersion) GetSchemaVersion() string {
if o == nil || IsNil(o.SchemaVersion) {
var ret string
return ret
}
return *o.SchemaVersion
}
// GetSchemaVersionOk returns a tuple with the SchemaVersion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowVersion) GetSchemaVersionOk() (*string, bool) {
if o == nil || IsNil(o.SchemaVersion) {
return nil, false
}
return o.SchemaVersion, true
}
// HasSchemaVersion returns a boolean if a field has been set.
func (o *AutoFlowVersion) HasSchemaVersion() bool {
if o != nil && !IsNil(o.SchemaVersion) {
return true
}
return false
}
// SetSchemaVersion gets a reference to the given string and assigns it to the SchemaVersion field.
func (o *AutoFlowVersion) SetSchemaVersion(v string) {
o.SchemaVersion = &v
}
// GetState returns the State field value if set, zero value otherwise.
func (o *AutoFlowVersion) GetState() string {
if o == nil || IsNil(o.State) {
var ret string
return ret
}
return *o.State
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowVersion) GetStateOk() (*string, bool) {
if o == nil || IsNil(o.State) {
return nil, false
}
return o.State, true
}
// HasState returns a boolean if a field has been set.
func (o *AutoFlowVersion) HasState() bool {
if o != nil && !IsNil(o.State) {
return true
}
return false
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *AutoFlowVersion) SetState(v string) {
o.State = &v
}
// GetTrigger returns the Trigger field value if set, zero value otherwise.
func (o *AutoFlowVersion) 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 *AutoFlowVersion) 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 *AutoFlowVersion) 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 *AutoFlowVersion) SetTrigger(v AutoFlowTrigger) {
o.Trigger = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise.
func (o *AutoFlowVersion) GetUpdated() int64 {
if o == nil || IsNil(o.Updated) {
var ret int64
return ret
}
return *o.Updated
}
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowVersion) GetUpdatedOk() (*int64, bool) {
if o == nil || IsNil(o.Updated) {
return nil, false
}
return o.Updated, true
}
// HasUpdated returns a boolean if a field has been set.
func (o *AutoFlowVersion) HasUpdated() bool {
if o != nil && !IsNil(o.Updated) {
return true
}
return false
}
// SetUpdated gets a reference to the given int64 and assigns it to the Updated field.
func (o *AutoFlowVersion) SetUpdated(v int64) {
o.Updated = &v
}
// GetValid returns the Valid field value if set, zero value otherwise.
func (o *AutoFlowVersion) 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 *AutoFlowVersion) 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 *AutoFlowVersion) 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 *AutoFlowVersion) SetValid(v bool) {
o.Valid = &v
}
func (o AutoFlowVersion) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AutoFlowVersion) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Created) {
toSerialize["created"] = o.Created
}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.FlowId) {
toSerialize["flowId"] = o.FlowId
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.SchemaVersion) {
toSerialize["schemaVersion"] = o.SchemaVersion
}
if !IsNil(o.State) {
toSerialize["state"] = o.State
}
if !IsNil(o.Trigger) {
toSerialize["trigger"] = o.Trigger
}
if !IsNil(o.Updated) {
toSerialize["updated"] = o.Updated
}
if !IsNil(o.Valid) {
toSerialize["valid"] = o.Valid
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AutoFlowVersion) UnmarshalJSON(data []byte) (err error) {
varAutoFlowVersion := _AutoFlowVersion{}
err = json.Unmarshal(data, &varAutoFlowVersion)
if err != nil {
return err
}
*o = AutoFlowVersion(varAutoFlowVersion)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "created")
delete(additionalProperties, "displayName")
delete(additionalProperties, "flowId")
delete(additionalProperties, "id")
delete(additionalProperties, "schemaVersion")
delete(additionalProperties, "state")
delete(additionalProperties, "trigger")
delete(additionalProperties, "updated")
delete(additionalProperties, "valid")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAutoFlowVersion struct {
value *AutoFlowVersion
isSet bool
}
func (v NullableAutoFlowVersion) Get() *AutoFlowVersion {
return v.value
}
func (v *NullableAutoFlowVersion) Set(val *AutoFlowVersion) {
v.value = val
v.isSet = true
}
func (v NullableAutoFlowVersion) IsSet() bool {
return v.isSet
}
func (v *NullableAutoFlowVersion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAutoFlowVersion(val *AutoFlowVersion) *NullableAutoFlowVersion {
return &NullableAutoFlowVersion{value: val, isSet: true}
}
func (v NullableAutoFlowVersion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAutoFlowVersion) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}