mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
378 lines
9.1 KiB
Go
378 lines
9.1 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 FormAnswer type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormAnswer{}
|
|
|
|
// FormAnswer struct for FormAnswer
|
|
type FormAnswer struct {
|
|
Boolean *bool `json:"boolean,omitempty"`
|
|
Choices []string `json:"choices,omitempty"`
|
|
Date *string `json:"date,omitempty"`
|
|
// Field is the ref of the field answered.
|
|
Field *string `json:"field,omitempty"`
|
|
Number *float64 `json:"number,omitempty"`
|
|
Text *string `json:"text,omitempty"`
|
|
// Type is the field's type. Set on a read; ignored on a write.
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormAnswer FormAnswer
|
|
|
|
// NewFormAnswer instantiates a new FormAnswer 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 NewFormAnswer() *FormAnswer {
|
|
this := FormAnswer{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormAnswerWithDefaults instantiates a new FormAnswer 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 NewFormAnswerWithDefaults() *FormAnswer {
|
|
this := FormAnswer{}
|
|
return &this
|
|
}
|
|
|
|
// GetBoolean returns the Boolean field value if set, zero value otherwise.
|
|
func (o *FormAnswer) GetBoolean() bool {
|
|
if o == nil || IsNil(o.Boolean) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Boolean
|
|
}
|
|
|
|
// GetBooleanOk returns a tuple with the Boolean field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormAnswer) GetBooleanOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Boolean) {
|
|
return nil, false
|
|
}
|
|
return o.Boolean, true
|
|
}
|
|
|
|
// HasBoolean returns a boolean if a field has been set.
|
|
func (o *FormAnswer) HasBoolean() bool {
|
|
if o != nil && !IsNil(o.Boolean) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBoolean gets a reference to the given bool and assigns it to the Boolean field.
|
|
func (o *FormAnswer) SetBoolean(v bool) {
|
|
o.Boolean = &v
|
|
}
|
|
|
|
// GetChoices returns the Choices field value if set, zero value otherwise.
|
|
func (o *FormAnswer) GetChoices() []string {
|
|
if o == nil || IsNil(o.Choices) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Choices
|
|
}
|
|
|
|
// GetChoicesOk returns a tuple with the Choices field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormAnswer) GetChoicesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Choices) {
|
|
return nil, false
|
|
}
|
|
return o.Choices, true
|
|
}
|
|
|
|
// HasChoices returns a boolean if a field has been set.
|
|
func (o *FormAnswer) HasChoices() bool {
|
|
if o != nil && !IsNil(o.Choices) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChoices gets a reference to the given []string and assigns it to the Choices field.
|
|
func (o *FormAnswer) SetChoices(v []string) {
|
|
o.Choices = v
|
|
}
|
|
|
|
// GetDate returns the Date field value if set, zero value otherwise.
|
|
func (o *FormAnswer) GetDate() string {
|
|
if o == nil || IsNil(o.Date) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Date
|
|
}
|
|
|
|
// GetDateOk returns a tuple with the Date field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormAnswer) GetDateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Date) {
|
|
return nil, false
|
|
}
|
|
return o.Date, true
|
|
}
|
|
|
|
// HasDate returns a boolean if a field has been set.
|
|
func (o *FormAnswer) HasDate() bool {
|
|
if o != nil && !IsNil(o.Date) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDate gets a reference to the given string and assigns it to the Date field.
|
|
func (o *FormAnswer) SetDate(v string) {
|
|
o.Date = &v
|
|
}
|
|
|
|
// GetField returns the Field field value if set, zero value otherwise.
|
|
func (o *FormAnswer) GetField() string {
|
|
if o == nil || IsNil(o.Field) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Field
|
|
}
|
|
|
|
// GetFieldOk returns a tuple with the Field field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormAnswer) GetFieldOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Field) {
|
|
return nil, false
|
|
}
|
|
return o.Field, true
|
|
}
|
|
|
|
// HasField returns a boolean if a field has been set.
|
|
func (o *FormAnswer) HasField() bool {
|
|
if o != nil && !IsNil(o.Field) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetField gets a reference to the given string and assigns it to the Field field.
|
|
func (o *FormAnswer) SetField(v string) {
|
|
o.Field = &v
|
|
}
|
|
|
|
// GetNumber returns the Number field value if set, zero value otherwise.
|
|
func (o *FormAnswer) GetNumber() float64 {
|
|
if o == nil || IsNil(o.Number) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Number
|
|
}
|
|
|
|
// GetNumberOk returns a tuple with the Number field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormAnswer) GetNumberOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Number) {
|
|
return nil, false
|
|
}
|
|
return o.Number, true
|
|
}
|
|
|
|
// HasNumber returns a boolean if a field has been set.
|
|
func (o *FormAnswer) HasNumber() bool {
|
|
if o != nil && !IsNil(o.Number) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNumber gets a reference to the given float64 and assigns it to the Number field.
|
|
func (o *FormAnswer) SetNumber(v float64) {
|
|
o.Number = &v
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise.
|
|
func (o *FormAnswer) GetText() string {
|
|
if o == nil || IsNil(o.Text) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Text
|
|
}
|
|
|
|
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormAnswer) GetTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Text) {
|
|
return nil, false
|
|
}
|
|
return o.Text, true
|
|
}
|
|
|
|
// HasText returns a boolean if a field has been set.
|
|
func (o *FormAnswer) HasText() bool {
|
|
if o != nil && !IsNil(o.Text) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetText gets a reference to the given string and assigns it to the Text field.
|
|
func (o *FormAnswer) SetText(v string) {
|
|
o.Text = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *FormAnswer) GetType() string {
|
|
if o == nil || IsNil(o.Type) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormAnswer) GetTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Type) {
|
|
return nil, false
|
|
}
|
|
return o.Type, true
|
|
}
|
|
|
|
// HasType returns a boolean if a field has been set.
|
|
func (o *FormAnswer) HasType() bool {
|
|
if o != nil && !IsNil(o.Type) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
|
func (o *FormAnswer) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o FormAnswer) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormAnswer) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Boolean) {
|
|
toSerialize["boolean"] = o.Boolean
|
|
}
|
|
if !IsNil(o.Choices) {
|
|
toSerialize["choices"] = o.Choices
|
|
}
|
|
if !IsNil(o.Date) {
|
|
toSerialize["date"] = o.Date
|
|
}
|
|
if !IsNil(o.Field) {
|
|
toSerialize["field"] = o.Field
|
|
}
|
|
if !IsNil(o.Number) {
|
|
toSerialize["number"] = o.Number
|
|
}
|
|
if !IsNil(o.Text) {
|
|
toSerialize["text"] = o.Text
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormAnswer) UnmarshalJSON(data []byte) (err error) {
|
|
varFormAnswer := _FormAnswer{}
|
|
|
|
err = json.Unmarshal(data, &varFormAnswer)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormAnswer(varFormAnswer)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "boolean")
|
|
delete(additionalProperties, "choices")
|
|
delete(additionalProperties, "date")
|
|
delete(additionalProperties, "field")
|
|
delete(additionalProperties, "number")
|
|
delete(additionalProperties, "text")
|
|
delete(additionalProperties, "type")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormAnswer struct {
|
|
value *FormAnswer
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormAnswer) Get() *FormAnswer {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormAnswer) Set(val *FormAnswer) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormAnswer) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormAnswer) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormAnswer(val *FormAnswer) *NullableFormAnswer {
|
|
return &NullableFormAnswer{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormAnswer) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormAnswer) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|