Files
sdk/model_auto_flow.go

452 lines
11 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 AutoFlow type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AutoFlow{}
// AutoFlow struct for AutoFlow
type AutoFlow struct {
Created *int64 `json:"created,omitempty"`
ExternalId *string `json:"externalId,omitempty"`
FolderId *string `json:"folderId,omitempty"`
Id *string `json:"id,omitempty"`
Metadata interface{} `json:"metadata,omitempty"`
// projectId == org (server-derived)
ProjectId *string `json:"projectId,omitempty"`
PublishedVersionId *string `json:"publishedVersionId,omitempty"`
Status *string `json:"status,omitempty"`
Updated *int64 `json:"updated,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AutoFlow AutoFlow
// NewAutoFlow instantiates a new AutoFlow 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 NewAutoFlow() *AutoFlow {
this := AutoFlow{}
return &this
}
// NewAutoFlowWithDefaults instantiates a new AutoFlow 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 NewAutoFlowWithDefaults() *AutoFlow {
this := AutoFlow{}
return &this
}
// GetCreated returns the Created field value if set, zero value otherwise.
func (o *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) SetCreated(v int64) {
o.Created = &v
}
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
func (o *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) SetExternalId(v string) {
o.ExternalId = &v
}
// GetFolderId returns the FolderId field value if set, zero value otherwise.
func (o *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) SetFolderId(v string) {
o.FolderId = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) SetId(v string) {
o.Id = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AutoFlow) GetMetadata() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AutoFlow) GetMetadataOk() (*interface{}, bool) {
if o == nil || IsNil(o.Metadata) {
return nil, false
}
return &o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *AutoFlow) HasMetadata() bool {
if o != nil && !IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given interface{} and assigns it to the Metadata field.
func (o *AutoFlow) SetMetadata(v interface{}) {
o.Metadata = v
}
// GetProjectId returns the ProjectId field value if set, zero value otherwise.
func (o *AutoFlow) GetProjectId() string {
if o == nil || IsNil(o.ProjectId) {
var ret string
return ret
}
return *o.ProjectId
}
// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlow) GetProjectIdOk() (*string, bool) {
if o == nil || IsNil(o.ProjectId) {
return nil, false
}
return o.ProjectId, true
}
// HasProjectId returns a boolean if a field has been set.
func (o *AutoFlow) HasProjectId() bool {
if o != nil && !IsNil(o.ProjectId) {
return true
}
return false
}
// SetProjectId gets a reference to the given string and assigns it to the ProjectId field.
func (o *AutoFlow) SetProjectId(v string) {
o.ProjectId = &v
}
// GetPublishedVersionId returns the PublishedVersionId field value if set, zero value otherwise.
func (o *AutoFlow) GetPublishedVersionId() string {
if o == nil || IsNil(o.PublishedVersionId) {
var ret string
return ret
}
return *o.PublishedVersionId
}
// GetPublishedVersionIdOk returns a tuple with the PublishedVersionId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoFlow) GetPublishedVersionIdOk() (*string, bool) {
if o == nil || IsNil(o.PublishedVersionId) {
return nil, false
}
return o.PublishedVersionId, true
}
// HasPublishedVersionId returns a boolean if a field has been set.
func (o *AutoFlow) HasPublishedVersionId() bool {
if o != nil && !IsNil(o.PublishedVersionId) {
return true
}
return false
}
// SetPublishedVersionId gets a reference to the given string and assigns it to the PublishedVersionId field.
func (o *AutoFlow) SetPublishedVersionId(v string) {
o.PublishedVersionId = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) SetStatus(v string) {
o.Status = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise.
func (o *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) 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 *AutoFlow) SetUpdated(v int64) {
o.Updated = &v
}
func (o AutoFlow) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AutoFlow) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Created) {
toSerialize["created"] = o.Created
}
if !IsNil(o.ExternalId) {
toSerialize["externalId"] = o.ExternalId
}
if !IsNil(o.FolderId) {
toSerialize["folderId"] = o.FolderId
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if o.Metadata != nil {
toSerialize["metadata"] = o.Metadata
}
if !IsNil(o.ProjectId) {
toSerialize["projectId"] = o.ProjectId
}
if !IsNil(o.PublishedVersionId) {
toSerialize["publishedVersionId"] = o.PublishedVersionId
}
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 *AutoFlow) UnmarshalJSON(data []byte) (err error) {
varAutoFlow := _AutoFlow{}
err = json.Unmarshal(data, &varAutoFlow)
if err != nil {
return err
}
*o = AutoFlow(varAutoFlow)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "created")
delete(additionalProperties, "externalId")
delete(additionalProperties, "folderId")
delete(additionalProperties, "id")
delete(additionalProperties, "metadata")
delete(additionalProperties, "projectId")
delete(additionalProperties, "publishedVersionId")
delete(additionalProperties, "status")
delete(additionalProperties, "updated")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAutoFlow struct {
value *AutoFlow
isSet bool
}
func (v NullableAutoFlow) Get() *AutoFlow {
return v.value
}
func (v *NullableAutoFlow) Set(val *AutoFlow) {
v.value = val
v.isSet = true
}
func (v NullableAutoFlow) IsSet() bool {
return v.isSet
}
func (v *NullableAutoFlow) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAutoFlow(val *AutoFlow) *NullableAutoFlow {
return &NullableAutoFlow{value: val, isSet: true}
}
func (v NullableAutoFlow) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAutoFlow) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}