/
model_models_certificate_retrieval_response_detailed_key_usage_model.go
493 lines (414 loc) · 17.2 KB
/
model_models_certificate_retrieval_response_detailed_key_usage_model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
/*
Copyright 2023 Keyfactor
Licensed under the Apache License, Version 2.0 (the License); you may
not use this file except in compliance with the License. You may obtain a
copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless
required by applicable law or agreed to in writing, software distributed
under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the
License.
Keyfactor-v1
This reference serves to document REST-based methods to manage and integrate with Keyfactor. In addition, an embedded interface allows for the execution of calls against the current Keyfactor API instance.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package command
import (
"encoding/json"
)
// checks if the ModelsCertificateRetrievalResponseDetailedKeyUsageModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ModelsCertificateRetrievalResponseDetailedKeyUsageModel{}
// ModelsCertificateRetrievalResponseDetailedKeyUsageModel struct for ModelsCertificateRetrievalResponseDetailedKeyUsageModel
type ModelsCertificateRetrievalResponseDetailedKeyUsageModel struct {
CrlSign *bool `json:"CrlSign,omitempty"`
DataEncipherment *bool `json:"DataEncipherment,omitempty"`
DecipherOnly *bool `json:"DecipherOnly,omitempty"`
DigitalSignature *bool `json:"DigitalSignature,omitempty"`
EncipherOnly *bool `json:"EncipherOnly,omitempty"`
KeyAgreement *bool `json:"KeyAgreement,omitempty"`
KeyCertSign *bool `json:"KeyCertSign,omitempty"`
KeyEncipherment *bool `json:"KeyEncipherment,omitempty"`
NonRepudiation *bool `json:"NonRepudiation,omitempty"`
HexCode *string `json:"HexCode,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ModelsCertificateRetrievalResponseDetailedKeyUsageModel ModelsCertificateRetrievalResponseDetailedKeyUsageModel
// NewModelsCertificateRetrievalResponseDetailedKeyUsageModel instantiates a new ModelsCertificateRetrievalResponseDetailedKeyUsageModel 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 NewModelsCertificateRetrievalResponseDetailedKeyUsageModel() *ModelsCertificateRetrievalResponseDetailedKeyUsageModel {
this := ModelsCertificateRetrievalResponseDetailedKeyUsageModel{}
return &this
}
// NewModelsCertificateRetrievalResponseDetailedKeyUsageModelWithDefaults instantiates a new ModelsCertificateRetrievalResponseDetailedKeyUsageModel 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 NewModelsCertificateRetrievalResponseDetailedKeyUsageModelWithDefaults() *ModelsCertificateRetrievalResponseDetailedKeyUsageModel {
this := ModelsCertificateRetrievalResponseDetailedKeyUsageModel{}
return &this
}
// GetCrlSign returns the CrlSign field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetCrlSign() bool {
if o == nil || isNil(o.CrlSign) {
var ret bool
return ret
}
return *o.CrlSign
}
// GetCrlSignOk returns a tuple with the CrlSign field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetCrlSignOk() (*bool, bool) {
if o == nil || isNil(o.CrlSign) {
return nil, false
}
return o.CrlSign, true
}
// HasCrlSign returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasCrlSign() bool {
if o != nil && !isNil(o.CrlSign) {
return true
}
return false
}
// SetCrlSign gets a reference to the given bool and assigns it to the CrlSign field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetCrlSign(v bool) {
o.CrlSign = &v
}
// GetDataEncipherment returns the DataEncipherment field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetDataEncipherment() bool {
if o == nil || isNil(o.DataEncipherment) {
var ret bool
return ret
}
return *o.DataEncipherment
}
// GetDataEnciphermentOk returns a tuple with the DataEncipherment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetDataEnciphermentOk() (*bool, bool) {
if o == nil || isNil(o.DataEncipherment) {
return nil, false
}
return o.DataEncipherment, true
}
// HasDataEncipherment returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasDataEncipherment() bool {
if o != nil && !isNil(o.DataEncipherment) {
return true
}
return false
}
// SetDataEncipherment gets a reference to the given bool and assigns it to the DataEncipherment field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetDataEncipherment(v bool) {
o.DataEncipherment = &v
}
// GetDecipherOnly returns the DecipherOnly field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetDecipherOnly() bool {
if o == nil || isNil(o.DecipherOnly) {
var ret bool
return ret
}
return *o.DecipherOnly
}
// GetDecipherOnlyOk returns a tuple with the DecipherOnly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetDecipherOnlyOk() (*bool, bool) {
if o == nil || isNil(o.DecipherOnly) {
return nil, false
}
return o.DecipherOnly, true
}
// HasDecipherOnly returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasDecipherOnly() bool {
if o != nil && !isNil(o.DecipherOnly) {
return true
}
return false
}
// SetDecipherOnly gets a reference to the given bool and assigns it to the DecipherOnly field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetDecipherOnly(v bool) {
o.DecipherOnly = &v
}
// GetDigitalSignature returns the DigitalSignature field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetDigitalSignature() bool {
if o == nil || isNil(o.DigitalSignature) {
var ret bool
return ret
}
return *o.DigitalSignature
}
// GetDigitalSignatureOk returns a tuple with the DigitalSignature field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetDigitalSignatureOk() (*bool, bool) {
if o == nil || isNil(o.DigitalSignature) {
return nil, false
}
return o.DigitalSignature, true
}
// HasDigitalSignature returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasDigitalSignature() bool {
if o != nil && !isNil(o.DigitalSignature) {
return true
}
return false
}
// SetDigitalSignature gets a reference to the given bool and assigns it to the DigitalSignature field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetDigitalSignature(v bool) {
o.DigitalSignature = &v
}
// GetEncipherOnly returns the EncipherOnly field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetEncipherOnly() bool {
if o == nil || isNil(o.EncipherOnly) {
var ret bool
return ret
}
return *o.EncipherOnly
}
// GetEncipherOnlyOk returns a tuple with the EncipherOnly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetEncipherOnlyOk() (*bool, bool) {
if o == nil || isNil(o.EncipherOnly) {
return nil, false
}
return o.EncipherOnly, true
}
// HasEncipherOnly returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasEncipherOnly() bool {
if o != nil && !isNil(o.EncipherOnly) {
return true
}
return false
}
// SetEncipherOnly gets a reference to the given bool and assigns it to the EncipherOnly field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetEncipherOnly(v bool) {
o.EncipherOnly = &v
}
// GetKeyAgreement returns the KeyAgreement field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetKeyAgreement() bool {
if o == nil || isNil(o.KeyAgreement) {
var ret bool
return ret
}
return *o.KeyAgreement
}
// GetKeyAgreementOk returns a tuple with the KeyAgreement field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetKeyAgreementOk() (*bool, bool) {
if o == nil || isNil(o.KeyAgreement) {
return nil, false
}
return o.KeyAgreement, true
}
// HasKeyAgreement returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasKeyAgreement() bool {
if o != nil && !isNil(o.KeyAgreement) {
return true
}
return false
}
// SetKeyAgreement gets a reference to the given bool and assigns it to the KeyAgreement field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetKeyAgreement(v bool) {
o.KeyAgreement = &v
}
// GetKeyCertSign returns the KeyCertSign field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetKeyCertSign() bool {
if o == nil || isNil(o.KeyCertSign) {
var ret bool
return ret
}
return *o.KeyCertSign
}
// GetKeyCertSignOk returns a tuple with the KeyCertSign field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetKeyCertSignOk() (*bool, bool) {
if o == nil || isNil(o.KeyCertSign) {
return nil, false
}
return o.KeyCertSign, true
}
// HasKeyCertSign returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasKeyCertSign() bool {
if o != nil && !isNil(o.KeyCertSign) {
return true
}
return false
}
// SetKeyCertSign gets a reference to the given bool and assigns it to the KeyCertSign field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetKeyCertSign(v bool) {
o.KeyCertSign = &v
}
// GetKeyEncipherment returns the KeyEncipherment field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetKeyEncipherment() bool {
if o == nil || isNil(o.KeyEncipherment) {
var ret bool
return ret
}
return *o.KeyEncipherment
}
// GetKeyEnciphermentOk returns a tuple with the KeyEncipherment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetKeyEnciphermentOk() (*bool, bool) {
if o == nil || isNil(o.KeyEncipherment) {
return nil, false
}
return o.KeyEncipherment, true
}
// HasKeyEncipherment returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasKeyEncipherment() bool {
if o != nil && !isNil(o.KeyEncipherment) {
return true
}
return false
}
// SetKeyEncipherment gets a reference to the given bool and assigns it to the KeyEncipherment field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetKeyEncipherment(v bool) {
o.KeyEncipherment = &v
}
// GetNonRepudiation returns the NonRepudiation field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetNonRepudiation() bool {
if o == nil || isNil(o.NonRepudiation) {
var ret bool
return ret
}
return *o.NonRepudiation
}
// GetNonRepudiationOk returns a tuple with the NonRepudiation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetNonRepudiationOk() (*bool, bool) {
if o == nil || isNil(o.NonRepudiation) {
return nil, false
}
return o.NonRepudiation, true
}
// HasNonRepudiation returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasNonRepudiation() bool {
if o != nil && !isNil(o.NonRepudiation) {
return true
}
return false
}
// SetNonRepudiation gets a reference to the given bool and assigns it to the NonRepudiation field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetNonRepudiation(v bool) {
o.NonRepudiation = &v
}
// GetHexCode returns the HexCode field value if set, zero value otherwise.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetHexCode() string {
if o == nil || isNil(o.HexCode) {
var ret string
return ret
}
return *o.HexCode
}
// GetHexCodeOk returns a tuple with the HexCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) GetHexCodeOk() (*string, bool) {
if o == nil || isNil(o.HexCode) {
return nil, false
}
return o.HexCode, true
}
// HasHexCode returns a boolean if a field has been set.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) HasHexCode() bool {
if o != nil && !isNil(o.HexCode) {
return true
}
return false
}
// SetHexCode gets a reference to the given string and assigns it to the HexCode field.
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) SetHexCode(v string) {
o.HexCode = &v
}
func (o ModelsCertificateRetrievalResponseDetailedKeyUsageModel) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ModelsCertificateRetrievalResponseDetailedKeyUsageModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !isNil(o.CrlSign) {
toSerialize["CrlSign"] = o.CrlSign
}
if !isNil(o.DataEncipherment) {
toSerialize["DataEncipherment"] = o.DataEncipherment
}
if !isNil(o.DecipherOnly) {
toSerialize["DecipherOnly"] = o.DecipherOnly
}
if !isNil(o.DigitalSignature) {
toSerialize["DigitalSignature"] = o.DigitalSignature
}
if !isNil(o.EncipherOnly) {
toSerialize["EncipherOnly"] = o.EncipherOnly
}
if !isNil(o.KeyAgreement) {
toSerialize["KeyAgreement"] = o.KeyAgreement
}
if !isNil(o.KeyCertSign) {
toSerialize["KeyCertSign"] = o.KeyCertSign
}
if !isNil(o.KeyEncipherment) {
toSerialize["KeyEncipherment"] = o.KeyEncipherment
}
if !isNil(o.NonRepudiation) {
toSerialize["NonRepudiation"] = o.NonRepudiation
}
if !isNil(o.HexCode) {
toSerialize["HexCode"] = o.HexCode
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) UnmarshalJSON(bytes []byte) (err error) {
varModelsCertificateRetrievalResponseDetailedKeyUsageModel := _ModelsCertificateRetrievalResponseDetailedKeyUsageModel{}
if err = json.Unmarshal(bytes, &varModelsCertificateRetrievalResponseDetailedKeyUsageModel); err == nil {
*o = ModelsCertificateRetrievalResponseDetailedKeyUsageModel(varModelsCertificateRetrievalResponseDetailedKeyUsageModel)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "CrlSign")
delete(additionalProperties, "DataEncipherment")
delete(additionalProperties, "DecipherOnly")
delete(additionalProperties, "DigitalSignature")
delete(additionalProperties, "EncipherOnly")
delete(additionalProperties, "KeyAgreement")
delete(additionalProperties, "KeyCertSign")
delete(additionalProperties, "KeyEncipherment")
delete(additionalProperties, "NonRepudiation")
delete(additionalProperties, "HexCode")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableModelsCertificateRetrievalResponseDetailedKeyUsageModel struct {
value *ModelsCertificateRetrievalResponseDetailedKeyUsageModel
isSet bool
}
func (v NullableModelsCertificateRetrievalResponseDetailedKeyUsageModel) Get() *ModelsCertificateRetrievalResponseDetailedKeyUsageModel {
return v.value
}
func (v *NullableModelsCertificateRetrievalResponseDetailedKeyUsageModel) Set(val *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) {
v.value = val
v.isSet = true
}
func (v NullableModelsCertificateRetrievalResponseDetailedKeyUsageModel) IsSet() bool {
return v.isSet
}
func (v *NullableModelsCertificateRetrievalResponseDetailedKeyUsageModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableModelsCertificateRetrievalResponseDetailedKeyUsageModel(val *ModelsCertificateRetrievalResponseDetailedKeyUsageModel) *NullableModelsCertificateRetrievalResponseDetailedKeyUsageModel {
return &NullableModelsCertificateRetrievalResponseDetailedKeyUsageModel{value: val, isSet: true}
}
func (v NullableModelsCertificateRetrievalResponseDetailedKeyUsageModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableModelsCertificateRetrievalResponseDetailedKeyUsageModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}