mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
459 lines
12 KiB
Go
459 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 FormPublicForm type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormPublicForm{}
|
|
|
|
// FormPublicForm struct for FormPublicForm
|
|
type FormPublicForm struct {
|
|
// Fields are the questions, in order.
|
|
Fields []FormField `json:"fields,omitempty"`
|
|
// Hidden names the values the page passes in.
|
|
Hidden []string `json:"hidden,omitempty"`
|
|
// ID is the form's public id.
|
|
Id *string `json:"id,omitempty"`
|
|
// Kind is form or subscribe.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Settings are how the form is answered.
|
|
Settings *FormDrawn `json:"settings,omitempty"`
|
|
// Thanks is the screen after a submission, or where the respondent is sent.
|
|
Thanks *FormScreen `json:"thanks,omitempty"`
|
|
// Theme is the theme the form is drawn in, when it names one.
|
|
Theme *FormTheme `json:"theme,omitempty"`
|
|
// Title is the form's title.
|
|
Title *string `json:"title,omitempty"`
|
|
// Welcome is the screen before the first question.
|
|
Welcome *FormScreen `json:"welcome,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormPublicForm FormPublicForm
|
|
|
|
// NewFormPublicForm instantiates a new FormPublicForm 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 NewFormPublicForm() *FormPublicForm {
|
|
this := FormPublicForm{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormPublicFormWithDefaults instantiates a new FormPublicForm 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 NewFormPublicFormWithDefaults() *FormPublicForm {
|
|
this := FormPublicForm{}
|
|
return &this
|
|
}
|
|
|
|
// GetFields returns the Fields field value if set, zero value otherwise.
|
|
func (o *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) SetFields(v []FormField) {
|
|
o.Fields = v
|
|
}
|
|
|
|
// GetHidden returns the Hidden field value if set, zero value otherwise.
|
|
func (o *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) SetHidden(v []string) {
|
|
o.Hidden = v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetSettings returns the Settings field value if set, zero value otherwise.
|
|
func (o *FormPublicForm) GetSettings() FormDrawn {
|
|
if o == nil || IsNil(o.Settings) {
|
|
var ret FormDrawn
|
|
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 *FormPublicForm) GetSettingsOk() (*FormDrawn, 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 *FormPublicForm) HasSettings() bool {
|
|
if o != nil && !IsNil(o.Settings) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSettings gets a reference to the given FormDrawn and assigns it to the Settings field.
|
|
func (o *FormPublicForm) SetSettings(v FormDrawn) {
|
|
o.Settings = &v
|
|
}
|
|
|
|
// GetThanks returns the Thanks field value if set, zero value otherwise.
|
|
func (o *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) SetThanks(v FormScreen) {
|
|
o.Thanks = &v
|
|
}
|
|
|
|
// GetTheme returns the Theme field value if set, zero value otherwise.
|
|
func (o *FormPublicForm) GetTheme() FormTheme {
|
|
if o == nil || IsNil(o.Theme) {
|
|
var ret FormTheme
|
|
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 *FormPublicForm) GetThemeOk() (*FormTheme, 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 *FormPublicForm) HasTheme() bool {
|
|
if o != nil && !IsNil(o.Theme) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTheme gets a reference to the given FormTheme and assigns it to the Theme field.
|
|
func (o *FormPublicForm) SetTheme(v FormTheme) {
|
|
o.Theme = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetWelcome returns the Welcome field value if set, zero value otherwise.
|
|
func (o *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) 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 *FormPublicForm) SetWelcome(v FormScreen) {
|
|
o.Welcome = &v
|
|
}
|
|
|
|
func (o FormPublicForm) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormPublicForm) 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.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 *FormPublicForm) UnmarshalJSON(data []byte) (err error) {
|
|
varFormPublicForm := _FormPublicForm{}
|
|
|
|
err = json.Unmarshal(data, &varFormPublicForm)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormPublicForm(varFormPublicForm)
|
|
|
|
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, "thanks")
|
|
delete(additionalProperties, "theme")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "welcome")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormPublicForm struct {
|
|
value *FormPublicForm
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormPublicForm) Get() *FormPublicForm {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormPublicForm) Set(val *FormPublicForm) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormPublicForm) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormPublicForm) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormPublicForm(val *FormPublicForm) *NullableFormPublicForm {
|
|
return &NullableFormPublicForm{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormPublicForm) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormPublicForm) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|