Files
sdk/model_domain_reachability.go

383 lines
10 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 DomainReachability type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DomainReachability{}
// DomainReachability struct for DomainReachability
type DomainReachability struct {
// Configured is whether the wholesale credentials are present at all.
Configured *bool `json:"configured,omitempty"`
// Env is the registrar environment. It is the fact that decides whether money moves: only \"prod\" reaches the live, billable registrar — anything else, including unset, is the sandbox.
Env *string `json:"env,omitempty"`
// Error is the blocker, so an operator reads it instead of guessing at it.
Error *string `json:"error,omitempty"`
// Reachable is whether the registrar accepted those credentials on a live call made while the caller waited.
Reachable *bool `json:"reachable,omitempty"`
// Registrar names the wholesale registrar behind it.
Registrar *string `json:"registrar,omitempty"`
// Service names the subsystem answering.
Service *string `json:"service,omitempty"`
// Status is \"ok\" when a live call succeeded, else \"degraded\".
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DomainReachability DomainReachability
// NewDomainReachability instantiates a new DomainReachability 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 NewDomainReachability() *DomainReachability {
this := DomainReachability{}
return &this
}
// NewDomainReachabilityWithDefaults instantiates a new DomainReachability 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 NewDomainReachabilityWithDefaults() *DomainReachability {
this := DomainReachability{}
return &this
}
// GetConfigured returns the Configured field value if set, zero value otherwise.
func (o *DomainReachability) GetConfigured() bool {
if o == nil || IsNil(o.Configured) {
var ret bool
return ret
}
return *o.Configured
}
// GetConfiguredOk returns a tuple with the Configured field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainReachability) GetConfiguredOk() (*bool, bool) {
if o == nil || IsNil(o.Configured) {
return nil, false
}
return o.Configured, true
}
// HasConfigured returns a boolean if a field has been set.
func (o *DomainReachability) HasConfigured() bool {
if o != nil && !IsNil(o.Configured) {
return true
}
return false
}
// SetConfigured gets a reference to the given bool and assigns it to the Configured field.
func (o *DomainReachability) SetConfigured(v bool) {
o.Configured = &v
}
// GetEnv returns the Env field value if set, zero value otherwise.
func (o *DomainReachability) GetEnv() string {
if o == nil || IsNil(o.Env) {
var ret string
return ret
}
return *o.Env
}
// GetEnvOk returns a tuple with the Env field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainReachability) GetEnvOk() (*string, bool) {
if o == nil || IsNil(o.Env) {
return nil, false
}
return o.Env, true
}
// HasEnv returns a boolean if a field has been set.
func (o *DomainReachability) HasEnv() bool {
if o != nil && !IsNil(o.Env) {
return true
}
return false
}
// SetEnv gets a reference to the given string and assigns it to the Env field.
func (o *DomainReachability) SetEnv(v string) {
o.Env = &v
}
// GetError returns the Error field value if set, zero value otherwise.
func (o *DomainReachability) GetError() string {
if o == nil || IsNil(o.Error) {
var ret string
return ret
}
return *o.Error
}
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainReachability) GetErrorOk() (*string, bool) {
if o == nil || IsNil(o.Error) {
return nil, false
}
return o.Error, true
}
// HasError returns a boolean if a field has been set.
func (o *DomainReachability) HasError() bool {
if o != nil && !IsNil(o.Error) {
return true
}
return false
}
// SetError gets a reference to the given string and assigns it to the Error field.
func (o *DomainReachability) SetError(v string) {
o.Error = &v
}
// GetReachable returns the Reachable field value if set, zero value otherwise.
func (o *DomainReachability) GetReachable() bool {
if o == nil || IsNil(o.Reachable) {
var ret bool
return ret
}
return *o.Reachable
}
// GetReachableOk returns a tuple with the Reachable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainReachability) GetReachableOk() (*bool, bool) {
if o == nil || IsNil(o.Reachable) {
return nil, false
}
return o.Reachable, true
}
// HasReachable returns a boolean if a field has been set.
func (o *DomainReachability) HasReachable() bool {
if o != nil && !IsNil(o.Reachable) {
return true
}
return false
}
// SetReachable gets a reference to the given bool and assigns it to the Reachable field.
func (o *DomainReachability) SetReachable(v bool) {
o.Reachable = &v
}
// GetRegistrar returns the Registrar field value if set, zero value otherwise.
func (o *DomainReachability) GetRegistrar() string {
if o == nil || IsNil(o.Registrar) {
var ret string
return ret
}
return *o.Registrar
}
// GetRegistrarOk returns a tuple with the Registrar field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainReachability) GetRegistrarOk() (*string, bool) {
if o == nil || IsNil(o.Registrar) {
return nil, false
}
return o.Registrar, true
}
// HasRegistrar returns a boolean if a field has been set.
func (o *DomainReachability) HasRegistrar() bool {
if o != nil && !IsNil(o.Registrar) {
return true
}
return false
}
// SetRegistrar gets a reference to the given string and assigns it to the Registrar field.
func (o *DomainReachability) SetRegistrar(v string) {
o.Registrar = &v
}
// GetService returns the Service field value if set, zero value otherwise.
func (o *DomainReachability) GetService() string {
if o == nil || IsNil(o.Service) {
var ret string
return ret
}
return *o.Service
}
// GetServiceOk returns a tuple with the Service field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DomainReachability) GetServiceOk() (*string, bool) {
if o == nil || IsNil(o.Service) {
return nil, false
}
return o.Service, true
}
// HasService returns a boolean if a field has been set.
func (o *DomainReachability) HasService() bool {
if o != nil && !IsNil(o.Service) {
return true
}
return false
}
// SetService gets a reference to the given string and assigns it to the Service field.
func (o *DomainReachability) SetService(v string) {
o.Service = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *DomainReachability) 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 *DomainReachability) 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 *DomainReachability) 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 *DomainReachability) SetStatus(v string) {
o.Status = &v
}
func (o DomainReachability) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DomainReachability) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Configured) {
toSerialize["configured"] = o.Configured
}
if !IsNil(o.Env) {
toSerialize["env"] = o.Env
}
if !IsNil(o.Error) {
toSerialize["error"] = o.Error
}
if !IsNil(o.Reachable) {
toSerialize["reachable"] = o.Reachable
}
if !IsNil(o.Registrar) {
toSerialize["registrar"] = o.Registrar
}
if !IsNil(o.Service) {
toSerialize["service"] = o.Service
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DomainReachability) UnmarshalJSON(data []byte) (err error) {
varDomainReachability := _DomainReachability{}
err = json.Unmarshal(data, &varDomainReachability)
if err != nil {
return err
}
*o = DomainReachability(varDomainReachability)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "configured")
delete(additionalProperties, "env")
delete(additionalProperties, "error")
delete(additionalProperties, "reachable")
delete(additionalProperties, "registrar")
delete(additionalProperties, "service")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDomainReachability struct {
value *DomainReachability
isSet bool
}
func (v NullableDomainReachability) Get() *DomainReachability {
return v.value
}
func (v *NullableDomainReachability) Set(val *DomainReachability) {
v.value = val
v.isSet = true
}
func (v NullableDomainReachability) IsSet() bool {
return v.isSet
}
func (v *NullableDomainReachability) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDomainReachability(val *DomainReachability) *NullableDomainReachability {
return &NullableDomainReachability{value: val, isSet: true}
}
func (v NullableDomainReachability) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDomainReachability) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}