Repository navigation
Expand file tree
/
Copy pathmodel_source_device.go
More file actions
835 lines (705 loc) · 20.9 KB
/
Copy pathmodel_source_device.go
File metadata and controls
835 lines (705 loc) · 20.9 KB
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
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
/*
Cloudflare WARP API
Cloudflare WARP Android API contract for version 6.38.9 (build 5641)
API version: 5641
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
"time"
"fmt"
)
// checks if the SourceDevice type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SourceDevice{}
// SourceDevice struct for SourceDevice
type SourceDevice struct {
Created *time.Time `json:"created,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
FcmToken *string `json:"fcm_token,omitempty"`
Id string `json:"id"`
InstallId *string `json:"install_id,omitempty"`
Key *string `json:"key,omitempty"`
Locale *string `json:"locale,omitempty"`
Model *string `json:"model,omitempty"`
Manufacturer *string `json:"manufacturer,omitempty"`
Name *string `json:"name,omitempty"`
OsVersion *string `json:"os_version,omitempty"`
Place *int32 `json:"place,omitempty"`
SerialNumber *string `json:"serial_number,omitempty"`
DeviceId *string `json:"device_id,omitempty"`
Tos *time.Time `json:"tos,omitempty"`
Type *string `json:"type,omitempty"`
Updated *time.Time `json:"updated,omitempty"`
WaitlistEnabled *bool `json:"waitlist_enabled,omitempty"`
WarpEnabled *bool `json:"warp_enabled,omitempty"`
AdditionalProperties map[string]interface{}
}
type _SourceDevice SourceDevice
// NewSourceDevice instantiates a new SourceDevice 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 NewSourceDevice(id string) *SourceDevice {
this := SourceDevice{}
this.Id = id
return &this
}
// NewSourceDeviceWithDefaults instantiates a new SourceDevice 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 NewSourceDeviceWithDefaults() *SourceDevice {
this := SourceDevice{}
return &this
}
// GetCreated returns the Created field value if set, zero value otherwise.
func (o *SourceDevice) GetCreated() time.Time {
if o == nil || IsNil(o.Created) {
var ret time.Time
return ret
}
return *o.Created
}
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetCreatedOk() (*time.Time, bool) {
if o == nil || IsNil(o.Created) {
return nil, false
}
return o.Created, true
}
// HasCreated returns a boolean if a field has been set.
func (o *SourceDevice) HasCreated() bool {
if o != nil && !IsNil(o.Created) {
return true
}
return false
}
// SetCreated gets a reference to the given time.Time and assigns it to the Created field.
func (o *SourceDevice) SetCreated(v time.Time) {
o.Created = &v
}
// GetEnabled returns the Enabled field value if set, zero value otherwise.
func (o *SourceDevice) GetEnabled() bool {
if o == nil || IsNil(o.Enabled) {
var ret bool
return ret
}
return *o.Enabled
}
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.Enabled) {
return nil, false
}
return o.Enabled, true
}
// HasEnabled returns a boolean if a field has been set.
func (o *SourceDevice) HasEnabled() bool {
if o != nil && !IsNil(o.Enabled) {
return true
}
return false
}
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
func (o *SourceDevice) SetEnabled(v bool) {
o.Enabled = &v
}
// GetFcmToken returns the FcmToken field value if set, zero value otherwise.
func (o *SourceDevice) GetFcmToken() string {
if o == nil || IsNil(o.FcmToken) {
var ret string
return ret
}
return *o.FcmToken
}
// GetFcmTokenOk returns a tuple with the FcmToken field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetFcmTokenOk() (*string, bool) {
if o == nil || IsNil(o.FcmToken) {
return nil, false
}
return o.FcmToken, true
}
// HasFcmToken returns a boolean if a field has been set.
func (o *SourceDevice) HasFcmToken() bool {
if o != nil && !IsNil(o.FcmToken) {
return true
}
return false
}
// SetFcmToken gets a reference to the given string and assigns it to the FcmToken field.
func (o *SourceDevice) SetFcmToken(v string) {
o.FcmToken = &v
}
// GetId returns the Id field value
func (o *SourceDevice) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *SourceDevice) SetId(v string) {
o.Id = v
}
// GetInstallId returns the InstallId field value if set, zero value otherwise.
func (o *SourceDevice) GetInstallId() string {
if o == nil || IsNil(o.InstallId) {
var ret string
return ret
}
return *o.InstallId
}
// GetInstallIdOk returns a tuple with the InstallId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetInstallIdOk() (*string, bool) {
if o == nil || IsNil(o.InstallId) {
return nil, false
}
return o.InstallId, true
}
// HasInstallId returns a boolean if a field has been set.
func (o *SourceDevice) HasInstallId() bool {
if o != nil && !IsNil(o.InstallId) {
return true
}
return false
}
// SetInstallId gets a reference to the given string and assigns it to the InstallId field.
func (o *SourceDevice) SetInstallId(v string) {
o.InstallId = &v
}
// GetKey returns the Key field value if set, zero value otherwise.
func (o *SourceDevice) GetKey() string {
if o == nil || IsNil(o.Key) {
var ret string
return ret
}
return *o.Key
}
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetKeyOk() (*string, bool) {
if o == nil || IsNil(o.Key) {
return nil, false
}
return o.Key, true
}
// HasKey returns a boolean if a field has been set.
func (o *SourceDevice) HasKey() bool {
if o != nil && !IsNil(o.Key) {
return true
}
return false
}
// SetKey gets a reference to the given string and assigns it to the Key field.
func (o *SourceDevice) SetKey(v string) {
o.Key = &v
}
// GetLocale returns the Locale field value if set, zero value otherwise.
func (o *SourceDevice) GetLocale() string {
if o == nil || IsNil(o.Locale) {
var ret string
return ret
}
return *o.Locale
}
// GetLocaleOk returns a tuple with the Locale field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetLocaleOk() (*string, bool) {
if o == nil || IsNil(o.Locale) {
return nil, false
}
return o.Locale, true
}
// HasLocale returns a boolean if a field has been set.
func (o *SourceDevice) HasLocale() bool {
if o != nil && !IsNil(o.Locale) {
return true
}
return false
}
// SetLocale gets a reference to the given string and assigns it to the Locale field.
func (o *SourceDevice) SetLocale(v string) {
o.Locale = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *SourceDevice) GetModel() string {
if o == nil || IsNil(o.Model) {
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 *SourceDevice) GetModelOk() (*string, bool) {
if o == nil || IsNil(o.Model) {
return nil, false
}
return o.Model, true
}
// HasModel returns a boolean if a field has been set.
func (o *SourceDevice) HasModel() bool {
if o != nil && !IsNil(o.Model) {
return true
}
return false
}
// SetModel gets a reference to the given string and assigns it to the Model field.
func (o *SourceDevice) SetModel(v string) {
o.Model = &v
}
// GetManufacturer returns the Manufacturer field value if set, zero value otherwise.
func (o *SourceDevice) GetManufacturer() string {
if o == nil || IsNil(o.Manufacturer) {
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 *SourceDevice) GetManufacturerOk() (*string, bool) {
if o == nil || IsNil(o.Manufacturer) {
return nil, false
}
return o.Manufacturer, true
}
// HasManufacturer returns a boolean if a field has been set.
func (o *SourceDevice) HasManufacturer() bool {
if o != nil && !IsNil(o.Manufacturer) {
return true
}
return false
}
// SetManufacturer gets a reference to the given string and assigns it to the Manufacturer field.
func (o *SourceDevice) SetManufacturer(v string) {
o.Manufacturer = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *SourceDevice) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *SourceDevice) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *SourceDevice) SetName(v string) {
o.Name = &v
}
// GetOsVersion returns the OsVersion field value if set, zero value otherwise.
func (o *SourceDevice) GetOsVersion() string {
if o == nil || IsNil(o.OsVersion) {
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 *SourceDevice) GetOsVersionOk() (*string, bool) {
if o == nil || IsNil(o.OsVersion) {
return nil, false
}
return o.OsVersion, true
}
// HasOsVersion returns a boolean if a field has been set.
func (o *SourceDevice) HasOsVersion() bool {
if o != nil && !IsNil(o.OsVersion) {
return true
}
return false
}
// SetOsVersion gets a reference to the given string and assigns it to the OsVersion field.
func (o *SourceDevice) SetOsVersion(v string) {
o.OsVersion = &v
}
// GetPlace returns the Place field value if set, zero value otherwise.
func (o *SourceDevice) GetPlace() int32 {
if o == nil || IsNil(o.Place) {
var ret int32
return ret
}
return *o.Place
}
// GetPlaceOk returns a tuple with the Place field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetPlaceOk() (*int32, bool) {
if o == nil || IsNil(o.Place) {
return nil, false
}
return o.Place, true
}
// HasPlace returns a boolean if a field has been set.
func (o *SourceDevice) HasPlace() bool {
if o != nil && !IsNil(o.Place) {
return true
}
return false
}
// SetPlace gets a reference to the given int32 and assigns it to the Place field.
func (o *SourceDevice) SetPlace(v int32) {
o.Place = &v
}
// GetSerialNumber returns the SerialNumber field value if set, zero value otherwise.
func (o *SourceDevice) GetSerialNumber() string {
if o == nil || IsNil(o.SerialNumber) {
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 *SourceDevice) GetSerialNumberOk() (*string, bool) {
if o == nil || IsNil(o.SerialNumber) {
return nil, false
}
return o.SerialNumber, true
}
// HasSerialNumber returns a boolean if a field has been set.
func (o *SourceDevice) HasSerialNumber() bool {
if o != nil && !IsNil(o.SerialNumber) {
return true
}
return false
}
// SetSerialNumber gets a reference to the given string and assigns it to the SerialNumber field.
func (o *SourceDevice) SetSerialNumber(v string) {
o.SerialNumber = &v
}
// GetDeviceId returns the DeviceId field value if set, zero value otherwise.
func (o *SourceDevice) GetDeviceId() string {
if o == nil || IsNil(o.DeviceId) {
var ret string
return ret
}
return *o.DeviceId
}
// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetDeviceIdOk() (*string, bool) {
if o == nil || IsNil(o.DeviceId) {
return nil, false
}
return o.DeviceId, true
}
// HasDeviceId returns a boolean if a field has been set.
func (o *SourceDevice) HasDeviceId() bool {
if o != nil && !IsNil(o.DeviceId) {
return true
}
return false
}
// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field.
func (o *SourceDevice) SetDeviceId(v string) {
o.DeviceId = &v
}
// GetTos returns the Tos field value if set, zero value otherwise.
func (o *SourceDevice) GetTos() time.Time {
if o == nil || IsNil(o.Tos) {
var ret time.Time
return ret
}
return *o.Tos
}
// GetTosOk returns a tuple with the Tos field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetTosOk() (*time.Time, bool) {
if o == nil || IsNil(o.Tos) {
return nil, false
}
return o.Tos, true
}
// HasTos returns a boolean if a field has been set.
func (o *SourceDevice) HasTos() bool {
if o != nil && !IsNil(o.Tos) {
return true
}
return false
}
// SetTos gets a reference to the given time.Time and assigns it to the Tos field.
func (o *SourceDevice) SetTos(v time.Time) {
o.Tos = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *SourceDevice) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *SourceDevice) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *SourceDevice) SetType(v string) {
o.Type = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise.
func (o *SourceDevice) GetUpdated() time.Time {
if o == nil || IsNil(o.Updated) {
var ret time.Time
return ret
}
return *o.Updated
}
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetUpdatedOk() (*time.Time, bool) {
if o == nil || IsNil(o.Updated) {
return nil, false
}
return o.Updated, true
}
// HasUpdated returns a boolean if a field has been set.
func (o *SourceDevice) HasUpdated() bool {
if o != nil && !IsNil(o.Updated) {
return true
}
return false
}
// SetUpdated gets a reference to the given time.Time and assigns it to the Updated field.
func (o *SourceDevice) SetUpdated(v time.Time) {
o.Updated = &v
}
// GetWaitlistEnabled returns the WaitlistEnabled field value if set, zero value otherwise.
func (o *SourceDevice) GetWaitlistEnabled() bool {
if o == nil || IsNil(o.WaitlistEnabled) {
var ret bool
return ret
}
return *o.WaitlistEnabled
}
// GetWaitlistEnabledOk returns a tuple with the WaitlistEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetWaitlistEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.WaitlistEnabled) {
return nil, false
}
return o.WaitlistEnabled, true
}
// HasWaitlistEnabled returns a boolean if a field has been set.
func (o *SourceDevice) HasWaitlistEnabled() bool {
if o != nil && !IsNil(o.WaitlistEnabled) {
return true
}
return false
}
// SetWaitlistEnabled gets a reference to the given bool and assigns it to the WaitlistEnabled field.
func (o *SourceDevice) SetWaitlistEnabled(v bool) {
o.WaitlistEnabled = &v
}
// GetWarpEnabled returns the WarpEnabled field value if set, zero value otherwise.
func (o *SourceDevice) GetWarpEnabled() bool {
if o == nil || IsNil(o.WarpEnabled) {
var ret bool
return ret
}
return *o.WarpEnabled
}
// GetWarpEnabledOk returns a tuple with the WarpEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SourceDevice) GetWarpEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.WarpEnabled) {
return nil, false
}
return o.WarpEnabled, true
}
// HasWarpEnabled returns a boolean if a field has been set.
func (o *SourceDevice) HasWarpEnabled() bool {
if o != nil && !IsNil(o.WarpEnabled) {
return true
}
return false
}
// SetWarpEnabled gets a reference to the given bool and assigns it to the WarpEnabled field.
func (o *SourceDevice) SetWarpEnabled(v bool) {
o.WarpEnabled = &v
}
func (o SourceDevice) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SourceDevice) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Created) {
toSerialize["created"] = o.Created
}
if !IsNil(o.Enabled) {
toSerialize["enabled"] = o.Enabled
}
if !IsNil(o.FcmToken) {
toSerialize["fcm_token"] = o.FcmToken
}
toSerialize["id"] = o.Id
if !IsNil(o.InstallId) {
toSerialize["install_id"] = o.InstallId
}
if !IsNil(o.Key) {
toSerialize["key"] = o.Key
}
if !IsNil(o.Locale) {
toSerialize["locale"] = o.Locale
}
if !IsNil(o.Model) {
toSerialize["model"] = o.Model
}
if !IsNil(o.Manufacturer) {
toSerialize["manufacturer"] = o.Manufacturer
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.OsVersion) {
toSerialize["os_version"] = o.OsVersion
}
if !IsNil(o.Place) {
toSerialize["place"] = o.Place
}
if !IsNil(o.SerialNumber) {
toSerialize["serial_number"] = o.SerialNumber
}
if !IsNil(o.DeviceId) {
toSerialize["device_id"] = o.DeviceId
}
if !IsNil(o.Tos) {
toSerialize["tos"] = o.Tos
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.Updated) {
toSerialize["updated"] = o.Updated
}
if !IsNil(o.WaitlistEnabled) {
toSerialize["waitlist_enabled"] = o.WaitlistEnabled
}
if !IsNil(o.WarpEnabled) {
toSerialize["warp_enabled"] = o.WarpEnabled
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *SourceDevice) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"id",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varSourceDevice := _SourceDevice{}
err = json.Unmarshal(data, &varSourceDevice)
if err != nil {
return err
}
*o = SourceDevice(varSourceDevice)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "created")
delete(additionalProperties, "enabled")
delete(additionalProperties, "fcm_token")
delete(additionalProperties, "id")
delete(additionalProperties, "install_id")
delete(additionalProperties, "key")
delete(additionalProperties, "locale")
delete(additionalProperties, "model")
delete(additionalProperties, "manufacturer")
delete(additionalProperties, "name")
delete(additionalProperties, "os_version")
delete(additionalProperties, "place")
delete(additionalProperties, "serial_number")
delete(additionalProperties, "device_id")
delete(additionalProperties, "tos")
delete(additionalProperties, "type")
delete(additionalProperties, "updated")
delete(additionalProperties, "waitlist_enabled")
delete(additionalProperties, "warp_enabled")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableSourceDevice struct {
value *SourceDevice
isSet bool
}
func (v NullableSourceDevice) Get() *SourceDevice {
return v.value
}
func (v *NullableSourceDevice) Set(val *SourceDevice) {
v.value = val
v.isSet = true
}
func (v NullableSourceDevice) IsSet() bool {
return v.isSet
}
func (v *NullableSourceDevice) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSourceDevice(val *SourceDevice) *NullableSourceDevice {
return &NullableSourceDevice{value: val, isSet: true}
}
func (v NullableSourceDevice) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSourceDevice) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}