Files
sdk/model_email_syntax_check.go

269 lines
7.0 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 EmailSyntaxCheck type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EmailSyntaxCheck{}
// EmailSyntaxCheck struct for EmailSyntaxCheck
type EmailSyntaxCheck struct {
// Domain is the domain-part of the email address.
Domain *string `json:"domain,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"`
// Username is the local-part of the email address.
Username *string `json:"username,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EmailSyntaxCheck EmailSyntaxCheck
// NewEmailSyntaxCheck instantiates a new EmailSyntaxCheck 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 NewEmailSyntaxCheck() *EmailSyntaxCheck {
this := EmailSyntaxCheck{}
return &this
}
// NewEmailSyntaxCheckWithDefaults instantiates a new EmailSyntaxCheck 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 NewEmailSyntaxCheckWithDefaults() *EmailSyntaxCheck {
this := EmailSyntaxCheck{}
return &this
}
// GetDomain returns the Domain field value if set, zero value otherwise.
func (o *EmailSyntaxCheck) GetDomain() string {
if o == nil || IsNil(o.Domain) {
var ret string
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 *EmailSyntaxCheck) GetDomainOk() (*string, 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 *EmailSyntaxCheck) HasDomain() bool {
if o != nil && !IsNil(o.Domain) {
return true
}
return false
}
// SetDomain gets a reference to the given string and assigns it to the Domain field.
func (o *EmailSyntaxCheck) SetDomain(v string) {
o.Domain = &v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *EmailSyntaxCheck) 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 *EmailSyntaxCheck) 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 *EmailSyntaxCheck) 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 *EmailSyntaxCheck) SetReason(v string) {
o.Reason = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *EmailSyntaxCheck) 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 *EmailSyntaxCheck) 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 *EmailSyntaxCheck) 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 *EmailSyntaxCheck) SetStatus(v string) {
o.Status = &v
}
// GetUsername returns the Username field value if set, zero value otherwise.
func (o *EmailSyntaxCheck) GetUsername() string {
if o == nil || IsNil(o.Username) {
var ret string
return ret
}
return *o.Username
}
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailSyntaxCheck) GetUsernameOk() (*string, bool) {
if o == nil || IsNil(o.Username) {
return nil, false
}
return o.Username, true
}
// HasUsername returns a boolean if a field has been set.
func (o *EmailSyntaxCheck) HasUsername() bool {
if o != nil && !IsNil(o.Username) {
return true
}
return false
}
// SetUsername gets a reference to the given string and assigns it to the Username field.
func (o *EmailSyntaxCheck) SetUsername(v string) {
o.Username = &v
}
func (o EmailSyntaxCheck) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EmailSyntaxCheck) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Domain) {
toSerialize["domain"] = o.Domain
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Username) {
toSerialize["username"] = o.Username
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EmailSyntaxCheck) UnmarshalJSON(data []byte) (err error) {
varEmailSyntaxCheck := _EmailSyntaxCheck{}
err = json.Unmarshal(data, &varEmailSyntaxCheck)
if err != nil {
return err
}
*o = EmailSyntaxCheck(varEmailSyntaxCheck)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "domain")
delete(additionalProperties, "reason")
delete(additionalProperties, "status")
delete(additionalProperties, "username")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEmailSyntaxCheck struct {
value *EmailSyntaxCheck
isSet bool
}
func (v NullableEmailSyntaxCheck) Get() *EmailSyntaxCheck {
return v.value
}
func (v *NullableEmailSyntaxCheck) Set(val *EmailSyntaxCheck) {
v.value = val
v.isSet = true
}
func (v NullableEmailSyntaxCheck) IsSet() bool {
return v.isSet
}
func (v *NullableEmailSyntaxCheck) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEmailSyntaxCheck(val *EmailSyntaxCheck) *NullableEmailSyntaxCheck {
return &NullableEmailSyntaxCheck{value: val, isSet: true}
}
func (v NullableEmailSyntaxCheck) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEmailSyntaxCheck) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}