Files
sdk/model_form_screen.go

269 lines
6.8 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 FormScreen type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FormScreen{}
// FormScreen struct for FormScreen
type FormScreen struct {
// Button is the button's label. At most 64 characters.
Button *string `json:"button,omitempty"`
// Description is the text under it. At most 2000 characters.
Description *string `json:"description,omitempty"`
// Redirect is where a thank-you screen sends the respondent instead of showing itself: an https address. Ignored on a welcome screen.
Redirect *string `json:"redirect,omitempty"`
// Title is the screen's heading. At most 200 characters.
Title *string `json:"title,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FormScreen FormScreen
// NewFormScreen instantiates a new FormScreen 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 NewFormScreen() *FormScreen {
this := FormScreen{}
return &this
}
// NewFormScreenWithDefaults instantiates a new FormScreen 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 NewFormScreenWithDefaults() *FormScreen {
this := FormScreen{}
return &this
}
// GetButton returns the Button field value if set, zero value otherwise.
func (o *FormScreen) GetButton() string {
if o == nil || IsNil(o.Button) {
var ret string
return ret
}
return *o.Button
}
// GetButtonOk returns a tuple with the Button field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormScreen) GetButtonOk() (*string, bool) {
if o == nil || IsNil(o.Button) {
return nil, false
}
return o.Button, true
}
// HasButton returns a boolean if a field has been set.
func (o *FormScreen) HasButton() bool {
if o != nil && !IsNil(o.Button) {
return true
}
return false
}
// SetButton gets a reference to the given string and assigns it to the Button field.
func (o *FormScreen) SetButton(v string) {
o.Button = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *FormScreen) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormScreen) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *FormScreen) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *FormScreen) SetDescription(v string) {
o.Description = &v
}
// GetRedirect returns the Redirect field value if set, zero value otherwise.
func (o *FormScreen) GetRedirect() string {
if o == nil || IsNil(o.Redirect) {
var ret string
return ret
}
return *o.Redirect
}
// GetRedirectOk returns a tuple with the Redirect field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormScreen) GetRedirectOk() (*string, bool) {
if o == nil || IsNil(o.Redirect) {
return nil, false
}
return o.Redirect, true
}
// HasRedirect returns a boolean if a field has been set.
func (o *FormScreen) HasRedirect() bool {
if o != nil && !IsNil(o.Redirect) {
return true
}
return false
}
// SetRedirect gets a reference to the given string and assigns it to the Redirect field.
func (o *FormScreen) SetRedirect(v string) {
o.Redirect = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *FormScreen) 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 *FormScreen) 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 *FormScreen) 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 *FormScreen) SetTitle(v string) {
o.Title = &v
}
func (o FormScreen) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FormScreen) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Button) {
toSerialize["button"] = o.Button
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Redirect) {
toSerialize["redirect"] = o.Redirect
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FormScreen) UnmarshalJSON(data []byte) (err error) {
varFormScreen := _FormScreen{}
err = json.Unmarshal(data, &varFormScreen)
if err != nil {
return err
}
*o = FormScreen(varFormScreen)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "button")
delete(additionalProperties, "description")
delete(additionalProperties, "redirect")
delete(additionalProperties, "title")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFormScreen struct {
value *FormScreen
isSet bool
}
func (v NullableFormScreen) Get() *FormScreen {
return v.value
}
func (v *NullableFormScreen) Set(val *FormScreen) {
v.value = val
v.isSet = true
}
func (v NullableFormScreen) IsSet() bool {
return v.isSet
}
func (v *NullableFormScreen) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFormScreen(val *FormScreen) *NullableFormScreen {
return &NullableFormScreen{value: val, isSet: true}
}
func (v NullableFormScreen) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFormScreen) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}