mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.0 KiB
Go
193 lines
5.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 MarketingAnswer type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &MarketingAnswer{}
|
|
|
|
// MarketingAnswer struct for MarketingAnswer
|
|
type MarketingAnswer struct {
|
|
// Answer is what the person said; options they picked are joined by commas.
|
|
Answer *string `json:"answer,omitempty"`
|
|
// Question is the question as the form asked it, on one line.
|
|
Question *string `json:"question,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _MarketingAnswer MarketingAnswer
|
|
|
|
// NewMarketingAnswer instantiates a new MarketingAnswer 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 NewMarketingAnswer() *MarketingAnswer {
|
|
this := MarketingAnswer{}
|
|
return &this
|
|
}
|
|
|
|
// NewMarketingAnswerWithDefaults instantiates a new MarketingAnswer 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 NewMarketingAnswerWithDefaults() *MarketingAnswer {
|
|
this := MarketingAnswer{}
|
|
return &this
|
|
}
|
|
|
|
// GetAnswer returns the Answer field value if set, zero value otherwise.
|
|
func (o *MarketingAnswer) 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 *MarketingAnswer) 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 *MarketingAnswer) 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 *MarketingAnswer) SetAnswer(v string) {
|
|
o.Answer = &v
|
|
}
|
|
|
|
// GetQuestion returns the Question field value if set, zero value otherwise.
|
|
func (o *MarketingAnswer) 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 *MarketingAnswer) 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 *MarketingAnswer) 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 *MarketingAnswer) SetQuestion(v string) {
|
|
o.Question = &v
|
|
}
|
|
|
|
func (o MarketingAnswer) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o MarketingAnswer) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Answer) {
|
|
toSerialize["answer"] = o.Answer
|
|
}
|
|
if !IsNil(o.Question) {
|
|
toSerialize["question"] = o.Question
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *MarketingAnswer) UnmarshalJSON(data []byte) (err error) {
|
|
varMarketingAnswer := _MarketingAnswer{}
|
|
|
|
err = json.Unmarshal(data, &varMarketingAnswer)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = MarketingAnswer(varMarketingAnswer)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "answer")
|
|
delete(additionalProperties, "question")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableMarketingAnswer struct {
|
|
value *MarketingAnswer
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableMarketingAnswer) Get() *MarketingAnswer {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableMarketingAnswer) Set(val *MarketingAnswer) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableMarketingAnswer) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableMarketingAnswer) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableMarketingAnswer(val *MarketingAnswer) *NullableMarketingAnswer {
|
|
return &NullableMarketingAnswer{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableMarketingAnswer) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableMarketingAnswer) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|