@aws-sdk/client-sqs 3.926.0 → 3.928.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 (44) hide show
  1. package/dist-cjs/index.js +1509 -1437
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/SQSClient.js +2 -0
  4. package/dist-es/commands/AddPermissionCommand.js +3 -9
  5. package/dist-es/commands/CancelMessageMoveTaskCommand.js +3 -9
  6. package/dist-es/commands/ChangeMessageVisibilityBatchCommand.js +3 -9
  7. package/dist-es/commands/ChangeMessageVisibilityCommand.js +3 -9
  8. package/dist-es/commands/CreateQueueCommand.js +3 -9
  9. package/dist-es/commands/DeleteMessageBatchCommand.js +3 -9
  10. package/dist-es/commands/DeleteMessageCommand.js +3 -9
  11. package/dist-es/commands/DeleteQueueCommand.js +3 -9
  12. package/dist-es/commands/GetQueueAttributesCommand.js +3 -9
  13. package/dist-es/commands/GetQueueUrlCommand.js +3 -9
  14. package/dist-es/commands/ListDeadLetterSourceQueuesCommand.js +3 -9
  15. package/dist-es/commands/ListMessageMoveTasksCommand.js +3 -9
  16. package/dist-es/commands/ListQueueTagsCommand.js +3 -9
  17. package/dist-es/commands/ListQueuesCommand.js +3 -9
  18. package/dist-es/commands/PurgeQueueCommand.js +3 -9
  19. package/dist-es/commands/ReceiveMessageCommand.js +3 -10
  20. package/dist-es/commands/RemovePermissionCommand.js +3 -9
  21. package/dist-es/commands/SendMessageBatchCommand.js +3 -10
  22. package/dist-es/commands/SendMessageCommand.js +3 -10
  23. package/dist-es/commands/SetQueueAttributesCommand.js +3 -9
  24. package/dist-es/commands/StartMessageMoveTaskCommand.js +3 -9
  25. package/dist-es/commands/TagQueueCommand.js +3 -9
  26. package/dist-es/commands/UntagQueueCommand.js +3 -9
  27. package/dist-es/runtimeConfig.shared.js +7 -0
  28. package/dist-es/schemas/schemas_0.js +1384 -0
  29. package/dist-types/SQSClient.d.ts +10 -1
  30. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  31. package/dist-types/runtimeConfig.d.ts +1 -0
  32. package/dist-types/runtimeConfig.native.d.ts +1 -0
  33. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  34. package/dist-types/schemas/schemas_0.d.ts +125 -0
  35. package/dist-types/ts3.4/SQSClient.d.ts +4 -0
  36. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  37. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  38. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  39. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  40. package/dist-types/ts3.4/schemas/schemas_0.d.ts +131 -0
  41. package/package.json +5 -5
  42. package/dist-es/protocols/Aws_json1_0.js +0 -1193
  43. package/dist-types/protocols/Aws_json1_0.d.ts +0 -209
  44. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +0 -281
@@ -1,1193 +0,0 @@
1
- import { _toNum, _toStr, 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, expectString as __expectString, take, withBaseException, } from "@smithy/smithy-client";
4
- import { BatchEntryIdsNotDistinct, BatchRequestTooLong, EmptyBatchRequest, InvalidAddress, InvalidAttributeName, InvalidAttributeValue, InvalidBatchEntryId, InvalidIdFormat, InvalidMessageContents, InvalidSecurity, KmsAccessDenied, KmsDisabled, KmsInvalidKeyUsage, KmsInvalidState, KmsNotFound, KmsOptInRequired, KmsThrottled, MessageNotInflight, OverLimit, PurgeQueueInProgress, QueueDeletedRecently, QueueDoesNotExist, QueueNameExists, ReceiptHandleIsInvalid, RequestThrottled, ResourceNotFoundException, TooManyEntriesInBatchRequest, UnsupportedOperation, } from "../models/models_0";
5
- import { SQSServiceException as __BaseException } from "../models/SQSServiceException";
6
- export const se_AddPermissionCommand = async (input, context) => {
7
- const headers = sharedHeaders("AddPermission");
8
- let body;
9
- body = JSON.stringify(se_AddPermissionRequest(input, context));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_CancelMessageMoveTaskCommand = async (input, context) => {
13
- const headers = sharedHeaders("CancelMessageMoveTask");
14
- let body;
15
- body = JSON.stringify(se_CancelMessageMoveTaskRequest(input, context));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_ChangeMessageVisibilityCommand = async (input, context) => {
19
- const headers = sharedHeaders("ChangeMessageVisibility");
20
- let body;
21
- body = JSON.stringify(se_ChangeMessageVisibilityRequest(input, context));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_ChangeMessageVisibilityBatchCommand = async (input, context) => {
25
- const headers = sharedHeaders("ChangeMessageVisibilityBatch");
26
- let body;
27
- body = JSON.stringify(se_ChangeMessageVisibilityBatchRequest(input, context));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_CreateQueueCommand = async (input, context) => {
31
- const headers = sharedHeaders("CreateQueue");
32
- let body;
33
- body = JSON.stringify(se_CreateQueueRequest(input, context));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_DeleteMessageCommand = async (input, context) => {
37
- const headers = sharedHeaders("DeleteMessage");
38
- let body;
39
- body = JSON.stringify(se_DeleteMessageRequest(input, context));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_DeleteMessageBatchCommand = async (input, context) => {
43
- const headers = sharedHeaders("DeleteMessageBatch");
44
- let body;
45
- body = JSON.stringify(se_DeleteMessageBatchRequest(input, context));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_DeleteQueueCommand = async (input, context) => {
49
- const headers = sharedHeaders("DeleteQueue");
50
- let body;
51
- body = JSON.stringify(se_DeleteQueueRequest(input, context));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_GetQueueAttributesCommand = async (input, context) => {
55
- const headers = sharedHeaders("GetQueueAttributes");
56
- let body;
57
- body = JSON.stringify(se_GetQueueAttributesRequest(input, context));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_GetQueueUrlCommand = async (input, context) => {
61
- const headers = sharedHeaders("GetQueueUrl");
62
- let body;
63
- body = JSON.stringify(se_GetQueueUrlRequest(input, context));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_ListDeadLetterSourceQueuesCommand = async (input, context) => {
67
- const headers = sharedHeaders("ListDeadLetterSourceQueues");
68
- let body;
69
- body = JSON.stringify(se_ListDeadLetterSourceQueuesRequest(input, context));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_ListMessageMoveTasksCommand = async (input, context) => {
73
- const headers = sharedHeaders("ListMessageMoveTasks");
74
- let body;
75
- body = JSON.stringify(se_ListMessageMoveTasksRequest(input, context));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_ListQueuesCommand = async (input, context) => {
79
- const headers = sharedHeaders("ListQueues");
80
- let body;
81
- body = JSON.stringify(se_ListQueuesRequest(input, context));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_ListQueueTagsCommand = async (input, context) => {
85
- const headers = sharedHeaders("ListQueueTags");
86
- let body;
87
- body = JSON.stringify(se_ListQueueTagsRequest(input, context));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_PurgeQueueCommand = async (input, context) => {
91
- const headers = sharedHeaders("PurgeQueue");
92
- let body;
93
- body = JSON.stringify(se_PurgeQueueRequest(input, context));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_ReceiveMessageCommand = async (input, context) => {
97
- const headers = sharedHeaders("ReceiveMessage");
98
- let body;
99
- body = JSON.stringify(se_ReceiveMessageRequest(input, context));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_RemovePermissionCommand = async (input, context) => {
103
- const headers = sharedHeaders("RemovePermission");
104
- let body;
105
- body = JSON.stringify(se_RemovePermissionRequest(input, context));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_SendMessageCommand = async (input, context) => {
109
- const headers = sharedHeaders("SendMessage");
110
- let body;
111
- body = JSON.stringify(se_SendMessageRequest(input, context));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_SendMessageBatchCommand = async (input, context) => {
115
- const headers = sharedHeaders("SendMessageBatch");
116
- let body;
117
- body = JSON.stringify(se_SendMessageBatchRequest(input, context));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_SetQueueAttributesCommand = async (input, context) => {
121
- const headers = sharedHeaders("SetQueueAttributes");
122
- let body;
123
- body = JSON.stringify(se_SetQueueAttributesRequest(input, context));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_StartMessageMoveTaskCommand = async (input, context) => {
127
- const headers = sharedHeaders("StartMessageMoveTask");
128
- let body;
129
- body = JSON.stringify(se_StartMessageMoveTaskRequest(input, context));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_TagQueueCommand = async (input, context) => {
133
- const headers = sharedHeaders("TagQueue");
134
- let body;
135
- body = JSON.stringify(se_TagQueueRequest(input, context));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_UntagQueueCommand = async (input, context) => {
139
- const headers = sharedHeaders("UntagQueue");
140
- let body;
141
- body = JSON.stringify(se_UntagQueueRequest(input, context));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const de_AddPermissionCommand = async (output, context) => {
145
- if (output.statusCode >= 300) {
146
- return de_CommandError(output, context);
147
- }
148
- await collectBody(output.body, context);
149
- const response = {
150
- $metadata: deserializeMetadata(output),
151
- };
152
- return response;
153
- };
154
- export const de_CancelMessageMoveTaskCommand = async (output, context) => {
155
- if (output.statusCode >= 300) {
156
- return de_CommandError(output, context);
157
- }
158
- const data = await parseBody(output.body, context);
159
- let contents = {};
160
- contents = _json(data);
161
- const response = {
162
- $metadata: deserializeMetadata(output),
163
- ...contents,
164
- };
165
- return response;
166
- };
167
- export const de_ChangeMessageVisibilityCommand = async (output, context) => {
168
- if (output.statusCode >= 300) {
169
- return de_CommandError(output, context);
170
- }
171
- await collectBody(output.body, context);
172
- const response = {
173
- $metadata: deserializeMetadata(output),
174
- };
175
- return response;
176
- };
177
- export const de_ChangeMessageVisibilityBatchCommand = async (output, context) => {
178
- if (output.statusCode >= 300) {
179
- return de_CommandError(output, context);
180
- }
181
- const data = await parseBody(output.body, context);
182
- let contents = {};
183
- contents = _json(data);
184
- const response = {
185
- $metadata: deserializeMetadata(output),
186
- ...contents,
187
- };
188
- return response;
189
- };
190
- export const de_CreateQueueCommand = async (output, context) => {
191
- if (output.statusCode >= 300) {
192
- return de_CommandError(output, context);
193
- }
194
- const data = await parseBody(output.body, context);
195
- let contents = {};
196
- contents = _json(data);
197
- const response = {
198
- $metadata: deserializeMetadata(output),
199
- ...contents,
200
- };
201
- return response;
202
- };
203
- export const de_DeleteMessageCommand = async (output, context) => {
204
- if (output.statusCode >= 300) {
205
- return de_CommandError(output, context);
206
- }
207
- await collectBody(output.body, context);
208
- const response = {
209
- $metadata: deserializeMetadata(output),
210
- };
211
- return response;
212
- };
213
- export const de_DeleteMessageBatchCommand = async (output, context) => {
214
- if (output.statusCode >= 300) {
215
- return de_CommandError(output, context);
216
- }
217
- const data = await parseBody(output.body, context);
218
- let contents = {};
219
- contents = _json(data);
220
- const response = {
221
- $metadata: deserializeMetadata(output),
222
- ...contents,
223
- };
224
- return response;
225
- };
226
- export const de_DeleteQueueCommand = async (output, context) => {
227
- if (output.statusCode >= 300) {
228
- return de_CommandError(output, context);
229
- }
230
- await collectBody(output.body, context);
231
- const response = {
232
- $metadata: deserializeMetadata(output),
233
- };
234
- return response;
235
- };
236
- export const de_GetQueueAttributesCommand = async (output, context) => {
237
- if (output.statusCode >= 300) {
238
- return de_CommandError(output, context);
239
- }
240
- const data = await parseBody(output.body, context);
241
- let contents = {};
242
- contents = _json(data);
243
- const response = {
244
- $metadata: deserializeMetadata(output),
245
- ...contents,
246
- };
247
- return response;
248
- };
249
- export const de_GetQueueUrlCommand = async (output, context) => {
250
- if (output.statusCode >= 300) {
251
- return de_CommandError(output, context);
252
- }
253
- const data = await parseBody(output.body, context);
254
- let contents = {};
255
- contents = _json(data);
256
- const response = {
257
- $metadata: deserializeMetadata(output),
258
- ...contents,
259
- };
260
- return response;
261
- };
262
- export const de_ListDeadLetterSourceQueuesCommand = async (output, context) => {
263
- if (output.statusCode >= 300) {
264
- return de_CommandError(output, context);
265
- }
266
- const data = await parseBody(output.body, context);
267
- let contents = {};
268
- contents = _json(data);
269
- const response = {
270
- $metadata: deserializeMetadata(output),
271
- ...contents,
272
- };
273
- return response;
274
- };
275
- export const de_ListMessageMoveTasksCommand = async (output, context) => {
276
- if (output.statusCode >= 300) {
277
- return de_CommandError(output, context);
278
- }
279
- const data = await parseBody(output.body, context);
280
- let contents = {};
281
- contents = _json(data);
282
- const response = {
283
- $metadata: deserializeMetadata(output),
284
- ...contents,
285
- };
286
- return response;
287
- };
288
- export const de_ListQueuesCommand = async (output, context) => {
289
- if (output.statusCode >= 300) {
290
- return de_CommandError(output, context);
291
- }
292
- const data = await parseBody(output.body, context);
293
- let contents = {};
294
- contents = _json(data);
295
- const response = {
296
- $metadata: deserializeMetadata(output),
297
- ...contents,
298
- };
299
- return response;
300
- };
301
- export const de_ListQueueTagsCommand = async (output, context) => {
302
- if (output.statusCode >= 300) {
303
- return de_CommandError(output, context);
304
- }
305
- const data = await parseBody(output.body, context);
306
- let contents = {};
307
- contents = _json(data);
308
- const response = {
309
- $metadata: deserializeMetadata(output),
310
- ...contents,
311
- };
312
- return response;
313
- };
314
- export const de_PurgeQueueCommand = async (output, context) => {
315
- if (output.statusCode >= 300) {
316
- return de_CommandError(output, context);
317
- }
318
- await collectBody(output.body, context);
319
- const response = {
320
- $metadata: deserializeMetadata(output),
321
- };
322
- return response;
323
- };
324
- export const de_ReceiveMessageCommand = async (output, context) => {
325
- if (output.statusCode >= 300) {
326
- return de_CommandError(output, context);
327
- }
328
- const data = await parseBody(output.body, context);
329
- let contents = {};
330
- contents = de_ReceiveMessageResult(data, context);
331
- const response = {
332
- $metadata: deserializeMetadata(output),
333
- ...contents,
334
- };
335
- return response;
336
- };
337
- export const de_RemovePermissionCommand = async (output, context) => {
338
- if (output.statusCode >= 300) {
339
- return de_CommandError(output, context);
340
- }
341
- await collectBody(output.body, context);
342
- const response = {
343
- $metadata: deserializeMetadata(output),
344
- };
345
- return response;
346
- };
347
- export const de_SendMessageCommand = async (output, context) => {
348
- if (output.statusCode >= 300) {
349
- return de_CommandError(output, context);
350
- }
351
- const data = await parseBody(output.body, context);
352
- let contents = {};
353
- contents = _json(data);
354
- const response = {
355
- $metadata: deserializeMetadata(output),
356
- ...contents,
357
- };
358
- return response;
359
- };
360
- export const de_SendMessageBatchCommand = async (output, context) => {
361
- if (output.statusCode >= 300) {
362
- return de_CommandError(output, context);
363
- }
364
- const data = await parseBody(output.body, context);
365
- let contents = {};
366
- contents = _json(data);
367
- const response = {
368
- $metadata: deserializeMetadata(output),
369
- ...contents,
370
- };
371
- return response;
372
- };
373
- export const de_SetQueueAttributesCommand = async (output, context) => {
374
- if (output.statusCode >= 300) {
375
- return de_CommandError(output, context);
376
- }
377
- await collectBody(output.body, context);
378
- const response = {
379
- $metadata: deserializeMetadata(output),
380
- };
381
- return response;
382
- };
383
- export const de_StartMessageMoveTaskCommand = async (output, context) => {
384
- if (output.statusCode >= 300) {
385
- return de_CommandError(output, context);
386
- }
387
- const data = await parseBody(output.body, context);
388
- let contents = {};
389
- contents = _json(data);
390
- const response = {
391
- $metadata: deserializeMetadata(output),
392
- ...contents,
393
- };
394
- return response;
395
- };
396
- export const de_TagQueueCommand = async (output, context) => {
397
- if (output.statusCode >= 300) {
398
- return de_CommandError(output, context);
399
- }
400
- await collectBody(output.body, context);
401
- const response = {
402
- $metadata: deserializeMetadata(output),
403
- };
404
- return response;
405
- };
406
- export const de_UntagQueueCommand = async (output, context) => {
407
- if (output.statusCode >= 300) {
408
- return de_CommandError(output, context);
409
- }
410
- await collectBody(output.body, context);
411
- const response = {
412
- $metadata: deserializeMetadata(output),
413
- };
414
- return response;
415
- };
416
- const de_CommandError = async (output, context) => {
417
- const parsedOutput = {
418
- ...output,
419
- body: await parseErrorBody(output.body, context),
420
- };
421
- populateBodyWithQueryCompatibility(parsedOutput, output.headers);
422
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
423
- switch (errorCode) {
424
- case "InvalidAddress":
425
- case "com.amazonaws.sqs#InvalidAddress":
426
- throw await de_InvalidAddressRes(parsedOutput, context);
427
- case "InvalidSecurity":
428
- case "com.amazonaws.sqs#InvalidSecurity":
429
- throw await de_InvalidSecurityRes(parsedOutput, context);
430
- case "OverLimit":
431
- case "com.amazonaws.sqs#OverLimit":
432
- throw await de_OverLimitRes(parsedOutput, context);
433
- case "QueueDoesNotExist":
434
- case "com.amazonaws.sqs#QueueDoesNotExist":
435
- case "AWS.SimpleQueueService.NonExistentQueue":
436
- throw await de_QueueDoesNotExistRes(parsedOutput, context);
437
- case "RequestThrottled":
438
- case "com.amazonaws.sqs#RequestThrottled":
439
- throw await de_RequestThrottledRes(parsedOutput, context);
440
- case "UnsupportedOperation":
441
- case "com.amazonaws.sqs#UnsupportedOperation":
442
- case "AWS.SimpleQueueService.UnsupportedOperation":
443
- throw await de_UnsupportedOperationRes(parsedOutput, context);
444
- case "ResourceNotFoundException":
445
- case "com.amazonaws.sqs#ResourceNotFoundException":
446
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
447
- case "MessageNotInflight":
448
- case "com.amazonaws.sqs#MessageNotInflight":
449
- case "AWS.SimpleQueueService.MessageNotInflight":
450
- throw await de_MessageNotInflightRes(parsedOutput, context);
451
- case "ReceiptHandleIsInvalid":
452
- case "com.amazonaws.sqs#ReceiptHandleIsInvalid":
453
- throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context);
454
- case "BatchEntryIdsNotDistinct":
455
- case "com.amazonaws.sqs#BatchEntryIdsNotDistinct":
456
- case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct":
457
- throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context);
458
- case "EmptyBatchRequest":
459
- case "com.amazonaws.sqs#EmptyBatchRequest":
460
- case "AWS.SimpleQueueService.EmptyBatchRequest":
461
- throw await de_EmptyBatchRequestRes(parsedOutput, context);
462
- case "InvalidBatchEntryId":
463
- case "com.amazonaws.sqs#InvalidBatchEntryId":
464
- case "AWS.SimpleQueueService.InvalidBatchEntryId":
465
- throw await de_InvalidBatchEntryIdRes(parsedOutput, context);
466
- case "TooManyEntriesInBatchRequest":
467
- case "com.amazonaws.sqs#TooManyEntriesInBatchRequest":
468
- case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest":
469
- throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context);
470
- case "InvalidAttributeName":
471
- case "com.amazonaws.sqs#InvalidAttributeName":
472
- throw await de_InvalidAttributeNameRes(parsedOutput, context);
473
- case "InvalidAttributeValue":
474
- case "com.amazonaws.sqs#InvalidAttributeValue":
475
- throw await de_InvalidAttributeValueRes(parsedOutput, context);
476
- case "QueueDeletedRecently":
477
- case "com.amazonaws.sqs#QueueDeletedRecently":
478
- case "AWS.SimpleQueueService.QueueDeletedRecently":
479
- throw await de_QueueDeletedRecentlyRes(parsedOutput, context);
480
- case "QueueNameExists":
481
- case "com.amazonaws.sqs#QueueNameExists":
482
- case "QueueAlreadyExists":
483
- throw await de_QueueNameExistsRes(parsedOutput, context);
484
- case "InvalidIdFormat":
485
- case "com.amazonaws.sqs#InvalidIdFormat":
486
- throw await de_InvalidIdFormatRes(parsedOutput, context);
487
- case "PurgeQueueInProgress":
488
- case "com.amazonaws.sqs#PurgeQueueInProgress":
489
- case "AWS.SimpleQueueService.PurgeQueueInProgress":
490
- throw await de_PurgeQueueInProgressRes(parsedOutput, context);
491
- case "KmsAccessDenied":
492
- case "com.amazonaws.sqs#KmsAccessDenied":
493
- case "KMS.AccessDeniedException":
494
- throw await de_KmsAccessDeniedRes(parsedOutput, context);
495
- case "KmsDisabled":
496
- case "com.amazonaws.sqs#KmsDisabled":
497
- case "KMS.DisabledException":
498
- throw await de_KmsDisabledRes(parsedOutput, context);
499
- case "KmsInvalidKeyUsage":
500
- case "com.amazonaws.sqs#KmsInvalidKeyUsage":
501
- case "KMS.InvalidKeyUsageException":
502
- throw await de_KmsInvalidKeyUsageRes(parsedOutput, context);
503
- case "KmsInvalidState":
504
- case "com.amazonaws.sqs#KmsInvalidState":
505
- case "KMS.InvalidStateException":
506
- throw await de_KmsInvalidStateRes(parsedOutput, context);
507
- case "KmsNotFound":
508
- case "com.amazonaws.sqs#KmsNotFound":
509
- case "KMS.NotFoundException":
510
- throw await de_KmsNotFoundRes(parsedOutput, context);
511
- case "KmsOptInRequired":
512
- case "com.amazonaws.sqs#KmsOptInRequired":
513
- case "KMS.OptInRequired":
514
- throw await de_KmsOptInRequiredRes(parsedOutput, context);
515
- case "KmsThrottled":
516
- case "com.amazonaws.sqs#KmsThrottled":
517
- case "KMS.ThrottlingException":
518
- throw await de_KmsThrottledRes(parsedOutput, context);
519
- case "InvalidMessageContents":
520
- case "com.amazonaws.sqs#InvalidMessageContents":
521
- throw await de_InvalidMessageContentsRes(parsedOutput, context);
522
- case "BatchRequestTooLong":
523
- case "com.amazonaws.sqs#BatchRequestTooLong":
524
- case "AWS.SimpleQueueService.BatchRequestTooLong":
525
- throw await de_BatchRequestTooLongRes(parsedOutput, context);
526
- default:
527
- const parsedBody = parsedOutput.body;
528
- return throwDefaultError({
529
- output,
530
- parsedBody,
531
- errorCode,
532
- });
533
- }
534
- };
535
- const de_BatchEntryIdsNotDistinctRes = async (parsedOutput, context) => {
536
- const body = parsedOutput.body;
537
- const deserialized = _json(body);
538
- const exception = new BatchEntryIdsNotDistinct({
539
- $metadata: deserializeMetadata(parsedOutput),
540
- ...deserialized,
541
- });
542
- return __decorateServiceException(exception, body);
543
- };
544
- const de_BatchRequestTooLongRes = async (parsedOutput, context) => {
545
- const body = parsedOutput.body;
546
- const deserialized = _json(body);
547
- const exception = new BatchRequestTooLong({
548
- $metadata: deserializeMetadata(parsedOutput),
549
- ...deserialized,
550
- });
551
- return __decorateServiceException(exception, body);
552
- };
553
- const de_EmptyBatchRequestRes = async (parsedOutput, context) => {
554
- const body = parsedOutput.body;
555
- const deserialized = _json(body);
556
- const exception = new EmptyBatchRequest({
557
- $metadata: deserializeMetadata(parsedOutput),
558
- ...deserialized,
559
- });
560
- return __decorateServiceException(exception, body);
561
- };
562
- const de_InvalidAddressRes = async (parsedOutput, context) => {
563
- const body = parsedOutput.body;
564
- const deserialized = _json(body);
565
- const exception = new InvalidAddress({
566
- $metadata: deserializeMetadata(parsedOutput),
567
- ...deserialized,
568
- });
569
- return __decorateServiceException(exception, body);
570
- };
571
- const de_InvalidAttributeNameRes = async (parsedOutput, context) => {
572
- const body = parsedOutput.body;
573
- const deserialized = _json(body);
574
- const exception = new InvalidAttributeName({
575
- $metadata: deserializeMetadata(parsedOutput),
576
- ...deserialized,
577
- });
578
- return __decorateServiceException(exception, body);
579
- };
580
- const de_InvalidAttributeValueRes = async (parsedOutput, context) => {
581
- const body = parsedOutput.body;
582
- const deserialized = _json(body);
583
- const exception = new InvalidAttributeValue({
584
- $metadata: deserializeMetadata(parsedOutput),
585
- ...deserialized,
586
- });
587
- return __decorateServiceException(exception, body);
588
- };
589
- const de_InvalidBatchEntryIdRes = async (parsedOutput, context) => {
590
- const body = parsedOutput.body;
591
- const deserialized = _json(body);
592
- const exception = new InvalidBatchEntryId({
593
- $metadata: deserializeMetadata(parsedOutput),
594
- ...deserialized,
595
- });
596
- return __decorateServiceException(exception, body);
597
- };
598
- const de_InvalidIdFormatRes = async (parsedOutput, context) => {
599
- const body = parsedOutput.body;
600
- const deserialized = _json(body);
601
- const exception = new InvalidIdFormat({
602
- $metadata: deserializeMetadata(parsedOutput),
603
- ...deserialized,
604
- });
605
- return __decorateServiceException(exception, body);
606
- };
607
- const de_InvalidMessageContentsRes = async (parsedOutput, context) => {
608
- const body = parsedOutput.body;
609
- const deserialized = _json(body);
610
- const exception = new InvalidMessageContents({
611
- $metadata: deserializeMetadata(parsedOutput),
612
- ...deserialized,
613
- });
614
- return __decorateServiceException(exception, body);
615
- };
616
- const de_InvalidSecurityRes = async (parsedOutput, context) => {
617
- const body = parsedOutput.body;
618
- const deserialized = _json(body);
619
- const exception = new InvalidSecurity({
620
- $metadata: deserializeMetadata(parsedOutput),
621
- ...deserialized,
622
- });
623
- return __decorateServiceException(exception, body);
624
- };
625
- const de_KmsAccessDeniedRes = async (parsedOutput, context) => {
626
- const body = parsedOutput.body;
627
- const deserialized = _json(body);
628
- const exception = new KmsAccessDenied({
629
- $metadata: deserializeMetadata(parsedOutput),
630
- ...deserialized,
631
- });
632
- return __decorateServiceException(exception, body);
633
- };
634
- const de_KmsDisabledRes = async (parsedOutput, context) => {
635
- const body = parsedOutput.body;
636
- const deserialized = _json(body);
637
- const exception = new KmsDisabled({
638
- $metadata: deserializeMetadata(parsedOutput),
639
- ...deserialized,
640
- });
641
- return __decorateServiceException(exception, body);
642
- };
643
- const de_KmsInvalidKeyUsageRes = async (parsedOutput, context) => {
644
- const body = parsedOutput.body;
645
- const deserialized = _json(body);
646
- const exception = new KmsInvalidKeyUsage({
647
- $metadata: deserializeMetadata(parsedOutput),
648
- ...deserialized,
649
- });
650
- return __decorateServiceException(exception, body);
651
- };
652
- const de_KmsInvalidStateRes = async (parsedOutput, context) => {
653
- const body = parsedOutput.body;
654
- const deserialized = _json(body);
655
- const exception = new KmsInvalidState({
656
- $metadata: deserializeMetadata(parsedOutput),
657
- ...deserialized,
658
- });
659
- return __decorateServiceException(exception, body);
660
- };
661
- const de_KmsNotFoundRes = async (parsedOutput, context) => {
662
- const body = parsedOutput.body;
663
- const deserialized = _json(body);
664
- const exception = new KmsNotFound({
665
- $metadata: deserializeMetadata(parsedOutput),
666
- ...deserialized,
667
- });
668
- return __decorateServiceException(exception, body);
669
- };
670
- const de_KmsOptInRequiredRes = async (parsedOutput, context) => {
671
- const body = parsedOutput.body;
672
- const deserialized = _json(body);
673
- const exception = new KmsOptInRequired({
674
- $metadata: deserializeMetadata(parsedOutput),
675
- ...deserialized,
676
- });
677
- return __decorateServiceException(exception, body);
678
- };
679
- const de_KmsThrottledRes = async (parsedOutput, context) => {
680
- const body = parsedOutput.body;
681
- const deserialized = _json(body);
682
- const exception = new KmsThrottled({
683
- $metadata: deserializeMetadata(parsedOutput),
684
- ...deserialized,
685
- });
686
- return __decorateServiceException(exception, body);
687
- };
688
- const de_MessageNotInflightRes = async (parsedOutput, context) => {
689
- const body = parsedOutput.body;
690
- const deserialized = _json(body);
691
- const exception = new MessageNotInflight({
692
- $metadata: deserializeMetadata(parsedOutput),
693
- ...deserialized,
694
- });
695
- return __decorateServiceException(exception, body);
696
- };
697
- const de_OverLimitRes = async (parsedOutput, context) => {
698
- const body = parsedOutput.body;
699
- const deserialized = _json(body);
700
- const exception = new OverLimit({
701
- $metadata: deserializeMetadata(parsedOutput),
702
- ...deserialized,
703
- });
704
- return __decorateServiceException(exception, body);
705
- };
706
- const de_PurgeQueueInProgressRes = async (parsedOutput, context) => {
707
- const body = parsedOutput.body;
708
- const deserialized = _json(body);
709
- const exception = new PurgeQueueInProgress({
710
- $metadata: deserializeMetadata(parsedOutput),
711
- ...deserialized,
712
- });
713
- return __decorateServiceException(exception, body);
714
- };
715
- const de_QueueDeletedRecentlyRes = async (parsedOutput, context) => {
716
- const body = parsedOutput.body;
717
- const deserialized = _json(body);
718
- const exception = new QueueDeletedRecently({
719
- $metadata: deserializeMetadata(parsedOutput),
720
- ...deserialized,
721
- });
722
- return __decorateServiceException(exception, body);
723
- };
724
- const de_QueueDoesNotExistRes = async (parsedOutput, context) => {
725
- const body = parsedOutput.body;
726
- const deserialized = _json(body);
727
- const exception = new QueueDoesNotExist({
728
- $metadata: deserializeMetadata(parsedOutput),
729
- ...deserialized,
730
- });
731
- return __decorateServiceException(exception, body);
732
- };
733
- const de_QueueNameExistsRes = async (parsedOutput, context) => {
734
- const body = parsedOutput.body;
735
- const deserialized = _json(body);
736
- const exception = new QueueNameExists({
737
- $metadata: deserializeMetadata(parsedOutput),
738
- ...deserialized,
739
- });
740
- return __decorateServiceException(exception, body);
741
- };
742
- const de_ReceiptHandleIsInvalidRes = async (parsedOutput, context) => {
743
- const body = parsedOutput.body;
744
- const deserialized = _json(body);
745
- const exception = new ReceiptHandleIsInvalid({
746
- $metadata: deserializeMetadata(parsedOutput),
747
- ...deserialized,
748
- });
749
- return __decorateServiceException(exception, body);
750
- };
751
- const de_RequestThrottledRes = async (parsedOutput, context) => {
752
- const body = parsedOutput.body;
753
- const deserialized = _json(body);
754
- const exception = new RequestThrottled({
755
- $metadata: deserializeMetadata(parsedOutput),
756
- ...deserialized,
757
- });
758
- return __decorateServiceException(exception, body);
759
- };
760
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
761
- const body = parsedOutput.body;
762
- const deserialized = _json(body);
763
- const exception = new ResourceNotFoundException({
764
- $metadata: deserializeMetadata(parsedOutput),
765
- ...deserialized,
766
- });
767
- return __decorateServiceException(exception, body);
768
- };
769
- const de_TooManyEntriesInBatchRequestRes = async (parsedOutput, context) => {
770
- const body = parsedOutput.body;
771
- const deserialized = _json(body);
772
- const exception = new TooManyEntriesInBatchRequest({
773
- $metadata: deserializeMetadata(parsedOutput),
774
- ...deserialized,
775
- });
776
- return __decorateServiceException(exception, body);
777
- };
778
- const de_UnsupportedOperationRes = async (parsedOutput, context) => {
779
- const body = parsedOutput.body;
780
- const deserialized = _json(body);
781
- const exception = new UnsupportedOperation({
782
- $metadata: deserializeMetadata(parsedOutput),
783
- ...deserialized,
784
- });
785
- return __decorateServiceException(exception, body);
786
- };
787
- const se_ActionNameList = (input, context) => {
788
- return input
789
- .filter((e) => e != null)
790
- .map((entry) => {
791
- return _toStr(entry);
792
- });
793
- };
794
- const se_AddPermissionRequest = (input, context) => {
795
- return take(input, {
796
- AWSAccountIds: (_) => se_AWSAccountIdList(_, context),
797
- Actions: (_) => se_ActionNameList(_, context),
798
- Label: _toStr,
799
- QueueUrl: _toStr,
800
- });
801
- };
802
- const se_AttributeNameList = (input, context) => {
803
- return input
804
- .filter((e) => e != null)
805
- .map((entry) => {
806
- return _toStr(entry);
807
- });
808
- };
809
- const se_AWSAccountIdList = (input, context) => {
810
- return input
811
- .filter((e) => e != null)
812
- .map((entry) => {
813
- return _toStr(entry);
814
- });
815
- };
816
- const se_BinaryList = (input, context) => {
817
- return input
818
- .filter((e) => e != null)
819
- .map((entry) => {
820
- return context.base64Encoder(entry);
821
- });
822
- };
823
- const se_CancelMessageMoveTaskRequest = (input, context) => {
824
- return take(input, {
825
- TaskHandle: _toStr,
826
- });
827
- };
828
- const se_ChangeMessageVisibilityBatchRequest = (input, context) => {
829
- return take(input, {
830
- Entries: (_) => se_ChangeMessageVisibilityBatchRequestEntryList(_, context),
831
- QueueUrl: _toStr,
832
- });
833
- };
834
- const se_ChangeMessageVisibilityBatchRequestEntry = (input, context) => {
835
- return take(input, {
836
- Id: _toStr,
837
- ReceiptHandle: _toStr,
838
- VisibilityTimeout: _toNum,
839
- });
840
- };
841
- const se_ChangeMessageVisibilityBatchRequestEntryList = (input, context) => {
842
- return input
843
- .filter((e) => e != null)
844
- .map((entry) => {
845
- return se_ChangeMessageVisibilityBatchRequestEntry(entry, context);
846
- });
847
- };
848
- const se_ChangeMessageVisibilityRequest = (input, context) => {
849
- return take(input, {
850
- QueueUrl: _toStr,
851
- ReceiptHandle: _toStr,
852
- VisibilityTimeout: _toNum,
853
- });
854
- };
855
- const se_CreateQueueRequest = (input, context) => {
856
- return take(input, {
857
- Attributes: (_) => se_QueueAttributeMap(_, context),
858
- QueueName: _toStr,
859
- tags: (_) => se_TagMap(_, context),
860
- });
861
- };
862
- const se_DeleteMessageBatchRequest = (input, context) => {
863
- return take(input, {
864
- Entries: (_) => se_DeleteMessageBatchRequestEntryList(_, context),
865
- QueueUrl: _toStr,
866
- });
867
- };
868
- const se_DeleteMessageBatchRequestEntry = (input, context) => {
869
- return take(input, {
870
- Id: _toStr,
871
- ReceiptHandle: _toStr,
872
- });
873
- };
874
- const se_DeleteMessageBatchRequestEntryList = (input, context) => {
875
- return input
876
- .filter((e) => e != null)
877
- .map((entry) => {
878
- return se_DeleteMessageBatchRequestEntry(entry, context);
879
- });
880
- };
881
- const se_DeleteMessageRequest = (input, context) => {
882
- return take(input, {
883
- QueueUrl: _toStr,
884
- ReceiptHandle: _toStr,
885
- });
886
- };
887
- const se_DeleteQueueRequest = (input, context) => {
888
- return take(input, {
889
- QueueUrl: _toStr,
890
- });
891
- };
892
- const se_GetQueueAttributesRequest = (input, context) => {
893
- return take(input, {
894
- AttributeNames: (_) => se_AttributeNameList(_, context),
895
- QueueUrl: _toStr,
896
- });
897
- };
898
- const se_GetQueueUrlRequest = (input, context) => {
899
- return take(input, {
900
- QueueName: _toStr,
901
- QueueOwnerAWSAccountId: _toStr,
902
- });
903
- };
904
- const se_ListDeadLetterSourceQueuesRequest = (input, context) => {
905
- return take(input, {
906
- MaxResults: _toNum,
907
- NextToken: _toStr,
908
- QueueUrl: _toStr,
909
- });
910
- };
911
- const se_ListMessageMoveTasksRequest = (input, context) => {
912
- return take(input, {
913
- MaxResults: _toNum,
914
- SourceArn: _toStr,
915
- });
916
- };
917
- const se_ListQueuesRequest = (input, context) => {
918
- return take(input, {
919
- MaxResults: _toNum,
920
- NextToken: _toStr,
921
- QueueNamePrefix: _toStr,
922
- });
923
- };
924
- const se_ListQueueTagsRequest = (input, context) => {
925
- return take(input, {
926
- QueueUrl: _toStr,
927
- });
928
- };
929
- const se_MessageAttributeNameList = (input, context) => {
930
- return input
931
- .filter((e) => e != null)
932
- .map((entry) => {
933
- return _toStr(entry);
934
- });
935
- };
936
- const se_MessageAttributeValue = (input, context) => {
937
- return take(input, {
938
- BinaryListValues: (_) => se_BinaryList(_, context),
939
- BinaryValue: context.base64Encoder,
940
- DataType: _toStr,
941
- StringListValues: (_) => se_StringList(_, context),
942
- StringValue: _toStr,
943
- });
944
- };
945
- const se_MessageBodyAttributeMap = (input, context) => {
946
- return Object.entries(input).reduce((acc, [key, value]) => {
947
- if (value === null) {
948
- return acc;
949
- }
950
- acc[key] = se_MessageAttributeValue(value, context);
951
- return acc;
952
- }, {});
953
- };
954
- const se_MessageBodySystemAttributeMap = (input, context) => {
955
- return Object.entries(input).reduce((acc, [key, value]) => {
956
- if (value === null) {
957
- return acc;
958
- }
959
- acc[key] = se_MessageSystemAttributeValue(value, context);
960
- return acc;
961
- }, {});
962
- };
963
- const se_MessageSystemAttributeList = (input, context) => {
964
- return input
965
- .filter((e) => e != null)
966
- .map((entry) => {
967
- return _toStr(entry);
968
- });
969
- };
970
- const se_MessageSystemAttributeValue = (input, context) => {
971
- return take(input, {
972
- BinaryListValues: (_) => se_BinaryList(_, context),
973
- BinaryValue: context.base64Encoder,
974
- DataType: _toStr,
975
- StringListValues: (_) => se_StringList(_, context),
976
- StringValue: _toStr,
977
- });
978
- };
979
- const se_PurgeQueueRequest = (input, context) => {
980
- return take(input, {
981
- QueueUrl: _toStr,
982
- });
983
- };
984
- const se_QueueAttributeMap = (input, context) => {
985
- return Object.entries(input).reduce((acc, [key, value]) => {
986
- if (value === null) {
987
- return acc;
988
- }
989
- acc[key] = _toStr(value);
990
- return acc;
991
- }, {});
992
- };
993
- const se_ReceiveMessageRequest = (input, context) => {
994
- return take(input, {
995
- AttributeNames: (_) => se_AttributeNameList(_, context),
996
- MaxNumberOfMessages: _toNum,
997
- MessageAttributeNames: (_) => se_MessageAttributeNameList(_, context),
998
- MessageSystemAttributeNames: (_) => se_MessageSystemAttributeList(_, context),
999
- QueueUrl: _toStr,
1000
- ReceiveRequestAttemptId: _toStr,
1001
- VisibilityTimeout: _toNum,
1002
- WaitTimeSeconds: _toNum,
1003
- });
1004
- };
1005
- const se_RemovePermissionRequest = (input, context) => {
1006
- return take(input, {
1007
- Label: _toStr,
1008
- QueueUrl: _toStr,
1009
- });
1010
- };
1011
- const se_SendMessageBatchRequest = (input, context) => {
1012
- return take(input, {
1013
- Entries: (_) => se_SendMessageBatchRequestEntryList(_, context),
1014
- QueueUrl: _toStr,
1015
- });
1016
- };
1017
- const se_SendMessageBatchRequestEntry = (input, context) => {
1018
- return take(input, {
1019
- DelaySeconds: _toNum,
1020
- Id: _toStr,
1021
- MessageAttributes: (_) => se_MessageBodyAttributeMap(_, context),
1022
- MessageBody: _toStr,
1023
- MessageDeduplicationId: _toStr,
1024
- MessageGroupId: _toStr,
1025
- MessageSystemAttributes: (_) => se_MessageBodySystemAttributeMap(_, context),
1026
- });
1027
- };
1028
- const se_SendMessageBatchRequestEntryList = (input, context) => {
1029
- return input
1030
- .filter((e) => e != null)
1031
- .map((entry) => {
1032
- return se_SendMessageBatchRequestEntry(entry, context);
1033
- });
1034
- };
1035
- const se_SendMessageRequest = (input, context) => {
1036
- return take(input, {
1037
- DelaySeconds: _toNum,
1038
- MessageAttributes: (_) => se_MessageBodyAttributeMap(_, context),
1039
- MessageBody: _toStr,
1040
- MessageDeduplicationId: _toStr,
1041
- MessageGroupId: _toStr,
1042
- MessageSystemAttributes: (_) => se_MessageBodySystemAttributeMap(_, context),
1043
- QueueUrl: _toStr,
1044
- });
1045
- };
1046
- const se_SetQueueAttributesRequest = (input, context) => {
1047
- return take(input, {
1048
- Attributes: (_) => se_QueueAttributeMap(_, context),
1049
- QueueUrl: _toStr,
1050
- });
1051
- };
1052
- const se_StartMessageMoveTaskRequest = (input, context) => {
1053
- return take(input, {
1054
- DestinationArn: _toStr,
1055
- MaxNumberOfMessagesPerSecond: _toNum,
1056
- SourceArn: _toStr,
1057
- });
1058
- };
1059
- const se_StringList = (input, context) => {
1060
- return input
1061
- .filter((e) => e != null)
1062
- .map((entry) => {
1063
- return _toStr(entry);
1064
- });
1065
- };
1066
- const se_TagKeyList = (input, context) => {
1067
- return input
1068
- .filter((e) => e != null)
1069
- .map((entry) => {
1070
- return _toStr(entry);
1071
- });
1072
- };
1073
- const se_TagMap = (input, context) => {
1074
- return Object.entries(input).reduce((acc, [key, value]) => {
1075
- if (value === null) {
1076
- return acc;
1077
- }
1078
- acc[key] = _toStr(value);
1079
- return acc;
1080
- }, {});
1081
- };
1082
- const se_TagQueueRequest = (input, context) => {
1083
- return take(input, {
1084
- QueueUrl: _toStr,
1085
- Tags: (_) => se_TagMap(_, context),
1086
- });
1087
- };
1088
- const se_UntagQueueRequest = (input, context) => {
1089
- return take(input, {
1090
- QueueUrl: _toStr,
1091
- TagKeys: (_) => se_TagKeyList(_, context),
1092
- });
1093
- };
1094
- const de_BinaryList = (output, context) => {
1095
- const retVal = (output || [])
1096
- .filter((e) => e != null)
1097
- .map((entry) => {
1098
- return context.base64Decoder(entry);
1099
- });
1100
- return retVal;
1101
- };
1102
- const de_Message = (output, context) => {
1103
- return take(output, {
1104
- Attributes: _json,
1105
- Body: __expectString,
1106
- MD5OfBody: __expectString,
1107
- MD5OfMessageAttributes: __expectString,
1108
- MessageAttributes: (_) => de_MessageBodyAttributeMap(_, context),
1109
- MessageId: __expectString,
1110
- ReceiptHandle: __expectString,
1111
- });
1112
- };
1113
- const de_MessageAttributeValue = (output, context) => {
1114
- return take(output, {
1115
- BinaryListValues: (_) => de_BinaryList(_, context),
1116
- BinaryValue: context.base64Decoder,
1117
- DataType: __expectString,
1118
- StringListValues: _json,
1119
- StringValue: __expectString,
1120
- });
1121
- };
1122
- const de_MessageBodyAttributeMap = (output, context) => {
1123
- return Object.entries(output).reduce((acc, [key, value]) => {
1124
- if (value === null) {
1125
- return acc;
1126
- }
1127
- acc[key] = de_MessageAttributeValue(value, context);
1128
- return acc;
1129
- }, {});
1130
- };
1131
- const de_MessageList = (output, context) => {
1132
- const retVal = (output || [])
1133
- .filter((e) => e != null)
1134
- .map((entry) => {
1135
- return de_Message(entry, context);
1136
- });
1137
- return retVal;
1138
- };
1139
- const de_ReceiveMessageResult = (output, context) => {
1140
- return take(output, {
1141
- Messages: (_) => de_MessageList(_, context),
1142
- });
1143
- };
1144
- const deserializeMetadata = (output) => ({
1145
- httpStatusCode: output.statusCode,
1146
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1147
- extendedRequestId: output.headers["x-amz-id-2"],
1148
- cfId: output.headers["x-amz-cf-id"],
1149
- });
1150
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1151
- const throwDefaultError = withBaseException(__BaseException);
1152
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1153
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1154
- const contents = {
1155
- protocol,
1156
- hostname,
1157
- port,
1158
- method: "POST",
1159
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1160
- headers,
1161
- };
1162
- if (resolvedHostname !== undefined) {
1163
- contents.hostname = resolvedHostname;
1164
- }
1165
- if (body !== undefined) {
1166
- contents.body = body;
1167
- }
1168
- return new __HttpRequest(contents);
1169
- };
1170
- function sharedHeaders(operation) {
1171
- return {
1172
- "content-type": "application/x-amz-json-1.0",
1173
- "x-amz-target": `AmazonSQS.${operation}`,
1174
- "x-amzn-query-mode": "true",
1175
- };
1176
- }
1177
- const populateBodyWithQueryCompatibility = (parsedOutput, headers) => {
1178
- const queryErrorHeader = headers["x-amzn-query-error"];
1179
- if (parsedOutput.body !== undefined && queryErrorHeader != null) {
1180
- const [Code, Type] = queryErrorHeader.split(";");
1181
- const entries = Object.entries(parsedOutput.body);
1182
- const Error = {
1183
- Type,
1184
- Code,
1185
- };
1186
- Object.assign(parsedOutput.body, Error);
1187
- for (const [k, v] of entries) {
1188
- Error[k] = v;
1189
- }
1190
- delete Error.__type;
1191
- parsedOutput.body.Error = Error;
1192
- }
1193
- };