mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
5.6 KiB
Go
231 lines
5.6 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 FormDrawn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormDrawn{}
|
|
|
|
// FormDrawn struct for FormDrawn
|
|
type FormDrawn struct {
|
|
// Language is the form's language tag.
|
|
Language *string `json:"language,omitempty"`
|
|
// Mode is one (a question at a time) or all.
|
|
Mode *string `json:"mode,omitempty"`
|
|
// Progress is whether a progress bar is shown.
|
|
Progress *bool `json:"progress,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormDrawn FormDrawn
|
|
|
|
// NewFormDrawn instantiates a new FormDrawn 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 NewFormDrawn() *FormDrawn {
|
|
this := FormDrawn{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormDrawnWithDefaults instantiates a new FormDrawn 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 NewFormDrawnWithDefaults() *FormDrawn {
|
|
this := FormDrawn{}
|
|
return &this
|
|
}
|
|
|
|
// GetLanguage returns the Language field value if set, zero value otherwise.
|
|
func (o *FormDrawn) 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 *FormDrawn) 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 *FormDrawn) 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 *FormDrawn) SetLanguage(v string) {
|
|
o.Language = &v
|
|
}
|
|
|
|
// GetMode returns the Mode field value if set, zero value otherwise.
|
|
func (o *FormDrawn) 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 *FormDrawn) 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 *FormDrawn) 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 *FormDrawn) SetMode(v string) {
|
|
o.Mode = &v
|
|
}
|
|
|
|
// GetProgress returns the Progress field value if set, zero value otherwise.
|
|
func (o *FormDrawn) 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 *FormDrawn) 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 *FormDrawn) 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 *FormDrawn) SetProgress(v bool) {
|
|
o.Progress = &v
|
|
}
|
|
|
|
func (o FormDrawn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormDrawn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Language) {
|
|
toSerialize["language"] = o.Language
|
|
}
|
|
if !IsNil(o.Mode) {
|
|
toSerialize["mode"] = o.Mode
|
|
}
|
|
if !IsNil(o.Progress) {
|
|
toSerialize["progress"] = o.Progress
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormDrawn) UnmarshalJSON(data []byte) (err error) {
|
|
varFormDrawn := _FormDrawn{}
|
|
|
|
err = json.Unmarshal(data, &varFormDrawn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormDrawn(varFormDrawn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "language")
|
|
delete(additionalProperties, "mode")
|
|
delete(additionalProperties, "progress")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormDrawn struct {
|
|
value *FormDrawn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormDrawn) Get() *FormDrawn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormDrawn) Set(val *FormDrawn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormDrawn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormDrawn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormDrawn(val *FormDrawn) *NullableFormDrawn {
|
|
return &NullableFormDrawn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormDrawn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormDrawn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|