Files
sdk/model_domain_contacts.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 DomainContacts type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DomainContacts{}
// DomainContacts struct for DomainContacts
type DomainContacts struct {
// who administers it
Admin *DomainRegistrant `json:"admin,omitempty"`
// who is reached about payment
Billing *DomainRegistrant `json:"billing,omitempty"`
// who owns the domain
Registrant *DomainRegistrant `json:"registrant,omitempty"`
// who is reached about technical matters
Tech *DomainRegistrant `json:"tech,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DomainContacts DomainContacts
// NewDomainContacts instantiates a new DomainContacts 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 NewDomainContacts() *DomainContacts {
this := DomainContacts{}
return &this
}
// NewDomainContactsWithDefaults instantiates a new DomainContacts 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 NewDomainContactsWithDefaults() *DomainContacts {
this := DomainContacts{}
return &this
}
// GetAdmin returns the Admin field value if set, zero value otherwise.
func (o *DomainContacts) GetAdmin() DomainRegistrant {
if o == nil || IsNil(o.Admin) {
var ret DomainRegistrant
return ret
}
return *o.Admin
}
// GetAdminOk returns a tuple with the Admin field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainContacts) GetAdminOk() (*DomainRegistrant, bool) {
if o == nil || IsNil(o.Admin) {
return nil, false
}
return o.Admin, true
}
// HasAdmin returns a boolean if a field has been set.
func (o *DomainContacts) HasAdmin() bool {
if o != nil && !IsNil(o.Admin) {
return true
}
return false
}
// SetAdmin gets a reference to the given DomainRegistrant and assigns it to the Admin field.
func (o *DomainContacts) SetAdmin(v DomainRegistrant) {
o.Admin = &v
}
// GetBilling returns the Billing field value if set, zero value otherwise.
func (o *DomainContacts) GetBilling() DomainRegistrant {
if o == nil || IsNil(o.Billing) {
var ret DomainRegistrant
return ret
}
return *o.Billing
}
// GetBillingOk returns a tuple with the Billing field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainContacts) GetBillingOk() (*DomainRegistrant, bool) {
if o == nil || IsNil(o.Billing) {
return nil, false
}
return o.Billing, true
}
// HasBilling returns a boolean if a field has been set.
func (o *DomainContacts) HasBilling() bool {
if o != nil && !IsNil(o.Billing) {
return true
}
return false
}
// SetBilling gets a reference to the given DomainRegistrant and assigns it to the Billing field.
func (o *DomainContacts) SetBilling(v DomainRegistrant) {
o.Billing = &v
}
// GetRegistrant returns the Registrant field value if set, zero value otherwise.
func (o *DomainContacts) GetRegistrant() DomainRegistrant {
if o == nil || IsNil(o.Registrant) {
var ret DomainRegistrant
return ret
}
return *o.Registrant
}
// GetRegistrantOk returns a tuple with the Registrant field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainContacts) GetRegistrantOk() (*DomainRegistrant, bool) {
if o == nil || IsNil(o.Registrant) {
return nil, false
}
return o.Registrant, true
}
// HasRegistrant returns a boolean if a field has been set.
func (o *DomainContacts) HasRegistrant() bool {
if o != nil && !IsNil(o.Registrant) {
return true
}
return false
}
// SetRegistrant gets a reference to the given DomainRegistrant and assigns it to the Registrant field.
func (o *DomainContacts) SetRegistrant(v DomainRegistrant) {
o.Registrant = &v
}
// GetTech returns the Tech field value if set, zero value otherwise.
func (o *DomainContacts) GetTech() DomainRegistrant {
if o == nil || IsNil(o.Tech) {
var ret DomainRegistrant
return ret
}
return *o.Tech
}
// GetTechOk returns a tuple with the Tech field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainContacts) GetTechOk() (*DomainRegistrant, bool) {
if o == nil || IsNil(o.Tech) {
return nil, false
}
return o.Tech, true
}
// HasTech returns a boolean if a field has been set.
func (o *DomainContacts) HasTech() bool {
if o != nil && !IsNil(o.Tech) {
return true
}
return false
}
// SetTech gets a reference to the given DomainRegistrant and assigns it to the Tech field.
func (o *DomainContacts) SetTech(v DomainRegistrant) {
o.Tech = &v
}
func (o DomainContacts) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DomainContacts) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Admin) {
toSerialize["admin"] = o.Admin
}
if !IsNil(o.Billing) {
toSerialize["billing"] = o.Billing
}
if !IsNil(o.Registrant) {
toSerialize["registrant"] = o.Registrant
}
if !IsNil(o.Tech) {
toSerialize["tech"] = o.Tech
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DomainContacts) UnmarshalJSON(data []byte) (err error) {
varDomainContacts := _DomainContacts{}
err = json.Unmarshal(data, &varDomainContacts)
if err != nil {
return err
}
*o = DomainContacts(varDomainContacts)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "admin")
delete(additionalProperties, "billing")
delete(additionalProperties, "registrant")
delete(additionalProperties, "tech")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDomainContacts struct {
value *DomainContacts
isSet bool
}
func (v NullableDomainContacts) Get() *DomainContacts {
return v.value
}
func (v *NullableDomainContacts) Set(val *DomainContacts) {
v.value = val
v.isSet = true
}
func (v NullableDomainContacts) IsSet() bool {
return v.isSet
}
func (v *NullableDomainContacts) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDomainContacts(val *DomainContacts) *NullableDomainContacts {
return &NullableDomainContacts{value: val, isSet: true}
}
func (v NullableDomainContacts) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDomainContacts) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}