/
model_product.go
913 lines (780 loc) · 23.5 KB
/
model_product.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
/*
* MSX SDK
*
* MSX SDK client.
*
* API version: 1.0.9
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package msxsdk
import (
"encoding/json"
)
// Product struct for Product
type Product struct {
Id *string `json:"id,omitempty"`
Name string `json:"name"`
Label string `json:"label"`
Version int32 `json:"version"`
Description string `json:"description"`
Image string `json:"image"`
MultipleInstanceAllowed *bool `json:"multipleInstanceAllowed,omitempty"`
Price *string `json:"price,omitempty"`
DisplayOrder *int32 `json:"displayOrder,omitempty"`
Active *bool `json:"active,omitempty"`
OrderLimit *int32 `json:"orderLimit,omitempty"`
Options []ServiceElement `json:"options"`
Properties []ServiceElement `json:"properties,omitempty"`
Configuration map[string]string `json:"configuration"`
IsResource bool `json:"isResource"`
HasChildren bool `json:"hasChildren"`
ParentId *string `json:"parentId,omitempty"`
ServiceExtensions *[]NSOConfigDataXPath `json:"serviceExtensions,omitempty"`
ServiceConfigQueryRootXPaths *[]string `json:"serviceConfigQueryRootXPaths,omitempty"`
UiConfig *ServiceUIConfig `json:"uiConfig,omitempty"`
SlmUiConfig NullableServiceSLMUIConfig `json:"slmUiConfig,omitempty"`
ExternalId NullableString `json:"externalId,omitempty"`
Tags []string `json:"tags,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Product Product
// NewProduct instantiates a new Product 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 NewProduct(name string, label string, version int32, description string, image string, options []ServiceElement, configuration map[string]string, isResource bool, hasChildren bool) *Product {
this := Product{}
this.Name = name
this.Label = label
this.Version = version
this.Description = description
this.Image = image
this.Options = options
this.Configuration = configuration
this.IsResource = isResource
this.HasChildren = hasChildren
return &this
}
// NewProductWithDefaults instantiates a new Product 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 NewProductWithDefaults() *Product {
this := Product{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Product) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *Product) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Product) SetId(v string) {
o.Id = &v
}
// GetName returns the Name field value
func (o *Product) 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 *Product) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *Product) SetName(v string) {
o.Name = v
}
// GetLabel returns the Label field value
func (o *Product) GetLabel() string {
if o == nil {
var ret string
return ret
}
return o.Label
}
// GetLabelOk returns a tuple with the Label field value
// and a boolean to check if the value has been set.
func (o *Product) GetLabelOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Label, true
}
// SetLabel sets field value
func (o *Product) SetLabel(v string) {
o.Label = v
}
// GetVersion returns the Version field value
func (o *Product) GetVersion() int32 {
if o == nil {
var ret int32
return ret
}
return o.Version
}
// GetVersionOk returns a tuple with the Version field value
// and a boolean to check if the value has been set.
func (o *Product) GetVersionOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Version, true
}
// SetVersion sets field value
func (o *Product) SetVersion(v int32) {
o.Version = v
}
// GetDescription returns the Description field value
func (o *Product) GetDescription() string {
if o == nil {
var ret string
return ret
}
return o.Description
}
// GetDescriptionOk returns a tuple with the Description field value
// and a boolean to check if the value has been set.
func (o *Product) GetDescriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Description, true
}
// SetDescription sets field value
func (o *Product) SetDescription(v string) {
o.Description = v
}
// GetImage returns the Image field value
func (o *Product) GetImage() string {
if o == nil {
var ret string
return ret
}
return o.Image
}
// GetImageOk returns a tuple with the Image field value
// and a boolean to check if the value has been set.
func (o *Product) GetImageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Image, true
}
// SetImage sets field value
func (o *Product) SetImage(v string) {
o.Image = v
}
// GetMultipleInstanceAllowed returns the MultipleInstanceAllowed field value if set, zero value otherwise.
func (o *Product) GetMultipleInstanceAllowed() bool {
if o == nil || o.MultipleInstanceAllowed == nil {
var ret bool
return ret
}
return *o.MultipleInstanceAllowed
}
// GetMultipleInstanceAllowedOk returns a tuple with the MultipleInstanceAllowed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetMultipleInstanceAllowedOk() (*bool, bool) {
if o == nil || o.MultipleInstanceAllowed == nil {
return nil, false
}
return o.MultipleInstanceAllowed, true
}
// HasMultipleInstanceAllowed returns a boolean if a field has been set.
func (o *Product) HasMultipleInstanceAllowed() bool {
if o != nil && o.MultipleInstanceAllowed != nil {
return true
}
return false
}
// SetMultipleInstanceAllowed gets a reference to the given bool and assigns it to the MultipleInstanceAllowed field.
func (o *Product) SetMultipleInstanceAllowed(v bool) {
o.MultipleInstanceAllowed = &v
}
// GetPrice returns the Price field value if set, zero value otherwise.
func (o *Product) GetPrice() string {
if o == nil || o.Price == nil {
var ret string
return ret
}
return *o.Price
}
// GetPriceOk returns a tuple with the Price field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetPriceOk() (*string, bool) {
if o == nil || o.Price == nil {
return nil, false
}
return o.Price, true
}
// HasPrice returns a boolean if a field has been set.
func (o *Product) HasPrice() bool {
if o != nil && o.Price != nil {
return true
}
return false
}
// SetPrice gets a reference to the given string and assigns it to the Price field.
func (o *Product) SetPrice(v string) {
o.Price = &v
}
// GetDisplayOrder returns the DisplayOrder field value if set, zero value otherwise.
func (o *Product) GetDisplayOrder() int32 {
if o == nil || o.DisplayOrder == nil {
var ret int32
return ret
}
return *o.DisplayOrder
}
// GetDisplayOrderOk returns a tuple with the DisplayOrder field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetDisplayOrderOk() (*int32, bool) {
if o == nil || o.DisplayOrder == nil {
return nil, false
}
return o.DisplayOrder, true
}
// HasDisplayOrder returns a boolean if a field has been set.
func (o *Product) HasDisplayOrder() bool {
if o != nil && o.DisplayOrder != nil {
return true
}
return false
}
// SetDisplayOrder gets a reference to the given int32 and assigns it to the DisplayOrder field.
func (o *Product) SetDisplayOrder(v int32) {
o.DisplayOrder = &v
}
// GetActive returns the Active field value if set, zero value otherwise.
func (o *Product) GetActive() bool {
if o == nil || o.Active == nil {
var ret bool
return ret
}
return *o.Active
}
// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetActiveOk() (*bool, bool) {
if o == nil || o.Active == nil {
return nil, false
}
return o.Active, true
}
// HasActive returns a boolean if a field has been set.
func (o *Product) HasActive() bool {
if o != nil && o.Active != nil {
return true
}
return false
}
// SetActive gets a reference to the given bool and assigns it to the Active field.
func (o *Product) SetActive(v bool) {
o.Active = &v
}
// GetOrderLimit returns the OrderLimit field value if set, zero value otherwise.
func (o *Product) GetOrderLimit() int32 {
if o == nil || o.OrderLimit == nil {
var ret int32
return ret
}
return *o.OrderLimit
}
// GetOrderLimitOk returns a tuple with the OrderLimit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetOrderLimitOk() (*int32, bool) {
if o == nil || o.OrderLimit == nil {
return nil, false
}
return o.OrderLimit, true
}
// HasOrderLimit returns a boolean if a field has been set.
func (o *Product) HasOrderLimit() bool {
if o != nil && o.OrderLimit != nil {
return true
}
return false
}
// SetOrderLimit gets a reference to the given int32 and assigns it to the OrderLimit field.
func (o *Product) SetOrderLimit(v int32) {
o.OrderLimit = &v
}
// GetOptions returns the Options field value
func (o *Product) GetOptions() []ServiceElement {
if o == nil {
var ret []ServiceElement
return ret
}
return o.Options
}
// GetOptionsOk returns a tuple with the Options field value
// and a boolean to check if the value has been set.
func (o *Product) GetOptionsOk() (*[]ServiceElement, bool) {
if o == nil {
return nil, false
}
return &o.Options, true
}
// SetOptions sets field value
func (o *Product) SetOptions(v []ServiceElement) {
o.Options = v
}
// GetProperties returns the Properties field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Product) GetProperties() []ServiceElement {
if o == nil {
var ret []ServiceElement
return ret
}
return o.Properties
}
// GetPropertiesOk returns a tuple with the Properties 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 *Product) GetPropertiesOk() (*[]ServiceElement, bool) {
if o == nil || o.Properties == nil {
return nil, false
}
return &o.Properties, true
}
// HasProperties returns a boolean if a field has been set.
func (o *Product) HasProperties() bool {
if o != nil && o.Properties != nil {
return true
}
return false
}
// SetProperties gets a reference to the given []ServiceElement and assigns it to the Properties field.
func (o *Product) SetProperties(v []ServiceElement) {
o.Properties = v
}
// GetConfiguration returns the Configuration field value
func (o *Product) GetConfiguration() map[string]string {
if o == nil {
var ret map[string]string
return ret
}
return o.Configuration
}
// GetConfigurationOk returns a tuple with the Configuration field value
// and a boolean to check if the value has been set.
func (o *Product) GetConfigurationOk() (*map[string]string, bool) {
if o == nil {
return nil, false
}
return &o.Configuration, true
}
// SetConfiguration sets field value
func (o *Product) SetConfiguration(v map[string]string) {
o.Configuration = v
}
// GetIsResource returns the IsResource field value
func (o *Product) GetIsResource() bool {
if o == nil {
var ret bool
return ret
}
return o.IsResource
}
// GetIsResourceOk returns a tuple with the IsResource field value
// and a boolean to check if the value has been set.
func (o *Product) GetIsResourceOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.IsResource, true
}
// SetIsResource sets field value
func (o *Product) SetIsResource(v bool) {
o.IsResource = v
}
// GetHasChildren returns the HasChildren field value
func (o *Product) GetHasChildren() bool {
if o == nil {
var ret bool
return ret
}
return o.HasChildren
}
// GetHasChildrenOk returns a tuple with the HasChildren field value
// and a boolean to check if the value has been set.
func (o *Product) GetHasChildrenOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.HasChildren, true
}
// SetHasChildren sets field value
func (o *Product) SetHasChildren(v bool) {
o.HasChildren = v
}
// GetParentId returns the ParentId field value if set, zero value otherwise.
func (o *Product) GetParentId() string {
if o == nil || o.ParentId == nil {
var ret string
return ret
}
return *o.ParentId
}
// GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetParentIdOk() (*string, bool) {
if o == nil || o.ParentId == nil {
return nil, false
}
return o.ParentId, true
}
// HasParentId returns a boolean if a field has been set.
func (o *Product) HasParentId() bool {
if o != nil && o.ParentId != nil {
return true
}
return false
}
// SetParentId gets a reference to the given string and assigns it to the ParentId field.
func (o *Product) SetParentId(v string) {
o.ParentId = &v
}
// GetServiceExtensions returns the ServiceExtensions field value if set, zero value otherwise.
func (o *Product) GetServiceExtensions() []NSOConfigDataXPath {
if o == nil || o.ServiceExtensions == nil {
var ret []NSOConfigDataXPath
return ret
}
return *o.ServiceExtensions
}
// GetServiceExtensionsOk returns a tuple with the ServiceExtensions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetServiceExtensionsOk() (*[]NSOConfigDataXPath, bool) {
if o == nil || o.ServiceExtensions == nil {
return nil, false
}
return o.ServiceExtensions, true
}
// HasServiceExtensions returns a boolean if a field has been set.
func (o *Product) HasServiceExtensions() bool {
if o != nil && o.ServiceExtensions != nil {
return true
}
return false
}
// SetServiceExtensions gets a reference to the given []NSOConfigDataXPath and assigns it to the ServiceExtensions field.
func (o *Product) SetServiceExtensions(v []NSOConfigDataXPath) {
o.ServiceExtensions = &v
}
// GetServiceConfigQueryRootXPaths returns the ServiceConfigQueryRootXPaths field value if set, zero value otherwise.
func (o *Product) GetServiceConfigQueryRootXPaths() []string {
if o == nil || o.ServiceConfigQueryRootXPaths == nil {
var ret []string
return ret
}
return *o.ServiceConfigQueryRootXPaths
}
// GetServiceConfigQueryRootXPathsOk returns a tuple with the ServiceConfigQueryRootXPaths field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetServiceConfigQueryRootXPathsOk() (*[]string, bool) {
if o == nil || o.ServiceConfigQueryRootXPaths == nil {
return nil, false
}
return o.ServiceConfigQueryRootXPaths, true
}
// HasServiceConfigQueryRootXPaths returns a boolean if a field has been set.
func (o *Product) HasServiceConfigQueryRootXPaths() bool {
if o != nil && o.ServiceConfigQueryRootXPaths != nil {
return true
}
return false
}
// SetServiceConfigQueryRootXPaths gets a reference to the given []string and assigns it to the ServiceConfigQueryRootXPaths field.
func (o *Product) SetServiceConfigQueryRootXPaths(v []string) {
o.ServiceConfigQueryRootXPaths = &v
}
// GetUiConfig returns the UiConfig field value if set, zero value otherwise.
func (o *Product) GetUiConfig() ServiceUIConfig {
if o == nil || o.UiConfig == nil {
var ret ServiceUIConfig
return ret
}
return *o.UiConfig
}
// GetUiConfigOk returns a tuple with the UiConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Product) GetUiConfigOk() (*ServiceUIConfig, bool) {
if o == nil || o.UiConfig == nil {
return nil, false
}
return o.UiConfig, true
}
// HasUiConfig returns a boolean if a field has been set.
func (o *Product) HasUiConfig() bool {
if o != nil && o.UiConfig != nil {
return true
}
return false
}
// SetUiConfig gets a reference to the given ServiceUIConfig and assigns it to the UiConfig field.
func (o *Product) SetUiConfig(v ServiceUIConfig) {
o.UiConfig = &v
}
// GetSlmUiConfig returns the SlmUiConfig field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Product) GetSlmUiConfig() ServiceSLMUIConfig {
if o == nil || o.SlmUiConfig.Get() == nil {
var ret ServiceSLMUIConfig
return ret
}
return *o.SlmUiConfig.Get()
}
// GetSlmUiConfigOk returns a tuple with the SlmUiConfig 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 *Product) GetSlmUiConfigOk() (*ServiceSLMUIConfig, bool) {
if o == nil {
return nil, false
}
return o.SlmUiConfig.Get(), o.SlmUiConfig.IsSet()
}
// HasSlmUiConfig returns a boolean if a field has been set.
func (o *Product) HasSlmUiConfig() bool {
if o != nil && o.SlmUiConfig.IsSet() {
return true
}
return false
}
// SetSlmUiConfig gets a reference to the given NullableServiceSLMUIConfig and assigns it to the SlmUiConfig field.
func (o *Product) SetSlmUiConfig(v ServiceSLMUIConfig) {
o.SlmUiConfig.Set(&v)
}
// SetSlmUiConfigNil sets the value for SlmUiConfig to be an explicit nil
func (o *Product) SetSlmUiConfigNil() {
o.SlmUiConfig.Set(nil)
}
// UnsetSlmUiConfig ensures that no value is present for SlmUiConfig, not even an explicit nil
func (o *Product) UnsetSlmUiConfig() {
o.SlmUiConfig.Unset()
}
// GetExternalId returns the ExternalId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Product) GetExternalId() string {
if o == nil || o.ExternalId.Get() == nil {
var ret string
return ret
}
return *o.ExternalId.Get()
}
// GetExternalIdOk returns a tuple with the ExternalId 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 *Product) GetExternalIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ExternalId.Get(), o.ExternalId.IsSet()
}
// HasExternalId returns a boolean if a field has been set.
func (o *Product) HasExternalId() bool {
if o != nil && o.ExternalId.IsSet() {
return true
}
return false
}
// SetExternalId gets a reference to the given NullableString and assigns it to the ExternalId field.
func (o *Product) SetExternalId(v string) {
o.ExternalId.Set(&v)
}
// SetExternalIdNil sets the value for ExternalId to be an explicit nil
func (o *Product) SetExternalIdNil() {
o.ExternalId.Set(nil)
}
// UnsetExternalId ensures that no value is present for ExternalId, not even an explicit nil
func (o *Product) UnsetExternalId() {
o.ExternalId.Unset()
}
// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Product) GetTags() []string {
if o == nil {
var ret []string
return ret
}
return o.Tags
}
// GetTagsOk returns a tuple with the Tags 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 *Product) GetTagsOk() (*[]string, bool) {
if o == nil || o.Tags == nil {
return nil, false
}
return &o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *Product) HasTags() bool {
if o != nil && o.Tags != nil {
return true
}
return false
}
// SetTags gets a reference to the given []string and assigns it to the Tags field.
func (o *Product) SetTags(v []string) {
o.Tags = v
}
func (o Product) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["name"] = o.Name
}
if true {
toSerialize["label"] = o.Label
}
if true {
toSerialize["version"] = o.Version
}
if true {
toSerialize["description"] = o.Description
}
if true {
toSerialize["image"] = o.Image
}
if o.MultipleInstanceAllowed != nil {
toSerialize["multipleInstanceAllowed"] = o.MultipleInstanceAllowed
}
if o.Price != nil {
toSerialize["price"] = o.Price
}
if o.DisplayOrder != nil {
toSerialize["displayOrder"] = o.DisplayOrder
}
if o.Active != nil {
toSerialize["active"] = o.Active
}
if o.OrderLimit != nil {
toSerialize["orderLimit"] = o.OrderLimit
}
if true {
toSerialize["options"] = o.Options
}
if o.Properties != nil {
toSerialize["properties"] = o.Properties
}
if true {
toSerialize["configuration"] = o.Configuration
}
if true {
toSerialize["isResource"] = o.IsResource
}
if true {
toSerialize["hasChildren"] = o.HasChildren
}
if o.ParentId != nil {
toSerialize["parentId"] = o.ParentId
}
if o.ServiceExtensions != nil {
toSerialize["serviceExtensions"] = o.ServiceExtensions
}
if o.ServiceConfigQueryRootXPaths != nil {
toSerialize["serviceConfigQueryRootXPaths"] = o.ServiceConfigQueryRootXPaths
}
if o.UiConfig != nil {
toSerialize["uiConfig"] = o.UiConfig
}
if o.SlmUiConfig.IsSet() {
toSerialize["slmUiConfig"] = o.SlmUiConfig.Get()
}
if o.ExternalId.IsSet() {
toSerialize["externalId"] = o.ExternalId.Get()
}
if o.Tags != nil {
toSerialize["tags"] = o.Tags
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *Product) UnmarshalJSON(bytes []byte) (err error) {
varProduct := _Product{}
if err = json.Unmarshal(bytes, &varProduct); err == nil {
*o = Product(varProduct)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "label")
delete(additionalProperties, "version")
delete(additionalProperties, "description")
delete(additionalProperties, "image")
delete(additionalProperties, "multipleInstanceAllowed")
delete(additionalProperties, "price")
delete(additionalProperties, "displayOrder")
delete(additionalProperties, "active")
delete(additionalProperties, "orderLimit")
delete(additionalProperties, "options")
delete(additionalProperties, "properties")
delete(additionalProperties, "configuration")
delete(additionalProperties, "isResource")
delete(additionalProperties, "hasChildren")
delete(additionalProperties, "parentId")
delete(additionalProperties, "serviceExtensions")
delete(additionalProperties, "serviceConfigQueryRootXPaths")
delete(additionalProperties, "uiConfig")
delete(additionalProperties, "slmUiConfig")
delete(additionalProperties, "externalId")
delete(additionalProperties, "tags")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProduct struct {
value *Product
isSet bool
}
func (v NullableProduct) Get() *Product {
return v.value
}
func (v *NullableProduct) Set(val *Product) {
v.value = val
v.isSet = true
}
func (v NullableProduct) IsSet() bool {
return v.isSet
}
func (v *NullableProduct) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProduct(val *Product) *NullableProduct {
return &NullableProduct{value: val, isSet: true}
}
func (v NullableProduct) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProduct) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}