-
Notifications
You must be signed in to change notification settings - Fork 2
/
model_create_permission_group_request.go
1047 lines (891 loc) · 36.5 KB
/
model_create_permission_group_request.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
/*
ConfigCat Public Management API
The purpose of this API is to access the ConfigCat platform programmatically. You can **Create**, **Read**, **Update** and **Delete** any entities like **Feature Flags, Configs, Environments** or **Products** within ConfigCat. **Base API URL**: https://test-api.configcat.com If you prefer the swagger documentation, you can find it here: [Swagger UI](https://test-api.configcat.com/swagger). The API is based on HTTP REST, uses resource-oriented URLs, status codes and supports JSON format. **Important:** Do not use this API for accessing and evaluating feature flag values. Use the [SDKs](https://configcat.com/docs/sdk-reference/overview) or the [ConfigCat Proxy](https://configcat.com/docs/advanced/proxy/proxy-overview/) instead. # OpenAPI Specification The complete specification is publicly available in the following formats: - [OpenAPI v3](https://test-api.configcat.com/docs/v1/swagger.json) - [Swagger v2](https://test-api.configcat.com/docs/v1/swagger.v2.json) You can use it to generate client libraries in various languages with [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) or [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to interact with this API. # Authentication This API uses the [Basic HTTP Authentication Scheme](https://en.wikipedia.org/wiki/Basic_access_authentication). <!-- ReDoc-Inject: <security-definitions> --> # Throttling and rate limits All the rate limited API calls are returning information about the current rate limit period in the following HTTP headers: | Header | Description | | :- | :- | | X-Rate-Limit-Remaining | The maximum number of requests remaining in the current rate limit period. | | X-Rate-Limit-Reset | The time when the current rate limit period resets. | When the rate limit is exceeded by a request, the API returns with a `HTTP 429 - Too many requests` status along with a `Retry-After` HTTP header.
API version: v1
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package configcatpublicapi
import (
"encoding/json"
"bytes"
"fmt"
)
// checks if the CreatePermissionGroupRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreatePermissionGroupRequest{}
// CreatePermissionGroupRequest struct for CreatePermissionGroupRequest
type CreatePermissionGroupRequest struct {
// Name of the Permission Group.
Name string `json:"name"`
// Group members can manage team members.
CanManageMembers *bool `json:"canManageMembers,omitempty"`
// Group members can create/update Configs.
CanCreateOrUpdateConfig *bool `json:"canCreateOrUpdateConfig,omitempty"`
// Group members can delete Configs.
CanDeleteConfig *bool `json:"canDeleteConfig,omitempty"`
// Group members can create/update Environments.
CanCreateOrUpdateEnvironment *bool `json:"canCreateOrUpdateEnvironment,omitempty"`
// Group members can delete Environments.
CanDeleteEnvironment *bool `json:"canDeleteEnvironment,omitempty"`
// Group members can create/update Feature Flags and Settings.
CanCreateOrUpdateSetting *bool `json:"canCreateOrUpdateSetting,omitempty"`
// Group members can attach/detach Tags to Feature Flags and Settings.
CanTagSetting *bool `json:"canTagSetting,omitempty"`
// Group members can delete Feature Flags and Settings.
CanDeleteSetting *bool `json:"canDeleteSetting,omitempty"`
// Group members can create/update Tags.
CanCreateOrUpdateTag *bool `json:"canCreateOrUpdateTag,omitempty"`
// Group members can delete Tags.
CanDeleteTag *bool `json:"canDeleteTag,omitempty"`
// Group members can create/update/delete Webhooks.
CanManageWebhook *bool `json:"canManageWebhook,omitempty"`
// Group members can use the export/import feature.
CanUseExportImport *bool `json:"canUseExportImport,omitempty"`
// Group members can update Product preferences.
CanManageProductPreferences *bool `json:"canManageProductPreferences,omitempty"`
// Group members can add and configure integrations.
CanManageIntegrations *bool `json:"canManageIntegrations,omitempty"`
// Group members has access to SDK keys.
CanViewSdkKey *bool `json:"canViewSdkKey,omitempty"`
// Group members can rotate SDK keys.
CanRotateSdkKey *bool `json:"canRotateSdkKey,omitempty"`
// Group members can create/update Segments.
CanCreateOrUpdateSegments *bool `json:"canCreateOrUpdateSegments,omitempty"`
// Group members can delete Segments.
CanDeleteSegments *bool `json:"canDeleteSegments,omitempty"`
// Group members has access to audit logs.
CanViewProductAuditLog *bool `json:"canViewProductAuditLog,omitempty"`
// Group members has access to product statistics.
CanViewProductStatistics *bool `json:"canViewProductStatistics,omitempty"`
AccessType *AccessType `json:"accessType,omitempty"`
NewEnvironmentAccessType *EnvironmentAccessType `json:"newEnvironmentAccessType,omitempty"`
// List of environment specific permissions.
EnvironmentAccesses []CreateOrUpdateEnvironmentAccessModel `json:"environmentAccesses,omitempty"`
// Group members can disable two-factor authentication for other members.
CanDisable2FA *bool `json:"canDisable2FA,omitempty"`
}
type _CreatePermissionGroupRequest CreatePermissionGroupRequest
// NewCreatePermissionGroupRequest instantiates a new CreatePermissionGroupRequest 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 NewCreatePermissionGroupRequest(name string) *CreatePermissionGroupRequest {
this := CreatePermissionGroupRequest{}
this.Name = name
return &this
}
// NewCreatePermissionGroupRequestWithDefaults instantiates a new CreatePermissionGroupRequest 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 NewCreatePermissionGroupRequestWithDefaults() *CreatePermissionGroupRequest {
this := CreatePermissionGroupRequest{}
return &this
}
// GetName returns the Name field value
func (o *CreatePermissionGroupRequest) 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 *CreatePermissionGroupRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *CreatePermissionGroupRequest) SetName(v string) {
o.Name = v
}
// GetCanManageMembers returns the CanManageMembers field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanManageMembers() bool {
if o == nil || IsNil(o.CanManageMembers) {
var ret bool
return ret
}
return *o.CanManageMembers
}
// GetCanManageMembersOk returns a tuple with the CanManageMembers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanManageMembersOk() (*bool, bool) {
if o == nil || IsNil(o.CanManageMembers) {
return nil, false
}
return o.CanManageMembers, true
}
// HasCanManageMembers returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanManageMembers() bool {
if o != nil && !IsNil(o.CanManageMembers) {
return true
}
return false
}
// SetCanManageMembers gets a reference to the given bool and assigns it to the CanManageMembers field.
func (o *CreatePermissionGroupRequest) SetCanManageMembers(v bool) {
o.CanManageMembers = &v
}
// GetCanCreateOrUpdateConfig returns the CanCreateOrUpdateConfig field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateConfig() bool {
if o == nil || IsNil(o.CanCreateOrUpdateConfig) {
var ret bool
return ret
}
return *o.CanCreateOrUpdateConfig
}
// GetCanCreateOrUpdateConfigOk returns a tuple with the CanCreateOrUpdateConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateConfigOk() (*bool, bool) {
if o == nil || IsNil(o.CanCreateOrUpdateConfig) {
return nil, false
}
return o.CanCreateOrUpdateConfig, true
}
// HasCanCreateOrUpdateConfig returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanCreateOrUpdateConfig() bool {
if o != nil && !IsNil(o.CanCreateOrUpdateConfig) {
return true
}
return false
}
// SetCanCreateOrUpdateConfig gets a reference to the given bool and assigns it to the CanCreateOrUpdateConfig field.
func (o *CreatePermissionGroupRequest) SetCanCreateOrUpdateConfig(v bool) {
o.CanCreateOrUpdateConfig = &v
}
// GetCanDeleteConfig returns the CanDeleteConfig field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanDeleteConfig() bool {
if o == nil || IsNil(o.CanDeleteConfig) {
var ret bool
return ret
}
return *o.CanDeleteConfig
}
// GetCanDeleteConfigOk returns a tuple with the CanDeleteConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanDeleteConfigOk() (*bool, bool) {
if o == nil || IsNil(o.CanDeleteConfig) {
return nil, false
}
return o.CanDeleteConfig, true
}
// HasCanDeleteConfig returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanDeleteConfig() bool {
if o != nil && !IsNil(o.CanDeleteConfig) {
return true
}
return false
}
// SetCanDeleteConfig gets a reference to the given bool and assigns it to the CanDeleteConfig field.
func (o *CreatePermissionGroupRequest) SetCanDeleteConfig(v bool) {
o.CanDeleteConfig = &v
}
// GetCanCreateOrUpdateEnvironment returns the CanCreateOrUpdateEnvironment field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateEnvironment() bool {
if o == nil || IsNil(o.CanCreateOrUpdateEnvironment) {
var ret bool
return ret
}
return *o.CanCreateOrUpdateEnvironment
}
// GetCanCreateOrUpdateEnvironmentOk returns a tuple with the CanCreateOrUpdateEnvironment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateEnvironmentOk() (*bool, bool) {
if o == nil || IsNil(o.CanCreateOrUpdateEnvironment) {
return nil, false
}
return o.CanCreateOrUpdateEnvironment, true
}
// HasCanCreateOrUpdateEnvironment returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanCreateOrUpdateEnvironment() bool {
if o != nil && !IsNil(o.CanCreateOrUpdateEnvironment) {
return true
}
return false
}
// SetCanCreateOrUpdateEnvironment gets a reference to the given bool and assigns it to the CanCreateOrUpdateEnvironment field.
func (o *CreatePermissionGroupRequest) SetCanCreateOrUpdateEnvironment(v bool) {
o.CanCreateOrUpdateEnvironment = &v
}
// GetCanDeleteEnvironment returns the CanDeleteEnvironment field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanDeleteEnvironment() bool {
if o == nil || IsNil(o.CanDeleteEnvironment) {
var ret bool
return ret
}
return *o.CanDeleteEnvironment
}
// GetCanDeleteEnvironmentOk returns a tuple with the CanDeleteEnvironment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanDeleteEnvironmentOk() (*bool, bool) {
if o == nil || IsNil(o.CanDeleteEnvironment) {
return nil, false
}
return o.CanDeleteEnvironment, true
}
// HasCanDeleteEnvironment returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanDeleteEnvironment() bool {
if o != nil && !IsNil(o.CanDeleteEnvironment) {
return true
}
return false
}
// SetCanDeleteEnvironment gets a reference to the given bool and assigns it to the CanDeleteEnvironment field.
func (o *CreatePermissionGroupRequest) SetCanDeleteEnvironment(v bool) {
o.CanDeleteEnvironment = &v
}
// GetCanCreateOrUpdateSetting returns the CanCreateOrUpdateSetting field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateSetting() bool {
if o == nil || IsNil(o.CanCreateOrUpdateSetting) {
var ret bool
return ret
}
return *o.CanCreateOrUpdateSetting
}
// GetCanCreateOrUpdateSettingOk returns a tuple with the CanCreateOrUpdateSetting field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateSettingOk() (*bool, bool) {
if o == nil || IsNil(o.CanCreateOrUpdateSetting) {
return nil, false
}
return o.CanCreateOrUpdateSetting, true
}
// HasCanCreateOrUpdateSetting returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanCreateOrUpdateSetting() bool {
if o != nil && !IsNil(o.CanCreateOrUpdateSetting) {
return true
}
return false
}
// SetCanCreateOrUpdateSetting gets a reference to the given bool and assigns it to the CanCreateOrUpdateSetting field.
func (o *CreatePermissionGroupRequest) SetCanCreateOrUpdateSetting(v bool) {
o.CanCreateOrUpdateSetting = &v
}
// GetCanTagSetting returns the CanTagSetting field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanTagSetting() bool {
if o == nil || IsNil(o.CanTagSetting) {
var ret bool
return ret
}
return *o.CanTagSetting
}
// GetCanTagSettingOk returns a tuple with the CanTagSetting field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanTagSettingOk() (*bool, bool) {
if o == nil || IsNil(o.CanTagSetting) {
return nil, false
}
return o.CanTagSetting, true
}
// HasCanTagSetting returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanTagSetting() bool {
if o != nil && !IsNil(o.CanTagSetting) {
return true
}
return false
}
// SetCanTagSetting gets a reference to the given bool and assigns it to the CanTagSetting field.
func (o *CreatePermissionGroupRequest) SetCanTagSetting(v bool) {
o.CanTagSetting = &v
}
// GetCanDeleteSetting returns the CanDeleteSetting field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanDeleteSetting() bool {
if o == nil || IsNil(o.CanDeleteSetting) {
var ret bool
return ret
}
return *o.CanDeleteSetting
}
// GetCanDeleteSettingOk returns a tuple with the CanDeleteSetting field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanDeleteSettingOk() (*bool, bool) {
if o == nil || IsNil(o.CanDeleteSetting) {
return nil, false
}
return o.CanDeleteSetting, true
}
// HasCanDeleteSetting returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanDeleteSetting() bool {
if o != nil && !IsNil(o.CanDeleteSetting) {
return true
}
return false
}
// SetCanDeleteSetting gets a reference to the given bool and assigns it to the CanDeleteSetting field.
func (o *CreatePermissionGroupRequest) SetCanDeleteSetting(v bool) {
o.CanDeleteSetting = &v
}
// GetCanCreateOrUpdateTag returns the CanCreateOrUpdateTag field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateTag() bool {
if o == nil || IsNil(o.CanCreateOrUpdateTag) {
var ret bool
return ret
}
return *o.CanCreateOrUpdateTag
}
// GetCanCreateOrUpdateTagOk returns a tuple with the CanCreateOrUpdateTag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateTagOk() (*bool, bool) {
if o == nil || IsNil(o.CanCreateOrUpdateTag) {
return nil, false
}
return o.CanCreateOrUpdateTag, true
}
// HasCanCreateOrUpdateTag returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanCreateOrUpdateTag() bool {
if o != nil && !IsNil(o.CanCreateOrUpdateTag) {
return true
}
return false
}
// SetCanCreateOrUpdateTag gets a reference to the given bool and assigns it to the CanCreateOrUpdateTag field.
func (o *CreatePermissionGroupRequest) SetCanCreateOrUpdateTag(v bool) {
o.CanCreateOrUpdateTag = &v
}
// GetCanDeleteTag returns the CanDeleteTag field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanDeleteTag() bool {
if o == nil || IsNil(o.CanDeleteTag) {
var ret bool
return ret
}
return *o.CanDeleteTag
}
// GetCanDeleteTagOk returns a tuple with the CanDeleteTag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanDeleteTagOk() (*bool, bool) {
if o == nil || IsNil(o.CanDeleteTag) {
return nil, false
}
return o.CanDeleteTag, true
}
// HasCanDeleteTag returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanDeleteTag() bool {
if o != nil && !IsNil(o.CanDeleteTag) {
return true
}
return false
}
// SetCanDeleteTag gets a reference to the given bool and assigns it to the CanDeleteTag field.
func (o *CreatePermissionGroupRequest) SetCanDeleteTag(v bool) {
o.CanDeleteTag = &v
}
// GetCanManageWebhook returns the CanManageWebhook field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanManageWebhook() bool {
if o == nil || IsNil(o.CanManageWebhook) {
var ret bool
return ret
}
return *o.CanManageWebhook
}
// GetCanManageWebhookOk returns a tuple with the CanManageWebhook field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanManageWebhookOk() (*bool, bool) {
if o == nil || IsNil(o.CanManageWebhook) {
return nil, false
}
return o.CanManageWebhook, true
}
// HasCanManageWebhook returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanManageWebhook() bool {
if o != nil && !IsNil(o.CanManageWebhook) {
return true
}
return false
}
// SetCanManageWebhook gets a reference to the given bool and assigns it to the CanManageWebhook field.
func (o *CreatePermissionGroupRequest) SetCanManageWebhook(v bool) {
o.CanManageWebhook = &v
}
// GetCanUseExportImport returns the CanUseExportImport field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanUseExportImport() bool {
if o == nil || IsNil(o.CanUseExportImport) {
var ret bool
return ret
}
return *o.CanUseExportImport
}
// GetCanUseExportImportOk returns a tuple with the CanUseExportImport field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanUseExportImportOk() (*bool, bool) {
if o == nil || IsNil(o.CanUseExportImport) {
return nil, false
}
return o.CanUseExportImport, true
}
// HasCanUseExportImport returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanUseExportImport() bool {
if o != nil && !IsNil(o.CanUseExportImport) {
return true
}
return false
}
// SetCanUseExportImport gets a reference to the given bool and assigns it to the CanUseExportImport field.
func (o *CreatePermissionGroupRequest) SetCanUseExportImport(v bool) {
o.CanUseExportImport = &v
}
// GetCanManageProductPreferences returns the CanManageProductPreferences field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanManageProductPreferences() bool {
if o == nil || IsNil(o.CanManageProductPreferences) {
var ret bool
return ret
}
return *o.CanManageProductPreferences
}
// GetCanManageProductPreferencesOk returns a tuple with the CanManageProductPreferences field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanManageProductPreferencesOk() (*bool, bool) {
if o == nil || IsNil(o.CanManageProductPreferences) {
return nil, false
}
return o.CanManageProductPreferences, true
}
// HasCanManageProductPreferences returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanManageProductPreferences() bool {
if o != nil && !IsNil(o.CanManageProductPreferences) {
return true
}
return false
}
// SetCanManageProductPreferences gets a reference to the given bool and assigns it to the CanManageProductPreferences field.
func (o *CreatePermissionGroupRequest) SetCanManageProductPreferences(v bool) {
o.CanManageProductPreferences = &v
}
// GetCanManageIntegrations returns the CanManageIntegrations field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanManageIntegrations() bool {
if o == nil || IsNil(o.CanManageIntegrations) {
var ret bool
return ret
}
return *o.CanManageIntegrations
}
// GetCanManageIntegrationsOk returns a tuple with the CanManageIntegrations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanManageIntegrationsOk() (*bool, bool) {
if o == nil || IsNil(o.CanManageIntegrations) {
return nil, false
}
return o.CanManageIntegrations, true
}
// HasCanManageIntegrations returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanManageIntegrations() bool {
if o != nil && !IsNil(o.CanManageIntegrations) {
return true
}
return false
}
// SetCanManageIntegrations gets a reference to the given bool and assigns it to the CanManageIntegrations field.
func (o *CreatePermissionGroupRequest) SetCanManageIntegrations(v bool) {
o.CanManageIntegrations = &v
}
// GetCanViewSdkKey returns the CanViewSdkKey field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanViewSdkKey() bool {
if o == nil || IsNil(o.CanViewSdkKey) {
var ret bool
return ret
}
return *o.CanViewSdkKey
}
// GetCanViewSdkKeyOk returns a tuple with the CanViewSdkKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanViewSdkKeyOk() (*bool, bool) {
if o == nil || IsNil(o.CanViewSdkKey) {
return nil, false
}
return o.CanViewSdkKey, true
}
// HasCanViewSdkKey returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanViewSdkKey() bool {
if o != nil && !IsNil(o.CanViewSdkKey) {
return true
}
return false
}
// SetCanViewSdkKey gets a reference to the given bool and assigns it to the CanViewSdkKey field.
func (o *CreatePermissionGroupRequest) SetCanViewSdkKey(v bool) {
o.CanViewSdkKey = &v
}
// GetCanRotateSdkKey returns the CanRotateSdkKey field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanRotateSdkKey() bool {
if o == nil || IsNil(o.CanRotateSdkKey) {
var ret bool
return ret
}
return *o.CanRotateSdkKey
}
// GetCanRotateSdkKeyOk returns a tuple with the CanRotateSdkKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanRotateSdkKeyOk() (*bool, bool) {
if o == nil || IsNil(o.CanRotateSdkKey) {
return nil, false
}
return o.CanRotateSdkKey, true
}
// HasCanRotateSdkKey returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanRotateSdkKey() bool {
if o != nil && !IsNil(o.CanRotateSdkKey) {
return true
}
return false
}
// SetCanRotateSdkKey gets a reference to the given bool and assigns it to the CanRotateSdkKey field.
func (o *CreatePermissionGroupRequest) SetCanRotateSdkKey(v bool) {
o.CanRotateSdkKey = &v
}
// GetCanCreateOrUpdateSegments returns the CanCreateOrUpdateSegments field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateSegments() bool {
if o == nil || IsNil(o.CanCreateOrUpdateSegments) {
var ret bool
return ret
}
return *o.CanCreateOrUpdateSegments
}
// GetCanCreateOrUpdateSegmentsOk returns a tuple with the CanCreateOrUpdateSegments field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanCreateOrUpdateSegmentsOk() (*bool, bool) {
if o == nil || IsNil(o.CanCreateOrUpdateSegments) {
return nil, false
}
return o.CanCreateOrUpdateSegments, true
}
// HasCanCreateOrUpdateSegments returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanCreateOrUpdateSegments() bool {
if o != nil && !IsNil(o.CanCreateOrUpdateSegments) {
return true
}
return false
}
// SetCanCreateOrUpdateSegments gets a reference to the given bool and assigns it to the CanCreateOrUpdateSegments field.
func (o *CreatePermissionGroupRequest) SetCanCreateOrUpdateSegments(v bool) {
o.CanCreateOrUpdateSegments = &v
}
// GetCanDeleteSegments returns the CanDeleteSegments field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanDeleteSegments() bool {
if o == nil || IsNil(o.CanDeleteSegments) {
var ret bool
return ret
}
return *o.CanDeleteSegments
}
// GetCanDeleteSegmentsOk returns a tuple with the CanDeleteSegments field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanDeleteSegmentsOk() (*bool, bool) {
if o == nil || IsNil(o.CanDeleteSegments) {
return nil, false
}
return o.CanDeleteSegments, true
}
// HasCanDeleteSegments returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanDeleteSegments() bool {
if o != nil && !IsNil(o.CanDeleteSegments) {
return true
}
return false
}
// SetCanDeleteSegments gets a reference to the given bool and assigns it to the CanDeleteSegments field.
func (o *CreatePermissionGroupRequest) SetCanDeleteSegments(v bool) {
o.CanDeleteSegments = &v
}
// GetCanViewProductAuditLog returns the CanViewProductAuditLog field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanViewProductAuditLog() bool {
if o == nil || IsNil(o.CanViewProductAuditLog) {
var ret bool
return ret
}
return *o.CanViewProductAuditLog
}
// GetCanViewProductAuditLogOk returns a tuple with the CanViewProductAuditLog field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanViewProductAuditLogOk() (*bool, bool) {
if o == nil || IsNil(o.CanViewProductAuditLog) {
return nil, false
}
return o.CanViewProductAuditLog, true
}
// HasCanViewProductAuditLog returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanViewProductAuditLog() bool {
if o != nil && !IsNil(o.CanViewProductAuditLog) {
return true
}
return false
}
// SetCanViewProductAuditLog gets a reference to the given bool and assigns it to the CanViewProductAuditLog field.
func (o *CreatePermissionGroupRequest) SetCanViewProductAuditLog(v bool) {
o.CanViewProductAuditLog = &v
}
// GetCanViewProductStatistics returns the CanViewProductStatistics field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanViewProductStatistics() bool {
if o == nil || IsNil(o.CanViewProductStatistics) {
var ret bool
return ret
}
return *o.CanViewProductStatistics
}
// GetCanViewProductStatisticsOk returns a tuple with the CanViewProductStatistics field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanViewProductStatisticsOk() (*bool, bool) {
if o == nil || IsNil(o.CanViewProductStatistics) {
return nil, false
}
return o.CanViewProductStatistics, true
}
// HasCanViewProductStatistics returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanViewProductStatistics() bool {
if o != nil && !IsNil(o.CanViewProductStatistics) {
return true
}
return false
}
// SetCanViewProductStatistics gets a reference to the given bool and assigns it to the CanViewProductStatistics field.
func (o *CreatePermissionGroupRequest) SetCanViewProductStatistics(v bool) {
o.CanViewProductStatistics = &v
}
// GetAccessType returns the AccessType field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetAccessType() AccessType {
if o == nil || IsNil(o.AccessType) {
var ret AccessType
return ret
}
return *o.AccessType
}
// GetAccessTypeOk returns a tuple with the AccessType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetAccessTypeOk() (*AccessType, bool) {
if o == nil || IsNil(o.AccessType) {
return nil, false
}
return o.AccessType, true
}
// HasAccessType returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasAccessType() bool {
if o != nil && !IsNil(o.AccessType) {
return true
}
return false
}
// SetAccessType gets a reference to the given AccessType and assigns it to the AccessType field.
func (o *CreatePermissionGroupRequest) SetAccessType(v AccessType) {
o.AccessType = &v
}
// GetNewEnvironmentAccessType returns the NewEnvironmentAccessType field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetNewEnvironmentAccessType() EnvironmentAccessType {
if o == nil || IsNil(o.NewEnvironmentAccessType) {
var ret EnvironmentAccessType
return ret
}
return *o.NewEnvironmentAccessType
}
// GetNewEnvironmentAccessTypeOk returns a tuple with the NewEnvironmentAccessType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetNewEnvironmentAccessTypeOk() (*EnvironmentAccessType, bool) {
if o == nil || IsNil(o.NewEnvironmentAccessType) {
return nil, false
}
return o.NewEnvironmentAccessType, true
}
// HasNewEnvironmentAccessType returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasNewEnvironmentAccessType() bool {
if o != nil && !IsNil(o.NewEnvironmentAccessType) {
return true
}
return false
}
// SetNewEnvironmentAccessType gets a reference to the given EnvironmentAccessType and assigns it to the NewEnvironmentAccessType field.
func (o *CreatePermissionGroupRequest) SetNewEnvironmentAccessType(v EnvironmentAccessType) {
o.NewEnvironmentAccessType = &v
}
// GetEnvironmentAccesses returns the EnvironmentAccesses field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreatePermissionGroupRequest) GetEnvironmentAccesses() []CreateOrUpdateEnvironmentAccessModel {
if o == nil {
var ret []CreateOrUpdateEnvironmentAccessModel
return ret
}
return o.EnvironmentAccesses
}
// GetEnvironmentAccessesOk returns a tuple with the EnvironmentAccesses 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 *CreatePermissionGroupRequest) GetEnvironmentAccessesOk() ([]CreateOrUpdateEnvironmentAccessModel, bool) {
if o == nil || IsNil(o.EnvironmentAccesses) {
return nil, false
}
return o.EnvironmentAccesses, true
}
// HasEnvironmentAccesses returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasEnvironmentAccesses() bool {
if o != nil && !IsNil(o.EnvironmentAccesses) {
return true
}
return false
}
// SetEnvironmentAccesses gets a reference to the given []CreateOrUpdateEnvironmentAccessModel and assigns it to the EnvironmentAccesses field.
func (o *CreatePermissionGroupRequest) SetEnvironmentAccesses(v []CreateOrUpdateEnvironmentAccessModel) {
o.EnvironmentAccesses = v
}
// GetCanDisable2FA returns the CanDisable2FA field value if set, zero value otherwise.
func (o *CreatePermissionGroupRequest) GetCanDisable2FA() bool {
if o == nil || IsNil(o.CanDisable2FA) {
var ret bool
return ret
}
return *o.CanDisable2FA
}
// GetCanDisable2FAOk returns a tuple with the CanDisable2FA field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreatePermissionGroupRequest) GetCanDisable2FAOk() (*bool, bool) {
if o == nil || IsNil(o.CanDisable2FA) {
return nil, false
}
return o.CanDisable2FA, true
}
// HasCanDisable2FA returns a boolean if a field has been set.
func (o *CreatePermissionGroupRequest) HasCanDisable2FA() bool {
if o != nil && !IsNil(o.CanDisable2FA) {
return true
}
return false
}
// SetCanDisable2FA gets a reference to the given bool and assigns it to the CanDisable2FA field.
func (o *CreatePermissionGroupRequest) SetCanDisable2FA(v bool) {
o.CanDisable2FA = &v
}
func (o CreatePermissionGroupRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreatePermissionGroupRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
if !IsNil(o.CanManageMembers) {
toSerialize["canManageMembers"] = o.CanManageMembers
}
if !IsNil(o.CanCreateOrUpdateConfig) {
toSerialize["canCreateOrUpdateConfig"] = o.CanCreateOrUpdateConfig
}
if !IsNil(o.CanDeleteConfig) {
toSerialize["canDeleteConfig"] = o.CanDeleteConfig
}
if !IsNil(o.CanCreateOrUpdateEnvironment) {
toSerialize["canCreateOrUpdateEnvironment"] = o.CanCreateOrUpdateEnvironment
}
if !IsNil(o.CanDeleteEnvironment) {
toSerialize["canDeleteEnvironment"] = o.CanDeleteEnvironment
}
if !IsNil(o.CanCreateOrUpdateSetting) {
toSerialize["canCreateOrUpdateSetting"] = o.CanCreateOrUpdateSetting
}
if !IsNil(o.CanTagSetting) {
toSerialize["canTagSetting"] = o.CanTagSetting
}
if !IsNil(o.CanDeleteSetting) {
toSerialize["canDeleteSetting"] = o.CanDeleteSetting
}
if !IsNil(o.CanCreateOrUpdateTag) {
toSerialize["canCreateOrUpdateTag"] = o.CanCreateOrUpdateTag
}
if !IsNil(o.CanDeleteTag) {
toSerialize["canDeleteTag"] = o.CanDeleteTag
}
if !IsNil(o.CanManageWebhook) {
toSerialize["canManageWebhook"] = o.CanManageWebhook
}
if !IsNil(o.CanUseExportImport) {
toSerialize["canUseExportImport"] = o.CanUseExportImport
}
if !IsNil(o.CanManageProductPreferences) {
toSerialize["canManageProductPreferences"] = o.CanManageProductPreferences
}
if !IsNil(o.CanManageIntegrations) {
toSerialize["canManageIntegrations"] = o.CanManageIntegrations
}
if !IsNil(o.CanViewSdkKey) {
toSerialize["canViewSdkKey"] = o.CanViewSdkKey
}
if !IsNil(o.CanRotateSdkKey) {
toSerialize["canRotateSdkKey"] = o.CanRotateSdkKey
}
if !IsNil(o.CanCreateOrUpdateSegments) {
toSerialize["canCreateOrUpdateSegments"] = o.CanCreateOrUpdateSegments
}
if !IsNil(o.CanDeleteSegments) {
toSerialize["canDeleteSegments"] = o.CanDeleteSegments
}
if !IsNil(o.CanViewProductAuditLog) {
toSerialize["canViewProductAuditLog"] = o.CanViewProductAuditLog
}
if !IsNil(o.CanViewProductStatistics) {
toSerialize["canViewProductStatistics"] = o.CanViewProductStatistics
}
if !IsNil(o.AccessType) {
toSerialize["accessType"] = o.AccessType
}
if !IsNil(o.NewEnvironmentAccessType) {
toSerialize["newEnvironmentAccessType"] = o.NewEnvironmentAccessType
}
if o.EnvironmentAccesses != nil {
toSerialize["environmentAccesses"] = o.EnvironmentAccesses
}
if !IsNil(o.CanDisable2FA) {
toSerialize["canDisable2FA"] = o.CanDisable2FA
}
return toSerialize, nil
}
func (o *CreatePermissionGroupRequest) 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{
"name",
}
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)
}
}
varCreatePermissionGroupRequest := _CreatePermissionGroupRequest{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varCreatePermissionGroupRequest)