model_dns_sec.go raw

   1  /*
   2  Intelligent DNS API
   3  
   4  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
   5  
   6  API version: 1.0.0
   7  */
   8  
   9  // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
  10  
  11  package idns
  12  
  13  import (
  14  	"encoding/json"
  15  )
  16  
  17  // checks if the DnsSec type satisfies the MappedNullable interface at compile time
  18  var _ MappedNullable = &DnsSec{}
  19  
  20  // DnsSec struct for DnsSec
  21  type DnsSec struct {
  22  	IsEnabled *bool `json:"is_enabled,omitempty"`
  23  	Status *string `json:"status,omitempty"`
  24  	DelegationSigner *DnsSecDelegationSigner `json:"delegation_signer,omitempty"`
  25  }
  26  
  27  // NewDnsSec instantiates a new DnsSec object
  28  // This constructor will assign default values to properties that have it defined,
  29  // and makes sure properties required by API are set, but the set of arguments
  30  // will change when the set of required properties is changed
  31  func NewDnsSec() *DnsSec {
  32  	this := DnsSec{}
  33  	return &this
  34  }
  35  
  36  // NewDnsSecWithDefaults instantiates a new DnsSec object
  37  // This constructor will only assign default values to properties that have it defined,
  38  // but it doesn't guarantee that properties required by API are set
  39  func NewDnsSecWithDefaults() *DnsSec {
  40  	this := DnsSec{}
  41  	return &this
  42  }
  43  
  44  // GetIsEnabled returns the IsEnabled field value if set, zero value otherwise.
  45  func (o *DnsSec) GetIsEnabled() bool {
  46  	if o == nil || IsNil(o.IsEnabled) {
  47  		var ret bool
  48  		return ret
  49  	}
  50  	return *o.IsEnabled
  51  }
  52  
  53  // GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise
  54  // and a boolean to check if the value has been set.
  55  func (o *DnsSec) GetIsEnabledOk() (*bool, bool) {
  56  	if o == nil || IsNil(o.IsEnabled) {
  57  		return nil, false
  58  	}
  59  	return o.IsEnabled, true
  60  }
  61  
  62  // HasIsEnabled returns a boolean if a field has been set.
  63  func (o *DnsSec) HasIsEnabled() bool {
  64  	if o != nil && !IsNil(o.IsEnabled) {
  65  		return true
  66  	}
  67  
  68  	return false
  69  }
  70  
  71  // SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field.
  72  func (o *DnsSec) SetIsEnabled(v bool) {
  73  	o.IsEnabled = &v
  74  }
  75  
  76  // GetStatus returns the Status field value if set, zero value otherwise.
  77  func (o *DnsSec) GetStatus() string {
  78  	if o == nil || IsNil(o.Status) {
  79  		var ret string
  80  		return ret
  81  	}
  82  	return *o.Status
  83  }
  84  
  85  // GetStatusOk returns a tuple with the Status field value if set, nil otherwise
  86  // and a boolean to check if the value has been set.
  87  func (o *DnsSec) GetStatusOk() (*string, bool) {
  88  	if o == nil || IsNil(o.Status) {
  89  		return nil, false
  90  	}
  91  	return o.Status, true
  92  }
  93  
  94  // HasStatus returns a boolean if a field has been set.
  95  func (o *DnsSec) HasStatus() bool {
  96  	if o != nil && !IsNil(o.Status) {
  97  		return true
  98  	}
  99  
 100  	return false
 101  }
 102  
 103  // SetStatus gets a reference to the given string and assigns it to the Status field.
 104  func (o *DnsSec) SetStatus(v string) {
 105  	o.Status = &v
 106  }
 107  
 108  // GetDelegationSigner returns the DelegationSigner field value if set, zero value otherwise.
 109  func (o *DnsSec) GetDelegationSigner() DnsSecDelegationSigner {
 110  	if o == nil || IsNil(o.DelegationSigner) {
 111  		var ret DnsSecDelegationSigner
 112  		return ret
 113  	}
 114  	return *o.DelegationSigner
 115  }
 116  
 117  // GetDelegationSignerOk returns a tuple with the DelegationSigner field value if set, nil otherwise
 118  // and a boolean to check if the value has been set.
 119  func (o *DnsSec) GetDelegationSignerOk() (*DnsSecDelegationSigner, bool) {
 120  	if o == nil || IsNil(o.DelegationSigner) {
 121  		return nil, false
 122  	}
 123  	return o.DelegationSigner, true
 124  }
 125  
 126  // HasDelegationSigner returns a boolean if a field has been set.
 127  func (o *DnsSec) HasDelegationSigner() bool {
 128  	if o != nil && !IsNil(o.DelegationSigner) {
 129  		return true
 130  	}
 131  
 132  	return false
 133  }
 134  
 135  // SetDelegationSigner gets a reference to the given DnsSecDelegationSigner and assigns it to the DelegationSigner field.
 136  func (o *DnsSec) SetDelegationSigner(v DnsSecDelegationSigner) {
 137  	o.DelegationSigner = &v
 138  }
 139  
 140  func (o DnsSec) MarshalJSON() ([]byte, error) {
 141  	toSerialize,err := o.ToMap()
 142  	if err != nil {
 143  		return []byte{}, err
 144  	}
 145  	return json.Marshal(toSerialize)
 146  }
 147  
 148  func (o DnsSec) ToMap() (map[string]interface{}, error) {
 149  	toSerialize := map[string]interface{}{}
 150  	if !IsNil(o.IsEnabled) {
 151  		toSerialize["is_enabled"] = o.IsEnabled
 152  	}
 153  	if !IsNil(o.Status) {
 154  		toSerialize["status"] = o.Status
 155  	}
 156  	if !IsNil(o.DelegationSigner) {
 157  		toSerialize["delegation_signer"] = o.DelegationSigner
 158  	}
 159  	return toSerialize, nil
 160  }
 161  
 162  type NullableDnsSec struct {
 163  	value *DnsSec
 164  	isSet bool
 165  }
 166  
 167  func (v NullableDnsSec) Get() *DnsSec {
 168  	return v.value
 169  }
 170  
 171  func (v *NullableDnsSec) Set(val *DnsSec) {
 172  	v.value = val
 173  	v.isSet = true
 174  }
 175  
 176  func (v NullableDnsSec) IsSet() bool {
 177  	return v.isSet
 178  }
 179  
 180  func (v *NullableDnsSec) Unset() {
 181  	v.value = nil
 182  	v.isSet = false
 183  }
 184  
 185  func NewNullableDnsSec(val *DnsSec) *NullableDnsSec {
 186  	return &NullableDnsSec{value: val, isSet: true}
 187  }
 188  
 189  func (v NullableDnsSec) MarshalJSON() ([]byte, error) {
 190  	return json.Marshal(v.value)
 191  }
 192  
 193  func (v *NullableDnsSec) UnmarshalJSON(src []byte) error {
 194  	v.isSet = true
 195  	return json.Unmarshal(src, &v.value)
 196  }
 197  
 198  
 199