mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
525 lines
13 KiB
Go
525 lines
13 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 FormFormPatch type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormFormPatch{}
|
|
|
|
// FormFormPatch struct for FormFormPatch
|
|
type FormFormPatch struct {
|
|
Fields []FormField `json:"fields,omitempty"`
|
|
Hidden []string `json:"hidden,omitempty"`
|
|
// ID is the form's id or its slug, from the path.
|
|
Id *string `json:"id,omitempty"`
|
|
Kind *string `json:"kind,omitempty"`
|
|
Settings *FormOptions `json:"settings,omitempty"`
|
|
Sinks *FormSinks `json:"sinks,omitempty"`
|
|
Tags []string `json:"tags,omitempty"`
|
|
Thanks *FormScreen `json:"thanks,omitempty"`
|
|
Theme *string `json:"theme,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
Welcome *FormScreen `json:"welcome,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormFormPatch FormFormPatch
|
|
|
|
// NewFormFormPatch instantiates a new FormFormPatch 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 NewFormFormPatch() *FormFormPatch {
|
|
this := FormFormPatch{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormFormPatchWithDefaults instantiates a new FormFormPatch 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 NewFormFormPatchWithDefaults() *FormFormPatch {
|
|
this := FormFormPatch{}
|
|
return &this
|
|
}
|
|
|
|
// GetFields returns the Fields field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetFields() []FormField {
|
|
if o == nil || IsNil(o.Fields) {
|
|
var ret []FormField
|
|
return ret
|
|
}
|
|
return o.Fields
|
|
}
|
|
|
|
// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetFieldsOk() ([]FormField, bool) {
|
|
if o == nil || IsNil(o.Fields) {
|
|
return nil, false
|
|
}
|
|
return o.Fields, true
|
|
}
|
|
|
|
// HasFields returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasFields() bool {
|
|
if o != nil && !IsNil(o.Fields) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFields gets a reference to the given []FormField and assigns it to the Fields field.
|
|
func (o *FormFormPatch) SetFields(v []FormField) {
|
|
o.Fields = v
|
|
}
|
|
|
|
// GetHidden returns the Hidden field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetHidden() []string {
|
|
if o == nil || IsNil(o.Hidden) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Hidden
|
|
}
|
|
|
|
// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetHiddenOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Hidden) {
|
|
return nil, false
|
|
}
|
|
return o.Hidden, true
|
|
}
|
|
|
|
// HasHidden returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasHidden() bool {
|
|
if o != nil && !IsNil(o.Hidden) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHidden gets a reference to the given []string and assigns it to the Hidden field.
|
|
func (o *FormFormPatch) SetHidden(v []string) {
|
|
o.Hidden = v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) 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 *FormFormPatch) 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 *FormFormPatch) 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 *FormFormPatch) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *FormFormPatch) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetSettings returns the Settings field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetSettings() FormOptions {
|
|
if o == nil || IsNil(o.Settings) {
|
|
var ret FormOptions
|
|
return ret
|
|
}
|
|
return *o.Settings
|
|
}
|
|
|
|
// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetSettingsOk() (*FormOptions, bool) {
|
|
if o == nil || IsNil(o.Settings) {
|
|
return nil, false
|
|
}
|
|
return o.Settings, true
|
|
}
|
|
|
|
// HasSettings returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasSettings() bool {
|
|
if o != nil && !IsNil(o.Settings) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSettings gets a reference to the given FormOptions and assigns it to the Settings field.
|
|
func (o *FormFormPatch) SetSettings(v FormOptions) {
|
|
o.Settings = &v
|
|
}
|
|
|
|
// GetSinks returns the Sinks field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetSinks() FormSinks {
|
|
if o == nil || IsNil(o.Sinks) {
|
|
var ret FormSinks
|
|
return ret
|
|
}
|
|
return *o.Sinks
|
|
}
|
|
|
|
// GetSinksOk returns a tuple with the Sinks field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetSinksOk() (*FormSinks, bool) {
|
|
if o == nil || IsNil(o.Sinks) {
|
|
return nil, false
|
|
}
|
|
return o.Sinks, true
|
|
}
|
|
|
|
// HasSinks returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasSinks() bool {
|
|
if o != nil && !IsNil(o.Sinks) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSinks gets a reference to the given FormSinks and assigns it to the Sinks field.
|
|
func (o *FormFormPatch) SetSinks(v FormSinks) {
|
|
o.Sinks = &v
|
|
}
|
|
|
|
// GetTags returns the Tags field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetTags() []string {
|
|
if o == nil || IsNil(o.Tags) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Tags
|
|
}
|
|
|
|
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetTagsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Tags) {
|
|
return nil, false
|
|
}
|
|
return o.Tags, true
|
|
}
|
|
|
|
// HasTags returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasTags() bool {
|
|
if o != nil && !IsNil(o.Tags) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTags gets a reference to the given []string and assigns it to the Tags field.
|
|
func (o *FormFormPatch) SetTags(v []string) {
|
|
o.Tags = v
|
|
}
|
|
|
|
// GetThanks returns the Thanks field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetThanks() FormScreen {
|
|
if o == nil || IsNil(o.Thanks) {
|
|
var ret FormScreen
|
|
return ret
|
|
}
|
|
return *o.Thanks
|
|
}
|
|
|
|
// GetThanksOk returns a tuple with the Thanks field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetThanksOk() (*FormScreen, bool) {
|
|
if o == nil || IsNil(o.Thanks) {
|
|
return nil, false
|
|
}
|
|
return o.Thanks, true
|
|
}
|
|
|
|
// HasThanks returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasThanks() bool {
|
|
if o != nil && !IsNil(o.Thanks) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetThanks gets a reference to the given FormScreen and assigns it to the Thanks field.
|
|
func (o *FormFormPatch) SetThanks(v FormScreen) {
|
|
o.Thanks = &v
|
|
}
|
|
|
|
// GetTheme returns the Theme field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetTheme() string {
|
|
if o == nil || IsNil(o.Theme) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Theme
|
|
}
|
|
|
|
// GetThemeOk returns a tuple with the Theme field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetThemeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Theme) {
|
|
return nil, false
|
|
}
|
|
return o.Theme, true
|
|
}
|
|
|
|
// HasTheme returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasTheme() bool {
|
|
if o != nil && !IsNil(o.Theme) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTheme gets a reference to the given string and assigns it to the Theme field.
|
|
func (o *FormFormPatch) SetTheme(v string) {
|
|
o.Theme = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetTitle() string {
|
|
if o == nil || IsNil(o.Title) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetTitleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Title) {
|
|
return nil, false
|
|
}
|
|
return o.Title, true
|
|
}
|
|
|
|
// HasTitle returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasTitle() bool {
|
|
if o != nil && !IsNil(o.Title) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTitle gets a reference to the given string and assigns it to the Title field.
|
|
func (o *FormFormPatch) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetWelcome returns the Welcome field value if set, zero value otherwise.
|
|
func (o *FormFormPatch) GetWelcome() FormScreen {
|
|
if o == nil || IsNil(o.Welcome) {
|
|
var ret FormScreen
|
|
return ret
|
|
}
|
|
return *o.Welcome
|
|
}
|
|
|
|
// GetWelcomeOk returns a tuple with the Welcome field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFormPatch) GetWelcomeOk() (*FormScreen, bool) {
|
|
if o == nil || IsNil(o.Welcome) {
|
|
return nil, false
|
|
}
|
|
return o.Welcome, true
|
|
}
|
|
|
|
// HasWelcome returns a boolean if a field has been set.
|
|
func (o *FormFormPatch) HasWelcome() bool {
|
|
if o != nil && !IsNil(o.Welcome) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWelcome gets a reference to the given FormScreen and assigns it to the Welcome field.
|
|
func (o *FormFormPatch) SetWelcome(v FormScreen) {
|
|
o.Welcome = &v
|
|
}
|
|
|
|
func (o FormFormPatch) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormFormPatch) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Fields) {
|
|
toSerialize["fields"] = o.Fields
|
|
}
|
|
if !IsNil(o.Hidden) {
|
|
toSerialize["hidden"] = o.Hidden
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Settings) {
|
|
toSerialize["settings"] = o.Settings
|
|
}
|
|
if !IsNil(o.Sinks) {
|
|
toSerialize["sinks"] = o.Sinks
|
|
}
|
|
if !IsNil(o.Tags) {
|
|
toSerialize["tags"] = o.Tags
|
|
}
|
|
if !IsNil(o.Thanks) {
|
|
toSerialize["thanks"] = o.Thanks
|
|
}
|
|
if !IsNil(o.Theme) {
|
|
toSerialize["theme"] = o.Theme
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
if !IsNil(o.Welcome) {
|
|
toSerialize["welcome"] = o.Welcome
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormFormPatch) UnmarshalJSON(data []byte) (err error) {
|
|
varFormFormPatch := _FormFormPatch{}
|
|
|
|
err = json.Unmarshal(data, &varFormFormPatch)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormFormPatch(varFormFormPatch)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "fields")
|
|
delete(additionalProperties, "hidden")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "settings")
|
|
delete(additionalProperties, "sinks")
|
|
delete(additionalProperties, "tags")
|
|
delete(additionalProperties, "thanks")
|
|
delete(additionalProperties, "theme")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "welcome")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormFormPatch struct {
|
|
value *FormFormPatch
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormFormPatch) Get() *FormFormPatch {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormFormPatch) Set(val *FormFormPatch) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormFormPatch) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormFormPatch) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormFormPatch(val *FormFormPatch) *NullableFormFormPatch {
|
|
return &NullableFormFormPatch{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormFormPatch) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormFormPatch) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|