@aws-sdk/client-sqs 3.141.0 → 3.142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read, __values } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { decodeHTML } from "entities";
5
5
  import { parse as xmlParse } from "fast-xml-parser";
6
6
  import { BatchEntryIdsNotDistinct, BatchRequestTooLong, EmptyBatchRequest, InvalidAttributeName, InvalidBatchEntryId, InvalidIdFormat, InvalidMessageContents, MessageNotInflight, OverLimit, PurgeQueueInProgress, QueueDeletedRecently, QueueDoesNotExist, QueueNameExists, ReceiptHandleIsInvalid, TooManyEntriesInBatchRequest, UnsupportedOperation, } from "../models/models_0";
@@ -224,7 +224,7 @@ export var deserializeAws_queryAddPermissionCommand = function (output, context)
224
224
  });
225
225
  }); };
226
226
  var deserializeAws_queryAddPermissionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
227
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
227
+ var parsedOutput, _a, errorCode, _b, parsedBody;
228
228
  var _c;
229
229
  return __generator(this, function (_d) {
230
230
  switch (_d.label) {
@@ -245,14 +245,14 @@ var deserializeAws_queryAddPermissionCommandError = function (output, context) {
245
245
  case 3: throw _d.sent();
246
246
  case 4:
247
247
  parsedBody = parsedOutput.body;
248
- $metadata = deserializeMetadata(output);
249
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
250
- response = new __BaseException({
251
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
252
- $fault: "client",
253
- $metadata: $metadata,
248
+ throwDefaultError({
249
+ output: output,
250
+ parsedBody: parsedBody.Error,
251
+ exceptionCtor: __BaseException,
252
+ errorCode: errorCode,
254
253
  });
255
- throw __decorateServiceException(response, parsedBody.Error);
254
+ _d.label = 5;
255
+ case 5: return [2];
256
256
  }
257
257
  });
258
258
  }); };
@@ -275,7 +275,7 @@ export var deserializeAws_queryChangeMessageVisibilityCommand = function (output
275
275
  });
276
276
  }); };
277
277
  var deserializeAws_queryChangeMessageVisibilityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
278
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
278
+ var parsedOutput, _a, errorCode, _b, parsedBody;
279
279
  var _c;
280
280
  return __generator(this, function (_d) {
281
281
  switch (_d.label) {
@@ -300,14 +300,14 @@ var deserializeAws_queryChangeMessageVisibilityCommandError = function (output,
300
300
  case 5: throw _d.sent();
301
301
  case 6:
302
302
  parsedBody = parsedOutput.body;
303
- $metadata = deserializeMetadata(output);
304
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
305
- response = new __BaseException({
306
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
307
- $fault: "client",
308
- $metadata: $metadata,
303
+ throwDefaultError({
304
+ output: output,
305
+ parsedBody: parsedBody.Error,
306
+ exceptionCtor: __BaseException,
307
+ errorCode: errorCode,
309
308
  });
310
- throw __decorateServiceException(response, parsedBody.Error);
309
+ _d.label = 7;
310
+ case 7: return [2];
311
311
  }
312
312
  });
313
313
  }); };
@@ -330,7 +330,7 @@ export var deserializeAws_queryChangeMessageVisibilityBatchCommand = function (o
330
330
  });
331
331
  }); };
332
332
  var deserializeAws_queryChangeMessageVisibilityBatchCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
333
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
333
+ var parsedOutput, _a, errorCode, _b, parsedBody;
334
334
  var _c;
335
335
  return __generator(this, function (_d) {
336
336
  switch (_d.label) {
@@ -363,14 +363,14 @@ var deserializeAws_queryChangeMessageVisibilityBatchCommandError = function (out
363
363
  case 9: throw _d.sent();
364
364
  case 10:
365
365
  parsedBody = parsedOutput.body;
366
- $metadata = deserializeMetadata(output);
367
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
368
- response = new __BaseException({
369
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
370
- $fault: "client",
371
- $metadata: $metadata,
366
+ throwDefaultError({
367
+ output: output,
368
+ parsedBody: parsedBody.Error,
369
+ exceptionCtor: __BaseException,
370
+ errorCode: errorCode,
372
371
  });
373
- throw __decorateServiceException(response, parsedBody.Error);
372
+ _d.label = 11;
373
+ case 11: return [2];
374
374
  }
375
375
  });
376
376
  }); };
@@ -393,7 +393,7 @@ export var deserializeAws_queryCreateQueueCommand = function (output, context) {
393
393
  });
394
394
  }); };
395
395
  var deserializeAws_queryCreateQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
396
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
396
+ var parsedOutput, _a, errorCode, _b, parsedBody;
397
397
  var _c;
398
398
  return __generator(this, function (_d) {
399
399
  switch (_d.label) {
@@ -418,14 +418,14 @@ var deserializeAws_queryCreateQueueCommandError = function (output, context) { r
418
418
  case 5: throw _d.sent();
419
419
  case 6:
420
420
  parsedBody = parsedOutput.body;
421
- $metadata = deserializeMetadata(output);
422
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
423
- response = new __BaseException({
424
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
425
- $fault: "client",
426
- $metadata: $metadata,
421
+ throwDefaultError({
422
+ output: output,
423
+ parsedBody: parsedBody.Error,
424
+ exceptionCtor: __BaseException,
425
+ errorCode: errorCode,
427
426
  });
428
- throw __decorateServiceException(response, parsedBody.Error);
427
+ _d.label = 7;
428
+ case 7: return [2];
429
429
  }
430
430
  });
431
431
  }); };
@@ -448,7 +448,7 @@ export var deserializeAws_queryDeleteMessageCommand = function (output, context)
448
448
  });
449
449
  }); };
450
450
  var deserializeAws_queryDeleteMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
451
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
451
+ var parsedOutput, _a, errorCode, _b, parsedBody;
452
452
  var _c;
453
453
  return __generator(this, function (_d) {
454
454
  switch (_d.label) {
@@ -473,14 +473,14 @@ var deserializeAws_queryDeleteMessageCommandError = function (output, context) {
473
473
  case 5: throw _d.sent();
474
474
  case 6:
475
475
  parsedBody = parsedOutput.body;
476
- $metadata = deserializeMetadata(output);
477
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
478
- response = new __BaseException({
479
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
480
- $fault: "client",
481
- $metadata: $metadata,
476
+ throwDefaultError({
477
+ output: output,
478
+ parsedBody: parsedBody.Error,
479
+ exceptionCtor: __BaseException,
480
+ errorCode: errorCode,
482
481
  });
483
- throw __decorateServiceException(response, parsedBody.Error);
482
+ _d.label = 7;
483
+ case 7: return [2];
484
484
  }
485
485
  });
486
486
  }); };
@@ -503,7 +503,7 @@ export var deserializeAws_queryDeleteMessageBatchCommand = function (output, con
503
503
  });
504
504
  }); };
505
505
  var deserializeAws_queryDeleteMessageBatchCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
506
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
506
+ var parsedOutput, _a, errorCode, _b, parsedBody;
507
507
  var _c;
508
508
  return __generator(this, function (_d) {
509
509
  switch (_d.label) {
@@ -536,14 +536,14 @@ var deserializeAws_queryDeleteMessageBatchCommandError = function (output, conte
536
536
  case 9: throw _d.sent();
537
537
  case 10:
538
538
  parsedBody = parsedOutput.body;
539
- $metadata = deserializeMetadata(output);
540
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
541
- response = new __BaseException({
542
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
543
- $fault: "client",
544
- $metadata: $metadata,
539
+ throwDefaultError({
540
+ output: output,
541
+ parsedBody: parsedBody.Error,
542
+ exceptionCtor: __BaseException,
543
+ errorCode: errorCode,
545
544
  });
546
- throw __decorateServiceException(response, parsedBody.Error);
545
+ _d.label = 11;
546
+ case 11: return [2];
547
547
  }
548
548
  });
549
549
  }); };
@@ -566,7 +566,7 @@ export var deserializeAws_queryDeleteQueueCommand = function (output, context) {
566
566
  });
567
567
  }); };
568
568
  var deserializeAws_queryDeleteQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
569
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
569
+ var parsedOutput, _a, errorCode, parsedBody;
570
570
  var _b;
571
571
  return __generator(this, function (_c) {
572
572
  switch (_c.label) {
@@ -577,18 +577,13 @@ var deserializeAws_queryDeleteQueueCommandError = function (output, context) { r
577
577
  case 1:
578
578
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
579
579
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
580
- switch (errorCode) {
581
- default:
582
- parsedBody = parsedOutput.body;
583
- $metadata = deserializeMetadata(output);
584
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
585
- response = new __BaseException({
586
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
587
- $fault: "client",
588
- $metadata: $metadata,
589
- });
590
- throw __decorateServiceException(response, parsedBody.Error);
591
- }
580
+ parsedBody = parsedOutput.body;
581
+ throwDefaultError({
582
+ output: output,
583
+ parsedBody: parsedBody.Error,
584
+ exceptionCtor: __BaseException,
585
+ errorCode: errorCode,
586
+ });
592
587
  return [2];
593
588
  }
594
589
  });
@@ -612,7 +607,7 @@ export var deserializeAws_queryGetQueueAttributesCommand = function (output, con
612
607
  });
613
608
  }); };
614
609
  var deserializeAws_queryGetQueueAttributesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
615
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
610
+ var parsedOutput, _a, errorCode, _b, parsedBody;
616
611
  var _c;
617
612
  return __generator(this, function (_d) {
618
613
  switch (_d.label) {
@@ -633,14 +628,14 @@ var deserializeAws_queryGetQueueAttributesCommandError = function (output, conte
633
628
  case 3: throw _d.sent();
634
629
  case 4:
635
630
  parsedBody = parsedOutput.body;
636
- $metadata = deserializeMetadata(output);
637
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
638
- response = new __BaseException({
639
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
640
- $fault: "client",
641
- $metadata: $metadata,
631
+ throwDefaultError({
632
+ output: output,
633
+ parsedBody: parsedBody.Error,
634
+ exceptionCtor: __BaseException,
635
+ errorCode: errorCode,
642
636
  });
643
- throw __decorateServiceException(response, parsedBody.Error);
637
+ _d.label = 5;
638
+ case 5: return [2];
644
639
  }
645
640
  });
646
641
  }); };
@@ -663,7 +658,7 @@ export var deserializeAws_queryGetQueueUrlCommand = function (output, context) {
663
658
  });
664
659
  }); };
665
660
  var deserializeAws_queryGetQueueUrlCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
666
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
661
+ var parsedOutput, _a, errorCode, _b, parsedBody;
667
662
  var _c;
668
663
  return __generator(this, function (_d) {
669
664
  switch (_d.label) {
@@ -684,14 +679,14 @@ var deserializeAws_queryGetQueueUrlCommandError = function (output, context) { r
684
679
  case 3: throw _d.sent();
685
680
  case 4:
686
681
  parsedBody = parsedOutput.body;
687
- $metadata = deserializeMetadata(output);
688
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
689
- response = new __BaseException({
690
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
691
- $fault: "client",
692
- $metadata: $metadata,
682
+ throwDefaultError({
683
+ output: output,
684
+ parsedBody: parsedBody.Error,
685
+ exceptionCtor: __BaseException,
686
+ errorCode: errorCode,
693
687
  });
694
- throw __decorateServiceException(response, parsedBody.Error);
688
+ _d.label = 5;
689
+ case 5: return [2];
695
690
  }
696
691
  });
697
692
  }); };
@@ -714,7 +709,7 @@ export var deserializeAws_queryListDeadLetterSourceQueuesCommand = function (out
714
709
  });
715
710
  }); };
716
711
  var deserializeAws_queryListDeadLetterSourceQueuesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
717
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
712
+ var parsedOutput, _a, errorCode, _b, parsedBody;
718
713
  var _c;
719
714
  return __generator(this, function (_d) {
720
715
  switch (_d.label) {
@@ -735,14 +730,14 @@ var deserializeAws_queryListDeadLetterSourceQueuesCommandError = function (outpu
735
730
  case 3: throw _d.sent();
736
731
  case 4:
737
732
  parsedBody = parsedOutput.body;
738
- $metadata = deserializeMetadata(output);
739
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
740
- response = new __BaseException({
741
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
742
- $fault: "client",
743
- $metadata: $metadata,
733
+ throwDefaultError({
734
+ output: output,
735
+ parsedBody: parsedBody.Error,
736
+ exceptionCtor: __BaseException,
737
+ errorCode: errorCode,
744
738
  });
745
- throw __decorateServiceException(response, parsedBody.Error);
739
+ _d.label = 5;
740
+ case 5: return [2];
746
741
  }
747
742
  });
748
743
  }); };
@@ -765,7 +760,7 @@ export var deserializeAws_queryListQueuesCommand = function (output, context) {
765
760
  });
766
761
  }); };
767
762
  var deserializeAws_queryListQueuesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
768
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
763
+ var parsedOutput, _a, errorCode, parsedBody;
769
764
  var _b;
770
765
  return __generator(this, function (_c) {
771
766
  switch (_c.label) {
@@ -776,18 +771,13 @@ var deserializeAws_queryListQueuesCommandError = function (output, context) { re
776
771
  case 1:
777
772
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
778
773
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
779
- switch (errorCode) {
780
- default:
781
- parsedBody = parsedOutput.body;
782
- $metadata = deserializeMetadata(output);
783
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
784
- response = new __BaseException({
785
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
786
- $fault: "client",
787
- $metadata: $metadata,
788
- });
789
- throw __decorateServiceException(response, parsedBody.Error);
790
- }
774
+ parsedBody = parsedOutput.body;
775
+ throwDefaultError({
776
+ output: output,
777
+ parsedBody: parsedBody.Error,
778
+ exceptionCtor: __BaseException,
779
+ errorCode: errorCode,
780
+ });
791
781
  return [2];
792
782
  }
793
783
  });
@@ -811,7 +801,7 @@ export var deserializeAws_queryListQueueTagsCommand = function (output, context)
811
801
  });
812
802
  }); };
813
803
  var deserializeAws_queryListQueueTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
814
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
804
+ var parsedOutput, _a, errorCode, parsedBody;
815
805
  var _b;
816
806
  return __generator(this, function (_c) {
817
807
  switch (_c.label) {
@@ -822,18 +812,13 @@ var deserializeAws_queryListQueueTagsCommandError = function (output, context) {
822
812
  case 1:
823
813
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
824
814
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
825
- switch (errorCode) {
826
- default:
827
- parsedBody = parsedOutput.body;
828
- $metadata = deserializeMetadata(output);
829
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
830
- response = new __BaseException({
831
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
832
- $fault: "client",
833
- $metadata: $metadata,
834
- });
835
- throw __decorateServiceException(response, parsedBody.Error);
836
- }
815
+ parsedBody = parsedOutput.body;
816
+ throwDefaultError({
817
+ output: output,
818
+ parsedBody: parsedBody.Error,
819
+ exceptionCtor: __BaseException,
820
+ errorCode: errorCode,
821
+ });
837
822
  return [2];
838
823
  }
839
824
  });
@@ -857,7 +842,7 @@ export var deserializeAws_queryPurgeQueueCommand = function (output, context) {
857
842
  });
858
843
  }); };
859
844
  var deserializeAws_queryPurgeQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
860
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
845
+ var parsedOutput, _a, errorCode, _b, parsedBody;
861
846
  var _c;
862
847
  return __generator(this, function (_d) {
863
848
  switch (_d.label) {
@@ -882,14 +867,14 @@ var deserializeAws_queryPurgeQueueCommandError = function (output, context) { re
882
867
  case 5: throw _d.sent();
883
868
  case 6:
884
869
  parsedBody = parsedOutput.body;
885
- $metadata = deserializeMetadata(output);
886
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
887
- response = new __BaseException({
888
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
889
- $fault: "client",
890
- $metadata: $metadata,
870
+ throwDefaultError({
871
+ output: output,
872
+ parsedBody: parsedBody.Error,
873
+ exceptionCtor: __BaseException,
874
+ errorCode: errorCode,
891
875
  });
892
- throw __decorateServiceException(response, parsedBody.Error);
876
+ _d.label = 7;
877
+ case 7: return [2];
893
878
  }
894
879
  });
895
880
  }); };
@@ -912,7 +897,7 @@ export var deserializeAws_queryReceiveMessageCommand = function (output, context
912
897
  });
913
898
  }); };
914
899
  var deserializeAws_queryReceiveMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
915
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
900
+ var parsedOutput, _a, errorCode, _b, parsedBody;
916
901
  var _c;
917
902
  return __generator(this, function (_d) {
918
903
  switch (_d.label) {
@@ -933,14 +918,14 @@ var deserializeAws_queryReceiveMessageCommandError = function (output, context)
933
918
  case 3: throw _d.sent();
934
919
  case 4:
935
920
  parsedBody = parsedOutput.body;
936
- $metadata = deserializeMetadata(output);
937
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
938
- response = new __BaseException({
939
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
940
- $fault: "client",
941
- $metadata: $metadata,
921
+ throwDefaultError({
922
+ output: output,
923
+ parsedBody: parsedBody.Error,
924
+ exceptionCtor: __BaseException,
925
+ errorCode: errorCode,
942
926
  });
943
- throw __decorateServiceException(response, parsedBody.Error);
927
+ _d.label = 5;
928
+ case 5: return [2];
944
929
  }
945
930
  });
946
931
  }); };
@@ -963,7 +948,7 @@ export var deserializeAws_queryRemovePermissionCommand = function (output, conte
963
948
  });
964
949
  }); };
965
950
  var deserializeAws_queryRemovePermissionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
966
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
951
+ var parsedOutput, _a, errorCode, parsedBody;
967
952
  var _b;
968
953
  return __generator(this, function (_c) {
969
954
  switch (_c.label) {
@@ -974,18 +959,13 @@ var deserializeAws_queryRemovePermissionCommandError = function (output, context
974
959
  case 1:
975
960
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
976
961
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
977
- switch (errorCode) {
978
- default:
979
- parsedBody = parsedOutput.body;
980
- $metadata = deserializeMetadata(output);
981
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
982
- response = new __BaseException({
983
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
984
- $fault: "client",
985
- $metadata: $metadata,
986
- });
987
- throw __decorateServiceException(response, parsedBody.Error);
988
- }
962
+ parsedBody = parsedOutput.body;
963
+ throwDefaultError({
964
+ output: output,
965
+ parsedBody: parsedBody.Error,
966
+ exceptionCtor: __BaseException,
967
+ errorCode: errorCode,
968
+ });
989
969
  return [2];
990
970
  }
991
971
  });
@@ -1009,7 +989,7 @@ export var deserializeAws_querySendMessageCommand = function (output, context) {
1009
989
  });
1010
990
  }); };
1011
991
  var deserializeAws_querySendMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1012
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
992
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1013
993
  var _c;
1014
994
  return __generator(this, function (_d) {
1015
995
  switch (_d.label) {
@@ -1034,14 +1014,14 @@ var deserializeAws_querySendMessageCommandError = function (output, context) { r
1034
1014
  case 5: throw _d.sent();
1035
1015
  case 6:
1036
1016
  parsedBody = parsedOutput.body;
1037
- $metadata = deserializeMetadata(output);
1038
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1039
- response = new __BaseException({
1040
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1041
- $fault: "client",
1042
- $metadata: $metadata,
1017
+ throwDefaultError({
1018
+ output: output,
1019
+ parsedBody: parsedBody.Error,
1020
+ exceptionCtor: __BaseException,
1021
+ errorCode: errorCode,
1043
1022
  });
1044
- throw __decorateServiceException(response, parsedBody.Error);
1023
+ _d.label = 7;
1024
+ case 7: return [2];
1045
1025
  }
1046
1026
  });
1047
1027
  }); };
@@ -1064,7 +1044,7 @@ export var deserializeAws_querySendMessageBatchCommand = function (output, conte
1064
1044
  });
1065
1045
  }); };
1066
1046
  var deserializeAws_querySendMessageBatchCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1067
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1047
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1068
1048
  var _c;
1069
1049
  return __generator(this, function (_d) {
1070
1050
  switch (_d.label) {
@@ -1105,14 +1085,14 @@ var deserializeAws_querySendMessageBatchCommandError = function (output, context
1105
1085
  case 13: throw _d.sent();
1106
1086
  case 14:
1107
1087
  parsedBody = parsedOutput.body;
1108
- $metadata = deserializeMetadata(output);
1109
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1110
- response = new __BaseException({
1111
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1112
- $fault: "client",
1113
- $metadata: $metadata,
1088
+ throwDefaultError({
1089
+ output: output,
1090
+ parsedBody: parsedBody.Error,
1091
+ exceptionCtor: __BaseException,
1092
+ errorCode: errorCode,
1114
1093
  });
1115
- throw __decorateServiceException(response, parsedBody.Error);
1094
+ _d.label = 15;
1095
+ case 15: return [2];
1116
1096
  }
1117
1097
  });
1118
1098
  }); };
@@ -1135,7 +1115,7 @@ export var deserializeAws_querySetQueueAttributesCommand = function (output, con
1135
1115
  });
1136
1116
  }); };
1137
1117
  var deserializeAws_querySetQueueAttributesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1138
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1118
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1139
1119
  var _c;
1140
1120
  return __generator(this, function (_d) {
1141
1121
  switch (_d.label) {
@@ -1156,14 +1136,14 @@ var deserializeAws_querySetQueueAttributesCommandError = function (output, conte
1156
1136
  case 3: throw _d.sent();
1157
1137
  case 4:
1158
1138
  parsedBody = parsedOutput.body;
1159
- $metadata = deserializeMetadata(output);
1160
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1161
- response = new __BaseException({
1162
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1163
- $fault: "client",
1164
- $metadata: $metadata,
1139
+ throwDefaultError({
1140
+ output: output,
1141
+ parsedBody: parsedBody.Error,
1142
+ exceptionCtor: __BaseException,
1143
+ errorCode: errorCode,
1165
1144
  });
1166
- throw __decorateServiceException(response, parsedBody.Error);
1145
+ _d.label = 5;
1146
+ case 5: return [2];
1167
1147
  }
1168
1148
  });
1169
1149
  }); };
@@ -1186,7 +1166,7 @@ export var deserializeAws_queryTagQueueCommand = function (output, context) { re
1186
1166
  });
1187
1167
  }); };
1188
1168
  var deserializeAws_queryTagQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1189
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
1169
+ var parsedOutput, _a, errorCode, parsedBody;
1190
1170
  var _b;
1191
1171
  return __generator(this, function (_c) {
1192
1172
  switch (_c.label) {
@@ -1197,18 +1177,13 @@ var deserializeAws_queryTagQueueCommandError = function (output, context) { retu
1197
1177
  case 1:
1198
1178
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
1199
1179
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
1200
- switch (errorCode) {
1201
- default:
1202
- parsedBody = parsedOutput.body;
1203
- $metadata = deserializeMetadata(output);
1204
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1205
- response = new __BaseException({
1206
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1207
- $fault: "client",
1208
- $metadata: $metadata,
1209
- });
1210
- throw __decorateServiceException(response, parsedBody.Error);
1211
- }
1180
+ parsedBody = parsedOutput.body;
1181
+ throwDefaultError({
1182
+ output: output,
1183
+ parsedBody: parsedBody.Error,
1184
+ exceptionCtor: __BaseException,
1185
+ errorCode: errorCode,
1186
+ });
1212
1187
  return [2];
1213
1188
  }
1214
1189
  });
@@ -1232,7 +1207,7 @@ export var deserializeAws_queryUntagQueueCommand = function (output, context) {
1232
1207
  });
1233
1208
  }); };
1234
1209
  var deserializeAws_queryUntagQueueCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1235
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
1210
+ var parsedOutput, _a, errorCode, parsedBody;
1236
1211
  var _b;
1237
1212
  return __generator(this, function (_c) {
1238
1213
  switch (_c.label) {
@@ -1243,18 +1218,13 @@ var deserializeAws_queryUntagQueueCommandError = function (output, context) { re
1243
1218
  case 1:
1244
1219
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
1245
1220
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
1246
- switch (errorCode) {
1247
- default:
1248
- parsedBody = parsedOutput.body;
1249
- $metadata = deserializeMetadata(output);
1250
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1251
- response = new __BaseException({
1252
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1253
- $fault: "client",
1254
- $metadata: $metadata,
1255
- });
1256
- throw __decorateServiceException(response, parsedBody.Error);
1257
- }
1221
+ parsedBody = parsedOutput.body;
1222
+ throwDefaultError({
1223
+ output: output,
1224
+ parsedBody: parsedBody.Error,
1225
+ exceptionCtor: __BaseException,
1226
+ errorCode: errorCode,
1227
+ });
1258
1228
  return [2];
1259
1229
  }
1260
1230
  });
@@ -1428,13 +1398,13 @@ var serializeAws_queryActionNameList = function (input, context) {
1428
1398
  };
1429
1399
  var serializeAws_queryAddPermissionRequest = function (input, context) {
1430
1400
  var entries = {};
1431
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1401
+ if (input.QueueUrl != null) {
1432
1402
  entries["QueueUrl"] = input.QueueUrl;
1433
1403
  }
1434
- if (input.Label !== undefined && input.Label !== null) {
1404
+ if (input.Label != null) {
1435
1405
  entries["Label"] = input.Label;
1436
1406
  }
1437
- if (input.AWSAccountIds !== undefined && input.AWSAccountIds !== null) {
1407
+ if (input.AWSAccountIds != null) {
1438
1408
  var memberEntries = serializeAws_queryAWSAccountIdList(input.AWSAccountIds, context);
1439
1409
  Object.entries(memberEntries).forEach(function (_a) {
1440
1410
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1442,7 +1412,7 @@ var serializeAws_queryAddPermissionRequest = function (input, context) {
1442
1412
  entries[loc] = value;
1443
1413
  });
1444
1414
  }
1445
- if (input.Actions !== undefined && input.Actions !== null) {
1415
+ if (input.Actions != null) {
1446
1416
  var memberEntries = serializeAws_queryActionNameList(input.Actions, context);
1447
1417
  Object.entries(memberEntries).forEach(function (_a) {
1448
1418
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1523,10 +1493,10 @@ var serializeAws_queryBinaryList = function (input, context) {
1523
1493
  };
1524
1494
  var serializeAws_queryChangeMessageVisibilityBatchRequest = function (input, context) {
1525
1495
  var entries = {};
1526
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1496
+ if (input.QueueUrl != null) {
1527
1497
  entries["QueueUrl"] = input.QueueUrl;
1528
1498
  }
1529
- if (input.Entries !== undefined && input.Entries !== null) {
1499
+ if (input.Entries != null) {
1530
1500
  var memberEntries = serializeAws_queryChangeMessageVisibilityBatchRequestEntryList(input.Entries, context);
1531
1501
  Object.entries(memberEntries).forEach(function (_a) {
1532
1502
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1538,13 +1508,13 @@ var serializeAws_queryChangeMessageVisibilityBatchRequest = function (input, con
1538
1508
  };
1539
1509
  var serializeAws_queryChangeMessageVisibilityBatchRequestEntry = function (input, context) {
1540
1510
  var entries = {};
1541
- if (input.Id !== undefined && input.Id !== null) {
1511
+ if (input.Id != null) {
1542
1512
  entries["Id"] = input.Id;
1543
1513
  }
1544
- if (input.ReceiptHandle !== undefined && input.ReceiptHandle !== null) {
1514
+ if (input.ReceiptHandle != null) {
1545
1515
  entries["ReceiptHandle"] = input.ReceiptHandle;
1546
1516
  }
1547
- if (input.VisibilityTimeout !== undefined && input.VisibilityTimeout !== null) {
1517
+ if (input.VisibilityTimeout != null) {
1548
1518
  entries["VisibilityTimeout"] = input.VisibilityTimeout;
1549
1519
  }
1550
1520
  return entries;
@@ -1578,23 +1548,23 @@ var serializeAws_queryChangeMessageVisibilityBatchRequestEntryList = function (i
1578
1548
  };
1579
1549
  var serializeAws_queryChangeMessageVisibilityRequest = function (input, context) {
1580
1550
  var entries = {};
1581
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1551
+ if (input.QueueUrl != null) {
1582
1552
  entries["QueueUrl"] = input.QueueUrl;
1583
1553
  }
1584
- if (input.ReceiptHandle !== undefined && input.ReceiptHandle !== null) {
1554
+ if (input.ReceiptHandle != null) {
1585
1555
  entries["ReceiptHandle"] = input.ReceiptHandle;
1586
1556
  }
1587
- if (input.VisibilityTimeout !== undefined && input.VisibilityTimeout !== null) {
1557
+ if (input.VisibilityTimeout != null) {
1588
1558
  entries["VisibilityTimeout"] = input.VisibilityTimeout;
1589
1559
  }
1590
1560
  return entries;
1591
1561
  };
1592
1562
  var serializeAws_queryCreateQueueRequest = function (input, context) {
1593
1563
  var entries = {};
1594
- if (input.QueueName !== undefined && input.QueueName !== null) {
1564
+ if (input.QueueName != null) {
1595
1565
  entries["QueueName"] = input.QueueName;
1596
1566
  }
1597
- if (input.tags !== undefined && input.tags !== null) {
1567
+ if (input.tags != null) {
1598
1568
  var memberEntries = serializeAws_queryTagMap(input.tags, context);
1599
1569
  Object.entries(memberEntries).forEach(function (_a) {
1600
1570
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1602,7 +1572,7 @@ var serializeAws_queryCreateQueueRequest = function (input, context) {
1602
1572
  entries[loc] = value;
1603
1573
  });
1604
1574
  }
1605
- if (input.Attributes !== undefined && input.Attributes !== null) {
1575
+ if (input.Attributes != null) {
1606
1576
  var memberEntries = serializeAws_queryQueueAttributeMap(input.Attributes, context);
1607
1577
  Object.entries(memberEntries).forEach(function (_a) {
1608
1578
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1614,10 +1584,10 @@ var serializeAws_queryCreateQueueRequest = function (input, context) {
1614
1584
  };
1615
1585
  var serializeAws_queryDeleteMessageBatchRequest = function (input, context) {
1616
1586
  var entries = {};
1617
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1587
+ if (input.QueueUrl != null) {
1618
1588
  entries["QueueUrl"] = input.QueueUrl;
1619
1589
  }
1620
- if (input.Entries !== undefined && input.Entries !== null) {
1590
+ if (input.Entries != null) {
1621
1591
  var memberEntries = serializeAws_queryDeleteMessageBatchRequestEntryList(input.Entries, context);
1622
1592
  Object.entries(memberEntries).forEach(function (_a) {
1623
1593
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1629,10 +1599,10 @@ var serializeAws_queryDeleteMessageBatchRequest = function (input, context) {
1629
1599
  };
1630
1600
  var serializeAws_queryDeleteMessageBatchRequestEntry = function (input, context) {
1631
1601
  var entries = {};
1632
- if (input.Id !== undefined && input.Id !== null) {
1602
+ if (input.Id != null) {
1633
1603
  entries["Id"] = input.Id;
1634
1604
  }
1635
- if (input.ReceiptHandle !== undefined && input.ReceiptHandle !== null) {
1605
+ if (input.ReceiptHandle != null) {
1636
1606
  entries["ReceiptHandle"] = input.ReceiptHandle;
1637
1607
  }
1638
1608
  return entries;
@@ -1666,27 +1636,27 @@ var serializeAws_queryDeleteMessageBatchRequestEntryList = function (input, cont
1666
1636
  };
1667
1637
  var serializeAws_queryDeleteMessageRequest = function (input, context) {
1668
1638
  var entries = {};
1669
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1639
+ if (input.QueueUrl != null) {
1670
1640
  entries["QueueUrl"] = input.QueueUrl;
1671
1641
  }
1672
- if (input.ReceiptHandle !== undefined && input.ReceiptHandle !== null) {
1642
+ if (input.ReceiptHandle != null) {
1673
1643
  entries["ReceiptHandle"] = input.ReceiptHandle;
1674
1644
  }
1675
1645
  return entries;
1676
1646
  };
1677
1647
  var serializeAws_queryDeleteQueueRequest = function (input, context) {
1678
1648
  var entries = {};
1679
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1649
+ if (input.QueueUrl != null) {
1680
1650
  entries["QueueUrl"] = input.QueueUrl;
1681
1651
  }
1682
1652
  return entries;
1683
1653
  };
1684
1654
  var serializeAws_queryGetQueueAttributesRequest = function (input, context) {
1685
1655
  var entries = {};
1686
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1656
+ if (input.QueueUrl != null) {
1687
1657
  entries["QueueUrl"] = input.QueueUrl;
1688
1658
  }
1689
- if (input.AttributeNames !== undefined && input.AttributeNames !== null) {
1659
+ if (input.AttributeNames != null) {
1690
1660
  var memberEntries = serializeAws_queryAttributeNameList(input.AttributeNames, context);
1691
1661
  Object.entries(memberEntries).forEach(function (_a) {
1692
1662
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1698,43 +1668,43 @@ var serializeAws_queryGetQueueAttributesRequest = function (input, context) {
1698
1668
  };
1699
1669
  var serializeAws_queryGetQueueUrlRequest = function (input, context) {
1700
1670
  var entries = {};
1701
- if (input.QueueName !== undefined && input.QueueName !== null) {
1671
+ if (input.QueueName != null) {
1702
1672
  entries["QueueName"] = input.QueueName;
1703
1673
  }
1704
- if (input.QueueOwnerAWSAccountId !== undefined && input.QueueOwnerAWSAccountId !== null) {
1674
+ if (input.QueueOwnerAWSAccountId != null) {
1705
1675
  entries["QueueOwnerAWSAccountId"] = input.QueueOwnerAWSAccountId;
1706
1676
  }
1707
1677
  return entries;
1708
1678
  };
1709
1679
  var serializeAws_queryListDeadLetterSourceQueuesRequest = function (input, context) {
1710
1680
  var entries = {};
1711
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1681
+ if (input.QueueUrl != null) {
1712
1682
  entries["QueueUrl"] = input.QueueUrl;
1713
1683
  }
1714
- if (input.NextToken !== undefined && input.NextToken !== null) {
1684
+ if (input.NextToken != null) {
1715
1685
  entries["NextToken"] = input.NextToken;
1716
1686
  }
1717
- if (input.MaxResults !== undefined && input.MaxResults !== null) {
1687
+ if (input.MaxResults != null) {
1718
1688
  entries["MaxResults"] = input.MaxResults;
1719
1689
  }
1720
1690
  return entries;
1721
1691
  };
1722
1692
  var serializeAws_queryListQueuesRequest = function (input, context) {
1723
1693
  var entries = {};
1724
- if (input.QueueNamePrefix !== undefined && input.QueueNamePrefix !== null) {
1694
+ if (input.QueueNamePrefix != null) {
1725
1695
  entries["QueueNamePrefix"] = input.QueueNamePrefix;
1726
1696
  }
1727
- if (input.NextToken !== undefined && input.NextToken !== null) {
1697
+ if (input.NextToken != null) {
1728
1698
  entries["NextToken"] = input.NextToken;
1729
1699
  }
1730
- if (input.MaxResults !== undefined && input.MaxResults !== null) {
1700
+ if (input.MaxResults != null) {
1731
1701
  entries["MaxResults"] = input.MaxResults;
1732
1702
  }
1733
1703
  return entries;
1734
1704
  };
1735
1705
  var serializeAws_queryListQueueTagsRequest = function (input, context) {
1736
1706
  var entries = {};
1737
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1707
+ if (input.QueueUrl != null) {
1738
1708
  entries["QueueUrl"] = input.QueueUrl;
1739
1709
  }
1740
1710
  return entries;
@@ -1764,13 +1734,13 @@ var serializeAws_queryMessageAttributeNameList = function (input, context) {
1764
1734
  };
1765
1735
  var serializeAws_queryMessageAttributeValue = function (input, context) {
1766
1736
  var entries = {};
1767
- if (input.StringValue !== undefined && input.StringValue !== null) {
1737
+ if (input.StringValue != null) {
1768
1738
  entries["StringValue"] = input.StringValue;
1769
1739
  }
1770
- if (input.BinaryValue !== undefined && input.BinaryValue !== null) {
1740
+ if (input.BinaryValue != null) {
1771
1741
  entries["BinaryValue"] = context.base64Encoder(input.BinaryValue);
1772
1742
  }
1773
- if (input.StringListValues !== undefined && input.StringListValues !== null) {
1743
+ if (input.StringListValues != null) {
1774
1744
  var memberEntries = serializeAws_queryStringList(input.StringListValues, context);
1775
1745
  Object.entries(memberEntries).forEach(function (_a) {
1776
1746
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1778,7 +1748,7 @@ var serializeAws_queryMessageAttributeValue = function (input, context) {
1778
1748
  entries[loc] = value;
1779
1749
  });
1780
1750
  }
1781
- if (input.BinaryListValues !== undefined && input.BinaryListValues !== null) {
1751
+ if (input.BinaryListValues != null) {
1782
1752
  var memberEntries = serializeAws_queryBinaryList(input.BinaryListValues, context);
1783
1753
  Object.entries(memberEntries).forEach(function (_a) {
1784
1754
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1786,7 +1756,7 @@ var serializeAws_queryMessageAttributeValue = function (input, context) {
1786
1756
  entries[loc] = value;
1787
1757
  });
1788
1758
  }
1789
- if (input.DataType !== undefined && input.DataType !== null) {
1759
+ if (input.DataType != null) {
1790
1760
  entries["DataType"] = input.DataType;
1791
1761
  }
1792
1762
  return entries;
@@ -1825,13 +1795,13 @@ var serializeAws_queryMessageBodySystemAttributeMap = function (input, context)
1825
1795
  };
1826
1796
  var serializeAws_queryMessageSystemAttributeValue = function (input, context) {
1827
1797
  var entries = {};
1828
- if (input.StringValue !== undefined && input.StringValue !== null) {
1798
+ if (input.StringValue != null) {
1829
1799
  entries["StringValue"] = input.StringValue;
1830
1800
  }
1831
- if (input.BinaryValue !== undefined && input.BinaryValue !== null) {
1801
+ if (input.BinaryValue != null) {
1832
1802
  entries["BinaryValue"] = context.base64Encoder(input.BinaryValue);
1833
1803
  }
1834
- if (input.StringListValues !== undefined && input.StringListValues !== null) {
1804
+ if (input.StringListValues != null) {
1835
1805
  var memberEntries = serializeAws_queryStringList(input.StringListValues, context);
1836
1806
  Object.entries(memberEntries).forEach(function (_a) {
1837
1807
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1839,7 +1809,7 @@ var serializeAws_queryMessageSystemAttributeValue = function (input, context) {
1839
1809
  entries[loc] = value;
1840
1810
  });
1841
1811
  }
1842
- if (input.BinaryListValues !== undefined && input.BinaryListValues !== null) {
1812
+ if (input.BinaryListValues != null) {
1843
1813
  var memberEntries = serializeAws_queryBinaryList(input.BinaryListValues, context);
1844
1814
  Object.entries(memberEntries).forEach(function (_a) {
1845
1815
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1847,14 +1817,14 @@ var serializeAws_queryMessageSystemAttributeValue = function (input, context) {
1847
1817
  entries[loc] = value;
1848
1818
  });
1849
1819
  }
1850
- if (input.DataType !== undefined && input.DataType !== null) {
1820
+ if (input.DataType != null) {
1851
1821
  entries["DataType"] = input.DataType;
1852
1822
  }
1853
1823
  return entries;
1854
1824
  };
1855
1825
  var serializeAws_queryPurgeQueueRequest = function (input, context) {
1856
1826
  var entries = {};
1857
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1827
+ if (input.QueueUrl != null) {
1858
1828
  entries["QueueUrl"] = input.QueueUrl;
1859
1829
  }
1860
1830
  return entries;
@@ -1873,10 +1843,10 @@ var serializeAws_queryQueueAttributeMap = function (input, context) {
1873
1843
  };
1874
1844
  var serializeAws_queryReceiveMessageRequest = function (input, context) {
1875
1845
  var entries = {};
1876
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1846
+ if (input.QueueUrl != null) {
1877
1847
  entries["QueueUrl"] = input.QueueUrl;
1878
1848
  }
1879
- if (input.AttributeNames !== undefined && input.AttributeNames !== null) {
1849
+ if (input.AttributeNames != null) {
1880
1850
  var memberEntries = serializeAws_queryAttributeNameList(input.AttributeNames, context);
1881
1851
  Object.entries(memberEntries).forEach(function (_a) {
1882
1852
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1884,7 +1854,7 @@ var serializeAws_queryReceiveMessageRequest = function (input, context) {
1884
1854
  entries[loc] = value;
1885
1855
  });
1886
1856
  }
1887
- if (input.MessageAttributeNames !== undefined && input.MessageAttributeNames !== null) {
1857
+ if (input.MessageAttributeNames != null) {
1888
1858
  var memberEntries = serializeAws_queryMessageAttributeNameList(input.MessageAttributeNames, context);
1889
1859
  Object.entries(memberEntries).forEach(function (_a) {
1890
1860
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1892,36 +1862,36 @@ var serializeAws_queryReceiveMessageRequest = function (input, context) {
1892
1862
  entries[loc] = value;
1893
1863
  });
1894
1864
  }
1895
- if (input.MaxNumberOfMessages !== undefined && input.MaxNumberOfMessages !== null) {
1865
+ if (input.MaxNumberOfMessages != null) {
1896
1866
  entries["MaxNumberOfMessages"] = input.MaxNumberOfMessages;
1897
1867
  }
1898
- if (input.VisibilityTimeout !== undefined && input.VisibilityTimeout !== null) {
1868
+ if (input.VisibilityTimeout != null) {
1899
1869
  entries["VisibilityTimeout"] = input.VisibilityTimeout;
1900
1870
  }
1901
- if (input.WaitTimeSeconds !== undefined && input.WaitTimeSeconds !== null) {
1871
+ if (input.WaitTimeSeconds != null) {
1902
1872
  entries["WaitTimeSeconds"] = input.WaitTimeSeconds;
1903
1873
  }
1904
- if (input.ReceiveRequestAttemptId !== undefined && input.ReceiveRequestAttemptId !== null) {
1874
+ if (input.ReceiveRequestAttemptId != null) {
1905
1875
  entries["ReceiveRequestAttemptId"] = input.ReceiveRequestAttemptId;
1906
1876
  }
1907
1877
  return entries;
1908
1878
  };
1909
1879
  var serializeAws_queryRemovePermissionRequest = function (input, context) {
1910
1880
  var entries = {};
1911
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1881
+ if (input.QueueUrl != null) {
1912
1882
  entries["QueueUrl"] = input.QueueUrl;
1913
1883
  }
1914
- if (input.Label !== undefined && input.Label !== null) {
1884
+ if (input.Label != null) {
1915
1885
  entries["Label"] = input.Label;
1916
1886
  }
1917
1887
  return entries;
1918
1888
  };
1919
1889
  var serializeAws_querySendMessageBatchRequest = function (input, context) {
1920
1890
  var entries = {};
1921
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1891
+ if (input.QueueUrl != null) {
1922
1892
  entries["QueueUrl"] = input.QueueUrl;
1923
1893
  }
1924
- if (input.Entries !== undefined && input.Entries !== null) {
1894
+ if (input.Entries != null) {
1925
1895
  var memberEntries = serializeAws_querySendMessageBatchRequestEntryList(input.Entries, context);
1926
1896
  Object.entries(memberEntries).forEach(function (_a) {
1927
1897
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1933,16 +1903,16 @@ var serializeAws_querySendMessageBatchRequest = function (input, context) {
1933
1903
  };
1934
1904
  var serializeAws_querySendMessageBatchRequestEntry = function (input, context) {
1935
1905
  var entries = {};
1936
- if (input.Id !== undefined && input.Id !== null) {
1906
+ if (input.Id != null) {
1937
1907
  entries["Id"] = input.Id;
1938
1908
  }
1939
- if (input.MessageBody !== undefined && input.MessageBody !== null) {
1909
+ if (input.MessageBody != null) {
1940
1910
  entries["MessageBody"] = input.MessageBody;
1941
1911
  }
1942
- if (input.DelaySeconds !== undefined && input.DelaySeconds !== null) {
1912
+ if (input.DelaySeconds != null) {
1943
1913
  entries["DelaySeconds"] = input.DelaySeconds;
1944
1914
  }
1945
- if (input.MessageAttributes !== undefined && input.MessageAttributes !== null) {
1915
+ if (input.MessageAttributes != null) {
1946
1916
  var memberEntries = serializeAws_queryMessageBodyAttributeMap(input.MessageAttributes, context);
1947
1917
  Object.entries(memberEntries).forEach(function (_a) {
1948
1918
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1950,7 +1920,7 @@ var serializeAws_querySendMessageBatchRequestEntry = function (input, context) {
1950
1920
  entries[loc] = value;
1951
1921
  });
1952
1922
  }
1953
- if (input.MessageSystemAttributes !== undefined && input.MessageSystemAttributes !== null) {
1923
+ if (input.MessageSystemAttributes != null) {
1954
1924
  var memberEntries = serializeAws_queryMessageBodySystemAttributeMap(input.MessageSystemAttributes, context);
1955
1925
  Object.entries(memberEntries).forEach(function (_a) {
1956
1926
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -1958,10 +1928,10 @@ var serializeAws_querySendMessageBatchRequestEntry = function (input, context) {
1958
1928
  entries[loc] = value;
1959
1929
  });
1960
1930
  }
1961
- if (input.MessageDeduplicationId !== undefined && input.MessageDeduplicationId !== null) {
1931
+ if (input.MessageDeduplicationId != null) {
1962
1932
  entries["MessageDeduplicationId"] = input.MessageDeduplicationId;
1963
1933
  }
1964
- if (input.MessageGroupId !== undefined && input.MessageGroupId !== null) {
1934
+ if (input.MessageGroupId != null) {
1965
1935
  entries["MessageGroupId"] = input.MessageGroupId;
1966
1936
  }
1967
1937
  return entries;
@@ -1995,16 +1965,16 @@ var serializeAws_querySendMessageBatchRequestEntryList = function (input, contex
1995
1965
  };
1996
1966
  var serializeAws_querySendMessageRequest = function (input, context) {
1997
1967
  var entries = {};
1998
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
1968
+ if (input.QueueUrl != null) {
1999
1969
  entries["QueueUrl"] = input.QueueUrl;
2000
1970
  }
2001
- if (input.MessageBody !== undefined && input.MessageBody !== null) {
1971
+ if (input.MessageBody != null) {
2002
1972
  entries["MessageBody"] = input.MessageBody;
2003
1973
  }
2004
- if (input.DelaySeconds !== undefined && input.DelaySeconds !== null) {
1974
+ if (input.DelaySeconds != null) {
2005
1975
  entries["DelaySeconds"] = input.DelaySeconds;
2006
1976
  }
2007
- if (input.MessageAttributes !== undefined && input.MessageAttributes !== null) {
1977
+ if (input.MessageAttributes != null) {
2008
1978
  var memberEntries = serializeAws_queryMessageBodyAttributeMap(input.MessageAttributes, context);
2009
1979
  Object.entries(memberEntries).forEach(function (_a) {
2010
1980
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2012,7 +1982,7 @@ var serializeAws_querySendMessageRequest = function (input, context) {
2012
1982
  entries[loc] = value;
2013
1983
  });
2014
1984
  }
2015
- if (input.MessageSystemAttributes !== undefined && input.MessageSystemAttributes !== null) {
1985
+ if (input.MessageSystemAttributes != null) {
2016
1986
  var memberEntries = serializeAws_queryMessageBodySystemAttributeMap(input.MessageSystemAttributes, context);
2017
1987
  Object.entries(memberEntries).forEach(function (_a) {
2018
1988
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2020,20 +1990,20 @@ var serializeAws_querySendMessageRequest = function (input, context) {
2020
1990
  entries[loc] = value;
2021
1991
  });
2022
1992
  }
2023
- if (input.MessageDeduplicationId !== undefined && input.MessageDeduplicationId !== null) {
1993
+ if (input.MessageDeduplicationId != null) {
2024
1994
  entries["MessageDeduplicationId"] = input.MessageDeduplicationId;
2025
1995
  }
2026
- if (input.MessageGroupId !== undefined && input.MessageGroupId !== null) {
1996
+ if (input.MessageGroupId != null) {
2027
1997
  entries["MessageGroupId"] = input.MessageGroupId;
2028
1998
  }
2029
1999
  return entries;
2030
2000
  };
2031
2001
  var serializeAws_querySetQueueAttributesRequest = function (input, context) {
2032
2002
  var entries = {};
2033
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
2003
+ if (input.QueueUrl != null) {
2034
2004
  entries["QueueUrl"] = input.QueueUrl;
2035
2005
  }
2036
- if (input.Attributes !== undefined && input.Attributes !== null) {
2006
+ if (input.Attributes != null) {
2037
2007
  var memberEntries = serializeAws_queryQueueAttributeMap(input.Attributes, context);
2038
2008
  Object.entries(memberEntries).forEach(function (_a) {
2039
2009
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2103,10 +2073,10 @@ var serializeAws_queryTagMap = function (input, context) {
2103
2073
  };
2104
2074
  var serializeAws_queryTagQueueRequest = function (input, context) {
2105
2075
  var entries = {};
2106
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
2076
+ if (input.QueueUrl != null) {
2107
2077
  entries["QueueUrl"] = input.QueueUrl;
2108
2078
  }
2109
- if (input.Tags !== undefined && input.Tags !== null) {
2079
+ if (input.Tags != null) {
2110
2080
  var memberEntries = serializeAws_queryTagMap(input.Tags, context);
2111
2081
  Object.entries(memberEntries).forEach(function (_a) {
2112
2082
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2118,10 +2088,10 @@ var serializeAws_queryTagQueueRequest = function (input, context) {
2118
2088
  };
2119
2089
  var serializeAws_queryUntagQueueRequest = function (input, context) {
2120
2090
  var entries = {};
2121
- if (input.QueueUrl !== undefined && input.QueueUrl !== null) {
2091
+ if (input.QueueUrl != null) {
2122
2092
  entries["QueueUrl"] = input.QueueUrl;
2123
2093
  }
2124
- if (input.TagKeys !== undefined && input.TagKeys !== null) {
2094
+ if (input.TagKeys != null) {
2125
2095
  var memberEntries = serializeAws_queryTagKeyList(input.TagKeys, context);
2126
2096
  Object.entries(memberEntries).forEach(function (_a) {
2127
2097
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2164,9 +2134,6 @@ var deserializeAws_queryBatchResultErrorEntryList = function (output, context) {
2164
2134
  return (output || [])
2165
2135
  .filter(function (e) { return e != null; })
2166
2136
  .map(function (entry) {
2167
- if (entry === null) {
2168
- return null;
2169
- }
2170
2137
  return deserializeAws_queryBatchResultErrorEntry(entry, context);
2171
2138
  });
2172
2139
  };
@@ -2174,9 +2141,6 @@ var deserializeAws_queryBinaryList = function (output, context) {
2174
2141
  return (output || [])
2175
2142
  .filter(function (e) { return e != null; })
2176
2143
  .map(function (entry) {
2177
- if (entry === null) {
2178
- return null;
2179
- }
2180
2144
  return context.base64Decoder(entry);
2181
2145
  });
2182
2146
  };
@@ -2212,9 +2176,6 @@ var deserializeAws_queryChangeMessageVisibilityBatchResultEntryList = function (
2212
2176
  return (output || [])
2213
2177
  .filter(function (e) { return e != null; })
2214
2178
  .map(function (entry) {
2215
- if (entry === null) {
2216
- return null;
2217
- }
2218
2179
  return deserializeAws_queryChangeMessageVisibilityBatchResultEntry(entry, context);
2219
2180
  });
2220
2181
  };
@@ -2259,9 +2220,6 @@ var deserializeAws_queryDeleteMessageBatchResultEntryList = function (output, co
2259
2220
  return (output || [])
2260
2221
  .filter(function (e) { return e != null; })
2261
2222
  .map(function (entry) {
2262
- if (entry === null) {
2263
- return null;
2264
- }
2265
2223
  return deserializeAws_queryDeleteMessageBatchResultEntry(entry, context);
2266
2224
  });
2267
2225
  };
@@ -2433,9 +2391,6 @@ var deserializeAws_queryMessageList = function (output, context) {
2433
2391
  return (output || [])
2434
2392
  .filter(function (e) { return e != null; })
2435
2393
  .map(function (entry) {
2436
- if (entry === null) {
2437
- return null;
2438
- }
2439
2394
  return deserializeAws_queryMessage(entry, context);
2440
2395
  });
2441
2396
  };
@@ -2485,9 +2440,6 @@ var deserializeAws_queryQueueUrlList = function (output, context) {
2485
2440
  return (output || [])
2486
2441
  .filter(function (e) { return e != null; })
2487
2442
  .map(function (entry) {
2488
- if (entry === null) {
2489
- return null;
2490
- }
2491
2443
  return __expectString(entry);
2492
2444
  });
2493
2445
  };
@@ -2559,9 +2511,6 @@ var deserializeAws_querySendMessageBatchResultEntryList = function (output, cont
2559
2511
  return (output || [])
2560
2512
  .filter(function (e) { return e != null; })
2561
2513
  .map(function (entry) {
2562
- if (entry === null) {
2563
- return null;
2564
- }
2565
2514
  return deserializeAws_querySendMessageBatchResultEntry(entry, context);
2566
2515
  });
2567
2516
  };
@@ -2594,9 +2543,6 @@ var deserializeAws_queryStringList = function (output, context) {
2594
2543
  return (output || [])
2595
2544
  .filter(function (e) { return e != null; })
2596
2545
  .map(function (entry) {
2597
- if (entry === null) {
2598
- return null;
2599
- }
2600
2546
  return __expectString(entry);
2601
2547
  });
2602
2548
  };