Files
sdk/model_email_classification_check.go

307 lines
8.4 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 EmailClassificationCheck type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EmailClassificationCheck{}
// EmailClassificationCheck struct for EmailClassificationCheck
type EmailClassificationCheck struct {
// Disposable reports whether the domain belongs to a temporary or throwaway provider.
Disposable *bool `json:"disposable,omitempty"`
// Free reports whether the domain belongs to a free consumer webmail provider.
Free *bool `json:"free,omitempty"`
// Reason describes the failure or skip reason when Status is not pass.
Reason *string `json:"reason,omitempty"`
// Role reports whether the address is a generic role or distribution account.
Role *bool `json:"role,omitempty"`
// Status reports the check outcome: pass, fail, unknown, or skipped.
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EmailClassificationCheck EmailClassificationCheck
// NewEmailClassificationCheck instantiates a new EmailClassificationCheck 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 NewEmailClassificationCheck() *EmailClassificationCheck {
this := EmailClassificationCheck{}
return &this
}
// NewEmailClassificationCheckWithDefaults instantiates a new EmailClassificationCheck 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 NewEmailClassificationCheckWithDefaults() *EmailClassificationCheck {
this := EmailClassificationCheck{}
return &this
}
// GetDisposable returns the Disposable field value if set, zero value otherwise.
func (o *EmailClassificationCheck) GetDisposable() bool {
if o == nil || IsNil(o.Disposable) {
var ret bool
return ret
}
return *o.Disposable
}
// GetDisposableOk returns a tuple with the Disposable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailClassificationCheck) GetDisposableOk() (*bool, bool) {
if o == nil || IsNil(o.Disposable) {
return nil, false
}
return o.Disposable, true
}
// HasDisposable returns a boolean if a field has been set.
func (o *EmailClassificationCheck) HasDisposable() bool {
if o != nil && !IsNil(o.Disposable) {
return true
}
return false
}
// SetDisposable gets a reference to the given bool and assigns it to the Disposable field.
func (o *EmailClassificationCheck) SetDisposable(v bool) {
o.Disposable = &v
}
// GetFree returns the Free field value if set, zero value otherwise.
func (o *EmailClassificationCheck) GetFree() bool {
if o == nil || IsNil(o.Free) {
var ret bool
return ret
}
return *o.Free
}
// GetFreeOk returns a tuple with the Free field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailClassificationCheck) GetFreeOk() (*bool, bool) {
if o == nil || IsNil(o.Free) {
return nil, false
}
return o.Free, true
}
// HasFree returns a boolean if a field has been set.
func (o *EmailClassificationCheck) HasFree() bool {
if o != nil && !IsNil(o.Free) {
return true
}
return false
}
// SetFree gets a reference to the given bool and assigns it to the Free field.
func (o *EmailClassificationCheck) SetFree(v bool) {
o.Free = &v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *EmailClassificationCheck) 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 *EmailClassificationCheck) 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 *EmailClassificationCheck) 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 *EmailClassificationCheck) SetReason(v string) {
o.Reason = &v
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *EmailClassificationCheck) GetRole() bool {
if o == nil || IsNil(o.Role) {
var ret bool
return ret
}
return *o.Role
}
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailClassificationCheck) GetRoleOk() (*bool, bool) {
if o == nil || IsNil(o.Role) {
return nil, false
}
return o.Role, true
}
// HasRole returns a boolean if a field has been set.
func (o *EmailClassificationCheck) HasRole() bool {
if o != nil && !IsNil(o.Role) {
return true
}
return false
}
// SetRole gets a reference to the given bool and assigns it to the Role field.
func (o *EmailClassificationCheck) SetRole(v bool) {
o.Role = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *EmailClassificationCheck) 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 *EmailClassificationCheck) 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 *EmailClassificationCheck) 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 *EmailClassificationCheck) SetStatus(v string) {
o.Status = &v
}
func (o EmailClassificationCheck) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EmailClassificationCheck) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Disposable) {
toSerialize["disposable"] = o.Disposable
}
if !IsNil(o.Free) {
toSerialize["free"] = o.Free
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.Role) {
toSerialize["role"] = o.Role
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EmailClassificationCheck) UnmarshalJSON(data []byte) (err error) {
varEmailClassificationCheck := _EmailClassificationCheck{}
err = json.Unmarshal(data, &varEmailClassificationCheck)
if err != nil {
return err
}
*o = EmailClassificationCheck(varEmailClassificationCheck)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "disposable")
delete(additionalProperties, "free")
delete(additionalProperties, "reason")
delete(additionalProperties, "role")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEmailClassificationCheck struct {
value *EmailClassificationCheck
isSet bool
}
func (v NullableEmailClassificationCheck) Get() *EmailClassificationCheck {
return v.value
}
func (v *NullableEmailClassificationCheck) Set(val *EmailClassificationCheck) {
v.value = val
v.isSet = true
}
func (v NullableEmailClassificationCheck) IsSet() bool {
return v.isSet
}
func (v *NullableEmailClassificationCheck) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEmailClassificationCheck(val *EmailClassificationCheck) *NullableEmailClassificationCheck {
return &NullableEmailClassificationCheck{value: val, isSet: true}
}
func (v NullableEmailClassificationCheck) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEmailClassificationCheck) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}