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 DnsSecDelegationSigner type satisfies the MappedNullable interface at compile time
18 var _ MappedNullable = &DnsSecDelegationSigner{}
19 20 // DnsSecDelegationSigner struct for DnsSecDelegationSigner
21 type DnsSecDelegationSigner struct {
22 DigestType *DnsSecDelegationSignerDigestType `json:"digest_type,omitempty"`
23 AlgorithmType *DnsSecDelegationSignerDigestType `json:"algorithm_type,omitempty"`
24 Digest *string `json:"digest,omitempty"`
25 KeyTag *int32 `json:"key_tag,omitempty"`
26 }
27 28 // NewDnsSecDelegationSigner instantiates a new DnsSecDelegationSigner object
29 // This constructor will assign default values to properties that have it defined,
30 // and makes sure properties required by API are set, but the set of arguments
31 // will change when the set of required properties is changed
32 func NewDnsSecDelegationSigner() *DnsSecDelegationSigner {
33 this := DnsSecDelegationSigner{}
34 return &this
35 }
36 37 // NewDnsSecDelegationSignerWithDefaults instantiates a new DnsSecDelegationSigner object
38 // This constructor will only assign default values to properties that have it defined,
39 // but it doesn't guarantee that properties required by API are set
40 func NewDnsSecDelegationSignerWithDefaults() *DnsSecDelegationSigner {
41 this := DnsSecDelegationSigner{}
42 return &this
43 }
44 45 // GetDigestType returns the DigestType field value if set, zero value otherwise.
46 func (o *DnsSecDelegationSigner) GetDigestType() DnsSecDelegationSignerDigestType {
47 if o == nil || IsNil(o.DigestType) {
48 var ret DnsSecDelegationSignerDigestType
49 return ret
50 }
51 return *o.DigestType
52 }
53 54 // GetDigestTypeOk returns a tuple with the DigestType field value if set, nil otherwise
55 // and a boolean to check if the value has been set.
56 func (o *DnsSecDelegationSigner) GetDigestTypeOk() (*DnsSecDelegationSignerDigestType, bool) {
57 if o == nil || IsNil(o.DigestType) {
58 return nil, false
59 }
60 return o.DigestType, true
61 }
62 63 // HasDigestType returns a boolean if a field has been set.
64 func (o *DnsSecDelegationSigner) HasDigestType() bool {
65 if o != nil && !IsNil(o.DigestType) {
66 return true
67 }
68 69 return false
70 }
71 72 // SetDigestType gets a reference to the given DnsSecDelegationSignerDigestType and assigns it to the DigestType field.
73 func (o *DnsSecDelegationSigner) SetDigestType(v DnsSecDelegationSignerDigestType) {
74 o.DigestType = &v
75 }
76 77 // GetAlgorithmType returns the AlgorithmType field value if set, zero value otherwise.
78 func (o *DnsSecDelegationSigner) GetAlgorithmType() DnsSecDelegationSignerDigestType {
79 if o == nil || IsNil(o.AlgorithmType) {
80 var ret DnsSecDelegationSignerDigestType
81 return ret
82 }
83 return *o.AlgorithmType
84 }
85 86 // GetAlgorithmTypeOk returns a tuple with the AlgorithmType field value if set, nil otherwise
87 // and a boolean to check if the value has been set.
88 func (o *DnsSecDelegationSigner) GetAlgorithmTypeOk() (*DnsSecDelegationSignerDigestType, bool) {
89 if o == nil || IsNil(o.AlgorithmType) {
90 return nil, false
91 }
92 return o.AlgorithmType, true
93 }
94 95 // HasAlgorithmType returns a boolean if a field has been set.
96 func (o *DnsSecDelegationSigner) HasAlgorithmType() bool {
97 if o != nil && !IsNil(o.AlgorithmType) {
98 return true
99 }
100 101 return false
102 }
103 104 // SetAlgorithmType gets a reference to the given DnsSecDelegationSignerDigestType and assigns it to the AlgorithmType field.
105 func (o *DnsSecDelegationSigner) SetAlgorithmType(v DnsSecDelegationSignerDigestType) {
106 o.AlgorithmType = &v
107 }
108 109 // GetDigest returns the Digest field value if set, zero value otherwise.
110 func (o *DnsSecDelegationSigner) GetDigest() string {
111 if o == nil || IsNil(o.Digest) {
112 var ret string
113 return ret
114 }
115 return *o.Digest
116 }
117 118 // GetDigestOk returns a tuple with the Digest field value if set, nil otherwise
119 // and a boolean to check if the value has been set.
120 func (o *DnsSecDelegationSigner) GetDigestOk() (*string, bool) {
121 if o == nil || IsNil(o.Digest) {
122 return nil, false
123 }
124 return o.Digest, true
125 }
126 127 // HasDigest returns a boolean if a field has been set.
128 func (o *DnsSecDelegationSigner) HasDigest() bool {
129 if o != nil && !IsNil(o.Digest) {
130 return true
131 }
132 133 return false
134 }
135 136 // SetDigest gets a reference to the given string and assigns it to the Digest field.
137 func (o *DnsSecDelegationSigner) SetDigest(v string) {
138 o.Digest = &v
139 }
140 141 // GetKeyTag returns the KeyTag field value if set, zero value otherwise.
142 func (o *DnsSecDelegationSigner) GetKeyTag() int32 {
143 if o == nil || IsNil(o.KeyTag) {
144 var ret int32
145 return ret
146 }
147 return *o.KeyTag
148 }
149 150 // GetKeyTagOk returns a tuple with the KeyTag field value if set, nil otherwise
151 // and a boolean to check if the value has been set.
152 func (o *DnsSecDelegationSigner) GetKeyTagOk() (*int32, bool) {
153 if o == nil || IsNil(o.KeyTag) {
154 return nil, false
155 }
156 return o.KeyTag, true
157 }
158 159 // HasKeyTag returns a boolean if a field has been set.
160 func (o *DnsSecDelegationSigner) HasKeyTag() bool {
161 if o != nil && !IsNil(o.KeyTag) {
162 return true
163 }
164 165 return false
166 }
167 168 // SetKeyTag gets a reference to the given int32 and assigns it to the KeyTag field.
169 func (o *DnsSecDelegationSigner) SetKeyTag(v int32) {
170 o.KeyTag = &v
171 }
172 173 func (o DnsSecDelegationSigner) MarshalJSON() ([]byte, error) {
174 toSerialize,err := o.ToMap()
175 if err != nil {
176 return []byte{}, err
177 }
178 return json.Marshal(toSerialize)
179 }
180 181 func (o DnsSecDelegationSigner) ToMap() (map[string]interface{}, error) {
182 toSerialize := map[string]interface{}{}
183 if !IsNil(o.DigestType) {
184 toSerialize["digest_type"] = o.DigestType
185 }
186 if !IsNil(o.AlgorithmType) {
187 toSerialize["algorithm_type"] = o.AlgorithmType
188 }
189 if !IsNil(o.Digest) {
190 toSerialize["digest"] = o.Digest
191 }
192 if !IsNil(o.KeyTag) {
193 toSerialize["key_tag"] = o.KeyTag
194 }
195 return toSerialize, nil
196 }
197 198 type NullableDnsSecDelegationSigner struct {
199 value *DnsSecDelegationSigner
200 isSet bool
201 }
202 203 func (v NullableDnsSecDelegationSigner) Get() *DnsSecDelegationSigner {
204 return v.value
205 }
206 207 func (v *NullableDnsSecDelegationSigner) Set(val *DnsSecDelegationSigner) {
208 v.value = val
209 v.isSet = true
210 }
211 212 func (v NullableDnsSecDelegationSigner) IsSet() bool {
213 return v.isSet
214 }
215 216 func (v *NullableDnsSecDelegationSigner) Unset() {
217 v.value = nil
218 v.isSet = false
219 }
220 221 func NewNullableDnsSecDelegationSigner(val *DnsSecDelegationSigner) *NullableDnsSecDelegationSigner {
222 return &NullableDnsSecDelegationSigner{value: val, isSet: true}
223 }
224 225 func (v NullableDnsSecDelegationSigner) MarshalJSON() ([]byte, error) {
226 return json.Marshal(v.value)
227 }
228 229 func (v *NullableDnsSecDelegationSigner) UnmarshalJSON(src []byte) error {
230 v.isSet = true
231 return json.Unmarshal(src, &v.value)
232 }
233 234 235