Files
sdk/model_auto_flow_run.go

413 lines
10 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 AutoFlowRun type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AutoFlowRun{}
// AutoFlowRun struct for AutoFlowRun
type AutoFlowRun struct {
Created *int64 `json:"created,omitempty"`
FinishTime *int64 `json:"finishTime,omitempty"`
FlowId *string `json:"flowId,omitempty"`
FlowVersionId *string `json:"flowVersionId,omitempty"`
Id *string `json:"id,omitempty"`
StartTime *int64 `json:"startTime,omitempty"`
Status *string `json:"status,omitempty"`
Updated *int64 `json:"updated,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AutoFlowRun AutoFlowRun
// NewAutoFlowRun instantiates a new AutoFlowRun 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 NewAutoFlowRun() *AutoFlowRun {
this := AutoFlowRun{}
return &this
}
// NewAutoFlowRunWithDefaults instantiates a new AutoFlowRun 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 NewAutoFlowRunWithDefaults() *AutoFlowRun {
this := AutoFlowRun{}
return &this
}
// GetCreated returns the Created field value if set, zero value otherwise.
func (o *AutoFlowRun) 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 *AutoFlowRun) 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 *AutoFlowRun) 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 *AutoFlowRun) SetCreated(v int64) {
o.Created = &v
}
// GetFinishTime returns the FinishTime field value if set, zero value otherwise.
func (o *AutoFlowRun) GetFinishTime() int64 {
if o == nil || IsNil(o.FinishTime) {
var ret int64
return ret
}
return *o.FinishTime
}
// GetFinishTimeOk returns a tuple with the FinishTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowRun) GetFinishTimeOk() (*int64, bool) {
if o == nil || IsNil(o.FinishTime) {
return nil, false
}
return o.FinishTime, true
}
// HasFinishTime returns a boolean if a field has been set.
func (o *AutoFlowRun) HasFinishTime() bool {
if o != nil && !IsNil(o.FinishTime) {
return true
}
return false
}
// SetFinishTime gets a reference to the given int64 and assigns it to the FinishTime field.
func (o *AutoFlowRun) SetFinishTime(v int64) {
o.FinishTime = &v
}
// GetFlowId returns the FlowId field value if set, zero value otherwise.
func (o *AutoFlowRun) 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 *AutoFlowRun) 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 *AutoFlowRun) 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 *AutoFlowRun) SetFlowId(v string) {
o.FlowId = &v
}
// GetFlowVersionId returns the FlowVersionId field value if set, zero value otherwise.
func (o *AutoFlowRun) GetFlowVersionId() string {
if o == nil || IsNil(o.FlowVersionId) {
var ret string
return ret
}
return *o.FlowVersionId
}
// GetFlowVersionIdOk returns a tuple with the FlowVersionId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowRun) GetFlowVersionIdOk() (*string, bool) {
if o == nil || IsNil(o.FlowVersionId) {
return nil, false
}
return o.FlowVersionId, true
}
// HasFlowVersionId returns a boolean if a field has been set.
func (o *AutoFlowRun) HasFlowVersionId() bool {
if o != nil && !IsNil(o.FlowVersionId) {
return true
}
return false
}
// SetFlowVersionId gets a reference to the given string and assigns it to the FlowVersionId field.
func (o *AutoFlowRun) SetFlowVersionId(v string) {
o.FlowVersionId = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *AutoFlowRun) 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 *AutoFlowRun) 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 *AutoFlowRun) 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 *AutoFlowRun) SetId(v string) {
o.Id = &v
}
// GetStartTime returns the StartTime field value if set, zero value otherwise.
func (o *AutoFlowRun) GetStartTime() int64 {
if o == nil || IsNil(o.StartTime) {
var ret int64
return ret
}
return *o.StartTime
}
// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowRun) GetStartTimeOk() (*int64, bool) {
if o == nil || IsNil(o.StartTime) {
return nil, false
}
return o.StartTime, true
}
// HasStartTime returns a boolean if a field has been set.
func (o *AutoFlowRun) HasStartTime() bool {
if o != nil && !IsNil(o.StartTime) {
return true
}
return false
}
// SetStartTime gets a reference to the given int64 and assigns it to the StartTime field.
func (o *AutoFlowRun) SetStartTime(v int64) {
o.StartTime = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *AutoFlowRun) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlowRun) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *AutoFlowRun) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *AutoFlowRun) SetStatus(v string) {
o.Status = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise.
func (o *AutoFlowRun) 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 *AutoFlowRun) 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 *AutoFlowRun) 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 *AutoFlowRun) SetUpdated(v int64) {
o.Updated = &v
}
func (o AutoFlowRun) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AutoFlowRun) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Created) {
toSerialize["created"] = o.Created
}
if !IsNil(o.FinishTime) {
toSerialize["finishTime"] = o.FinishTime
}
if !IsNil(o.FlowId) {
toSerialize["flowId"] = o.FlowId
}
if !IsNil(o.FlowVersionId) {
toSerialize["flowVersionId"] = o.FlowVersionId
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.StartTime) {
toSerialize["startTime"] = o.StartTime
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Updated) {
toSerialize["updated"] = o.Updated
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AutoFlowRun) UnmarshalJSON(data []byte) (err error) {
varAutoFlowRun := _AutoFlowRun{}
err = json.Unmarshal(data, &varAutoFlowRun)
if err != nil {
return err
}
*o = AutoFlowRun(varAutoFlowRun)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "created")
delete(additionalProperties, "finishTime")
delete(additionalProperties, "flowId")
delete(additionalProperties, "flowVersionId")
delete(additionalProperties, "id")
delete(additionalProperties, "startTime")
delete(additionalProperties, "status")
delete(additionalProperties, "updated")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAutoFlowRun struct {
value *AutoFlowRun
isSet bool
}
func (v NullableAutoFlowRun) Get() *AutoFlowRun {
return v.value
}
func (v *NullableAutoFlowRun) Set(val *AutoFlowRun) {
v.value = val
v.isSet = true
}
func (v NullableAutoFlowRun) IsSet() bool {
return v.isSet
}
func (v *NullableAutoFlowRun) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAutoFlowRun(val *AutoFlowRun) *NullableAutoFlowRun {
return &NullableAutoFlowRun{value: val, isSet: true}
}
func (v NullableAutoFlowRun) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAutoFlowRun) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}