@aws-sdk/client-kinesis 3.927.0 → 3.929.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.
Files changed (63) hide show
  1. package/dist-cjs/index.js +1056 -1644
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/KinesisClient.js +2 -0
  4. package/dist-es/commands/AddTagsToStreamCommand.js +3 -9
  5. package/dist-es/commands/CreateStreamCommand.js +3 -9
  6. package/dist-es/commands/DecreaseStreamRetentionPeriodCommand.js +3 -9
  7. package/dist-es/commands/DeleteResourcePolicyCommand.js +3 -9
  8. package/dist-es/commands/DeleteStreamCommand.js +3 -9
  9. package/dist-es/commands/DeregisterStreamConsumerCommand.js +3 -9
  10. package/dist-es/commands/DescribeAccountSettingsCommand.js +3 -9
  11. package/dist-es/commands/DescribeLimitsCommand.js +3 -9
  12. package/dist-es/commands/DescribeStreamCommand.js +3 -9
  13. package/dist-es/commands/DescribeStreamConsumerCommand.js +3 -9
  14. package/dist-es/commands/DescribeStreamSummaryCommand.js +3 -9
  15. package/dist-es/commands/DisableEnhancedMonitoringCommand.js +3 -9
  16. package/dist-es/commands/EnableEnhancedMonitoringCommand.js +3 -9
  17. package/dist-es/commands/GetRecordsCommand.js +3 -9
  18. package/dist-es/commands/GetResourcePolicyCommand.js +3 -9
  19. package/dist-es/commands/GetShardIteratorCommand.js +3 -9
  20. package/dist-es/commands/IncreaseStreamRetentionPeriodCommand.js +3 -9
  21. package/dist-es/commands/ListShardsCommand.js +3 -9
  22. package/dist-es/commands/ListStreamConsumersCommand.js +3 -9
  23. package/dist-es/commands/ListStreamsCommand.js +3 -9
  24. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  25. package/dist-es/commands/ListTagsForStreamCommand.js +3 -9
  26. package/dist-es/commands/MergeShardsCommand.js +3 -9
  27. package/dist-es/commands/PutRecordCommand.js +3 -9
  28. package/dist-es/commands/PutRecordsCommand.js +3 -9
  29. package/dist-es/commands/PutResourcePolicyCommand.js +3 -9
  30. package/dist-es/commands/RegisterStreamConsumerCommand.js +3 -9
  31. package/dist-es/commands/RemoveTagsFromStreamCommand.js +3 -9
  32. package/dist-es/commands/SplitShardCommand.js +3 -9
  33. package/dist-es/commands/StartStreamEncryptionCommand.js +3 -9
  34. package/dist-es/commands/StopStreamEncryptionCommand.js +3 -9
  35. package/dist-es/commands/SubscribeToShardCommand.js +3 -10
  36. package/dist-es/commands/TagResourceCommand.js +3 -9
  37. package/dist-es/commands/UntagResourceCommand.js +3 -9
  38. package/dist-es/commands/UpdateAccountSettingsCommand.js +3 -9
  39. package/dist-es/commands/UpdateMaxRecordSizeCommand.js +3 -9
  40. package/dist-es/commands/UpdateShardCountCommand.js +3 -9
  41. package/dist-es/commands/UpdateStreamModeCommand.js +3 -9
  42. package/dist-es/commands/UpdateStreamWarmThroughputCommand.js +3 -9
  43. package/dist-es/models/models_0.js +0 -28
  44. package/dist-es/runtimeConfig.shared.js +7 -0
  45. package/dist-es/schemas/schemas_0.js +933 -0
  46. package/dist-types/KinesisClient.d.ts +10 -1
  47. package/dist-types/models/models_0.d.ts +0 -8
  48. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  49. package/dist-types/runtimeConfig.d.ts +1 -0
  50. package/dist-types/runtimeConfig.native.d.ts +1 -0
  51. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  52. package/dist-types/schemas/schemas_0.d.ts +154 -0
  53. package/dist-types/ts3.4/KinesisClient.d.ts +4 -0
  54. package/dist-types/ts3.4/models/models_0.d.ts +0 -6
  55. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  56. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  57. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  58. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  59. package/dist-types/ts3.4/schemas/schemas_0.d.ts +159 -0
  60. package/package.json +5 -5
  61. package/dist-es/protocols/Aws_json1_1.js +0 -1297
  62. package/dist-types/protocols/Aws_json1_1.d.ts +0 -353
  63. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -476
@@ -1,1297 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { KinesisServiceException as __BaseException } from "../models/KinesisServiceException";
5
- import { AccessDeniedException, ExpiredIteratorException, ExpiredNextTokenException, InternalFailureException, InvalidArgumentException, KMSAccessDeniedException, KMSDisabledException, KMSInvalidStateException, KMSNotFoundException, KMSOptInRequired, KMSThrottlingException, LimitExceededException, ProvisionedThroughputExceededException, ResourceInUseException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
6
- export const se_AddTagsToStreamCommand = async (input, context) => {
7
- const headers = sharedHeaders("AddTagsToStream");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_CreateStreamCommand = async (input, context) => {
13
- const headers = sharedHeaders("CreateStream");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_DecreaseStreamRetentionPeriodCommand = async (input, context) => {
19
- const headers = sharedHeaders("DecreaseStreamRetentionPeriod");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_DeleteResourcePolicyCommand = async (input, context) => {
25
- const headers = sharedHeaders("DeleteResourcePolicy");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_DeleteStreamCommand = async (input, context) => {
31
- const headers = sharedHeaders("DeleteStream");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_DeregisterStreamConsumerCommand = async (input, context) => {
37
- const headers = sharedHeaders("DeregisterStreamConsumer");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_DescribeAccountSettingsCommand = async (input, context) => {
43
- const headers = sharedHeaders("DescribeAccountSettings");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_DescribeLimitsCommand = async (input, context) => {
49
- const headers = sharedHeaders("DescribeLimits");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_DescribeStreamCommand = async (input, context) => {
55
- const headers = sharedHeaders("DescribeStream");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_DescribeStreamConsumerCommand = async (input, context) => {
61
- const headers = sharedHeaders("DescribeStreamConsumer");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_DescribeStreamSummaryCommand = async (input, context) => {
67
- const headers = sharedHeaders("DescribeStreamSummary");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_DisableEnhancedMonitoringCommand = async (input, context) => {
73
- const headers = sharedHeaders("DisableEnhancedMonitoring");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_EnableEnhancedMonitoringCommand = async (input, context) => {
79
- const headers = sharedHeaders("EnableEnhancedMonitoring");
80
- let body;
81
- body = JSON.stringify(_json(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_GetRecordsCommand = async (input, context) => {
85
- const headers = sharedHeaders("GetRecords");
86
- let body;
87
- body = JSON.stringify(_json(input));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_GetResourcePolicyCommand = async (input, context) => {
91
- const headers = sharedHeaders("GetResourcePolicy");
92
- let body;
93
- body = JSON.stringify(_json(input));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_GetShardIteratorCommand = async (input, context) => {
97
- const headers = sharedHeaders("GetShardIterator");
98
- let body;
99
- body = JSON.stringify(se_GetShardIteratorInput(input, context));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_IncreaseStreamRetentionPeriodCommand = async (input, context) => {
103
- const headers = sharedHeaders("IncreaseStreamRetentionPeriod");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_ListShardsCommand = async (input, context) => {
109
- const headers = sharedHeaders("ListShards");
110
- let body;
111
- body = JSON.stringify(se_ListShardsInput(input, context));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_ListStreamConsumersCommand = async (input, context) => {
115
- const headers = sharedHeaders("ListStreamConsumers");
116
- let body;
117
- body = JSON.stringify(se_ListStreamConsumersInput(input, context));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_ListStreamsCommand = async (input, context) => {
121
- const headers = sharedHeaders("ListStreams");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_ListTagsForResourceCommand = async (input, context) => {
127
- const headers = sharedHeaders("ListTagsForResource");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_ListTagsForStreamCommand = async (input, context) => {
133
- const headers = sharedHeaders("ListTagsForStream");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_MergeShardsCommand = async (input, context) => {
139
- const headers = sharedHeaders("MergeShards");
140
- let body;
141
- body = JSON.stringify(_json(input));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const se_PutRecordCommand = async (input, context) => {
145
- const headers = sharedHeaders("PutRecord");
146
- let body;
147
- body = JSON.stringify(se_PutRecordInput(input, context));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const se_PutRecordsCommand = async (input, context) => {
151
- const headers = sharedHeaders("PutRecords");
152
- let body;
153
- body = JSON.stringify(se_PutRecordsInput(input, context));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- export const se_PutResourcePolicyCommand = async (input, context) => {
157
- const headers = sharedHeaders("PutResourcePolicy");
158
- let body;
159
- body = JSON.stringify(_json(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- export const se_RegisterStreamConsumerCommand = async (input, context) => {
163
- const headers = sharedHeaders("RegisterStreamConsumer");
164
- let body;
165
- body = JSON.stringify(_json(input));
166
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
- };
168
- export const se_RemoveTagsFromStreamCommand = async (input, context) => {
169
- const headers = sharedHeaders("RemoveTagsFromStream");
170
- let body;
171
- body = JSON.stringify(_json(input));
172
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
173
- };
174
- export const se_SplitShardCommand = async (input, context) => {
175
- const headers = sharedHeaders("SplitShard");
176
- let body;
177
- body = JSON.stringify(_json(input));
178
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
179
- };
180
- export const se_StartStreamEncryptionCommand = async (input, context) => {
181
- const headers = sharedHeaders("StartStreamEncryption");
182
- let body;
183
- body = JSON.stringify(_json(input));
184
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
- };
186
- export const se_StopStreamEncryptionCommand = async (input, context) => {
187
- const headers = sharedHeaders("StopStreamEncryption");
188
- let body;
189
- body = JSON.stringify(_json(input));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
- export const se_SubscribeToShardCommand = async (input, context) => {
193
- const headers = sharedHeaders("SubscribeToShard");
194
- let body;
195
- body = JSON.stringify(se_SubscribeToShardInput(input, context));
196
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
- };
198
- export const se_TagResourceCommand = async (input, context) => {
199
- const headers = sharedHeaders("TagResource");
200
- let body;
201
- body = JSON.stringify(_json(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- export const se_UntagResourceCommand = async (input, context) => {
205
- const headers = sharedHeaders("UntagResource");
206
- let body;
207
- body = JSON.stringify(_json(input));
208
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
- };
210
- export const se_UpdateAccountSettingsCommand = async (input, context) => {
211
- const headers = sharedHeaders("UpdateAccountSettings");
212
- let body;
213
- body = JSON.stringify(_json(input));
214
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
215
- };
216
- export const se_UpdateMaxRecordSizeCommand = async (input, context) => {
217
- const headers = sharedHeaders("UpdateMaxRecordSize");
218
- let body;
219
- body = JSON.stringify(_json(input));
220
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
- };
222
- export const se_UpdateShardCountCommand = async (input, context) => {
223
- const headers = sharedHeaders("UpdateShardCount");
224
- let body;
225
- body = JSON.stringify(_json(input));
226
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
227
- };
228
- export const se_UpdateStreamModeCommand = async (input, context) => {
229
- const headers = sharedHeaders("UpdateStreamMode");
230
- let body;
231
- body = JSON.stringify(_json(input));
232
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
233
- };
234
- export const se_UpdateStreamWarmThroughputCommand = async (input, context) => {
235
- const headers = sharedHeaders("UpdateStreamWarmThroughput");
236
- let body;
237
- body = JSON.stringify(_json(input));
238
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
- };
240
- export const de_AddTagsToStreamCommand = async (output, context) => {
241
- if (output.statusCode >= 300) {
242
- return de_CommandError(output, context);
243
- }
244
- await collectBody(output.body, context);
245
- const response = {
246
- $metadata: deserializeMetadata(output),
247
- };
248
- return response;
249
- };
250
- export const de_CreateStreamCommand = async (output, context) => {
251
- if (output.statusCode >= 300) {
252
- return de_CommandError(output, context);
253
- }
254
- await collectBody(output.body, context);
255
- const response = {
256
- $metadata: deserializeMetadata(output),
257
- };
258
- return response;
259
- };
260
- export const de_DecreaseStreamRetentionPeriodCommand = async (output, context) => {
261
- if (output.statusCode >= 300) {
262
- return de_CommandError(output, context);
263
- }
264
- await collectBody(output.body, context);
265
- const response = {
266
- $metadata: deserializeMetadata(output),
267
- };
268
- return response;
269
- };
270
- export const de_DeleteResourcePolicyCommand = async (output, context) => {
271
- if (output.statusCode >= 300) {
272
- return de_CommandError(output, context);
273
- }
274
- await collectBody(output.body, context);
275
- const response = {
276
- $metadata: deserializeMetadata(output),
277
- };
278
- return response;
279
- };
280
- export const de_DeleteStreamCommand = async (output, context) => {
281
- if (output.statusCode >= 300) {
282
- return de_CommandError(output, context);
283
- }
284
- await collectBody(output.body, context);
285
- const response = {
286
- $metadata: deserializeMetadata(output),
287
- };
288
- return response;
289
- };
290
- export const de_DeregisterStreamConsumerCommand = async (output, context) => {
291
- if (output.statusCode >= 300) {
292
- return de_CommandError(output, context);
293
- }
294
- await collectBody(output.body, context);
295
- const response = {
296
- $metadata: deserializeMetadata(output),
297
- };
298
- return response;
299
- };
300
- export const de_DescribeAccountSettingsCommand = async (output, context) => {
301
- if (output.statusCode >= 300) {
302
- return de_CommandError(output, context);
303
- }
304
- const data = await parseBody(output.body, context);
305
- let contents = {};
306
- contents = de_DescribeAccountSettingsOutput(data, context);
307
- const response = {
308
- $metadata: deserializeMetadata(output),
309
- ...contents,
310
- };
311
- return response;
312
- };
313
- export const de_DescribeLimitsCommand = async (output, context) => {
314
- if (output.statusCode >= 300) {
315
- return de_CommandError(output, context);
316
- }
317
- const data = await parseBody(output.body, context);
318
- let contents = {};
319
- contents = _json(data);
320
- const response = {
321
- $metadata: deserializeMetadata(output),
322
- ...contents,
323
- };
324
- return response;
325
- };
326
- export const de_DescribeStreamCommand = async (output, context) => {
327
- if (output.statusCode >= 300) {
328
- return de_CommandError(output, context);
329
- }
330
- const data = await parseBody(output.body, context);
331
- let contents = {};
332
- contents = de_DescribeStreamOutput(data, context);
333
- const response = {
334
- $metadata: deserializeMetadata(output),
335
- ...contents,
336
- };
337
- return response;
338
- };
339
- export const de_DescribeStreamConsumerCommand = async (output, context) => {
340
- if (output.statusCode >= 300) {
341
- return de_CommandError(output, context);
342
- }
343
- const data = await parseBody(output.body, context);
344
- let contents = {};
345
- contents = de_DescribeStreamConsumerOutput(data, context);
346
- const response = {
347
- $metadata: deserializeMetadata(output),
348
- ...contents,
349
- };
350
- return response;
351
- };
352
- export const de_DescribeStreamSummaryCommand = async (output, context) => {
353
- if (output.statusCode >= 300) {
354
- return de_CommandError(output, context);
355
- }
356
- const data = await parseBody(output.body, context);
357
- let contents = {};
358
- contents = de_DescribeStreamSummaryOutput(data, context);
359
- const response = {
360
- $metadata: deserializeMetadata(output),
361
- ...contents,
362
- };
363
- return response;
364
- };
365
- export const de_DisableEnhancedMonitoringCommand = async (output, context) => {
366
- if (output.statusCode >= 300) {
367
- return de_CommandError(output, context);
368
- }
369
- const data = await parseBody(output.body, context);
370
- let contents = {};
371
- contents = _json(data);
372
- const response = {
373
- $metadata: deserializeMetadata(output),
374
- ...contents,
375
- };
376
- return response;
377
- };
378
- export const de_EnableEnhancedMonitoringCommand = async (output, context) => {
379
- if (output.statusCode >= 300) {
380
- return de_CommandError(output, context);
381
- }
382
- const data = await parseBody(output.body, context);
383
- let contents = {};
384
- contents = _json(data);
385
- const response = {
386
- $metadata: deserializeMetadata(output),
387
- ...contents,
388
- };
389
- return response;
390
- };
391
- export const de_GetRecordsCommand = async (output, context) => {
392
- if (output.statusCode >= 300) {
393
- return de_CommandError(output, context);
394
- }
395
- const data = await parseBody(output.body, context);
396
- let contents = {};
397
- contents = de_GetRecordsOutput(data, context);
398
- const response = {
399
- $metadata: deserializeMetadata(output),
400
- ...contents,
401
- };
402
- return response;
403
- };
404
- export const de_GetResourcePolicyCommand = async (output, context) => {
405
- if (output.statusCode >= 300) {
406
- return de_CommandError(output, context);
407
- }
408
- const data = await parseBody(output.body, context);
409
- let contents = {};
410
- contents = _json(data);
411
- const response = {
412
- $metadata: deserializeMetadata(output),
413
- ...contents,
414
- };
415
- return response;
416
- };
417
- export const de_GetShardIteratorCommand = async (output, context) => {
418
- if (output.statusCode >= 300) {
419
- return de_CommandError(output, context);
420
- }
421
- const data = await parseBody(output.body, context);
422
- let contents = {};
423
- contents = _json(data);
424
- const response = {
425
- $metadata: deserializeMetadata(output),
426
- ...contents,
427
- };
428
- return response;
429
- };
430
- export const de_IncreaseStreamRetentionPeriodCommand = async (output, context) => {
431
- if (output.statusCode >= 300) {
432
- return de_CommandError(output, context);
433
- }
434
- await collectBody(output.body, context);
435
- const response = {
436
- $metadata: deserializeMetadata(output),
437
- };
438
- return response;
439
- };
440
- export const de_ListShardsCommand = async (output, context) => {
441
- if (output.statusCode >= 300) {
442
- return de_CommandError(output, context);
443
- }
444
- const data = await parseBody(output.body, context);
445
- let contents = {};
446
- contents = _json(data);
447
- const response = {
448
- $metadata: deserializeMetadata(output),
449
- ...contents,
450
- };
451
- return response;
452
- };
453
- export const de_ListStreamConsumersCommand = async (output, context) => {
454
- if (output.statusCode >= 300) {
455
- return de_CommandError(output, context);
456
- }
457
- const data = await parseBody(output.body, context);
458
- let contents = {};
459
- contents = de_ListStreamConsumersOutput(data, context);
460
- const response = {
461
- $metadata: deserializeMetadata(output),
462
- ...contents,
463
- };
464
- return response;
465
- };
466
- export const de_ListStreamsCommand = async (output, context) => {
467
- if (output.statusCode >= 300) {
468
- return de_CommandError(output, context);
469
- }
470
- const data = await parseBody(output.body, context);
471
- let contents = {};
472
- contents = de_ListStreamsOutput(data, context);
473
- const response = {
474
- $metadata: deserializeMetadata(output),
475
- ...contents,
476
- };
477
- return response;
478
- };
479
- export const de_ListTagsForResourceCommand = async (output, context) => {
480
- if (output.statusCode >= 300) {
481
- return de_CommandError(output, context);
482
- }
483
- const data = await parseBody(output.body, context);
484
- let contents = {};
485
- contents = _json(data);
486
- const response = {
487
- $metadata: deserializeMetadata(output),
488
- ...contents,
489
- };
490
- return response;
491
- };
492
- export const de_ListTagsForStreamCommand = async (output, context) => {
493
- if (output.statusCode >= 300) {
494
- return de_CommandError(output, context);
495
- }
496
- const data = await parseBody(output.body, context);
497
- let contents = {};
498
- contents = _json(data);
499
- const response = {
500
- $metadata: deserializeMetadata(output),
501
- ...contents,
502
- };
503
- return response;
504
- };
505
- export const de_MergeShardsCommand = async (output, context) => {
506
- if (output.statusCode >= 300) {
507
- return de_CommandError(output, context);
508
- }
509
- await collectBody(output.body, context);
510
- const response = {
511
- $metadata: deserializeMetadata(output),
512
- };
513
- return response;
514
- };
515
- export const de_PutRecordCommand = async (output, context) => {
516
- if (output.statusCode >= 300) {
517
- return de_CommandError(output, context);
518
- }
519
- const data = await parseBody(output.body, context);
520
- let contents = {};
521
- contents = _json(data);
522
- const response = {
523
- $metadata: deserializeMetadata(output),
524
- ...contents,
525
- };
526
- return response;
527
- };
528
- export const de_PutRecordsCommand = async (output, context) => {
529
- if (output.statusCode >= 300) {
530
- return de_CommandError(output, context);
531
- }
532
- const data = await parseBody(output.body, context);
533
- let contents = {};
534
- contents = _json(data);
535
- const response = {
536
- $metadata: deserializeMetadata(output),
537
- ...contents,
538
- };
539
- return response;
540
- };
541
- export const de_PutResourcePolicyCommand = async (output, context) => {
542
- if (output.statusCode >= 300) {
543
- return de_CommandError(output, context);
544
- }
545
- await collectBody(output.body, context);
546
- const response = {
547
- $metadata: deserializeMetadata(output),
548
- };
549
- return response;
550
- };
551
- export const de_RegisterStreamConsumerCommand = async (output, context) => {
552
- if (output.statusCode >= 300) {
553
- return de_CommandError(output, context);
554
- }
555
- const data = await parseBody(output.body, context);
556
- let contents = {};
557
- contents = de_RegisterStreamConsumerOutput(data, context);
558
- const response = {
559
- $metadata: deserializeMetadata(output),
560
- ...contents,
561
- };
562
- return response;
563
- };
564
- export const de_RemoveTagsFromStreamCommand = async (output, context) => {
565
- if (output.statusCode >= 300) {
566
- return de_CommandError(output, context);
567
- }
568
- await collectBody(output.body, context);
569
- const response = {
570
- $metadata: deserializeMetadata(output),
571
- };
572
- return response;
573
- };
574
- export const de_SplitShardCommand = async (output, context) => {
575
- if (output.statusCode >= 300) {
576
- return de_CommandError(output, context);
577
- }
578
- await collectBody(output.body, context);
579
- const response = {
580
- $metadata: deserializeMetadata(output),
581
- };
582
- return response;
583
- };
584
- export const de_StartStreamEncryptionCommand = async (output, context) => {
585
- if (output.statusCode >= 300) {
586
- return de_CommandError(output, context);
587
- }
588
- await collectBody(output.body, context);
589
- const response = {
590
- $metadata: deserializeMetadata(output),
591
- };
592
- return response;
593
- };
594
- export const de_StopStreamEncryptionCommand = async (output, context) => {
595
- if (output.statusCode >= 300) {
596
- return de_CommandError(output, context);
597
- }
598
- await collectBody(output.body, context);
599
- const response = {
600
- $metadata: deserializeMetadata(output),
601
- };
602
- return response;
603
- };
604
- export const de_SubscribeToShardCommand = async (output, context) => {
605
- if (output.statusCode >= 300) {
606
- return de_CommandError(output, context);
607
- }
608
- const contents = { EventStream: de_SubscribeToShardEventStream(output.body, context) };
609
- const response = {
610
- $metadata: deserializeMetadata(output),
611
- ...contents,
612
- };
613
- return response;
614
- };
615
- export const de_TagResourceCommand = async (output, context) => {
616
- if (output.statusCode >= 300) {
617
- return de_CommandError(output, context);
618
- }
619
- await collectBody(output.body, context);
620
- const response = {
621
- $metadata: deserializeMetadata(output),
622
- };
623
- return response;
624
- };
625
- export const de_UntagResourceCommand = async (output, context) => {
626
- if (output.statusCode >= 300) {
627
- return de_CommandError(output, context);
628
- }
629
- await collectBody(output.body, context);
630
- const response = {
631
- $metadata: deserializeMetadata(output),
632
- };
633
- return response;
634
- };
635
- export const de_UpdateAccountSettingsCommand = async (output, context) => {
636
- if (output.statusCode >= 300) {
637
- return de_CommandError(output, context);
638
- }
639
- const data = await parseBody(output.body, context);
640
- let contents = {};
641
- contents = de_UpdateAccountSettingsOutput(data, context);
642
- const response = {
643
- $metadata: deserializeMetadata(output),
644
- ...contents,
645
- };
646
- return response;
647
- };
648
- export const de_UpdateMaxRecordSizeCommand = async (output, context) => {
649
- if (output.statusCode >= 300) {
650
- return de_CommandError(output, context);
651
- }
652
- await collectBody(output.body, context);
653
- const response = {
654
- $metadata: deserializeMetadata(output),
655
- };
656
- return response;
657
- };
658
- export const de_UpdateShardCountCommand = async (output, context) => {
659
- if (output.statusCode >= 300) {
660
- return de_CommandError(output, context);
661
- }
662
- const data = await parseBody(output.body, context);
663
- let contents = {};
664
- contents = _json(data);
665
- const response = {
666
- $metadata: deserializeMetadata(output),
667
- ...contents,
668
- };
669
- return response;
670
- };
671
- export const de_UpdateStreamModeCommand = async (output, context) => {
672
- if (output.statusCode >= 300) {
673
- return de_CommandError(output, context);
674
- }
675
- await collectBody(output.body, context);
676
- const response = {
677
- $metadata: deserializeMetadata(output),
678
- };
679
- return response;
680
- };
681
- export const de_UpdateStreamWarmThroughputCommand = async (output, context) => {
682
- if (output.statusCode >= 300) {
683
- return de_CommandError(output, context);
684
- }
685
- const data = await parseBody(output.body, context);
686
- let contents = {};
687
- contents = _json(data);
688
- const response = {
689
- $metadata: deserializeMetadata(output),
690
- ...contents,
691
- };
692
- return response;
693
- };
694
- const de_CommandError = async (output, context) => {
695
- const parsedOutput = {
696
- ...output,
697
- body: await parseErrorBody(output.body, context),
698
- };
699
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
700
- switch (errorCode) {
701
- case "AccessDeniedException":
702
- case "com.amazonaws.kinesis#AccessDeniedException":
703
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
704
- case "InvalidArgumentException":
705
- case "com.amazonaws.kinesis#InvalidArgumentException":
706
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
707
- case "LimitExceededException":
708
- case "com.amazonaws.kinesis#LimitExceededException":
709
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
710
- case "ResourceInUseException":
711
- case "com.amazonaws.kinesis#ResourceInUseException":
712
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
713
- case "ResourceNotFoundException":
714
- case "com.amazonaws.kinesis#ResourceNotFoundException":
715
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
716
- case "ValidationException":
717
- case "com.amazonaws.kinesis#ValidationException":
718
- throw await de_ValidationExceptionRes(parsedOutput, context);
719
- case "ExpiredIteratorException":
720
- case "com.amazonaws.kinesis#ExpiredIteratorException":
721
- throw await de_ExpiredIteratorExceptionRes(parsedOutput, context);
722
- case "InternalFailureException":
723
- case "com.amazonaws.kinesis#InternalFailureException":
724
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
725
- case "KMSAccessDeniedException":
726
- case "com.amazonaws.kinesis#KMSAccessDeniedException":
727
- throw await de_KMSAccessDeniedExceptionRes(parsedOutput, context);
728
- case "KMSDisabledException":
729
- case "com.amazonaws.kinesis#KMSDisabledException":
730
- throw await de_KMSDisabledExceptionRes(parsedOutput, context);
731
- case "KMSInvalidStateException":
732
- case "com.amazonaws.kinesis#KMSInvalidStateException":
733
- throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
734
- case "KMSNotFoundException":
735
- case "com.amazonaws.kinesis#KMSNotFoundException":
736
- throw await de_KMSNotFoundExceptionRes(parsedOutput, context);
737
- case "KMSOptInRequired":
738
- case "com.amazonaws.kinesis#KMSOptInRequired":
739
- throw await de_KMSOptInRequiredRes(parsedOutput, context);
740
- case "KMSThrottlingException":
741
- case "com.amazonaws.kinesis#KMSThrottlingException":
742
- throw await de_KMSThrottlingExceptionRes(parsedOutput, context);
743
- case "ProvisionedThroughputExceededException":
744
- case "com.amazonaws.kinesis#ProvisionedThroughputExceededException":
745
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
746
- case "ExpiredNextTokenException":
747
- case "com.amazonaws.kinesis#ExpiredNextTokenException":
748
- throw await de_ExpiredNextTokenExceptionRes(parsedOutput, context);
749
- default:
750
- const parsedBody = parsedOutput.body;
751
- return throwDefaultError({
752
- output,
753
- parsedBody,
754
- errorCode,
755
- });
756
- }
757
- };
758
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
759
- const body = parsedOutput.body;
760
- const deserialized = _json(body);
761
- const exception = new AccessDeniedException({
762
- $metadata: deserializeMetadata(parsedOutput),
763
- ...deserialized,
764
- });
765
- return __decorateServiceException(exception, body);
766
- };
767
- const de_ExpiredIteratorExceptionRes = async (parsedOutput, context) => {
768
- const body = parsedOutput.body;
769
- const deserialized = _json(body);
770
- const exception = new ExpiredIteratorException({
771
- $metadata: deserializeMetadata(parsedOutput),
772
- ...deserialized,
773
- });
774
- return __decorateServiceException(exception, body);
775
- };
776
- const de_ExpiredNextTokenExceptionRes = async (parsedOutput, context) => {
777
- const body = parsedOutput.body;
778
- const deserialized = _json(body);
779
- const exception = new ExpiredNextTokenException({
780
- $metadata: deserializeMetadata(parsedOutput),
781
- ...deserialized,
782
- });
783
- return __decorateServiceException(exception, body);
784
- };
785
- const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
786
- const body = parsedOutput.body;
787
- const deserialized = _json(body);
788
- const exception = new InternalFailureException({
789
- $metadata: deserializeMetadata(parsedOutput),
790
- ...deserialized,
791
- });
792
- return __decorateServiceException(exception, body);
793
- };
794
- const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
795
- const body = parsedOutput.body;
796
- const deserialized = _json(body);
797
- const exception = new InvalidArgumentException({
798
- $metadata: deserializeMetadata(parsedOutput),
799
- ...deserialized,
800
- });
801
- return __decorateServiceException(exception, body);
802
- };
803
- const de_KMSAccessDeniedExceptionRes = async (parsedOutput, context) => {
804
- const body = parsedOutput.body;
805
- const deserialized = _json(body);
806
- const exception = new KMSAccessDeniedException({
807
- $metadata: deserializeMetadata(parsedOutput),
808
- ...deserialized,
809
- });
810
- return __decorateServiceException(exception, body);
811
- };
812
- const de_KMSDisabledExceptionRes = async (parsedOutput, context) => {
813
- const body = parsedOutput.body;
814
- const deserialized = _json(body);
815
- const exception = new KMSDisabledException({
816
- $metadata: deserializeMetadata(parsedOutput),
817
- ...deserialized,
818
- });
819
- return __decorateServiceException(exception, body);
820
- };
821
- const de_KMSInvalidStateExceptionRes = async (parsedOutput, context) => {
822
- const body = parsedOutput.body;
823
- const deserialized = _json(body);
824
- const exception = new KMSInvalidStateException({
825
- $metadata: deserializeMetadata(parsedOutput),
826
- ...deserialized,
827
- });
828
- return __decorateServiceException(exception, body);
829
- };
830
- const de_KMSNotFoundExceptionRes = async (parsedOutput, context) => {
831
- const body = parsedOutput.body;
832
- const deserialized = _json(body);
833
- const exception = new KMSNotFoundException({
834
- $metadata: deserializeMetadata(parsedOutput),
835
- ...deserialized,
836
- });
837
- return __decorateServiceException(exception, body);
838
- };
839
- const de_KMSOptInRequiredRes = async (parsedOutput, context) => {
840
- const body = parsedOutput.body;
841
- const deserialized = _json(body);
842
- const exception = new KMSOptInRequired({
843
- $metadata: deserializeMetadata(parsedOutput),
844
- ...deserialized,
845
- });
846
- return __decorateServiceException(exception, body);
847
- };
848
- const de_KMSThrottlingExceptionRes = async (parsedOutput, context) => {
849
- const body = parsedOutput.body;
850
- const deserialized = _json(body);
851
- const exception = new KMSThrottlingException({
852
- $metadata: deserializeMetadata(parsedOutput),
853
- ...deserialized,
854
- });
855
- return __decorateServiceException(exception, body);
856
- };
857
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
858
- const body = parsedOutput.body;
859
- const deserialized = _json(body);
860
- const exception = new LimitExceededException({
861
- $metadata: deserializeMetadata(parsedOutput),
862
- ...deserialized,
863
- });
864
- return __decorateServiceException(exception, body);
865
- };
866
- const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, context) => {
867
- const body = parsedOutput.body;
868
- const deserialized = _json(body);
869
- const exception = new ProvisionedThroughputExceededException({
870
- $metadata: deserializeMetadata(parsedOutput),
871
- ...deserialized,
872
- });
873
- return __decorateServiceException(exception, body);
874
- };
875
- const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
876
- const body = parsedOutput.body;
877
- const deserialized = _json(body);
878
- const exception = new ResourceInUseException({
879
- $metadata: deserializeMetadata(parsedOutput),
880
- ...deserialized,
881
- });
882
- return __decorateServiceException(exception, body);
883
- };
884
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
885
- const body = parsedOutput.body;
886
- const deserialized = _json(body);
887
- const exception = new ResourceNotFoundException({
888
- $metadata: deserializeMetadata(parsedOutput),
889
- ...deserialized,
890
- });
891
- return __decorateServiceException(exception, body);
892
- };
893
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
894
- const body = parsedOutput.body;
895
- const deserialized = _json(body);
896
- const exception = new ValidationException({
897
- $metadata: deserializeMetadata(parsedOutput),
898
- ...deserialized,
899
- });
900
- return __decorateServiceException(exception, body);
901
- };
902
- const de_SubscribeToShardEventStream = (output, context) => {
903
- return context.eventStreamMarshaller.deserialize(output, async (event) => {
904
- if (event["SubscribeToShardEvent"] != null) {
905
- return {
906
- SubscribeToShardEvent: await de_SubscribeToShardEvent_event(event["SubscribeToShardEvent"], context),
907
- };
908
- }
909
- if (event["ResourceNotFoundException"] != null) {
910
- return {
911
- ResourceNotFoundException: await de_ResourceNotFoundException_event(event["ResourceNotFoundException"], context),
912
- };
913
- }
914
- if (event["ResourceInUseException"] != null) {
915
- return {
916
- ResourceInUseException: await de_ResourceInUseException_event(event["ResourceInUseException"], context),
917
- };
918
- }
919
- if (event["KMSDisabledException"] != null) {
920
- return {
921
- KMSDisabledException: await de_KMSDisabledException_event(event["KMSDisabledException"], context),
922
- };
923
- }
924
- if (event["KMSInvalidStateException"] != null) {
925
- return {
926
- KMSInvalidStateException: await de_KMSInvalidStateException_event(event["KMSInvalidStateException"], context),
927
- };
928
- }
929
- if (event["KMSAccessDeniedException"] != null) {
930
- return {
931
- KMSAccessDeniedException: await de_KMSAccessDeniedException_event(event["KMSAccessDeniedException"], context),
932
- };
933
- }
934
- if (event["KMSNotFoundException"] != null) {
935
- return {
936
- KMSNotFoundException: await de_KMSNotFoundException_event(event["KMSNotFoundException"], context),
937
- };
938
- }
939
- if (event["KMSOptInRequired"] != null) {
940
- return {
941
- KMSOptInRequired: await de_KMSOptInRequired_event(event["KMSOptInRequired"], context),
942
- };
943
- }
944
- if (event["KMSThrottlingException"] != null) {
945
- return {
946
- KMSThrottlingException: await de_KMSThrottlingException_event(event["KMSThrottlingException"], context),
947
- };
948
- }
949
- if (event["InternalFailureException"] != null) {
950
- return {
951
- InternalFailureException: await de_InternalFailureException_event(event["InternalFailureException"], context),
952
- };
953
- }
954
- return { $unknown: event };
955
- });
956
- };
957
- const de_InternalFailureException_event = async (output, context) => {
958
- const parsedOutput = {
959
- ...output,
960
- body: await parseBody(output.body, context),
961
- };
962
- return de_InternalFailureExceptionRes(parsedOutput, context);
963
- };
964
- const de_KMSAccessDeniedException_event = async (output, context) => {
965
- const parsedOutput = {
966
- ...output,
967
- body: await parseBody(output.body, context),
968
- };
969
- return de_KMSAccessDeniedExceptionRes(parsedOutput, context);
970
- };
971
- const de_KMSDisabledException_event = async (output, context) => {
972
- const parsedOutput = {
973
- ...output,
974
- body: await parseBody(output.body, context),
975
- };
976
- return de_KMSDisabledExceptionRes(parsedOutput, context);
977
- };
978
- const de_KMSInvalidStateException_event = async (output, context) => {
979
- const parsedOutput = {
980
- ...output,
981
- body: await parseBody(output.body, context),
982
- };
983
- return de_KMSInvalidStateExceptionRes(parsedOutput, context);
984
- };
985
- const de_KMSNotFoundException_event = async (output, context) => {
986
- const parsedOutput = {
987
- ...output,
988
- body: await parseBody(output.body, context),
989
- };
990
- return de_KMSNotFoundExceptionRes(parsedOutput, context);
991
- };
992
- const de_KMSOptInRequired_event = async (output, context) => {
993
- const parsedOutput = {
994
- ...output,
995
- body: await parseBody(output.body, context),
996
- };
997
- return de_KMSOptInRequiredRes(parsedOutput, context);
998
- };
999
- const de_KMSThrottlingException_event = async (output, context) => {
1000
- const parsedOutput = {
1001
- ...output,
1002
- body: await parseBody(output.body, context),
1003
- };
1004
- return de_KMSThrottlingExceptionRes(parsedOutput, context);
1005
- };
1006
- const de_ResourceInUseException_event = async (output, context) => {
1007
- const parsedOutput = {
1008
- ...output,
1009
- body: await parseBody(output.body, context),
1010
- };
1011
- return de_ResourceInUseExceptionRes(parsedOutput, context);
1012
- };
1013
- const de_ResourceNotFoundException_event = async (output, context) => {
1014
- const parsedOutput = {
1015
- ...output,
1016
- body: await parseBody(output.body, context),
1017
- };
1018
- return de_ResourceNotFoundExceptionRes(parsedOutput, context);
1019
- };
1020
- const de_SubscribeToShardEvent_event = async (output, context) => {
1021
- const contents = {};
1022
- const data = await parseBody(output.body, context);
1023
- Object.assign(contents, de_SubscribeToShardEvent(data, context));
1024
- return contents;
1025
- };
1026
- const se_GetShardIteratorInput = (input, context) => {
1027
- return take(input, {
1028
- ShardId: [],
1029
- ShardIteratorType: [],
1030
- StartingSequenceNumber: [],
1031
- StreamARN: [],
1032
- StreamName: [],
1033
- Timestamp: (_) => _.getTime() / 1_000,
1034
- });
1035
- };
1036
- const se_ListShardsInput = (input, context) => {
1037
- return take(input, {
1038
- ExclusiveStartShardId: [],
1039
- MaxResults: [],
1040
- NextToken: [],
1041
- ShardFilter: (_) => se_ShardFilter(_, context),
1042
- StreamARN: [],
1043
- StreamCreationTimestamp: (_) => _.getTime() / 1_000,
1044
- StreamName: [],
1045
- });
1046
- };
1047
- const se_ListStreamConsumersInput = (input, context) => {
1048
- return take(input, {
1049
- MaxResults: [],
1050
- NextToken: [],
1051
- StreamARN: [],
1052
- StreamCreationTimestamp: (_) => _.getTime() / 1_000,
1053
- });
1054
- };
1055
- const se_PutRecordInput = (input, context) => {
1056
- return take(input, {
1057
- Data: context.base64Encoder,
1058
- ExplicitHashKey: [],
1059
- PartitionKey: [],
1060
- SequenceNumberForOrdering: [],
1061
- StreamARN: [],
1062
- StreamName: [],
1063
- });
1064
- };
1065
- const se_PutRecordsInput = (input, context) => {
1066
- return take(input, {
1067
- Records: (_) => se_PutRecordsRequestEntryList(_, context),
1068
- StreamARN: [],
1069
- StreamName: [],
1070
- });
1071
- };
1072
- const se_PutRecordsRequestEntry = (input, context) => {
1073
- return take(input, {
1074
- Data: context.base64Encoder,
1075
- ExplicitHashKey: [],
1076
- PartitionKey: [],
1077
- });
1078
- };
1079
- const se_PutRecordsRequestEntryList = (input, context) => {
1080
- return input
1081
- .filter((e) => e != null)
1082
- .map((entry) => {
1083
- return se_PutRecordsRequestEntry(entry, context);
1084
- });
1085
- };
1086
- const se_ShardFilter = (input, context) => {
1087
- return take(input, {
1088
- ShardId: [],
1089
- Timestamp: (_) => _.getTime() / 1_000,
1090
- Type: [],
1091
- });
1092
- };
1093
- const se_StartingPosition = (input, context) => {
1094
- return take(input, {
1095
- SequenceNumber: [],
1096
- Timestamp: (_) => _.getTime() / 1_000,
1097
- Type: [],
1098
- });
1099
- };
1100
- const se_SubscribeToShardInput = (input, context) => {
1101
- return take(input, {
1102
- ConsumerARN: [],
1103
- ShardId: [],
1104
- StartingPosition: (_) => se_StartingPosition(_, context),
1105
- });
1106
- };
1107
- const de_Consumer = (output, context) => {
1108
- return take(output, {
1109
- ConsumerARN: __expectString,
1110
- ConsumerCreationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1111
- ConsumerName: __expectString,
1112
- ConsumerStatus: __expectString,
1113
- });
1114
- };
1115
- const de_ConsumerDescription = (output, context) => {
1116
- return take(output, {
1117
- ConsumerARN: __expectString,
1118
- ConsumerCreationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1119
- ConsumerName: __expectString,
1120
- ConsumerStatus: __expectString,
1121
- StreamARN: __expectString,
1122
- });
1123
- };
1124
- const de_ConsumerList = (output, context) => {
1125
- const retVal = (output || [])
1126
- .filter((e) => e != null)
1127
- .map((entry) => {
1128
- return de_Consumer(entry, context);
1129
- });
1130
- return retVal;
1131
- };
1132
- const de_DescribeAccountSettingsOutput = (output, context) => {
1133
- return take(output, {
1134
- MinimumThroughputBillingCommitment: (_) => de_MinimumThroughputBillingCommitmentOutput(_, context),
1135
- });
1136
- };
1137
- const de_DescribeStreamConsumerOutput = (output, context) => {
1138
- return take(output, {
1139
- ConsumerDescription: (_) => de_ConsumerDescription(_, context),
1140
- });
1141
- };
1142
- const de_DescribeStreamOutput = (output, context) => {
1143
- return take(output, {
1144
- StreamDescription: (_) => de_StreamDescription(_, context),
1145
- });
1146
- };
1147
- const de_DescribeStreamSummaryOutput = (output, context) => {
1148
- return take(output, {
1149
- StreamDescriptionSummary: (_) => de_StreamDescriptionSummary(_, context),
1150
- });
1151
- };
1152
- const de_GetRecordsOutput = (output, context) => {
1153
- return take(output, {
1154
- ChildShards: _json,
1155
- MillisBehindLatest: __expectLong,
1156
- NextShardIterator: __expectString,
1157
- Records: (_) => de_RecordList(_, context),
1158
- });
1159
- };
1160
- const de_ListStreamConsumersOutput = (output, context) => {
1161
- return take(output, {
1162
- Consumers: (_) => de_ConsumerList(_, context),
1163
- NextToken: __expectString,
1164
- });
1165
- };
1166
- const de_ListStreamsOutput = (output, context) => {
1167
- return take(output, {
1168
- HasMoreStreams: __expectBoolean,
1169
- NextToken: __expectString,
1170
- StreamNames: _json,
1171
- StreamSummaries: (_) => de_StreamSummaryList(_, context),
1172
- });
1173
- };
1174
- const de_MinimumThroughputBillingCommitmentOutput = (output, context) => {
1175
- return take(output, {
1176
- EarliestAllowedEndAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1177
- EndedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1178
- StartedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1179
- Status: __expectString,
1180
- });
1181
- };
1182
- const de__Record = (output, context) => {
1183
- return take(output, {
1184
- ApproximateArrivalTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1185
- Data: context.base64Decoder,
1186
- EncryptionType: __expectString,
1187
- PartitionKey: __expectString,
1188
- SequenceNumber: __expectString,
1189
- });
1190
- };
1191
- const de_RecordList = (output, context) => {
1192
- const retVal = (output || [])
1193
- .filter((e) => e != null)
1194
- .map((entry) => {
1195
- return de__Record(entry, context);
1196
- });
1197
- return retVal;
1198
- };
1199
- const de_RegisterStreamConsumerOutput = (output, context) => {
1200
- return take(output, {
1201
- Consumer: (_) => de_Consumer(_, context),
1202
- });
1203
- };
1204
- const de_StreamDescription = (output, context) => {
1205
- return take(output, {
1206
- EncryptionType: __expectString,
1207
- EnhancedMonitoring: _json,
1208
- HasMoreShards: __expectBoolean,
1209
- KeyId: __expectString,
1210
- RetentionPeriodHours: __expectInt32,
1211
- Shards: _json,
1212
- StreamARN: __expectString,
1213
- StreamCreationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1214
- StreamModeDetails: _json,
1215
- StreamName: __expectString,
1216
- StreamStatus: __expectString,
1217
- });
1218
- };
1219
- const de_StreamDescriptionSummary = (output, context) => {
1220
- return take(output, {
1221
- ConsumerCount: __expectInt32,
1222
- EncryptionType: __expectString,
1223
- EnhancedMonitoring: _json,
1224
- KeyId: __expectString,
1225
- MaxRecordSizeInKiB: __expectInt32,
1226
- OpenShardCount: __expectInt32,
1227
- RetentionPeriodHours: __expectInt32,
1228
- StreamARN: __expectString,
1229
- StreamCreationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1230
- StreamModeDetails: _json,
1231
- StreamName: __expectString,
1232
- StreamStatus: __expectString,
1233
- WarmThroughput: _json,
1234
- });
1235
- };
1236
- const de_StreamSummary = (output, context) => {
1237
- return take(output, {
1238
- StreamARN: __expectString,
1239
- StreamCreationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1240
- StreamModeDetails: _json,
1241
- StreamName: __expectString,
1242
- StreamStatus: __expectString,
1243
- });
1244
- };
1245
- const de_StreamSummaryList = (output, context) => {
1246
- const retVal = (output || [])
1247
- .filter((e) => e != null)
1248
- .map((entry) => {
1249
- return de_StreamSummary(entry, context);
1250
- });
1251
- return retVal;
1252
- };
1253
- const de_SubscribeToShardEvent = (output, context) => {
1254
- return take(output, {
1255
- ChildShards: _json,
1256
- ContinuationSequenceNumber: __expectString,
1257
- MillisBehindLatest: __expectLong,
1258
- Records: (_) => de_RecordList(_, context),
1259
- });
1260
- };
1261
- const de_UpdateAccountSettingsOutput = (output, context) => {
1262
- return take(output, {
1263
- MinimumThroughputBillingCommitment: (_) => de_MinimumThroughputBillingCommitmentOutput(_, context),
1264
- });
1265
- };
1266
- const deserializeMetadata = (output) => ({
1267
- httpStatusCode: output.statusCode,
1268
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1269
- extendedRequestId: output.headers["x-amz-id-2"],
1270
- cfId: output.headers["x-amz-cf-id"],
1271
- });
1272
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1273
- const throwDefaultError = withBaseException(__BaseException);
1274
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1275
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1276
- const contents = {
1277
- protocol,
1278
- hostname,
1279
- port,
1280
- method: "POST",
1281
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1282
- headers,
1283
- };
1284
- if (resolvedHostname !== undefined) {
1285
- contents.hostname = resolvedHostname;
1286
- }
1287
- if (body !== undefined) {
1288
- contents.body = body;
1289
- }
1290
- return new __HttpRequest(contents);
1291
- };
1292
- function sharedHeaders(operation) {
1293
- return {
1294
- "content-type": "application/x-amz-json-1.1",
1295
- "x-amz-target": `Kinesis_20131202.${operation}`,
1296
- };
1297
- }