mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
455 lines
12 KiB
Go
455 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 FormFieldSummary type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormFieldSummary{}
|
|
|
|
// FormFieldSummary struct for FormFieldSummary
|
|
type FormFieldSummary struct {
|
|
// Answered is how many responses answer it.
|
|
Answered *int64 `json:"answered,omitempty"`
|
|
// Distribution counts each value: every choice of a multiple_choice or dropdown (with its label), every point of a rating or opinion_scale, and yes and no.
|
|
Distribution []FormTally `json:"distribution,omitempty"`
|
|
// DropOff is how many open responses stopped in front of it: this is the first field they left unanswered after the last one they answered.
|
|
DropOff *int64 `json:"drop_off,omitempty"`
|
|
// Field is the field's ref; Type its type; Title its question.
|
|
Field *string `json:"field,omitempty"`
|
|
Max *float64 `json:"max,omitempty"`
|
|
// Mean, Min and Max are a number, rating or opinion_scale's.
|
|
Mean *float64 `json:"mean,omitempty"`
|
|
Min *float64 `json:"min,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormFieldSummary FormFieldSummary
|
|
|
|
// NewFormFieldSummary instantiates a new FormFieldSummary 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 NewFormFieldSummary() *FormFieldSummary {
|
|
this := FormFieldSummary{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormFieldSummaryWithDefaults instantiates a new FormFieldSummary 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 NewFormFieldSummaryWithDefaults() *FormFieldSummary {
|
|
this := FormFieldSummary{}
|
|
return &this
|
|
}
|
|
|
|
// GetAnswered returns the Answered field value if set, zero value otherwise.
|
|
func (o *FormFieldSummary) GetAnswered() int64 {
|
|
if o == nil || IsNil(o.Answered) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Answered
|
|
}
|
|
|
|
// GetAnsweredOk returns a tuple with the Answered field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFieldSummary) GetAnsweredOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Answered) {
|
|
return nil, false
|
|
}
|
|
return o.Answered, true
|
|
}
|
|
|
|
// HasAnswered returns a boolean if a field has been set.
|
|
func (o *FormFieldSummary) HasAnswered() bool {
|
|
if o != nil && !IsNil(o.Answered) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAnswered gets a reference to the given int64 and assigns it to the Answered field.
|
|
func (o *FormFieldSummary) SetAnswered(v int64) {
|
|
o.Answered = &v
|
|
}
|
|
|
|
// GetDistribution returns the Distribution field value if set, zero value otherwise.
|
|
func (o *FormFieldSummary) GetDistribution() []FormTally {
|
|
if o == nil || IsNil(o.Distribution) {
|
|
var ret []FormTally
|
|
return ret
|
|
}
|
|
return o.Distribution
|
|
}
|
|
|
|
// GetDistributionOk returns a tuple with the Distribution field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFieldSummary) GetDistributionOk() ([]FormTally, bool) {
|
|
if o == nil || IsNil(o.Distribution) {
|
|
return nil, false
|
|
}
|
|
return o.Distribution, true
|
|
}
|
|
|
|
// HasDistribution returns a boolean if a field has been set.
|
|
func (o *FormFieldSummary) HasDistribution() bool {
|
|
if o != nil && !IsNil(o.Distribution) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDistribution gets a reference to the given []FormTally and assigns it to the Distribution field.
|
|
func (o *FormFieldSummary) SetDistribution(v []FormTally) {
|
|
o.Distribution = v
|
|
}
|
|
|
|
// GetDropOff returns the DropOff field value if set, zero value otherwise.
|
|
func (o *FormFieldSummary) GetDropOff() int64 {
|
|
if o == nil || IsNil(o.DropOff) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.DropOff
|
|
}
|
|
|
|
// GetDropOffOk returns a tuple with the DropOff field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFieldSummary) GetDropOffOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.DropOff) {
|
|
return nil, false
|
|
}
|
|
return o.DropOff, true
|
|
}
|
|
|
|
// HasDropOff returns a boolean if a field has been set.
|
|
func (o *FormFieldSummary) HasDropOff() bool {
|
|
if o != nil && !IsNil(o.DropOff) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDropOff gets a reference to the given int64 and assigns it to the DropOff field.
|
|
func (o *FormFieldSummary) SetDropOff(v int64) {
|
|
o.DropOff = &v
|
|
}
|
|
|
|
// GetField returns the Field field value if set, zero value otherwise.
|
|
func (o *FormFieldSummary) 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 *FormFieldSummary) 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 *FormFieldSummary) 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 *FormFieldSummary) SetField(v string) {
|
|
o.Field = &v
|
|
}
|
|
|
|
// GetMax returns the Max field value if set, zero value otherwise.
|
|
func (o *FormFieldSummary) GetMax() float64 {
|
|
if o == nil || IsNil(o.Max) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Max
|
|
}
|
|
|
|
// GetMaxOk returns a tuple with the Max field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFieldSummary) GetMaxOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Max) {
|
|
return nil, false
|
|
}
|
|
return o.Max, true
|
|
}
|
|
|
|
// HasMax returns a boolean if a field has been set.
|
|
func (o *FormFieldSummary) HasMax() bool {
|
|
if o != nil && !IsNil(o.Max) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMax gets a reference to the given float64 and assigns it to the Max field.
|
|
func (o *FormFieldSummary) SetMax(v float64) {
|
|
o.Max = &v
|
|
}
|
|
|
|
// GetMean returns the Mean field value if set, zero value otherwise.
|
|
func (o *FormFieldSummary) GetMean() float64 {
|
|
if o == nil || IsNil(o.Mean) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Mean
|
|
}
|
|
|
|
// GetMeanOk returns a tuple with the Mean field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFieldSummary) GetMeanOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Mean) {
|
|
return nil, false
|
|
}
|
|
return o.Mean, true
|
|
}
|
|
|
|
// HasMean returns a boolean if a field has been set.
|
|
func (o *FormFieldSummary) HasMean() bool {
|
|
if o != nil && !IsNil(o.Mean) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMean gets a reference to the given float64 and assigns it to the Mean field.
|
|
func (o *FormFieldSummary) SetMean(v float64) {
|
|
o.Mean = &v
|
|
}
|
|
|
|
// GetMin returns the Min field value if set, zero value otherwise.
|
|
func (o *FormFieldSummary) GetMin() float64 {
|
|
if o == nil || IsNil(o.Min) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Min
|
|
}
|
|
|
|
// GetMinOk returns a tuple with the Min field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormFieldSummary) GetMinOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Min) {
|
|
return nil, false
|
|
}
|
|
return o.Min, true
|
|
}
|
|
|
|
// HasMin returns a boolean if a field has been set.
|
|
func (o *FormFieldSummary) HasMin() bool {
|
|
if o != nil && !IsNil(o.Min) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMin gets a reference to the given float64 and assigns it to the Min field.
|
|
func (o *FormFieldSummary) SetMin(v float64) {
|
|
o.Min = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *FormFieldSummary) 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 *FormFieldSummary) 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 *FormFieldSummary) 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 *FormFieldSummary) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *FormFieldSummary) 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 *FormFieldSummary) 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 *FormFieldSummary) 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 *FormFieldSummary) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o FormFieldSummary) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormFieldSummary) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Answered) {
|
|
toSerialize["answered"] = o.Answered
|
|
}
|
|
if !IsNil(o.Distribution) {
|
|
toSerialize["distribution"] = o.Distribution
|
|
}
|
|
if !IsNil(o.DropOff) {
|
|
toSerialize["drop_off"] = o.DropOff
|
|
}
|
|
if !IsNil(o.Field) {
|
|
toSerialize["field"] = o.Field
|
|
}
|
|
if !IsNil(o.Max) {
|
|
toSerialize["max"] = o.Max
|
|
}
|
|
if !IsNil(o.Mean) {
|
|
toSerialize["mean"] = o.Mean
|
|
}
|
|
if !IsNil(o.Min) {
|
|
toSerialize["min"] = o.Min
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormFieldSummary) UnmarshalJSON(data []byte) (err error) {
|
|
varFormFieldSummary := _FormFieldSummary{}
|
|
|
|
err = json.Unmarshal(data, &varFormFieldSummary)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormFieldSummary(varFormFieldSummary)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "answered")
|
|
delete(additionalProperties, "distribution")
|
|
delete(additionalProperties, "drop_off")
|
|
delete(additionalProperties, "field")
|
|
delete(additionalProperties, "max")
|
|
delete(additionalProperties, "mean")
|
|
delete(additionalProperties, "min")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "type")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormFieldSummary struct {
|
|
value *FormFieldSummary
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormFieldSummary) Get() *FormFieldSummary {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormFieldSummary) Set(val *FormFieldSummary) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormFieldSummary) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormFieldSummary) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormFieldSummary(val *FormFieldSummary) *NullableFormFieldSummary {
|
|
return &NullableFormFieldSummary{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormFieldSummary) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormFieldSummary) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|