-
Notifications
You must be signed in to change notification settings - Fork 3
/
common_generated.go
4976 lines (4711 loc) · 179 KB
/
common_generated.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
/* Copyright (c) Fortanix, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package sdkms
import (
"encoding/json"
"fmt"
"github.com/pkg/errors"
)
type AccountPermissions uint64
// List of supported AccountPermissions values
const (
// Permission to manage logging integrations, and enable/disable error
// logging.
AccountPermissionsManageLogging AccountPermissions = 1 << iota
// Permission to manage SSO and password policy.
AccountPermissionsManageAuth
// Permission to manage Workspace CSE configuration.
AccountPermissionsManageWorkspaceCse
// Permission required for Workspace CSE PrivilegedUnwrap API. Note
// that `UNWRAP_WORKSPACE_CSE` permission in the group where the key is
// stored is also required.
AccountPermissionsUnwrapWorkspaceCsePrivileged
// Permission to manage account level client configurations.
AccountPermissionsManageAccountClientConfigs
// Permission to create account-level approval policy. Note that
// updating/deleting the approval policy is protected by the approval
// policy itself.
AccountPermissionsCreateAccountApprovalPolicy
// Permission to set approval request expiry for all approval requests
// created in the account.
AccountPermissionsSetApprovalRequestExpiry
// Permission to update account's custom metadata attributes.
AccountPermissionsUpdateAccountCustomMetadataAttributes
// Permission to manage account subscription (only relevant for SaaS
// accounts).
AccountPermissionsManageAccountSubscription
// Permission to update account name, custom logo, and other profile
// information.
AccountPermissionsManageAccountProfile
// Permission to delete the account.
AccountPermissionsDeleteAccount
// Permission to create administrative apps. Implies `GET_ADMIN_APPS`.
AccountPermissionsCreateAdminApps
// Permission to update administrative apps. Implies `GET_ADMIN_APPS`.
AccountPermissionsUpdateAdminApps
// Permission to delete administrative apps. Implies `GET_ADMIN_APPS`.
AccountPermissionsDeleteAdminApps
// Permission to retrieve administrative apps' secrets. Note that not
// all admin app credentials contain secrets. If an admin app's
// credential does not contain any secrets, `GET_ADMIN_APPS` permission
// is sufficient to call the `GetAppCredential` API. Implies
// `GET_ADMIN_APPS`.
AccountPermissionsRetrieveAdminAppSecrets
// Currently implies `CREATE_ADMIN_APPS`, `UPDATE_ADMIN_APPS`,
// `DELETE_ADMIN_APPS`, `RETRIEVE_ADMIN_APP_SECRETS` and
// `GET_ADMIN_APPS` permissions.
AccountPermissionsManageAdminApps
// Permission to create custom user roles. Implies `GET_CUSTOM_ROLES`.
AccountPermissionsCreateCustomRoles
// Permission to update custom user roles. Implies `GET_CUSTOM_ROLES`.
AccountPermissionsUpdateCustomRoles
// Permission to delete custom user roles. Implies `GET_CUSTOM_ROLES`.
AccountPermissionsDeleteCustomRoles
// Currently implies `CREATE_CUSTOM_ROLES`, `UPDATE_CUSTOM_ROLES`,
// `DELETE_CUSTOM_ROLES` and `GET_CUSTOM_ROLES` permissions.
AccountPermissionsManageCustomRoles
// Permission to invite users to the account. Implies `GET_ALL_USERS`.
AccountPermissionsInviteUsersToAccount
// Permission to remove users from the account. Implies
// `GET_ALL_USERS`.
AccountPermissionsDeleteUsersFromAccount
// Permission to change users' role in the account. Implies
// `GET_ALL_USERS`.
AccountPermissionsUpdateUsersAccountRole
// Permission to enable/disable users in the account. Implies
// `GET_ALL_USERS`.
AccountPermissionsUpdateUsersAccountEnabledState
// Currently implies `INVITE_USERS_TO_ACCOUNT`,
// `DELETE_USERS_FROM_ACCOUNT`, `UPDATE_USERS_ACCOUNT_ROLE`,
// `UPDATE_USERS_ACCOUNT_ENABLED_STATE` and `GET_ALL_USERS`
// permissions.
AccountPermissionsManageAccountUsers
// Permission to create external roles. Implies `GET_EXTERNAL_ROLES`.
AccountPermissionsCreateExternalRoles
// Permission to synchronize external roles. Implies
// `GET_EXTERNAL_ROLES`.
AccountPermissionsSyncExternalRoles
// Permission to delete external roles. Implies `GET_EXTERNAL_ROLES`.
AccountPermissionsDeleteExternalRoles
// Currently implies `CREATE_EXTERNAL_ROLES`, `SYNC_EXTERNAL_ROLES`,
// `DELETE_EXTERNAL_ROLES` and `GET_EXTERNAL_ROLES` permissions.
AccountPermissionsManageExternalRoles
// Permission to create various account-level security object policies
// including cryptographic policy, key metadata policy and key history
// policy.
AccountPermissionsCreateAccountSobjectPolicies
// Permission to update various account-level security object policies
// including cryptographic policy, key metadata policy and key history
// policy.
AccountPermissionsUpdateAccountSobjectPolicies
// Permission to delete various account-level security object policies
// including cryptographic policy, key metadata policy and key history
// policy.
AccountPermissionsDeleteAccountSobjectPolicies
// Currently implies `CREATE_ACCOUNT_SOBJECT_POLICIES`,
// `UPDATE_ACCOUNT_SOBJECT_POLICIES`, and
// `DELETE_ACCOUNT_SOBJECT_POLICIES` permissions.
AccountPermissionsManageAccountSobjectPolicies
// Permission to create child accounts. Note that this is only
// applicable to SaaS accounts with reseller subscription. Implies
// `GET_CHILD_ACCOUNTS`.
AccountPermissionsCreateChildAccounts
// Permission to update child accounts. Note that this is only
// applicable to SaaS accounts with reseller subscription. Implies
// `GET_CHILD_ACCOUNTS`.
AccountPermissionsUpdateChildAccounts
// Permission to delete child accounts. Note that this is only
// applicable to SaaS accounts with reseller subscription. Implies
// `GET_CHILD_ACCOUNTS`.
AccountPermissionsDeleteChildAccounts
// Permission to create users in child accounts. Note that this is only
// applicable to SaaS accounts with reseller subscription. Implies
// `GET_CHILD_ACCOUNTS` and `GET_CHILD_ACCOUNT_USERS`.
AccountPermissionsCreateChildAccountUsers
// Permission to get child accounts. Note that this is only applicable
// to SaaS accounts with reseller subscription.
AccountPermissionsGetChildAccounts
// Permission to get child account users. Note that this is only
// applicable to SaaS accounts with reseller subscription.
AccountPermissionsGetChildAccountUsers
// Currently implies `CREATE_CHILD_ACCOUNTS`, `UPDATE_CHILD_ACCOUNTS`,
// `DELETE_CHILD_ACCOUNTS`, `CREATE_CHILD_ACCOUNT_USERS`,
// `GET_CHILD_ACCOUNTS`, and `GET_CHILD_ACCOUNT_USERS` permissions.
AccountPermissionsManageChildAccounts
// Permission to create new local groups.
AccountPermissionsCreateLocalGroups
// Permission to create new group backed by external HSM/KMS.
AccountPermissionsCreateExternalGroups
// Controls if the user can act as an approval policy reviewer.
AccountPermissionsAllowQuorumReviewer
// Controls if the user can act as a key custodian.
AccountPermissionsAllowKeyCustodian
// Grants read access to **all** approval requests in the account. Note
// that there is a related group-level permission that is restricted to
// approval requests related to one group.
AccountPermissionsGetAllApprovalRequests
// Permission to get administrative apps.
AccountPermissionsGetAdminApps
// Permission to get custom user roles.
AccountPermissionsGetCustomRoles
// Permission to get external roles.
AccountPermissionsGetExternalRoles
// Permission to get all users. Note that users can always get
// themselves.
AccountPermissionsGetAllUsers
// Grants access to accounts::GetAccountUsage API.
AccountPermissionsGetAccountUsage
)
// MarshalJSON converts AccountPermissions to an array of strings
func (x AccountPermissions) MarshalJSON() ([]byte, error) {
s := make([]string, 0)
if x&AccountPermissionsManageLogging == AccountPermissionsManageLogging {
s = append(s, "MANAGE_LOGGING")
}
if x&AccountPermissionsManageAuth == AccountPermissionsManageAuth {
s = append(s, "MANAGE_AUTH")
}
if x&AccountPermissionsManageWorkspaceCse == AccountPermissionsManageWorkspaceCse {
s = append(s, "MANAGE_WORKSPACE_CSE")
}
if x&AccountPermissionsUnwrapWorkspaceCsePrivileged == AccountPermissionsUnwrapWorkspaceCsePrivileged {
s = append(s, "UNWRAP_WORKSPACE_CSE_PRIVILEGED")
}
if x&AccountPermissionsManageAccountClientConfigs == AccountPermissionsManageAccountClientConfigs {
s = append(s, "MANAGE_ACCOUNT_CLIENT_CONFIGS")
}
if x&AccountPermissionsCreateAccountApprovalPolicy == AccountPermissionsCreateAccountApprovalPolicy {
s = append(s, "CREATE_ACCOUNT_APPROVAL_POLICY")
}
if x&AccountPermissionsSetApprovalRequestExpiry == AccountPermissionsSetApprovalRequestExpiry {
s = append(s, "SET_APPROVAL_REQUEST_EXPIRY")
}
if x&AccountPermissionsUpdateAccountCustomMetadataAttributes == AccountPermissionsUpdateAccountCustomMetadataAttributes {
s = append(s, "UPDATE_ACCOUNT_CUSTOM_METADATA_ATTRIBUTES")
}
if x&AccountPermissionsManageAccountSubscription == AccountPermissionsManageAccountSubscription {
s = append(s, "MANAGE_ACCOUNT_SUBSCRIPTION")
}
if x&AccountPermissionsManageAccountProfile == AccountPermissionsManageAccountProfile {
s = append(s, "MANAGE_ACCOUNT_PROFILE")
}
if x&AccountPermissionsDeleteAccount == AccountPermissionsDeleteAccount {
s = append(s, "DELETE_ACCOUNT")
}
if x&AccountPermissionsCreateAdminApps == AccountPermissionsCreateAdminApps {
s = append(s, "CREATE_ADMIN_APPS")
}
if x&AccountPermissionsUpdateAdminApps == AccountPermissionsUpdateAdminApps {
s = append(s, "UPDATE_ADMIN_APPS")
}
if x&AccountPermissionsDeleteAdminApps == AccountPermissionsDeleteAdminApps {
s = append(s, "DELETE_ADMIN_APPS")
}
if x&AccountPermissionsRetrieveAdminAppSecrets == AccountPermissionsRetrieveAdminAppSecrets {
s = append(s, "RETRIEVE_ADMIN_APP_SECRETS")
}
if x&AccountPermissionsManageAdminApps == AccountPermissionsManageAdminApps {
s = append(s, "MANAGE_ADMIN_APPS")
}
if x&AccountPermissionsCreateCustomRoles == AccountPermissionsCreateCustomRoles {
s = append(s, "CREATE_CUSTOM_ROLES")
}
if x&AccountPermissionsUpdateCustomRoles == AccountPermissionsUpdateCustomRoles {
s = append(s, "UPDATE_CUSTOM_ROLES")
}
if x&AccountPermissionsDeleteCustomRoles == AccountPermissionsDeleteCustomRoles {
s = append(s, "DELETE_CUSTOM_ROLES")
}
if x&AccountPermissionsManageCustomRoles == AccountPermissionsManageCustomRoles {
s = append(s, "MANAGE_CUSTOM_ROLES")
}
if x&AccountPermissionsInviteUsersToAccount == AccountPermissionsInviteUsersToAccount {
s = append(s, "INVITE_USERS_TO_ACCOUNT")
}
if x&AccountPermissionsDeleteUsersFromAccount == AccountPermissionsDeleteUsersFromAccount {
s = append(s, "DELETE_USERS_FROM_ACCOUNT")
}
if x&AccountPermissionsUpdateUsersAccountRole == AccountPermissionsUpdateUsersAccountRole {
s = append(s, "UPDATE_USERS_ACCOUNT_ROLE")
}
if x&AccountPermissionsUpdateUsersAccountEnabledState == AccountPermissionsUpdateUsersAccountEnabledState {
s = append(s, "UPDATE_USERS_ACCOUNT_ENABLED_STATE")
}
if x&AccountPermissionsManageAccountUsers == AccountPermissionsManageAccountUsers {
s = append(s, "MANAGE_ACCOUNT_USERS")
}
if x&AccountPermissionsCreateExternalRoles == AccountPermissionsCreateExternalRoles {
s = append(s, "CREATE_EXTERNAL_ROLES")
}
if x&AccountPermissionsSyncExternalRoles == AccountPermissionsSyncExternalRoles {
s = append(s, "SYNC_EXTERNAL_ROLES")
}
if x&AccountPermissionsDeleteExternalRoles == AccountPermissionsDeleteExternalRoles {
s = append(s, "DELETE_EXTERNAL_ROLES")
}
if x&AccountPermissionsManageExternalRoles == AccountPermissionsManageExternalRoles {
s = append(s, "MANAGE_EXTERNAL_ROLES")
}
if x&AccountPermissionsCreateAccountSobjectPolicies == AccountPermissionsCreateAccountSobjectPolicies {
s = append(s, "CREATE_ACCOUNT_SOBJECT_POLICIES")
}
if x&AccountPermissionsUpdateAccountSobjectPolicies == AccountPermissionsUpdateAccountSobjectPolicies {
s = append(s, "UPDATE_ACCOUNT_SOBJECT_POLICIES")
}
if x&AccountPermissionsDeleteAccountSobjectPolicies == AccountPermissionsDeleteAccountSobjectPolicies {
s = append(s, "DELETE_ACCOUNT_SOBJECT_POLICIES")
}
if x&AccountPermissionsManageAccountSobjectPolicies == AccountPermissionsManageAccountSobjectPolicies {
s = append(s, "MANAGE_ACCOUNT_SOBJECT_POLICIES")
}
if x&AccountPermissionsCreateChildAccounts == AccountPermissionsCreateChildAccounts {
s = append(s, "CREATE_CHILD_ACCOUNTS")
}
if x&AccountPermissionsUpdateChildAccounts == AccountPermissionsUpdateChildAccounts {
s = append(s, "UPDATE_CHILD_ACCOUNTS")
}
if x&AccountPermissionsDeleteChildAccounts == AccountPermissionsDeleteChildAccounts {
s = append(s, "DELETE_CHILD_ACCOUNTS")
}
if x&AccountPermissionsCreateChildAccountUsers == AccountPermissionsCreateChildAccountUsers {
s = append(s, "CREATE_CHILD_ACCOUNT_USERS")
}
if x&AccountPermissionsGetChildAccounts == AccountPermissionsGetChildAccounts {
s = append(s, "GET_CHILD_ACCOUNTS")
}
if x&AccountPermissionsGetChildAccountUsers == AccountPermissionsGetChildAccountUsers {
s = append(s, "GET_CHILD_ACCOUNT_USERS")
}
if x&AccountPermissionsManageChildAccounts == AccountPermissionsManageChildAccounts {
s = append(s, "MANAGE_CHILD_ACCOUNTS")
}
if x&AccountPermissionsCreateLocalGroups == AccountPermissionsCreateLocalGroups {
s = append(s, "CREATE_LOCAL_GROUPS")
}
if x&AccountPermissionsCreateExternalGroups == AccountPermissionsCreateExternalGroups {
s = append(s, "CREATE_EXTERNAL_GROUPS")
}
if x&AccountPermissionsAllowQuorumReviewer == AccountPermissionsAllowQuorumReviewer {
s = append(s, "ALLOW_QUORUM_REVIEWER")
}
if x&AccountPermissionsAllowKeyCustodian == AccountPermissionsAllowKeyCustodian {
s = append(s, "ALLOW_KEY_CUSTODIAN")
}
if x&AccountPermissionsGetAllApprovalRequests == AccountPermissionsGetAllApprovalRequests {
s = append(s, "GET_ALL_APPROVAL_REQUESTS")
}
if x&AccountPermissionsGetAdminApps == AccountPermissionsGetAdminApps {
s = append(s, "GET_ADMIN_APPS")
}
if x&AccountPermissionsGetCustomRoles == AccountPermissionsGetCustomRoles {
s = append(s, "GET_CUSTOM_ROLES")
}
if x&AccountPermissionsGetExternalRoles == AccountPermissionsGetExternalRoles {
s = append(s, "GET_EXTERNAL_ROLES")
}
if x&AccountPermissionsGetAllUsers == AccountPermissionsGetAllUsers {
s = append(s, "GET_ALL_USERS")
}
if x&AccountPermissionsGetAccountUsage == AccountPermissionsGetAccountUsage {
s = append(s, "GET_ACCOUNT_USAGE")
}
return json.Marshal(s)
}
// UnmarshalJSON converts array of strings to AccountPermissions
func (x *AccountPermissions) UnmarshalJSON(data []byte) error {
*x = 0
var s []string
if err := json.Unmarshal(data, &s); err != nil {
return err
}
for _, v := range s {
switch v {
case "MANAGE_LOGGING":
*x = *x | AccountPermissionsManageLogging
case "MANAGE_AUTH":
*x = *x | AccountPermissionsManageAuth
case "MANAGE_WORKSPACE_CSE":
*x = *x | AccountPermissionsManageWorkspaceCse
case "UNWRAP_WORKSPACE_CSE_PRIVILEGED":
*x = *x | AccountPermissionsUnwrapWorkspaceCsePrivileged
case "MANAGE_ACCOUNT_CLIENT_CONFIGS":
*x = *x | AccountPermissionsManageAccountClientConfigs
case "CREATE_ACCOUNT_APPROVAL_POLICY":
*x = *x | AccountPermissionsCreateAccountApprovalPolicy
case "SET_APPROVAL_REQUEST_EXPIRY":
*x = *x | AccountPermissionsSetApprovalRequestExpiry
case "UPDATE_ACCOUNT_CUSTOM_METADATA_ATTRIBUTES":
*x = *x | AccountPermissionsUpdateAccountCustomMetadataAttributes
case "MANAGE_ACCOUNT_SUBSCRIPTION":
*x = *x | AccountPermissionsManageAccountSubscription
case "MANAGE_ACCOUNT_PROFILE":
*x = *x | AccountPermissionsManageAccountProfile
case "DELETE_ACCOUNT":
*x = *x | AccountPermissionsDeleteAccount
case "CREATE_ADMIN_APPS":
*x = *x | AccountPermissionsCreateAdminApps
case "UPDATE_ADMIN_APPS":
*x = *x | AccountPermissionsUpdateAdminApps
case "DELETE_ADMIN_APPS":
*x = *x | AccountPermissionsDeleteAdminApps
case "RETRIEVE_ADMIN_APP_SECRETS":
*x = *x | AccountPermissionsRetrieveAdminAppSecrets
case "MANAGE_ADMIN_APPS":
*x = *x | AccountPermissionsManageAdminApps
case "CREATE_CUSTOM_ROLES":
*x = *x | AccountPermissionsCreateCustomRoles
case "UPDATE_CUSTOM_ROLES":
*x = *x | AccountPermissionsUpdateCustomRoles
case "DELETE_CUSTOM_ROLES":
*x = *x | AccountPermissionsDeleteCustomRoles
case "MANAGE_CUSTOM_ROLES":
*x = *x | AccountPermissionsManageCustomRoles
case "INVITE_USERS_TO_ACCOUNT":
*x = *x | AccountPermissionsInviteUsersToAccount
case "DELETE_USERS_FROM_ACCOUNT":
*x = *x | AccountPermissionsDeleteUsersFromAccount
case "UPDATE_USERS_ACCOUNT_ROLE":
*x = *x | AccountPermissionsUpdateUsersAccountRole
case "UPDATE_USERS_ACCOUNT_ENABLED_STATE":
*x = *x | AccountPermissionsUpdateUsersAccountEnabledState
case "MANAGE_ACCOUNT_USERS":
*x = *x | AccountPermissionsManageAccountUsers
case "CREATE_EXTERNAL_ROLES":
*x = *x | AccountPermissionsCreateExternalRoles
case "SYNC_EXTERNAL_ROLES":
*x = *x | AccountPermissionsSyncExternalRoles
case "DELETE_EXTERNAL_ROLES":
*x = *x | AccountPermissionsDeleteExternalRoles
case "MANAGE_EXTERNAL_ROLES":
*x = *x | AccountPermissionsManageExternalRoles
case "CREATE_ACCOUNT_SOBJECT_POLICIES":
*x = *x | AccountPermissionsCreateAccountSobjectPolicies
case "UPDATE_ACCOUNT_SOBJECT_POLICIES":
*x = *x | AccountPermissionsUpdateAccountSobjectPolicies
case "DELETE_ACCOUNT_SOBJECT_POLICIES":
*x = *x | AccountPermissionsDeleteAccountSobjectPolicies
case "MANAGE_ACCOUNT_SOBJECT_POLICIES":
*x = *x | AccountPermissionsManageAccountSobjectPolicies
case "CREATE_CHILD_ACCOUNTS":
*x = *x | AccountPermissionsCreateChildAccounts
case "UPDATE_CHILD_ACCOUNTS":
*x = *x | AccountPermissionsUpdateChildAccounts
case "DELETE_CHILD_ACCOUNTS":
*x = *x | AccountPermissionsDeleteChildAccounts
case "CREATE_CHILD_ACCOUNT_USERS":
*x = *x | AccountPermissionsCreateChildAccountUsers
case "GET_CHILD_ACCOUNTS":
*x = *x | AccountPermissionsGetChildAccounts
case "GET_CHILD_ACCOUNT_USERS":
*x = *x | AccountPermissionsGetChildAccountUsers
case "MANAGE_CHILD_ACCOUNTS":
*x = *x | AccountPermissionsManageChildAccounts
case "CREATE_LOCAL_GROUPS":
*x = *x | AccountPermissionsCreateLocalGroups
case "CREATE_EXTERNAL_GROUPS":
*x = *x | AccountPermissionsCreateExternalGroups
case "ALLOW_QUORUM_REVIEWER":
*x = *x | AccountPermissionsAllowQuorumReviewer
case "ALLOW_KEY_CUSTODIAN":
*x = *x | AccountPermissionsAllowKeyCustodian
case "GET_ALL_APPROVAL_REQUESTS":
*x = *x | AccountPermissionsGetAllApprovalRequests
case "GET_ADMIN_APPS":
*x = *x | AccountPermissionsGetAdminApps
case "GET_CUSTOM_ROLES":
*x = *x | AccountPermissionsGetCustomRoles
case "GET_EXTERNAL_ROLES":
*x = *x | AccountPermissionsGetExternalRoles
case "GET_ALL_USERS":
*x = *x | AccountPermissionsGetAllUsers
case "GET_ACCOUNT_USAGE":
*x = *x | AccountPermissionsGetAccountUsage
}
}
return nil
}
type AesOptions struct {
KeySizes *[]uint32 `json:"key_sizes,omitempty"`
Fpe *FpeOptions `json:"fpe,omitempty"`
TagLength *int32 `json:"tag_length,omitempty"`
CipherMode *CipherMode `json:"cipher_mode,omitempty"`
RandomIv *bool `json:"random_iv,omitempty"`
IvLength *int32 `json:"iv_length,omitempty"`
}
// A cryptographic algorithm.
type Algorithm string
// List of supported Algorithm values
const (
AlgorithmAes Algorithm = "AES"
AlgorithmAria Algorithm = "ARIA"
AlgorithmDes Algorithm = "DES"
AlgorithmDes3 Algorithm = "DES3"
AlgorithmSeed Algorithm = "SEED"
AlgorithmRsa Algorithm = "RSA"
AlgorithmDsa Algorithm = "DSA"
AlgorithmKcdsa Algorithm = "KCDSA"
AlgorithmEc Algorithm = "EC"
AlgorithmEcKcdsa Algorithm = "ECKCDSA"
AlgorithmBip32 Algorithm = "BIP32"
AlgorithmBls Algorithm = "BLS"
AlgorithmLms Algorithm = "LMS"
AlgorithmHmac Algorithm = "HMAC"
AlgorithmLedaBeta Algorithm = "LEDABETA"
AlgorithmRound5Beta Algorithm = "ROUND5BETA"
AlgorithmPbe Algorithm = "PBE"
)
// A helper enum with a single variant, All, which indicates that something should apply to an
// entire part. (This is here mainly to allow other untagged enums to work properly.)
type All string
// List of supported All values
const (
AllAll All = "all"
)
type ApiPath struct {
APIPath string `json:"api_path"`
Method HyperHttpMethod `json:"method"`
Context TepKeyContext `json:"context"`
KeyPath string `json:"key_path"`
}
// Operations allowed to be performed by an app.
type AppPermissions uint64
// List of supported AppPermissions values
const (
AppPermissionsSign AppPermissions = 1 << iota
AppPermissionsVerify
AppPermissionsEncrypt
AppPermissionsDecrypt
AppPermissionsWrapkey
AppPermissionsUnwrapkey
AppPermissionsDerivekey
AppPermissionsMacgenerate
AppPermissionsMacverify
AppPermissionsExport
AppPermissionsManage
AppPermissionsAgreekey
AppPermissionsMaskdecrypt
AppPermissionsAudit
AppPermissionsTransform
AppPermissionsCreateSobjects
AppPermissionsCopySobjects
AppPermissionsRotateSobjects
AppPermissionsActivateSobjects
AppPermissionsRevokeSobjects
AppPermissionsRevertSobjects
AppPermissionsMoveSobjects
AppPermissionsUpdateSobjectsProfile
AppPermissionsUpdateSobjectsEnabledState
AppPermissionsUpdateSobjectPolicies
AppPermissionsUpdateKeyOps
AppPermissionsDeleteKeyMaterial
AppPermissionsDeleteSobjects
AppPermissionsDestroySobjects
AppPermissionsRestoreExternalSobjects
AppPermissionsCalculateDigest
)
// MarshalJSON converts AppPermissions to an array of strings
func (x AppPermissions) MarshalJSON() ([]byte, error) {
s := make([]string, 0)
if x&AppPermissionsSign == AppPermissionsSign {
s = append(s, "SIGN")
}
if x&AppPermissionsVerify == AppPermissionsVerify {
s = append(s, "VERIFY")
}
if x&AppPermissionsEncrypt == AppPermissionsEncrypt {
s = append(s, "ENCRYPT")
}
if x&AppPermissionsDecrypt == AppPermissionsDecrypt {
s = append(s, "DECRYPT")
}
if x&AppPermissionsWrapkey == AppPermissionsWrapkey {
s = append(s, "WRAPKEY")
}
if x&AppPermissionsUnwrapkey == AppPermissionsUnwrapkey {
s = append(s, "UNWRAPKEY")
}
if x&AppPermissionsDerivekey == AppPermissionsDerivekey {
s = append(s, "DERIVEKEY")
}
if x&AppPermissionsMacgenerate == AppPermissionsMacgenerate {
s = append(s, "MACGENERATE")
}
if x&AppPermissionsMacverify == AppPermissionsMacverify {
s = append(s, "MACVERIFY")
}
if x&AppPermissionsExport == AppPermissionsExport {
s = append(s, "EXPORT")
}
if x&AppPermissionsManage == AppPermissionsManage {
s = append(s, "MANAGE")
}
if x&AppPermissionsAgreekey == AppPermissionsAgreekey {
s = append(s, "AGREEKEY")
}
if x&AppPermissionsMaskdecrypt == AppPermissionsMaskdecrypt {
s = append(s, "MASKDECRYPT")
}
if x&AppPermissionsAudit == AppPermissionsAudit {
s = append(s, "AUDIT")
}
if x&AppPermissionsTransform == AppPermissionsTransform {
s = append(s, "TRANSFORM")
}
if x&AppPermissionsCreateSobjects == AppPermissionsCreateSobjects {
s = append(s, "CREATE_SOBJECTS")
}
if x&AppPermissionsCopySobjects == AppPermissionsCopySobjects {
s = append(s, "COPY_SOBJECTS")
}
if x&AppPermissionsRotateSobjects == AppPermissionsRotateSobjects {
s = append(s, "ROTATE_SOBJECTS")
}
if x&AppPermissionsActivateSobjects == AppPermissionsActivateSobjects {
s = append(s, "ACTIVATE_SOBJECTS")
}
if x&AppPermissionsRevokeSobjects == AppPermissionsRevokeSobjects {
s = append(s, "REVOKE_SOBJECTS")
}
if x&AppPermissionsRevertSobjects == AppPermissionsRevertSobjects {
s = append(s, "REVERT_SOBJECTS")
}
if x&AppPermissionsMoveSobjects == AppPermissionsMoveSobjects {
s = append(s, "MOVE_SOBJECTS")
}
if x&AppPermissionsUpdateSobjectsProfile == AppPermissionsUpdateSobjectsProfile {
s = append(s, "UPDATE_SOBJECTS_PROFILE")
}
if x&AppPermissionsUpdateSobjectsEnabledState == AppPermissionsUpdateSobjectsEnabledState {
s = append(s, "UPDATE_SOBJECTS_ENABLED_STATE")
}
if x&AppPermissionsUpdateSobjectPolicies == AppPermissionsUpdateSobjectPolicies {
s = append(s, "UPDATE_SOBJECT_POLICIES")
}
if x&AppPermissionsUpdateKeyOps == AppPermissionsUpdateKeyOps {
s = append(s, "UPDATE_KEY_OPS")
}
if x&AppPermissionsDeleteKeyMaterial == AppPermissionsDeleteKeyMaterial {
s = append(s, "DELETE_KEY_MATERIAL")
}
if x&AppPermissionsDeleteSobjects == AppPermissionsDeleteSobjects {
s = append(s, "DELETE_SOBJECTS")
}
if x&AppPermissionsDestroySobjects == AppPermissionsDestroySobjects {
s = append(s, "DESTROY_SOBJECTS")
}
if x&AppPermissionsRestoreExternalSobjects == AppPermissionsRestoreExternalSobjects {
s = append(s, "RESTORE_EXTERNAL_SOBJECTS")
}
if x&AppPermissionsCalculateDigest == AppPermissionsCalculateDigest {
s = append(s, "CALCULATE_DIGEST")
}
return json.Marshal(s)
}
// UnmarshalJSON converts array of strings to AppPermissions
func (x *AppPermissions) UnmarshalJSON(data []byte) error {
*x = 0
var s []string
if err := json.Unmarshal(data, &s); err != nil {
return err
}
for _, v := range s {
switch v {
case "SIGN":
*x = *x | AppPermissionsSign
case "VERIFY":
*x = *x | AppPermissionsVerify
case "ENCRYPT":
*x = *x | AppPermissionsEncrypt
case "DECRYPT":
*x = *x | AppPermissionsDecrypt
case "WRAPKEY":
*x = *x | AppPermissionsWrapkey
case "UNWRAPKEY":
*x = *x | AppPermissionsUnwrapkey
case "DERIVEKEY":
*x = *x | AppPermissionsDerivekey
case "MACGENERATE":
*x = *x | AppPermissionsMacgenerate
case "MACVERIFY":
*x = *x | AppPermissionsMacverify
case "EXPORT":
*x = *x | AppPermissionsExport
case "MANAGE":
*x = *x | AppPermissionsManage
case "AGREEKEY":
*x = *x | AppPermissionsAgreekey
case "MASKDECRYPT":
*x = *x | AppPermissionsMaskdecrypt
case "AUDIT":
*x = *x | AppPermissionsAudit
case "TRANSFORM":
*x = *x | AppPermissionsTransform
case "CREATE_SOBJECTS":
*x = *x | AppPermissionsCreateSobjects
case "COPY_SOBJECTS":
*x = *x | AppPermissionsCopySobjects
case "ROTATE_SOBJECTS":
*x = *x | AppPermissionsRotateSobjects
case "ACTIVATE_SOBJECTS":
*x = *x | AppPermissionsActivateSobjects
case "REVOKE_SOBJECTS":
*x = *x | AppPermissionsRevokeSobjects
case "REVERT_SOBJECTS":
*x = *x | AppPermissionsRevertSobjects
case "MOVE_SOBJECTS":
*x = *x | AppPermissionsMoveSobjects
case "UPDATE_SOBJECTS_PROFILE":
*x = *x | AppPermissionsUpdateSobjectsProfile
case "UPDATE_SOBJECTS_ENABLED_STATE":
*x = *x | AppPermissionsUpdateSobjectsEnabledState
case "UPDATE_SOBJECT_POLICIES":
*x = *x | AppPermissionsUpdateSobjectPolicies
case "UPDATE_KEY_OPS":
*x = *x | AppPermissionsUpdateKeyOps
case "DELETE_KEY_MATERIAL":
*x = *x | AppPermissionsDeleteKeyMaterial
case "DELETE_SOBJECTS":
*x = *x | AppPermissionsDeleteSobjects
case "DESTROY_SOBJECTS":
*x = *x | AppPermissionsDestroySobjects
case "RESTORE_EXTERNAL_SOBJECTS":
*x = *x | AppPermissionsRestoreExternalSobjects
case "CALCULATE_DIGEST":
*x = *x | AppPermissionsCalculateDigest
}
}
return nil
}
// Authentication requirements for approval request reviewers.
type ApprovalAuthConfig struct {
RequirePassword *bool `json:"require_password,omitempty"`
Require2fa *bool `json:"require_2fa,omitempty"`
}
type AriaOptions struct {
KeySizes *[]uint32 `json:"key_sizes,omitempty"`
TagLength *uint8 `json:"tag_length,omitempty"`
CipherMode *CipherMode `json:"cipher_mode,omitempty"`
RandomIv *bool `json:"random_iv,omitempty"`
IvLength *uint8 `json:"iv_length,omitempty"`
}
// <https://www.w3.org/TR/webauthn-2/#enum-attestation-convey>
// <https://www.w3.org/TR/webauthn-2/#sctn-attestation>
//
// If you really want to understand attestation, read the following:
//
// <https://fidoalliance.org/fido-technotes-the-truth-about-attestation/>
// <https://medium.com/webauthnworks/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651>
//
// This enum just specified how the attestation should be conveyed
// to the RP. You can see doc of the individual variants to understand
// various ways.
type AttestationConveyancePreference string
// List of supported AttestationConveyancePreference values
const (
// When RP is not interested in attestation. In this case,
// attestation statement is None and RP can't identify the
// device.
//
// <https://www.w3.org/TR/webauthn-2/#sctn-none-attestation>
//
// This maybe good for UX as attestation may need user consent.
AttestationConveyancePreferenceNone AttestationConveyancePreference = "none"
// RP prefers getting attestation statement but allows client
// to decide how to obtain it. (e.g., client may replace
// authenticator generated statement with [Anonymization CA])
//
// [Anonymization CA]: <https://www.w3.org/TR/webauthn-2/#anonymization-ca>
AttestationConveyancePreferenceIndirect AttestationConveyancePreference = "indirect"
// RP wants attestation statement as generated by the authenticator.
AttestationConveyancePreferenceDirect AttestationConveyancePreference = "direct"
// RP wants attestation statement which can uniquely identify
// the authenticator. Generally meant for enterpise use.
// See spec for more info.
AttestationConveyancePreferenceEnterprise AttestationConveyancePreference = "enterprise"
)
// LDAP authentication settings.
type AuthConfigLdap struct {
Name string `json:"name"`
IconURL string `json:"icon_url"`
LdapURL string `json:"ldap_url"`
DnResolution LdapDnResolution `json:"dn_resolution"`
TLS TlsConfig `json:"tls"`
BaseDn *string `json:"base_dn,omitempty"`
UserObjectClass *string `json:"user_object_class,omitempty"`
ServiceAccount *LdapServiceAccount `json:"service_account,omitempty"`
Authorization *LdapAuthorizationConfig `json:"authorization,omitempty"`
}
// Extensions for webauthn. For every extension input, an
// output must be returned if the input was considered.
//
// https://www.w3.org/TR/webauthn-2/#dictdef-authenticationextensionsclientinputs
type AuthenticationExtensionsClientInputs struct {
// This extension excludes authenticators during registration
// based on legacy u2f key handles specified in "excludeCredentials".
// If that key handle was created with that device, it is excluded.
//
// https://www.w3.org/TR/webauthn-2/#sctn-appid-exclude-extension
AppidExclude *string `json:"appidExclude,omitempty"`
// This extension allows RPs that have previously registered a cred
// using legacy U2F APIs to request an assertion.
//
// https://www.w3.org/TR/webauthn-2/#sctn-appid-extension
Appid *string `json:"appid,omitempty"`
// Dummy extension used by conformance tests
Example *bool `json:"example.extension.bool,omitempty"`
}
// This is the response of extension inputs. For every input,
// an output must be returned if the input was considered.
//
// <https://www.w3.org/TR/webauthn-2/#iface-authentication-extensions-client-outputs>
type AuthenticationExtensionsClientOutputs struct {
// Response of `appidExclude` extension.
// See [AuthenticationExtensionsClientInputs::appid_exclude].
AppidExclude *bool `json:"appidExclude,omitempty"`
// Response of `appid` extension.
// See [AuthenticationExtensionsClientInputs::appid].
Appid *bool `json:"appid,omitempty"`
}
// <https://www.w3.org/TR/webauthn-2/#iface-authenticatorassertionresponse>
type AuthenticatorAssertionResponse struct {
// Base64url of client_data in JSON format.
ClientDataJson Base64UrlSafe `json:"clientDataJSON"`
// Data returned by authenticator.
// <https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data>
AuthenticatorData Base64UrlSafe `json:"authenticatorData"`
// Raw signature returned by authenticator.
// <https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion>
Signature Base64UrlSafe `json:"signature"`
// Corresponds to [PublicKeyCredentialUserEntity::id] sent during
// credential creation.
UserHandle *Base64UrlSafe `json:"userHandle,omitempty"`
}
// <https://www.w3.org/TR/webauthn-2/#enumdef-authenticatorattachment>
type AuthenticatorAttachment string
// List of supported AuthenticatorAttachment values
const (
// An authenticator that is part of the client
// device. Usually not removable from the client
// device.
AuthenticatorAttachmentPlatform AuthenticatorAttachment = "platform"
// Authenticator that can be removed and used on various
// devices via cross-platform transport protocols.
AuthenticatorAttachmentCrossPlatform AuthenticatorAttachment = "cross-platform"
)
// Parameters for deciding which authenticators should be selected.
//
// <https://www.w3.org/TR/webauthn-2/#dictdef-authenticatorselectioncriteria>
type AuthenticatorSelectionCriteria struct {
// Kind of authenticator attachment: attached to the
// client device or a roaming authenticator.
// See type level doc for more info.
AuthenticatorAttachment *AuthenticatorAttachment `json:"authenticatorAttachment,omitempty"`
// Preference about creating resident keys or not.
// See type level doc for more info.
ResidentKey *ResidentKeyRequirement `json:"residentKey,omitempty"`
// Exists for backcompat with webauthn level 1.
// By default it is false and should be set to true
// if `residentKey` is set to `required`.
RequireResidentKey *bool `json:"requireResidentKey,omitempty"`
// Authenticator should support user verification by
// ways like pin code, biometrics, etc.
UserVerification *UserVerificationRequirement `json:"userVerification,omitempty"`
}
// Hints by relying party on how client should communicate
// with the authenticator.
//
// https://www.w3.org/TR/webauthn-2/#enum-transport
type AuthenticatorTransport struct {
// Values known to the spec and DSM.
Known *AuthenticatorTransportInner
// Unknown values are stored as spec asks to do so.
// As per the spec level 3 (which is draft):
// "The values SHOULD be members of AuthenticatorTransport
// but Relying Parties SHOULD accept and store unknown values."
// See `[[transports]]` in https://w3c.github.io/webauthn/#iface-authenticatorattestationresponse
//
// Level 2 also says that but comparitively unclear.
// "The values SHOULD be members of AuthenticatorTransport but
// Relying Parties MUST ignore unknown values."
// See `[[transports]]` in https://www.w3.org/TR/webauthn-2/#iface-authenticatorattestationresponse
Unknown *string
}
func (x AuthenticatorTransport) MarshalJSON() ([]byte, error) {
if err := checkEnumPointers(
"AuthenticatorTransport",
[]bool{x.Known != nil,
x.Unknown != nil}); err != nil {
return nil, err
}
if x.Known != nil {
return json.Marshal(x.Known)
}
if x.Unknown != nil {
return json.Marshal(x.Unknown)
}
panic("unreachable")
}
func (x *AuthenticatorTransport) UnmarshalJSON(data []byte) error {
x.Known = nil
x.Unknown = nil
var known AuthenticatorTransportInner
if err := json.Unmarshal(data, &known); err == nil {
x.Known = &known
return nil
}
var unknown string
if err := json.Unmarshal(data, &unknown); err == nil {
x.Unknown = &unknown
return nil
}
return errors.Errorf("not a valid AuthenticatorTransport")
}
// See [AuthenticatorTransport] type.
type AuthenticatorTransportInner string
// List of supported AuthenticatorTransportInner values
const (
// Over removable USB.
AuthenticatorTransportInnerUsb AuthenticatorTransportInner = "usb"
// Over Near Field Communication (NFC).
AuthenticatorTransportInnerNfc AuthenticatorTransportInner = "nfc"
// Over Bluetooth Smart (Bluetooth Low Energy / BLE).
AuthenticatorTransportInnerBle AuthenticatorTransportInner = "ble"
// Indicates the respective authenticator is contacted using
// a client device-specific transport, i.e., it is a platform
// authenticator. These authenticators are not removable from
// the client device.
AuthenticatorTransportInnerInternal AuthenticatorTransportInner = "internal"
)
// Information and properties of AWS KMS resources. Currently,
// it only contains information specific to AWS multi region keys.
type AwsKmsInfo struct {
MultiRegion *AwsMultiRegionInfo `json:"multi_region,omitempty"`
}
// This structure mentions various properties
// of AWS multi region keys.
// https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
type AwsMultiRegionInfo struct {
// Specifies the type of multi region key to be
// either a Primary key or a Replica key.
MultiRegionKeyType AwsMultiRegionKeyType `json:"multi_region_key_type"`
// Specifies a replica key's primary key ARN.
PrimaryKeyArn *string `json:"primary_key_arn,omitempty"`
// Specifies ARNs of a primary key's replicas.
ReplicaKeyArns *[]string `json:"replica_key_arns,omitempty"`
}
// Specifies the type of multi-Region keys.
// https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#multi-region-concepts
type AwsMultiRegionKeyType string
// List of supported AwsMultiRegionKeyType values
const (
AwsMultiRegionKeyTypePrimary AwsMultiRegionKeyType = "PRIMARY"
AwsMultiRegionKeyTypeReplica AwsMultiRegionKeyType = "REPLICA"
)
// The BIP32 network
// The Testnet network is usually an actual network with nodes and miners, and
// free cryptocurrency. This provides a testing environment for developers.
type Bip32Network string
// List of supported Bip32Network values
const (
Bip32NetworkMainnet Bip32Network = "mainnet"
Bip32NetworkTestnet Bip32Network = "testnet"
)
type Bip32Options struct {
// The BIP32 path, starting from master. Master key is Some([]).
// Ex: m/42/42'/0 -> Some([42, 2**31 + 42, 0])
DerivationPath *[]uint32 `json:"derivation_path,omitempty"`
Network *Bip32Network `json:"network,omitempty"`
}
type BlsOptions struct {
Variant BlsVariant `json:"variant"`
}
type BlsOptionsPolicy struct {
}
// Signature/public-key size trade-off for BLS.
type BlsVariant string
// List of supported BlsVariant values
const (
BlsVariantSmallSignatures BlsVariant = "small_signatures"
BlsVariantSmallPublicKeys BlsVariant = "small_public_keys"
)
// CA settings.
type CaConfig struct {
CaSet *CaSet
Pinned *[]Blob
}
func (x CaConfig) MarshalJSON() ([]byte, error) {
if err := checkEnumPointers(
"CaConfig",
[]bool{x.CaSet != nil,
x.Pinned != nil}); err != nil {
return nil, err
}
var obj struct {
CaSet *CaSet `json:"ca_set,omitempty"`
Pinned *[]Blob `json:"pinned,omitempty"`
}
obj.CaSet = x.CaSet
obj.Pinned = x.Pinned
return json.Marshal(obj)
}
func (x *CaConfig) UnmarshalJSON(data []byte) error {
x.CaSet = nil