@aws-sdk/client-kinesis 3.312.0 → 3.315.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.
@@ -9,84 +9,84 @@ const models_0_1 = require("../models/models_0");
9
9
  const se_AddTagsToStreamCommand = async (input, context) => {
10
10
  const headers = sharedHeaders("AddTagsToStream");
11
11
  let body;
12
- body = JSON.stringify(se_AddTagsToStreamInput(input, context));
12
+ body = JSON.stringify((0, smithy_client_1._json)(input));
13
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
14
  };
15
15
  exports.se_AddTagsToStreamCommand = se_AddTagsToStreamCommand;
16
16
  const se_CreateStreamCommand = async (input, context) => {
17
17
  const headers = sharedHeaders("CreateStream");
18
18
  let body;
19
- body = JSON.stringify(se_CreateStreamInput(input, context));
19
+ body = JSON.stringify((0, smithy_client_1._json)(input));
20
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
21
  };
22
22
  exports.se_CreateStreamCommand = se_CreateStreamCommand;
23
23
  const se_DecreaseStreamRetentionPeriodCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("DecreaseStreamRetentionPeriod");
25
25
  let body;
26
- body = JSON.stringify(se_DecreaseStreamRetentionPeriodInput(input, context));
26
+ body = JSON.stringify((0, smithy_client_1._json)(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  exports.se_DecreaseStreamRetentionPeriodCommand = se_DecreaseStreamRetentionPeriodCommand;
30
30
  const se_DeleteStreamCommand = async (input, context) => {
31
31
  const headers = sharedHeaders("DeleteStream");
32
32
  let body;
33
- body = JSON.stringify(se_DeleteStreamInput(input, context));
33
+ body = JSON.stringify((0, smithy_client_1._json)(input));
34
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
35
  };
36
36
  exports.se_DeleteStreamCommand = se_DeleteStreamCommand;
37
37
  const se_DeregisterStreamConsumerCommand = async (input, context) => {
38
38
  const headers = sharedHeaders("DeregisterStreamConsumer");
39
39
  let body;
40
- body = JSON.stringify(se_DeregisterStreamConsumerInput(input, context));
40
+ body = JSON.stringify((0, smithy_client_1._json)(input));
41
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
42
  };
43
43
  exports.se_DeregisterStreamConsumerCommand = se_DeregisterStreamConsumerCommand;
44
44
  const se_DescribeLimitsCommand = async (input, context) => {
45
45
  const headers = sharedHeaders("DescribeLimits");
46
46
  let body;
47
- body = JSON.stringify(se_DescribeLimitsInput(input, context));
47
+ body = JSON.stringify((0, smithy_client_1._json)(input));
48
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
49
  };
50
50
  exports.se_DescribeLimitsCommand = se_DescribeLimitsCommand;
51
51
  const se_DescribeStreamCommand = async (input, context) => {
52
52
  const headers = sharedHeaders("DescribeStream");
53
53
  let body;
54
- body = JSON.stringify(se_DescribeStreamInput(input, context));
54
+ body = JSON.stringify((0, smithy_client_1._json)(input));
55
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
56
  };
57
57
  exports.se_DescribeStreamCommand = se_DescribeStreamCommand;
58
58
  const se_DescribeStreamConsumerCommand = async (input, context) => {
59
59
  const headers = sharedHeaders("DescribeStreamConsumer");
60
60
  let body;
61
- body = JSON.stringify(se_DescribeStreamConsumerInput(input, context));
61
+ body = JSON.stringify((0, smithy_client_1._json)(input));
62
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
63
  };
64
64
  exports.se_DescribeStreamConsumerCommand = se_DescribeStreamConsumerCommand;
65
65
  const se_DescribeStreamSummaryCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("DescribeStreamSummary");
67
67
  let body;
68
- body = JSON.stringify(se_DescribeStreamSummaryInput(input, context));
68
+ body = JSON.stringify((0, smithy_client_1._json)(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  exports.se_DescribeStreamSummaryCommand = se_DescribeStreamSummaryCommand;
72
72
  const se_DisableEnhancedMonitoringCommand = async (input, context) => {
73
73
  const headers = sharedHeaders("DisableEnhancedMonitoring");
74
74
  let body;
75
- body = JSON.stringify(se_DisableEnhancedMonitoringInput(input, context));
75
+ body = JSON.stringify((0, smithy_client_1._json)(input));
76
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
77
  };
78
78
  exports.se_DisableEnhancedMonitoringCommand = se_DisableEnhancedMonitoringCommand;
79
79
  const se_EnableEnhancedMonitoringCommand = async (input, context) => {
80
80
  const headers = sharedHeaders("EnableEnhancedMonitoring");
81
81
  let body;
82
- body = JSON.stringify(se_EnableEnhancedMonitoringInput(input, context));
82
+ body = JSON.stringify((0, smithy_client_1._json)(input));
83
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
84
  };
85
85
  exports.se_EnableEnhancedMonitoringCommand = se_EnableEnhancedMonitoringCommand;
86
86
  const se_GetRecordsCommand = async (input, context) => {
87
87
  const headers = sharedHeaders("GetRecords");
88
88
  let body;
89
- body = JSON.stringify(se_GetRecordsInput(input, context));
89
+ body = JSON.stringify((0, smithy_client_1._json)(input));
90
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
91
  };
92
92
  exports.se_GetRecordsCommand = se_GetRecordsCommand;
@@ -100,7 +100,7 @@ exports.se_GetShardIteratorCommand = se_GetShardIteratorCommand;
100
100
  const se_IncreaseStreamRetentionPeriodCommand = async (input, context) => {
101
101
  const headers = sharedHeaders("IncreaseStreamRetentionPeriod");
102
102
  let body;
103
- body = JSON.stringify(se_IncreaseStreamRetentionPeriodInput(input, context));
103
+ body = JSON.stringify((0, smithy_client_1._json)(input));
104
104
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
105
  };
106
106
  exports.se_IncreaseStreamRetentionPeriodCommand = se_IncreaseStreamRetentionPeriodCommand;
@@ -121,21 +121,21 @@ exports.se_ListStreamConsumersCommand = se_ListStreamConsumersCommand;
121
121
  const se_ListStreamsCommand = async (input, context) => {
122
122
  const headers = sharedHeaders("ListStreams");
123
123
  let body;
124
- body = JSON.stringify(se_ListStreamsInput(input, context));
124
+ body = JSON.stringify((0, smithy_client_1._json)(input));
125
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
126
  };
127
127
  exports.se_ListStreamsCommand = se_ListStreamsCommand;
128
128
  const se_ListTagsForStreamCommand = async (input, context) => {
129
129
  const headers = sharedHeaders("ListTagsForStream");
130
130
  let body;
131
- body = JSON.stringify(se_ListTagsForStreamInput(input, context));
131
+ body = JSON.stringify((0, smithy_client_1._json)(input));
132
132
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
133
  };
134
134
  exports.se_ListTagsForStreamCommand = se_ListTagsForStreamCommand;
135
135
  const se_MergeShardsCommand = async (input, context) => {
136
136
  const headers = sharedHeaders("MergeShards");
137
137
  let body;
138
- body = JSON.stringify(se_MergeShardsInput(input, context));
138
+ body = JSON.stringify((0, smithy_client_1._json)(input));
139
139
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
140
  };
141
141
  exports.se_MergeShardsCommand = se_MergeShardsCommand;
@@ -156,35 +156,35 @@ exports.se_PutRecordsCommand = se_PutRecordsCommand;
156
156
  const se_RegisterStreamConsumerCommand = async (input, context) => {
157
157
  const headers = sharedHeaders("RegisterStreamConsumer");
158
158
  let body;
159
- body = JSON.stringify(se_RegisterStreamConsumerInput(input, context));
159
+ body = JSON.stringify((0, smithy_client_1._json)(input));
160
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
161
  };
162
162
  exports.se_RegisterStreamConsumerCommand = se_RegisterStreamConsumerCommand;
163
163
  const se_RemoveTagsFromStreamCommand = async (input, context) => {
164
164
  const headers = sharedHeaders("RemoveTagsFromStream");
165
165
  let body;
166
- body = JSON.stringify(se_RemoveTagsFromStreamInput(input, context));
166
+ body = JSON.stringify((0, smithy_client_1._json)(input));
167
167
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
168
  };
169
169
  exports.se_RemoveTagsFromStreamCommand = se_RemoveTagsFromStreamCommand;
170
170
  const se_SplitShardCommand = async (input, context) => {
171
171
  const headers = sharedHeaders("SplitShard");
172
172
  let body;
173
- body = JSON.stringify(se_SplitShardInput(input, context));
173
+ body = JSON.stringify((0, smithy_client_1._json)(input));
174
174
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
175
  };
176
176
  exports.se_SplitShardCommand = se_SplitShardCommand;
177
177
  const se_StartStreamEncryptionCommand = async (input, context) => {
178
178
  const headers = sharedHeaders("StartStreamEncryption");
179
179
  let body;
180
- body = JSON.stringify(se_StartStreamEncryptionInput(input, context));
180
+ body = JSON.stringify((0, smithy_client_1._json)(input));
181
181
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
182
  };
183
183
  exports.se_StartStreamEncryptionCommand = se_StartStreamEncryptionCommand;
184
184
  const se_StopStreamEncryptionCommand = async (input, context) => {
185
185
  const headers = sharedHeaders("StopStreamEncryption");
186
186
  let body;
187
- body = JSON.stringify(se_StopStreamEncryptionInput(input, context));
187
+ body = JSON.stringify((0, smithy_client_1._json)(input));
188
188
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
189
  };
190
190
  exports.se_StopStreamEncryptionCommand = se_StopStreamEncryptionCommand;
@@ -198,14 +198,14 @@ exports.se_SubscribeToShardCommand = se_SubscribeToShardCommand;
198
198
  const se_UpdateShardCountCommand = async (input, context) => {
199
199
  const headers = sharedHeaders("UpdateShardCount");
200
200
  let body;
201
- body = JSON.stringify(se_UpdateShardCountInput(input, context));
201
+ body = JSON.stringify((0, smithy_client_1._json)(input));
202
202
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
203
  };
204
204
  exports.se_UpdateShardCountCommand = se_UpdateShardCountCommand;
205
205
  const se_UpdateStreamModeCommand = async (input, context) => {
206
206
  const headers = sharedHeaders("UpdateStreamMode");
207
207
  let body;
208
- body = JSON.stringify(se_UpdateStreamModeInput(input, context));
208
+ body = JSON.stringify((0, smithy_client_1._json)(input));
209
209
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
210
  };
211
211
  exports.se_UpdateStreamModeCommand = se_UpdateStreamModeCommand;
@@ -217,7 +217,7 @@ const de_AddTagsToStreamCommand = async (output, context) => {
217
217
  const response = {
218
218
  $metadata: deserializeMetadata(output),
219
219
  };
220
- return Promise.resolve(response);
220
+ return response;
221
221
  };
222
222
  exports.de_AddTagsToStreamCommand = de_AddTagsToStreamCommand;
223
223
  const de_AddTagsToStreamCommandError = async (output, context) => {
@@ -244,10 +244,9 @@ const de_AddTagsToStreamCommandError = async (output, context) => {
244
244
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
245
245
  default:
246
246
  const parsedBody = parsedOutput.body;
247
- (0, smithy_client_1.throwDefaultError)({
247
+ return throwDefaultError({
248
248
  output,
249
249
  parsedBody,
250
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
251
250
  errorCode,
252
251
  });
253
252
  }
@@ -260,7 +259,7 @@ const de_CreateStreamCommand = async (output, context) => {
260
259
  const response = {
261
260
  $metadata: deserializeMetadata(output),
262
261
  };
263
- return Promise.resolve(response);
262
+ return response;
264
263
  };
265
264
  exports.de_CreateStreamCommand = de_CreateStreamCommand;
266
265
  const de_CreateStreamCommandError = async (output, context) => {
@@ -281,10 +280,9 @@ const de_CreateStreamCommandError = async (output, context) => {
281
280
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
282
281
  default:
283
282
  const parsedBody = parsedOutput.body;
284
- (0, smithy_client_1.throwDefaultError)({
283
+ return throwDefaultError({
285
284
  output,
286
285
  parsedBody,
287
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
288
286
  errorCode,
289
287
  });
290
288
  }
@@ -297,7 +295,7 @@ const de_DecreaseStreamRetentionPeriodCommand = async (output, context) => {
297
295
  const response = {
298
296
  $metadata: deserializeMetadata(output),
299
297
  };
300
- return Promise.resolve(response);
298
+ return response;
301
299
  };
302
300
  exports.de_DecreaseStreamRetentionPeriodCommand = de_DecreaseStreamRetentionPeriodCommand;
303
301
  const de_DecreaseStreamRetentionPeriodCommandError = async (output, context) => {
@@ -324,10 +322,9 @@ const de_DecreaseStreamRetentionPeriodCommandError = async (output, context) =>
324
322
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
325
323
  default:
326
324
  const parsedBody = parsedOutput.body;
327
- (0, smithy_client_1.throwDefaultError)({
325
+ return throwDefaultError({
328
326
  output,
329
327
  parsedBody,
330
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
331
328
  errorCode,
332
329
  });
333
330
  }
@@ -340,7 +337,7 @@ const de_DeleteStreamCommand = async (output, context) => {
340
337
  const response = {
341
338
  $metadata: deserializeMetadata(output),
342
339
  };
343
- return Promise.resolve(response);
340
+ return response;
344
341
  };
345
342
  exports.de_DeleteStreamCommand = de_DeleteStreamCommand;
346
343
  const de_DeleteStreamCommandError = async (output, context) => {
@@ -367,10 +364,9 @@ const de_DeleteStreamCommandError = async (output, context) => {
367
364
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
368
365
  default:
369
366
  const parsedBody = parsedOutput.body;
370
- (0, smithy_client_1.throwDefaultError)({
367
+ return throwDefaultError({
371
368
  output,
372
369
  parsedBody,
373
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
374
370
  errorCode,
375
371
  });
376
372
  }
@@ -383,7 +379,7 @@ const de_DeregisterStreamConsumerCommand = async (output, context) => {
383
379
  const response = {
384
380
  $metadata: deserializeMetadata(output),
385
381
  };
386
- return Promise.resolve(response);
382
+ return response;
387
383
  };
388
384
  exports.de_DeregisterStreamConsumerCommand = de_DeregisterStreamConsumerCommand;
389
385
  const de_DeregisterStreamConsumerCommandError = async (output, context) => {
@@ -404,10 +400,9 @@ const de_DeregisterStreamConsumerCommandError = async (output, context) => {
404
400
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
405
401
  default:
406
402
  const parsedBody = parsedOutput.body;
407
- (0, smithy_client_1.throwDefaultError)({
403
+ return throwDefaultError({
408
404
  output,
409
405
  parsedBody,
410
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
411
406
  errorCode,
412
407
  });
413
408
  }
@@ -418,12 +413,12 @@ const de_DescribeLimitsCommand = async (output, context) => {
418
413
  }
419
414
  const data = await parseBody(output.body, context);
420
415
  let contents = {};
421
- contents = de_DescribeLimitsOutput(data, context);
416
+ contents = (0, smithy_client_1._json)(data);
422
417
  const response = {
423
418
  $metadata: deserializeMetadata(output),
424
419
  ...contents,
425
420
  };
426
- return Promise.resolve(response);
421
+ return response;
427
422
  };
428
423
  exports.de_DescribeLimitsCommand = de_DescribeLimitsCommand;
429
424
  const de_DescribeLimitsCommandError = async (output, context) => {
@@ -438,10 +433,9 @@ const de_DescribeLimitsCommandError = async (output, context) => {
438
433
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
439
434
  default:
440
435
  const parsedBody = parsedOutput.body;
441
- (0, smithy_client_1.throwDefaultError)({
436
+ return throwDefaultError({
442
437
  output,
443
438
  parsedBody,
444
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
445
439
  errorCode,
446
440
  });
447
441
  }
@@ -457,7 +451,7 @@ const de_DescribeStreamCommand = async (output, context) => {
457
451
  $metadata: deserializeMetadata(output),
458
452
  ...contents,
459
453
  };
460
- return Promise.resolve(response);
454
+ return response;
461
455
  };
462
456
  exports.de_DescribeStreamCommand = de_DescribeStreamCommand;
463
457
  const de_DescribeStreamCommandError = async (output, context) => {
@@ -481,10 +475,9 @@ const de_DescribeStreamCommandError = async (output, context) => {
481
475
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
482
476
  default:
483
477
  const parsedBody = parsedOutput.body;
484
- (0, smithy_client_1.throwDefaultError)({
478
+ return throwDefaultError({
485
479
  output,
486
480
  parsedBody,
487
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
488
481
  errorCode,
489
482
  });
490
483
  }
@@ -500,7 +493,7 @@ const de_DescribeStreamConsumerCommand = async (output, context) => {
500
493
  $metadata: deserializeMetadata(output),
501
494
  ...contents,
502
495
  };
503
- return Promise.resolve(response);
496
+ return response;
504
497
  };
505
498
  exports.de_DescribeStreamConsumerCommand = de_DescribeStreamConsumerCommand;
506
499
  const de_DescribeStreamConsumerCommandError = async (output, context) => {
@@ -521,10 +514,9 @@ const de_DescribeStreamConsumerCommandError = async (output, context) => {
521
514
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
522
515
  default:
523
516
  const parsedBody = parsedOutput.body;
524
- (0, smithy_client_1.throwDefaultError)({
517
+ return throwDefaultError({
525
518
  output,
526
519
  parsedBody,
527
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
528
520
  errorCode,
529
521
  });
530
522
  }
@@ -540,7 +532,7 @@ const de_DescribeStreamSummaryCommand = async (output, context) => {
540
532
  $metadata: deserializeMetadata(output),
541
533
  ...contents,
542
534
  };
543
- return Promise.resolve(response);
535
+ return response;
544
536
  };
545
537
  exports.de_DescribeStreamSummaryCommand = de_DescribeStreamSummaryCommand;
546
538
  const de_DescribeStreamSummaryCommandError = async (output, context) => {
@@ -564,10 +556,9 @@ const de_DescribeStreamSummaryCommandError = async (output, context) => {
564
556
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
565
557
  default:
566
558
  const parsedBody = parsedOutput.body;
567
- (0, smithy_client_1.throwDefaultError)({
559
+ return throwDefaultError({
568
560
  output,
569
561
  parsedBody,
570
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
571
562
  errorCode,
572
563
  });
573
564
  }
@@ -578,12 +569,12 @@ const de_DisableEnhancedMonitoringCommand = async (output, context) => {
578
569
  }
579
570
  const data = await parseBody(output.body, context);
580
571
  let contents = {};
581
- contents = de_EnhancedMonitoringOutput(data, context);
572
+ contents = (0, smithy_client_1._json)(data);
582
573
  const response = {
583
574
  $metadata: deserializeMetadata(output),
584
575
  ...contents,
585
576
  };
586
- return Promise.resolve(response);
577
+ return response;
587
578
  };
588
579
  exports.de_DisableEnhancedMonitoringCommand = de_DisableEnhancedMonitoringCommand;
589
580
  const de_DisableEnhancedMonitoringCommandError = async (output, context) => {
@@ -610,10 +601,9 @@ const de_DisableEnhancedMonitoringCommandError = async (output, context) => {
610
601
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
611
602
  default:
612
603
  const parsedBody = parsedOutput.body;
613
- (0, smithy_client_1.throwDefaultError)({
604
+ return throwDefaultError({
614
605
  output,
615
606
  parsedBody,
616
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
617
607
  errorCode,
618
608
  });
619
609
  }
@@ -624,12 +614,12 @@ const de_EnableEnhancedMonitoringCommand = async (output, context) => {
624
614
  }
625
615
  const data = await parseBody(output.body, context);
626
616
  let contents = {};
627
- contents = de_EnhancedMonitoringOutput(data, context);
617
+ contents = (0, smithy_client_1._json)(data);
628
618
  const response = {
629
619
  $metadata: deserializeMetadata(output),
630
620
  ...contents,
631
621
  };
632
- return Promise.resolve(response);
622
+ return response;
633
623
  };
634
624
  exports.de_EnableEnhancedMonitoringCommand = de_EnableEnhancedMonitoringCommand;
635
625
  const de_EnableEnhancedMonitoringCommandError = async (output, context) => {
@@ -656,10 +646,9 @@ const de_EnableEnhancedMonitoringCommandError = async (output, context) => {
656
646
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
657
647
  default:
658
648
  const parsedBody = parsedOutput.body;
659
- (0, smithy_client_1.throwDefaultError)({
649
+ return throwDefaultError({
660
650
  output,
661
651
  parsedBody,
662
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
663
652
  errorCode,
664
653
  });
665
654
  }
@@ -675,7 +664,7 @@ const de_GetRecordsCommand = async (output, context) => {
675
664
  $metadata: deserializeMetadata(output),
676
665
  ...contents,
677
666
  };
678
- return Promise.resolve(response);
667
+ return response;
679
668
  };
680
669
  exports.de_GetRecordsCommand = de_GetRecordsCommand;
681
670
  const de_GetRecordsCommandError = async (output, context) => {
@@ -720,10 +709,9 @@ const de_GetRecordsCommandError = async (output, context) => {
720
709
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
721
710
  default:
722
711
  const parsedBody = parsedOutput.body;
723
- (0, smithy_client_1.throwDefaultError)({
712
+ return throwDefaultError({
724
713
  output,
725
714
  parsedBody,
726
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
727
715
  errorCode,
728
716
  });
729
717
  }
@@ -734,12 +722,12 @@ const de_GetShardIteratorCommand = async (output, context) => {
734
722
  }
735
723
  const data = await parseBody(output.body, context);
736
724
  let contents = {};
737
- contents = de_GetShardIteratorOutput(data, context);
725
+ contents = (0, smithy_client_1._json)(data);
738
726
  const response = {
739
727
  $metadata: deserializeMetadata(output),
740
728
  ...contents,
741
729
  };
742
- return Promise.resolve(response);
730
+ return response;
743
731
  };
744
732
  exports.de_GetShardIteratorCommand = de_GetShardIteratorCommand;
745
733
  const de_GetShardIteratorCommandError = async (output, context) => {
@@ -763,10 +751,9 @@ const de_GetShardIteratorCommandError = async (output, context) => {
763
751
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
764
752
  default:
765
753
  const parsedBody = parsedOutput.body;
766
- (0, smithy_client_1.throwDefaultError)({
754
+ return throwDefaultError({
767
755
  output,
768
756
  parsedBody,
769
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
770
757
  errorCode,
771
758
  });
772
759
  }
@@ -779,7 +766,7 @@ const de_IncreaseStreamRetentionPeriodCommand = async (output, context) => {
779
766
  const response = {
780
767
  $metadata: deserializeMetadata(output),
781
768
  };
782
- return Promise.resolve(response);
769
+ return response;
783
770
  };
784
771
  exports.de_IncreaseStreamRetentionPeriodCommand = de_IncreaseStreamRetentionPeriodCommand;
785
772
  const de_IncreaseStreamRetentionPeriodCommandError = async (output, context) => {
@@ -806,10 +793,9 @@ const de_IncreaseStreamRetentionPeriodCommandError = async (output, context) =>
806
793
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
807
794
  default:
808
795
  const parsedBody = parsedOutput.body;
809
- (0, smithy_client_1.throwDefaultError)({
796
+ return throwDefaultError({
810
797
  output,
811
798
  parsedBody,
812
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
813
799
  errorCode,
814
800
  });
815
801
  }
@@ -820,12 +806,12 @@ const de_ListShardsCommand = async (output, context) => {
820
806
  }
821
807
  const data = await parseBody(output.body, context);
822
808
  let contents = {};
823
- contents = de_ListShardsOutput(data, context);
809
+ contents = (0, smithy_client_1._json)(data);
824
810
  const response = {
825
811
  $metadata: deserializeMetadata(output),
826
812
  ...contents,
827
813
  };
828
- return Promise.resolve(response);
814
+ return response;
829
815
  };
830
816
  exports.de_ListShardsCommand = de_ListShardsCommand;
831
817
  const de_ListShardsCommandError = async (output, context) => {
@@ -855,10 +841,9 @@ const de_ListShardsCommandError = async (output, context) => {
855
841
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
856
842
  default:
857
843
  const parsedBody = parsedOutput.body;
858
- (0, smithy_client_1.throwDefaultError)({
844
+ return throwDefaultError({
859
845
  output,
860
846
  parsedBody,
861
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
862
847
  errorCode,
863
848
  });
864
849
  }
@@ -874,7 +859,7 @@ const de_ListStreamConsumersCommand = async (output, context) => {
874
859
  $metadata: deserializeMetadata(output),
875
860
  ...contents,
876
861
  };
877
- return Promise.resolve(response);
862
+ return response;
878
863
  };
879
864
  exports.de_ListStreamConsumersCommand = de_ListStreamConsumersCommand;
880
865
  const de_ListStreamConsumersCommandError = async (output, context) => {
@@ -901,10 +886,9 @@ const de_ListStreamConsumersCommandError = async (output, context) => {
901
886
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
902
887
  default:
903
888
  const parsedBody = parsedOutput.body;
904
- (0, smithy_client_1.throwDefaultError)({
889
+ return throwDefaultError({
905
890
  output,
906
891
  parsedBody,
907
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
908
892
  errorCode,
909
893
  });
910
894
  }
@@ -920,7 +904,7 @@ const de_ListStreamsCommand = async (output, context) => {
920
904
  $metadata: deserializeMetadata(output),
921
905
  ...contents,
922
906
  };
923
- return Promise.resolve(response);
907
+ return response;
924
908
  };
925
909
  exports.de_ListStreamsCommand = de_ListStreamsCommand;
926
910
  const de_ListStreamsCommandError = async (output, context) => {
@@ -941,10 +925,9 @@ const de_ListStreamsCommandError = async (output, context) => {
941
925
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
942
926
  default:
943
927
  const parsedBody = parsedOutput.body;
944
- (0, smithy_client_1.throwDefaultError)({
928
+ return throwDefaultError({
945
929
  output,
946
930
  parsedBody,
947
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
948
931
  errorCode,
949
932
  });
950
933
  }
@@ -955,12 +938,12 @@ const de_ListTagsForStreamCommand = async (output, context) => {
955
938
  }
956
939
  const data = await parseBody(output.body, context);
957
940
  let contents = {};
958
- contents = de_ListTagsForStreamOutput(data, context);
941
+ contents = (0, smithy_client_1._json)(data);
959
942
  const response = {
960
943
  $metadata: deserializeMetadata(output),
961
944
  ...contents,
962
945
  };
963
- return Promise.resolve(response);
946
+ return response;
964
947
  };
965
948
  exports.de_ListTagsForStreamCommand = de_ListTagsForStreamCommand;
966
949
  const de_ListTagsForStreamCommandError = async (output, context) => {
@@ -984,10 +967,9 @@ const de_ListTagsForStreamCommandError = async (output, context) => {
984
967
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
985
968
  default:
986
969
  const parsedBody = parsedOutput.body;
987
- (0, smithy_client_1.throwDefaultError)({
970
+ return throwDefaultError({
988
971
  output,
989
972
  parsedBody,
990
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
991
973
  errorCode,
992
974
  });
993
975
  }
@@ -1000,7 +982,7 @@ const de_MergeShardsCommand = async (output, context) => {
1000
982
  const response = {
1001
983
  $metadata: deserializeMetadata(output),
1002
984
  };
1003
- return Promise.resolve(response);
985
+ return response;
1004
986
  };
1005
987
  exports.de_MergeShardsCommand = de_MergeShardsCommand;
1006
988
  const de_MergeShardsCommandError = async (output, context) => {
@@ -1030,10 +1012,9 @@ const de_MergeShardsCommandError = async (output, context) => {
1030
1012
  throw await de_ValidationExceptionRes(parsedOutput, context);
1031
1013
  default:
1032
1014
  const parsedBody = parsedOutput.body;
1033
- (0, smithy_client_1.throwDefaultError)({
1015
+ return throwDefaultError({
1034
1016
  output,
1035
1017
  parsedBody,
1036
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1037
1018
  errorCode,
1038
1019
  });
1039
1020
  }
@@ -1044,12 +1025,12 @@ const de_PutRecordCommand = async (output, context) => {
1044
1025
  }
1045
1026
  const data = await parseBody(output.body, context);
1046
1027
  let contents = {};
1047
- contents = de_PutRecordOutput(data, context);
1028
+ contents = (0, smithy_client_1._json)(data);
1048
1029
  const response = {
1049
1030
  $metadata: deserializeMetadata(output),
1050
1031
  ...contents,
1051
1032
  };
1052
- return Promise.resolve(response);
1033
+ return response;
1053
1034
  };
1054
1035
  exports.de_PutRecordCommand = de_PutRecordCommand;
1055
1036
  const de_PutRecordCommandError = async (output, context) => {
@@ -1091,10 +1072,9 @@ const de_PutRecordCommandError = async (output, context) => {
1091
1072
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1092
1073
  default:
1093
1074
  const parsedBody = parsedOutput.body;
1094
- (0, smithy_client_1.throwDefaultError)({
1075
+ return throwDefaultError({
1095
1076
  output,
1096
1077
  parsedBody,
1097
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1098
1078
  errorCode,
1099
1079
  });
1100
1080
  }
@@ -1105,12 +1085,12 @@ const de_PutRecordsCommand = async (output, context) => {
1105
1085
  }
1106
1086
  const data = await parseBody(output.body, context);
1107
1087
  let contents = {};
1108
- contents = de_PutRecordsOutput(data, context);
1088
+ contents = (0, smithy_client_1._json)(data);
1109
1089
  const response = {
1110
1090
  $metadata: deserializeMetadata(output),
1111
1091
  ...contents,
1112
1092
  };
1113
- return Promise.resolve(response);
1093
+ return response;
1114
1094
  };
1115
1095
  exports.de_PutRecordsCommand = de_PutRecordsCommand;
1116
1096
  const de_PutRecordsCommandError = async (output, context) => {
@@ -1152,10 +1132,9 @@ const de_PutRecordsCommandError = async (output, context) => {
1152
1132
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1153
1133
  default:
1154
1134
  const parsedBody = parsedOutput.body;
1155
- (0, smithy_client_1.throwDefaultError)({
1135
+ return throwDefaultError({
1156
1136
  output,
1157
1137
  parsedBody,
1158
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1159
1138
  errorCode,
1160
1139
  });
1161
1140
  }
@@ -1171,7 +1150,7 @@ const de_RegisterStreamConsumerCommand = async (output, context) => {
1171
1150
  $metadata: deserializeMetadata(output),
1172
1151
  ...contents,
1173
1152
  };
1174
- return Promise.resolve(response);
1153
+ return response;
1175
1154
  };
1176
1155
  exports.de_RegisterStreamConsumerCommand = de_RegisterStreamConsumerCommand;
1177
1156
  const de_RegisterStreamConsumerCommandError = async (output, context) => {
@@ -1195,10 +1174,9 @@ const de_RegisterStreamConsumerCommandError = async (output, context) => {
1195
1174
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1196
1175
  default:
1197
1176
  const parsedBody = parsedOutput.body;
1198
- (0, smithy_client_1.throwDefaultError)({
1177
+ return throwDefaultError({
1199
1178
  output,
1200
1179
  parsedBody,
1201
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1202
1180
  errorCode,
1203
1181
  });
1204
1182
  }
@@ -1211,7 +1189,7 @@ const de_RemoveTagsFromStreamCommand = async (output, context) => {
1211
1189
  const response = {
1212
1190
  $metadata: deserializeMetadata(output),
1213
1191
  };
1214
- return Promise.resolve(response);
1192
+ return response;
1215
1193
  };
1216
1194
  exports.de_RemoveTagsFromStreamCommand = de_RemoveTagsFromStreamCommand;
1217
1195
  const de_RemoveTagsFromStreamCommandError = async (output, context) => {
@@ -1238,10 +1216,9 @@ const de_RemoveTagsFromStreamCommandError = async (output, context) => {
1238
1216
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1239
1217
  default:
1240
1218
  const parsedBody = parsedOutput.body;
1241
- (0, smithy_client_1.throwDefaultError)({
1219
+ return throwDefaultError({
1242
1220
  output,
1243
1221
  parsedBody,
1244
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1245
1222
  errorCode,
1246
1223
  });
1247
1224
  }
@@ -1254,7 +1231,7 @@ const de_SplitShardCommand = async (output, context) => {
1254
1231
  const response = {
1255
1232
  $metadata: deserializeMetadata(output),
1256
1233
  };
1257
- return Promise.resolve(response);
1234
+ return response;
1258
1235
  };
1259
1236
  exports.de_SplitShardCommand = de_SplitShardCommand;
1260
1237
  const de_SplitShardCommandError = async (output, context) => {
@@ -1284,10 +1261,9 @@ const de_SplitShardCommandError = async (output, context) => {
1284
1261
  throw await de_ValidationExceptionRes(parsedOutput, context);
1285
1262
  default:
1286
1263
  const parsedBody = parsedOutput.body;
1287
- (0, smithy_client_1.throwDefaultError)({
1264
+ return throwDefaultError({
1288
1265
  output,
1289
1266
  parsedBody,
1290
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1291
1267
  errorCode,
1292
1268
  });
1293
1269
  }
@@ -1300,7 +1276,7 @@ const de_StartStreamEncryptionCommand = async (output, context) => {
1300
1276
  const response = {
1301
1277
  $metadata: deserializeMetadata(output),
1302
1278
  };
1303
- return Promise.resolve(response);
1279
+ return response;
1304
1280
  };
1305
1281
  exports.de_StartStreamEncryptionCommand = de_StartStreamEncryptionCommand;
1306
1282
  const de_StartStreamEncryptionCommandError = async (output, context) => {
@@ -1345,10 +1321,9 @@ const de_StartStreamEncryptionCommandError = async (output, context) => {
1345
1321
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1346
1322
  default:
1347
1323
  const parsedBody = parsedOutput.body;
1348
- (0, smithy_client_1.throwDefaultError)({
1324
+ return throwDefaultError({
1349
1325
  output,
1350
1326
  parsedBody,
1351
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1352
1327
  errorCode,
1353
1328
  });
1354
1329
  }
@@ -1361,7 +1336,7 @@ const de_StopStreamEncryptionCommand = async (output, context) => {
1361
1336
  const response = {
1362
1337
  $metadata: deserializeMetadata(output),
1363
1338
  };
1364
- return Promise.resolve(response);
1339
+ return response;
1365
1340
  };
1366
1341
  exports.de_StopStreamEncryptionCommand = de_StopStreamEncryptionCommand;
1367
1342
  const de_StopStreamEncryptionCommandError = async (output, context) => {
@@ -1388,10 +1363,9 @@ const de_StopStreamEncryptionCommandError = async (output, context) => {
1388
1363
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1389
1364
  default:
1390
1365
  const parsedBody = parsedOutput.body;
1391
- (0, smithy_client_1.throwDefaultError)({
1366
+ return throwDefaultError({
1392
1367
  output,
1393
1368
  parsedBody,
1394
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1395
1369
  errorCode,
1396
1370
  });
1397
1371
  }
@@ -1405,7 +1379,7 @@ const de_SubscribeToShardCommand = async (output, context) => {
1405
1379
  $metadata: deserializeMetadata(output),
1406
1380
  ...contents,
1407
1381
  };
1408
- return Promise.resolve(response);
1382
+ return response;
1409
1383
  };
1410
1384
  exports.de_SubscribeToShardCommand = de_SubscribeToShardCommand;
1411
1385
  const de_SubscribeToShardCommandError = async (output, context) => {
@@ -1432,10 +1406,9 @@ const de_SubscribeToShardCommandError = async (output, context) => {
1432
1406
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1433
1407
  default:
1434
1408
  const parsedBody = parsedOutput.body;
1435
- (0, smithy_client_1.throwDefaultError)({
1409
+ return throwDefaultError({
1436
1410
  output,
1437
1411
  parsedBody,
1438
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1439
1412
  errorCode,
1440
1413
  });
1441
1414
  }
@@ -1446,12 +1419,12 @@ const de_UpdateShardCountCommand = async (output, context) => {
1446
1419
  }
1447
1420
  const data = await parseBody(output.body, context);
1448
1421
  let contents = {};
1449
- contents = de_UpdateShardCountOutput(data, context);
1422
+ contents = (0, smithy_client_1._json)(data);
1450
1423
  const response = {
1451
1424
  $metadata: deserializeMetadata(output),
1452
1425
  ...contents,
1453
1426
  };
1454
- return Promise.resolve(response);
1427
+ return response;
1455
1428
  };
1456
1429
  exports.de_UpdateShardCountCommand = de_UpdateShardCountCommand;
1457
1430
  const de_UpdateShardCountCommandError = async (output, context) => {
@@ -1481,10 +1454,9 @@ const de_UpdateShardCountCommandError = async (output, context) => {
1481
1454
  throw await de_ValidationExceptionRes(parsedOutput, context);
1482
1455
  default:
1483
1456
  const parsedBody = parsedOutput.body;
1484
- (0, smithy_client_1.throwDefaultError)({
1457
+ return throwDefaultError({
1485
1458
  output,
1486
1459
  parsedBody,
1487
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1488
1460
  errorCode,
1489
1461
  });
1490
1462
  }
@@ -1497,7 +1469,7 @@ const de_UpdateStreamModeCommand = async (output, context) => {
1497
1469
  const response = {
1498
1470
  $metadata: deserializeMetadata(output),
1499
1471
  };
1500
- return Promise.resolve(response);
1472
+ return response;
1501
1473
  };
1502
1474
  exports.de_UpdateStreamModeCommand = de_UpdateStreamModeCommand;
1503
1475
  const de_UpdateStreamModeCommandError = async (output, context) => {
@@ -1521,17 +1493,16 @@ const de_UpdateStreamModeCommandError = async (output, context) => {
1521
1493
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1522
1494
  default:
1523
1495
  const parsedBody = parsedOutput.body;
1524
- (0, smithy_client_1.throwDefaultError)({
1496
+ return throwDefaultError({
1525
1497
  output,
1526
1498
  parsedBody,
1527
- exceptionCtor: KinesisServiceException_1.KinesisServiceException,
1528
1499
  errorCode,
1529
1500
  });
1530
1501
  }
1531
1502
  };
1532
1503
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1533
1504
  const body = parsedOutput.body;
1534
- const deserialized = de_AccessDeniedException(body, context);
1505
+ const deserialized = (0, smithy_client_1._json)(body);
1535
1506
  const exception = new models_0_1.AccessDeniedException({
1536
1507
  $metadata: deserializeMetadata(parsedOutput),
1537
1508
  ...deserialized,
@@ -1540,7 +1511,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1540
1511
  };
1541
1512
  const de_ExpiredIteratorExceptionRes = async (parsedOutput, context) => {
1542
1513
  const body = parsedOutput.body;
1543
- const deserialized = de_ExpiredIteratorException(body, context);
1514
+ const deserialized = (0, smithy_client_1._json)(body);
1544
1515
  const exception = new models_0_1.ExpiredIteratorException({
1545
1516
  $metadata: deserializeMetadata(parsedOutput),
1546
1517
  ...deserialized,
@@ -1549,7 +1520,7 @@ const de_ExpiredIteratorExceptionRes = async (parsedOutput, context) => {
1549
1520
  };
1550
1521
  const de_ExpiredNextTokenExceptionRes = async (parsedOutput, context) => {
1551
1522
  const body = parsedOutput.body;
1552
- const deserialized = de_ExpiredNextTokenException(body, context);
1523
+ const deserialized = (0, smithy_client_1._json)(body);
1553
1524
  const exception = new models_0_1.ExpiredNextTokenException({
1554
1525
  $metadata: deserializeMetadata(parsedOutput),
1555
1526
  ...deserialized,
@@ -1558,7 +1529,7 @@ const de_ExpiredNextTokenExceptionRes = async (parsedOutput, context) => {
1558
1529
  };
1559
1530
  const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
1560
1531
  const body = parsedOutput.body;
1561
- const deserialized = de_InvalidArgumentException(body, context);
1532
+ const deserialized = (0, smithy_client_1._json)(body);
1562
1533
  const exception = new models_0_1.InvalidArgumentException({
1563
1534
  $metadata: deserializeMetadata(parsedOutput),
1564
1535
  ...deserialized,
@@ -1567,7 +1538,7 @@ const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
1567
1538
  };
1568
1539
  const de_KMSAccessDeniedExceptionRes = async (parsedOutput, context) => {
1569
1540
  const body = parsedOutput.body;
1570
- const deserialized = de_KMSAccessDeniedException(body, context);
1541
+ const deserialized = (0, smithy_client_1._json)(body);
1571
1542
  const exception = new models_0_1.KMSAccessDeniedException({
1572
1543
  $metadata: deserializeMetadata(parsedOutput),
1573
1544
  ...deserialized,
@@ -1576,7 +1547,7 @@ const de_KMSAccessDeniedExceptionRes = async (parsedOutput, context) => {
1576
1547
  };
1577
1548
  const de_KMSDisabledExceptionRes = async (parsedOutput, context) => {
1578
1549
  const body = parsedOutput.body;
1579
- const deserialized = de_KMSDisabledException(body, context);
1550
+ const deserialized = (0, smithy_client_1._json)(body);
1580
1551
  const exception = new models_0_1.KMSDisabledException({
1581
1552
  $metadata: deserializeMetadata(parsedOutput),
1582
1553
  ...deserialized,
@@ -1585,7 +1556,7 @@ const de_KMSDisabledExceptionRes = async (parsedOutput, context) => {
1585
1556
  };
1586
1557
  const de_KMSInvalidStateExceptionRes = async (parsedOutput, context) => {
1587
1558
  const body = parsedOutput.body;
1588
- const deserialized = de_KMSInvalidStateException(body, context);
1559
+ const deserialized = (0, smithy_client_1._json)(body);
1589
1560
  const exception = new models_0_1.KMSInvalidStateException({
1590
1561
  $metadata: deserializeMetadata(parsedOutput),
1591
1562
  ...deserialized,
@@ -1594,7 +1565,7 @@ const de_KMSInvalidStateExceptionRes = async (parsedOutput, context) => {
1594
1565
  };
1595
1566
  const de_KMSNotFoundExceptionRes = async (parsedOutput, context) => {
1596
1567
  const body = parsedOutput.body;
1597
- const deserialized = de_KMSNotFoundException(body, context);
1568
+ const deserialized = (0, smithy_client_1._json)(body);
1598
1569
  const exception = new models_0_1.KMSNotFoundException({
1599
1570
  $metadata: deserializeMetadata(parsedOutput),
1600
1571
  ...deserialized,
@@ -1603,7 +1574,7 @@ const de_KMSNotFoundExceptionRes = async (parsedOutput, context) => {
1603
1574
  };
1604
1575
  const de_KMSOptInRequiredRes = async (parsedOutput, context) => {
1605
1576
  const body = parsedOutput.body;
1606
- const deserialized = de_KMSOptInRequired(body, context);
1577
+ const deserialized = (0, smithy_client_1._json)(body);
1607
1578
  const exception = new models_0_1.KMSOptInRequired({
1608
1579
  $metadata: deserializeMetadata(parsedOutput),
1609
1580
  ...deserialized,
@@ -1612,7 +1583,7 @@ const de_KMSOptInRequiredRes = async (parsedOutput, context) => {
1612
1583
  };
1613
1584
  const de_KMSThrottlingExceptionRes = async (parsedOutput, context) => {
1614
1585
  const body = parsedOutput.body;
1615
- const deserialized = de_KMSThrottlingException(body, context);
1586
+ const deserialized = (0, smithy_client_1._json)(body);
1616
1587
  const exception = new models_0_1.KMSThrottlingException({
1617
1588
  $metadata: deserializeMetadata(parsedOutput),
1618
1589
  ...deserialized,
@@ -1621,7 +1592,7 @@ const de_KMSThrottlingExceptionRes = async (parsedOutput, context) => {
1621
1592
  };
1622
1593
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1623
1594
  const body = parsedOutput.body;
1624
- const deserialized = de_LimitExceededException(body, context);
1595
+ const deserialized = (0, smithy_client_1._json)(body);
1625
1596
  const exception = new models_0_1.LimitExceededException({
1626
1597
  $metadata: deserializeMetadata(parsedOutput),
1627
1598
  ...deserialized,
@@ -1630,7 +1601,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1630
1601
  };
1631
1602
  const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, context) => {
1632
1603
  const body = parsedOutput.body;
1633
- const deserialized = de_ProvisionedThroughputExceededException(body, context);
1604
+ const deserialized = (0, smithy_client_1._json)(body);
1634
1605
  const exception = new models_0_1.ProvisionedThroughputExceededException({
1635
1606
  $metadata: deserializeMetadata(parsedOutput),
1636
1607
  ...deserialized,
@@ -1639,7 +1610,7 @@ const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, contex
1639
1610
  };
1640
1611
  const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
1641
1612
  const body = parsedOutput.body;
1642
- const deserialized = de_ResourceInUseException(body, context);
1613
+ const deserialized = (0, smithy_client_1._json)(body);
1643
1614
  const exception = new models_0_1.ResourceInUseException({
1644
1615
  $metadata: deserializeMetadata(parsedOutput),
1645
1616
  ...deserialized,
@@ -1648,7 +1619,7 @@ const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
1648
1619
  };
1649
1620
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1650
1621
  const body = parsedOutput.body;
1651
- const deserialized = de_ResourceNotFoundException(body, context);
1622
+ const deserialized = (0, smithy_client_1._json)(body);
1652
1623
  const exception = new models_0_1.ResourceNotFoundException({
1653
1624
  $metadata: deserializeMetadata(parsedOutput),
1654
1625
  ...deserialized,
@@ -1657,7 +1628,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1657
1628
  };
1658
1629
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1659
1630
  const body = parsedOutput.body;
1660
- const deserialized = de_ValidationException(body, context);
1631
+ const deserialized = (0, smithy_client_1._json)(body);
1661
1632
  const exception = new models_0_1.ValidationException({
1662
1633
  $metadata: deserializeMetadata(parsedOutput),
1663
1634
  ...deserialized,
@@ -1790,188 +1761,65 @@ const de_SubscribeToShardEvent_event = async (output, context) => {
1790
1761
  };
1791
1762
  const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
1792
1763
  const body = parsedOutput.body;
1793
- const deserialized = de_InternalFailureException(body, context);
1764
+ const deserialized = (0, smithy_client_1._json)(body);
1794
1765
  const exception = new models_0_1.InternalFailureException({
1795
1766
  $metadata: deserializeMetadata(parsedOutput),
1796
1767
  ...deserialized,
1797
1768
  });
1798
1769
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1799
1770
  };
1800
- const se_AddTagsToStreamInput = (input, context) => {
1801
- return {
1802
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1803
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1804
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
1805
- };
1806
- };
1807
- const se_CreateStreamInput = (input, context) => {
1808
- return {
1809
- ...(input.ShardCount != null && { ShardCount: input.ShardCount }),
1810
- ...(input.StreamModeDetails != null && {
1811
- StreamModeDetails: se_StreamModeDetails(input.StreamModeDetails, context),
1812
- }),
1813
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1814
- };
1815
- };
1816
- const se_DecreaseStreamRetentionPeriodInput = (input, context) => {
1817
- return {
1818
- ...(input.RetentionPeriodHours != null && { RetentionPeriodHours: input.RetentionPeriodHours }),
1819
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1820
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1821
- };
1822
- };
1823
- const se_DeleteStreamInput = (input, context) => {
1824
- return {
1825
- ...(input.EnforceConsumerDeletion != null && { EnforceConsumerDeletion: input.EnforceConsumerDeletion }),
1826
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1827
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1828
- };
1829
- };
1830
- const se_DeregisterStreamConsumerInput = (input, context) => {
1831
- return {
1832
- ...(input.ConsumerARN != null && { ConsumerARN: input.ConsumerARN }),
1833
- ...(input.ConsumerName != null && { ConsumerName: input.ConsumerName }),
1834
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1835
- };
1836
- };
1837
- const se_DescribeLimitsInput = (input, context) => {
1838
- return {};
1839
- };
1840
- const se_DescribeStreamConsumerInput = (input, context) => {
1841
- return {
1842
- ...(input.ConsumerARN != null && { ConsumerARN: input.ConsumerARN }),
1843
- ...(input.ConsumerName != null && { ConsumerName: input.ConsumerName }),
1844
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1845
- };
1846
- };
1847
- const se_DescribeStreamInput = (input, context) => {
1848
- return {
1849
- ...(input.ExclusiveStartShardId != null && { ExclusiveStartShardId: input.ExclusiveStartShardId }),
1850
- ...(input.Limit != null && { Limit: input.Limit }),
1851
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1852
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1853
- };
1854
- };
1855
- const se_DescribeStreamSummaryInput = (input, context) => {
1856
- return {
1857
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1858
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1859
- };
1860
- };
1861
- const se_DisableEnhancedMonitoringInput = (input, context) => {
1862
- return {
1863
- ...(input.ShardLevelMetrics != null && { ShardLevelMetrics: se_MetricsNameList(input.ShardLevelMetrics, context) }),
1864
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1865
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1866
- };
1867
- };
1868
- const se_EnableEnhancedMonitoringInput = (input, context) => {
1869
- return {
1870
- ...(input.ShardLevelMetrics != null && { ShardLevelMetrics: se_MetricsNameList(input.ShardLevelMetrics, context) }),
1871
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1872
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1873
- };
1874
- };
1875
- const se_GetRecordsInput = (input, context) => {
1876
- return {
1877
- ...(input.Limit != null && { Limit: input.Limit }),
1878
- ...(input.ShardIterator != null && { ShardIterator: input.ShardIterator }),
1879
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1880
- };
1881
- };
1882
1771
  const se_GetShardIteratorInput = (input, context) => {
1883
- return {
1884
- ...(input.ShardId != null && { ShardId: input.ShardId }),
1885
- ...(input.ShardIteratorType != null && { ShardIteratorType: input.ShardIteratorType }),
1886
- ...(input.StartingSequenceNumber != null && { StartingSequenceNumber: input.StartingSequenceNumber }),
1887
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1888
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1889
- ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }),
1890
- };
1891
- };
1892
- const se_IncreaseStreamRetentionPeriodInput = (input, context) => {
1893
- return {
1894
- ...(input.RetentionPeriodHours != null && { RetentionPeriodHours: input.RetentionPeriodHours }),
1895
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1896
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1897
- };
1772
+ return (0, smithy_client_1.take)(input, {
1773
+ ShardId: [],
1774
+ ShardIteratorType: [],
1775
+ StartingSequenceNumber: [],
1776
+ StreamARN: [],
1777
+ StreamName: [],
1778
+ Timestamp: (_) => Math.round(_.getTime() / 1000),
1779
+ });
1898
1780
  };
1899
1781
  const se_ListShardsInput = (input, context) => {
1900
- return {
1901
- ...(input.ExclusiveStartShardId != null && { ExclusiveStartShardId: input.ExclusiveStartShardId }),
1902
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1903
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1904
- ...(input.ShardFilter != null && { ShardFilter: se_ShardFilter(input.ShardFilter, context) }),
1905
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1906
- ...(input.StreamCreationTimestamp != null && {
1907
- StreamCreationTimestamp: Math.round(input.StreamCreationTimestamp.getTime() / 1000),
1908
- }),
1909
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1910
- };
1782
+ return (0, smithy_client_1.take)(input, {
1783
+ ExclusiveStartShardId: [],
1784
+ MaxResults: [],
1785
+ NextToken: [],
1786
+ ShardFilter: (_) => se_ShardFilter(_, context),
1787
+ StreamARN: [],
1788
+ StreamCreationTimestamp: (_) => Math.round(_.getTime() / 1000),
1789
+ StreamName: [],
1790
+ });
1911
1791
  };
1912
1792
  const se_ListStreamConsumersInput = (input, context) => {
1913
- return {
1914
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1915
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1916
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1917
- ...(input.StreamCreationTimestamp != null && {
1918
- StreamCreationTimestamp: Math.round(input.StreamCreationTimestamp.getTime() / 1000),
1919
- }),
1920
- };
1921
- };
1922
- const se_ListStreamsInput = (input, context) => {
1923
- return {
1924
- ...(input.ExclusiveStartStreamName != null && { ExclusiveStartStreamName: input.ExclusiveStartStreamName }),
1925
- ...(input.Limit != null && { Limit: input.Limit }),
1926
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1927
- };
1928
- };
1929
- const se_ListTagsForStreamInput = (input, context) => {
1930
- return {
1931
- ...(input.ExclusiveStartTagKey != null && { ExclusiveStartTagKey: input.ExclusiveStartTagKey }),
1932
- ...(input.Limit != null && { Limit: input.Limit }),
1933
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1934
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1935
- };
1936
- };
1937
- const se_MergeShardsInput = (input, context) => {
1938
- return {
1939
- ...(input.AdjacentShardToMerge != null && { AdjacentShardToMerge: input.AdjacentShardToMerge }),
1940
- ...(input.ShardToMerge != null && { ShardToMerge: input.ShardToMerge }),
1941
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1942
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1943
- };
1944
- };
1945
- const se_MetricsNameList = (input, context) => {
1946
- return input
1947
- .filter((e) => e != null)
1948
- .map((entry) => {
1949
- return entry;
1793
+ return (0, smithy_client_1.take)(input, {
1794
+ MaxResults: [],
1795
+ NextToken: [],
1796
+ StreamARN: [],
1797
+ StreamCreationTimestamp: (_) => Math.round(_.getTime() / 1000),
1950
1798
  });
1951
1799
  };
1952
1800
  const se_PutRecordInput = (input, context) => {
1953
- return {
1954
- ...(input.Data != null && { Data: context.base64Encoder(input.Data) }),
1955
- ...(input.ExplicitHashKey != null && { ExplicitHashKey: input.ExplicitHashKey }),
1956
- ...(input.PartitionKey != null && { PartitionKey: input.PartitionKey }),
1957
- ...(input.SequenceNumberForOrdering != null && { SequenceNumberForOrdering: input.SequenceNumberForOrdering }),
1958
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1959
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1960
- };
1801
+ return (0, smithy_client_1.take)(input, {
1802
+ Data: context.base64Encoder,
1803
+ ExplicitHashKey: [],
1804
+ PartitionKey: [],
1805
+ SequenceNumberForOrdering: [],
1806
+ StreamARN: [],
1807
+ StreamName: [],
1808
+ });
1961
1809
  };
1962
1810
  const se_PutRecordsInput = (input, context) => {
1963
- return {
1964
- ...(input.Records != null && { Records: se_PutRecordsRequestEntryList(input.Records, context) }),
1965
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1966
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1967
- };
1811
+ return (0, smithy_client_1.take)(input, {
1812
+ Records: (_) => se_PutRecordsRequestEntryList(_, context),
1813
+ StreamARN: [],
1814
+ StreamName: [],
1815
+ });
1968
1816
  };
1969
1817
  const se_PutRecordsRequestEntry = (input, context) => {
1970
- return {
1971
- ...(input.Data != null && { Data: context.base64Encoder(input.Data) }),
1972
- ...(input.ExplicitHashKey != null && { ExplicitHashKey: input.ExplicitHashKey }),
1973
- ...(input.PartitionKey != null && { PartitionKey: input.PartitionKey }),
1974
- };
1818
+ return (0, smithy_client_1.take)(input, {
1819
+ Data: context.base64Encoder,
1820
+ ExplicitHashKey: [],
1821
+ PartitionKey: [],
1822
+ });
1975
1823
  };
1976
1824
  const se_PutRecordsRequestEntryList = (input, context) => {
1977
1825
  return input
@@ -1980,541 +1828,165 @@ const se_PutRecordsRequestEntryList = (input, context) => {
1980
1828
  return se_PutRecordsRequestEntry(entry, context);
1981
1829
  });
1982
1830
  };
1983
- const se_RegisterStreamConsumerInput = (input, context) => {
1984
- return {
1985
- ...(input.ConsumerName != null && { ConsumerName: input.ConsumerName }),
1986
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1987
- };
1988
- };
1989
- const se_RemoveTagsFromStreamInput = (input, context) => {
1990
- return {
1991
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
1992
- ...(input.StreamName != null && { StreamName: input.StreamName }),
1993
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1994
- };
1995
- };
1996
1831
  const se_ShardFilter = (input, context) => {
1997
- return {
1998
- ...(input.ShardId != null && { ShardId: input.ShardId }),
1999
- ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }),
2000
- ...(input.Type != null && { Type: input.Type }),
2001
- };
2002
- };
2003
- const se_SplitShardInput = (input, context) => {
2004
- return {
2005
- ...(input.NewStartingHashKey != null && { NewStartingHashKey: input.NewStartingHashKey }),
2006
- ...(input.ShardToSplit != null && { ShardToSplit: input.ShardToSplit }),
2007
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
2008
- ...(input.StreamName != null && { StreamName: input.StreamName }),
2009
- };
1832
+ return (0, smithy_client_1.take)(input, {
1833
+ ShardId: [],
1834
+ Timestamp: (_) => Math.round(_.getTime() / 1000),
1835
+ Type: [],
1836
+ });
2010
1837
  };
2011
1838
  const se_StartingPosition = (input, context) => {
2012
- return {
2013
- ...(input.SequenceNumber != null && { SequenceNumber: input.SequenceNumber }),
2014
- ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }),
2015
- ...(input.Type != null && { Type: input.Type }),
2016
- };
2017
- };
2018
- const se_StartStreamEncryptionInput = (input, context) => {
2019
- return {
2020
- ...(input.EncryptionType != null && { EncryptionType: input.EncryptionType }),
2021
- ...(input.KeyId != null && { KeyId: input.KeyId }),
2022
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
2023
- ...(input.StreamName != null && { StreamName: input.StreamName }),
2024
- };
2025
- };
2026
- const se_StopStreamEncryptionInput = (input, context) => {
2027
- return {
2028
- ...(input.EncryptionType != null && { EncryptionType: input.EncryptionType }),
2029
- ...(input.KeyId != null && { KeyId: input.KeyId }),
2030
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
2031
- ...(input.StreamName != null && { StreamName: input.StreamName }),
2032
- };
2033
- };
2034
- const se_StreamModeDetails = (input, context) => {
2035
- return {
2036
- ...(input.StreamMode != null && { StreamMode: input.StreamMode }),
2037
- };
2038
- };
2039
- const se_SubscribeToShardInput = (input, context) => {
2040
- return {
2041
- ...(input.ConsumerARN != null && { ConsumerARN: input.ConsumerARN }),
2042
- ...(input.ShardId != null && { ShardId: input.ShardId }),
2043
- ...(input.StartingPosition != null && { StartingPosition: se_StartingPosition(input.StartingPosition, context) }),
2044
- };
2045
- };
2046
- const se_TagKeyList = (input, context) => {
2047
- return input
2048
- .filter((e) => e != null)
2049
- .map((entry) => {
2050
- return entry;
1839
+ return (0, smithy_client_1.take)(input, {
1840
+ SequenceNumber: [],
1841
+ Timestamp: (_) => Math.round(_.getTime() / 1000),
1842
+ Type: [],
2051
1843
  });
2052
1844
  };
2053
- const se_TagMap = (input, context) => {
2054
- return Object.entries(input).reduce((acc, [key, value]) => {
2055
- if (value === null) {
2056
- return acc;
2057
- }
2058
- acc[key] = value;
2059
- return acc;
2060
- }, {});
2061
- };
2062
- const se_UpdateShardCountInput = (input, context) => {
2063
- return {
2064
- ...(input.ScalingType != null && { ScalingType: input.ScalingType }),
2065
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
2066
- ...(input.StreamName != null && { StreamName: input.StreamName }),
2067
- ...(input.TargetShardCount != null && { TargetShardCount: input.TargetShardCount }),
2068
- };
2069
- };
2070
- const se_UpdateStreamModeInput = (input, context) => {
2071
- return {
2072
- ...(input.StreamARN != null && { StreamARN: input.StreamARN }),
2073
- ...(input.StreamModeDetails != null && {
2074
- StreamModeDetails: se_StreamModeDetails(input.StreamModeDetails, context),
2075
- }),
2076
- };
2077
- };
2078
- const de_AccessDeniedException = (output, context) => {
2079
- return {
2080
- message: (0, smithy_client_1.expectString)(output.message),
2081
- };
2082
- };
2083
- const de_ChildShard = (output, context) => {
2084
- return {
2085
- HashKeyRange: output.HashKeyRange != null ? de_HashKeyRange(output.HashKeyRange, context) : undefined,
2086
- ParentShards: output.ParentShards != null ? de_ShardIdList(output.ParentShards, context) : undefined,
2087
- ShardId: (0, smithy_client_1.expectString)(output.ShardId),
2088
- };
2089
- };
2090
- const de_ChildShardList = (output, context) => {
2091
- const retVal = (output || [])
2092
- .filter((e) => e != null)
2093
- .map((entry) => {
2094
- if (entry === null) {
2095
- return null;
2096
- }
2097
- return de_ChildShard(entry, context);
1845
+ const se_SubscribeToShardInput = (input, context) => {
1846
+ return (0, smithy_client_1.take)(input, {
1847
+ ConsumerARN: [],
1848
+ ShardId: [],
1849
+ StartingPosition: (_) => se_StartingPosition(_, context),
2098
1850
  });
2099
- return retVal;
2100
1851
  };
2101
1852
  const de_Consumer = (output, context) => {
2102
- return {
2103
- ConsumerARN: (0, smithy_client_1.expectString)(output.ConsumerARN),
2104
- ConsumerCreationTimestamp: output.ConsumerCreationTimestamp != null
2105
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ConsumerCreationTimestamp)))
2106
- : undefined,
2107
- ConsumerName: (0, smithy_client_1.expectString)(output.ConsumerName),
2108
- ConsumerStatus: (0, smithy_client_1.expectString)(output.ConsumerStatus),
2109
- };
1853
+ return (0, smithy_client_1.take)(output, {
1854
+ ConsumerARN: smithy_client_1.expectString,
1855
+ ConsumerCreationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1856
+ ConsumerName: smithy_client_1.expectString,
1857
+ ConsumerStatus: smithy_client_1.expectString,
1858
+ });
2110
1859
  };
2111
1860
  const de_ConsumerDescription = (output, context) => {
2112
- return {
2113
- ConsumerARN: (0, smithy_client_1.expectString)(output.ConsumerARN),
2114
- ConsumerCreationTimestamp: output.ConsumerCreationTimestamp != null
2115
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ConsumerCreationTimestamp)))
2116
- : undefined,
2117
- ConsumerName: (0, smithy_client_1.expectString)(output.ConsumerName),
2118
- ConsumerStatus: (0, smithy_client_1.expectString)(output.ConsumerStatus),
2119
- StreamARN: (0, smithy_client_1.expectString)(output.StreamARN),
2120
- };
1861
+ return (0, smithy_client_1.take)(output, {
1862
+ ConsumerARN: smithy_client_1.expectString,
1863
+ ConsumerCreationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1864
+ ConsumerName: smithy_client_1.expectString,
1865
+ ConsumerStatus: smithy_client_1.expectString,
1866
+ StreamARN: smithy_client_1.expectString,
1867
+ });
2121
1868
  };
2122
1869
  const de_ConsumerList = (output, context) => {
2123
1870
  const retVal = (output || [])
2124
1871
  .filter((e) => e != null)
2125
1872
  .map((entry) => {
2126
- if (entry === null) {
2127
- return null;
2128
- }
2129
1873
  return de_Consumer(entry, context);
2130
1874
  });
2131
1875
  return retVal;
2132
1876
  };
2133
- const de_DescribeLimitsOutput = (output, context) => {
2134
- return {
2135
- OnDemandStreamCount: (0, smithy_client_1.expectInt32)(output.OnDemandStreamCount),
2136
- OnDemandStreamCountLimit: (0, smithy_client_1.expectInt32)(output.OnDemandStreamCountLimit),
2137
- OpenShardCount: (0, smithy_client_1.expectInt32)(output.OpenShardCount),
2138
- ShardLimit: (0, smithy_client_1.expectInt32)(output.ShardLimit),
2139
- };
2140
- };
2141
1877
  const de_DescribeStreamConsumerOutput = (output, context) => {
2142
- return {
2143
- ConsumerDescription: output.ConsumerDescription != null ? de_ConsumerDescription(output.ConsumerDescription, context) : undefined,
2144
- };
1878
+ return (0, smithy_client_1.take)(output, {
1879
+ ConsumerDescription: (_) => de_ConsumerDescription(_, context),
1880
+ });
2145
1881
  };
2146
1882
  const de_DescribeStreamOutput = (output, context) => {
2147
- return {
2148
- StreamDescription: output.StreamDescription != null ? de_StreamDescription(output.StreamDescription, context) : undefined,
2149
- };
1883
+ return (0, smithy_client_1.take)(output, {
1884
+ StreamDescription: (_) => de_StreamDescription(_, context),
1885
+ });
2150
1886
  };
2151
1887
  const de_DescribeStreamSummaryOutput = (output, context) => {
2152
- return {
2153
- StreamDescriptionSummary: output.StreamDescriptionSummary != null
2154
- ? de_StreamDescriptionSummary(output.StreamDescriptionSummary, context)
2155
- : undefined,
2156
- };
2157
- };
2158
- const de_EnhancedMetrics = (output, context) => {
2159
- return {
2160
- ShardLevelMetrics: output.ShardLevelMetrics != null ? de_MetricsNameList(output.ShardLevelMetrics, context) : undefined,
2161
- };
2162
- };
2163
- const de_EnhancedMonitoringList = (output, context) => {
2164
- const retVal = (output || [])
2165
- .filter((e) => e != null)
2166
- .map((entry) => {
2167
- if (entry === null) {
2168
- return null;
2169
- }
2170
- return de_EnhancedMetrics(entry, context);
1888
+ return (0, smithy_client_1.take)(output, {
1889
+ StreamDescriptionSummary: (_) => de_StreamDescriptionSummary(_, context),
2171
1890
  });
2172
- return retVal;
2173
- };
2174
- const de_EnhancedMonitoringOutput = (output, context) => {
2175
- return {
2176
- CurrentShardLevelMetrics: output.CurrentShardLevelMetrics != null
2177
- ? de_MetricsNameList(output.CurrentShardLevelMetrics, context)
2178
- : undefined,
2179
- DesiredShardLevelMetrics: output.DesiredShardLevelMetrics != null
2180
- ? de_MetricsNameList(output.DesiredShardLevelMetrics, context)
2181
- : undefined,
2182
- StreamARN: (0, smithy_client_1.expectString)(output.StreamARN),
2183
- StreamName: (0, smithy_client_1.expectString)(output.StreamName),
2184
- };
2185
- };
2186
- const de_ExpiredIteratorException = (output, context) => {
2187
- return {
2188
- message: (0, smithy_client_1.expectString)(output.message),
2189
- };
2190
- };
2191
- const de_ExpiredNextTokenException = (output, context) => {
2192
- return {
2193
- message: (0, smithy_client_1.expectString)(output.message),
2194
- };
2195
1891
  };
2196
1892
  const de_GetRecordsOutput = (output, context) => {
2197
- return {
2198
- ChildShards: output.ChildShards != null ? de_ChildShardList(output.ChildShards, context) : undefined,
2199
- MillisBehindLatest: (0, smithy_client_1.expectLong)(output.MillisBehindLatest),
2200
- NextShardIterator: (0, smithy_client_1.expectString)(output.NextShardIterator),
2201
- Records: output.Records != null ? de_RecordList(output.Records, context) : undefined,
2202
- };
2203
- };
2204
- const de_GetShardIteratorOutput = (output, context) => {
2205
- return {
2206
- ShardIterator: (0, smithy_client_1.expectString)(output.ShardIterator),
2207
- };
2208
- };
2209
- const de_HashKeyRange = (output, context) => {
2210
- return {
2211
- EndingHashKey: (0, smithy_client_1.expectString)(output.EndingHashKey),
2212
- StartingHashKey: (0, smithy_client_1.expectString)(output.StartingHashKey),
2213
- };
2214
- };
2215
- const de_InternalFailureException = (output, context) => {
2216
- return {
2217
- message: (0, smithy_client_1.expectString)(output.message),
2218
- };
2219
- };
2220
- const de_InvalidArgumentException = (output, context) => {
2221
- return {
2222
- message: (0, smithy_client_1.expectString)(output.message),
2223
- };
2224
- };
2225
- const de_KMSAccessDeniedException = (output, context) => {
2226
- return {
2227
- message: (0, smithy_client_1.expectString)(output.message),
2228
- };
2229
- };
2230
- const de_KMSDisabledException = (output, context) => {
2231
- return {
2232
- message: (0, smithy_client_1.expectString)(output.message),
2233
- };
2234
- };
2235
- const de_KMSInvalidStateException = (output, context) => {
2236
- return {
2237
- message: (0, smithy_client_1.expectString)(output.message),
2238
- };
2239
- };
2240
- const de_KMSNotFoundException = (output, context) => {
2241
- return {
2242
- message: (0, smithy_client_1.expectString)(output.message),
2243
- };
2244
- };
2245
- const de_KMSOptInRequired = (output, context) => {
2246
- return {
2247
- message: (0, smithy_client_1.expectString)(output.message),
2248
- };
2249
- };
2250
- const de_KMSThrottlingException = (output, context) => {
2251
- return {
2252
- message: (0, smithy_client_1.expectString)(output.message),
2253
- };
2254
- };
2255
- const de_LimitExceededException = (output, context) => {
2256
- return {
2257
- message: (0, smithy_client_1.expectString)(output.message),
2258
- };
2259
- };
2260
- const de_ListShardsOutput = (output, context) => {
2261
- return {
2262
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2263
- Shards: output.Shards != null ? de_ShardList(output.Shards, context) : undefined,
2264
- };
1893
+ return (0, smithy_client_1.take)(output, {
1894
+ ChildShards: smithy_client_1._json,
1895
+ MillisBehindLatest: smithy_client_1.expectLong,
1896
+ NextShardIterator: smithy_client_1.expectString,
1897
+ Records: (_) => de_RecordList(_, context),
1898
+ });
2265
1899
  };
2266
1900
  const de_ListStreamConsumersOutput = (output, context) => {
2267
- return {
2268
- Consumers: output.Consumers != null ? de_ConsumerList(output.Consumers, context) : undefined,
2269
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2270
- };
2271
- };
2272
- const de_ListStreamsOutput = (output, context) => {
2273
- return {
2274
- HasMoreStreams: (0, smithy_client_1.expectBoolean)(output.HasMoreStreams),
2275
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2276
- StreamNames: output.StreamNames != null ? de_StreamNameList(output.StreamNames, context) : undefined,
2277
- StreamSummaries: output.StreamSummaries != null ? de_StreamSummaryList(output.StreamSummaries, context) : undefined,
2278
- };
2279
- };
2280
- const de_ListTagsForStreamOutput = (output, context) => {
2281
- return {
2282
- HasMoreTags: (0, smithy_client_1.expectBoolean)(output.HasMoreTags),
2283
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
2284
- };
2285
- };
2286
- const de_MetricsNameList = (output, context) => {
2287
- const retVal = (output || [])
2288
- .filter((e) => e != null)
2289
- .map((entry) => {
2290
- if (entry === null) {
2291
- return null;
2292
- }
2293
- return (0, smithy_client_1.expectString)(entry);
1901
+ return (0, smithy_client_1.take)(output, {
1902
+ Consumers: (_) => de_ConsumerList(_, context),
1903
+ NextToken: smithy_client_1.expectString,
2294
1904
  });
2295
- return retVal;
2296
- };
2297
- const de_ProvisionedThroughputExceededException = (output, context) => {
2298
- return {
2299
- message: (0, smithy_client_1.expectString)(output.message),
2300
- };
2301
- };
2302
- const de_PutRecordOutput = (output, context) => {
2303
- return {
2304
- EncryptionType: (0, smithy_client_1.expectString)(output.EncryptionType),
2305
- SequenceNumber: (0, smithy_client_1.expectString)(output.SequenceNumber),
2306
- ShardId: (0, smithy_client_1.expectString)(output.ShardId),
2307
- };
2308
1905
  };
2309
- const de_PutRecordsOutput = (output, context) => {
2310
- return {
2311
- EncryptionType: (0, smithy_client_1.expectString)(output.EncryptionType),
2312
- FailedRecordCount: (0, smithy_client_1.expectInt32)(output.FailedRecordCount),
2313
- Records: output.Records != null ? de_PutRecordsResultEntryList(output.Records, context) : undefined,
2314
- };
2315
- };
2316
- const de_PutRecordsResultEntry = (output, context) => {
2317
- return {
2318
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
2319
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
2320
- SequenceNumber: (0, smithy_client_1.expectString)(output.SequenceNumber),
2321
- ShardId: (0, smithy_client_1.expectString)(output.ShardId),
2322
- };
2323
- };
2324
- const de_PutRecordsResultEntryList = (output, context) => {
2325
- const retVal = (output || [])
2326
- .filter((e) => e != null)
2327
- .map((entry) => {
2328
- if (entry === null) {
2329
- return null;
2330
- }
2331
- return de_PutRecordsResultEntry(entry, context);
1906
+ const de_ListStreamsOutput = (output, context) => {
1907
+ return (0, smithy_client_1.take)(output, {
1908
+ HasMoreStreams: smithy_client_1.expectBoolean,
1909
+ NextToken: smithy_client_1.expectString,
1910
+ StreamNames: smithy_client_1._json,
1911
+ StreamSummaries: (_) => de_StreamSummaryList(_, context),
2332
1912
  });
2333
- return retVal;
2334
1913
  };
2335
1914
  const de__Record = (output, context) => {
2336
- return {
2337
- ApproximateArrivalTimestamp: output.ApproximateArrivalTimestamp != null
2338
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ApproximateArrivalTimestamp)))
2339
- : undefined,
2340
- Data: output.Data != null ? context.base64Decoder(output.Data) : undefined,
2341
- EncryptionType: (0, smithy_client_1.expectString)(output.EncryptionType),
2342
- PartitionKey: (0, smithy_client_1.expectString)(output.PartitionKey),
2343
- SequenceNumber: (0, smithy_client_1.expectString)(output.SequenceNumber),
2344
- };
1915
+ return (0, smithy_client_1.take)(output, {
1916
+ ApproximateArrivalTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1917
+ Data: context.base64Decoder,
1918
+ EncryptionType: smithy_client_1.expectString,
1919
+ PartitionKey: smithy_client_1.expectString,
1920
+ SequenceNumber: smithy_client_1.expectString,
1921
+ });
2345
1922
  };
2346
1923
  const de_RecordList = (output, context) => {
2347
1924
  const retVal = (output || [])
2348
1925
  .filter((e) => e != null)
2349
1926
  .map((entry) => {
2350
- if (entry === null) {
2351
- return null;
2352
- }
2353
1927
  return de__Record(entry, context);
2354
1928
  });
2355
1929
  return retVal;
2356
1930
  };
2357
1931
  const de_RegisterStreamConsumerOutput = (output, context) => {
2358
- return {
2359
- Consumer: output.Consumer != null ? de_Consumer(output.Consumer, context) : undefined,
2360
- };
2361
- };
2362
- const de_ResourceInUseException = (output, context) => {
2363
- return {
2364
- message: (0, smithy_client_1.expectString)(output.message),
2365
- };
2366
- };
2367
- const de_ResourceNotFoundException = (output, context) => {
2368
- return {
2369
- message: (0, smithy_client_1.expectString)(output.message),
2370
- };
2371
- };
2372
- const de_SequenceNumberRange = (output, context) => {
2373
- return {
2374
- EndingSequenceNumber: (0, smithy_client_1.expectString)(output.EndingSequenceNumber),
2375
- StartingSequenceNumber: (0, smithy_client_1.expectString)(output.StartingSequenceNumber),
2376
- };
2377
- };
2378
- const de_Shard = (output, context) => {
2379
- return {
2380
- AdjacentParentShardId: (0, smithy_client_1.expectString)(output.AdjacentParentShardId),
2381
- HashKeyRange: output.HashKeyRange != null ? de_HashKeyRange(output.HashKeyRange, context) : undefined,
2382
- ParentShardId: (0, smithy_client_1.expectString)(output.ParentShardId),
2383
- SequenceNumberRange: output.SequenceNumberRange != null ? de_SequenceNumberRange(output.SequenceNumberRange, context) : undefined,
2384
- ShardId: (0, smithy_client_1.expectString)(output.ShardId),
2385
- };
2386
- };
2387
- const de_ShardIdList = (output, context) => {
2388
- const retVal = (output || [])
2389
- .filter((e) => e != null)
2390
- .map((entry) => {
2391
- if (entry === null) {
2392
- return null;
2393
- }
2394
- return (0, smithy_client_1.expectString)(entry);
2395
- });
2396
- return retVal;
2397
- };
2398
- const de_ShardList = (output, context) => {
2399
- const retVal = (output || [])
2400
- .filter((e) => e != null)
2401
- .map((entry) => {
2402
- if (entry === null) {
2403
- return null;
2404
- }
2405
- return de_Shard(entry, context);
1932
+ return (0, smithy_client_1.take)(output, {
1933
+ Consumer: (_) => de_Consumer(_, context),
2406
1934
  });
2407
- return retVal;
2408
1935
  };
2409
1936
  const de_StreamDescription = (output, context) => {
2410
- return {
2411
- EncryptionType: (0, smithy_client_1.expectString)(output.EncryptionType),
2412
- EnhancedMonitoring: output.EnhancedMonitoring != null ? de_EnhancedMonitoringList(output.EnhancedMonitoring, context) : undefined,
2413
- HasMoreShards: (0, smithy_client_1.expectBoolean)(output.HasMoreShards),
2414
- KeyId: (0, smithy_client_1.expectString)(output.KeyId),
2415
- RetentionPeriodHours: (0, smithy_client_1.expectInt32)(output.RetentionPeriodHours),
2416
- Shards: output.Shards != null ? de_ShardList(output.Shards, context) : undefined,
2417
- StreamARN: (0, smithy_client_1.expectString)(output.StreamARN),
2418
- StreamCreationTimestamp: output.StreamCreationTimestamp != null
2419
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StreamCreationTimestamp)))
2420
- : undefined,
2421
- StreamModeDetails: output.StreamModeDetails != null ? de_StreamModeDetails(output.StreamModeDetails, context) : undefined,
2422
- StreamName: (0, smithy_client_1.expectString)(output.StreamName),
2423
- StreamStatus: (0, smithy_client_1.expectString)(output.StreamStatus),
2424
- };
1937
+ return (0, smithy_client_1.take)(output, {
1938
+ EncryptionType: smithy_client_1.expectString,
1939
+ EnhancedMonitoring: smithy_client_1._json,
1940
+ HasMoreShards: smithy_client_1.expectBoolean,
1941
+ KeyId: smithy_client_1.expectString,
1942
+ RetentionPeriodHours: smithy_client_1.expectInt32,
1943
+ Shards: smithy_client_1._json,
1944
+ StreamARN: smithy_client_1.expectString,
1945
+ StreamCreationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1946
+ StreamModeDetails: smithy_client_1._json,
1947
+ StreamName: smithy_client_1.expectString,
1948
+ StreamStatus: smithy_client_1.expectString,
1949
+ });
2425
1950
  };
2426
1951
  const de_StreamDescriptionSummary = (output, context) => {
2427
- return {
2428
- ConsumerCount: (0, smithy_client_1.expectInt32)(output.ConsumerCount),
2429
- EncryptionType: (0, smithy_client_1.expectString)(output.EncryptionType),
2430
- EnhancedMonitoring: output.EnhancedMonitoring != null ? de_EnhancedMonitoringList(output.EnhancedMonitoring, context) : undefined,
2431
- KeyId: (0, smithy_client_1.expectString)(output.KeyId),
2432
- OpenShardCount: (0, smithy_client_1.expectInt32)(output.OpenShardCount),
2433
- RetentionPeriodHours: (0, smithy_client_1.expectInt32)(output.RetentionPeriodHours),
2434
- StreamARN: (0, smithy_client_1.expectString)(output.StreamARN),
2435
- StreamCreationTimestamp: output.StreamCreationTimestamp != null
2436
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StreamCreationTimestamp)))
2437
- : undefined,
2438
- StreamModeDetails: output.StreamModeDetails != null ? de_StreamModeDetails(output.StreamModeDetails, context) : undefined,
2439
- StreamName: (0, smithy_client_1.expectString)(output.StreamName),
2440
- StreamStatus: (0, smithy_client_1.expectString)(output.StreamStatus),
2441
- };
2442
- };
2443
- const de_StreamModeDetails = (output, context) => {
2444
- return {
2445
- StreamMode: (0, smithy_client_1.expectString)(output.StreamMode),
2446
- };
2447
- };
2448
- const de_StreamNameList = (output, context) => {
2449
- const retVal = (output || [])
2450
- .filter((e) => e != null)
2451
- .map((entry) => {
2452
- if (entry === null) {
2453
- return null;
2454
- }
2455
- return (0, smithy_client_1.expectString)(entry);
1952
+ return (0, smithy_client_1.take)(output, {
1953
+ ConsumerCount: smithy_client_1.expectInt32,
1954
+ EncryptionType: smithy_client_1.expectString,
1955
+ EnhancedMonitoring: smithy_client_1._json,
1956
+ KeyId: smithy_client_1.expectString,
1957
+ OpenShardCount: smithy_client_1.expectInt32,
1958
+ RetentionPeriodHours: smithy_client_1.expectInt32,
1959
+ StreamARN: smithy_client_1.expectString,
1960
+ StreamCreationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1961
+ StreamModeDetails: smithy_client_1._json,
1962
+ StreamName: smithy_client_1.expectString,
1963
+ StreamStatus: smithy_client_1.expectString,
2456
1964
  });
2457
- return retVal;
2458
1965
  };
2459
1966
  const de_StreamSummary = (output, context) => {
2460
- return {
2461
- StreamARN: (0, smithy_client_1.expectString)(output.StreamARN),
2462
- StreamCreationTimestamp: output.StreamCreationTimestamp != null
2463
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StreamCreationTimestamp)))
2464
- : undefined,
2465
- StreamModeDetails: output.StreamModeDetails != null ? de_StreamModeDetails(output.StreamModeDetails, context) : undefined,
2466
- StreamName: (0, smithy_client_1.expectString)(output.StreamName),
2467
- StreamStatus: (0, smithy_client_1.expectString)(output.StreamStatus),
2468
- };
1967
+ return (0, smithy_client_1.take)(output, {
1968
+ StreamARN: smithy_client_1.expectString,
1969
+ StreamCreationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1970
+ StreamModeDetails: smithy_client_1._json,
1971
+ StreamName: smithy_client_1.expectString,
1972
+ StreamStatus: smithy_client_1.expectString,
1973
+ });
2469
1974
  };
2470
1975
  const de_StreamSummaryList = (output, context) => {
2471
1976
  const retVal = (output || [])
2472
1977
  .filter((e) => e != null)
2473
1978
  .map((entry) => {
2474
- if (entry === null) {
2475
- return null;
2476
- }
2477
1979
  return de_StreamSummary(entry, context);
2478
1980
  });
2479
1981
  return retVal;
2480
1982
  };
2481
1983
  const de_SubscribeToShardEvent = (output, context) => {
2482
- return {
2483
- ChildShards: output.ChildShards != null ? de_ChildShardList(output.ChildShards, context) : undefined,
2484
- ContinuationSequenceNumber: (0, smithy_client_1.expectString)(output.ContinuationSequenceNumber),
2485
- MillisBehindLatest: (0, smithy_client_1.expectLong)(output.MillisBehindLatest),
2486
- Records: output.Records != null ? de_RecordList(output.Records, context) : undefined,
2487
- };
2488
- };
2489
- const de_Tag = (output, context) => {
2490
- return {
2491
- Key: (0, smithy_client_1.expectString)(output.Key),
2492
- Value: (0, smithy_client_1.expectString)(output.Value),
2493
- };
2494
- };
2495
- const de_TagList = (output, context) => {
2496
- const retVal = (output || [])
2497
- .filter((e) => e != null)
2498
- .map((entry) => {
2499
- if (entry === null) {
2500
- return null;
2501
- }
2502
- return de_Tag(entry, context);
1984
+ return (0, smithy_client_1.take)(output, {
1985
+ ChildShards: smithy_client_1._json,
1986
+ ContinuationSequenceNumber: smithy_client_1.expectString,
1987
+ MillisBehindLatest: smithy_client_1.expectLong,
1988
+ Records: (_) => de_RecordList(_, context),
2503
1989
  });
2504
- return retVal;
2505
- };
2506
- const de_UpdateShardCountOutput = (output, context) => {
2507
- return {
2508
- CurrentShardCount: (0, smithy_client_1.expectInt32)(output.CurrentShardCount),
2509
- StreamARN: (0, smithy_client_1.expectString)(output.StreamARN),
2510
- StreamName: (0, smithy_client_1.expectString)(output.StreamName),
2511
- TargetShardCount: (0, smithy_client_1.expectInt32)(output.TargetShardCount),
2512
- };
2513
- };
2514
- const de_ValidationException = (output, context) => {
2515
- return {
2516
- message: (0, smithy_client_1.expectString)(output.message),
2517
- };
2518
1990
  };
2519
1991
  const deserializeMetadata = (output) => ({
2520
1992
  httpStatusCode: output.statusCode,
@@ -2529,6 +2001,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2529
2001
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2530
2002
  };
2531
2003
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2004
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(KinesisServiceException_1.KinesisServiceException);
2532
2005
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2533
2006
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2534
2007
  const contents = {