mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.5 KiB
Go
231 lines
6.5 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 EmailVerificationResult type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EmailVerificationResult{}
|
|
|
|
// EmailVerificationResult struct for EmailVerificationResult
|
|
type EmailVerificationResult struct {
|
|
// Checks contains the outcomes of all requested checks.
|
|
Checks *EmailVerificationChecks `json:"checks,omitempty"`
|
|
// Email is the original submitted email address.
|
|
Email *string `json:"email,omitempty"`
|
|
// Suggestions lists potential corrections when requested.
|
|
Suggestions []EmailSuggestion `json:"suggestions,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EmailVerificationResult EmailVerificationResult
|
|
|
|
// NewEmailVerificationResult instantiates a new EmailVerificationResult 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 NewEmailVerificationResult() *EmailVerificationResult {
|
|
this := EmailVerificationResult{}
|
|
return &this
|
|
}
|
|
|
|
// NewEmailVerificationResultWithDefaults instantiates a new EmailVerificationResult 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 NewEmailVerificationResultWithDefaults() *EmailVerificationResult {
|
|
this := EmailVerificationResult{}
|
|
return &this
|
|
}
|
|
|
|
// GetChecks returns the Checks field value if set, zero value otherwise.
|
|
func (o *EmailVerificationResult) GetChecks() EmailVerificationChecks {
|
|
if o == nil || IsNil(o.Checks) {
|
|
var ret EmailVerificationChecks
|
|
return ret
|
|
}
|
|
return *o.Checks
|
|
}
|
|
|
|
// GetChecksOk returns a tuple with the Checks field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailVerificationResult) GetChecksOk() (*EmailVerificationChecks, bool) {
|
|
if o == nil || IsNil(o.Checks) {
|
|
return nil, false
|
|
}
|
|
return o.Checks, true
|
|
}
|
|
|
|
// HasChecks returns a boolean if a field has been set.
|
|
func (o *EmailVerificationResult) HasChecks() bool {
|
|
if o != nil && !IsNil(o.Checks) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChecks gets a reference to the given EmailVerificationChecks and assigns it to the Checks field.
|
|
func (o *EmailVerificationResult) SetChecks(v EmailVerificationChecks) {
|
|
o.Checks = &v
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise.
|
|
func (o *EmailVerificationResult) 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 *EmailVerificationResult) 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 *EmailVerificationResult) 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 *EmailVerificationResult) SetEmail(v string) {
|
|
o.Email = &v
|
|
}
|
|
|
|
// GetSuggestions returns the Suggestions field value if set, zero value otherwise.
|
|
func (o *EmailVerificationResult) GetSuggestions() []EmailSuggestion {
|
|
if o == nil || IsNil(o.Suggestions) {
|
|
var ret []EmailSuggestion
|
|
return ret
|
|
}
|
|
return o.Suggestions
|
|
}
|
|
|
|
// GetSuggestionsOk returns a tuple with the Suggestions field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailVerificationResult) GetSuggestionsOk() ([]EmailSuggestion, bool) {
|
|
if o == nil || IsNil(o.Suggestions) {
|
|
return nil, false
|
|
}
|
|
return o.Suggestions, true
|
|
}
|
|
|
|
// HasSuggestions returns a boolean if a field has been set.
|
|
func (o *EmailVerificationResult) HasSuggestions() bool {
|
|
if o != nil && !IsNil(o.Suggestions) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSuggestions gets a reference to the given []EmailSuggestion and assigns it to the Suggestions field.
|
|
func (o *EmailVerificationResult) SetSuggestions(v []EmailSuggestion) {
|
|
o.Suggestions = v
|
|
}
|
|
|
|
func (o EmailVerificationResult) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EmailVerificationResult) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Checks) {
|
|
toSerialize["checks"] = o.Checks
|
|
}
|
|
if !IsNil(o.Email) {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if !IsNil(o.Suggestions) {
|
|
toSerialize["suggestions"] = o.Suggestions
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EmailVerificationResult) UnmarshalJSON(data []byte) (err error) {
|
|
varEmailVerificationResult := _EmailVerificationResult{}
|
|
|
|
err = json.Unmarshal(data, &varEmailVerificationResult)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EmailVerificationResult(varEmailVerificationResult)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "checks")
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "suggestions")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEmailVerificationResult struct {
|
|
value *EmailVerificationResult
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEmailVerificationResult) Get() *EmailVerificationResult {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEmailVerificationResult) Set(val *EmailVerificationResult) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEmailVerificationResult) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEmailVerificationResult) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEmailVerificationResult(val *EmailVerificationResult) *NullableEmailVerificationResult {
|
|
return &NullableEmailVerificationResult{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEmailVerificationResult) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEmailVerificationResult) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|