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 EmailRefused type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EmailRefused{}
|
|
|
|
// EmailRefused struct for EmailRefused
|
|
type EmailRefused struct {
|
|
// Address is the recipient.
|
|
Address *string `json:"address,omitempty"`
|
|
// Reason is why: unsubscribed, company unsubscribed (the address's domain opted out of the org's mail) or blocklisted (the platform's list).
|
|
Reason *string `json:"reason,omitempty"`
|
|
// Status is 422: the address may not be mailed.
|
|
Status *int64 `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EmailRefused EmailRefused
|
|
|
|
// NewEmailRefused instantiates a new EmailRefused 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 NewEmailRefused() *EmailRefused {
|
|
this := EmailRefused{}
|
|
return &this
|
|
}
|
|
|
|
// NewEmailRefusedWithDefaults instantiates a new EmailRefused 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 NewEmailRefusedWithDefaults() *EmailRefused {
|
|
this := EmailRefused{}
|
|
return &this
|
|
}
|
|
|
|
// GetAddress returns the Address field value if set, zero value otherwise.
|
|
func (o *EmailRefused) GetAddress() string {
|
|
if o == nil || IsNil(o.Address) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Address
|
|
}
|
|
|
|
// GetAddressOk returns a tuple with the Address field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EmailRefused) GetAddressOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Address) {
|
|
return nil, false
|
|
}
|
|
return o.Address, true
|
|
}
|
|
|
|
// HasAddress returns a boolean if a field has been set.
|
|
func (o *EmailRefused) HasAddress() bool {
|
|
if o != nil && !IsNil(o.Address) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAddress gets a reference to the given string and assigns it to the Address field.
|
|
func (o *EmailRefused) SetAddress(v string) {
|
|
o.Address = &v
|
|
}
|
|
|
|
// GetReason returns the Reason field value if set, zero value otherwise.
|
|
func (o *EmailRefused) 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 *EmailRefused) 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 *EmailRefused) 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 *EmailRefused) SetReason(v string) {
|
|
o.Reason = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *EmailRefused) GetStatus() int64 {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret int64
|
|
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 *EmailRefused) GetStatusOk() (*int64, 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 *EmailRefused) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given int64 and assigns it to the Status field.
|
|
func (o *EmailRefused) SetStatus(v int64) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o EmailRefused) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EmailRefused) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Address) {
|
|
toSerialize["address"] = o.Address
|
|
}
|
|
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 *EmailRefused) UnmarshalJSON(data []byte) (err error) {
|
|
varEmailRefused := _EmailRefused{}
|
|
|
|
err = json.Unmarshal(data, &varEmailRefused)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EmailRefused(varEmailRefused)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "address")
|
|
delete(additionalProperties, "reason")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEmailRefused struct {
|
|
value *EmailRefused
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEmailRefused) Get() *EmailRefused {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEmailRefused) Set(val *EmailRefused) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEmailRefused) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEmailRefused) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEmailRefused(val *EmailRefused) *NullableEmailRefused {
|
|
return &NullableEmailRefused{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEmailRefused) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEmailRefused) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|