@scaleway/sdk-iam 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,683 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const randomName = require("@scaleway/random-name");
4
+ const sdkClient = require("@scaleway/sdk-client");
5
+ const unmarshalJWT = (data) => {
6
+ if (!sdkClient.isJSONObject(data)) {
7
+ throw new TypeError(
8
+ `Unmarshalling the type 'JWT' failed as data isn't a dictionary.`
9
+ );
10
+ }
11
+ return {
12
+ audienceId: data.audience_id,
13
+ createdAt: sdkClient.unmarshalDate(data.created_at),
14
+ expiresAt: sdkClient.unmarshalDate(data.expires_at),
15
+ ip: data.ip,
16
+ issuerId: data.issuer_id,
17
+ jti: data.jti,
18
+ updatedAt: sdkClient.unmarshalDate(data.updated_at),
19
+ userAgent: data.user_agent
20
+ };
21
+ };
22
+ const unmarshalAPIKey = (data) => {
23
+ if (!sdkClient.isJSONObject(data)) {
24
+ throw new TypeError(
25
+ `Unmarshalling the type 'APIKey' failed as data isn't a dictionary.`
26
+ );
27
+ }
28
+ return {
29
+ accessKey: data.access_key,
30
+ applicationId: data.application_id,
31
+ createdAt: sdkClient.unmarshalDate(data.created_at),
32
+ creationIp: data.creation_ip,
33
+ defaultProjectId: data.default_project_id,
34
+ deletable: data.deletable,
35
+ description: data.description,
36
+ editable: data.editable,
37
+ expiresAt: sdkClient.unmarshalDate(data.expires_at),
38
+ managed: data.managed,
39
+ secretKey: data.secret_key,
40
+ updatedAt: sdkClient.unmarshalDate(data.updated_at),
41
+ userId: data.user_id
42
+ };
43
+ };
44
+ const unmarshalApplication = (data) => {
45
+ if (!sdkClient.isJSONObject(data)) {
46
+ throw new TypeError(
47
+ `Unmarshalling the type 'Application' failed as data isn't a dictionary.`
48
+ );
49
+ }
50
+ return {
51
+ createdAt: sdkClient.unmarshalDate(data.created_at),
52
+ deletable: data.deletable,
53
+ description: data.description,
54
+ editable: data.editable,
55
+ id: data.id,
56
+ managed: data.managed,
57
+ name: data.name,
58
+ nbApiKeys: data.nb_api_keys,
59
+ organizationId: data.organization_id,
60
+ tags: data.tags,
61
+ updatedAt: sdkClient.unmarshalDate(data.updated_at)
62
+ };
63
+ };
64
+ const unmarshalGroup = (data) => {
65
+ if (!sdkClient.isJSONObject(data)) {
66
+ throw new TypeError(
67
+ `Unmarshalling the type 'Group' failed as data isn't a dictionary.`
68
+ );
69
+ }
70
+ return {
71
+ applicationIds: data.application_ids,
72
+ createdAt: sdkClient.unmarshalDate(data.created_at),
73
+ deletable: data.deletable,
74
+ description: data.description,
75
+ editable: data.editable,
76
+ id: data.id,
77
+ managed: data.managed,
78
+ name: data.name,
79
+ organizationId: data.organization_id,
80
+ tags: data.tags,
81
+ updatedAt: sdkClient.unmarshalDate(data.updated_at),
82
+ userIds: data.user_ids
83
+ };
84
+ };
85
+ const unmarshalLog = (data) => {
86
+ if (!sdkClient.isJSONObject(data)) {
87
+ throw new TypeError(
88
+ `Unmarshalling the type 'Log' failed as data isn't a dictionary.`
89
+ );
90
+ }
91
+ return {
92
+ action: data.action,
93
+ bearerId: data.bearer_id,
94
+ createdAt: sdkClient.unmarshalDate(data.created_at),
95
+ id: data.id,
96
+ ip: data.ip,
97
+ organizationId: data.organization_id,
98
+ resourceId: data.resource_id,
99
+ resourceType: data.resource_type,
100
+ userAgent: data.user_agent
101
+ };
102
+ };
103
+ const unmarshalPolicy = (data) => {
104
+ if (!sdkClient.isJSONObject(data)) {
105
+ throw new TypeError(
106
+ `Unmarshalling the type 'Policy' failed as data isn't a dictionary.`
107
+ );
108
+ }
109
+ return {
110
+ applicationId: data.application_id,
111
+ createdAt: sdkClient.unmarshalDate(data.created_at),
112
+ deletable: data.deletable,
113
+ description: data.description,
114
+ editable: data.editable,
115
+ groupId: data.group_id,
116
+ id: data.id,
117
+ managed: data.managed,
118
+ name: data.name,
119
+ nbPermissionSets: data.nb_permission_sets,
120
+ nbRules: data.nb_rules,
121
+ nbScopes: data.nb_scopes,
122
+ noPrincipal: data.no_principal,
123
+ organizationId: data.organization_id,
124
+ tags: data.tags,
125
+ updatedAt: sdkClient.unmarshalDate(data.updated_at),
126
+ userId: data.user_id
127
+ };
128
+ };
129
+ const unmarshalQuotumLimit = (data) => {
130
+ if (!sdkClient.isJSONObject(data)) {
131
+ throw new TypeError(
132
+ `Unmarshalling the type 'QuotumLimit' failed as data isn't a dictionary.`
133
+ );
134
+ }
135
+ return {
136
+ global: data.global,
137
+ limit: data.limit,
138
+ region: data.region,
139
+ unlimited: data.unlimited,
140
+ zone: data.zone
141
+ };
142
+ };
143
+ const unmarshalQuotum = (data) => {
144
+ if (!sdkClient.isJSONObject(data)) {
145
+ throw new TypeError(
146
+ `Unmarshalling the type 'Quotum' failed as data isn't a dictionary.`
147
+ );
148
+ }
149
+ return {
150
+ description: data.description,
151
+ limit: data.limit,
152
+ limits: sdkClient.unmarshalArrayOfObject(data.limits, unmarshalQuotumLimit),
153
+ localityType: data.locality_type,
154
+ name: data.name,
155
+ prettyName: data.pretty_name,
156
+ unit: data.unit,
157
+ unlimited: data.unlimited
158
+ };
159
+ };
160
+ const unmarshalSSHKey = (data) => {
161
+ if (!sdkClient.isJSONObject(data)) {
162
+ throw new TypeError(
163
+ `Unmarshalling the type 'SSHKey' failed as data isn't a dictionary.`
164
+ );
165
+ }
166
+ return {
167
+ createdAt: sdkClient.unmarshalDate(data.created_at),
168
+ disabled: data.disabled,
169
+ fingerprint: data.fingerprint,
170
+ id: data.id,
171
+ name: data.name,
172
+ organizationId: data.organization_id,
173
+ projectId: data.project_id,
174
+ publicKey: data.public_key,
175
+ updatedAt: sdkClient.unmarshalDate(data.updated_at)
176
+ };
177
+ };
178
+ const unmarshalUser = (data) => {
179
+ if (!sdkClient.isJSONObject(data)) {
180
+ throw new TypeError(
181
+ `Unmarshalling the type 'User' failed as data isn't a dictionary.`
182
+ );
183
+ }
184
+ return {
185
+ accountRootUserId: data.account_root_user_id,
186
+ createdAt: sdkClient.unmarshalDate(data.created_at),
187
+ deletable: data.deletable,
188
+ email: data.email,
189
+ firstName: data.first_name,
190
+ id: data.id,
191
+ lastLoginAt: sdkClient.unmarshalDate(data.last_login_at),
192
+ lastName: data.last_name,
193
+ locale: data.locale,
194
+ locked: data.locked,
195
+ mfa: data.mfa,
196
+ organizationId: data.organization_id,
197
+ phoneNumber: data.phone_number,
198
+ status: data.status,
199
+ tags: data.tags,
200
+ twoFactorEnabled: data.two_factor_enabled,
201
+ type: data.type,
202
+ updatedAt: sdkClient.unmarshalDate(data.updated_at),
203
+ username: data.username
204
+ };
205
+ };
206
+ const unmarshalEncodedJWT = (data) => {
207
+ if (!sdkClient.isJSONObject(data)) {
208
+ throw new TypeError(
209
+ `Unmarshalling the type 'EncodedJWT' failed as data isn't a dictionary.`
210
+ );
211
+ }
212
+ return {
213
+ jwt: data.jwt ? unmarshalJWT(data.jwt) : void 0,
214
+ renewToken: data.renew_token,
215
+ token: data.token
216
+ };
217
+ };
218
+ const unmarshalConnectionConnectedOrganization = (data) => {
219
+ if (!sdkClient.isJSONObject(data)) {
220
+ throw new TypeError(
221
+ `Unmarshalling the type 'ConnectionConnectedOrganization' failed as data isn't a dictionary.`
222
+ );
223
+ }
224
+ return {
225
+ id: data.id,
226
+ locked: data.locked,
227
+ name: data.name
228
+ };
229
+ };
230
+ const unmarshalConnectionConnectedUser = (data) => {
231
+ if (!sdkClient.isJSONObject(data)) {
232
+ throw new TypeError(
233
+ `Unmarshalling the type 'ConnectionConnectedUser' failed as data isn't a dictionary.`
234
+ );
235
+ }
236
+ return {
237
+ id: data.id,
238
+ type: data.type,
239
+ username: data.username
240
+ };
241
+ };
242
+ const unmarshalConnection = (data) => {
243
+ if (!sdkClient.isJSONObject(data)) {
244
+ throw new TypeError(
245
+ `Unmarshalling the type 'Connection' failed as data isn't a dictionary.`
246
+ );
247
+ }
248
+ return {
249
+ organization: data.organization ? unmarshalConnectionConnectedOrganization(data.organization) : void 0,
250
+ user: data.user ? unmarshalConnectionConnectedUser(data.user) : void 0
251
+ };
252
+ };
253
+ const unmarshalGetUserConnectionsResponse = (data) => {
254
+ if (!sdkClient.isJSONObject(data)) {
255
+ throw new TypeError(
256
+ `Unmarshalling the type 'GetUserConnectionsResponse' failed as data isn't a dictionary.`
257
+ );
258
+ }
259
+ return {
260
+ connections: sdkClient.unmarshalArrayOfObject(data.connections, unmarshalConnection)
261
+ };
262
+ };
263
+ const unmarshalListAPIKeysResponse = (data) => {
264
+ if (!sdkClient.isJSONObject(data)) {
265
+ throw new TypeError(
266
+ `Unmarshalling the type 'ListAPIKeysResponse' failed as data isn't a dictionary.`
267
+ );
268
+ }
269
+ return {
270
+ apiKeys: sdkClient.unmarshalArrayOfObject(data.api_keys, unmarshalAPIKey),
271
+ totalCount: data.total_count
272
+ };
273
+ };
274
+ const unmarshalListApplicationsResponse = (data) => {
275
+ if (!sdkClient.isJSONObject(data)) {
276
+ throw new TypeError(
277
+ `Unmarshalling the type 'ListApplicationsResponse' failed as data isn't a dictionary.`
278
+ );
279
+ }
280
+ return {
281
+ applications: sdkClient.unmarshalArrayOfObject(
282
+ data.applications,
283
+ unmarshalApplication
284
+ ),
285
+ totalCount: data.total_count
286
+ };
287
+ };
288
+ const unmarshalGracePeriod = (data) => {
289
+ if (!sdkClient.isJSONObject(data)) {
290
+ throw new TypeError(
291
+ `Unmarshalling the type 'GracePeriod' failed as data isn't a dictionary.`
292
+ );
293
+ }
294
+ return {
295
+ createdAt: sdkClient.unmarshalDate(data.created_at),
296
+ expiresAt: sdkClient.unmarshalDate(data.expires_at),
297
+ type: data.type
298
+ };
299
+ };
300
+ const unmarshalListGracePeriodsResponse = (data) => {
301
+ if (!sdkClient.isJSONObject(data)) {
302
+ throw new TypeError(
303
+ `Unmarshalling the type 'ListGracePeriodsResponse' failed as data isn't a dictionary.`
304
+ );
305
+ }
306
+ return {
307
+ gracePeriods: sdkClient.unmarshalArrayOfObject(
308
+ data.grace_periods,
309
+ unmarshalGracePeriod
310
+ )
311
+ };
312
+ };
313
+ const unmarshalListGroupsResponse = (data) => {
314
+ if (!sdkClient.isJSONObject(data)) {
315
+ throw new TypeError(
316
+ `Unmarshalling the type 'ListGroupsResponse' failed as data isn't a dictionary.`
317
+ );
318
+ }
319
+ return {
320
+ groups: sdkClient.unmarshalArrayOfObject(data.groups, unmarshalGroup),
321
+ totalCount: data.total_count
322
+ };
323
+ };
324
+ const unmarshalListJWTsResponse = (data) => {
325
+ if (!sdkClient.isJSONObject(data)) {
326
+ throw new TypeError(
327
+ `Unmarshalling the type 'ListJWTsResponse' failed as data isn't a dictionary.`
328
+ );
329
+ }
330
+ return {
331
+ jwts: sdkClient.unmarshalArrayOfObject(data.jwts, unmarshalJWT),
332
+ totalCount: data.total_count
333
+ };
334
+ };
335
+ const unmarshalListLogsResponse = (data) => {
336
+ if (!sdkClient.isJSONObject(data)) {
337
+ throw new TypeError(
338
+ `Unmarshalling the type 'ListLogsResponse' failed as data isn't a dictionary.`
339
+ );
340
+ }
341
+ return {
342
+ logs: sdkClient.unmarshalArrayOfObject(data.logs, unmarshalLog),
343
+ totalCount: data.total_count
344
+ };
345
+ };
346
+ const unmarshalPermissionSet = (data) => {
347
+ if (!sdkClient.isJSONObject(data)) {
348
+ throw new TypeError(
349
+ `Unmarshalling the type 'PermissionSet' failed as data isn't a dictionary.`
350
+ );
351
+ }
352
+ return {
353
+ categories: data.categories,
354
+ description: data.description,
355
+ id: data.id,
356
+ name: data.name,
357
+ scopeType: data.scope_type
358
+ };
359
+ };
360
+ const unmarshalListPermissionSetsResponse = (data) => {
361
+ if (!sdkClient.isJSONObject(data)) {
362
+ throw new TypeError(
363
+ `Unmarshalling the type 'ListPermissionSetsResponse' failed as data isn't a dictionary.`
364
+ );
365
+ }
366
+ return {
367
+ permissionSets: sdkClient.unmarshalArrayOfObject(
368
+ data.permission_sets,
369
+ unmarshalPermissionSet
370
+ ),
371
+ totalCount: data.total_count
372
+ };
373
+ };
374
+ const unmarshalListPoliciesResponse = (data) => {
375
+ if (!sdkClient.isJSONObject(data)) {
376
+ throw new TypeError(
377
+ `Unmarshalling the type 'ListPoliciesResponse' failed as data isn't a dictionary.`
378
+ );
379
+ }
380
+ return {
381
+ policies: sdkClient.unmarshalArrayOfObject(data.policies, unmarshalPolicy),
382
+ totalCount: data.total_count
383
+ };
384
+ };
385
+ const unmarshalListQuotaResponse = (data) => {
386
+ if (!sdkClient.isJSONObject(data)) {
387
+ throw new TypeError(
388
+ `Unmarshalling the type 'ListQuotaResponse' failed as data isn't a dictionary.`
389
+ );
390
+ }
391
+ return {
392
+ quota: sdkClient.unmarshalArrayOfObject(data.quota, unmarshalQuotum),
393
+ totalCount: data.total_count
394
+ };
395
+ };
396
+ const unmarshalRule = (data) => {
397
+ if (!sdkClient.isJSONObject(data)) {
398
+ throw new TypeError(
399
+ `Unmarshalling the type 'Rule' failed as data isn't a dictionary.`
400
+ );
401
+ }
402
+ return {
403
+ accountRootUserId: data.account_root_user_id,
404
+ condition: data.condition,
405
+ id: data.id,
406
+ organizationId: data.organization_id,
407
+ permissionSetNames: data.permission_set_names,
408
+ permissionSetsScopeType: data.permission_sets_scope_type,
409
+ projectIds: data.project_ids
410
+ };
411
+ };
412
+ const unmarshalListRulesResponse = (data) => {
413
+ if (!sdkClient.isJSONObject(data)) {
414
+ throw new TypeError(
415
+ `Unmarshalling the type 'ListRulesResponse' failed as data isn't a dictionary.`
416
+ );
417
+ }
418
+ return {
419
+ rules: sdkClient.unmarshalArrayOfObject(data.rules, unmarshalRule),
420
+ totalCount: data.total_count
421
+ };
422
+ };
423
+ const unmarshalListSSHKeysResponse = (data) => {
424
+ if (!sdkClient.isJSONObject(data)) {
425
+ throw new TypeError(
426
+ `Unmarshalling the type 'ListSSHKeysResponse' failed as data isn't a dictionary.`
427
+ );
428
+ }
429
+ return {
430
+ sshKeys: sdkClient.unmarshalArrayOfObject(data.ssh_keys, unmarshalSSHKey),
431
+ totalCount: data.total_count
432
+ };
433
+ };
434
+ const unmarshalListUsersResponse = (data) => {
435
+ if (!sdkClient.isJSONObject(data)) {
436
+ throw new TypeError(
437
+ `Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`
438
+ );
439
+ }
440
+ return {
441
+ totalCount: data.total_count,
442
+ users: sdkClient.unmarshalArrayOfObject(data.users, unmarshalUser)
443
+ };
444
+ };
445
+ const unmarshalMFAOTP = (data) => {
446
+ if (!sdkClient.isJSONObject(data)) {
447
+ throw new TypeError(
448
+ `Unmarshalling the type 'MFAOTP' failed as data isn't a dictionary.`
449
+ );
450
+ }
451
+ return {
452
+ secret: data.secret
453
+ };
454
+ };
455
+ const unmarshalOrganizationSecuritySettings = (data) => {
456
+ if (!sdkClient.isJSONObject(data)) {
457
+ throw new TypeError(
458
+ `Unmarshalling the type 'OrganizationSecuritySettings' failed as data isn't a dictionary.`
459
+ );
460
+ }
461
+ return {
462
+ enforcePasswordRenewal: data.enforce_password_renewal,
463
+ gracePeriodDuration: data.grace_period_duration,
464
+ loginAttemptsBeforeLocked: data.login_attempts_before_locked
465
+ };
466
+ };
467
+ const unmarshalSetRulesResponse = (data) => {
468
+ if (!sdkClient.isJSONObject(data)) {
469
+ throw new TypeError(
470
+ `Unmarshalling the type 'SetRulesResponse' failed as data isn't a dictionary.`
471
+ );
472
+ }
473
+ return {
474
+ rules: sdkClient.unmarshalArrayOfObject(data.rules, unmarshalRule)
475
+ };
476
+ };
477
+ const unmarshalValidateUserMFAOTPResponse = (data) => {
478
+ if (!sdkClient.isJSONObject(data)) {
479
+ throw new TypeError(
480
+ `Unmarshalling the type 'ValidateUserMFAOTPResponse' failed as data isn't a dictionary.`
481
+ );
482
+ }
483
+ return {
484
+ recoveryCodes: data.recovery_codes
485
+ };
486
+ };
487
+ const marshalAddGroupMemberRequest = (request, defaults) => ({
488
+ ...sdkClient.resolveOneOf([
489
+ { param: "user_id", value: request.userId },
490
+ { param: "application_id", value: request.applicationId }
491
+ ])
492
+ });
493
+ const marshalAddGroupMembersRequest = (request, defaults) => ({
494
+ application_ids: request.applicationIds,
495
+ user_ids: request.userIds
496
+ });
497
+ const marshalCreateAPIKeyRequest = (request, defaults) => ({
498
+ default_project_id: request.defaultProjectId,
499
+ description: request.description,
500
+ expires_at: request.expiresAt,
501
+ ...sdkClient.resolveOneOf([
502
+ { param: "application_id", value: request.applicationId },
503
+ { param: "user_id", value: request.userId }
504
+ ])
505
+ });
506
+ const marshalCreateApplicationRequest = (request, defaults) => ({
507
+ description: request.description,
508
+ name: request.name || randomName("app"),
509
+ organization_id: request.organizationId ?? defaults.defaultOrganizationId,
510
+ tags: request.tags
511
+ });
512
+ const marshalCreateGroupRequest = (request, defaults) => ({
513
+ description: request.description,
514
+ name: request.name || randomName("grp"),
515
+ organization_id: request.organizationId ?? defaults.defaultOrganizationId,
516
+ tags: request.tags
517
+ });
518
+ const marshalCreateJWTRequest = (request, defaults) => ({
519
+ referrer: request.referrer,
520
+ user_id: request.userId
521
+ });
522
+ const marshalRuleSpecs = (request, defaults) => ({
523
+ condition: request.condition,
524
+ permission_set_names: request.permissionSetNames,
525
+ ...sdkClient.resolveOneOf([
526
+ { param: "project_ids", value: request.projectIds },
527
+ { param: "organization_id", value: request.organizationId }
528
+ ])
529
+ });
530
+ const marshalCreatePolicyRequest = (request, defaults) => ({
531
+ description: request.description,
532
+ name: request.name || randomName("pol"),
533
+ organization_id: request.organizationId ?? defaults.defaultOrganizationId,
534
+ rules: request.rules !== void 0 ? request.rules.map((elt) => marshalRuleSpecs(elt)) : void 0,
535
+ tags: request.tags,
536
+ ...sdkClient.resolveOneOf([
537
+ { param: "user_id", value: request.userId },
538
+ { param: "group_id", value: request.groupId },
539
+ { param: "application_id", value: request.applicationId },
540
+ { param: "no_principal", value: request.noPrincipal }
541
+ ])
542
+ });
543
+ const marshalCreateSSHKeyRequest = (request, defaults) => ({
544
+ name: request.name || randomName("key"),
545
+ project_id: request.projectId ?? defaults.defaultProjectId,
546
+ public_key: request.publicKey
547
+ });
548
+ const marshalCreateUserRequestMember = (request, defaults) => ({
549
+ email: request.email,
550
+ first_name: request.firstName,
551
+ last_name: request.lastName,
552
+ locale: request.locale,
553
+ password: request.password,
554
+ phone_number: request.phoneNumber,
555
+ send_password_email: request.sendPasswordEmail,
556
+ send_welcome_email: request.sendWelcomeEmail,
557
+ username: request.username
558
+ });
559
+ const marshalCreateUserRequest = (request, defaults) => ({
560
+ organization_id: request.organizationId ?? defaults.defaultOrganizationId,
561
+ tags: request.tags,
562
+ ...sdkClient.resolveOneOf([
563
+ { param: "email", value: request.email },
564
+ {
565
+ param: "member",
566
+ value: request.member !== void 0 ? marshalCreateUserRequestMember(request.member) : void 0
567
+ }
568
+ ])
569
+ });
570
+ const marshalRemoveGroupMemberRequest = (request, defaults) => ({
571
+ ...sdkClient.resolveOneOf([
572
+ { param: "user_id", value: request.userId },
573
+ { param: "application_id", value: request.applicationId }
574
+ ])
575
+ });
576
+ const marshalSetGroupMembersRequest = (request, defaults) => ({
577
+ application_ids: request.applicationIds,
578
+ user_ids: request.userIds
579
+ });
580
+ const marshalSetRulesRequest = (request, defaults) => ({
581
+ policy_id: request.policyId,
582
+ rules: request.rules.map((elt) => marshalRuleSpecs(elt))
583
+ });
584
+ const marshalUpdateAPIKeyRequest = (request, defaults) => ({
585
+ default_project_id: request.defaultProjectId,
586
+ description: request.description
587
+ });
588
+ const marshalUpdateApplicationRequest = (request, defaults) => ({
589
+ description: request.description,
590
+ name: request.name,
591
+ tags: request.tags
592
+ });
593
+ const marshalUpdateGroupRequest = (request, defaults) => ({
594
+ description: request.description,
595
+ name: request.name,
596
+ tags: request.tags
597
+ });
598
+ const marshalUpdateOrganizationSecuritySettingsRequest = (request, defaults) => ({
599
+ enforce_password_renewal: request.enforcePasswordRenewal,
600
+ grace_period_duration: request.gracePeriodDuration,
601
+ login_attempts_before_locked: request.loginAttemptsBeforeLocked
602
+ });
603
+ const marshalUpdatePolicyRequest = (request, defaults) => ({
604
+ description: request.description,
605
+ name: request.name,
606
+ tags: request.tags,
607
+ ...sdkClient.resolveOneOf([
608
+ { param: "user_id", value: request.userId },
609
+ { param: "group_id", value: request.groupId },
610
+ { param: "application_id", value: request.applicationId },
611
+ { param: "no_principal", value: request.noPrincipal }
612
+ ])
613
+ });
614
+ const marshalUpdateSSHKeyRequest = (request, defaults) => ({
615
+ disabled: request.disabled,
616
+ name: request.name
617
+ });
618
+ const marshalUpdateUserPasswordRequest = (request, defaults) => ({
619
+ password: request.password
620
+ });
621
+ const marshalUpdateUserRequest = (request, defaults) => ({
622
+ email: request.email,
623
+ first_name: request.firstName,
624
+ last_name: request.lastName,
625
+ locale: request.locale,
626
+ phone_number: request.phoneNumber,
627
+ tags: request.tags
628
+ });
629
+ const marshalUpdateUserUsernameRequest = (request, defaults) => ({
630
+ username: request.username
631
+ });
632
+ const marshalValidateUserMFAOTPRequest = (request, defaults) => ({
633
+ one_time_password: request.oneTimePassword
634
+ });
635
+ exports.marshalAddGroupMemberRequest = marshalAddGroupMemberRequest;
636
+ exports.marshalAddGroupMembersRequest = marshalAddGroupMembersRequest;
637
+ exports.marshalCreateAPIKeyRequest = marshalCreateAPIKeyRequest;
638
+ exports.marshalCreateApplicationRequest = marshalCreateApplicationRequest;
639
+ exports.marshalCreateGroupRequest = marshalCreateGroupRequest;
640
+ exports.marshalCreateJWTRequest = marshalCreateJWTRequest;
641
+ exports.marshalCreatePolicyRequest = marshalCreatePolicyRequest;
642
+ exports.marshalCreateSSHKeyRequest = marshalCreateSSHKeyRequest;
643
+ exports.marshalCreateUserRequest = marshalCreateUserRequest;
644
+ exports.marshalRemoveGroupMemberRequest = marshalRemoveGroupMemberRequest;
645
+ exports.marshalSetGroupMembersRequest = marshalSetGroupMembersRequest;
646
+ exports.marshalSetRulesRequest = marshalSetRulesRequest;
647
+ exports.marshalUpdateAPIKeyRequest = marshalUpdateAPIKeyRequest;
648
+ exports.marshalUpdateApplicationRequest = marshalUpdateApplicationRequest;
649
+ exports.marshalUpdateGroupRequest = marshalUpdateGroupRequest;
650
+ exports.marshalUpdateOrganizationSecuritySettingsRequest = marshalUpdateOrganizationSecuritySettingsRequest;
651
+ exports.marshalUpdatePolicyRequest = marshalUpdatePolicyRequest;
652
+ exports.marshalUpdateSSHKeyRequest = marshalUpdateSSHKeyRequest;
653
+ exports.marshalUpdateUserPasswordRequest = marshalUpdateUserPasswordRequest;
654
+ exports.marshalUpdateUserRequest = marshalUpdateUserRequest;
655
+ exports.marshalUpdateUserUsernameRequest = marshalUpdateUserUsernameRequest;
656
+ exports.marshalValidateUserMFAOTPRequest = marshalValidateUserMFAOTPRequest;
657
+ exports.unmarshalAPIKey = unmarshalAPIKey;
658
+ exports.unmarshalApplication = unmarshalApplication;
659
+ exports.unmarshalEncodedJWT = unmarshalEncodedJWT;
660
+ exports.unmarshalGetUserConnectionsResponse = unmarshalGetUserConnectionsResponse;
661
+ exports.unmarshalGroup = unmarshalGroup;
662
+ exports.unmarshalJWT = unmarshalJWT;
663
+ exports.unmarshalListAPIKeysResponse = unmarshalListAPIKeysResponse;
664
+ exports.unmarshalListApplicationsResponse = unmarshalListApplicationsResponse;
665
+ exports.unmarshalListGracePeriodsResponse = unmarshalListGracePeriodsResponse;
666
+ exports.unmarshalListGroupsResponse = unmarshalListGroupsResponse;
667
+ exports.unmarshalListJWTsResponse = unmarshalListJWTsResponse;
668
+ exports.unmarshalListLogsResponse = unmarshalListLogsResponse;
669
+ exports.unmarshalListPermissionSetsResponse = unmarshalListPermissionSetsResponse;
670
+ exports.unmarshalListPoliciesResponse = unmarshalListPoliciesResponse;
671
+ exports.unmarshalListQuotaResponse = unmarshalListQuotaResponse;
672
+ exports.unmarshalListRulesResponse = unmarshalListRulesResponse;
673
+ exports.unmarshalListSSHKeysResponse = unmarshalListSSHKeysResponse;
674
+ exports.unmarshalListUsersResponse = unmarshalListUsersResponse;
675
+ exports.unmarshalLog = unmarshalLog;
676
+ exports.unmarshalMFAOTP = unmarshalMFAOTP;
677
+ exports.unmarshalOrganizationSecuritySettings = unmarshalOrganizationSecuritySettings;
678
+ exports.unmarshalPolicy = unmarshalPolicy;
679
+ exports.unmarshalQuotum = unmarshalQuotum;
680
+ exports.unmarshalSSHKey = unmarshalSSHKey;
681
+ exports.unmarshalSetRulesResponse = unmarshalSetRulesResponse;
682
+ exports.unmarshalUser = unmarshalUser;
683
+ exports.unmarshalValidateUserMFAOTPResponse = unmarshalValidateUserMFAOTPResponse;