Files
sdk/model_form_colors.go

265 lines
6.5 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 FormColors type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FormColors{}
// FormColors struct for FormColors
type FormColors struct {
Answer *string `json:"answer,omitempty"`
Background *string `json:"background,omitempty"`
Button *string `json:"button,omitempty"`
Question *string `json:"question,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FormColors FormColors
// NewFormColors instantiates a new FormColors 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 NewFormColors() *FormColors {
this := FormColors{}
return &this
}
// NewFormColorsWithDefaults instantiates a new FormColors 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 NewFormColorsWithDefaults() *FormColors {
this := FormColors{}
return &this
}
// GetAnswer returns the Answer field value if set, zero value otherwise.
func (o *FormColors) GetAnswer() string {
if o == nil || IsNil(o.Answer) {
var ret string
return ret
}
return *o.Answer
}
// GetAnswerOk returns a tuple with the Answer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormColors) GetAnswerOk() (*string, bool) {
if o == nil || IsNil(o.Answer) {
return nil, false
}
return o.Answer, true
}
// HasAnswer returns a boolean if a field has been set.
func (o *FormColors) HasAnswer() bool {
if o != nil && !IsNil(o.Answer) {
return true
}
return false
}
// SetAnswer gets a reference to the given string and assigns it to the Answer field.
func (o *FormColors) SetAnswer(v string) {
o.Answer = &v
}
// GetBackground returns the Background field value if set, zero value otherwise.
func (o *FormColors) GetBackground() string {
if o == nil || IsNil(o.Background) {
var ret string
return ret
}
return *o.Background
}
// GetBackgroundOk returns a tuple with the Background field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormColors) GetBackgroundOk() (*string, bool) {
if o == nil || IsNil(o.Background) {
return nil, false
}
return o.Background, true
}
// HasBackground returns a boolean if a field has been set.
func (o *FormColors) HasBackground() bool {
if o != nil && !IsNil(o.Background) {
return true
}
return false
}
// SetBackground gets a reference to the given string and assigns it to the Background field.
func (o *FormColors) SetBackground(v string) {
o.Background = &v
}
// GetButton returns the Button field value if set, zero value otherwise.
func (o *FormColors) 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 *FormColors) 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 *FormColors) 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 *FormColors) SetButton(v string) {
o.Button = &v
}
// GetQuestion returns the Question field value if set, zero value otherwise.
func (o *FormColors) GetQuestion() string {
if o == nil || IsNil(o.Question) {
var ret string
return ret
}
return *o.Question
}
// GetQuestionOk returns a tuple with the Question field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormColors) GetQuestionOk() (*string, bool) {
if o == nil || IsNil(o.Question) {
return nil, false
}
return o.Question, true
}
// HasQuestion returns a boolean if a field has been set.
func (o *FormColors) HasQuestion() bool {
if o != nil && !IsNil(o.Question) {
return true
}
return false
}
// SetQuestion gets a reference to the given string and assigns it to the Question field.
func (o *FormColors) SetQuestion(v string) {
o.Question = &v
}
func (o FormColors) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FormColors) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Answer) {
toSerialize["answer"] = o.Answer
}
if !IsNil(o.Background) {
toSerialize["background"] = o.Background
}
if !IsNil(o.Button) {
toSerialize["button"] = o.Button
}
if !IsNil(o.Question) {
toSerialize["question"] = o.Question
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FormColors) UnmarshalJSON(data []byte) (err error) {
varFormColors := _FormColors{}
err = json.Unmarshal(data, &varFormColors)
if err != nil {
return err
}
*o = FormColors(varFormColors)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "answer")
delete(additionalProperties, "background")
delete(additionalProperties, "button")
delete(additionalProperties, "question")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFormColors struct {
value *FormColors
isSet bool
}
func (v NullableFormColors) Get() *FormColors {
return v.value
}
func (v *NullableFormColors) Set(val *FormColors) {
v.value = val
v.isSet = true
}
func (v NullableFormColors) IsSet() bool {
return v.isSet
}
func (v *NullableFormColors) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFormColors(val *FormColors) *NullableFormColors {
return &NullableFormColors{value: val, isSet: true}
}
func (v NullableFormColors) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFormColors) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}