mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.0 KiB
Go
345 lines
9.0 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 FormImported type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormImported{}
|
|
|
|
// FormImported struct for FormImported
|
|
type FormImported struct {
|
|
// Answers are its answers, each read against the form's field as a submission's is; a required field may be unanswered.
|
|
Answers []FormAnswer `json:"answers,omitempty"`
|
|
// At is when it was made, RFC 3339. Required.
|
|
At *string `json:"at,omitempty"`
|
|
// Email is the address it was from, when the source knew one. On a subscribe form the address is the response's key: one address is one subscriber, however many times and places it subscribed.
|
|
Email *string `json:"email,omitempty"`
|
|
// External is its id where it was made: at most 200 characters, and the response's key, so importing it again is the same response.
|
|
External *string `json:"external,omitempty"`
|
|
// Hidden are values it carried, by the names the form declares.
|
|
Hidden map[string]string `json:"hidden,omitempty"`
|
|
// Source is where it was made, at most 100 characters: commerce, a list's name.
|
|
Source *string `json:"source,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormImported FormImported
|
|
|
|
// NewFormImported instantiates a new FormImported 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 NewFormImported() *FormImported {
|
|
this := FormImported{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormImportedWithDefaults instantiates a new FormImported 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 NewFormImportedWithDefaults() *FormImported {
|
|
this := FormImported{}
|
|
return &this
|
|
}
|
|
|
|
// GetAnswers returns the Answers field value if set, zero value otherwise.
|
|
func (o *FormImported) GetAnswers() []FormAnswer {
|
|
if o == nil || IsNil(o.Answers) {
|
|
var ret []FormAnswer
|
|
return ret
|
|
}
|
|
return o.Answers
|
|
}
|
|
|
|
// GetAnswersOk returns a tuple with the Answers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormImported) GetAnswersOk() ([]FormAnswer, bool) {
|
|
if o == nil || IsNil(o.Answers) {
|
|
return nil, false
|
|
}
|
|
return o.Answers, true
|
|
}
|
|
|
|
// HasAnswers returns a boolean if a field has been set.
|
|
func (o *FormImported) HasAnswers() bool {
|
|
if o != nil && !IsNil(o.Answers) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAnswers gets a reference to the given []FormAnswer and assigns it to the Answers field.
|
|
func (o *FormImported) SetAnswers(v []FormAnswer) {
|
|
o.Answers = v
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *FormImported) GetAt() string {
|
|
if o == nil || IsNil(o.At) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.At
|
|
}
|
|
|
|
// GetAtOk returns a tuple with the At field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormImported) GetAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.At) {
|
|
return nil, false
|
|
}
|
|
return o.At, true
|
|
}
|
|
|
|
// HasAt returns a boolean if a field has been set.
|
|
func (o *FormImported) HasAt() bool {
|
|
if o != nil && !IsNil(o.At) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAt gets a reference to the given string and assigns it to the At field.
|
|
func (o *FormImported) SetAt(v string) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise.
|
|
func (o *FormImported) GetEmail() string {
|
|
if o == nil || IsNil(o.Email) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Email
|
|
}
|
|
|
|
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormImported) GetEmailOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Email) {
|
|
return nil, false
|
|
}
|
|
return o.Email, true
|
|
}
|
|
|
|
// HasEmail returns a boolean if a field has been set.
|
|
func (o *FormImported) HasEmail() bool {
|
|
if o != nil && !IsNil(o.Email) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEmail gets a reference to the given string and assigns it to the Email field.
|
|
func (o *FormImported) SetEmail(v string) {
|
|
o.Email = &v
|
|
}
|
|
|
|
// GetExternal returns the External field value if set, zero value otherwise.
|
|
func (o *FormImported) GetExternal() string {
|
|
if o == nil || IsNil(o.External) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.External
|
|
}
|
|
|
|
// GetExternalOk returns a tuple with the External field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormImported) GetExternalOk() (*string, bool) {
|
|
if o == nil || IsNil(o.External) {
|
|
return nil, false
|
|
}
|
|
return o.External, true
|
|
}
|
|
|
|
// HasExternal returns a boolean if a field has been set.
|
|
func (o *FormImported) HasExternal() bool {
|
|
if o != nil && !IsNil(o.External) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExternal gets a reference to the given string and assigns it to the External field.
|
|
func (o *FormImported) SetExternal(v string) {
|
|
o.External = &v
|
|
}
|
|
|
|
// GetHidden returns the Hidden field value if set, zero value otherwise.
|
|
func (o *FormImported) GetHidden() map[string]string {
|
|
if o == nil || IsNil(o.Hidden) {
|
|
var ret map[string]string
|
|
return ret
|
|
}
|
|
return o.Hidden
|
|
}
|
|
|
|
// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormImported) GetHiddenOk() (map[string]string, bool) {
|
|
if o == nil || IsNil(o.Hidden) {
|
|
return map[string]string{}, false
|
|
}
|
|
return o.Hidden, true
|
|
}
|
|
|
|
// HasHidden returns a boolean if a field has been set.
|
|
func (o *FormImported) HasHidden() bool {
|
|
if o != nil && !IsNil(o.Hidden) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHidden gets a reference to the given map[string]string and assigns it to the Hidden field.
|
|
func (o *FormImported) SetHidden(v map[string]string) {
|
|
o.Hidden = v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *FormImported) GetSource() string {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormImported) GetSourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *FormImported) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given string and assigns it to the Source field.
|
|
func (o *FormImported) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
func (o FormImported) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormImported) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Answers) {
|
|
toSerialize["answers"] = o.Answers
|
|
}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.Email) {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if !IsNil(o.External) {
|
|
toSerialize["external"] = o.External
|
|
}
|
|
if !IsNil(o.Hidden) {
|
|
toSerialize["hidden"] = o.Hidden
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormImported) UnmarshalJSON(data []byte) (err error) {
|
|
varFormImported := _FormImported{}
|
|
|
|
err = json.Unmarshal(data, &varFormImported)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormImported(varFormImported)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "answers")
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "external")
|
|
delete(additionalProperties, "hidden")
|
|
delete(additionalProperties, "source")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormImported struct {
|
|
value *FormImported
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormImported) Get() *FormImported {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormImported) Set(val *FormImported) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormImported) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormImported) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormImported(val *FormImported) *NullableFormImported {
|
|
return &NullableFormImported{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormImported) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormImported) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|