mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.6 KiB
Go
307 lines
8.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 EmailVerificationChecks type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EmailVerificationChecks{}
|
|
|
|
// EmailVerificationChecks struct for EmailVerificationChecks
|
|
type EmailVerificationChecks struct {
|
|
// Classification details account attributes (disposable, free, role).
|
|
Classification *EmailClassificationCheck `json:"classification,omitempty"`
|
|
// Domain details DNS domain host resolution.
|
|
Domain *EmailDomainCheck `json:"domain,omitempty"`
|
|
// MX details DNS mail exchanger lookup.
|
|
Mx *EmailMXCheck `json:"mx,omitempty"`
|
|
// SMTP details explicit mailbox probing.
|
|
Smtp *EmailSMTPCheck `json:"smtp,omitempty"`
|
|
// Syntax details RFC 5322 structure verification.
|
|
Syntax *EmailSyntaxCheck `json:"syntax,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EmailVerificationChecks EmailVerificationChecks
|
|
|
|
// NewEmailVerificationChecks instantiates a new EmailVerificationChecks 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 NewEmailVerificationChecks() *EmailVerificationChecks {
|
|
this := EmailVerificationChecks{}
|
|
return &this
|
|
}
|
|
|
|
// NewEmailVerificationChecksWithDefaults instantiates a new EmailVerificationChecks 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 NewEmailVerificationChecksWithDefaults() *EmailVerificationChecks {
|
|
this := EmailVerificationChecks{}
|
|
return &this
|
|
}
|
|
|
|
// GetClassification returns the Classification field value if set, zero value otherwise.
|
|
func (o *EmailVerificationChecks) GetClassification() EmailClassificationCheck {
|
|
if o == nil || IsNil(o.Classification) {
|
|
var ret EmailClassificationCheck
|
|
return ret
|
|
}
|
|
return *o.Classification
|
|
}
|
|
|
|
// GetClassificationOk returns a tuple with the Classification field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailVerificationChecks) GetClassificationOk() (*EmailClassificationCheck, bool) {
|
|
if o == nil || IsNil(o.Classification) {
|
|
return nil, false
|
|
}
|
|
return o.Classification, true
|
|
}
|
|
|
|
// HasClassification returns a boolean if a field has been set.
|
|
func (o *EmailVerificationChecks) HasClassification() bool {
|
|
if o != nil && !IsNil(o.Classification) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetClassification gets a reference to the given EmailClassificationCheck and assigns it to the Classification field.
|
|
func (o *EmailVerificationChecks) SetClassification(v EmailClassificationCheck) {
|
|
o.Classification = &v
|
|
}
|
|
|
|
// GetDomain returns the Domain field value if set, zero value otherwise.
|
|
func (o *EmailVerificationChecks) GetDomain() EmailDomainCheck {
|
|
if o == nil || IsNil(o.Domain) {
|
|
var ret EmailDomainCheck
|
|
return ret
|
|
}
|
|
return *o.Domain
|
|
}
|
|
|
|
// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailVerificationChecks) GetDomainOk() (*EmailDomainCheck, bool) {
|
|
if o == nil || IsNil(o.Domain) {
|
|
return nil, false
|
|
}
|
|
return o.Domain, true
|
|
}
|
|
|
|
// HasDomain returns a boolean if a field has been set.
|
|
func (o *EmailVerificationChecks) HasDomain() bool {
|
|
if o != nil && !IsNil(o.Domain) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDomain gets a reference to the given EmailDomainCheck and assigns it to the Domain field.
|
|
func (o *EmailVerificationChecks) SetDomain(v EmailDomainCheck) {
|
|
o.Domain = &v
|
|
}
|
|
|
|
// GetMx returns the Mx field value if set, zero value otherwise.
|
|
func (o *EmailVerificationChecks) GetMx() EmailMXCheck {
|
|
if o == nil || IsNil(o.Mx) {
|
|
var ret EmailMXCheck
|
|
return ret
|
|
}
|
|
return *o.Mx
|
|
}
|
|
|
|
// GetMxOk returns a tuple with the Mx field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailVerificationChecks) GetMxOk() (*EmailMXCheck, bool) {
|
|
if o == nil || IsNil(o.Mx) {
|
|
return nil, false
|
|
}
|
|
return o.Mx, true
|
|
}
|
|
|
|
// HasMx returns a boolean if a field has been set.
|
|
func (o *EmailVerificationChecks) HasMx() bool {
|
|
if o != nil && !IsNil(o.Mx) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMx gets a reference to the given EmailMXCheck and assigns it to the Mx field.
|
|
func (o *EmailVerificationChecks) SetMx(v EmailMXCheck) {
|
|
o.Mx = &v
|
|
}
|
|
|
|
// GetSmtp returns the Smtp field value if set, zero value otherwise.
|
|
func (o *EmailVerificationChecks) GetSmtp() EmailSMTPCheck {
|
|
if o == nil || IsNil(o.Smtp) {
|
|
var ret EmailSMTPCheck
|
|
return ret
|
|
}
|
|
return *o.Smtp
|
|
}
|
|
|
|
// GetSmtpOk returns a tuple with the Smtp field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailVerificationChecks) GetSmtpOk() (*EmailSMTPCheck, bool) {
|
|
if o == nil || IsNil(o.Smtp) {
|
|
return nil, false
|
|
}
|
|
return o.Smtp, true
|
|
}
|
|
|
|
// HasSmtp returns a boolean if a field has been set.
|
|
func (o *EmailVerificationChecks) HasSmtp() bool {
|
|
if o != nil && !IsNil(o.Smtp) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSmtp gets a reference to the given EmailSMTPCheck and assigns it to the Smtp field.
|
|
func (o *EmailVerificationChecks) SetSmtp(v EmailSMTPCheck) {
|
|
o.Smtp = &v
|
|
}
|
|
|
|
// GetSyntax returns the Syntax field value if set, zero value otherwise.
|
|
func (o *EmailVerificationChecks) GetSyntax() EmailSyntaxCheck {
|
|
if o == nil || IsNil(o.Syntax) {
|
|
var ret EmailSyntaxCheck
|
|
return ret
|
|
}
|
|
return *o.Syntax
|
|
}
|
|
|
|
// GetSyntaxOk returns a tuple with the Syntax field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailVerificationChecks) GetSyntaxOk() (*EmailSyntaxCheck, bool) {
|
|
if o == nil || IsNil(o.Syntax) {
|
|
return nil, false
|
|
}
|
|
return o.Syntax, true
|
|
}
|
|
|
|
// HasSyntax returns a boolean if a field has been set.
|
|
func (o *EmailVerificationChecks) HasSyntax() bool {
|
|
if o != nil && !IsNil(o.Syntax) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSyntax gets a reference to the given EmailSyntaxCheck and assigns it to the Syntax field.
|
|
func (o *EmailVerificationChecks) SetSyntax(v EmailSyntaxCheck) {
|
|
o.Syntax = &v
|
|
}
|
|
|
|
func (o EmailVerificationChecks) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EmailVerificationChecks) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Classification) {
|
|
toSerialize["classification"] = o.Classification
|
|
}
|
|
if !IsNil(o.Domain) {
|
|
toSerialize["domain"] = o.Domain
|
|
}
|
|
if !IsNil(o.Mx) {
|
|
toSerialize["mx"] = o.Mx
|
|
}
|
|
if !IsNil(o.Smtp) {
|
|
toSerialize["smtp"] = o.Smtp
|
|
}
|
|
if !IsNil(o.Syntax) {
|
|
toSerialize["syntax"] = o.Syntax
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EmailVerificationChecks) UnmarshalJSON(data []byte) (err error) {
|
|
varEmailVerificationChecks := _EmailVerificationChecks{}
|
|
|
|
err = json.Unmarshal(data, &varEmailVerificationChecks)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EmailVerificationChecks(varEmailVerificationChecks)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "classification")
|
|
delete(additionalProperties, "domain")
|
|
delete(additionalProperties, "mx")
|
|
delete(additionalProperties, "smtp")
|
|
delete(additionalProperties, "syntax")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEmailVerificationChecks struct {
|
|
value *EmailVerificationChecks
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEmailVerificationChecks) Get() *EmailVerificationChecks {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEmailVerificationChecks) Set(val *EmailVerificationChecks) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEmailVerificationChecks) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEmailVerificationChecks) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEmailVerificationChecks(val *EmailVerificationChecks) *NullableEmailVerificationChecks {
|
|
return &NullableEmailVerificationChecks{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEmailVerificationChecks) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEmailVerificationChecks) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|