Files
sdk/model_email_verification_input.go

345 lines
9.7 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 EmailVerificationInput type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EmailVerificationInput{}
// EmailVerificationInput struct for EmailVerificationInput
type EmailVerificationInput struct {
// Checks explicitly selects which checks to run. Defaults to [\"syntax\", \"domain\", \"mx\", \"classification\"].
Checks []string `json:"checks,omitempty"`
// Email is the address to evaluate.
Email *string `json:"email,omitempty"`
// FromEmail sets sender used in MAIL FROM for SMTP probe when explicitly enabled.
FromEmail *string `json:"from_email,omitempty"`
// HelloName sets domain used in EHLO for SMTP probe when explicitly enabled.
HelloName *string `json:"hello_name,omitempty"`
// ProxyURI sets optional proxy for network lookups.
ProxyUri *string `json:"proxy_uri,omitempty"`
// Suggestions requests domain typo suggestions without altering the original email.
Suggestions *bool `json:"suggestions,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EmailVerificationInput EmailVerificationInput
// NewEmailVerificationInput instantiates a new EmailVerificationInput 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 NewEmailVerificationInput() *EmailVerificationInput {
this := EmailVerificationInput{}
return &this
}
// NewEmailVerificationInputWithDefaults instantiates a new EmailVerificationInput 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 NewEmailVerificationInputWithDefaults() *EmailVerificationInput {
this := EmailVerificationInput{}
return &this
}
// GetChecks returns the Checks field value if set, zero value otherwise.
func (o *EmailVerificationInput) GetChecks() []string {
if o == nil || IsNil(o.Checks) {
var ret []string
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 *EmailVerificationInput) GetChecksOk() ([]string, 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 *EmailVerificationInput) HasChecks() bool {
if o != nil && !IsNil(o.Checks) {
return true
}
return false
}
// SetChecks gets a reference to the given []string and assigns it to the Checks field.
func (o *EmailVerificationInput) SetChecks(v []string) {
o.Checks = v
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *EmailVerificationInput) 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 *EmailVerificationInput) 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 *EmailVerificationInput) 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 *EmailVerificationInput) SetEmail(v string) {
o.Email = &v
}
// GetFromEmail returns the FromEmail field value if set, zero value otherwise.
func (o *EmailVerificationInput) GetFromEmail() string {
if o == nil || IsNil(o.FromEmail) {
var ret string
return ret
}
return *o.FromEmail
}
// GetFromEmailOk returns a tuple with the FromEmail field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailVerificationInput) GetFromEmailOk() (*string, bool) {
if o == nil || IsNil(o.FromEmail) {
return nil, false
}
return o.FromEmail, true
}
// HasFromEmail returns a boolean if a field has been set.
func (o *EmailVerificationInput) HasFromEmail() bool {
if o != nil && !IsNil(o.FromEmail) {
return true
}
return false
}
// SetFromEmail gets a reference to the given string and assigns it to the FromEmail field.
func (o *EmailVerificationInput) SetFromEmail(v string) {
o.FromEmail = &v
}
// GetHelloName returns the HelloName field value if set, zero value otherwise.
func (o *EmailVerificationInput) GetHelloName() string {
if o == nil || IsNil(o.HelloName) {
var ret string
return ret
}
return *o.HelloName
}
// GetHelloNameOk returns a tuple with the HelloName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailVerificationInput) GetHelloNameOk() (*string, bool) {
if o == nil || IsNil(o.HelloName) {
return nil, false
}
return o.HelloName, true
}
// HasHelloName returns a boolean if a field has been set.
func (o *EmailVerificationInput) HasHelloName() bool {
if o != nil && !IsNil(o.HelloName) {
return true
}
return false
}
// SetHelloName gets a reference to the given string and assigns it to the HelloName field.
func (o *EmailVerificationInput) SetHelloName(v string) {
o.HelloName = &v
}
// GetProxyUri returns the ProxyUri field value if set, zero value otherwise.
func (o *EmailVerificationInput) GetProxyUri() string {
if o == nil || IsNil(o.ProxyUri) {
var ret string
return ret
}
return *o.ProxyUri
}
// GetProxyUriOk returns a tuple with the ProxyUri field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailVerificationInput) GetProxyUriOk() (*string, bool) {
if o == nil || IsNil(o.ProxyUri) {
return nil, false
}
return o.ProxyUri, true
}
// HasProxyUri returns a boolean if a field has been set.
func (o *EmailVerificationInput) HasProxyUri() bool {
if o != nil && !IsNil(o.ProxyUri) {
return true
}
return false
}
// SetProxyUri gets a reference to the given string and assigns it to the ProxyUri field.
func (o *EmailVerificationInput) SetProxyUri(v string) {
o.ProxyUri = &v
}
// GetSuggestions returns the Suggestions field value if set, zero value otherwise.
func (o *EmailVerificationInput) GetSuggestions() bool {
if o == nil || IsNil(o.Suggestions) {
var ret bool
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 *EmailVerificationInput) GetSuggestionsOk() (*bool, 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 *EmailVerificationInput) HasSuggestions() bool {
if o != nil && !IsNil(o.Suggestions) {
return true
}
return false
}
// SetSuggestions gets a reference to the given bool and assigns it to the Suggestions field.
func (o *EmailVerificationInput) SetSuggestions(v bool) {
o.Suggestions = &v
}
func (o EmailVerificationInput) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EmailVerificationInput) 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.FromEmail) {
toSerialize["from_email"] = o.FromEmail
}
if !IsNil(o.HelloName) {
toSerialize["hello_name"] = o.HelloName
}
if !IsNil(o.ProxyUri) {
toSerialize["proxy_uri"] = o.ProxyUri
}
if !IsNil(o.Suggestions) {
toSerialize["suggestions"] = o.Suggestions
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EmailVerificationInput) UnmarshalJSON(data []byte) (err error) {
varEmailVerificationInput := _EmailVerificationInput{}
err = json.Unmarshal(data, &varEmailVerificationInput)
if err != nil {
return err
}
*o = EmailVerificationInput(varEmailVerificationInput)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "checks")
delete(additionalProperties, "email")
delete(additionalProperties, "from_email")
delete(additionalProperties, "hello_name")
delete(additionalProperties, "proxy_uri")
delete(additionalProperties, "suggestions")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEmailVerificationInput struct {
value *EmailVerificationInput
isSet bool
}
func (v NullableEmailVerificationInput) Get() *EmailVerificationInput {
return v.value
}
func (v *NullableEmailVerificationInput) Set(val *EmailVerificationInput) {
v.value = val
v.isSet = true
}
func (v NullableEmailVerificationInput) IsSet() bool {
return v.isSet
}
func (v *NullableEmailVerificationInput) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEmailVerificationInput(val *EmailVerificationInput) *NullableEmailVerificationInput {
return &NullableEmailVerificationInput{value: val, isSet: true}
}
func (v NullableEmailVerificationInput) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEmailVerificationInput) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}