Files
sdk/model_form_options.go

307 lines
8.4 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 FormOptions type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FormOptions{}
// FormOptions struct for FormOptions
type FormOptions struct {
// Identity is who a response is from when nobody is signed in. claimed (the default): an address typed into an email field is the respondent's CLAIM, filed on the CRM marked unverified, on the person it names only when the CRM already holds them and without changing them; it joins no list and is mailed no welcome, and a list's consent is asked by the double opt-in instead. verified: only a signed-in respondent (their token) is anyone; a typed address is an answer and nothing more. A signed-in respondent is verified under either.
Identity *string `json:"identity,omitempty"`
// Language is the form's language, a tag like en or pt-BR. Default en.
Language *string `json:"language,omitempty"`
// Mode is one (a question at a time, the default) or all (every question at once).
Mode *string `json:"mode,omitempty"`
// Progress is whether the renderer shows a progress bar.
Progress *bool `json:"progress,omitempty"`
// Visibility is public (answerable at its public address by anyone) or private (not served there). Default public.
Visibility *string `json:"visibility,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FormOptions FormOptions
// NewFormOptions instantiates a new FormOptions 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 NewFormOptions() *FormOptions {
this := FormOptions{}
return &this
}
// NewFormOptionsWithDefaults instantiates a new FormOptions 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 NewFormOptionsWithDefaults() *FormOptions {
this := FormOptions{}
return &this
}
// GetIdentity returns the Identity field value if set, zero value otherwise.
func (o *FormOptions) GetIdentity() string {
if o == nil || IsNil(o.Identity) {
var ret string
return ret
}
return *o.Identity
}
// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormOptions) GetIdentityOk() (*string, bool) {
if o == nil || IsNil(o.Identity) {
return nil, false
}
return o.Identity, true
}
// HasIdentity returns a boolean if a field has been set.
func (o *FormOptions) HasIdentity() bool {
if o != nil && !IsNil(o.Identity) {
return true
}
return false
}
// SetIdentity gets a reference to the given string and assigns it to the Identity field.
func (o *FormOptions) SetIdentity(v string) {
o.Identity = &v
}
// GetLanguage returns the Language field value if set, zero value otherwise.
func (o *FormOptions) GetLanguage() string {
if o == nil || IsNil(o.Language) {
var ret string
return ret
}
return *o.Language
}
// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormOptions) GetLanguageOk() (*string, bool) {
if o == nil || IsNil(o.Language) {
return nil, false
}
return o.Language, true
}
// HasLanguage returns a boolean if a field has been set.
func (o *FormOptions) HasLanguage() bool {
if o != nil && !IsNil(o.Language) {
return true
}
return false
}
// SetLanguage gets a reference to the given string and assigns it to the Language field.
func (o *FormOptions) SetLanguage(v string) {
o.Language = &v
}
// GetMode returns the Mode field value if set, zero value otherwise.
func (o *FormOptions) GetMode() string {
if o == nil || IsNil(o.Mode) {
var ret string
return ret
}
return *o.Mode
}
// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormOptions) GetModeOk() (*string, bool) {
if o == nil || IsNil(o.Mode) {
return nil, false
}
return o.Mode, true
}
// HasMode returns a boolean if a field has been set.
func (o *FormOptions) HasMode() bool {
if o != nil && !IsNil(o.Mode) {
return true
}
return false
}
// SetMode gets a reference to the given string and assigns it to the Mode field.
func (o *FormOptions) SetMode(v string) {
o.Mode = &v
}
// GetProgress returns the Progress field value if set, zero value otherwise.
func (o *FormOptions) GetProgress() bool {
if o == nil || IsNil(o.Progress) {
var ret bool
return ret
}
return *o.Progress
}
// GetProgressOk returns a tuple with the Progress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormOptions) GetProgressOk() (*bool, bool) {
if o == nil || IsNil(o.Progress) {
return nil, false
}
return o.Progress, true
}
// HasProgress returns a boolean if a field has been set.
func (o *FormOptions) HasProgress() bool {
if o != nil && !IsNil(o.Progress) {
return true
}
return false
}
// SetProgress gets a reference to the given bool and assigns it to the Progress field.
func (o *FormOptions) SetProgress(v bool) {
o.Progress = &v
}
// GetVisibility returns the Visibility field value if set, zero value otherwise.
func (o *FormOptions) GetVisibility() string {
if o == nil || IsNil(o.Visibility) {
var ret string
return ret
}
return *o.Visibility
}
// GetVisibilityOk returns a tuple with the Visibility field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormOptions) GetVisibilityOk() (*string, bool) {
if o == nil || IsNil(o.Visibility) {
return nil, false
}
return o.Visibility, true
}
// HasVisibility returns a boolean if a field has been set.
func (o *FormOptions) HasVisibility() bool {
if o != nil && !IsNil(o.Visibility) {
return true
}
return false
}
// SetVisibility gets a reference to the given string and assigns it to the Visibility field.
func (o *FormOptions) SetVisibility(v string) {
o.Visibility = &v
}
func (o FormOptions) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FormOptions) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Identity) {
toSerialize["identity"] = o.Identity
}
if !IsNil(o.Language) {
toSerialize["language"] = o.Language
}
if !IsNil(o.Mode) {
toSerialize["mode"] = o.Mode
}
if !IsNil(o.Progress) {
toSerialize["progress"] = o.Progress
}
if !IsNil(o.Visibility) {
toSerialize["visibility"] = o.Visibility
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FormOptions) UnmarshalJSON(data []byte) (err error) {
varFormOptions := _FormOptions{}
err = json.Unmarshal(data, &varFormOptions)
if err != nil {
return err
}
*o = FormOptions(varFormOptions)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "identity")
delete(additionalProperties, "language")
delete(additionalProperties, "mode")
delete(additionalProperties, "progress")
delete(additionalProperties, "visibility")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFormOptions struct {
value *FormOptions
isSet bool
}
func (v NullableFormOptions) Get() *FormOptions {
return v.value
}
func (v *NullableFormOptions) Set(val *FormOptions) {
v.value = val
v.isSet = true
}
func (v NullableFormOptions) IsSet() bool {
return v.isSet
}
func (v *NullableFormOptions) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFormOptions(val *FormOptions) *NullableFormOptions {
return &NullableFormOptions{value: val, isSet: true}
}
func (v NullableFormOptions) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFormOptions) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}