-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_data_aggregated.go
772 lines (650 loc) · 21 KB
/
model_data_aggregated.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
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
/*
Eliona REST API
The Eliona REST API enables unified access to the resources and data of an Eliona environment.
API version: 2.8.1
Contact: hello@eliona.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"bytes"
"encoding/json"
"fmt"
"time"
)
// checks if the DataAggregated type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DataAggregated{}
// DataAggregated Aggregated data combines multiple data points for a periodical raster
type DataAggregated struct {
// ID of the aggregation
AggregationId *int32 `json:"aggregationId,omitempty"`
// ID of the corresponding asset
AssetId int32 `json:"assetId"`
Subtype DataSubtype `json:"subtype"`
// Name of the attribute which holds the data points
Attribute *string `json:"attribute,omitempty"`
// Calculation intervals.
Raster string `json:"raster"`
// Timestamp of this aggregated data set. The timestamp when the timeslot based on raster starts.
Timestamp NullableTime `json:"timestamp,omitempty"`
// Count of data points in this aggregated data set
Count NullableFloat64 `json:"count,omitempty"`
// Average of all data points for this aggregated data set
Average NullableFloat64 `json:"average,omitempty"`
// Sum of all data points for this aggregated data set
Sum NullableFloat64 `json:"sum,omitempty"`
// First data point in this aggregated data set
First NullableFloat64 `json:"first,omitempty"`
// Data point with the most minimal value in this aggregated data set
Min NullableFloat64 `json:"min,omitempty"`
// Data point with the most maximal value in this aggregated data set
Max NullableFloat64 `json:"max,omitempty"`
// Latest data point in this aggregated data set
Last NullableFloat64 `json:"last,omitempty"`
// Timestamp of the latest data point
LastTimestamp NullableTime `json:"lastTimestamp,omitempty"`
// The name of the corresponding asset type
AssetTypeName NullableString `json:"assetTypeName,omitempty"`
}
type _DataAggregated DataAggregated
// NewDataAggregated instantiates a new DataAggregated 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 NewDataAggregated(assetId int32, subtype DataSubtype, raster string) *DataAggregated {
this := DataAggregated{}
this.AssetId = assetId
this.Subtype = subtype
this.Raster = raster
return &this
}
// NewDataAggregatedWithDefaults instantiates a new DataAggregated 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 NewDataAggregatedWithDefaults() *DataAggregated {
this := DataAggregated{}
var subtype DataSubtype = SUBTYPE_INPUT
this.Subtype = subtype
return &this
}
// GetAggregationId returns the AggregationId field value if set, zero value otherwise.
func (o *DataAggregated) GetAggregationId() int32 {
if o == nil || IsNil(o.AggregationId) {
var ret int32
return ret
}
return *o.AggregationId
}
// GetAggregationIdOk returns a tuple with the AggregationId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataAggregated) GetAggregationIdOk() (*int32, bool) {
if o == nil || IsNil(o.AggregationId) {
return nil, false
}
return o.AggregationId, true
}
// HasAggregationId returns a boolean if a field has been set.
func (o *DataAggregated) HasAggregationId() bool {
if o != nil && !IsNil(o.AggregationId) {
return true
}
return false
}
// SetAggregationId gets a reference to the given int32 and assigns it to the AggregationId field.
func (o *DataAggregated) SetAggregationId(v int32) {
o.AggregationId = &v
}
// GetAssetId returns the AssetId field value
func (o *DataAggregated) GetAssetId() int32 {
if o == nil {
var ret int32
return ret
}
return o.AssetId
}
// GetAssetIdOk returns a tuple with the AssetId field value
// and a boolean to check if the value has been set.
func (o *DataAggregated) GetAssetIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.AssetId, true
}
// SetAssetId sets field value
func (o *DataAggregated) SetAssetId(v int32) {
o.AssetId = v
}
// GetSubtype returns the Subtype field value
func (o *DataAggregated) GetSubtype() DataSubtype {
if o == nil {
var ret DataSubtype
return ret
}
return o.Subtype
}
// GetSubtypeOk returns a tuple with the Subtype field value
// and a boolean to check if the value has been set.
func (o *DataAggregated) GetSubtypeOk() (*DataSubtype, bool) {
if o == nil {
return nil, false
}
return &o.Subtype, true
}
// SetSubtype sets field value
func (o *DataAggregated) SetSubtype(v DataSubtype) {
o.Subtype = v
}
// GetAttribute returns the Attribute field value if set, zero value otherwise.
func (o *DataAggregated) GetAttribute() string {
if o == nil || IsNil(o.Attribute) {
var ret string
return ret
}
return *o.Attribute
}
// GetAttributeOk returns a tuple with the Attribute field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataAggregated) GetAttributeOk() (*string, bool) {
if o == nil || IsNil(o.Attribute) {
return nil, false
}
return o.Attribute, true
}
// HasAttribute returns a boolean if a field has been set.
func (o *DataAggregated) HasAttribute() bool {
if o != nil && !IsNil(o.Attribute) {
return true
}
return false
}
// SetAttribute gets a reference to the given string and assigns it to the Attribute field.
func (o *DataAggregated) SetAttribute(v string) {
o.Attribute = &v
}
// GetRaster returns the Raster field value
func (o *DataAggregated) GetRaster() string {
if o == nil {
var ret string
return ret
}
return o.Raster
}
// GetRasterOk returns a tuple with the Raster field value
// and a boolean to check if the value has been set.
func (o *DataAggregated) GetRasterOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Raster, true
}
// SetRaster sets field value
func (o *DataAggregated) SetRaster(v string) {
o.Raster = v
}
// GetTimestamp returns the Timestamp field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetTimestamp() time.Time {
if o == nil || IsNil(o.Timestamp.Get()) {
var ret time.Time
return ret
}
return *o.Timestamp.Get()
}
// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetTimestampOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.Timestamp.Get(), o.Timestamp.IsSet()
}
// HasTimestamp returns a boolean if a field has been set.
func (o *DataAggregated) HasTimestamp() bool {
if o != nil && o.Timestamp.IsSet() {
return true
}
return false
}
// SetTimestamp gets a reference to the given NullableTime and assigns it to the Timestamp field.
func (o *DataAggregated) SetTimestamp(v time.Time) {
o.Timestamp.Set(&v)
}
// SetTimestampNil sets the value for Timestamp to be an explicit nil
func (o *DataAggregated) SetTimestampNil() {
o.Timestamp.Set(nil)
}
// UnsetTimestamp ensures that no value is present for Timestamp, not even an explicit nil
func (o *DataAggregated) UnsetTimestamp() {
o.Timestamp.Unset()
}
// GetCount returns the Count field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetCount() float64 {
if o == nil || IsNil(o.Count.Get()) {
var ret float64
return ret
}
return *o.Count.Get()
}
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetCountOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.Count.Get(), o.Count.IsSet()
}
// HasCount returns a boolean if a field has been set.
func (o *DataAggregated) HasCount() bool {
if o != nil && o.Count.IsSet() {
return true
}
return false
}
// SetCount gets a reference to the given NullableFloat64 and assigns it to the Count field.
func (o *DataAggregated) SetCount(v float64) {
o.Count.Set(&v)
}
// SetCountNil sets the value for Count to be an explicit nil
func (o *DataAggregated) SetCountNil() {
o.Count.Set(nil)
}
// UnsetCount ensures that no value is present for Count, not even an explicit nil
func (o *DataAggregated) UnsetCount() {
o.Count.Unset()
}
// GetAverage returns the Average field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetAverage() float64 {
if o == nil || IsNil(o.Average.Get()) {
var ret float64
return ret
}
return *o.Average.Get()
}
// GetAverageOk returns a tuple with the Average field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetAverageOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.Average.Get(), o.Average.IsSet()
}
// HasAverage returns a boolean if a field has been set.
func (o *DataAggregated) HasAverage() bool {
if o != nil && o.Average.IsSet() {
return true
}
return false
}
// SetAverage gets a reference to the given NullableFloat64 and assigns it to the Average field.
func (o *DataAggregated) SetAverage(v float64) {
o.Average.Set(&v)
}
// SetAverageNil sets the value for Average to be an explicit nil
func (o *DataAggregated) SetAverageNil() {
o.Average.Set(nil)
}
// UnsetAverage ensures that no value is present for Average, not even an explicit nil
func (o *DataAggregated) UnsetAverage() {
o.Average.Unset()
}
// GetSum returns the Sum field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetSum() float64 {
if o == nil || IsNil(o.Sum.Get()) {
var ret float64
return ret
}
return *o.Sum.Get()
}
// GetSumOk returns a tuple with the Sum field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetSumOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.Sum.Get(), o.Sum.IsSet()
}
// HasSum returns a boolean if a field has been set.
func (o *DataAggregated) HasSum() bool {
if o != nil && o.Sum.IsSet() {
return true
}
return false
}
// SetSum gets a reference to the given NullableFloat64 and assigns it to the Sum field.
func (o *DataAggregated) SetSum(v float64) {
o.Sum.Set(&v)
}
// SetSumNil sets the value for Sum to be an explicit nil
func (o *DataAggregated) SetSumNil() {
o.Sum.Set(nil)
}
// UnsetSum ensures that no value is present for Sum, not even an explicit nil
func (o *DataAggregated) UnsetSum() {
o.Sum.Unset()
}
// GetFirst returns the First field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetFirst() float64 {
if o == nil || IsNil(o.First.Get()) {
var ret float64
return ret
}
return *o.First.Get()
}
// GetFirstOk returns a tuple with the First field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetFirstOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.First.Get(), o.First.IsSet()
}
// HasFirst returns a boolean if a field has been set.
func (o *DataAggregated) HasFirst() bool {
if o != nil && o.First.IsSet() {
return true
}
return false
}
// SetFirst gets a reference to the given NullableFloat64 and assigns it to the First field.
func (o *DataAggregated) SetFirst(v float64) {
o.First.Set(&v)
}
// SetFirstNil sets the value for First to be an explicit nil
func (o *DataAggregated) SetFirstNil() {
o.First.Set(nil)
}
// UnsetFirst ensures that no value is present for First, not even an explicit nil
func (o *DataAggregated) UnsetFirst() {
o.First.Unset()
}
// GetMin returns the Min field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetMin() float64 {
if o == nil || IsNil(o.Min.Get()) {
var ret float64
return ret
}
return *o.Min.Get()
}
// GetMinOk returns a tuple with the Min field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetMinOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.Min.Get(), o.Min.IsSet()
}
// HasMin returns a boolean if a field has been set.
func (o *DataAggregated) HasMin() bool {
if o != nil && o.Min.IsSet() {
return true
}
return false
}
// SetMin gets a reference to the given NullableFloat64 and assigns it to the Min field.
func (o *DataAggregated) SetMin(v float64) {
o.Min.Set(&v)
}
// SetMinNil sets the value for Min to be an explicit nil
func (o *DataAggregated) SetMinNil() {
o.Min.Set(nil)
}
// UnsetMin ensures that no value is present for Min, not even an explicit nil
func (o *DataAggregated) UnsetMin() {
o.Min.Unset()
}
// GetMax returns the Max field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetMax() float64 {
if o == nil || IsNil(o.Max.Get()) {
var ret float64
return ret
}
return *o.Max.Get()
}
// GetMaxOk returns a tuple with the Max field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetMaxOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.Max.Get(), o.Max.IsSet()
}
// HasMax returns a boolean if a field has been set.
func (o *DataAggregated) HasMax() bool {
if o != nil && o.Max.IsSet() {
return true
}
return false
}
// SetMax gets a reference to the given NullableFloat64 and assigns it to the Max field.
func (o *DataAggregated) SetMax(v float64) {
o.Max.Set(&v)
}
// SetMaxNil sets the value for Max to be an explicit nil
func (o *DataAggregated) SetMaxNil() {
o.Max.Set(nil)
}
// UnsetMax ensures that no value is present for Max, not even an explicit nil
func (o *DataAggregated) UnsetMax() {
o.Max.Unset()
}
// GetLast returns the Last field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetLast() float64 {
if o == nil || IsNil(o.Last.Get()) {
var ret float64
return ret
}
return *o.Last.Get()
}
// GetLastOk returns a tuple with the Last field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetLastOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.Last.Get(), o.Last.IsSet()
}
// HasLast returns a boolean if a field has been set.
func (o *DataAggregated) HasLast() bool {
if o != nil && o.Last.IsSet() {
return true
}
return false
}
// SetLast gets a reference to the given NullableFloat64 and assigns it to the Last field.
func (o *DataAggregated) SetLast(v float64) {
o.Last.Set(&v)
}
// SetLastNil sets the value for Last to be an explicit nil
func (o *DataAggregated) SetLastNil() {
o.Last.Set(nil)
}
// UnsetLast ensures that no value is present for Last, not even an explicit nil
func (o *DataAggregated) UnsetLast() {
o.Last.Unset()
}
// GetLastTimestamp returns the LastTimestamp field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetLastTimestamp() time.Time {
if o == nil || IsNil(o.LastTimestamp.Get()) {
var ret time.Time
return ret
}
return *o.LastTimestamp.Get()
}
// GetLastTimestampOk returns a tuple with the LastTimestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetLastTimestampOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.LastTimestamp.Get(), o.LastTimestamp.IsSet()
}
// HasLastTimestamp returns a boolean if a field has been set.
func (o *DataAggregated) HasLastTimestamp() bool {
if o != nil && o.LastTimestamp.IsSet() {
return true
}
return false
}
// SetLastTimestamp gets a reference to the given NullableTime and assigns it to the LastTimestamp field.
func (o *DataAggregated) SetLastTimestamp(v time.Time) {
o.LastTimestamp.Set(&v)
}
// SetLastTimestampNil sets the value for LastTimestamp to be an explicit nil
func (o *DataAggregated) SetLastTimestampNil() {
o.LastTimestamp.Set(nil)
}
// UnsetLastTimestamp ensures that no value is present for LastTimestamp, not even an explicit nil
func (o *DataAggregated) UnsetLastTimestamp() {
o.LastTimestamp.Unset()
}
// GetAssetTypeName returns the AssetTypeName field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DataAggregated) GetAssetTypeName() string {
if o == nil || IsNil(o.AssetTypeName.Get()) {
var ret string
return ret
}
return *o.AssetTypeName.Get()
}
// GetAssetTypeNameOk returns a tuple with the AssetTypeName field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DataAggregated) GetAssetTypeNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AssetTypeName.Get(), o.AssetTypeName.IsSet()
}
// HasAssetTypeName returns a boolean if a field has been set.
func (o *DataAggregated) HasAssetTypeName() bool {
if o != nil && o.AssetTypeName.IsSet() {
return true
}
return false
}
// SetAssetTypeName gets a reference to the given NullableString and assigns it to the AssetTypeName field.
func (o *DataAggregated) SetAssetTypeName(v string) {
o.AssetTypeName.Set(&v)
}
// SetAssetTypeNameNil sets the value for AssetTypeName to be an explicit nil
func (o *DataAggregated) SetAssetTypeNameNil() {
o.AssetTypeName.Set(nil)
}
// UnsetAssetTypeName ensures that no value is present for AssetTypeName, not even an explicit nil
func (o *DataAggregated) UnsetAssetTypeName() {
o.AssetTypeName.Unset()
}
func (o DataAggregated) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DataAggregated) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AggregationId) {
toSerialize["aggregationId"] = o.AggregationId
}
toSerialize["assetId"] = o.AssetId
toSerialize["subtype"] = o.Subtype
if !IsNil(o.Attribute) {
toSerialize["attribute"] = o.Attribute
}
toSerialize["raster"] = o.Raster
if o.Timestamp.IsSet() {
toSerialize["timestamp"] = o.Timestamp.Get()
}
if o.Count.IsSet() {
toSerialize["count"] = o.Count.Get()
}
if o.Average.IsSet() {
toSerialize["average"] = o.Average.Get()
}
if o.Sum.IsSet() {
toSerialize["sum"] = o.Sum.Get()
}
if o.First.IsSet() {
toSerialize["first"] = o.First.Get()
}
if o.Min.IsSet() {
toSerialize["min"] = o.Min.Get()
}
if o.Max.IsSet() {
toSerialize["max"] = o.Max.Get()
}
if o.Last.IsSet() {
toSerialize["last"] = o.Last.Get()
}
if o.LastTimestamp.IsSet() {
toSerialize["lastTimestamp"] = o.LastTimestamp.Get()
}
if o.AssetTypeName.IsSet() {
toSerialize["assetTypeName"] = o.AssetTypeName.Get()
}
return toSerialize, nil
}
func (o *DataAggregated) 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{
"assetId",
"subtype",
"raster",
}
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)
}
}
varDataAggregated := _DataAggregated{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varDataAggregated)
if err != nil {
return err
}
*o = DataAggregated(varDataAggregated)
return err
}
type NullableDataAggregated struct {
value *DataAggregated
isSet bool
}
func (v NullableDataAggregated) Get() *DataAggregated {
return v.value
}
func (v *NullableDataAggregated) Set(val *DataAggregated) {
v.value = val
v.isSet = true
}
func (v NullableDataAggregated) IsSet() bool {
return v.isSet
}
func (v *NullableDataAggregated) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDataAggregated(val *DataAggregated) *NullableDataAggregated {
return &NullableDataAggregated{value: val, isSet: true}
}
func (v NullableDataAggregated) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDataAggregated) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}