Files
sdk/model_auto_patch_flow_in.go

307 lines
8.3 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 AutoPatchFlowIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AutoPatchFlowIn{}
// AutoPatchFlowIn struct for AutoPatchFlowIn
type AutoPatchFlowIn struct {
// ExternalID sets the caller's own id for this flow.
ExternalId *string `json:"externalId,omitempty"`
// FolderID moves the flow in the builder's tree.
FolderId *string `json:"folderId,omitempty"`
// ID is the flow to update, from the path.
Id *string `json:"id,omitempty"`
Metadata interface{} `json:"metadata,omitempty"`
// PublishedVersionID pins the version runs execute. It must name a version OF THIS FLOW; empty clears the pin, so runs take the latest version again.
PublishedVersionId *string `json:"publishedVersionId,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AutoPatchFlowIn AutoPatchFlowIn
// NewAutoPatchFlowIn instantiates a new AutoPatchFlowIn 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 NewAutoPatchFlowIn() *AutoPatchFlowIn {
this := AutoPatchFlowIn{}
return &this
}
// NewAutoPatchFlowInWithDefaults instantiates a new AutoPatchFlowIn 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 NewAutoPatchFlowInWithDefaults() *AutoPatchFlowIn {
this := AutoPatchFlowIn{}
return &this
}
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
func (o *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) SetExternalId(v string) {
o.ExternalId = &v
}
// GetFolderId returns the FolderId field value if set, zero value otherwise.
func (o *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) SetFolderId(v string) {
o.FolderId = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) SetMetadata(v interface{}) {
o.Metadata = v
}
// GetPublishedVersionId returns the PublishedVersionId field value if set, zero value otherwise.
func (o *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) 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 *AutoPatchFlowIn) SetPublishedVersionId(v string) {
o.PublishedVersionId = &v
}
func (o AutoPatchFlowIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AutoPatchFlowIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
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.PublishedVersionId) {
toSerialize["publishedVersionId"] = o.PublishedVersionId
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AutoPatchFlowIn) UnmarshalJSON(data []byte) (err error) {
varAutoPatchFlowIn := _AutoPatchFlowIn{}
err = json.Unmarshal(data, &varAutoPatchFlowIn)
if err != nil {
return err
}
*o = AutoPatchFlowIn(varAutoPatchFlowIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "externalId")
delete(additionalProperties, "folderId")
delete(additionalProperties, "id")
delete(additionalProperties, "metadata")
delete(additionalProperties, "publishedVersionId")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAutoPatchFlowIn struct {
value *AutoPatchFlowIn
isSet bool
}
func (v NullableAutoPatchFlowIn) Get() *AutoPatchFlowIn {
return v.value
}
func (v *NullableAutoPatchFlowIn) Set(val *AutoPatchFlowIn) {
v.value = val
v.isSet = true
}
func (v NullableAutoPatchFlowIn) IsSet() bool {
return v.isSet
}
func (v *NullableAutoPatchFlowIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAutoPatchFlowIn(val *AutoPatchFlowIn) *NullableAutoPatchFlowIn {
return &NullableAutoPatchFlowIn{value: val, isSet: true}
}
func (v NullableAutoPatchFlowIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAutoPatchFlowIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}