Files
sdk/model_form_respondent.go

345 lines
9.2 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 FormRespondent type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FormRespondent{}
// FormRespondent struct for FormRespondent
type FormRespondent struct {
// Email is the address the response is from: the account's, else the email field's.
Email *string `json:"email,omitempty"`
// Kind is account (a signed-in person, from their token), email (an email field's answer), visitor (the page's visitor id) or none.
Kind *string `json:"kind,omitempty"`
// PersonID is the CRM person the address is: the one key a response, a list membership, an email event and an experiment share. Every event and timeline entry the service states carries it, never the address.
PersonId *string `json:"person_id,omitempty"`
// Subject is the signed-in person's IAM subject.
Subject *string `json:"subject,omitempty"`
// Verified is whether the respondent is who the response says: true only for a signed-in person, from their token. A typed address is a claim.
Verified *bool `json:"verified,omitempty"`
// Visitor is the page's visitor id.
Visitor *string `json:"visitor,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FormRespondent FormRespondent
// NewFormRespondent instantiates a new FormRespondent 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 NewFormRespondent() *FormRespondent {
this := FormRespondent{}
return &this
}
// NewFormRespondentWithDefaults instantiates a new FormRespondent 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 NewFormRespondentWithDefaults() *FormRespondent {
this := FormRespondent{}
return &this
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *FormRespondent) 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 *FormRespondent) 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 *FormRespondent) 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 *FormRespondent) SetEmail(v string) {
o.Email = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *FormRespondent) GetKind() string {
if o == nil || IsNil(o.Kind) {
var ret string
return ret
}
return *o.Kind
}
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormRespondent) GetKindOk() (*string, bool) {
if o == nil || IsNil(o.Kind) {
return nil, false
}
return o.Kind, true
}
// HasKind returns a boolean if a field has been set.
func (o *FormRespondent) HasKind() bool {
if o != nil && !IsNil(o.Kind) {
return true
}
return false
}
// SetKind gets a reference to the given string and assigns it to the Kind field.
func (o *FormRespondent) SetKind(v string) {
o.Kind = &v
}
// GetPersonId returns the PersonId field value if set, zero value otherwise.
func (o *FormRespondent) GetPersonId() string {
if o == nil || IsNil(o.PersonId) {
var ret string
return ret
}
return *o.PersonId
}
// GetPersonIdOk returns a tuple with the PersonId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormRespondent) GetPersonIdOk() (*string, bool) {
if o == nil || IsNil(o.PersonId) {
return nil, false
}
return o.PersonId, true
}
// HasPersonId returns a boolean if a field has been set.
func (o *FormRespondent) HasPersonId() bool {
if o != nil && !IsNil(o.PersonId) {
return true
}
return false
}
// SetPersonId gets a reference to the given string and assigns it to the PersonId field.
func (o *FormRespondent) SetPersonId(v string) {
o.PersonId = &v
}
// GetSubject returns the Subject field value if set, zero value otherwise.
func (o *FormRespondent) GetSubject() string {
if o == nil || IsNil(o.Subject) {
var ret string
return ret
}
return *o.Subject
}
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormRespondent) GetSubjectOk() (*string, bool) {
if o == nil || IsNil(o.Subject) {
return nil, false
}
return o.Subject, true
}
// HasSubject returns a boolean if a field has been set.
func (o *FormRespondent) HasSubject() bool {
if o != nil && !IsNil(o.Subject) {
return true
}
return false
}
// SetSubject gets a reference to the given string and assigns it to the Subject field.
func (o *FormRespondent) SetSubject(v string) {
o.Subject = &v
}
// GetVerified returns the Verified field value if set, zero value otherwise.
func (o *FormRespondent) GetVerified() bool {
if o == nil || IsNil(o.Verified) {
var ret bool
return ret
}
return *o.Verified
}
// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormRespondent) GetVerifiedOk() (*bool, bool) {
if o == nil || IsNil(o.Verified) {
return nil, false
}
return o.Verified, true
}
// HasVerified returns a boolean if a field has been set.
func (o *FormRespondent) HasVerified() bool {
if o != nil && !IsNil(o.Verified) {
return true
}
return false
}
// SetVerified gets a reference to the given bool and assigns it to the Verified field.
func (o *FormRespondent) SetVerified(v bool) {
o.Verified = &v
}
// GetVisitor returns the Visitor field value if set, zero value otherwise.
func (o *FormRespondent) GetVisitor() string {
if o == nil || IsNil(o.Visitor) {
var ret string
return ret
}
return *o.Visitor
}
// GetVisitorOk returns a tuple with the Visitor field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormRespondent) GetVisitorOk() (*string, bool) {
if o == nil || IsNil(o.Visitor) {
return nil, false
}
return o.Visitor, true
}
// HasVisitor returns a boolean if a field has been set.
func (o *FormRespondent) HasVisitor() bool {
if o != nil && !IsNil(o.Visitor) {
return true
}
return false
}
// SetVisitor gets a reference to the given string and assigns it to the Visitor field.
func (o *FormRespondent) SetVisitor(v string) {
o.Visitor = &v
}
func (o FormRespondent) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FormRespondent) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Email) {
toSerialize["email"] = o.Email
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.PersonId) {
toSerialize["person_id"] = o.PersonId
}
if !IsNil(o.Subject) {
toSerialize["subject"] = o.Subject
}
if !IsNil(o.Verified) {
toSerialize["verified"] = o.Verified
}
if !IsNil(o.Visitor) {
toSerialize["visitor"] = o.Visitor
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FormRespondent) UnmarshalJSON(data []byte) (err error) {
varFormRespondent := _FormRespondent{}
err = json.Unmarshal(data, &varFormRespondent)
if err != nil {
return err
}
*o = FormRespondent(varFormRespondent)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "email")
delete(additionalProperties, "kind")
delete(additionalProperties, "person_id")
delete(additionalProperties, "subject")
delete(additionalProperties, "verified")
delete(additionalProperties, "visitor")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFormRespondent struct {
value *FormRespondent
isSet bool
}
func (v NullableFormRespondent) Get() *FormRespondent {
return v.value
}
func (v *NullableFormRespondent) Set(val *FormRespondent) {
v.value = val
v.isSet = true
}
func (v NullableFormRespondent) IsSet() bool {
return v.isSet
}
func (v *NullableFormRespondent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFormRespondent(val *FormRespondent) *NullableFormRespondent {
return &NullableFormRespondent{value: val, isSet: true}
}
func (v NullableFormRespondent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFormRespondent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}