forked from okta/okta-sdk-golang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_device_profile.go
670 lines (570 loc) · 18.1 KB
/
model_device_profile.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
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
/*
Okta Admin Management
Allows customers to easily access the Okta Management APIs
Copyright 2018 - Present Okta, Inc.
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.
API version: 5.1.0
Contact: devex-public@okta.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package okta
import (
"encoding/json"
)
// DeviceProfile struct for DeviceProfile
type DeviceProfile struct {
// Type of encryption used on the device > **Note:** The following values map to Disk Encryption ON: `FULL`, `USER`, `ALL_INTERNAL_VOLUMES`. All other values map to Disk Encryption OFF.
DiskEncryptionType *string `json:"diskEncryptionType,omitempty"`
// Display name of the device
DisplayName string `json:"displayName"`
// International Mobile Equipment Identity (IMEI) of the device
Imei *string `json:"imei,omitempty"`
// Indicates if the device is jailbroken or rooted. Only applicable to `IOS` and `ANDROID` platforms
IntegrityJailbreak *bool `json:"integrityJailbreak,omitempty"`
// Name of the manufacturer of the device
Manufacturer *string `json:"manufacturer,omitempty"`
// Mobile equipment identifier of the device
Meid *string `json:"meid,omitempty"`
// Model of the device
Model *string `json:"model,omitempty"`
// Version of the device OS
OsVersion *string `json:"osVersion,omitempty"`
// OS platform of the device
Platform string `json:"platform"`
// Indicates if the device is registered at Okta
Registered bool `json:"registered"`
// Indicates if the device contains a secure hardware functionality
SecureHardwarePresent *bool `json:"secureHardwarePresent,omitempty"`
// Serial number of the device
SerialNumber *string `json:"serialNumber,omitempty"`
// Windows Security identifier of the device
Sid *string `json:"sid,omitempty"`
// Windows Trusted Platform Module hash value
TpmPublicKeyHash *string `json:"tpmPublicKeyHash,omitempty"`
// macOS Unique Device identifier of the device
Udid *string `json:"udid,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeviceProfile DeviceProfile
// NewDeviceProfile instantiates a new DeviceProfile 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 NewDeviceProfile(displayName string, platform string, registered bool) *DeviceProfile {
this := DeviceProfile{}
this.DisplayName = displayName
this.Platform = platform
this.Registered = registered
return &this
}
// NewDeviceProfileWithDefaults instantiates a new DeviceProfile 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 NewDeviceProfileWithDefaults() *DeviceProfile {
this := DeviceProfile{}
return &this
}
// GetDiskEncryptionType returns the DiskEncryptionType field value if set, zero value otherwise.
func (o *DeviceProfile) GetDiskEncryptionType() string {
if o == nil || o.DiskEncryptionType == nil {
var ret string
return ret
}
return *o.DiskEncryptionType
}
// GetDiskEncryptionTypeOk returns a tuple with the DiskEncryptionType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetDiskEncryptionTypeOk() (*string, bool) {
if o == nil || o.DiskEncryptionType == nil {
return nil, false
}
return o.DiskEncryptionType, true
}
// HasDiskEncryptionType returns a boolean if a field has been set.
func (o *DeviceProfile) HasDiskEncryptionType() bool {
if o != nil && o.DiskEncryptionType != nil {
return true
}
return false
}
// SetDiskEncryptionType gets a reference to the given string and assigns it to the DiskEncryptionType field.
func (o *DeviceProfile) SetDiskEncryptionType(v string) {
o.DiskEncryptionType = &v
}
// GetDisplayName returns the DisplayName field value
func (o *DeviceProfile) GetDisplayName() string {
if o == nil {
var ret string
return ret
}
return o.DisplayName
}
// GetDisplayNameOk returns a tuple with the DisplayName field value
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetDisplayNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DisplayName, true
}
// SetDisplayName sets field value
func (o *DeviceProfile) SetDisplayName(v string) {
o.DisplayName = v
}
// GetImei returns the Imei field value if set, zero value otherwise.
func (o *DeviceProfile) GetImei() string {
if o == nil || o.Imei == nil {
var ret string
return ret
}
return *o.Imei
}
// GetImeiOk returns a tuple with the Imei field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetImeiOk() (*string, bool) {
if o == nil || o.Imei == nil {
return nil, false
}
return o.Imei, true
}
// HasImei returns a boolean if a field has been set.
func (o *DeviceProfile) HasImei() bool {
if o != nil && o.Imei != nil {
return true
}
return false
}
// SetImei gets a reference to the given string and assigns it to the Imei field.
func (o *DeviceProfile) SetImei(v string) {
o.Imei = &v
}
// GetIntegrityJailbreak returns the IntegrityJailbreak field value if set, zero value otherwise.
func (o *DeviceProfile) GetIntegrityJailbreak() bool {
if o == nil || o.IntegrityJailbreak == nil {
var ret bool
return ret
}
return *o.IntegrityJailbreak
}
// GetIntegrityJailbreakOk returns a tuple with the IntegrityJailbreak field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetIntegrityJailbreakOk() (*bool, bool) {
if o == nil || o.IntegrityJailbreak == nil {
return nil, false
}
return o.IntegrityJailbreak, true
}
// HasIntegrityJailbreak returns a boolean if a field has been set.
func (o *DeviceProfile) HasIntegrityJailbreak() bool {
if o != nil && o.IntegrityJailbreak != nil {
return true
}
return false
}
// SetIntegrityJailbreak gets a reference to the given bool and assigns it to the IntegrityJailbreak field.
func (o *DeviceProfile) SetIntegrityJailbreak(v bool) {
o.IntegrityJailbreak = &v
}
// GetManufacturer returns the Manufacturer field value if set, zero value otherwise.
func (o *DeviceProfile) GetManufacturer() string {
if o == nil || o.Manufacturer == nil {
var ret string
return ret
}
return *o.Manufacturer
}
// GetManufacturerOk returns a tuple with the Manufacturer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetManufacturerOk() (*string, bool) {
if o == nil || o.Manufacturer == nil {
return nil, false
}
return o.Manufacturer, true
}
// HasManufacturer returns a boolean if a field has been set.
func (o *DeviceProfile) HasManufacturer() bool {
if o != nil && o.Manufacturer != nil {
return true
}
return false
}
// SetManufacturer gets a reference to the given string and assigns it to the Manufacturer field.
func (o *DeviceProfile) SetManufacturer(v string) {
o.Manufacturer = &v
}
// GetMeid returns the Meid field value if set, zero value otherwise.
func (o *DeviceProfile) GetMeid() string {
if o == nil || o.Meid == nil {
var ret string
return ret
}
return *o.Meid
}
// GetMeidOk returns a tuple with the Meid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetMeidOk() (*string, bool) {
if o == nil || o.Meid == nil {
return nil, false
}
return o.Meid, true
}
// HasMeid returns a boolean if a field has been set.
func (o *DeviceProfile) HasMeid() bool {
if o != nil && o.Meid != nil {
return true
}
return false
}
// SetMeid gets a reference to the given string and assigns it to the Meid field.
func (o *DeviceProfile) SetMeid(v string) {
o.Meid = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *DeviceProfile) GetModel() string {
if o == nil || o.Model == nil {
var ret string
return ret
}
return *o.Model
}
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetModelOk() (*string, bool) {
if o == nil || o.Model == nil {
return nil, false
}
return o.Model, true
}
// HasModel returns a boolean if a field has been set.
func (o *DeviceProfile) HasModel() bool {
if o != nil && o.Model != nil {
return true
}
return false
}
// SetModel gets a reference to the given string and assigns it to the Model field.
func (o *DeviceProfile) SetModel(v string) {
o.Model = &v
}
// GetOsVersion returns the OsVersion field value if set, zero value otherwise.
func (o *DeviceProfile) GetOsVersion() string {
if o == nil || o.OsVersion == nil {
var ret string
return ret
}
return *o.OsVersion
}
// GetOsVersionOk returns a tuple with the OsVersion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetOsVersionOk() (*string, bool) {
if o == nil || o.OsVersion == nil {
return nil, false
}
return o.OsVersion, true
}
// HasOsVersion returns a boolean if a field has been set.
func (o *DeviceProfile) HasOsVersion() bool {
if o != nil && o.OsVersion != nil {
return true
}
return false
}
// SetOsVersion gets a reference to the given string and assigns it to the OsVersion field.
func (o *DeviceProfile) SetOsVersion(v string) {
o.OsVersion = &v
}
// GetPlatform returns the Platform field value
func (o *DeviceProfile) GetPlatform() string {
if o == nil {
var ret string
return ret
}
return o.Platform
}
// GetPlatformOk returns a tuple with the Platform field value
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetPlatformOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Platform, true
}
// SetPlatform sets field value
func (o *DeviceProfile) SetPlatform(v string) {
o.Platform = v
}
// GetRegistered returns the Registered field value
func (o *DeviceProfile) GetRegistered() bool {
if o == nil {
var ret bool
return ret
}
return o.Registered
}
// GetRegisteredOk returns a tuple with the Registered field value
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetRegisteredOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Registered, true
}
// SetRegistered sets field value
func (o *DeviceProfile) SetRegistered(v bool) {
o.Registered = v
}
// GetSecureHardwarePresent returns the SecureHardwarePresent field value if set, zero value otherwise.
func (o *DeviceProfile) GetSecureHardwarePresent() bool {
if o == nil || o.SecureHardwarePresent == nil {
var ret bool
return ret
}
return *o.SecureHardwarePresent
}
// GetSecureHardwarePresentOk returns a tuple with the SecureHardwarePresent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetSecureHardwarePresentOk() (*bool, bool) {
if o == nil || o.SecureHardwarePresent == nil {
return nil, false
}
return o.SecureHardwarePresent, true
}
// HasSecureHardwarePresent returns a boolean if a field has been set.
func (o *DeviceProfile) HasSecureHardwarePresent() bool {
if o != nil && o.SecureHardwarePresent != nil {
return true
}
return false
}
// SetSecureHardwarePresent gets a reference to the given bool and assigns it to the SecureHardwarePresent field.
func (o *DeviceProfile) SetSecureHardwarePresent(v bool) {
o.SecureHardwarePresent = &v
}
// GetSerialNumber returns the SerialNumber field value if set, zero value otherwise.
func (o *DeviceProfile) GetSerialNumber() string {
if o == nil || o.SerialNumber == nil {
var ret string
return ret
}
return *o.SerialNumber
}
// GetSerialNumberOk returns a tuple with the SerialNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetSerialNumberOk() (*string, bool) {
if o == nil || o.SerialNumber == nil {
return nil, false
}
return o.SerialNumber, true
}
// HasSerialNumber returns a boolean if a field has been set.
func (o *DeviceProfile) HasSerialNumber() bool {
if o != nil && o.SerialNumber != nil {
return true
}
return false
}
// SetSerialNumber gets a reference to the given string and assigns it to the SerialNumber field.
func (o *DeviceProfile) SetSerialNumber(v string) {
o.SerialNumber = &v
}
// GetSid returns the Sid field value if set, zero value otherwise.
func (o *DeviceProfile) GetSid() string {
if o == nil || o.Sid == nil {
var ret string
return ret
}
return *o.Sid
}
// GetSidOk returns a tuple with the Sid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetSidOk() (*string, bool) {
if o == nil || o.Sid == nil {
return nil, false
}
return o.Sid, true
}
// HasSid returns a boolean if a field has been set.
func (o *DeviceProfile) HasSid() bool {
if o != nil && o.Sid != nil {
return true
}
return false
}
// SetSid gets a reference to the given string and assigns it to the Sid field.
func (o *DeviceProfile) SetSid(v string) {
o.Sid = &v
}
// GetTpmPublicKeyHash returns the TpmPublicKeyHash field value if set, zero value otherwise.
func (o *DeviceProfile) GetTpmPublicKeyHash() string {
if o == nil || o.TpmPublicKeyHash == nil {
var ret string
return ret
}
return *o.TpmPublicKeyHash
}
// GetTpmPublicKeyHashOk returns a tuple with the TpmPublicKeyHash field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetTpmPublicKeyHashOk() (*string, bool) {
if o == nil || o.TpmPublicKeyHash == nil {
return nil, false
}
return o.TpmPublicKeyHash, true
}
// HasTpmPublicKeyHash returns a boolean if a field has been set.
func (o *DeviceProfile) HasTpmPublicKeyHash() bool {
if o != nil && o.TpmPublicKeyHash != nil {
return true
}
return false
}
// SetTpmPublicKeyHash gets a reference to the given string and assigns it to the TpmPublicKeyHash field.
func (o *DeviceProfile) SetTpmPublicKeyHash(v string) {
o.TpmPublicKeyHash = &v
}
// GetUdid returns the Udid field value if set, zero value otherwise.
func (o *DeviceProfile) GetUdid() string {
if o == nil || o.Udid == nil {
var ret string
return ret
}
return *o.Udid
}
// GetUdidOk returns a tuple with the Udid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeviceProfile) GetUdidOk() (*string, bool) {
if o == nil || o.Udid == nil {
return nil, false
}
return o.Udid, true
}
// HasUdid returns a boolean if a field has been set.
func (o *DeviceProfile) HasUdid() bool {
if o != nil && o.Udid != nil {
return true
}
return false
}
// SetUdid gets a reference to the given string and assigns it to the Udid field.
func (o *DeviceProfile) SetUdid(v string) {
o.Udid = &v
}
func (o DeviceProfile) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.DiskEncryptionType != nil {
toSerialize["diskEncryptionType"] = o.DiskEncryptionType
}
if true {
toSerialize["displayName"] = o.DisplayName
}
if o.Imei != nil {
toSerialize["imei"] = o.Imei
}
if o.IntegrityJailbreak != nil {
toSerialize["integrityJailbreak"] = o.IntegrityJailbreak
}
if o.Manufacturer != nil {
toSerialize["manufacturer"] = o.Manufacturer
}
if o.Meid != nil {
toSerialize["meid"] = o.Meid
}
if o.Model != nil {
toSerialize["model"] = o.Model
}
if o.OsVersion != nil {
toSerialize["osVersion"] = o.OsVersion
}
if true {
toSerialize["platform"] = o.Platform
}
if true {
toSerialize["registered"] = o.Registered
}
if o.SecureHardwarePresent != nil {
toSerialize["secureHardwarePresent"] = o.SecureHardwarePresent
}
if o.SerialNumber != nil {
toSerialize["serialNumber"] = o.SerialNumber
}
if o.Sid != nil {
toSerialize["sid"] = o.Sid
}
if o.TpmPublicKeyHash != nil {
toSerialize["tpmPublicKeyHash"] = o.TpmPublicKeyHash
}
if o.Udid != nil {
toSerialize["udid"] = o.Udid
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *DeviceProfile) UnmarshalJSON(bytes []byte) (err error) {
varDeviceProfile := _DeviceProfile{}
err = json.Unmarshal(bytes, &varDeviceProfile)
if err == nil {
*o = DeviceProfile(varDeviceProfile)
} else {
return err
}
additionalProperties := make(map[string]interface{})
err = json.Unmarshal(bytes, &additionalProperties)
if err == nil {
delete(additionalProperties, "diskEncryptionType")
delete(additionalProperties, "displayName")
delete(additionalProperties, "imei")
delete(additionalProperties, "integrityJailbreak")
delete(additionalProperties, "manufacturer")
delete(additionalProperties, "meid")
delete(additionalProperties, "model")
delete(additionalProperties, "osVersion")
delete(additionalProperties, "platform")
delete(additionalProperties, "registered")
delete(additionalProperties, "secureHardwarePresent")
delete(additionalProperties, "serialNumber")
delete(additionalProperties, "sid")
delete(additionalProperties, "tpmPublicKeyHash")
delete(additionalProperties, "udid")
o.AdditionalProperties = additionalProperties
} else {
return err
}
return err
}
type NullableDeviceProfile struct {
value *DeviceProfile
isSet bool
}
func (v NullableDeviceProfile) Get() *DeviceProfile {
return v.value
}
func (v *NullableDeviceProfile) Set(val *DeviceProfile) {
v.value = val
v.isSet = true
}
func (v NullableDeviceProfile) IsSet() bool {
return v.isSet
}
func (v *NullableDeviceProfile) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeviceProfile(val *DeviceProfile) *NullableDeviceProfile {
return &NullableDeviceProfile{value: val, isSet: true}
}
func (v NullableDeviceProfile) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeviceProfile) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}