mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
5.8 KiB
Go
231 lines
5.8 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 EmailMXCheck type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EmailMXCheck{}
|
|
|
|
// EmailMXCheck struct for EmailMXCheck
|
|
type EmailMXCheck struct {
|
|
// Reason describes the failure or skip reason when Status is not pass.
|
|
Reason *string `json:"reason,omitempty"`
|
|
// Records lists the discovered mail exchanger hostnames.
|
|
Records []string `json:"records,omitempty"`
|
|
// Status reports the check outcome: pass, fail, unknown, or skipped.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EmailMXCheck EmailMXCheck
|
|
|
|
// NewEmailMXCheck instantiates a new EmailMXCheck 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 NewEmailMXCheck() *EmailMXCheck {
|
|
this := EmailMXCheck{}
|
|
return &this
|
|
}
|
|
|
|
// NewEmailMXCheckWithDefaults instantiates a new EmailMXCheck 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 NewEmailMXCheckWithDefaults() *EmailMXCheck {
|
|
this := EmailMXCheck{}
|
|
return &this
|
|
}
|
|
|
|
// GetReason returns the Reason field value if set, zero value otherwise.
|
|
func (o *EmailMXCheck) 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 *EmailMXCheck) 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 *EmailMXCheck) 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 *EmailMXCheck) SetReason(v string) {
|
|
o.Reason = &v
|
|
}
|
|
|
|
// GetRecords returns the Records field value if set, zero value otherwise.
|
|
func (o *EmailMXCheck) GetRecords() []string {
|
|
if o == nil || IsNil(o.Records) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Records
|
|
}
|
|
|
|
// GetRecordsOk returns a tuple with the Records field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailMXCheck) GetRecordsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Records) {
|
|
return nil, false
|
|
}
|
|
return o.Records, true
|
|
}
|
|
|
|
// HasRecords returns a boolean if a field has been set.
|
|
func (o *EmailMXCheck) HasRecords() bool {
|
|
if o != nil && !IsNil(o.Records) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecords gets a reference to the given []string and assigns it to the Records field.
|
|
func (o *EmailMXCheck) SetRecords(v []string) {
|
|
o.Records = v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *EmailMXCheck) 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 *EmailMXCheck) 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 *EmailMXCheck) 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 *EmailMXCheck) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o EmailMXCheck) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EmailMXCheck) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Reason) {
|
|
toSerialize["reason"] = o.Reason
|
|
}
|
|
if !IsNil(o.Records) {
|
|
toSerialize["records"] = o.Records
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EmailMXCheck) UnmarshalJSON(data []byte) (err error) {
|
|
varEmailMXCheck := _EmailMXCheck{}
|
|
|
|
err = json.Unmarshal(data, &varEmailMXCheck)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EmailMXCheck(varEmailMXCheck)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "reason")
|
|
delete(additionalProperties, "records")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEmailMXCheck struct {
|
|
value *EmailMXCheck
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEmailMXCheck) Get() *EmailMXCheck {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEmailMXCheck) Set(val *EmailMXCheck) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEmailMXCheck) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEmailMXCheck) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEmailMXCheck(val *EmailMXCheck) *NullableEmailMXCheck {
|
|
return &NullableEmailMXCheck{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEmailMXCheck) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEmailMXCheck) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|