@aws-sdk/client-cognito-identity 3.312.0 → 3.316.0

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.
@@ -1,143 +1,143 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { CognitoIdentityServiceException as __BaseException } from "../models/CognitoIdentityServiceException";
4
4
  import { ConcurrentModificationException, DeveloperUserAlreadyRegisteredException, ExternalServiceException, InternalErrorException, InvalidIdentityPoolConfigurationException, InvalidParameterException, LimitExceededException, NotAuthorizedException, ResourceConflictException, ResourceNotFoundException, TooManyRequestsException, } from "../models/models_0";
5
5
  export const se_CreateIdentityPoolCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("CreateIdentityPool");
7
7
  let body;
8
- body = JSON.stringify(se_CreateIdentityPoolInput(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_DeleteIdentitiesCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("DeleteIdentities");
13
13
  let body;
14
- body = JSON.stringify(se_DeleteIdentitiesInput(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_DeleteIdentityPoolCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("DeleteIdentityPool");
19
19
  let body;
20
- body = JSON.stringify(se_DeleteIdentityPoolInput(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_DescribeIdentityCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("DescribeIdentity");
25
25
  let body;
26
- body = JSON.stringify(se_DescribeIdentityInput(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_DescribeIdentityPoolCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("DescribeIdentityPool");
31
31
  let body;
32
- body = JSON.stringify(se_DescribeIdentityPoolInput(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_GetCredentialsForIdentityCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("GetCredentialsForIdentity");
37
37
  let body;
38
- body = JSON.stringify(se_GetCredentialsForIdentityInput(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_GetIdCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("GetId");
43
43
  let body;
44
- body = JSON.stringify(se_GetIdInput(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_GetIdentityPoolRolesCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("GetIdentityPoolRoles");
49
49
  let body;
50
- body = JSON.stringify(se_GetIdentityPoolRolesInput(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const se_GetOpenIdTokenCommand = async (input, context) => {
54
54
  const headers = sharedHeaders("GetOpenIdToken");
55
55
  let body;
56
- body = JSON.stringify(se_GetOpenIdTokenInput(input, context));
56
+ body = JSON.stringify(_json(input));
57
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
58
  };
59
59
  export const se_GetOpenIdTokenForDeveloperIdentityCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("GetOpenIdTokenForDeveloperIdentity");
61
61
  let body;
62
- body = JSON.stringify(se_GetOpenIdTokenForDeveloperIdentityInput(input, context));
62
+ body = JSON.stringify(_json(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  export const se_GetPrincipalTagAttributeMapCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("GetPrincipalTagAttributeMap");
67
67
  let body;
68
- body = JSON.stringify(se_GetPrincipalTagAttributeMapInput(input, context));
68
+ body = JSON.stringify(_json(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  export const se_ListIdentitiesCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("ListIdentities");
73
73
  let body;
74
- body = JSON.stringify(se_ListIdentitiesInput(input, context));
74
+ body = JSON.stringify(_json(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  export const se_ListIdentityPoolsCommand = async (input, context) => {
78
78
  const headers = sharedHeaders("ListIdentityPools");
79
79
  let body;
80
- body = JSON.stringify(se_ListIdentityPoolsInput(input, context));
80
+ body = JSON.stringify(_json(input));
81
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
82
82
  };
83
83
  export const se_ListTagsForResourceCommand = async (input, context) => {
84
84
  const headers = sharedHeaders("ListTagsForResource");
85
85
  let body;
86
- body = JSON.stringify(se_ListTagsForResourceInput(input, context));
86
+ body = JSON.stringify(_json(input));
87
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
88
88
  };
89
89
  export const se_LookupDeveloperIdentityCommand = async (input, context) => {
90
90
  const headers = sharedHeaders("LookupDeveloperIdentity");
91
91
  let body;
92
- body = JSON.stringify(se_LookupDeveloperIdentityInput(input, context));
92
+ body = JSON.stringify(_json(input));
93
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
94
  };
95
95
  export const se_MergeDeveloperIdentitiesCommand = async (input, context) => {
96
96
  const headers = sharedHeaders("MergeDeveloperIdentities");
97
97
  let body;
98
- body = JSON.stringify(se_MergeDeveloperIdentitiesInput(input, context));
98
+ body = JSON.stringify(_json(input));
99
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
100
100
  };
101
101
  export const se_SetIdentityPoolRolesCommand = async (input, context) => {
102
102
  const headers = sharedHeaders("SetIdentityPoolRoles");
103
103
  let body;
104
- body = JSON.stringify(se_SetIdentityPoolRolesInput(input, context));
104
+ body = JSON.stringify(_json(input));
105
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
106
  };
107
107
  export const se_SetPrincipalTagAttributeMapCommand = async (input, context) => {
108
108
  const headers = sharedHeaders("SetPrincipalTagAttributeMap");
109
109
  let body;
110
- body = JSON.stringify(se_SetPrincipalTagAttributeMapInput(input, context));
110
+ body = JSON.stringify(_json(input));
111
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
112
  };
113
113
  export const se_TagResourceCommand = async (input, context) => {
114
114
  const headers = sharedHeaders("TagResource");
115
115
  let body;
116
- body = JSON.stringify(se_TagResourceInput(input, context));
116
+ body = JSON.stringify(_json(input));
117
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
118
  };
119
119
  export const se_UnlinkDeveloperIdentityCommand = async (input, context) => {
120
120
  const headers = sharedHeaders("UnlinkDeveloperIdentity");
121
121
  let body;
122
- body = JSON.stringify(se_UnlinkDeveloperIdentityInput(input, context));
122
+ body = JSON.stringify(_json(input));
123
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
124
124
  };
125
125
  export const se_UnlinkIdentityCommand = async (input, context) => {
126
126
  const headers = sharedHeaders("UnlinkIdentity");
127
127
  let body;
128
- body = JSON.stringify(se_UnlinkIdentityInput(input, context));
128
+ body = JSON.stringify(_json(input));
129
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
130
  };
131
131
  export const se_UntagResourceCommand = async (input, context) => {
132
132
  const headers = sharedHeaders("UntagResource");
133
133
  let body;
134
- body = JSON.stringify(se_UntagResourceInput(input, context));
134
+ body = JSON.stringify(_json(input));
135
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
136
136
  };
137
137
  export const se_UpdateIdentityPoolCommand = async (input, context) => {
138
138
  const headers = sharedHeaders("UpdateIdentityPool");
139
139
  let body;
140
- body = JSON.stringify(se_IdentityPool(input, context));
140
+ body = JSON.stringify(_json(input));
141
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
142
142
  };
143
143
  export const de_CreateIdentityPoolCommand = async (output, context) => {
@@ -146,12 +146,12 @@ export const de_CreateIdentityPoolCommand = async (output, context) => {
146
146
  }
147
147
  const data = await parseBody(output.body, context);
148
148
  let contents = {};
149
- contents = de_IdentityPool(data, context);
149
+ contents = _json(data);
150
150
  const response = {
151
151
  $metadata: deserializeMetadata(output),
152
152
  ...contents,
153
153
  };
154
- return Promise.resolve(response);
154
+ return response;
155
155
  };
156
156
  const de_CreateIdentityPoolCommandError = async (output, context) => {
157
157
  const parsedOutput = {
@@ -180,10 +180,9 @@ const de_CreateIdentityPoolCommandError = async (output, context) => {
180
180
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
181
181
  default:
182
182
  const parsedBody = parsedOutput.body;
183
- throwDefaultError({
183
+ return throwDefaultError({
184
184
  output,
185
185
  parsedBody,
186
- exceptionCtor: __BaseException,
187
186
  errorCode,
188
187
  });
189
188
  }
@@ -194,12 +193,12 @@ export const de_DeleteIdentitiesCommand = async (output, context) => {
194
193
  }
195
194
  const data = await parseBody(output.body, context);
196
195
  let contents = {};
197
- contents = de_DeleteIdentitiesResponse(data, context);
196
+ contents = _json(data);
198
197
  const response = {
199
198
  $metadata: deserializeMetadata(output),
200
199
  ...contents,
201
200
  };
202
- return Promise.resolve(response);
201
+ return response;
203
202
  };
204
203
  const de_DeleteIdentitiesCommandError = async (output, context) => {
205
204
  const parsedOutput = {
@@ -219,10 +218,9 @@ const de_DeleteIdentitiesCommandError = async (output, context) => {
219
218
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
220
219
  default:
221
220
  const parsedBody = parsedOutput.body;
222
- throwDefaultError({
221
+ return throwDefaultError({
223
222
  output,
224
223
  parsedBody,
225
- exceptionCtor: __BaseException,
226
224
  errorCode,
227
225
  });
228
226
  }
@@ -235,7 +233,7 @@ export const de_DeleteIdentityPoolCommand = async (output, context) => {
235
233
  const response = {
236
234
  $metadata: deserializeMetadata(output),
237
235
  };
238
- return Promise.resolve(response);
236
+ return response;
239
237
  };
240
238
  const de_DeleteIdentityPoolCommandError = async (output, context) => {
241
239
  const parsedOutput = {
@@ -261,10 +259,9 @@ const de_DeleteIdentityPoolCommandError = async (output, context) => {
261
259
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
262
260
  default:
263
261
  const parsedBody = parsedOutput.body;
264
- throwDefaultError({
262
+ return throwDefaultError({
265
263
  output,
266
264
  parsedBody,
267
- exceptionCtor: __BaseException,
268
265
  errorCode,
269
266
  });
270
267
  }
@@ -280,7 +277,7 @@ export const de_DescribeIdentityCommand = async (output, context) => {
280
277
  $metadata: deserializeMetadata(output),
281
278
  ...contents,
282
279
  };
283
- return Promise.resolve(response);
280
+ return response;
284
281
  };
285
282
  const de_DescribeIdentityCommandError = async (output, context) => {
286
283
  const parsedOutput = {
@@ -306,10 +303,9 @@ const de_DescribeIdentityCommandError = async (output, context) => {
306
303
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
307
304
  default:
308
305
  const parsedBody = parsedOutput.body;
309
- throwDefaultError({
306
+ return throwDefaultError({
310
307
  output,
311
308
  parsedBody,
312
- exceptionCtor: __BaseException,
313
309
  errorCode,
314
310
  });
315
311
  }
@@ -320,12 +316,12 @@ export const de_DescribeIdentityPoolCommand = async (output, context) => {
320
316
  }
321
317
  const data = await parseBody(output.body, context);
322
318
  let contents = {};
323
- contents = de_IdentityPool(data, context);
319
+ contents = _json(data);
324
320
  const response = {
325
321
  $metadata: deserializeMetadata(output),
326
322
  ...contents,
327
323
  };
328
- return Promise.resolve(response);
324
+ return response;
329
325
  };
330
326
  const de_DescribeIdentityPoolCommandError = async (output, context) => {
331
327
  const parsedOutput = {
@@ -351,10 +347,9 @@ const de_DescribeIdentityPoolCommandError = async (output, context) => {
351
347
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
352
348
  default:
353
349
  const parsedBody = parsedOutput.body;
354
- throwDefaultError({
350
+ return throwDefaultError({
355
351
  output,
356
352
  parsedBody,
357
- exceptionCtor: __BaseException,
358
353
  errorCode,
359
354
  });
360
355
  }
@@ -370,7 +365,7 @@ export const de_GetCredentialsForIdentityCommand = async (output, context) => {
370
365
  $metadata: deserializeMetadata(output),
371
366
  ...contents,
372
367
  };
373
- return Promise.resolve(response);
368
+ return response;
374
369
  };
375
370
  const de_GetCredentialsForIdentityCommandError = async (output, context) => {
376
371
  const parsedOutput = {
@@ -405,10 +400,9 @@ const de_GetCredentialsForIdentityCommandError = async (output, context) => {
405
400
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
406
401
  default:
407
402
  const parsedBody = parsedOutput.body;
408
- throwDefaultError({
403
+ return throwDefaultError({
409
404
  output,
410
405
  parsedBody,
411
- exceptionCtor: __BaseException,
412
406
  errorCode,
413
407
  });
414
408
  }
@@ -419,12 +413,12 @@ export const de_GetIdCommand = async (output, context) => {
419
413
  }
420
414
  const data = await parseBody(output.body, context);
421
415
  let contents = {};
422
- contents = de_GetIdResponse(data, context);
416
+ contents = _json(data);
423
417
  const response = {
424
418
  $metadata: deserializeMetadata(output),
425
419
  ...contents,
426
420
  };
427
- return Promise.resolve(response);
421
+ return response;
428
422
  };
429
423
  const de_GetIdCommandError = async (output, context) => {
430
424
  const parsedOutput = {
@@ -459,10 +453,9 @@ const de_GetIdCommandError = async (output, context) => {
459
453
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
460
454
  default:
461
455
  const parsedBody = parsedOutput.body;
462
- throwDefaultError({
456
+ return throwDefaultError({
463
457
  output,
464
458
  parsedBody,
465
- exceptionCtor: __BaseException,
466
459
  errorCode,
467
460
  });
468
461
  }
@@ -473,12 +466,12 @@ export const de_GetIdentityPoolRolesCommand = async (output, context) => {
473
466
  }
474
467
  const data = await parseBody(output.body, context);
475
468
  let contents = {};
476
- contents = de_GetIdentityPoolRolesResponse(data, context);
469
+ contents = _json(data);
477
470
  const response = {
478
471
  $metadata: deserializeMetadata(output),
479
472
  ...contents,
480
473
  };
481
- return Promise.resolve(response);
474
+ return response;
482
475
  };
483
476
  const de_GetIdentityPoolRolesCommandError = async (output, context) => {
484
477
  const parsedOutput = {
@@ -507,10 +500,9 @@ const de_GetIdentityPoolRolesCommandError = async (output, context) => {
507
500
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
508
501
  default:
509
502
  const parsedBody = parsedOutput.body;
510
- throwDefaultError({
503
+ return throwDefaultError({
511
504
  output,
512
505
  parsedBody,
513
- exceptionCtor: __BaseException,
514
506
  errorCode,
515
507
  });
516
508
  }
@@ -521,12 +513,12 @@ export const de_GetOpenIdTokenCommand = async (output, context) => {
521
513
  }
522
514
  const data = await parseBody(output.body, context);
523
515
  let contents = {};
524
- contents = de_GetOpenIdTokenResponse(data, context);
516
+ contents = _json(data);
525
517
  const response = {
526
518
  $metadata: deserializeMetadata(output),
527
519
  ...contents,
528
520
  };
529
- return Promise.resolve(response);
521
+ return response;
530
522
  };
531
523
  const de_GetOpenIdTokenCommandError = async (output, context) => {
532
524
  const parsedOutput = {
@@ -558,10 +550,9 @@ const de_GetOpenIdTokenCommandError = async (output, context) => {
558
550
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
559
551
  default:
560
552
  const parsedBody = parsedOutput.body;
561
- throwDefaultError({
553
+ return throwDefaultError({
562
554
  output,
563
555
  parsedBody,
564
- exceptionCtor: __BaseException,
565
556
  errorCode,
566
557
  });
567
558
  }
@@ -572,12 +563,12 @@ export const de_GetOpenIdTokenForDeveloperIdentityCommand = async (output, conte
572
563
  }
573
564
  const data = await parseBody(output.body, context);
574
565
  let contents = {};
575
- contents = de_GetOpenIdTokenForDeveloperIdentityResponse(data, context);
566
+ contents = _json(data);
576
567
  const response = {
577
568
  $metadata: deserializeMetadata(output),
578
569
  ...contents,
579
570
  };
580
- return Promise.resolve(response);
571
+ return response;
581
572
  };
582
573
  const de_GetOpenIdTokenForDeveloperIdentityCommandError = async (output, context) => {
583
574
  const parsedOutput = {
@@ -609,10 +600,9 @@ const de_GetOpenIdTokenForDeveloperIdentityCommandError = async (output, context
609
600
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
610
601
  default:
611
602
  const parsedBody = parsedOutput.body;
612
- throwDefaultError({
603
+ return throwDefaultError({
613
604
  output,
614
605
  parsedBody,
615
- exceptionCtor: __BaseException,
616
606
  errorCode,
617
607
  });
618
608
  }
@@ -623,12 +613,12 @@ export const de_GetPrincipalTagAttributeMapCommand = async (output, context) =>
623
613
  }
624
614
  const data = await parseBody(output.body, context);
625
615
  let contents = {};
626
- contents = de_GetPrincipalTagAttributeMapResponse(data, context);
616
+ contents = _json(data);
627
617
  const response = {
628
618
  $metadata: deserializeMetadata(output),
629
619
  ...contents,
630
620
  };
631
- return Promise.resolve(response);
621
+ return response;
632
622
  };
633
623
  const de_GetPrincipalTagAttributeMapCommandError = async (output, context) => {
634
624
  const parsedOutput = {
@@ -654,10 +644,9 @@ const de_GetPrincipalTagAttributeMapCommandError = async (output, context) => {
654
644
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
655
645
  default:
656
646
  const parsedBody = parsedOutput.body;
657
- throwDefaultError({
647
+ return throwDefaultError({
658
648
  output,
659
649
  parsedBody,
660
- exceptionCtor: __BaseException,
661
650
  errorCode,
662
651
  });
663
652
  }
@@ -673,7 +662,7 @@ export const de_ListIdentitiesCommand = async (output, context) => {
673
662
  $metadata: deserializeMetadata(output),
674
663
  ...contents,
675
664
  };
676
- return Promise.resolve(response);
665
+ return response;
677
666
  };
678
667
  const de_ListIdentitiesCommandError = async (output, context) => {
679
668
  const parsedOutput = {
@@ -699,10 +688,9 @@ const de_ListIdentitiesCommandError = async (output, context) => {
699
688
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
700
689
  default:
701
690
  const parsedBody = parsedOutput.body;
702
- throwDefaultError({
691
+ return throwDefaultError({
703
692
  output,
704
693
  parsedBody,
705
- exceptionCtor: __BaseException,
706
694
  errorCode,
707
695
  });
708
696
  }
@@ -713,12 +701,12 @@ export const de_ListIdentityPoolsCommand = async (output, context) => {
713
701
  }
714
702
  const data = await parseBody(output.body, context);
715
703
  let contents = {};
716
- contents = de_ListIdentityPoolsResponse(data, context);
704
+ contents = _json(data);
717
705
  const response = {
718
706
  $metadata: deserializeMetadata(output),
719
707
  ...contents,
720
708
  };
721
- return Promise.resolve(response);
709
+ return response;
722
710
  };
723
711
  const de_ListIdentityPoolsCommandError = async (output, context) => {
724
712
  const parsedOutput = {
@@ -744,10 +732,9 @@ const de_ListIdentityPoolsCommandError = async (output, context) => {
744
732
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
745
733
  default:
746
734
  const parsedBody = parsedOutput.body;
747
- throwDefaultError({
735
+ return throwDefaultError({
748
736
  output,
749
737
  parsedBody,
750
- exceptionCtor: __BaseException,
751
738
  errorCode,
752
739
  });
753
740
  }
@@ -758,12 +745,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
758
745
  }
759
746
  const data = await parseBody(output.body, context);
760
747
  let contents = {};
761
- contents = de_ListTagsForResourceResponse(data, context);
748
+ contents = _json(data);
762
749
  const response = {
763
750
  $metadata: deserializeMetadata(output),
764
751
  ...contents,
765
752
  };
766
- return Promise.resolve(response);
753
+ return response;
767
754
  };
768
755
  const de_ListTagsForResourceCommandError = async (output, context) => {
769
756
  const parsedOutput = {
@@ -789,10 +776,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
789
776
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
790
777
  default:
791
778
  const parsedBody = parsedOutput.body;
792
- throwDefaultError({
779
+ return throwDefaultError({
793
780
  output,
794
781
  parsedBody,
795
- exceptionCtor: __BaseException,
796
782
  errorCode,
797
783
  });
798
784
  }
@@ -803,12 +789,12 @@ export const de_LookupDeveloperIdentityCommand = async (output, context) => {
803
789
  }
804
790
  const data = await parseBody(output.body, context);
805
791
  let contents = {};
806
- contents = de_LookupDeveloperIdentityResponse(data, context);
792
+ contents = _json(data);
807
793
  const response = {
808
794
  $metadata: deserializeMetadata(output),
809
795
  ...contents,
810
796
  };
811
- return Promise.resolve(response);
797
+ return response;
812
798
  };
813
799
  const de_LookupDeveloperIdentityCommandError = async (output, context) => {
814
800
  const parsedOutput = {
@@ -837,10 +823,9 @@ const de_LookupDeveloperIdentityCommandError = async (output, context) => {
837
823
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
838
824
  default:
839
825
  const parsedBody = parsedOutput.body;
840
- throwDefaultError({
826
+ return throwDefaultError({
841
827
  output,
842
828
  parsedBody,
843
- exceptionCtor: __BaseException,
844
829
  errorCode,
845
830
  });
846
831
  }
@@ -851,12 +836,12 @@ export const de_MergeDeveloperIdentitiesCommand = async (output, context) => {
851
836
  }
852
837
  const data = await parseBody(output.body, context);
853
838
  let contents = {};
854
- contents = de_MergeDeveloperIdentitiesResponse(data, context);
839
+ contents = _json(data);
855
840
  const response = {
856
841
  $metadata: deserializeMetadata(output),
857
842
  ...contents,
858
843
  };
859
- return Promise.resolve(response);
844
+ return response;
860
845
  };
861
846
  const de_MergeDeveloperIdentitiesCommandError = async (output, context) => {
862
847
  const parsedOutput = {
@@ -885,10 +870,9 @@ const de_MergeDeveloperIdentitiesCommandError = async (output, context) => {
885
870
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
886
871
  default:
887
872
  const parsedBody = parsedOutput.body;
888
- throwDefaultError({
873
+ return throwDefaultError({
889
874
  output,
890
875
  parsedBody,
891
- exceptionCtor: __BaseException,
892
876
  errorCode,
893
877
  });
894
878
  }
@@ -901,7 +885,7 @@ export const de_SetIdentityPoolRolesCommand = async (output, context) => {
901
885
  const response = {
902
886
  $metadata: deserializeMetadata(output),
903
887
  };
904
- return Promise.resolve(response);
888
+ return response;
905
889
  };
906
890
  const de_SetIdentityPoolRolesCommandError = async (output, context) => {
907
891
  const parsedOutput = {
@@ -933,10 +917,9 @@ const de_SetIdentityPoolRolesCommandError = async (output, context) => {
933
917
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
934
918
  default:
935
919
  const parsedBody = parsedOutput.body;
936
- throwDefaultError({
920
+ return throwDefaultError({
937
921
  output,
938
922
  parsedBody,
939
- exceptionCtor: __BaseException,
940
923
  errorCode,
941
924
  });
942
925
  }
@@ -947,12 +930,12 @@ export const de_SetPrincipalTagAttributeMapCommand = async (output, context) =>
947
930
  }
948
931
  const data = await parseBody(output.body, context);
949
932
  let contents = {};
950
- contents = de_SetPrincipalTagAttributeMapResponse(data, context);
933
+ contents = _json(data);
951
934
  const response = {
952
935
  $metadata: deserializeMetadata(output),
953
936
  ...contents,
954
937
  };
955
- return Promise.resolve(response);
938
+ return response;
956
939
  };
957
940
  const de_SetPrincipalTagAttributeMapCommandError = async (output, context) => {
958
941
  const parsedOutput = {
@@ -978,10 +961,9 @@ const de_SetPrincipalTagAttributeMapCommandError = async (output, context) => {
978
961
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
979
962
  default:
980
963
  const parsedBody = parsedOutput.body;
981
- throwDefaultError({
964
+ return throwDefaultError({
982
965
  output,
983
966
  parsedBody,
984
- exceptionCtor: __BaseException,
985
967
  errorCode,
986
968
  });
987
969
  }
@@ -992,12 +974,12 @@ export const de_TagResourceCommand = async (output, context) => {
992
974
  }
993
975
  const data = await parseBody(output.body, context);
994
976
  let contents = {};
995
- contents = de_TagResourceResponse(data, context);
977
+ contents = _json(data);
996
978
  const response = {
997
979
  $metadata: deserializeMetadata(output),
998
980
  ...contents,
999
981
  };
1000
- return Promise.resolve(response);
982
+ return response;
1001
983
  };
1002
984
  const de_TagResourceCommandError = async (output, context) => {
1003
985
  const parsedOutput = {
@@ -1023,10 +1005,9 @@ const de_TagResourceCommandError = async (output, context) => {
1023
1005
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1024
1006
  default:
1025
1007
  const parsedBody = parsedOutput.body;
1026
- throwDefaultError({
1008
+ return throwDefaultError({
1027
1009
  output,
1028
1010
  parsedBody,
1029
- exceptionCtor: __BaseException,
1030
1011
  errorCode,
1031
1012
  });
1032
1013
  }
@@ -1039,7 +1020,7 @@ export const de_UnlinkDeveloperIdentityCommand = async (output, context) => {
1039
1020
  const response = {
1040
1021
  $metadata: deserializeMetadata(output),
1041
1022
  };
1042
- return Promise.resolve(response);
1023
+ return response;
1043
1024
  };
1044
1025
  const de_UnlinkDeveloperIdentityCommandError = async (output, context) => {
1045
1026
  const parsedOutput = {
@@ -1068,10 +1049,9 @@ const de_UnlinkDeveloperIdentityCommandError = async (output, context) => {
1068
1049
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1069
1050
  default:
1070
1051
  const parsedBody = parsedOutput.body;
1071
- throwDefaultError({
1052
+ return throwDefaultError({
1072
1053
  output,
1073
1054
  parsedBody,
1074
- exceptionCtor: __BaseException,
1075
1055
  errorCode,
1076
1056
  });
1077
1057
  }
@@ -1084,7 +1064,7 @@ export const de_UnlinkIdentityCommand = async (output, context) => {
1084
1064
  const response = {
1085
1065
  $metadata: deserializeMetadata(output),
1086
1066
  };
1087
- return Promise.resolve(response);
1067
+ return response;
1088
1068
  };
1089
1069
  const de_UnlinkIdentityCommandError = async (output, context) => {
1090
1070
  const parsedOutput = {
@@ -1116,10 +1096,9 @@ const de_UnlinkIdentityCommandError = async (output, context) => {
1116
1096
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1117
1097
  default:
1118
1098
  const parsedBody = parsedOutput.body;
1119
- throwDefaultError({
1099
+ return throwDefaultError({
1120
1100
  output,
1121
1101
  parsedBody,
1122
- exceptionCtor: __BaseException,
1123
1102
  errorCode,
1124
1103
  });
1125
1104
  }
@@ -1130,12 +1109,12 @@ export const de_UntagResourceCommand = async (output, context) => {
1130
1109
  }
1131
1110
  const data = await parseBody(output.body, context);
1132
1111
  let contents = {};
1133
- contents = de_UntagResourceResponse(data, context);
1112
+ contents = _json(data);
1134
1113
  const response = {
1135
1114
  $metadata: deserializeMetadata(output),
1136
1115
  ...contents,
1137
1116
  };
1138
- return Promise.resolve(response);
1117
+ return response;
1139
1118
  };
1140
1119
  const de_UntagResourceCommandError = async (output, context) => {
1141
1120
  const parsedOutput = {
@@ -1161,10 +1140,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1161
1140
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1162
1141
  default:
1163
1142
  const parsedBody = parsedOutput.body;
1164
- throwDefaultError({
1143
+ return throwDefaultError({
1165
1144
  output,
1166
1145
  parsedBody,
1167
- exceptionCtor: __BaseException,
1168
1146
  errorCode,
1169
1147
  });
1170
1148
  }
@@ -1175,12 +1153,12 @@ export const de_UpdateIdentityPoolCommand = async (output, context) => {
1175
1153
  }
1176
1154
  const data = await parseBody(output.body, context);
1177
1155
  let contents = {};
1178
- contents = de_IdentityPool(data, context);
1156
+ contents = _json(data);
1179
1157
  const response = {
1180
1158
  $metadata: deserializeMetadata(output),
1181
1159
  ...contents,
1182
1160
  };
1183
- return Promise.resolve(response);
1161
+ return response;
1184
1162
  };
1185
1163
  const de_UpdateIdentityPoolCommandError = async (output, context) => {
1186
1164
  const parsedOutput = {
@@ -1215,17 +1193,16 @@ const de_UpdateIdentityPoolCommandError = async (output, context) => {
1215
1193
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1216
1194
  default:
1217
1195
  const parsedBody = parsedOutput.body;
1218
- throwDefaultError({
1196
+ return throwDefaultError({
1219
1197
  output,
1220
1198
  parsedBody,
1221
- exceptionCtor: __BaseException,
1222
1199
  errorCode,
1223
1200
  });
1224
1201
  }
1225
1202
  };
1226
1203
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
1227
1204
  const body = parsedOutput.body;
1228
- const deserialized = de_ConcurrentModificationException(body, context);
1205
+ const deserialized = _json(body);
1229
1206
  const exception = new ConcurrentModificationException({
1230
1207
  $metadata: deserializeMetadata(parsedOutput),
1231
1208
  ...deserialized,
@@ -1234,7 +1211,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
1234
1211
  };
1235
1212
  const de_DeveloperUserAlreadyRegisteredExceptionRes = async (parsedOutput, context) => {
1236
1213
  const body = parsedOutput.body;
1237
- const deserialized = de_DeveloperUserAlreadyRegisteredException(body, context);
1214
+ const deserialized = _json(body);
1238
1215
  const exception = new DeveloperUserAlreadyRegisteredException({
1239
1216
  $metadata: deserializeMetadata(parsedOutput),
1240
1217
  ...deserialized,
@@ -1243,7 +1220,7 @@ const de_DeveloperUserAlreadyRegisteredExceptionRes = async (parsedOutput, conte
1243
1220
  };
1244
1221
  const de_ExternalServiceExceptionRes = async (parsedOutput, context) => {
1245
1222
  const body = parsedOutput.body;
1246
- const deserialized = de_ExternalServiceException(body, context);
1223
+ const deserialized = _json(body);
1247
1224
  const exception = new ExternalServiceException({
1248
1225
  $metadata: deserializeMetadata(parsedOutput),
1249
1226
  ...deserialized,
@@ -1252,7 +1229,7 @@ const de_ExternalServiceExceptionRes = async (parsedOutput, context) => {
1252
1229
  };
1253
1230
  const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
1254
1231
  const body = parsedOutput.body;
1255
- const deserialized = de_InternalErrorException(body, context);
1232
+ const deserialized = _json(body);
1256
1233
  const exception = new InternalErrorException({
1257
1234
  $metadata: deserializeMetadata(parsedOutput),
1258
1235
  ...deserialized,
@@ -1261,7 +1238,7 @@ const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
1261
1238
  };
1262
1239
  const de_InvalidIdentityPoolConfigurationExceptionRes = async (parsedOutput, context) => {
1263
1240
  const body = parsedOutput.body;
1264
- const deserialized = de_InvalidIdentityPoolConfigurationException(body, context);
1241
+ const deserialized = _json(body);
1265
1242
  const exception = new InvalidIdentityPoolConfigurationException({
1266
1243
  $metadata: deserializeMetadata(parsedOutput),
1267
1244
  ...deserialized,
@@ -1270,7 +1247,7 @@ const de_InvalidIdentityPoolConfigurationExceptionRes = async (parsedOutput, con
1270
1247
  };
1271
1248
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1272
1249
  const body = parsedOutput.body;
1273
- const deserialized = de_InvalidParameterException(body, context);
1250
+ const deserialized = _json(body);
1274
1251
  const exception = new InvalidParameterException({
1275
1252
  $metadata: deserializeMetadata(parsedOutput),
1276
1253
  ...deserialized,
@@ -1279,7 +1256,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1279
1256
  };
1280
1257
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1281
1258
  const body = parsedOutput.body;
1282
- const deserialized = de_LimitExceededException(body, context);
1259
+ const deserialized = _json(body);
1283
1260
  const exception = new LimitExceededException({
1284
1261
  $metadata: deserializeMetadata(parsedOutput),
1285
1262
  ...deserialized,
@@ -1288,7 +1265,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1288
1265
  };
1289
1266
  const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
1290
1267
  const body = parsedOutput.body;
1291
- const deserialized = de_NotAuthorizedException(body, context);
1268
+ const deserialized = _json(body);
1292
1269
  const exception = new NotAuthorizedException({
1293
1270
  $metadata: deserializeMetadata(parsedOutput),
1294
1271
  ...deserialized,
@@ -1297,7 +1274,7 @@ const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
1297
1274
  };
1298
1275
  const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
1299
1276
  const body = parsedOutput.body;
1300
- const deserialized = de_ResourceConflictException(body, context);
1277
+ const deserialized = _json(body);
1301
1278
  const exception = new ResourceConflictException({
1302
1279
  $metadata: deserializeMetadata(parsedOutput),
1303
1280
  ...deserialized,
@@ -1306,7 +1283,7 @@ const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
1306
1283
  };
1307
1284
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1308
1285
  const body = parsedOutput.body;
1309
- const deserialized = de_ResourceNotFoundException(body, context);
1286
+ const deserialized = _json(body);
1310
1287
  const exception = new ResourceNotFoundException({
1311
1288
  $metadata: deserializeMetadata(parsedOutput),
1312
1289
  ...deserialized,
@@ -1315,700 +1292,49 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1315
1292
  };
1316
1293
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1317
1294
  const body = parsedOutput.body;
1318
- const deserialized = de_TooManyRequestsException(body, context);
1295
+ const deserialized = _json(body);
1319
1296
  const exception = new TooManyRequestsException({
1320
1297
  $metadata: deserializeMetadata(parsedOutput),
1321
1298
  ...deserialized,
1322
1299
  });
1323
1300
  return __decorateServiceException(exception, body);
1324
1301
  };
1325
- const se_CognitoIdentityProvider = (input, context) => {
1326
- return {
1327
- ...(input.ClientId != null && { ClientId: input.ClientId }),
1328
- ...(input.ProviderName != null && { ProviderName: input.ProviderName }),
1329
- ...(input.ServerSideTokenCheck != null && { ServerSideTokenCheck: input.ServerSideTokenCheck }),
1330
- };
1331
- };
1332
- const se_CognitoIdentityProviderList = (input, context) => {
1333
- return input
1334
- .filter((e) => e != null)
1335
- .map((entry) => {
1336
- return se_CognitoIdentityProvider(entry, context);
1337
- });
1338
- };
1339
- const se_CreateIdentityPoolInput = (input, context) => {
1340
- return {
1341
- ...(input.AllowClassicFlow != null && { AllowClassicFlow: input.AllowClassicFlow }),
1342
- ...(input.AllowUnauthenticatedIdentities != null && {
1343
- AllowUnauthenticatedIdentities: input.AllowUnauthenticatedIdentities,
1344
- }),
1345
- ...(input.CognitoIdentityProviders != null && {
1346
- CognitoIdentityProviders: se_CognitoIdentityProviderList(input.CognitoIdentityProviders, context),
1347
- }),
1348
- ...(input.DeveloperProviderName != null && { DeveloperProviderName: input.DeveloperProviderName }),
1349
- ...(input.IdentityPoolName != null && { IdentityPoolName: input.IdentityPoolName }),
1350
- ...(input.IdentityPoolTags != null && {
1351
- IdentityPoolTags: se_IdentityPoolTagsType(input.IdentityPoolTags, context),
1352
- }),
1353
- ...(input.OpenIdConnectProviderARNs != null && {
1354
- OpenIdConnectProviderARNs: se_OIDCProviderList(input.OpenIdConnectProviderARNs, context),
1355
- }),
1356
- ...(input.SamlProviderARNs != null && { SamlProviderARNs: se_SAMLProviderList(input.SamlProviderARNs, context) }),
1357
- ...(input.SupportedLoginProviders != null && {
1358
- SupportedLoginProviders: se_IdentityProviders(input.SupportedLoginProviders, context),
1359
- }),
1360
- };
1361
- };
1362
- const se_DeleteIdentitiesInput = (input, context) => {
1363
- return {
1364
- ...(input.IdentityIdsToDelete != null && {
1365
- IdentityIdsToDelete: se_IdentityIdList(input.IdentityIdsToDelete, context),
1366
- }),
1367
- };
1368
- };
1369
- const se_DeleteIdentityPoolInput = (input, context) => {
1370
- return {
1371
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1372
- };
1373
- };
1374
- const se_DescribeIdentityInput = (input, context) => {
1375
- return {
1376
- ...(input.IdentityId != null && { IdentityId: input.IdentityId }),
1377
- };
1378
- };
1379
- const se_DescribeIdentityPoolInput = (input, context) => {
1380
- return {
1381
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1382
- };
1383
- };
1384
- const se_GetCredentialsForIdentityInput = (input, context) => {
1385
- return {
1386
- ...(input.CustomRoleArn != null && { CustomRoleArn: input.CustomRoleArn }),
1387
- ...(input.IdentityId != null && { IdentityId: input.IdentityId }),
1388
- ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }),
1389
- };
1390
- };
1391
- const se_GetIdentityPoolRolesInput = (input, context) => {
1392
- return {
1393
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1394
- };
1395
- };
1396
- const se_GetIdInput = (input, context) => {
1397
- return {
1398
- ...(input.AccountId != null && { AccountId: input.AccountId }),
1399
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1400
- ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }),
1401
- };
1402
- };
1403
- const se_GetOpenIdTokenForDeveloperIdentityInput = (input, context) => {
1404
- return {
1405
- ...(input.IdentityId != null && { IdentityId: input.IdentityId }),
1406
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1407
- ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }),
1408
- ...(input.PrincipalTags != null && { PrincipalTags: se_PrincipalTags(input.PrincipalTags, context) }),
1409
- ...(input.TokenDuration != null && { TokenDuration: input.TokenDuration }),
1410
- };
1411
- };
1412
- const se_GetOpenIdTokenInput = (input, context) => {
1413
- return {
1414
- ...(input.IdentityId != null && { IdentityId: input.IdentityId }),
1415
- ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }),
1416
- };
1417
- };
1418
- const se_GetPrincipalTagAttributeMapInput = (input, context) => {
1419
- return {
1420
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1421
- ...(input.IdentityProviderName != null && { IdentityProviderName: input.IdentityProviderName }),
1422
- };
1423
- };
1424
- const se_IdentityIdList = (input, context) => {
1425
- return input
1426
- .filter((e) => e != null)
1427
- .map((entry) => {
1428
- return entry;
1429
- });
1430
- };
1431
- const se_IdentityPool = (input, context) => {
1432
- return {
1433
- ...(input.AllowClassicFlow != null && { AllowClassicFlow: input.AllowClassicFlow }),
1434
- ...(input.AllowUnauthenticatedIdentities != null && {
1435
- AllowUnauthenticatedIdentities: input.AllowUnauthenticatedIdentities,
1436
- }),
1437
- ...(input.CognitoIdentityProviders != null && {
1438
- CognitoIdentityProviders: se_CognitoIdentityProviderList(input.CognitoIdentityProviders, context),
1439
- }),
1440
- ...(input.DeveloperProviderName != null && { DeveloperProviderName: input.DeveloperProviderName }),
1441
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1442
- ...(input.IdentityPoolName != null && { IdentityPoolName: input.IdentityPoolName }),
1443
- ...(input.IdentityPoolTags != null && {
1444
- IdentityPoolTags: se_IdentityPoolTagsType(input.IdentityPoolTags, context),
1445
- }),
1446
- ...(input.OpenIdConnectProviderARNs != null && {
1447
- OpenIdConnectProviderARNs: se_OIDCProviderList(input.OpenIdConnectProviderARNs, context),
1448
- }),
1449
- ...(input.SamlProviderARNs != null && { SamlProviderARNs: se_SAMLProviderList(input.SamlProviderARNs, context) }),
1450
- ...(input.SupportedLoginProviders != null && {
1451
- SupportedLoginProviders: se_IdentityProviders(input.SupportedLoginProviders, context),
1452
- }),
1453
- };
1454
- };
1455
- const se_IdentityPoolTagsListType = (input, context) => {
1456
- return input
1457
- .filter((e) => e != null)
1458
- .map((entry) => {
1459
- return entry;
1460
- });
1461
- };
1462
- const se_IdentityPoolTagsType = (input, context) => {
1463
- return Object.entries(input).reduce((acc, [key, value]) => {
1464
- if (value === null) {
1465
- return acc;
1466
- }
1467
- acc[key] = value;
1468
- return acc;
1469
- }, {});
1470
- };
1471
- const se_IdentityProviders = (input, context) => {
1472
- return Object.entries(input).reduce((acc, [key, value]) => {
1473
- if (value === null) {
1474
- return acc;
1475
- }
1476
- acc[key] = value;
1477
- return acc;
1478
- }, {});
1479
- };
1480
- const se_ListIdentitiesInput = (input, context) => {
1481
- return {
1482
- ...(input.HideDisabled != null && { HideDisabled: input.HideDisabled }),
1483
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1484
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1485
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1486
- };
1487
- };
1488
- const se_ListIdentityPoolsInput = (input, context) => {
1489
- return {
1490
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1491
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1492
- };
1493
- };
1494
- const se_ListTagsForResourceInput = (input, context) => {
1495
- return {
1496
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1497
- };
1498
- };
1499
- const se_LoginsList = (input, context) => {
1500
- return input
1501
- .filter((e) => e != null)
1502
- .map((entry) => {
1503
- return entry;
1504
- });
1505
- };
1506
- const se_LoginsMap = (input, context) => {
1507
- return Object.entries(input).reduce((acc, [key, value]) => {
1508
- if (value === null) {
1509
- return acc;
1510
- }
1511
- acc[key] = value;
1512
- return acc;
1513
- }, {});
1514
- };
1515
- const se_LookupDeveloperIdentityInput = (input, context) => {
1516
- return {
1517
- ...(input.DeveloperUserIdentifier != null && { DeveloperUserIdentifier: input.DeveloperUserIdentifier }),
1518
- ...(input.IdentityId != null && { IdentityId: input.IdentityId }),
1519
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1520
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1521
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1522
- };
1523
- };
1524
- const se_MappingRule = (input, context) => {
1525
- return {
1526
- ...(input.Claim != null && { Claim: input.Claim }),
1527
- ...(input.MatchType != null && { MatchType: input.MatchType }),
1528
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
1529
- ...(input.Value != null && { Value: input.Value }),
1530
- };
1531
- };
1532
- const se_MappingRulesList = (input, context) => {
1533
- return input
1534
- .filter((e) => e != null)
1535
- .map((entry) => {
1536
- return se_MappingRule(entry, context);
1537
- });
1538
- };
1539
- const se_MergeDeveloperIdentitiesInput = (input, context) => {
1540
- return {
1541
- ...(input.DestinationUserIdentifier != null && { DestinationUserIdentifier: input.DestinationUserIdentifier }),
1542
- ...(input.DeveloperProviderName != null && { DeveloperProviderName: input.DeveloperProviderName }),
1543
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1544
- ...(input.SourceUserIdentifier != null && { SourceUserIdentifier: input.SourceUserIdentifier }),
1545
- };
1546
- };
1547
- const se_OIDCProviderList = (input, context) => {
1548
- return input
1549
- .filter((e) => e != null)
1550
- .map((entry) => {
1551
- return entry;
1552
- });
1553
- };
1554
- const se_PrincipalTags = (input, context) => {
1555
- return Object.entries(input).reduce((acc, [key, value]) => {
1556
- if (value === null) {
1557
- return acc;
1558
- }
1559
- acc[key] = value;
1560
- return acc;
1561
- }, {});
1562
- };
1563
- const se_RoleMapping = (input, context) => {
1564
- return {
1565
- ...(input.AmbiguousRoleResolution != null && { AmbiguousRoleResolution: input.AmbiguousRoleResolution }),
1566
- ...(input.RulesConfiguration != null && {
1567
- RulesConfiguration: se_RulesConfigurationType(input.RulesConfiguration, context),
1568
- }),
1569
- ...(input.Type != null && { Type: input.Type }),
1570
- };
1571
- };
1572
- const se_RoleMappingMap = (input, context) => {
1573
- return Object.entries(input).reduce((acc, [key, value]) => {
1574
- if (value === null) {
1575
- return acc;
1576
- }
1577
- acc[key] = se_RoleMapping(value, context);
1578
- return acc;
1579
- }, {});
1580
- };
1581
- const se_RolesMap = (input, context) => {
1582
- return Object.entries(input).reduce((acc, [key, value]) => {
1583
- if (value === null) {
1584
- return acc;
1585
- }
1586
- acc[key] = value;
1587
- return acc;
1588
- }, {});
1589
- };
1590
- const se_RulesConfigurationType = (input, context) => {
1591
- return {
1592
- ...(input.Rules != null && { Rules: se_MappingRulesList(input.Rules, context) }),
1593
- };
1594
- };
1595
- const se_SAMLProviderList = (input, context) => {
1596
- return input
1597
- .filter((e) => e != null)
1598
- .map((entry) => {
1599
- return entry;
1600
- });
1601
- };
1602
- const se_SetIdentityPoolRolesInput = (input, context) => {
1603
- return {
1604
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1605
- ...(input.RoleMappings != null && { RoleMappings: se_RoleMappingMap(input.RoleMappings, context) }),
1606
- ...(input.Roles != null && { Roles: se_RolesMap(input.Roles, context) }),
1607
- };
1608
- };
1609
- const se_SetPrincipalTagAttributeMapInput = (input, context) => {
1610
- return {
1611
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1612
- ...(input.IdentityProviderName != null && { IdentityProviderName: input.IdentityProviderName }),
1613
- ...(input.PrincipalTags != null && { PrincipalTags: se_PrincipalTags(input.PrincipalTags, context) }),
1614
- ...(input.UseDefaults != null && { UseDefaults: input.UseDefaults }),
1615
- };
1616
- };
1617
- const se_TagResourceInput = (input, context) => {
1618
- return {
1619
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1620
- ...(input.Tags != null && { Tags: se_IdentityPoolTagsType(input.Tags, context) }),
1621
- };
1622
- };
1623
- const se_UnlinkDeveloperIdentityInput = (input, context) => {
1624
- return {
1625
- ...(input.DeveloperProviderName != null && { DeveloperProviderName: input.DeveloperProviderName }),
1626
- ...(input.DeveloperUserIdentifier != null && { DeveloperUserIdentifier: input.DeveloperUserIdentifier }),
1627
- ...(input.IdentityId != null && { IdentityId: input.IdentityId }),
1628
- ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }),
1629
- };
1630
- };
1631
- const se_UnlinkIdentityInput = (input, context) => {
1632
- return {
1633
- ...(input.IdentityId != null && { IdentityId: input.IdentityId }),
1634
- ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }),
1635
- ...(input.LoginsToRemove != null && { LoginsToRemove: se_LoginsList(input.LoginsToRemove, context) }),
1636
- };
1637
- };
1638
- const se_UntagResourceInput = (input, context) => {
1639
- return {
1640
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1641
- ...(input.TagKeys != null && { TagKeys: se_IdentityPoolTagsListType(input.TagKeys, context) }),
1642
- };
1643
- };
1644
- const de_CognitoIdentityProvider = (output, context) => {
1645
- return {
1646
- ClientId: __expectString(output.ClientId),
1647
- ProviderName: __expectString(output.ProviderName),
1648
- ServerSideTokenCheck: __expectBoolean(output.ServerSideTokenCheck),
1649
- };
1650
- };
1651
- const de_CognitoIdentityProviderList = (output, context) => {
1652
- const retVal = (output || [])
1653
- .filter((e) => e != null)
1654
- .map((entry) => {
1655
- if (entry === null) {
1656
- return null;
1657
- }
1658
- return de_CognitoIdentityProvider(entry, context);
1659
- });
1660
- return retVal;
1661
- };
1662
- const de_ConcurrentModificationException = (output, context) => {
1663
- return {
1664
- message: __expectString(output.message),
1665
- };
1666
- };
1667
1302
  const de_Credentials = (output, context) => {
1668
- return {
1669
- AccessKeyId: __expectString(output.AccessKeyId),
1670
- Expiration: output.Expiration != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Expiration))) : undefined,
1671
- SecretKey: __expectString(output.SecretKey),
1672
- SessionToken: __expectString(output.SessionToken),
1673
- };
1674
- };
1675
- const de_DeleteIdentitiesResponse = (output, context) => {
1676
- return {
1677
- UnprocessedIdentityIds: output.UnprocessedIdentityIds != null
1678
- ? de_UnprocessedIdentityIdList(output.UnprocessedIdentityIds, context)
1679
- : undefined,
1680
- };
1681
- };
1682
- const de_DeveloperUserAlreadyRegisteredException = (output, context) => {
1683
- return {
1684
- message: __expectString(output.message),
1685
- };
1686
- };
1687
- const de_DeveloperUserIdentifierList = (output, context) => {
1688
- const retVal = (output || [])
1689
- .filter((e) => e != null)
1690
- .map((entry) => {
1691
- if (entry === null) {
1692
- return null;
1693
- }
1694
- return __expectString(entry);
1303
+ return take(output, {
1304
+ AccessKeyId: __expectString,
1305
+ Expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1306
+ SecretKey: __expectString,
1307
+ SessionToken: __expectString,
1695
1308
  });
1696
- return retVal;
1697
- };
1698
- const de_ExternalServiceException = (output, context) => {
1699
- return {
1700
- message: __expectString(output.message),
1701
- };
1702
1309
  };
1703
1310
  const de_GetCredentialsForIdentityResponse = (output, context) => {
1704
- return {
1705
- Credentials: output.Credentials != null ? de_Credentials(output.Credentials, context) : undefined,
1706
- IdentityId: __expectString(output.IdentityId),
1707
- };
1708
- };
1709
- const de_GetIdentityPoolRolesResponse = (output, context) => {
1710
- return {
1711
- IdentityPoolId: __expectString(output.IdentityPoolId),
1712
- RoleMappings: output.RoleMappings != null ? de_RoleMappingMap(output.RoleMappings, context) : undefined,
1713
- Roles: output.Roles != null ? de_RolesMap(output.Roles, context) : undefined,
1714
- };
1715
- };
1716
- const de_GetIdResponse = (output, context) => {
1717
- return {
1718
- IdentityId: __expectString(output.IdentityId),
1719
- };
1720
- };
1721
- const de_GetOpenIdTokenForDeveloperIdentityResponse = (output, context) => {
1722
- return {
1723
- IdentityId: __expectString(output.IdentityId),
1724
- Token: __expectString(output.Token),
1725
- };
1726
- };
1727
- const de_GetOpenIdTokenResponse = (output, context) => {
1728
- return {
1729
- IdentityId: __expectString(output.IdentityId),
1730
- Token: __expectString(output.Token),
1731
- };
1732
- };
1733
- const de_GetPrincipalTagAttributeMapResponse = (output, context) => {
1734
- return {
1735
- IdentityPoolId: __expectString(output.IdentityPoolId),
1736
- IdentityProviderName: __expectString(output.IdentityProviderName),
1737
- PrincipalTags: output.PrincipalTags != null ? de_PrincipalTags(output.PrincipalTags, context) : undefined,
1738
- UseDefaults: __expectBoolean(output.UseDefaults),
1739
- };
1311
+ return take(output, {
1312
+ Credentials: (_) => de_Credentials(_, context),
1313
+ IdentityId: __expectString,
1314
+ });
1740
1315
  };
1741
1316
  const de_IdentitiesList = (output, context) => {
1742
1317
  const retVal = (output || [])
1743
1318
  .filter((e) => e != null)
1744
1319
  .map((entry) => {
1745
- if (entry === null) {
1746
- return null;
1747
- }
1748
1320
  return de_IdentityDescription(entry, context);
1749
1321
  });
1750
1322
  return retVal;
1751
1323
  };
1752
1324
  const de_IdentityDescription = (output, context) => {
1753
- return {
1754
- CreationDate: output.CreationDate != null
1755
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
1756
- : undefined,
1757
- IdentityId: __expectString(output.IdentityId),
1758
- LastModifiedDate: output.LastModifiedDate != null
1759
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate)))
1760
- : undefined,
1761
- Logins: output.Logins != null ? de_LoginsList(output.Logins, context) : undefined,
1762
- };
1763
- };
1764
- const de_IdentityPool = (output, context) => {
1765
- return {
1766
- AllowClassicFlow: __expectBoolean(output.AllowClassicFlow),
1767
- AllowUnauthenticatedIdentities: __expectBoolean(output.AllowUnauthenticatedIdentities),
1768
- CognitoIdentityProviders: output.CognitoIdentityProviders != null
1769
- ? de_CognitoIdentityProviderList(output.CognitoIdentityProviders, context)
1770
- : undefined,
1771
- DeveloperProviderName: __expectString(output.DeveloperProviderName),
1772
- IdentityPoolId: __expectString(output.IdentityPoolId),
1773
- IdentityPoolName: __expectString(output.IdentityPoolName),
1774
- IdentityPoolTags: output.IdentityPoolTags != null ? de_IdentityPoolTagsType(output.IdentityPoolTags, context) : undefined,
1775
- OpenIdConnectProviderARNs: output.OpenIdConnectProviderARNs != null
1776
- ? de_OIDCProviderList(output.OpenIdConnectProviderARNs, context)
1777
- : undefined,
1778
- SamlProviderARNs: output.SamlProviderARNs != null ? de_SAMLProviderList(output.SamlProviderARNs, context) : undefined,
1779
- SupportedLoginProviders: output.SupportedLoginProviders != null
1780
- ? de_IdentityProviders(output.SupportedLoginProviders, context)
1781
- : undefined,
1782
- };
1783
- };
1784
- const de_IdentityPoolShortDescription = (output, context) => {
1785
- return {
1786
- IdentityPoolId: __expectString(output.IdentityPoolId),
1787
- IdentityPoolName: __expectString(output.IdentityPoolName),
1788
- };
1789
- };
1790
- const de_IdentityPoolsList = (output, context) => {
1791
- const retVal = (output || [])
1792
- .filter((e) => e != null)
1793
- .map((entry) => {
1794
- if (entry === null) {
1795
- return null;
1796
- }
1797
- return de_IdentityPoolShortDescription(entry, context);
1325
+ return take(output, {
1326
+ CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1327
+ IdentityId: __expectString,
1328
+ LastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1329
+ Logins: _json,
1798
1330
  });
1799
- return retVal;
1800
- };
1801
- const de_IdentityPoolTagsType = (output, context) => {
1802
- return Object.entries(output).reduce((acc, [key, value]) => {
1803
- if (value === null) {
1804
- return acc;
1805
- }
1806
- acc[key] = __expectString(value);
1807
- return acc;
1808
- }, {});
1809
- };
1810
- const de_IdentityProviders = (output, context) => {
1811
- return Object.entries(output).reduce((acc, [key, value]) => {
1812
- if (value === null) {
1813
- return acc;
1814
- }
1815
- acc[key] = __expectString(value);
1816
- return acc;
1817
- }, {});
1818
- };
1819
- const de_InternalErrorException = (output, context) => {
1820
- return {
1821
- message: __expectString(output.message),
1822
- };
1823
- };
1824
- const de_InvalidIdentityPoolConfigurationException = (output, context) => {
1825
- return {
1826
- message: __expectString(output.message),
1827
- };
1828
- };
1829
- const de_InvalidParameterException = (output, context) => {
1830
- return {
1831
- message: __expectString(output.message),
1832
- };
1833
- };
1834
- const de_LimitExceededException = (output, context) => {
1835
- return {
1836
- message: __expectString(output.message),
1837
- };
1838
1331
  };
1839
1332
  const de_ListIdentitiesResponse = (output, context) => {
1840
- return {
1841
- Identities: output.Identities != null ? de_IdentitiesList(output.Identities, context) : undefined,
1842
- IdentityPoolId: __expectString(output.IdentityPoolId),
1843
- NextToken: __expectString(output.NextToken),
1844
- };
1845
- };
1846
- const de_ListIdentityPoolsResponse = (output, context) => {
1847
- return {
1848
- IdentityPools: output.IdentityPools != null ? de_IdentityPoolsList(output.IdentityPools, context) : undefined,
1849
- NextToken: __expectString(output.NextToken),
1850
- };
1851
- };
1852
- const de_ListTagsForResourceResponse = (output, context) => {
1853
- return {
1854
- Tags: output.Tags != null ? de_IdentityPoolTagsType(output.Tags, context) : undefined,
1855
- };
1856
- };
1857
- const de_LoginsList = (output, context) => {
1858
- const retVal = (output || [])
1859
- .filter((e) => e != null)
1860
- .map((entry) => {
1861
- if (entry === null) {
1862
- return null;
1863
- }
1864
- return __expectString(entry);
1865
- });
1866
- return retVal;
1867
- };
1868
- const de_LookupDeveloperIdentityResponse = (output, context) => {
1869
- return {
1870
- DeveloperUserIdentifierList: output.DeveloperUserIdentifierList != null
1871
- ? de_DeveloperUserIdentifierList(output.DeveloperUserIdentifierList, context)
1872
- : undefined,
1873
- IdentityId: __expectString(output.IdentityId),
1874
- NextToken: __expectString(output.NextToken),
1875
- };
1876
- };
1877
- const de_MappingRule = (output, context) => {
1878
- return {
1879
- Claim: __expectString(output.Claim),
1880
- MatchType: __expectString(output.MatchType),
1881
- RoleARN: __expectString(output.RoleARN),
1882
- Value: __expectString(output.Value),
1883
- };
1884
- };
1885
- const de_MappingRulesList = (output, context) => {
1886
- const retVal = (output || [])
1887
- .filter((e) => e != null)
1888
- .map((entry) => {
1889
- if (entry === null) {
1890
- return null;
1891
- }
1892
- return de_MappingRule(entry, context);
1893
- });
1894
- return retVal;
1895
- };
1896
- const de_MergeDeveloperIdentitiesResponse = (output, context) => {
1897
- return {
1898
- IdentityId: __expectString(output.IdentityId),
1899
- };
1900
- };
1901
- const de_NotAuthorizedException = (output, context) => {
1902
- return {
1903
- message: __expectString(output.message),
1904
- };
1905
- };
1906
- const de_OIDCProviderList = (output, context) => {
1907
- const retVal = (output || [])
1908
- .filter((e) => e != null)
1909
- .map((entry) => {
1910
- if (entry === null) {
1911
- return null;
1912
- }
1913
- return __expectString(entry);
1914
- });
1915
- return retVal;
1916
- };
1917
- const de_PrincipalTags = (output, context) => {
1918
- return Object.entries(output).reduce((acc, [key, value]) => {
1919
- if (value === null) {
1920
- return acc;
1921
- }
1922
- acc[key] = __expectString(value);
1923
- return acc;
1924
- }, {});
1925
- };
1926
- const de_ResourceConflictException = (output, context) => {
1927
- return {
1928
- message: __expectString(output.message),
1929
- };
1930
- };
1931
- const de_ResourceNotFoundException = (output, context) => {
1932
- return {
1933
- message: __expectString(output.message),
1934
- };
1935
- };
1936
- const de_RoleMapping = (output, context) => {
1937
- return {
1938
- AmbiguousRoleResolution: __expectString(output.AmbiguousRoleResolution),
1939
- RulesConfiguration: output.RulesConfiguration != null ? de_RulesConfigurationType(output.RulesConfiguration, context) : undefined,
1940
- Type: __expectString(output.Type),
1941
- };
1942
- };
1943
- const de_RoleMappingMap = (output, context) => {
1944
- return Object.entries(output).reduce((acc, [key, value]) => {
1945
- if (value === null) {
1946
- return acc;
1947
- }
1948
- acc[key] = de_RoleMapping(value, context);
1949
- return acc;
1950
- }, {});
1951
- };
1952
- const de_RolesMap = (output, context) => {
1953
- return Object.entries(output).reduce((acc, [key, value]) => {
1954
- if (value === null) {
1955
- return acc;
1956
- }
1957
- acc[key] = __expectString(value);
1958
- return acc;
1959
- }, {});
1960
- };
1961
- const de_RulesConfigurationType = (output, context) => {
1962
- return {
1963
- Rules: output.Rules != null ? de_MappingRulesList(output.Rules, context) : undefined,
1964
- };
1965
- };
1966
- const de_SAMLProviderList = (output, context) => {
1967
- const retVal = (output || [])
1968
- .filter((e) => e != null)
1969
- .map((entry) => {
1970
- if (entry === null) {
1971
- return null;
1972
- }
1973
- return __expectString(entry);
1333
+ return take(output, {
1334
+ Identities: (_) => de_IdentitiesList(_, context),
1335
+ IdentityPoolId: __expectString,
1336
+ NextToken: __expectString,
1974
1337
  });
1975
- return retVal;
1976
- };
1977
- const de_SetPrincipalTagAttributeMapResponse = (output, context) => {
1978
- return {
1979
- IdentityPoolId: __expectString(output.IdentityPoolId),
1980
- IdentityProviderName: __expectString(output.IdentityProviderName),
1981
- PrincipalTags: output.PrincipalTags != null ? de_PrincipalTags(output.PrincipalTags, context) : undefined,
1982
- UseDefaults: __expectBoolean(output.UseDefaults),
1983
- };
1984
- };
1985
- const de_TagResourceResponse = (output, context) => {
1986
- return {};
1987
- };
1988
- const de_TooManyRequestsException = (output, context) => {
1989
- return {
1990
- message: __expectString(output.message),
1991
- };
1992
- };
1993
- const de_UnprocessedIdentityId = (output, context) => {
1994
- return {
1995
- ErrorCode: __expectString(output.ErrorCode),
1996
- IdentityId: __expectString(output.IdentityId),
1997
- };
1998
- };
1999
- const de_UnprocessedIdentityIdList = (output, context) => {
2000
- const retVal = (output || [])
2001
- .filter((e) => e != null)
2002
- .map((entry) => {
2003
- if (entry === null) {
2004
- return null;
2005
- }
2006
- return de_UnprocessedIdentityId(entry, context);
2007
- });
2008
- return retVal;
2009
- };
2010
- const de_UntagResourceResponse = (output, context) => {
2011
- return {};
2012
1338
  };
2013
1339
  const deserializeMetadata = (output) => ({
2014
1340
  httpStatusCode: output.statusCode,
@@ -2023,6 +1349,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2023
1349
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2024
1350
  };
2025
1351
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1352
+ const throwDefaultError = withBaseException(__BaseException);
2026
1353
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2027
1354
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2028
1355
  const contents = {