mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
10 KiB
Go
383 lines
10 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 EmailSMTPCheck type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EmailSMTPCheck{}
|
|
|
|
// EmailSMTPCheck struct for EmailSMTPCheck
|
|
type EmailSMTPCheck struct {
|
|
// CatchAll reports whether the host accepts all recipient addresses.
|
|
CatchAll *bool `json:"catch_all,omitempty"`
|
|
// Deliverable reports whether the mailbox accepted the test recipient address.
|
|
Deliverable *bool `json:"deliverable,omitempty"`
|
|
// Disabled reports whether the recipient mailbox is disabled or inactive.
|
|
Disabled *bool `json:"disabled,omitempty"`
|
|
// FullInbox reports whether the recipient mailbox is over quota.
|
|
FullInbox *bool `json:"full_inbox,omitempty"`
|
|
// HostExists reports whether the destination mail server host exists and responded.
|
|
HostExists *bool `json:"host_exists,omitempty"`
|
|
// Reason describes the failure or skip reason when Status is not pass.
|
|
Reason *string `json:"reason,omitempty"`
|
|
// Status reports the check outcome: pass, fail, unknown, or skipped.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EmailSMTPCheck EmailSMTPCheck
|
|
|
|
// NewEmailSMTPCheck instantiates a new EmailSMTPCheck 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 NewEmailSMTPCheck() *EmailSMTPCheck {
|
|
this := EmailSMTPCheck{}
|
|
return &this
|
|
}
|
|
|
|
// NewEmailSMTPCheckWithDefaults instantiates a new EmailSMTPCheck 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 NewEmailSMTPCheckWithDefaults() *EmailSMTPCheck {
|
|
this := EmailSMTPCheck{}
|
|
return &this
|
|
}
|
|
|
|
// GetCatchAll returns the CatchAll field value if set, zero value otherwise.
|
|
func (o *EmailSMTPCheck) GetCatchAll() bool {
|
|
if o == nil || IsNil(o.CatchAll) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.CatchAll
|
|
}
|
|
|
|
// GetCatchAllOk returns a tuple with the CatchAll field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailSMTPCheck) GetCatchAllOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.CatchAll) {
|
|
return nil, false
|
|
}
|
|
return o.CatchAll, true
|
|
}
|
|
|
|
// HasCatchAll returns a boolean if a field has been set.
|
|
func (o *EmailSMTPCheck) HasCatchAll() bool {
|
|
if o != nil && !IsNil(o.CatchAll) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCatchAll gets a reference to the given bool and assigns it to the CatchAll field.
|
|
func (o *EmailSMTPCheck) SetCatchAll(v bool) {
|
|
o.CatchAll = &v
|
|
}
|
|
|
|
// GetDeliverable returns the Deliverable field value if set, zero value otherwise.
|
|
func (o *EmailSMTPCheck) GetDeliverable() bool {
|
|
if o == nil || IsNil(o.Deliverable) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Deliverable
|
|
}
|
|
|
|
// GetDeliverableOk returns a tuple with the Deliverable field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailSMTPCheck) GetDeliverableOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Deliverable) {
|
|
return nil, false
|
|
}
|
|
return o.Deliverable, true
|
|
}
|
|
|
|
// HasDeliverable returns a boolean if a field has been set.
|
|
func (o *EmailSMTPCheck) HasDeliverable() bool {
|
|
if o != nil && !IsNil(o.Deliverable) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeliverable gets a reference to the given bool and assigns it to the Deliverable field.
|
|
func (o *EmailSMTPCheck) SetDeliverable(v bool) {
|
|
o.Deliverable = &v
|
|
}
|
|
|
|
// GetDisabled returns the Disabled field value if set, zero value otherwise.
|
|
func (o *EmailSMTPCheck) GetDisabled() bool {
|
|
if o == nil || IsNil(o.Disabled) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Disabled
|
|
}
|
|
|
|
// GetDisabledOk returns a tuple with the Disabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailSMTPCheck) GetDisabledOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Disabled) {
|
|
return nil, false
|
|
}
|
|
return o.Disabled, true
|
|
}
|
|
|
|
// HasDisabled returns a boolean if a field has been set.
|
|
func (o *EmailSMTPCheck) HasDisabled() bool {
|
|
if o != nil && !IsNil(o.Disabled) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDisabled gets a reference to the given bool and assigns it to the Disabled field.
|
|
func (o *EmailSMTPCheck) SetDisabled(v bool) {
|
|
o.Disabled = &v
|
|
}
|
|
|
|
// GetFullInbox returns the FullInbox field value if set, zero value otherwise.
|
|
func (o *EmailSMTPCheck) GetFullInbox() bool {
|
|
if o == nil || IsNil(o.FullInbox) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.FullInbox
|
|
}
|
|
|
|
// GetFullInboxOk returns a tuple with the FullInbox field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailSMTPCheck) GetFullInboxOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.FullInbox) {
|
|
return nil, false
|
|
}
|
|
return o.FullInbox, true
|
|
}
|
|
|
|
// HasFullInbox returns a boolean if a field has been set.
|
|
func (o *EmailSMTPCheck) HasFullInbox() bool {
|
|
if o != nil && !IsNil(o.FullInbox) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFullInbox gets a reference to the given bool and assigns it to the FullInbox field.
|
|
func (o *EmailSMTPCheck) SetFullInbox(v bool) {
|
|
o.FullInbox = &v
|
|
}
|
|
|
|
// GetHostExists returns the HostExists field value if set, zero value otherwise.
|
|
func (o *EmailSMTPCheck) GetHostExists() bool {
|
|
if o == nil || IsNil(o.HostExists) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.HostExists
|
|
}
|
|
|
|
// GetHostExistsOk returns a tuple with the HostExists field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailSMTPCheck) GetHostExistsOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.HostExists) {
|
|
return nil, false
|
|
}
|
|
return o.HostExists, true
|
|
}
|
|
|
|
// HasHostExists returns a boolean if a field has been set.
|
|
func (o *EmailSMTPCheck) HasHostExists() bool {
|
|
if o != nil && !IsNil(o.HostExists) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHostExists gets a reference to the given bool and assigns it to the HostExists field.
|
|
func (o *EmailSMTPCheck) SetHostExists(v bool) {
|
|
o.HostExists = &v
|
|
}
|
|
|
|
// GetReason returns the Reason field value if set, zero value otherwise.
|
|
func (o *EmailSMTPCheck) GetReason() string {
|
|
if o == nil || IsNil(o.Reason) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Reason
|
|
}
|
|
|
|
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailSMTPCheck) GetReasonOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Reason) {
|
|
return nil, false
|
|
}
|
|
return o.Reason, true
|
|
}
|
|
|
|
// HasReason returns a boolean if a field has been set.
|
|
func (o *EmailSMTPCheck) HasReason() bool {
|
|
if o != nil && !IsNil(o.Reason) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReason gets a reference to the given string and assigns it to the Reason field.
|
|
func (o *EmailSMTPCheck) SetReason(v string) {
|
|
o.Reason = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *EmailSMTPCheck) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailSMTPCheck) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *EmailSMTPCheck) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *EmailSMTPCheck) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o EmailSMTPCheck) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EmailSMTPCheck) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CatchAll) {
|
|
toSerialize["catch_all"] = o.CatchAll
|
|
}
|
|
if !IsNil(o.Deliverable) {
|
|
toSerialize["deliverable"] = o.Deliverable
|
|
}
|
|
if !IsNil(o.Disabled) {
|
|
toSerialize["disabled"] = o.Disabled
|
|
}
|
|
if !IsNil(o.FullInbox) {
|
|
toSerialize["full_inbox"] = o.FullInbox
|
|
}
|
|
if !IsNil(o.HostExists) {
|
|
toSerialize["host_exists"] = o.HostExists
|
|
}
|
|
if !IsNil(o.Reason) {
|
|
toSerialize["reason"] = o.Reason
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EmailSMTPCheck) UnmarshalJSON(data []byte) (err error) {
|
|
varEmailSMTPCheck := _EmailSMTPCheck{}
|
|
|
|
err = json.Unmarshal(data, &varEmailSMTPCheck)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EmailSMTPCheck(varEmailSMTPCheck)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "catch_all")
|
|
delete(additionalProperties, "deliverable")
|
|
delete(additionalProperties, "disabled")
|
|
delete(additionalProperties, "full_inbox")
|
|
delete(additionalProperties, "host_exists")
|
|
delete(additionalProperties, "reason")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEmailSMTPCheck struct {
|
|
value *EmailSMTPCheck
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEmailSMTPCheck) Get() *EmailSMTPCheck {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEmailSMTPCheck) Set(val *EmailSMTPCheck) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEmailSMTPCheck) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEmailSMTPCheck) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEmailSMTPCheck(val *EmailSMTPCheck) *NullableEmailSMTPCheck {
|
|
return &NullableEmailSMTPCheck{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEmailSMTPCheck) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEmailSMTPCheck) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|