-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_asset_type_attribute.go
1116 lines (946 loc) · 31.5 KB
/
model_asset_type_attribute.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
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
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
Eliona REST API
The Eliona REST API enables unified access to the resources and data of an Eliona environment.
API version: 2.7.3
Contact: hello@eliona.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"bytes"
"encoding/json"
"fmt"
)
// checks if the AssetTypeAttribute type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AssetTypeAttribute{}
// AssetTypeAttribute Named attribute to store data of assets
type AssetTypeAttribute struct {
// The unique name for the asset type
AssetTypeName NullableString `json:"assetTypeName,omitempty"`
// Unique key of asset data
Name string `json:"name"`
Subtype DataSubtype `json:"subtype"`
// Name of the type for this attribute: air_quality, battery-voltage, brightness, co2, current, device-info, device-status, energy, flow, frequency, humidity, inputs-and-switches, level, motion, operating-status, people-count, power, presence, pressure, temperature, vehicle-detector, voltage, weather, voc
Type NullableString `json:"type,omitempty"`
// Is data active or not
Enable *bool `json:"enable,omitempty"`
Translation NullableTranslation `json:"translation,omitempty"`
// Physical unit of numeric data
Unit NullableString `json:"unit,omitempty"`
// Number of decimal places
Precision NullableInt64 `json:"precision,omitempty"`
// Lower limit
Min NullableFloat64 `json:"min,omitempty"`
// Upper limit
Max NullableFloat64 `json:"max,omitempty"`
// Aggregation calculation mode
AggregationMode NullableString `json:"aggregationMode,omitempty"`
AggregationRasters []string `json:"aggregationRasters,omitempty"`
// Should the attribute be displayed in viewer
Viewer NullableBool `json:"viewer,omitempty"`
// Should the attribute be displayed in AR
Ar NullableBool `json:"ar,omitempty"`
// Sequence in AR display
Sequence NullableInt64 `json:"sequence,omitempty"`
// Is the attribute virtual or not
Virtual NullableBool `json:"virtual,omitempty"`
// calculation rule to calculate the value for this attribute
Formula NullableString `json:"formula,omitempty"`
// value scale
Scale NullableFloat32 `json:"scale,omitempty"`
// value scale
Zero NullableFloat32 `json:"zero,omitempty"`
// list of mapping between value and custom text
Map []map[string]interface{} `json:"map,omitempty"`
// source path for attribute value
SourcePath []string `json:"sourcePath,omitempty"`
// is attribute digital
IsDigital NullableBool `json:"isDigital,omitempty"`
}
type _AssetTypeAttribute AssetTypeAttribute
// NewAssetTypeAttribute instantiates a new AssetTypeAttribute 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 NewAssetTypeAttribute(name string, subtype DataSubtype) *AssetTypeAttribute {
this := AssetTypeAttribute{}
this.Name = name
this.Subtype = subtype
var enable bool = true
this.Enable = &enable
var viewer bool = false
this.Viewer = *NewNullableBool(&viewer)
var ar bool = false
this.Ar = *NewNullableBool(&ar)
return &this
}
// NewAssetTypeAttributeWithDefaults instantiates a new AssetTypeAttribute 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 NewAssetTypeAttributeWithDefaults() *AssetTypeAttribute {
this := AssetTypeAttribute{}
var subtype DataSubtype = SUBTYPE_INPUT
this.Subtype = subtype
var enable bool = true
this.Enable = &enable
var viewer bool = false
this.Viewer = *NewNullableBool(&viewer)
var ar bool = false
this.Ar = *NewNullableBool(&ar)
return &this
}
// GetAssetTypeName returns the AssetTypeName field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) 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 *AssetTypeAttribute) 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 *AssetTypeAttribute) 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 *AssetTypeAttribute) SetAssetTypeName(v string) {
o.AssetTypeName.Set(&v)
}
// SetAssetTypeNameNil sets the value for AssetTypeName to be an explicit nil
func (o *AssetTypeAttribute) SetAssetTypeNameNil() {
o.AssetTypeName.Set(nil)
}
// UnsetAssetTypeName ensures that no value is present for AssetTypeName, not even an explicit nil
func (o *AssetTypeAttribute) UnsetAssetTypeName() {
o.AssetTypeName.Unset()
}
// GetName returns the Name field value
func (o *AssetTypeAttribute) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *AssetTypeAttribute) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *AssetTypeAttribute) SetName(v string) {
o.Name = v
}
// GetSubtype returns the Subtype field value
func (o *AssetTypeAttribute) 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 *AssetTypeAttribute) GetSubtypeOk() (*DataSubtype, bool) {
if o == nil {
return nil, false
}
return &o.Subtype, true
}
// SetSubtype sets field value
func (o *AssetTypeAttribute) SetSubtype(v DataSubtype) {
o.Subtype = v
}
// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetType() string {
if o == nil || IsNil(o.Type.Get()) {
var ret string
return ret
}
return *o.Type.Get()
}
// GetTypeOk returns a tuple with the Type 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 *AssetTypeAttribute) GetTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Type.Get(), o.Type.IsSet()
}
// HasType returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasType() bool {
if o != nil && o.Type.IsSet() {
return true
}
return false
}
// SetType gets a reference to the given NullableString and assigns it to the Type field.
func (o *AssetTypeAttribute) SetType(v string) {
o.Type.Set(&v)
}
// SetTypeNil sets the value for Type to be an explicit nil
func (o *AssetTypeAttribute) SetTypeNil() {
o.Type.Set(nil)
}
// UnsetType ensures that no value is present for Type, not even an explicit nil
func (o *AssetTypeAttribute) UnsetType() {
o.Type.Unset()
}
// GetEnable returns the Enable field value if set, zero value otherwise.
func (o *AssetTypeAttribute) GetEnable() bool {
if o == nil || IsNil(o.Enable) {
var ret bool
return ret
}
return *o.Enable
}
// GetEnableOk returns a tuple with the Enable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AssetTypeAttribute) GetEnableOk() (*bool, bool) {
if o == nil || IsNil(o.Enable) {
return nil, false
}
return o.Enable, true
}
// HasEnable returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasEnable() bool {
if o != nil && !IsNil(o.Enable) {
return true
}
return false
}
// SetEnable gets a reference to the given bool and assigns it to the Enable field.
func (o *AssetTypeAttribute) SetEnable(v bool) {
o.Enable = &v
}
// GetTranslation returns the Translation field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetTranslation() Translation {
if o == nil || IsNil(o.Translation.Get()) {
var ret Translation
return ret
}
return *o.Translation.Get()
}
// GetTranslationOk returns a tuple with the Translation 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 *AssetTypeAttribute) GetTranslationOk() (*Translation, bool) {
if o == nil {
return nil, false
}
return o.Translation.Get(), o.Translation.IsSet()
}
// HasTranslation returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasTranslation() bool {
if o != nil && o.Translation.IsSet() {
return true
}
return false
}
// SetTranslation gets a reference to the given NullableTranslation and assigns it to the Translation field.
func (o *AssetTypeAttribute) SetTranslation(v Translation) {
o.Translation.Set(&v)
}
// SetTranslationNil sets the value for Translation to be an explicit nil
func (o *AssetTypeAttribute) SetTranslationNil() {
o.Translation.Set(nil)
}
// UnsetTranslation ensures that no value is present for Translation, not even an explicit nil
func (o *AssetTypeAttribute) UnsetTranslation() {
o.Translation.Unset()
}
// GetUnit returns the Unit field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetUnit() string {
if o == nil || IsNil(o.Unit.Get()) {
var ret string
return ret
}
return *o.Unit.Get()
}
// GetUnitOk returns a tuple with the Unit 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 *AssetTypeAttribute) GetUnitOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Unit.Get(), o.Unit.IsSet()
}
// HasUnit returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasUnit() bool {
if o != nil && o.Unit.IsSet() {
return true
}
return false
}
// SetUnit gets a reference to the given NullableString and assigns it to the Unit field.
func (o *AssetTypeAttribute) SetUnit(v string) {
o.Unit.Set(&v)
}
// SetUnitNil sets the value for Unit to be an explicit nil
func (o *AssetTypeAttribute) SetUnitNil() {
o.Unit.Set(nil)
}
// UnsetUnit ensures that no value is present for Unit, not even an explicit nil
func (o *AssetTypeAttribute) UnsetUnit() {
o.Unit.Unset()
}
// GetPrecision returns the Precision field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetPrecision() int64 {
if o == nil || IsNil(o.Precision.Get()) {
var ret int64
return ret
}
return *o.Precision.Get()
}
// GetPrecisionOk returns a tuple with the Precision 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 *AssetTypeAttribute) GetPrecisionOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.Precision.Get(), o.Precision.IsSet()
}
// HasPrecision returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasPrecision() bool {
if o != nil && o.Precision.IsSet() {
return true
}
return false
}
// SetPrecision gets a reference to the given NullableInt64 and assigns it to the Precision field.
func (o *AssetTypeAttribute) SetPrecision(v int64) {
o.Precision.Set(&v)
}
// SetPrecisionNil sets the value for Precision to be an explicit nil
func (o *AssetTypeAttribute) SetPrecisionNil() {
o.Precision.Set(nil)
}
// UnsetPrecision ensures that no value is present for Precision, not even an explicit nil
func (o *AssetTypeAttribute) UnsetPrecision() {
o.Precision.Unset()
}
// GetMin returns the Min field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) 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 *AssetTypeAttribute) 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 *AssetTypeAttribute) 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 *AssetTypeAttribute) SetMin(v float64) {
o.Min.Set(&v)
}
// SetMinNil sets the value for Min to be an explicit nil
func (o *AssetTypeAttribute) SetMinNil() {
o.Min.Set(nil)
}
// UnsetMin ensures that no value is present for Min, not even an explicit nil
func (o *AssetTypeAttribute) 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 *AssetTypeAttribute) 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 *AssetTypeAttribute) 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 *AssetTypeAttribute) 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 *AssetTypeAttribute) SetMax(v float64) {
o.Max.Set(&v)
}
// SetMaxNil sets the value for Max to be an explicit nil
func (o *AssetTypeAttribute) SetMaxNil() {
o.Max.Set(nil)
}
// UnsetMax ensures that no value is present for Max, not even an explicit nil
func (o *AssetTypeAttribute) UnsetMax() {
o.Max.Unset()
}
// GetAggregationMode returns the AggregationMode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetAggregationMode() string {
if o == nil || IsNil(o.AggregationMode.Get()) {
var ret string
return ret
}
return *o.AggregationMode.Get()
}
// GetAggregationModeOk returns a tuple with the AggregationMode 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 *AssetTypeAttribute) GetAggregationModeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AggregationMode.Get(), o.AggregationMode.IsSet()
}
// HasAggregationMode returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasAggregationMode() bool {
if o != nil && o.AggregationMode.IsSet() {
return true
}
return false
}
// SetAggregationMode gets a reference to the given NullableString and assigns it to the AggregationMode field.
func (o *AssetTypeAttribute) SetAggregationMode(v string) {
o.AggregationMode.Set(&v)
}
// SetAggregationModeNil sets the value for AggregationMode to be an explicit nil
func (o *AssetTypeAttribute) SetAggregationModeNil() {
o.AggregationMode.Set(nil)
}
// UnsetAggregationMode ensures that no value is present for AggregationMode, not even an explicit nil
func (o *AssetTypeAttribute) UnsetAggregationMode() {
o.AggregationMode.Unset()
}
// GetAggregationRasters returns the AggregationRasters field value if set, zero value otherwise.
func (o *AssetTypeAttribute) GetAggregationRasters() []string {
if o == nil || IsNil(o.AggregationRasters) {
var ret []string
return ret
}
return o.AggregationRasters
}
// GetAggregationRastersOk returns a tuple with the AggregationRasters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AssetTypeAttribute) GetAggregationRastersOk() ([]string, bool) {
if o == nil || IsNil(o.AggregationRasters) {
return nil, false
}
return o.AggregationRasters, true
}
// HasAggregationRasters returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasAggregationRasters() bool {
if o != nil && !IsNil(o.AggregationRasters) {
return true
}
return false
}
// SetAggregationRasters gets a reference to the given []string and assigns it to the AggregationRasters field.
func (o *AssetTypeAttribute) SetAggregationRasters(v []string) {
o.AggregationRasters = v
}
// GetViewer returns the Viewer field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetViewer() bool {
if o == nil || IsNil(o.Viewer.Get()) {
var ret bool
return ret
}
return *o.Viewer.Get()
}
// GetViewerOk returns a tuple with the Viewer 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 *AssetTypeAttribute) GetViewerOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.Viewer.Get(), o.Viewer.IsSet()
}
// HasViewer returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasViewer() bool {
if o != nil && o.Viewer.IsSet() {
return true
}
return false
}
// SetViewer gets a reference to the given NullableBool and assigns it to the Viewer field.
func (o *AssetTypeAttribute) SetViewer(v bool) {
o.Viewer.Set(&v)
}
// SetViewerNil sets the value for Viewer to be an explicit nil
func (o *AssetTypeAttribute) SetViewerNil() {
o.Viewer.Set(nil)
}
// UnsetViewer ensures that no value is present for Viewer, not even an explicit nil
func (o *AssetTypeAttribute) UnsetViewer() {
o.Viewer.Unset()
}
// GetAr returns the Ar field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetAr() bool {
if o == nil || IsNil(o.Ar.Get()) {
var ret bool
return ret
}
return *o.Ar.Get()
}
// GetArOk returns a tuple with the Ar 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 *AssetTypeAttribute) GetArOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.Ar.Get(), o.Ar.IsSet()
}
// HasAr returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasAr() bool {
if o != nil && o.Ar.IsSet() {
return true
}
return false
}
// SetAr gets a reference to the given NullableBool and assigns it to the Ar field.
func (o *AssetTypeAttribute) SetAr(v bool) {
o.Ar.Set(&v)
}
// SetArNil sets the value for Ar to be an explicit nil
func (o *AssetTypeAttribute) SetArNil() {
o.Ar.Set(nil)
}
// UnsetAr ensures that no value is present for Ar, not even an explicit nil
func (o *AssetTypeAttribute) UnsetAr() {
o.Ar.Unset()
}
// GetSequence returns the Sequence field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetSequence() int64 {
if o == nil || IsNil(o.Sequence.Get()) {
var ret int64
return ret
}
return *o.Sequence.Get()
}
// GetSequenceOk returns a tuple with the Sequence 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 *AssetTypeAttribute) GetSequenceOk() (*int64, bool) {
if o == nil {
return nil, false
}
return o.Sequence.Get(), o.Sequence.IsSet()
}
// HasSequence returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasSequence() bool {
if o != nil && o.Sequence.IsSet() {
return true
}
return false
}
// SetSequence gets a reference to the given NullableInt64 and assigns it to the Sequence field.
func (o *AssetTypeAttribute) SetSequence(v int64) {
o.Sequence.Set(&v)
}
// SetSequenceNil sets the value for Sequence to be an explicit nil
func (o *AssetTypeAttribute) SetSequenceNil() {
o.Sequence.Set(nil)
}
// UnsetSequence ensures that no value is present for Sequence, not even an explicit nil
func (o *AssetTypeAttribute) UnsetSequence() {
o.Sequence.Unset()
}
// GetVirtual returns the Virtual field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetVirtual() bool {
if o == nil || IsNil(o.Virtual.Get()) {
var ret bool
return ret
}
return *o.Virtual.Get()
}
// GetVirtualOk returns a tuple with the Virtual 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 *AssetTypeAttribute) GetVirtualOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.Virtual.Get(), o.Virtual.IsSet()
}
// HasVirtual returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasVirtual() bool {
if o != nil && o.Virtual.IsSet() {
return true
}
return false
}
// SetVirtual gets a reference to the given NullableBool and assigns it to the Virtual field.
func (o *AssetTypeAttribute) SetVirtual(v bool) {
o.Virtual.Set(&v)
}
// SetVirtualNil sets the value for Virtual to be an explicit nil
func (o *AssetTypeAttribute) SetVirtualNil() {
o.Virtual.Set(nil)
}
// UnsetVirtual ensures that no value is present for Virtual, not even an explicit nil
func (o *AssetTypeAttribute) UnsetVirtual() {
o.Virtual.Unset()
}
// GetFormula returns the Formula field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetFormula() string {
if o == nil || IsNil(o.Formula.Get()) {
var ret string
return ret
}
return *o.Formula.Get()
}
// GetFormulaOk returns a tuple with the Formula 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 *AssetTypeAttribute) GetFormulaOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Formula.Get(), o.Formula.IsSet()
}
// HasFormula returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasFormula() bool {
if o != nil && o.Formula.IsSet() {
return true
}
return false
}
// SetFormula gets a reference to the given NullableString and assigns it to the Formula field.
func (o *AssetTypeAttribute) SetFormula(v string) {
o.Formula.Set(&v)
}
// SetFormulaNil sets the value for Formula to be an explicit nil
func (o *AssetTypeAttribute) SetFormulaNil() {
o.Formula.Set(nil)
}
// UnsetFormula ensures that no value is present for Formula, not even an explicit nil
func (o *AssetTypeAttribute) UnsetFormula() {
o.Formula.Unset()
}
// GetScale returns the Scale field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetScale() float32 {
if o == nil || IsNil(o.Scale.Get()) {
var ret float32
return ret
}
return *o.Scale.Get()
}
// GetScaleOk returns a tuple with the Scale 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 *AssetTypeAttribute) GetScaleOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.Scale.Get(), o.Scale.IsSet()
}
// HasScale returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasScale() bool {
if o != nil && o.Scale.IsSet() {
return true
}
return false
}
// SetScale gets a reference to the given NullableFloat32 and assigns it to the Scale field.
func (o *AssetTypeAttribute) SetScale(v float32) {
o.Scale.Set(&v)
}
// SetScaleNil sets the value for Scale to be an explicit nil
func (o *AssetTypeAttribute) SetScaleNil() {
o.Scale.Set(nil)
}
// UnsetScale ensures that no value is present for Scale, not even an explicit nil
func (o *AssetTypeAttribute) UnsetScale() {
o.Scale.Unset()
}
// GetZero returns the Zero field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetZero() float32 {
if o == nil || IsNil(o.Zero.Get()) {
var ret float32
return ret
}
return *o.Zero.Get()
}
// GetZeroOk returns a tuple with the Zero 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 *AssetTypeAttribute) GetZeroOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.Zero.Get(), o.Zero.IsSet()
}
// HasZero returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasZero() bool {
if o != nil && o.Zero.IsSet() {
return true
}
return false
}
// SetZero gets a reference to the given NullableFloat32 and assigns it to the Zero field.
func (o *AssetTypeAttribute) SetZero(v float32) {
o.Zero.Set(&v)
}
// SetZeroNil sets the value for Zero to be an explicit nil
func (o *AssetTypeAttribute) SetZeroNil() {
o.Zero.Set(nil)
}
// UnsetZero ensures that no value is present for Zero, not even an explicit nil
func (o *AssetTypeAttribute) UnsetZero() {
o.Zero.Unset()
}
// GetMap returns the Map field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetMap() []map[string]interface{} {
if o == nil {
var ret []map[string]interface{}
return ret
}
return o.Map
}
// GetMapOk returns a tuple with the Map 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 *AssetTypeAttribute) GetMapOk() ([]map[string]interface{}, bool) {
if o == nil || IsNil(o.Map) {
return nil, false
}
return o.Map, true
}
// HasMap returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasMap() bool {
if o != nil && IsNil(o.Map) {
return true
}
return false
}
// SetMap gets a reference to the given []map[string]interface{} and assigns it to the Map field.
func (o *AssetTypeAttribute) SetMap(v []map[string]interface{}) {
o.Map = v
}
// GetSourcePath returns the SourcePath field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetSourcePath() []string {
if o == nil {
var ret []string
return ret
}
return o.SourcePath
}
// GetSourcePathOk returns a tuple with the SourcePath 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 *AssetTypeAttribute) GetSourcePathOk() ([]string, bool) {
if o == nil || IsNil(o.SourcePath) {
return nil, false
}
return o.SourcePath, true
}
// HasSourcePath returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasSourcePath() bool {
if o != nil && IsNil(o.SourcePath) {
return true
}
return false
}
// SetSourcePath gets a reference to the given []string and assigns it to the SourcePath field.
func (o *AssetTypeAttribute) SetSourcePath(v []string) {
o.SourcePath = v
}
// GetIsDigital returns the IsDigital field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AssetTypeAttribute) GetIsDigital() bool {
if o == nil || IsNil(o.IsDigital.Get()) {
var ret bool
return ret
}
return *o.IsDigital.Get()
}
// GetIsDigitalOk returns a tuple with the IsDigital 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 *AssetTypeAttribute) GetIsDigitalOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.IsDigital.Get(), o.IsDigital.IsSet()
}
// HasIsDigital returns a boolean if a field has been set.
func (o *AssetTypeAttribute) HasIsDigital() bool {
if o != nil && o.IsDigital.IsSet() {
return true
}
return false
}
// SetIsDigital gets a reference to the given NullableBool and assigns it to the IsDigital field.
func (o *AssetTypeAttribute) SetIsDigital(v bool) {
o.IsDigital.Set(&v)
}
// SetIsDigitalNil sets the value for IsDigital to be an explicit nil
func (o *AssetTypeAttribute) SetIsDigitalNil() {
o.IsDigital.Set(nil)
}
// UnsetIsDigital ensures that no value is present for IsDigital, not even an explicit nil
func (o *AssetTypeAttribute) UnsetIsDigital() {
o.IsDigital.Unset()
}
func (o AssetTypeAttribute) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AssetTypeAttribute) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.AssetTypeName.IsSet() {
toSerialize["assetTypeName"] = o.AssetTypeName.Get()
}
toSerialize["name"] = o.Name
toSerialize["subtype"] = o.Subtype
if o.Type.IsSet() {
toSerialize["type"] = o.Type.Get()
}
if !IsNil(o.Enable) {
toSerialize["enable"] = o.Enable
}
if o.Translation.IsSet() {
toSerialize["translation"] = o.Translation.Get()
}
if o.Unit.IsSet() {
toSerialize["unit"] = o.Unit.Get()
}
if o.Precision.IsSet() {
toSerialize["precision"] = o.Precision.Get()
}
if o.Min.IsSet() {
toSerialize["min"] = o.Min.Get()