@aws-sdk/client-cloudwatch 3.141.0 → 3.146.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, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, parseRfc3339DateTime as __parseRfc3339DateTime, serializeFloat as __serializeFloat, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, parseRfc3339DateTime as __parseRfc3339DateTime, serializeFloat as __serializeFloat, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, 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 { CloudWatchServiceException as __BaseException } from "../models/CloudWatchServiceException";
@@ -384,7 +384,7 @@ export var deserializeAws_queryDeleteAlarmsCommand = function (output, context)
384
384
  });
385
385
  }); };
386
386
  var deserializeAws_queryDeleteAlarmsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
387
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
387
+ var parsedOutput, _a, errorCode, _b, parsedBody;
388
388
  var _c;
389
389
  return __generator(this, function (_d) {
390
390
  switch (_d.label) {
@@ -405,14 +405,14 @@ var deserializeAws_queryDeleteAlarmsCommandError = function (output, context) {
405
405
  case 3: throw _d.sent();
406
406
  case 4:
407
407
  parsedBody = parsedOutput.body;
408
- $metadata = deserializeMetadata(output);
409
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
410
- response = new __BaseException({
411
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
412
- $fault: "client",
413
- $metadata: $metadata,
408
+ throwDefaultError({
409
+ output: output,
410
+ parsedBody: parsedBody.Error,
411
+ exceptionCtor: __BaseException,
412
+ errorCode: errorCode,
414
413
  });
415
- throw __decorateServiceException(response, parsedBody.Error);
414
+ _d.label = 5;
415
+ case 5: return [2];
416
416
  }
417
417
  });
418
418
  }); };
@@ -435,7 +435,7 @@ export var deserializeAws_queryDeleteAnomalyDetectorCommand = function (output,
435
435
  });
436
436
  }); };
437
437
  var deserializeAws_queryDeleteAnomalyDetectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
438
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
438
+ var parsedOutput, _a, errorCode, _b, parsedBody;
439
439
  var _c;
440
440
  return __generator(this, function (_d) {
441
441
  switch (_d.label) {
@@ -472,14 +472,14 @@ var deserializeAws_queryDeleteAnomalyDetectorCommandError = function (output, co
472
472
  case 11: throw _d.sent();
473
473
  case 12:
474
474
  parsedBody = parsedOutput.body;
475
- $metadata = deserializeMetadata(output);
476
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
477
- response = new __BaseException({
478
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
479
- $fault: "client",
480
- $metadata: $metadata,
475
+ throwDefaultError({
476
+ output: output,
477
+ parsedBody: parsedBody.Error,
478
+ exceptionCtor: __BaseException,
479
+ errorCode: errorCode,
481
480
  });
482
- throw __decorateServiceException(response, parsedBody.Error);
481
+ _d.label = 13;
482
+ case 13: return [2];
483
483
  }
484
484
  });
485
485
  }); };
@@ -502,7 +502,7 @@ export var deserializeAws_queryDeleteDashboardsCommand = function (output, conte
502
502
  });
503
503
  }); };
504
504
  var deserializeAws_queryDeleteDashboardsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
505
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
505
+ var parsedOutput, _a, errorCode, _b, parsedBody;
506
506
  var _c;
507
507
  return __generator(this, function (_d) {
508
508
  switch (_d.label) {
@@ -531,14 +531,14 @@ var deserializeAws_queryDeleteDashboardsCommandError = function (output, context
531
531
  case 7: throw _d.sent();
532
532
  case 8:
533
533
  parsedBody = parsedOutput.body;
534
- $metadata = deserializeMetadata(output);
535
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
536
- response = new __BaseException({
537
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
538
- $fault: "client",
539
- $metadata: $metadata,
534
+ throwDefaultError({
535
+ output: output,
536
+ parsedBody: parsedBody.Error,
537
+ exceptionCtor: __BaseException,
538
+ errorCode: errorCode,
540
539
  });
541
- throw __decorateServiceException(response, parsedBody.Error);
540
+ _d.label = 9;
541
+ case 9: return [2];
542
542
  }
543
543
  });
544
544
  }); };
@@ -561,7 +561,7 @@ export var deserializeAws_queryDeleteInsightRulesCommand = function (output, con
561
561
  });
562
562
  }); };
563
563
  var deserializeAws_queryDeleteInsightRulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
564
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
564
+ var parsedOutput, _a, errorCode, _b, parsedBody;
565
565
  var _c;
566
566
  return __generator(this, function (_d) {
567
567
  switch (_d.label) {
@@ -586,14 +586,14 @@ var deserializeAws_queryDeleteInsightRulesCommandError = function (output, conte
586
586
  case 5: throw _d.sent();
587
587
  case 6:
588
588
  parsedBody = parsedOutput.body;
589
- $metadata = deserializeMetadata(output);
590
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
591
- response = new __BaseException({
592
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
593
- $fault: "client",
594
- $metadata: $metadata,
589
+ throwDefaultError({
590
+ output: output,
591
+ parsedBody: parsedBody.Error,
592
+ exceptionCtor: __BaseException,
593
+ errorCode: errorCode,
595
594
  });
596
- throw __decorateServiceException(response, parsedBody.Error);
595
+ _d.label = 7;
596
+ case 7: return [2];
597
597
  }
598
598
  });
599
599
  }); };
@@ -616,7 +616,7 @@ export var deserializeAws_queryDeleteMetricStreamCommand = function (output, con
616
616
  });
617
617
  }); };
618
618
  var deserializeAws_queryDeleteMetricStreamCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
619
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
619
+ var parsedOutput, _a, errorCode, _b, parsedBody;
620
620
  var _c;
621
621
  return __generator(this, function (_d) {
622
622
  switch (_d.label) {
@@ -645,14 +645,14 @@ var deserializeAws_queryDeleteMetricStreamCommandError = function (output, conte
645
645
  case 7: throw _d.sent();
646
646
  case 8:
647
647
  parsedBody = parsedOutput.body;
648
- $metadata = deserializeMetadata(output);
649
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
650
- response = new __BaseException({
651
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
652
- $fault: "client",
653
- $metadata: $metadata,
648
+ throwDefaultError({
649
+ output: output,
650
+ parsedBody: parsedBody.Error,
651
+ exceptionCtor: __BaseException,
652
+ errorCode: errorCode,
654
653
  });
655
- throw __decorateServiceException(response, parsedBody.Error);
654
+ _d.label = 9;
655
+ case 9: return [2];
656
656
  }
657
657
  });
658
658
  }); };
@@ -675,7 +675,7 @@ export var deserializeAws_queryDescribeAlarmHistoryCommand = function (output, c
675
675
  });
676
676
  }); };
677
677
  var deserializeAws_queryDescribeAlarmHistoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
678
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
678
+ var parsedOutput, _a, errorCode, _b, parsedBody;
679
679
  var _c;
680
680
  return __generator(this, function (_d) {
681
681
  switch (_d.label) {
@@ -696,14 +696,14 @@ var deserializeAws_queryDescribeAlarmHistoryCommandError = function (output, con
696
696
  case 3: throw _d.sent();
697
697
  case 4:
698
698
  parsedBody = parsedOutput.body;
699
- $metadata = deserializeMetadata(output);
700
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
701
- response = new __BaseException({
702
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
703
- $fault: "client",
704
- $metadata: $metadata,
699
+ throwDefaultError({
700
+ output: output,
701
+ parsedBody: parsedBody.Error,
702
+ exceptionCtor: __BaseException,
703
+ errorCode: errorCode,
705
704
  });
706
- throw __decorateServiceException(response, parsedBody.Error);
705
+ _d.label = 5;
706
+ case 5: return [2];
707
707
  }
708
708
  });
709
709
  }); };
@@ -726,7 +726,7 @@ export var deserializeAws_queryDescribeAlarmsCommand = function (output, context
726
726
  });
727
727
  }); };
728
728
  var deserializeAws_queryDescribeAlarmsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
729
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
729
+ var parsedOutput, _a, errorCode, _b, parsedBody;
730
730
  var _c;
731
731
  return __generator(this, function (_d) {
732
732
  switch (_d.label) {
@@ -747,14 +747,14 @@ var deserializeAws_queryDescribeAlarmsCommandError = function (output, context)
747
747
  case 3: throw _d.sent();
748
748
  case 4:
749
749
  parsedBody = parsedOutput.body;
750
- $metadata = deserializeMetadata(output);
751
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
752
- response = new __BaseException({
753
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
754
- $fault: "client",
755
- $metadata: $metadata,
750
+ throwDefaultError({
751
+ output: output,
752
+ parsedBody: parsedBody.Error,
753
+ exceptionCtor: __BaseException,
754
+ errorCode: errorCode,
756
755
  });
757
- throw __decorateServiceException(response, parsedBody.Error);
756
+ _d.label = 5;
757
+ case 5: return [2];
758
758
  }
759
759
  });
760
760
  }); };
@@ -777,7 +777,7 @@ export var deserializeAws_queryDescribeAlarmsForMetricCommand = function (output
777
777
  });
778
778
  }); };
779
779
  var deserializeAws_queryDescribeAlarmsForMetricCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
780
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
780
+ var parsedOutput, _a, errorCode, parsedBody;
781
781
  var _b;
782
782
  return __generator(this, function (_c) {
783
783
  switch (_c.label) {
@@ -788,18 +788,13 @@ var deserializeAws_queryDescribeAlarmsForMetricCommandError = function (output,
788
788
  case 1:
789
789
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
790
790
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
791
- switch (errorCode) {
792
- default:
793
- parsedBody = parsedOutput.body;
794
- $metadata = deserializeMetadata(output);
795
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
796
- response = new __BaseException({
797
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
798
- $fault: "client",
799
- $metadata: $metadata,
800
- });
801
- throw __decorateServiceException(response, parsedBody.Error);
802
- }
791
+ parsedBody = parsedOutput.body;
792
+ throwDefaultError({
793
+ output: output,
794
+ parsedBody: parsedBody.Error,
795
+ exceptionCtor: __BaseException,
796
+ errorCode: errorCode,
797
+ });
803
798
  return [2];
804
799
  }
805
800
  });
@@ -823,7 +818,7 @@ export var deserializeAws_queryDescribeAnomalyDetectorsCommand = function (outpu
823
818
  });
824
819
  }); };
825
820
  var deserializeAws_queryDescribeAnomalyDetectorsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
826
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
821
+ var parsedOutput, _a, errorCode, _b, parsedBody;
827
822
  var _c;
828
823
  return __generator(this, function (_d) {
829
824
  switch (_d.label) {
@@ -856,14 +851,14 @@ var deserializeAws_queryDescribeAnomalyDetectorsCommandError = function (output,
856
851
  case 9: throw _d.sent();
857
852
  case 10:
858
853
  parsedBody = parsedOutput.body;
859
- $metadata = deserializeMetadata(output);
860
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
861
- response = new __BaseException({
862
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
863
- $fault: "client",
864
- $metadata: $metadata,
854
+ throwDefaultError({
855
+ output: output,
856
+ parsedBody: parsedBody.Error,
857
+ exceptionCtor: __BaseException,
858
+ errorCode: errorCode,
865
859
  });
866
- throw __decorateServiceException(response, parsedBody.Error);
860
+ _d.label = 11;
861
+ case 11: return [2];
867
862
  }
868
863
  });
869
864
  }); };
@@ -886,7 +881,7 @@ export var deserializeAws_queryDescribeInsightRulesCommand = function (output, c
886
881
  });
887
882
  }); };
888
883
  var deserializeAws_queryDescribeInsightRulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
889
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
884
+ var parsedOutput, _a, errorCode, _b, parsedBody;
890
885
  var _c;
891
886
  return __generator(this, function (_d) {
892
887
  switch (_d.label) {
@@ -907,14 +902,14 @@ var deserializeAws_queryDescribeInsightRulesCommandError = function (output, con
907
902
  case 3: throw _d.sent();
908
903
  case 4:
909
904
  parsedBody = parsedOutput.body;
910
- $metadata = deserializeMetadata(output);
911
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
912
- response = new __BaseException({
913
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
914
- $fault: "client",
915
- $metadata: $metadata,
905
+ throwDefaultError({
906
+ output: output,
907
+ parsedBody: parsedBody.Error,
908
+ exceptionCtor: __BaseException,
909
+ errorCode: errorCode,
916
910
  });
917
- throw __decorateServiceException(response, parsedBody.Error);
911
+ _d.label = 5;
912
+ case 5: return [2];
918
913
  }
919
914
  });
920
915
  }); };
@@ -937,7 +932,7 @@ export var deserializeAws_queryDisableAlarmActionsCommand = function (output, co
937
932
  });
938
933
  }); };
939
934
  var deserializeAws_queryDisableAlarmActionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
940
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
935
+ var parsedOutput, _a, errorCode, parsedBody;
941
936
  var _b;
942
937
  return __generator(this, function (_c) {
943
938
  switch (_c.label) {
@@ -948,18 +943,13 @@ var deserializeAws_queryDisableAlarmActionsCommandError = function (output, cont
948
943
  case 1:
949
944
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
950
945
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
951
- switch (errorCode) {
952
- default:
953
- parsedBody = parsedOutput.body;
954
- $metadata = deserializeMetadata(output);
955
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
956
- response = new __BaseException({
957
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
958
- $fault: "client",
959
- $metadata: $metadata,
960
- });
961
- throw __decorateServiceException(response, parsedBody.Error);
962
- }
946
+ parsedBody = parsedOutput.body;
947
+ throwDefaultError({
948
+ output: output,
949
+ parsedBody: parsedBody.Error,
950
+ exceptionCtor: __BaseException,
951
+ errorCode: errorCode,
952
+ });
963
953
  return [2];
964
954
  }
965
955
  });
@@ -983,7 +973,7 @@ export var deserializeAws_queryDisableInsightRulesCommand = function (output, co
983
973
  });
984
974
  }); };
985
975
  var deserializeAws_queryDisableInsightRulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
986
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
976
+ var parsedOutput, _a, errorCode, _b, parsedBody;
987
977
  var _c;
988
978
  return __generator(this, function (_d) {
989
979
  switch (_d.label) {
@@ -1008,14 +998,14 @@ var deserializeAws_queryDisableInsightRulesCommandError = function (output, cont
1008
998
  case 5: throw _d.sent();
1009
999
  case 6:
1010
1000
  parsedBody = parsedOutput.body;
1011
- $metadata = deserializeMetadata(output);
1012
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1013
- response = new __BaseException({
1014
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1015
- $fault: "client",
1016
- $metadata: $metadata,
1001
+ throwDefaultError({
1002
+ output: output,
1003
+ parsedBody: parsedBody.Error,
1004
+ exceptionCtor: __BaseException,
1005
+ errorCode: errorCode,
1017
1006
  });
1018
- throw __decorateServiceException(response, parsedBody.Error);
1007
+ _d.label = 7;
1008
+ case 7: return [2];
1019
1009
  }
1020
1010
  });
1021
1011
  }); };
@@ -1038,7 +1028,7 @@ export var deserializeAws_queryEnableAlarmActionsCommand = function (output, con
1038
1028
  });
1039
1029
  }); };
1040
1030
  var deserializeAws_queryEnableAlarmActionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1041
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
1031
+ var parsedOutput, _a, errorCode, parsedBody;
1042
1032
  var _b;
1043
1033
  return __generator(this, function (_c) {
1044
1034
  switch (_c.label) {
@@ -1049,18 +1039,13 @@ var deserializeAws_queryEnableAlarmActionsCommandError = function (output, conte
1049
1039
  case 1:
1050
1040
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
1051
1041
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
1052
- switch (errorCode) {
1053
- default:
1054
- parsedBody = parsedOutput.body;
1055
- $metadata = deserializeMetadata(output);
1056
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1057
- response = new __BaseException({
1058
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1059
- $fault: "client",
1060
- $metadata: $metadata,
1061
- });
1062
- throw __decorateServiceException(response, parsedBody.Error);
1063
- }
1042
+ parsedBody = parsedOutput.body;
1043
+ throwDefaultError({
1044
+ output: output,
1045
+ parsedBody: parsedBody.Error,
1046
+ exceptionCtor: __BaseException,
1047
+ errorCode: errorCode,
1048
+ });
1064
1049
  return [2];
1065
1050
  }
1066
1051
  });
@@ -1084,7 +1069,7 @@ export var deserializeAws_queryEnableInsightRulesCommand = function (output, con
1084
1069
  });
1085
1070
  }); };
1086
1071
  var deserializeAws_queryEnableInsightRulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1087
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1072
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1088
1073
  var _c;
1089
1074
  return __generator(this, function (_d) {
1090
1075
  switch (_d.label) {
@@ -1113,14 +1098,14 @@ var deserializeAws_queryEnableInsightRulesCommandError = function (output, conte
1113
1098
  case 7: throw _d.sent();
1114
1099
  case 8:
1115
1100
  parsedBody = parsedOutput.body;
1116
- $metadata = deserializeMetadata(output);
1117
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1118
- response = new __BaseException({
1119
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1120
- $fault: "client",
1121
- $metadata: $metadata,
1101
+ throwDefaultError({
1102
+ output: output,
1103
+ parsedBody: parsedBody.Error,
1104
+ exceptionCtor: __BaseException,
1105
+ errorCode: errorCode,
1122
1106
  });
1123
- throw __decorateServiceException(response, parsedBody.Error);
1107
+ _d.label = 9;
1108
+ case 9: return [2];
1124
1109
  }
1125
1110
  });
1126
1111
  }); };
@@ -1143,7 +1128,7 @@ export var deserializeAws_queryGetDashboardCommand = function (output, context)
1143
1128
  });
1144
1129
  }); };
1145
1130
  var deserializeAws_queryGetDashboardCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1146
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1131
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1147
1132
  var _c;
1148
1133
  return __generator(this, function (_d) {
1149
1134
  switch (_d.label) {
@@ -1172,14 +1157,14 @@ var deserializeAws_queryGetDashboardCommandError = function (output, context) {
1172
1157
  case 7: throw _d.sent();
1173
1158
  case 8:
1174
1159
  parsedBody = parsedOutput.body;
1175
- $metadata = deserializeMetadata(output);
1176
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1177
- response = new __BaseException({
1178
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1179
- $fault: "client",
1180
- $metadata: $metadata,
1160
+ throwDefaultError({
1161
+ output: output,
1162
+ parsedBody: parsedBody.Error,
1163
+ exceptionCtor: __BaseException,
1164
+ errorCode: errorCode,
1181
1165
  });
1182
- throw __decorateServiceException(response, parsedBody.Error);
1166
+ _d.label = 9;
1167
+ case 9: return [2];
1183
1168
  }
1184
1169
  });
1185
1170
  }); };
@@ -1202,7 +1187,7 @@ export var deserializeAws_queryGetInsightRuleReportCommand = function (output, c
1202
1187
  });
1203
1188
  }); };
1204
1189
  var deserializeAws_queryGetInsightRuleReportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1205
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1190
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1206
1191
  var _c;
1207
1192
  return __generator(this, function (_d) {
1208
1193
  switch (_d.label) {
@@ -1231,14 +1216,14 @@ var deserializeAws_queryGetInsightRuleReportCommandError = function (output, con
1231
1216
  case 7: throw _d.sent();
1232
1217
  case 8:
1233
1218
  parsedBody = parsedOutput.body;
1234
- $metadata = deserializeMetadata(output);
1235
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1236
- response = new __BaseException({
1237
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1238
- $fault: "client",
1239
- $metadata: $metadata,
1219
+ throwDefaultError({
1220
+ output: output,
1221
+ parsedBody: parsedBody.Error,
1222
+ exceptionCtor: __BaseException,
1223
+ errorCode: errorCode,
1240
1224
  });
1241
- throw __decorateServiceException(response, parsedBody.Error);
1225
+ _d.label = 9;
1226
+ case 9: return [2];
1242
1227
  }
1243
1228
  });
1244
1229
  }); };
@@ -1261,7 +1246,7 @@ export var deserializeAws_queryGetMetricDataCommand = function (output, context)
1261
1246
  });
1262
1247
  }); };
1263
1248
  var deserializeAws_queryGetMetricDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1264
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1249
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1265
1250
  var _c;
1266
1251
  return __generator(this, function (_d) {
1267
1252
  switch (_d.label) {
@@ -1282,14 +1267,14 @@ var deserializeAws_queryGetMetricDataCommandError = function (output, context) {
1282
1267
  case 3: throw _d.sent();
1283
1268
  case 4:
1284
1269
  parsedBody = parsedOutput.body;
1285
- $metadata = deserializeMetadata(output);
1286
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1287
- response = new __BaseException({
1288
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1289
- $fault: "client",
1290
- $metadata: $metadata,
1270
+ throwDefaultError({
1271
+ output: output,
1272
+ parsedBody: parsedBody.Error,
1273
+ exceptionCtor: __BaseException,
1274
+ errorCode: errorCode,
1291
1275
  });
1292
- throw __decorateServiceException(response, parsedBody.Error);
1276
+ _d.label = 5;
1277
+ case 5: return [2];
1293
1278
  }
1294
1279
  });
1295
1280
  }); };
@@ -1312,7 +1297,7 @@ export var deserializeAws_queryGetMetricStatisticsCommand = function (output, co
1312
1297
  });
1313
1298
  }); };
1314
1299
  var deserializeAws_queryGetMetricStatisticsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1315
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1300
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1316
1301
  var _c;
1317
1302
  return __generator(this, function (_d) {
1318
1303
  switch (_d.label) {
@@ -1345,14 +1330,14 @@ var deserializeAws_queryGetMetricStatisticsCommandError = function (output, cont
1345
1330
  case 9: throw _d.sent();
1346
1331
  case 10:
1347
1332
  parsedBody = parsedOutput.body;
1348
- $metadata = deserializeMetadata(output);
1349
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1350
- response = new __BaseException({
1351
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1352
- $fault: "client",
1353
- $metadata: $metadata,
1333
+ throwDefaultError({
1334
+ output: output,
1335
+ parsedBody: parsedBody.Error,
1336
+ exceptionCtor: __BaseException,
1337
+ errorCode: errorCode,
1354
1338
  });
1355
- throw __decorateServiceException(response, parsedBody.Error);
1339
+ _d.label = 11;
1340
+ case 11: return [2];
1356
1341
  }
1357
1342
  });
1358
1343
  }); };
@@ -1375,7 +1360,7 @@ export var deserializeAws_queryGetMetricStreamCommand = function (output, contex
1375
1360
  });
1376
1361
  }); };
1377
1362
  var deserializeAws_queryGetMetricStreamCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1378
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1363
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1379
1364
  var _c;
1380
1365
  return __generator(this, function (_d) {
1381
1366
  switch (_d.label) {
@@ -1412,14 +1397,14 @@ var deserializeAws_queryGetMetricStreamCommandError = function (output, context)
1412
1397
  case 11: throw _d.sent();
1413
1398
  case 12:
1414
1399
  parsedBody = parsedOutput.body;
1415
- $metadata = deserializeMetadata(output);
1416
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1417
- response = new __BaseException({
1418
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1419
- $fault: "client",
1420
- $metadata: $metadata,
1400
+ throwDefaultError({
1401
+ output: output,
1402
+ parsedBody: parsedBody.Error,
1403
+ exceptionCtor: __BaseException,
1404
+ errorCode: errorCode,
1421
1405
  });
1422
- throw __decorateServiceException(response, parsedBody.Error);
1406
+ _d.label = 13;
1407
+ case 13: return [2];
1423
1408
  }
1424
1409
  });
1425
1410
  }); };
@@ -1442,7 +1427,7 @@ export var deserializeAws_queryGetMetricWidgetImageCommand = function (output, c
1442
1427
  });
1443
1428
  }); };
1444
1429
  var deserializeAws_queryGetMetricWidgetImageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1445
- var parsedOutput, _a, response, errorCode, parsedBody, $metadata, statusCode;
1430
+ var parsedOutput, _a, errorCode, parsedBody;
1446
1431
  var _b;
1447
1432
  return __generator(this, function (_c) {
1448
1433
  switch (_c.label) {
@@ -1453,18 +1438,13 @@ var deserializeAws_queryGetMetricWidgetImageCommandError = function (output, con
1453
1438
  case 1:
1454
1439
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
1455
1440
  errorCode = loadQueryErrorCode(output, parsedOutput.body);
1456
- switch (errorCode) {
1457
- default:
1458
- parsedBody = parsedOutput.body;
1459
- $metadata = deserializeMetadata(output);
1460
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1461
- response = new __BaseException({
1462
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1463
- $fault: "client",
1464
- $metadata: $metadata,
1465
- });
1466
- throw __decorateServiceException(response, parsedBody.Error);
1467
- }
1441
+ parsedBody = parsedOutput.body;
1442
+ throwDefaultError({
1443
+ output: output,
1444
+ parsedBody: parsedBody.Error,
1445
+ exceptionCtor: __BaseException,
1446
+ errorCode: errorCode,
1447
+ });
1468
1448
  return [2];
1469
1449
  }
1470
1450
  });
@@ -1488,7 +1468,7 @@ export var deserializeAws_queryListDashboardsCommand = function (output, context
1488
1468
  });
1489
1469
  }); };
1490
1470
  var deserializeAws_queryListDashboardsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1491
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1471
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1492
1472
  var _c;
1493
1473
  return __generator(this, function (_d) {
1494
1474
  switch (_d.label) {
@@ -1513,14 +1493,14 @@ var deserializeAws_queryListDashboardsCommandError = function (output, context)
1513
1493
  case 5: throw _d.sent();
1514
1494
  case 6:
1515
1495
  parsedBody = parsedOutput.body;
1516
- $metadata = deserializeMetadata(output);
1517
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1518
- response = new __BaseException({
1519
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1520
- $fault: "client",
1521
- $metadata: $metadata,
1496
+ throwDefaultError({
1497
+ output: output,
1498
+ parsedBody: parsedBody.Error,
1499
+ exceptionCtor: __BaseException,
1500
+ errorCode: errorCode,
1522
1501
  });
1523
- throw __decorateServiceException(response, parsedBody.Error);
1502
+ _d.label = 7;
1503
+ case 7: return [2];
1524
1504
  }
1525
1505
  });
1526
1506
  }); };
@@ -1543,7 +1523,7 @@ export var deserializeAws_queryListMetricsCommand = function (output, context) {
1543
1523
  });
1544
1524
  }); };
1545
1525
  var deserializeAws_queryListMetricsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1546
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1526
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1547
1527
  var _c;
1548
1528
  return __generator(this, function (_d) {
1549
1529
  switch (_d.label) {
@@ -1568,14 +1548,14 @@ var deserializeAws_queryListMetricsCommandError = function (output, context) { r
1568
1548
  case 5: throw _d.sent();
1569
1549
  case 6:
1570
1550
  parsedBody = parsedOutput.body;
1571
- $metadata = deserializeMetadata(output);
1572
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1573
- response = new __BaseException({
1574
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1575
- $fault: "client",
1576
- $metadata: $metadata,
1551
+ throwDefaultError({
1552
+ output: output,
1553
+ parsedBody: parsedBody.Error,
1554
+ exceptionCtor: __BaseException,
1555
+ errorCode: errorCode,
1577
1556
  });
1578
- throw __decorateServiceException(response, parsedBody.Error);
1557
+ _d.label = 7;
1558
+ case 7: return [2];
1579
1559
  }
1580
1560
  });
1581
1561
  }); };
@@ -1598,7 +1578,7 @@ export var deserializeAws_queryListMetricStreamsCommand = function (output, cont
1598
1578
  });
1599
1579
  }); };
1600
1580
  var deserializeAws_queryListMetricStreamsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1601
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1581
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1602
1582
  var _c;
1603
1583
  return __generator(this, function (_d) {
1604
1584
  switch (_d.label) {
@@ -1631,14 +1611,14 @@ var deserializeAws_queryListMetricStreamsCommandError = function (output, contex
1631
1611
  case 9: throw _d.sent();
1632
1612
  case 10:
1633
1613
  parsedBody = parsedOutput.body;
1634
- $metadata = deserializeMetadata(output);
1635
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1636
- response = new __BaseException({
1637
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1638
- $fault: "client",
1639
- $metadata: $metadata,
1614
+ throwDefaultError({
1615
+ output: output,
1616
+ parsedBody: parsedBody.Error,
1617
+ exceptionCtor: __BaseException,
1618
+ errorCode: errorCode,
1640
1619
  });
1641
- throw __decorateServiceException(response, parsedBody.Error);
1620
+ _d.label = 11;
1621
+ case 11: return [2];
1642
1622
  }
1643
1623
  });
1644
1624
  }); };
@@ -1661,7 +1641,7 @@ export var deserializeAws_queryListTagsForResourceCommand = function (output, co
1661
1641
  });
1662
1642
  }); };
1663
1643
  var deserializeAws_queryListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1664
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1644
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1665
1645
  var _c;
1666
1646
  return __generator(this, function (_d) {
1667
1647
  switch (_d.label) {
@@ -1690,14 +1670,14 @@ var deserializeAws_queryListTagsForResourceCommandError = function (output, cont
1690
1670
  case 7: throw _d.sent();
1691
1671
  case 8:
1692
1672
  parsedBody = parsedOutput.body;
1693
- $metadata = deserializeMetadata(output);
1694
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1695
- response = new __BaseException({
1696
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1697
- $fault: "client",
1698
- $metadata: $metadata,
1673
+ throwDefaultError({
1674
+ output: output,
1675
+ parsedBody: parsedBody.Error,
1676
+ exceptionCtor: __BaseException,
1677
+ errorCode: errorCode,
1699
1678
  });
1700
- throw __decorateServiceException(response, parsedBody.Error);
1679
+ _d.label = 9;
1680
+ case 9: return [2];
1701
1681
  }
1702
1682
  });
1703
1683
  }); };
@@ -1720,7 +1700,7 @@ export var deserializeAws_queryPutAnomalyDetectorCommand = function (output, con
1720
1700
  });
1721
1701
  }); };
1722
1702
  var deserializeAws_queryPutAnomalyDetectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1723
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1703
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1724
1704
  var _c;
1725
1705
  return __generator(this, function (_d) {
1726
1706
  switch (_d.label) {
@@ -1757,14 +1737,14 @@ var deserializeAws_queryPutAnomalyDetectorCommandError = function (output, conte
1757
1737
  case 11: throw _d.sent();
1758
1738
  case 12:
1759
1739
  parsedBody = parsedOutput.body;
1760
- $metadata = deserializeMetadata(output);
1761
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1762
- response = new __BaseException({
1763
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1764
- $fault: "client",
1765
- $metadata: $metadata,
1740
+ throwDefaultError({
1741
+ output: output,
1742
+ parsedBody: parsedBody.Error,
1743
+ exceptionCtor: __BaseException,
1744
+ errorCode: errorCode,
1766
1745
  });
1767
- throw __decorateServiceException(response, parsedBody.Error);
1746
+ _d.label = 13;
1747
+ case 13: return [2];
1768
1748
  }
1769
1749
  });
1770
1750
  }); };
@@ -1787,7 +1767,7 @@ export var deserializeAws_queryPutCompositeAlarmCommand = function (output, cont
1787
1767
  });
1788
1768
  }); };
1789
1769
  var deserializeAws_queryPutCompositeAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1790
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1770
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1791
1771
  var _c;
1792
1772
  return __generator(this, function (_d) {
1793
1773
  switch (_d.label) {
@@ -1808,14 +1788,14 @@ var deserializeAws_queryPutCompositeAlarmCommandError = function (output, contex
1808
1788
  case 3: throw _d.sent();
1809
1789
  case 4:
1810
1790
  parsedBody = parsedOutput.body;
1811
- $metadata = deserializeMetadata(output);
1812
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1813
- response = new __BaseException({
1814
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1815
- $fault: "client",
1816
- $metadata: $metadata,
1791
+ throwDefaultError({
1792
+ output: output,
1793
+ parsedBody: parsedBody.Error,
1794
+ exceptionCtor: __BaseException,
1795
+ errorCode: errorCode,
1817
1796
  });
1818
- throw __decorateServiceException(response, parsedBody.Error);
1797
+ _d.label = 5;
1798
+ case 5: return [2];
1819
1799
  }
1820
1800
  });
1821
1801
  }); };
@@ -1838,7 +1818,7 @@ export var deserializeAws_queryPutDashboardCommand = function (output, context)
1838
1818
  });
1839
1819
  }); };
1840
1820
  var deserializeAws_queryPutDashboardCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1841
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1821
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1842
1822
  var _c;
1843
1823
  return __generator(this, function (_d) {
1844
1824
  switch (_d.label) {
@@ -1863,14 +1843,14 @@ var deserializeAws_queryPutDashboardCommandError = function (output, context) {
1863
1843
  case 5: throw _d.sent();
1864
1844
  case 6:
1865
1845
  parsedBody = parsedOutput.body;
1866
- $metadata = deserializeMetadata(output);
1867
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1868
- response = new __BaseException({
1869
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1870
- $fault: "client",
1871
- $metadata: $metadata,
1846
+ throwDefaultError({
1847
+ output: output,
1848
+ parsedBody: parsedBody.Error,
1849
+ exceptionCtor: __BaseException,
1850
+ errorCode: errorCode,
1872
1851
  });
1873
- throw __decorateServiceException(response, parsedBody.Error);
1852
+ _d.label = 7;
1853
+ case 7: return [2];
1874
1854
  }
1875
1855
  });
1876
1856
  }); };
@@ -1893,7 +1873,7 @@ export var deserializeAws_queryPutInsightRuleCommand = function (output, context
1893
1873
  });
1894
1874
  }); };
1895
1875
  var deserializeAws_queryPutInsightRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1896
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1876
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1897
1877
  var _c;
1898
1878
  return __generator(this, function (_d) {
1899
1879
  switch (_d.label) {
@@ -1922,14 +1902,14 @@ var deserializeAws_queryPutInsightRuleCommandError = function (output, context)
1922
1902
  case 7: throw _d.sent();
1923
1903
  case 8:
1924
1904
  parsedBody = parsedOutput.body;
1925
- $metadata = deserializeMetadata(output);
1926
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1927
- response = new __BaseException({
1928
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1929
- $fault: "client",
1930
- $metadata: $metadata,
1905
+ throwDefaultError({
1906
+ output: output,
1907
+ parsedBody: parsedBody.Error,
1908
+ exceptionCtor: __BaseException,
1909
+ errorCode: errorCode,
1931
1910
  });
1932
- throw __decorateServiceException(response, parsedBody.Error);
1911
+ _d.label = 9;
1912
+ case 9: return [2];
1933
1913
  }
1934
1914
  });
1935
1915
  }); };
@@ -1952,7 +1932,7 @@ export var deserializeAws_queryPutMetricAlarmCommand = function (output, context
1952
1932
  });
1953
1933
  }); };
1954
1934
  var deserializeAws_queryPutMetricAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1955
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1935
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1956
1936
  var _c;
1957
1937
  return __generator(this, function (_d) {
1958
1938
  switch (_d.label) {
@@ -1973,14 +1953,14 @@ var deserializeAws_queryPutMetricAlarmCommandError = function (output, context)
1973
1953
  case 3: throw _d.sent();
1974
1954
  case 4:
1975
1955
  parsedBody = parsedOutput.body;
1976
- $metadata = deserializeMetadata(output);
1977
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1978
- response = new __BaseException({
1979
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1980
- $fault: "client",
1981
- $metadata: $metadata,
1956
+ throwDefaultError({
1957
+ output: output,
1958
+ parsedBody: parsedBody.Error,
1959
+ exceptionCtor: __BaseException,
1960
+ errorCode: errorCode,
1982
1961
  });
1983
- throw __decorateServiceException(response, parsedBody.Error);
1962
+ _d.label = 5;
1963
+ case 5: return [2];
1984
1964
  }
1985
1965
  });
1986
1966
  }); };
@@ -2003,7 +1983,7 @@ export var deserializeAws_queryPutMetricDataCommand = function (output, context)
2003
1983
  });
2004
1984
  }); };
2005
1985
  var deserializeAws_queryPutMetricDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2006
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1986
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2007
1987
  var _c;
2008
1988
  return __generator(this, function (_d) {
2009
1989
  switch (_d.label) {
@@ -2036,14 +2016,14 @@ var deserializeAws_queryPutMetricDataCommandError = function (output, context) {
2036
2016
  case 9: throw _d.sent();
2037
2017
  case 10:
2038
2018
  parsedBody = parsedOutput.body;
2039
- $metadata = deserializeMetadata(output);
2040
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2041
- response = new __BaseException({
2042
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2043
- $fault: "client",
2044
- $metadata: $metadata,
2019
+ throwDefaultError({
2020
+ output: output,
2021
+ parsedBody: parsedBody.Error,
2022
+ exceptionCtor: __BaseException,
2023
+ errorCode: errorCode,
2045
2024
  });
2046
- throw __decorateServiceException(response, parsedBody.Error);
2025
+ _d.label = 11;
2026
+ case 11: return [2];
2047
2027
  }
2048
2028
  });
2049
2029
  }); };
@@ -2066,7 +2046,7 @@ export var deserializeAws_queryPutMetricStreamCommand = function (output, contex
2066
2046
  });
2067
2047
  }); };
2068
2048
  var deserializeAws_queryPutMetricStreamCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2069
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2049
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2070
2050
  var _c;
2071
2051
  return __generator(this, function (_d) {
2072
2052
  switch (_d.label) {
@@ -2103,14 +2083,14 @@ var deserializeAws_queryPutMetricStreamCommandError = function (output, context)
2103
2083
  case 11: throw _d.sent();
2104
2084
  case 12:
2105
2085
  parsedBody = parsedOutput.body;
2106
- $metadata = deserializeMetadata(output);
2107
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2108
- response = new __BaseException({
2109
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2110
- $fault: "client",
2111
- $metadata: $metadata,
2086
+ throwDefaultError({
2087
+ output: output,
2088
+ parsedBody: parsedBody.Error,
2089
+ exceptionCtor: __BaseException,
2090
+ errorCode: errorCode,
2112
2091
  });
2113
- throw __decorateServiceException(response, parsedBody.Error);
2092
+ _d.label = 13;
2093
+ case 13: return [2];
2114
2094
  }
2115
2095
  });
2116
2096
  }); };
@@ -2133,7 +2113,7 @@ export var deserializeAws_querySetAlarmStateCommand = function (output, context)
2133
2113
  });
2134
2114
  }); };
2135
2115
  var deserializeAws_querySetAlarmStateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2136
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2116
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2137
2117
  var _c;
2138
2118
  return __generator(this, function (_d) {
2139
2119
  switch (_d.label) {
@@ -2158,14 +2138,14 @@ var deserializeAws_querySetAlarmStateCommandError = function (output, context) {
2158
2138
  case 5: throw _d.sent();
2159
2139
  case 6:
2160
2140
  parsedBody = parsedOutput.body;
2161
- $metadata = deserializeMetadata(output);
2162
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2163
- response = new __BaseException({
2164
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2165
- $fault: "client",
2166
- $metadata: $metadata,
2141
+ throwDefaultError({
2142
+ output: output,
2143
+ parsedBody: parsedBody.Error,
2144
+ exceptionCtor: __BaseException,
2145
+ errorCode: errorCode,
2167
2146
  });
2168
- throw __decorateServiceException(response, parsedBody.Error);
2147
+ _d.label = 7;
2148
+ case 7: return [2];
2169
2149
  }
2170
2150
  });
2171
2151
  }); };
@@ -2188,7 +2168,7 @@ export var deserializeAws_queryStartMetricStreamsCommand = function (output, con
2188
2168
  });
2189
2169
  }); };
2190
2170
  var deserializeAws_queryStartMetricStreamsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2191
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2171
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2192
2172
  var _c;
2193
2173
  return __generator(this, function (_d) {
2194
2174
  switch (_d.label) {
@@ -2217,14 +2197,14 @@ var deserializeAws_queryStartMetricStreamsCommandError = function (output, conte
2217
2197
  case 7: throw _d.sent();
2218
2198
  case 8:
2219
2199
  parsedBody = parsedOutput.body;
2220
- $metadata = deserializeMetadata(output);
2221
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2222
- response = new __BaseException({
2223
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2224
- $fault: "client",
2225
- $metadata: $metadata,
2200
+ throwDefaultError({
2201
+ output: output,
2202
+ parsedBody: parsedBody.Error,
2203
+ exceptionCtor: __BaseException,
2204
+ errorCode: errorCode,
2226
2205
  });
2227
- throw __decorateServiceException(response, parsedBody.Error);
2206
+ _d.label = 9;
2207
+ case 9: return [2];
2228
2208
  }
2229
2209
  });
2230
2210
  }); };
@@ -2247,7 +2227,7 @@ export var deserializeAws_queryStopMetricStreamsCommand = function (output, cont
2247
2227
  });
2248
2228
  }); };
2249
2229
  var deserializeAws_queryStopMetricStreamsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2250
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2230
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2251
2231
  var _c;
2252
2232
  return __generator(this, function (_d) {
2253
2233
  switch (_d.label) {
@@ -2276,14 +2256,14 @@ var deserializeAws_queryStopMetricStreamsCommandError = function (output, contex
2276
2256
  case 7: throw _d.sent();
2277
2257
  case 8:
2278
2258
  parsedBody = parsedOutput.body;
2279
- $metadata = deserializeMetadata(output);
2280
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2281
- response = new __BaseException({
2282
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2283
- $fault: "client",
2284
- $metadata: $metadata,
2259
+ throwDefaultError({
2260
+ output: output,
2261
+ parsedBody: parsedBody.Error,
2262
+ exceptionCtor: __BaseException,
2263
+ errorCode: errorCode,
2285
2264
  });
2286
- throw __decorateServiceException(response, parsedBody.Error);
2265
+ _d.label = 9;
2266
+ case 9: return [2];
2287
2267
  }
2288
2268
  });
2289
2269
  }); };
@@ -2306,7 +2286,7 @@ export var deserializeAws_queryTagResourceCommand = function (output, context) {
2306
2286
  });
2307
2287
  }); };
2308
2288
  var deserializeAws_queryTagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2309
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2289
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2310
2290
  var _c;
2311
2291
  return __generator(this, function (_d) {
2312
2292
  switch (_d.label) {
@@ -2339,14 +2319,14 @@ var deserializeAws_queryTagResourceCommandError = function (output, context) { r
2339
2319
  case 9: throw _d.sent();
2340
2320
  case 10:
2341
2321
  parsedBody = parsedOutput.body;
2342
- $metadata = deserializeMetadata(output);
2343
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2344
- response = new __BaseException({
2345
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2346
- $fault: "client",
2347
- $metadata: $metadata,
2322
+ throwDefaultError({
2323
+ output: output,
2324
+ parsedBody: parsedBody.Error,
2325
+ exceptionCtor: __BaseException,
2326
+ errorCode: errorCode,
2348
2327
  });
2349
- throw __decorateServiceException(response, parsedBody.Error);
2328
+ _d.label = 11;
2329
+ case 11: return [2];
2350
2330
  }
2351
2331
  });
2352
2332
  }); };
@@ -2369,7 +2349,7 @@ export var deserializeAws_queryUntagResourceCommand = function (output, context)
2369
2349
  });
2370
2350
  }); };
2371
2351
  var deserializeAws_queryUntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2372
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2352
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2373
2353
  var _c;
2374
2354
  return __generator(this, function (_d) {
2375
2355
  switch (_d.label) {
@@ -2402,14 +2382,14 @@ var deserializeAws_queryUntagResourceCommandError = function (output, context) {
2402
2382
  case 9: throw _d.sent();
2403
2383
  case 10:
2404
2384
  parsedBody = parsedOutput.body;
2405
- $metadata = deserializeMetadata(output);
2406
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2407
- response = new __BaseException({
2408
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2409
- $fault: "client",
2410
- $metadata: $metadata,
2385
+ throwDefaultError({
2386
+ output: output,
2387
+ parsedBody: parsedBody.Error,
2388
+ exceptionCtor: __BaseException,
2389
+ errorCode: errorCode,
2411
2390
  });
2412
- throw __decorateServiceException(response, parsedBody.Error);
2391
+ _d.label = 11;
2392
+ case 11: return [2];
2413
2393
  }
2414
2394
  });
2415
2395
  }); };
@@ -2578,7 +2558,7 @@ var serializeAws_queryAlarmTypes = function (input, context) {
2578
2558
  };
2579
2559
  var serializeAws_queryAnomalyDetectorConfiguration = function (input, context) {
2580
2560
  var entries = {};
2581
- if (input.ExcludedTimeRanges !== undefined && input.ExcludedTimeRanges !== null) {
2561
+ if (input.ExcludedTimeRanges != null) {
2582
2562
  var memberEntries = serializeAws_queryAnomalyDetectorExcludedTimeRanges(input.ExcludedTimeRanges, context);
2583
2563
  Object.entries(memberEntries).forEach(function (_a) {
2584
2564
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2586,7 +2566,7 @@ var serializeAws_queryAnomalyDetectorConfiguration = function (input, context) {
2586
2566
  entries[loc] = value;
2587
2567
  });
2588
2568
  }
2589
- if (input.MetricTimezone !== undefined && input.MetricTimezone !== null) {
2569
+ if (input.MetricTimezone != null) {
2590
2570
  entries["MetricTimezone"] = input.MetricTimezone;
2591
2571
  }
2592
2572
  return entries;
@@ -2689,7 +2669,7 @@ var serializeAws_queryDashboardNames = function (input, context) {
2689
2669
  };
2690
2670
  var serializeAws_queryDeleteAlarmsInput = function (input, context) {
2691
2671
  var entries = {};
2692
- if (input.AlarmNames !== undefined && input.AlarmNames !== null) {
2672
+ if (input.AlarmNames != null) {
2693
2673
  var memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2694
2674
  Object.entries(memberEntries).forEach(function (_a) {
2695
2675
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2701,13 +2681,13 @@ var serializeAws_queryDeleteAlarmsInput = function (input, context) {
2701
2681
  };
2702
2682
  var serializeAws_queryDeleteAnomalyDetectorInput = function (input, context) {
2703
2683
  var entries = {};
2704
- if (input.Namespace !== undefined && input.Namespace !== null) {
2684
+ if (input.Namespace != null) {
2705
2685
  entries["Namespace"] = input.Namespace;
2706
2686
  }
2707
- if (input.MetricName !== undefined && input.MetricName !== null) {
2687
+ if (input.MetricName != null) {
2708
2688
  entries["MetricName"] = input.MetricName;
2709
2689
  }
2710
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2690
+ if (input.Dimensions != null) {
2711
2691
  var memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2712
2692
  Object.entries(memberEntries).forEach(function (_a) {
2713
2693
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2715,10 +2695,10 @@ var serializeAws_queryDeleteAnomalyDetectorInput = function (input, context) {
2715
2695
  entries[loc] = value;
2716
2696
  });
2717
2697
  }
2718
- if (input.Stat !== undefined && input.Stat !== null) {
2698
+ if (input.Stat != null) {
2719
2699
  entries["Stat"] = input.Stat;
2720
2700
  }
2721
- if (input.SingleMetricAnomalyDetector !== undefined && input.SingleMetricAnomalyDetector !== null) {
2701
+ if (input.SingleMetricAnomalyDetector != null) {
2722
2702
  var memberEntries = serializeAws_querySingleMetricAnomalyDetector(input.SingleMetricAnomalyDetector, context);
2723
2703
  Object.entries(memberEntries).forEach(function (_a) {
2724
2704
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2726,7 +2706,7 @@ var serializeAws_queryDeleteAnomalyDetectorInput = function (input, context) {
2726
2706
  entries[loc] = value;
2727
2707
  });
2728
2708
  }
2729
- if (input.MetricMathAnomalyDetector !== undefined && input.MetricMathAnomalyDetector !== null) {
2709
+ if (input.MetricMathAnomalyDetector != null) {
2730
2710
  var memberEntries = serializeAws_queryMetricMathAnomalyDetector(input.MetricMathAnomalyDetector, context);
2731
2711
  Object.entries(memberEntries).forEach(function (_a) {
2732
2712
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2738,7 +2718,7 @@ var serializeAws_queryDeleteAnomalyDetectorInput = function (input, context) {
2738
2718
  };
2739
2719
  var serializeAws_queryDeleteDashboardsInput = function (input, context) {
2740
2720
  var entries = {};
2741
- if (input.DashboardNames !== undefined && input.DashboardNames !== null) {
2721
+ if (input.DashboardNames != null) {
2742
2722
  var memberEntries = serializeAws_queryDashboardNames(input.DashboardNames, context);
2743
2723
  Object.entries(memberEntries).forEach(function (_a) {
2744
2724
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2750,7 +2730,7 @@ var serializeAws_queryDeleteDashboardsInput = function (input, context) {
2750
2730
  };
2751
2731
  var serializeAws_queryDeleteInsightRulesInput = function (input, context) {
2752
2732
  var entries = {};
2753
- if (input.RuleNames !== undefined && input.RuleNames !== null) {
2733
+ if (input.RuleNames != null) {
2754
2734
  var memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2755
2735
  Object.entries(memberEntries).forEach(function (_a) {
2756
2736
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2762,17 +2742,17 @@ var serializeAws_queryDeleteInsightRulesInput = function (input, context) {
2762
2742
  };
2763
2743
  var serializeAws_queryDeleteMetricStreamInput = function (input, context) {
2764
2744
  var entries = {};
2765
- if (input.Name !== undefined && input.Name !== null) {
2745
+ if (input.Name != null) {
2766
2746
  entries["Name"] = input.Name;
2767
2747
  }
2768
2748
  return entries;
2769
2749
  };
2770
2750
  var serializeAws_queryDescribeAlarmHistoryInput = function (input, context) {
2771
2751
  var entries = {};
2772
- if (input.AlarmName !== undefined && input.AlarmName !== null) {
2752
+ if (input.AlarmName != null) {
2773
2753
  entries["AlarmName"] = input.AlarmName;
2774
2754
  }
2775
- if (input.AlarmTypes !== undefined && input.AlarmTypes !== null) {
2755
+ if (input.AlarmTypes != null) {
2776
2756
  var memberEntries = serializeAws_queryAlarmTypes(input.AlarmTypes, context);
2777
2757
  Object.entries(memberEntries).forEach(function (_a) {
2778
2758
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2780,41 +2760,41 @@ var serializeAws_queryDescribeAlarmHistoryInput = function (input, context) {
2780
2760
  entries[loc] = value;
2781
2761
  });
2782
2762
  }
2783
- if (input.HistoryItemType !== undefined && input.HistoryItemType !== null) {
2763
+ if (input.HistoryItemType != null) {
2784
2764
  entries["HistoryItemType"] = input.HistoryItemType;
2785
2765
  }
2786
- if (input.StartDate !== undefined && input.StartDate !== null) {
2766
+ if (input.StartDate != null) {
2787
2767
  entries["StartDate"] = input.StartDate.toISOString().split(".")[0] + "Z";
2788
2768
  }
2789
- if (input.EndDate !== undefined && input.EndDate !== null) {
2769
+ if (input.EndDate != null) {
2790
2770
  entries["EndDate"] = input.EndDate.toISOString().split(".")[0] + "Z";
2791
2771
  }
2792
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
2772
+ if (input.MaxRecords != null) {
2793
2773
  entries["MaxRecords"] = input.MaxRecords;
2794
2774
  }
2795
- if (input.NextToken !== undefined && input.NextToken !== null) {
2775
+ if (input.NextToken != null) {
2796
2776
  entries["NextToken"] = input.NextToken;
2797
2777
  }
2798
- if (input.ScanBy !== undefined && input.ScanBy !== null) {
2778
+ if (input.ScanBy != null) {
2799
2779
  entries["ScanBy"] = input.ScanBy;
2800
2780
  }
2801
2781
  return entries;
2802
2782
  };
2803
2783
  var serializeAws_queryDescribeAlarmsForMetricInput = function (input, context) {
2804
2784
  var entries = {};
2805
- if (input.MetricName !== undefined && input.MetricName !== null) {
2785
+ if (input.MetricName != null) {
2806
2786
  entries["MetricName"] = input.MetricName;
2807
2787
  }
2808
- if (input.Namespace !== undefined && input.Namespace !== null) {
2788
+ if (input.Namespace != null) {
2809
2789
  entries["Namespace"] = input.Namespace;
2810
2790
  }
2811
- if (input.Statistic !== undefined && input.Statistic !== null) {
2791
+ if (input.Statistic != null) {
2812
2792
  entries["Statistic"] = input.Statistic;
2813
2793
  }
2814
- if (input.ExtendedStatistic !== undefined && input.ExtendedStatistic !== null) {
2794
+ if (input.ExtendedStatistic != null) {
2815
2795
  entries["ExtendedStatistic"] = input.ExtendedStatistic;
2816
2796
  }
2817
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2797
+ if (input.Dimensions != null) {
2818
2798
  var memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2819
2799
  Object.entries(memberEntries).forEach(function (_a) {
2820
2800
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2822,17 +2802,17 @@ var serializeAws_queryDescribeAlarmsForMetricInput = function (input, context) {
2822
2802
  entries[loc] = value;
2823
2803
  });
2824
2804
  }
2825
- if (input.Period !== undefined && input.Period !== null) {
2805
+ if (input.Period != null) {
2826
2806
  entries["Period"] = input.Period;
2827
2807
  }
2828
- if (input.Unit !== undefined && input.Unit !== null) {
2808
+ if (input.Unit != null) {
2829
2809
  entries["Unit"] = input.Unit;
2830
2810
  }
2831
2811
  return entries;
2832
2812
  };
2833
2813
  var serializeAws_queryDescribeAlarmsInput = function (input, context) {
2834
2814
  var entries = {};
2835
- if (input.AlarmNames !== undefined && input.AlarmNames !== null) {
2815
+ if (input.AlarmNames != null) {
2836
2816
  var memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2837
2817
  Object.entries(memberEntries).forEach(function (_a) {
2838
2818
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2840,10 +2820,10 @@ var serializeAws_queryDescribeAlarmsInput = function (input, context) {
2840
2820
  entries[loc] = value;
2841
2821
  });
2842
2822
  }
2843
- if (input.AlarmNamePrefix !== undefined && input.AlarmNamePrefix !== null) {
2823
+ if (input.AlarmNamePrefix != null) {
2844
2824
  entries["AlarmNamePrefix"] = input.AlarmNamePrefix;
2845
2825
  }
2846
- if (input.AlarmTypes !== undefined && input.AlarmTypes !== null) {
2826
+ if (input.AlarmTypes != null) {
2847
2827
  var memberEntries = serializeAws_queryAlarmTypes(input.AlarmTypes, context);
2848
2828
  Object.entries(memberEntries).forEach(function (_a) {
2849
2829
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2851,41 +2831,41 @@ var serializeAws_queryDescribeAlarmsInput = function (input, context) {
2851
2831
  entries[loc] = value;
2852
2832
  });
2853
2833
  }
2854
- if (input.ChildrenOfAlarmName !== undefined && input.ChildrenOfAlarmName !== null) {
2834
+ if (input.ChildrenOfAlarmName != null) {
2855
2835
  entries["ChildrenOfAlarmName"] = input.ChildrenOfAlarmName;
2856
2836
  }
2857
- if (input.ParentsOfAlarmName !== undefined && input.ParentsOfAlarmName !== null) {
2837
+ if (input.ParentsOfAlarmName != null) {
2858
2838
  entries["ParentsOfAlarmName"] = input.ParentsOfAlarmName;
2859
2839
  }
2860
- if (input.StateValue !== undefined && input.StateValue !== null) {
2840
+ if (input.StateValue != null) {
2861
2841
  entries["StateValue"] = input.StateValue;
2862
2842
  }
2863
- if (input.ActionPrefix !== undefined && input.ActionPrefix !== null) {
2843
+ if (input.ActionPrefix != null) {
2864
2844
  entries["ActionPrefix"] = input.ActionPrefix;
2865
2845
  }
2866
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
2846
+ if (input.MaxRecords != null) {
2867
2847
  entries["MaxRecords"] = input.MaxRecords;
2868
2848
  }
2869
- if (input.NextToken !== undefined && input.NextToken !== null) {
2849
+ if (input.NextToken != null) {
2870
2850
  entries["NextToken"] = input.NextToken;
2871
2851
  }
2872
2852
  return entries;
2873
2853
  };
2874
2854
  var serializeAws_queryDescribeAnomalyDetectorsInput = function (input, context) {
2875
2855
  var entries = {};
2876
- if (input.NextToken !== undefined && input.NextToken !== null) {
2856
+ if (input.NextToken != null) {
2877
2857
  entries["NextToken"] = input.NextToken;
2878
2858
  }
2879
- if (input.MaxResults !== undefined && input.MaxResults !== null) {
2859
+ if (input.MaxResults != null) {
2880
2860
  entries["MaxResults"] = input.MaxResults;
2881
2861
  }
2882
- if (input.Namespace !== undefined && input.Namespace !== null) {
2862
+ if (input.Namespace != null) {
2883
2863
  entries["Namespace"] = input.Namespace;
2884
2864
  }
2885
- if (input.MetricName !== undefined && input.MetricName !== null) {
2865
+ if (input.MetricName != null) {
2886
2866
  entries["MetricName"] = input.MetricName;
2887
2867
  }
2888
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2868
+ if (input.Dimensions != null) {
2889
2869
  var memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2890
2870
  Object.entries(memberEntries).forEach(function (_a) {
2891
2871
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2893,7 +2873,7 @@ var serializeAws_queryDescribeAnomalyDetectorsInput = function (input, context)
2893
2873
  entries[loc] = value;
2894
2874
  });
2895
2875
  }
2896
- if (input.AnomalyDetectorTypes !== undefined && input.AnomalyDetectorTypes !== null) {
2876
+ if (input.AnomalyDetectorTypes != null) {
2897
2877
  var memberEntries = serializeAws_queryAnomalyDetectorTypes(input.AnomalyDetectorTypes, context);
2898
2878
  Object.entries(memberEntries).forEach(function (_a) {
2899
2879
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -2905,30 +2885,30 @@ var serializeAws_queryDescribeAnomalyDetectorsInput = function (input, context)
2905
2885
  };
2906
2886
  var serializeAws_queryDescribeInsightRulesInput = function (input, context) {
2907
2887
  var entries = {};
2908
- if (input.NextToken !== undefined && input.NextToken !== null) {
2888
+ if (input.NextToken != null) {
2909
2889
  entries["NextToken"] = input.NextToken;
2910
2890
  }
2911
- if (input.MaxResults !== undefined && input.MaxResults !== null) {
2891
+ if (input.MaxResults != null) {
2912
2892
  entries["MaxResults"] = input.MaxResults;
2913
2893
  }
2914
2894
  return entries;
2915
2895
  };
2916
2896
  var serializeAws_queryDimension = function (input, context) {
2917
2897
  var entries = {};
2918
- if (input.Name !== undefined && input.Name !== null) {
2898
+ if (input.Name != null) {
2919
2899
  entries["Name"] = input.Name;
2920
2900
  }
2921
- if (input.Value !== undefined && input.Value !== null) {
2901
+ if (input.Value != null) {
2922
2902
  entries["Value"] = input.Value;
2923
2903
  }
2924
2904
  return entries;
2925
2905
  };
2926
2906
  var serializeAws_queryDimensionFilter = function (input, context) {
2927
2907
  var entries = {};
2928
- if (input.Name !== undefined && input.Name !== null) {
2908
+ if (input.Name != null) {
2929
2909
  entries["Name"] = input.Name;
2930
2910
  }
2931
- if (input.Value !== undefined && input.Value !== null) {
2911
+ if (input.Value != null) {
2932
2912
  entries["Value"] = input.Value;
2933
2913
  }
2934
2914
  return entries;
@@ -2989,7 +2969,7 @@ var serializeAws_queryDimensions = function (input, context) {
2989
2969
  };
2990
2970
  var serializeAws_queryDisableAlarmActionsInput = function (input, context) {
2991
2971
  var entries = {};
2992
- if (input.AlarmNames !== undefined && input.AlarmNames !== null) {
2972
+ if (input.AlarmNames != null) {
2993
2973
  var memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2994
2974
  Object.entries(memberEntries).forEach(function (_a) {
2995
2975
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3001,7 +2981,7 @@ var serializeAws_queryDisableAlarmActionsInput = function (input, context) {
3001
2981
  };
3002
2982
  var serializeAws_queryDisableInsightRulesInput = function (input, context) {
3003
2983
  var entries = {};
3004
- if (input.RuleNames !== undefined && input.RuleNames !== null) {
2984
+ if (input.RuleNames != null) {
3005
2985
  var memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
3006
2986
  Object.entries(memberEntries).forEach(function (_a) {
3007
2987
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3013,7 +2993,7 @@ var serializeAws_queryDisableInsightRulesInput = function (input, context) {
3013
2993
  };
3014
2994
  var serializeAws_queryEnableAlarmActionsInput = function (input, context) {
3015
2995
  var entries = {};
3016
- if (input.AlarmNames !== undefined && input.AlarmNames !== null) {
2996
+ if (input.AlarmNames != null) {
3017
2997
  var memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
3018
2998
  Object.entries(memberEntries).forEach(function (_a) {
3019
2999
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3025,7 +3005,7 @@ var serializeAws_queryEnableAlarmActionsInput = function (input, context) {
3025
3005
  };
3026
3006
  var serializeAws_queryEnableInsightRulesInput = function (input, context) {
3027
3007
  var entries = {};
3028
- if (input.RuleNames !== undefined && input.RuleNames !== null) {
3008
+ if (input.RuleNames != null) {
3029
3009
  var memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
3030
3010
  Object.entries(memberEntries).forEach(function (_a) {
3031
3011
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3060,29 +3040,29 @@ var serializeAws_queryExtendedStatistics = function (input, context) {
3060
3040
  };
3061
3041
  var serializeAws_queryGetDashboardInput = function (input, context) {
3062
3042
  var entries = {};
3063
- if (input.DashboardName !== undefined && input.DashboardName !== null) {
3043
+ if (input.DashboardName != null) {
3064
3044
  entries["DashboardName"] = input.DashboardName;
3065
3045
  }
3066
3046
  return entries;
3067
3047
  };
3068
3048
  var serializeAws_queryGetInsightRuleReportInput = function (input, context) {
3069
3049
  var entries = {};
3070
- if (input.RuleName !== undefined && input.RuleName !== null) {
3050
+ if (input.RuleName != null) {
3071
3051
  entries["RuleName"] = input.RuleName;
3072
3052
  }
3073
- if (input.StartTime !== undefined && input.StartTime !== null) {
3053
+ if (input.StartTime != null) {
3074
3054
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
3075
3055
  }
3076
- if (input.EndTime !== undefined && input.EndTime !== null) {
3056
+ if (input.EndTime != null) {
3077
3057
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
3078
3058
  }
3079
- if (input.Period !== undefined && input.Period !== null) {
3059
+ if (input.Period != null) {
3080
3060
  entries["Period"] = input.Period;
3081
3061
  }
3082
- if (input.MaxContributorCount !== undefined && input.MaxContributorCount !== null) {
3062
+ if (input.MaxContributorCount != null) {
3083
3063
  entries["MaxContributorCount"] = input.MaxContributorCount;
3084
3064
  }
3085
- if (input.Metrics !== undefined && input.Metrics !== null) {
3065
+ if (input.Metrics != null) {
3086
3066
  var memberEntries = serializeAws_queryInsightRuleMetricList(input.Metrics, context);
3087
3067
  Object.entries(memberEntries).forEach(function (_a) {
3088
3068
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3090,14 +3070,14 @@ var serializeAws_queryGetInsightRuleReportInput = function (input, context) {
3090
3070
  entries[loc] = value;
3091
3071
  });
3092
3072
  }
3093
- if (input.OrderBy !== undefined && input.OrderBy !== null) {
3073
+ if (input.OrderBy != null) {
3094
3074
  entries["OrderBy"] = input.OrderBy;
3095
3075
  }
3096
3076
  return entries;
3097
3077
  };
3098
3078
  var serializeAws_queryGetMetricDataInput = function (input, context) {
3099
3079
  var entries = {};
3100
- if (input.MetricDataQueries !== undefined && input.MetricDataQueries !== null) {
3080
+ if (input.MetricDataQueries != null) {
3101
3081
  var memberEntries = serializeAws_queryMetricDataQueries(input.MetricDataQueries, context);
3102
3082
  Object.entries(memberEntries).forEach(function (_a) {
3103
3083
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3105,22 +3085,22 @@ var serializeAws_queryGetMetricDataInput = function (input, context) {
3105
3085
  entries[loc] = value;
3106
3086
  });
3107
3087
  }
3108
- if (input.StartTime !== undefined && input.StartTime !== null) {
3088
+ if (input.StartTime != null) {
3109
3089
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
3110
3090
  }
3111
- if (input.EndTime !== undefined && input.EndTime !== null) {
3091
+ if (input.EndTime != null) {
3112
3092
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
3113
3093
  }
3114
- if (input.NextToken !== undefined && input.NextToken !== null) {
3094
+ if (input.NextToken != null) {
3115
3095
  entries["NextToken"] = input.NextToken;
3116
3096
  }
3117
- if (input.ScanBy !== undefined && input.ScanBy !== null) {
3097
+ if (input.ScanBy != null) {
3118
3098
  entries["ScanBy"] = input.ScanBy;
3119
3099
  }
3120
- if (input.MaxDatapoints !== undefined && input.MaxDatapoints !== null) {
3100
+ if (input.MaxDatapoints != null) {
3121
3101
  entries["MaxDatapoints"] = input.MaxDatapoints;
3122
3102
  }
3123
- if (input.LabelOptions !== undefined && input.LabelOptions !== null) {
3103
+ if (input.LabelOptions != null) {
3124
3104
  var memberEntries = serializeAws_queryLabelOptions(input.LabelOptions, context);
3125
3105
  Object.entries(memberEntries).forEach(function (_a) {
3126
3106
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3132,13 +3112,13 @@ var serializeAws_queryGetMetricDataInput = function (input, context) {
3132
3112
  };
3133
3113
  var serializeAws_queryGetMetricStatisticsInput = function (input, context) {
3134
3114
  var entries = {};
3135
- if (input.Namespace !== undefined && input.Namespace !== null) {
3115
+ if (input.Namespace != null) {
3136
3116
  entries["Namespace"] = input.Namespace;
3137
3117
  }
3138
- if (input.MetricName !== undefined && input.MetricName !== null) {
3118
+ if (input.MetricName != null) {
3139
3119
  entries["MetricName"] = input.MetricName;
3140
3120
  }
3141
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
3121
+ if (input.Dimensions != null) {
3142
3122
  var memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3143
3123
  Object.entries(memberEntries).forEach(function (_a) {
3144
3124
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3146,16 +3126,16 @@ var serializeAws_queryGetMetricStatisticsInput = function (input, context) {
3146
3126
  entries[loc] = value;
3147
3127
  });
3148
3128
  }
3149
- if (input.StartTime !== undefined && input.StartTime !== null) {
3129
+ if (input.StartTime != null) {
3150
3130
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
3151
3131
  }
3152
- if (input.EndTime !== undefined && input.EndTime !== null) {
3132
+ if (input.EndTime != null) {
3153
3133
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
3154
3134
  }
3155
- if (input.Period !== undefined && input.Period !== null) {
3135
+ if (input.Period != null) {
3156
3136
  entries["Period"] = input.Period;
3157
3137
  }
3158
- if (input.Statistics !== undefined && input.Statistics !== null) {
3138
+ if (input.Statistics != null) {
3159
3139
  var memberEntries = serializeAws_queryStatistics(input.Statistics, context);
3160
3140
  Object.entries(memberEntries).forEach(function (_a) {
3161
3141
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3163,7 +3143,7 @@ var serializeAws_queryGetMetricStatisticsInput = function (input, context) {
3163
3143
  entries[loc] = value;
3164
3144
  });
3165
3145
  }
3166
- if (input.ExtendedStatistics !== undefined && input.ExtendedStatistics !== null) {
3146
+ if (input.ExtendedStatistics != null) {
3167
3147
  var memberEntries = serializeAws_queryExtendedStatistics(input.ExtendedStatistics, context);
3168
3148
  Object.entries(memberEntries).forEach(function (_a) {
3169
3149
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3171,24 +3151,24 @@ var serializeAws_queryGetMetricStatisticsInput = function (input, context) {
3171
3151
  entries[loc] = value;
3172
3152
  });
3173
3153
  }
3174
- if (input.Unit !== undefined && input.Unit !== null) {
3154
+ if (input.Unit != null) {
3175
3155
  entries["Unit"] = input.Unit;
3176
3156
  }
3177
3157
  return entries;
3178
3158
  };
3179
3159
  var serializeAws_queryGetMetricStreamInput = function (input, context) {
3180
3160
  var entries = {};
3181
- if (input.Name !== undefined && input.Name !== null) {
3161
+ if (input.Name != null) {
3182
3162
  entries["Name"] = input.Name;
3183
3163
  }
3184
3164
  return entries;
3185
3165
  };
3186
3166
  var serializeAws_queryGetMetricWidgetImageInput = function (input, context) {
3187
3167
  var entries = {};
3188
- if (input.MetricWidget !== undefined && input.MetricWidget !== null) {
3168
+ if (input.MetricWidget != null) {
3189
3169
  entries["MetricWidget"] = input.MetricWidget;
3190
3170
  }
3191
- if (input.OutputFormat !== undefined && input.OutputFormat !== null) {
3171
+ if (input.OutputFormat != null) {
3192
3172
  entries["OutputFormat"] = input.OutputFormat;
3193
3173
  }
3194
3174
  return entries;
@@ -3241,30 +3221,30 @@ var serializeAws_queryInsightRuleNames = function (input, context) {
3241
3221
  };
3242
3222
  var serializeAws_queryLabelOptions = function (input, context) {
3243
3223
  var entries = {};
3244
- if (input.Timezone !== undefined && input.Timezone !== null) {
3224
+ if (input.Timezone != null) {
3245
3225
  entries["Timezone"] = input.Timezone;
3246
3226
  }
3247
3227
  return entries;
3248
3228
  };
3249
3229
  var serializeAws_queryListDashboardsInput = function (input, context) {
3250
3230
  var entries = {};
3251
- if (input.DashboardNamePrefix !== undefined && input.DashboardNamePrefix !== null) {
3231
+ if (input.DashboardNamePrefix != null) {
3252
3232
  entries["DashboardNamePrefix"] = input.DashboardNamePrefix;
3253
3233
  }
3254
- if (input.NextToken !== undefined && input.NextToken !== null) {
3234
+ if (input.NextToken != null) {
3255
3235
  entries["NextToken"] = input.NextToken;
3256
3236
  }
3257
3237
  return entries;
3258
3238
  };
3259
3239
  var serializeAws_queryListMetricsInput = function (input, context) {
3260
3240
  var entries = {};
3261
- if (input.Namespace !== undefined && input.Namespace !== null) {
3241
+ if (input.Namespace != null) {
3262
3242
  entries["Namespace"] = input.Namespace;
3263
3243
  }
3264
- if (input.MetricName !== undefined && input.MetricName !== null) {
3244
+ if (input.MetricName != null) {
3265
3245
  entries["MetricName"] = input.MetricName;
3266
3246
  }
3267
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
3247
+ if (input.Dimensions != null) {
3268
3248
  var memberEntries = serializeAws_queryDimensionFilters(input.Dimensions, context);
3269
3249
  Object.entries(memberEntries).forEach(function (_a) {
3270
3250
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3272,40 +3252,40 @@ var serializeAws_queryListMetricsInput = function (input, context) {
3272
3252
  entries[loc] = value;
3273
3253
  });
3274
3254
  }
3275
- if (input.NextToken !== undefined && input.NextToken !== null) {
3255
+ if (input.NextToken != null) {
3276
3256
  entries["NextToken"] = input.NextToken;
3277
3257
  }
3278
- if (input.RecentlyActive !== undefined && input.RecentlyActive !== null) {
3258
+ if (input.RecentlyActive != null) {
3279
3259
  entries["RecentlyActive"] = input.RecentlyActive;
3280
3260
  }
3281
3261
  return entries;
3282
3262
  };
3283
3263
  var serializeAws_queryListMetricStreamsInput = function (input, context) {
3284
3264
  var entries = {};
3285
- if (input.NextToken !== undefined && input.NextToken !== null) {
3265
+ if (input.NextToken != null) {
3286
3266
  entries["NextToken"] = input.NextToken;
3287
3267
  }
3288
- if (input.MaxResults !== undefined && input.MaxResults !== null) {
3268
+ if (input.MaxResults != null) {
3289
3269
  entries["MaxResults"] = input.MaxResults;
3290
3270
  }
3291
3271
  return entries;
3292
3272
  };
3293
3273
  var serializeAws_queryListTagsForResourceInput = function (input, context) {
3294
3274
  var entries = {};
3295
- if (input.ResourceARN !== undefined && input.ResourceARN !== null) {
3275
+ if (input.ResourceARN != null) {
3296
3276
  entries["ResourceARN"] = input.ResourceARN;
3297
3277
  }
3298
3278
  return entries;
3299
3279
  };
3300
3280
  var serializeAws_queryMetric = function (input, context) {
3301
3281
  var entries = {};
3302
- if (input.Namespace !== undefined && input.Namespace !== null) {
3282
+ if (input.Namespace != null) {
3303
3283
  entries["Namespace"] = input.Namespace;
3304
3284
  }
3305
- if (input.MetricName !== undefined && input.MetricName !== null) {
3285
+ if (input.MetricName != null) {
3306
3286
  entries["MetricName"] = input.MetricName;
3307
3287
  }
3308
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
3288
+ if (input.Dimensions != null) {
3309
3289
  var memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3310
3290
  Object.entries(memberEntries).forEach(function (_a) {
3311
3291
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3371,10 +3351,10 @@ var serializeAws_queryMetricDataQueries = function (input, context) {
3371
3351
  };
3372
3352
  var serializeAws_queryMetricDataQuery = function (input, context) {
3373
3353
  var entries = {};
3374
- if (input.Id !== undefined && input.Id !== null) {
3354
+ if (input.Id != null) {
3375
3355
  entries["Id"] = input.Id;
3376
3356
  }
3377
- if (input.MetricStat !== undefined && input.MetricStat !== null) {
3357
+ if (input.MetricStat != null) {
3378
3358
  var memberEntries = serializeAws_queryMetricStat(input.MetricStat, context);
3379
3359
  Object.entries(memberEntries).forEach(function (_a) {
3380
3360
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3382,29 +3362,29 @@ var serializeAws_queryMetricDataQuery = function (input, context) {
3382
3362
  entries[loc] = value;
3383
3363
  });
3384
3364
  }
3385
- if (input.Expression !== undefined && input.Expression !== null) {
3365
+ if (input.Expression != null) {
3386
3366
  entries["Expression"] = input.Expression;
3387
3367
  }
3388
- if (input.Label !== undefined && input.Label !== null) {
3368
+ if (input.Label != null) {
3389
3369
  entries["Label"] = input.Label;
3390
3370
  }
3391
- if (input.ReturnData !== undefined && input.ReturnData !== null) {
3371
+ if (input.ReturnData != null) {
3392
3372
  entries["ReturnData"] = input.ReturnData;
3393
3373
  }
3394
- if (input.Period !== undefined && input.Period !== null) {
3374
+ if (input.Period != null) {
3395
3375
  entries["Period"] = input.Period;
3396
3376
  }
3397
- if (input.AccountId !== undefined && input.AccountId !== null) {
3377
+ if (input.AccountId != null) {
3398
3378
  entries["AccountId"] = input.AccountId;
3399
3379
  }
3400
3380
  return entries;
3401
3381
  };
3402
3382
  var serializeAws_queryMetricDatum = function (input, context) {
3403
3383
  var entries = {};
3404
- if (input.MetricName !== undefined && input.MetricName !== null) {
3384
+ if (input.MetricName != null) {
3405
3385
  entries["MetricName"] = input.MetricName;
3406
3386
  }
3407
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
3387
+ if (input.Dimensions != null) {
3408
3388
  var memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3409
3389
  Object.entries(memberEntries).forEach(function (_a) {
3410
3390
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3412,13 +3392,13 @@ var serializeAws_queryMetricDatum = function (input, context) {
3412
3392
  entries[loc] = value;
3413
3393
  });
3414
3394
  }
3415
- if (input.Timestamp !== undefined && input.Timestamp !== null) {
3395
+ if (input.Timestamp != null) {
3416
3396
  entries["Timestamp"] = input.Timestamp.toISOString().split(".")[0] + "Z";
3417
3397
  }
3418
- if (input.Value !== undefined && input.Value !== null) {
3398
+ if (input.Value != null) {
3419
3399
  entries["Value"] = __serializeFloat(input.Value);
3420
3400
  }
3421
- if (input.StatisticValues !== undefined && input.StatisticValues !== null) {
3401
+ if (input.StatisticValues != null) {
3422
3402
  var memberEntries = serializeAws_queryStatisticSet(input.StatisticValues, context);
3423
3403
  Object.entries(memberEntries).forEach(function (_a) {
3424
3404
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3426,7 +3406,7 @@ var serializeAws_queryMetricDatum = function (input, context) {
3426
3406
  entries[loc] = value;
3427
3407
  });
3428
3408
  }
3429
- if (input.Values !== undefined && input.Values !== null) {
3409
+ if (input.Values != null) {
3430
3410
  var memberEntries = serializeAws_queryValues(input.Values, context);
3431
3411
  Object.entries(memberEntries).forEach(function (_a) {
3432
3412
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3434,7 +3414,7 @@ var serializeAws_queryMetricDatum = function (input, context) {
3434
3414
  entries[loc] = value;
3435
3415
  });
3436
3416
  }
3437
- if (input.Counts !== undefined && input.Counts !== null) {
3417
+ if (input.Counts != null) {
3438
3418
  var memberEntries = serializeAws_queryCounts(input.Counts, context);
3439
3419
  Object.entries(memberEntries).forEach(function (_a) {
3440
3420
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3442,17 +3422,17 @@ var serializeAws_queryMetricDatum = function (input, context) {
3442
3422
  entries[loc] = value;
3443
3423
  });
3444
3424
  }
3445
- if (input.Unit !== undefined && input.Unit !== null) {
3425
+ if (input.Unit != null) {
3446
3426
  entries["Unit"] = input.Unit;
3447
3427
  }
3448
- if (input.StorageResolution !== undefined && input.StorageResolution !== null) {
3428
+ if (input.StorageResolution != null) {
3449
3429
  entries["StorageResolution"] = input.StorageResolution;
3450
3430
  }
3451
3431
  return entries;
3452
3432
  };
3453
3433
  var serializeAws_queryMetricMathAnomalyDetector = function (input, context) {
3454
3434
  var entries = {};
3455
- if (input.MetricDataQueries !== undefined && input.MetricDataQueries !== null) {
3435
+ if (input.MetricDataQueries != null) {
3456
3436
  var memberEntries = serializeAws_queryMetricDataQueries(input.MetricDataQueries, context);
3457
3437
  Object.entries(memberEntries).forEach(function (_a) {
3458
3438
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3464,7 +3444,7 @@ var serializeAws_queryMetricMathAnomalyDetector = function (input, context) {
3464
3444
  };
3465
3445
  var serializeAws_queryMetricStat = function (input, context) {
3466
3446
  var entries = {};
3467
- if (input.Metric !== undefined && input.Metric !== null) {
3447
+ if (input.Metric != null) {
3468
3448
  var memberEntries = serializeAws_queryMetric(input.Metric, context);
3469
3449
  Object.entries(memberEntries).forEach(function (_a) {
3470
3450
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3472,20 +3452,20 @@ var serializeAws_queryMetricStat = function (input, context) {
3472
3452
  entries[loc] = value;
3473
3453
  });
3474
3454
  }
3475
- if (input.Period !== undefined && input.Period !== null) {
3455
+ if (input.Period != null) {
3476
3456
  entries["Period"] = input.Period;
3477
3457
  }
3478
- if (input.Stat !== undefined && input.Stat !== null) {
3458
+ if (input.Stat != null) {
3479
3459
  entries["Stat"] = input.Stat;
3480
3460
  }
3481
- if (input.Unit !== undefined && input.Unit !== null) {
3461
+ if (input.Unit != null) {
3482
3462
  entries["Unit"] = input.Unit;
3483
3463
  }
3484
3464
  return entries;
3485
3465
  };
3486
3466
  var serializeAws_queryMetricStreamFilter = function (input, context) {
3487
3467
  var entries = {};
3488
- if (input.Namespace !== undefined && input.Namespace !== null) {
3468
+ if (input.Namespace != null) {
3489
3469
  entries["Namespace"] = input.Namespace;
3490
3470
  }
3491
3471
  return entries;
@@ -3565,7 +3545,7 @@ var serializeAws_queryMetricStreamStatisticsAdditionalStatistics = function (inp
3565
3545
  };
3566
3546
  var serializeAws_queryMetricStreamStatisticsConfiguration = function (input, context) {
3567
3547
  var entries = {};
3568
- if (input.IncludeMetrics !== undefined && input.IncludeMetrics !== null) {
3548
+ if (input.IncludeMetrics != null) {
3569
3549
  var memberEntries = serializeAws_queryMetricStreamStatisticsIncludeMetrics(input.IncludeMetrics, context);
3570
3550
  Object.entries(memberEntries).forEach(function (_a) {
3571
3551
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3573,7 +3553,7 @@ var serializeAws_queryMetricStreamStatisticsConfiguration = function (input, con
3573
3553
  entries[loc] = value;
3574
3554
  });
3575
3555
  }
3576
- if (input.AdditionalStatistics !== undefined && input.AdditionalStatistics !== null) {
3556
+ if (input.AdditionalStatistics != null) {
3577
3557
  var memberEntries = serializeAws_queryMetricStreamStatisticsAdditionalStatistics(input.AdditionalStatistics, context);
3578
3558
  Object.entries(memberEntries).forEach(function (_a) {
3579
3559
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3639,23 +3619,23 @@ var serializeAws_queryMetricStreamStatisticsIncludeMetrics = function (input, co
3639
3619
  };
3640
3620
  var serializeAws_queryMetricStreamStatisticsMetric = function (input, context) {
3641
3621
  var entries = {};
3642
- if (input.Namespace !== undefined && input.Namespace !== null) {
3622
+ if (input.Namespace != null) {
3643
3623
  entries["Namespace"] = input.Namespace;
3644
3624
  }
3645
- if (input.MetricName !== undefined && input.MetricName !== null) {
3625
+ if (input.MetricName != null) {
3646
3626
  entries["MetricName"] = input.MetricName;
3647
3627
  }
3648
3628
  return entries;
3649
3629
  };
3650
3630
  var serializeAws_queryPutAnomalyDetectorInput = function (input, context) {
3651
3631
  var entries = {};
3652
- if (input.Namespace !== undefined && input.Namespace !== null) {
3632
+ if (input.Namespace != null) {
3653
3633
  entries["Namespace"] = input.Namespace;
3654
3634
  }
3655
- if (input.MetricName !== undefined && input.MetricName !== null) {
3635
+ if (input.MetricName != null) {
3656
3636
  entries["MetricName"] = input.MetricName;
3657
3637
  }
3658
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
3638
+ if (input.Dimensions != null) {
3659
3639
  var memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3660
3640
  Object.entries(memberEntries).forEach(function (_a) {
3661
3641
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3663,10 +3643,10 @@ var serializeAws_queryPutAnomalyDetectorInput = function (input, context) {
3663
3643
  entries[loc] = value;
3664
3644
  });
3665
3645
  }
3666
- if (input.Stat !== undefined && input.Stat !== null) {
3646
+ if (input.Stat != null) {
3667
3647
  entries["Stat"] = input.Stat;
3668
3648
  }
3669
- if (input.Configuration !== undefined && input.Configuration !== null) {
3649
+ if (input.Configuration != null) {
3670
3650
  var memberEntries = serializeAws_queryAnomalyDetectorConfiguration(input.Configuration, context);
3671
3651
  Object.entries(memberEntries).forEach(function (_a) {
3672
3652
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3674,7 +3654,7 @@ var serializeAws_queryPutAnomalyDetectorInput = function (input, context) {
3674
3654
  entries[loc] = value;
3675
3655
  });
3676
3656
  }
3677
- if (input.SingleMetricAnomalyDetector !== undefined && input.SingleMetricAnomalyDetector !== null) {
3657
+ if (input.SingleMetricAnomalyDetector != null) {
3678
3658
  var memberEntries = serializeAws_querySingleMetricAnomalyDetector(input.SingleMetricAnomalyDetector, context);
3679
3659
  Object.entries(memberEntries).forEach(function (_a) {
3680
3660
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3682,7 +3662,7 @@ var serializeAws_queryPutAnomalyDetectorInput = function (input, context) {
3682
3662
  entries[loc] = value;
3683
3663
  });
3684
3664
  }
3685
- if (input.MetricMathAnomalyDetector !== undefined && input.MetricMathAnomalyDetector !== null) {
3665
+ if (input.MetricMathAnomalyDetector != null) {
3686
3666
  var memberEntries = serializeAws_queryMetricMathAnomalyDetector(input.MetricMathAnomalyDetector, context);
3687
3667
  Object.entries(memberEntries).forEach(function (_a) {
3688
3668
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3694,10 +3674,10 @@ var serializeAws_queryPutAnomalyDetectorInput = function (input, context) {
3694
3674
  };
3695
3675
  var serializeAws_queryPutCompositeAlarmInput = function (input, context) {
3696
3676
  var entries = {};
3697
- if (input.ActionsEnabled !== undefined && input.ActionsEnabled !== null) {
3677
+ if (input.ActionsEnabled != null) {
3698
3678
  entries["ActionsEnabled"] = input.ActionsEnabled;
3699
3679
  }
3700
- if (input.AlarmActions !== undefined && input.AlarmActions !== null) {
3680
+ if (input.AlarmActions != null) {
3701
3681
  var memberEntries = serializeAws_queryResourceList(input.AlarmActions, context);
3702
3682
  Object.entries(memberEntries).forEach(function (_a) {
3703
3683
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3705,16 +3685,16 @@ var serializeAws_queryPutCompositeAlarmInput = function (input, context) {
3705
3685
  entries[loc] = value;
3706
3686
  });
3707
3687
  }
3708
- if (input.AlarmDescription !== undefined && input.AlarmDescription !== null) {
3688
+ if (input.AlarmDescription != null) {
3709
3689
  entries["AlarmDescription"] = input.AlarmDescription;
3710
3690
  }
3711
- if (input.AlarmName !== undefined && input.AlarmName !== null) {
3691
+ if (input.AlarmName != null) {
3712
3692
  entries["AlarmName"] = input.AlarmName;
3713
3693
  }
3714
- if (input.AlarmRule !== undefined && input.AlarmRule !== null) {
3694
+ if (input.AlarmRule != null) {
3715
3695
  entries["AlarmRule"] = input.AlarmRule;
3716
3696
  }
3717
- if (input.InsufficientDataActions !== undefined && input.InsufficientDataActions !== null) {
3697
+ if (input.InsufficientDataActions != null) {
3718
3698
  var memberEntries = serializeAws_queryResourceList(input.InsufficientDataActions, context);
3719
3699
  Object.entries(memberEntries).forEach(function (_a) {
3720
3700
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3722,7 +3702,7 @@ var serializeAws_queryPutCompositeAlarmInput = function (input, context) {
3722
3702
  entries[loc] = value;
3723
3703
  });
3724
3704
  }
3725
- if (input.OKActions !== undefined && input.OKActions !== null) {
3705
+ if (input.OKActions != null) {
3726
3706
  var memberEntries = serializeAws_queryResourceList(input.OKActions, context);
3727
3707
  Object.entries(memberEntries).forEach(function (_a) {
3728
3708
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3730,7 +3710,7 @@ var serializeAws_queryPutCompositeAlarmInput = function (input, context) {
3730
3710
  entries[loc] = value;
3731
3711
  });
3732
3712
  }
3733
- if (input.Tags !== undefined && input.Tags !== null) {
3713
+ if (input.Tags != null) {
3734
3714
  var memberEntries = serializeAws_queryTagList(input.Tags, context);
3735
3715
  Object.entries(memberEntries).forEach(function (_a) {
3736
3716
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3738,39 +3718,39 @@ var serializeAws_queryPutCompositeAlarmInput = function (input, context) {
3738
3718
  entries[loc] = value;
3739
3719
  });
3740
3720
  }
3741
- if (input.ActionsSuppressor !== undefined && input.ActionsSuppressor !== null) {
3721
+ if (input.ActionsSuppressor != null) {
3742
3722
  entries["ActionsSuppressor"] = input.ActionsSuppressor;
3743
3723
  }
3744
- if (input.ActionsSuppressorWaitPeriod !== undefined && input.ActionsSuppressorWaitPeriod !== null) {
3724
+ if (input.ActionsSuppressorWaitPeriod != null) {
3745
3725
  entries["ActionsSuppressorWaitPeriod"] = input.ActionsSuppressorWaitPeriod;
3746
3726
  }
3747
- if (input.ActionsSuppressorExtensionPeriod !== undefined && input.ActionsSuppressorExtensionPeriod !== null) {
3727
+ if (input.ActionsSuppressorExtensionPeriod != null) {
3748
3728
  entries["ActionsSuppressorExtensionPeriod"] = input.ActionsSuppressorExtensionPeriod;
3749
3729
  }
3750
3730
  return entries;
3751
3731
  };
3752
3732
  var serializeAws_queryPutDashboardInput = function (input, context) {
3753
3733
  var entries = {};
3754
- if (input.DashboardName !== undefined && input.DashboardName !== null) {
3734
+ if (input.DashboardName != null) {
3755
3735
  entries["DashboardName"] = input.DashboardName;
3756
3736
  }
3757
- if (input.DashboardBody !== undefined && input.DashboardBody !== null) {
3737
+ if (input.DashboardBody != null) {
3758
3738
  entries["DashboardBody"] = input.DashboardBody;
3759
3739
  }
3760
3740
  return entries;
3761
3741
  };
3762
3742
  var serializeAws_queryPutInsightRuleInput = function (input, context) {
3763
3743
  var entries = {};
3764
- if (input.RuleName !== undefined && input.RuleName !== null) {
3744
+ if (input.RuleName != null) {
3765
3745
  entries["RuleName"] = input.RuleName;
3766
3746
  }
3767
- if (input.RuleState !== undefined && input.RuleState !== null) {
3747
+ if (input.RuleState != null) {
3768
3748
  entries["RuleState"] = input.RuleState;
3769
3749
  }
3770
- if (input.RuleDefinition !== undefined && input.RuleDefinition !== null) {
3750
+ if (input.RuleDefinition != null) {
3771
3751
  entries["RuleDefinition"] = input.RuleDefinition;
3772
3752
  }
3773
- if (input.Tags !== undefined && input.Tags !== null) {
3753
+ if (input.Tags != null) {
3774
3754
  var memberEntries = serializeAws_queryTagList(input.Tags, context);
3775
3755
  Object.entries(memberEntries).forEach(function (_a) {
3776
3756
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3782,16 +3762,16 @@ var serializeAws_queryPutInsightRuleInput = function (input, context) {
3782
3762
  };
3783
3763
  var serializeAws_queryPutMetricAlarmInput = function (input, context) {
3784
3764
  var entries = {};
3785
- if (input.AlarmName !== undefined && input.AlarmName !== null) {
3765
+ if (input.AlarmName != null) {
3786
3766
  entries["AlarmName"] = input.AlarmName;
3787
3767
  }
3788
- if (input.AlarmDescription !== undefined && input.AlarmDescription !== null) {
3768
+ if (input.AlarmDescription != null) {
3789
3769
  entries["AlarmDescription"] = input.AlarmDescription;
3790
3770
  }
3791
- if (input.ActionsEnabled !== undefined && input.ActionsEnabled !== null) {
3771
+ if (input.ActionsEnabled != null) {
3792
3772
  entries["ActionsEnabled"] = input.ActionsEnabled;
3793
3773
  }
3794
- if (input.OKActions !== undefined && input.OKActions !== null) {
3774
+ if (input.OKActions != null) {
3795
3775
  var memberEntries = serializeAws_queryResourceList(input.OKActions, context);
3796
3776
  Object.entries(memberEntries).forEach(function (_a) {
3797
3777
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3799,7 +3779,7 @@ var serializeAws_queryPutMetricAlarmInput = function (input, context) {
3799
3779
  entries[loc] = value;
3800
3780
  });
3801
3781
  }
3802
- if (input.AlarmActions !== undefined && input.AlarmActions !== null) {
3782
+ if (input.AlarmActions != null) {
3803
3783
  var memberEntries = serializeAws_queryResourceList(input.AlarmActions, context);
3804
3784
  Object.entries(memberEntries).forEach(function (_a) {
3805
3785
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3807,7 +3787,7 @@ var serializeAws_queryPutMetricAlarmInput = function (input, context) {
3807
3787
  entries[loc] = value;
3808
3788
  });
3809
3789
  }
3810
- if (input.InsufficientDataActions !== undefined && input.InsufficientDataActions !== null) {
3790
+ if (input.InsufficientDataActions != null) {
3811
3791
  var memberEntries = serializeAws_queryResourceList(input.InsufficientDataActions, context);
3812
3792
  Object.entries(memberEntries).forEach(function (_a) {
3813
3793
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3815,19 +3795,19 @@ var serializeAws_queryPutMetricAlarmInput = function (input, context) {
3815
3795
  entries[loc] = value;
3816
3796
  });
3817
3797
  }
3818
- if (input.MetricName !== undefined && input.MetricName !== null) {
3798
+ if (input.MetricName != null) {
3819
3799
  entries["MetricName"] = input.MetricName;
3820
3800
  }
3821
- if (input.Namespace !== undefined && input.Namespace !== null) {
3801
+ if (input.Namespace != null) {
3822
3802
  entries["Namespace"] = input.Namespace;
3823
3803
  }
3824
- if (input.Statistic !== undefined && input.Statistic !== null) {
3804
+ if (input.Statistic != null) {
3825
3805
  entries["Statistic"] = input.Statistic;
3826
3806
  }
3827
- if (input.ExtendedStatistic !== undefined && input.ExtendedStatistic !== null) {
3807
+ if (input.ExtendedStatistic != null) {
3828
3808
  entries["ExtendedStatistic"] = input.ExtendedStatistic;
3829
3809
  }
3830
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
3810
+ if (input.Dimensions != null) {
3831
3811
  var memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3832
3812
  Object.entries(memberEntries).forEach(function (_a) {
3833
3813
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3835,31 +3815,31 @@ var serializeAws_queryPutMetricAlarmInput = function (input, context) {
3835
3815
  entries[loc] = value;
3836
3816
  });
3837
3817
  }
3838
- if (input.Period !== undefined && input.Period !== null) {
3818
+ if (input.Period != null) {
3839
3819
  entries["Period"] = input.Period;
3840
3820
  }
3841
- if (input.Unit !== undefined && input.Unit !== null) {
3821
+ if (input.Unit != null) {
3842
3822
  entries["Unit"] = input.Unit;
3843
3823
  }
3844
- if (input.EvaluationPeriods !== undefined && input.EvaluationPeriods !== null) {
3824
+ if (input.EvaluationPeriods != null) {
3845
3825
  entries["EvaluationPeriods"] = input.EvaluationPeriods;
3846
3826
  }
3847
- if (input.DatapointsToAlarm !== undefined && input.DatapointsToAlarm !== null) {
3827
+ if (input.DatapointsToAlarm != null) {
3848
3828
  entries["DatapointsToAlarm"] = input.DatapointsToAlarm;
3849
3829
  }
3850
- if (input.Threshold !== undefined && input.Threshold !== null) {
3830
+ if (input.Threshold != null) {
3851
3831
  entries["Threshold"] = __serializeFloat(input.Threshold);
3852
3832
  }
3853
- if (input.ComparisonOperator !== undefined && input.ComparisonOperator !== null) {
3833
+ if (input.ComparisonOperator != null) {
3854
3834
  entries["ComparisonOperator"] = input.ComparisonOperator;
3855
3835
  }
3856
- if (input.TreatMissingData !== undefined && input.TreatMissingData !== null) {
3836
+ if (input.TreatMissingData != null) {
3857
3837
  entries["TreatMissingData"] = input.TreatMissingData;
3858
3838
  }
3859
- if (input.EvaluateLowSampleCountPercentile !== undefined && input.EvaluateLowSampleCountPercentile !== null) {
3839
+ if (input.EvaluateLowSampleCountPercentile != null) {
3860
3840
  entries["EvaluateLowSampleCountPercentile"] = input.EvaluateLowSampleCountPercentile;
3861
3841
  }
3862
- if (input.Metrics !== undefined && input.Metrics !== null) {
3842
+ if (input.Metrics != null) {
3863
3843
  var memberEntries = serializeAws_queryMetricDataQueries(input.Metrics, context);
3864
3844
  Object.entries(memberEntries).forEach(function (_a) {
3865
3845
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3867,7 +3847,7 @@ var serializeAws_queryPutMetricAlarmInput = function (input, context) {
3867
3847
  entries[loc] = value;
3868
3848
  });
3869
3849
  }
3870
- if (input.Tags !== undefined && input.Tags !== null) {
3850
+ if (input.Tags != null) {
3871
3851
  var memberEntries = serializeAws_queryTagList(input.Tags, context);
3872
3852
  Object.entries(memberEntries).forEach(function (_a) {
3873
3853
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3875,17 +3855,17 @@ var serializeAws_queryPutMetricAlarmInput = function (input, context) {
3875
3855
  entries[loc] = value;
3876
3856
  });
3877
3857
  }
3878
- if (input.ThresholdMetricId !== undefined && input.ThresholdMetricId !== null) {
3858
+ if (input.ThresholdMetricId != null) {
3879
3859
  entries["ThresholdMetricId"] = input.ThresholdMetricId;
3880
3860
  }
3881
3861
  return entries;
3882
3862
  };
3883
3863
  var serializeAws_queryPutMetricDataInput = function (input, context) {
3884
3864
  var entries = {};
3885
- if (input.Namespace !== undefined && input.Namespace !== null) {
3865
+ if (input.Namespace != null) {
3886
3866
  entries["Namespace"] = input.Namespace;
3887
3867
  }
3888
- if (input.MetricData !== undefined && input.MetricData !== null) {
3868
+ if (input.MetricData != null) {
3889
3869
  var memberEntries = serializeAws_queryMetricData(input.MetricData, context);
3890
3870
  Object.entries(memberEntries).forEach(function (_a) {
3891
3871
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3897,10 +3877,10 @@ var serializeAws_queryPutMetricDataInput = function (input, context) {
3897
3877
  };
3898
3878
  var serializeAws_queryPutMetricStreamInput = function (input, context) {
3899
3879
  var entries = {};
3900
- if (input.Name !== undefined && input.Name !== null) {
3880
+ if (input.Name != null) {
3901
3881
  entries["Name"] = input.Name;
3902
3882
  }
3903
- if (input.IncludeFilters !== undefined && input.IncludeFilters !== null) {
3883
+ if (input.IncludeFilters != null) {
3904
3884
  var memberEntries = serializeAws_queryMetricStreamFilters(input.IncludeFilters, context);
3905
3885
  Object.entries(memberEntries).forEach(function (_a) {
3906
3886
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3908,7 +3888,7 @@ var serializeAws_queryPutMetricStreamInput = function (input, context) {
3908
3888
  entries[loc] = value;
3909
3889
  });
3910
3890
  }
3911
- if (input.ExcludeFilters !== undefined && input.ExcludeFilters !== null) {
3891
+ if (input.ExcludeFilters != null) {
3912
3892
  var memberEntries = serializeAws_queryMetricStreamFilters(input.ExcludeFilters, context);
3913
3893
  Object.entries(memberEntries).forEach(function (_a) {
3914
3894
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3916,16 +3896,16 @@ var serializeAws_queryPutMetricStreamInput = function (input, context) {
3916
3896
  entries[loc] = value;
3917
3897
  });
3918
3898
  }
3919
- if (input.FirehoseArn !== undefined && input.FirehoseArn !== null) {
3899
+ if (input.FirehoseArn != null) {
3920
3900
  entries["FirehoseArn"] = input.FirehoseArn;
3921
3901
  }
3922
- if (input.RoleArn !== undefined && input.RoleArn !== null) {
3902
+ if (input.RoleArn != null) {
3923
3903
  entries["RoleArn"] = input.RoleArn;
3924
3904
  }
3925
- if (input.OutputFormat !== undefined && input.OutputFormat !== null) {
3905
+ if (input.OutputFormat != null) {
3926
3906
  entries["OutputFormat"] = input.OutputFormat;
3927
3907
  }
3928
- if (input.Tags !== undefined && input.Tags !== null) {
3908
+ if (input.Tags != null) {
3929
3909
  var memberEntries = serializeAws_queryTagList(input.Tags, context);
3930
3910
  Object.entries(memberEntries).forEach(function (_a) {
3931
3911
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3933,7 +3913,7 @@ var serializeAws_queryPutMetricStreamInput = function (input, context) {
3933
3913
  entries[loc] = value;
3934
3914
  });
3935
3915
  }
3936
- if (input.StatisticsConfigurations !== undefined && input.StatisticsConfigurations !== null) {
3916
+ if (input.StatisticsConfigurations != null) {
3937
3917
  var memberEntries = serializeAws_queryMetricStreamStatisticsConfigurations(input.StatisticsConfigurations, context);
3938
3918
  Object.entries(memberEntries).forEach(function (_a) {
3939
3919
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -3945,10 +3925,10 @@ var serializeAws_queryPutMetricStreamInput = function (input, context) {
3945
3925
  };
3946
3926
  var serializeAws_queryRange = function (input, context) {
3947
3927
  var entries = {};
3948
- if (input.StartTime !== undefined && input.StartTime !== null) {
3928
+ if (input.StartTime != null) {
3949
3929
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
3950
3930
  }
3951
- if (input.EndTime !== undefined && input.EndTime !== null) {
3931
+ if (input.EndTime != null) {
3952
3932
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
3953
3933
  }
3954
3934
  return entries;
@@ -3978,29 +3958,29 @@ var serializeAws_queryResourceList = function (input, context) {
3978
3958
  };
3979
3959
  var serializeAws_querySetAlarmStateInput = function (input, context) {
3980
3960
  var entries = {};
3981
- if (input.AlarmName !== undefined && input.AlarmName !== null) {
3961
+ if (input.AlarmName != null) {
3982
3962
  entries["AlarmName"] = input.AlarmName;
3983
3963
  }
3984
- if (input.StateValue !== undefined && input.StateValue !== null) {
3964
+ if (input.StateValue != null) {
3985
3965
  entries["StateValue"] = input.StateValue;
3986
3966
  }
3987
- if (input.StateReason !== undefined && input.StateReason !== null) {
3967
+ if (input.StateReason != null) {
3988
3968
  entries["StateReason"] = input.StateReason;
3989
3969
  }
3990
- if (input.StateReasonData !== undefined && input.StateReasonData !== null) {
3970
+ if (input.StateReasonData != null) {
3991
3971
  entries["StateReasonData"] = input.StateReasonData;
3992
3972
  }
3993
3973
  return entries;
3994
3974
  };
3995
3975
  var serializeAws_querySingleMetricAnomalyDetector = function (input, context) {
3996
3976
  var entries = {};
3997
- if (input.Namespace !== undefined && input.Namespace !== null) {
3977
+ if (input.Namespace != null) {
3998
3978
  entries["Namespace"] = input.Namespace;
3999
3979
  }
4000
- if (input.MetricName !== undefined && input.MetricName !== null) {
3980
+ if (input.MetricName != null) {
4001
3981
  entries["MetricName"] = input.MetricName;
4002
3982
  }
4003
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
3983
+ if (input.Dimensions != null) {
4004
3984
  var memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
4005
3985
  Object.entries(memberEntries).forEach(function (_a) {
4006
3986
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -4008,14 +3988,14 @@ var serializeAws_querySingleMetricAnomalyDetector = function (input, context) {
4008
3988
  entries[loc] = value;
4009
3989
  });
4010
3990
  }
4011
- if (input.Stat !== undefined && input.Stat !== null) {
3991
+ if (input.Stat != null) {
4012
3992
  entries["Stat"] = input.Stat;
4013
3993
  }
4014
3994
  return entries;
4015
3995
  };
4016
3996
  var serializeAws_queryStartMetricStreamsInput = function (input, context) {
4017
3997
  var entries = {};
4018
- if (input.Names !== undefined && input.Names !== null) {
3998
+ if (input.Names != null) {
4019
3999
  var memberEntries = serializeAws_queryMetricStreamNames(input.Names, context);
4020
4000
  Object.entries(memberEntries).forEach(function (_a) {
4021
4001
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -4050,23 +4030,23 @@ var serializeAws_queryStatistics = function (input, context) {
4050
4030
  };
4051
4031
  var serializeAws_queryStatisticSet = function (input, context) {
4052
4032
  var entries = {};
4053
- if (input.SampleCount !== undefined && input.SampleCount !== null) {
4033
+ if (input.SampleCount != null) {
4054
4034
  entries["SampleCount"] = __serializeFloat(input.SampleCount);
4055
4035
  }
4056
- if (input.Sum !== undefined && input.Sum !== null) {
4036
+ if (input.Sum != null) {
4057
4037
  entries["Sum"] = __serializeFloat(input.Sum);
4058
4038
  }
4059
- if (input.Minimum !== undefined && input.Minimum !== null) {
4039
+ if (input.Minimum != null) {
4060
4040
  entries["Minimum"] = __serializeFloat(input.Minimum);
4061
4041
  }
4062
- if (input.Maximum !== undefined && input.Maximum !== null) {
4042
+ if (input.Maximum != null) {
4063
4043
  entries["Maximum"] = __serializeFloat(input.Maximum);
4064
4044
  }
4065
4045
  return entries;
4066
4046
  };
4067
4047
  var serializeAws_queryStopMetricStreamsInput = function (input, context) {
4068
4048
  var entries = {};
4069
- if (input.Names !== undefined && input.Names !== null) {
4049
+ if (input.Names != null) {
4070
4050
  var memberEntries = serializeAws_queryMetricStreamNames(input.Names, context);
4071
4051
  Object.entries(memberEntries).forEach(function (_a) {
4072
4052
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -4078,10 +4058,10 @@ var serializeAws_queryStopMetricStreamsInput = function (input, context) {
4078
4058
  };
4079
4059
  var serializeAws_queryTag = function (input, context) {
4080
4060
  var entries = {};
4081
- if (input.Key !== undefined && input.Key !== null) {
4061
+ if (input.Key != null) {
4082
4062
  entries["Key"] = input.Key;
4083
4063
  }
4084
- if (input.Value !== undefined && input.Value !== null) {
4064
+ if (input.Value != null) {
4085
4065
  entries["Value"] = input.Value;
4086
4066
  }
4087
4067
  return entries;
@@ -4138,10 +4118,10 @@ var serializeAws_queryTagList = function (input, context) {
4138
4118
  };
4139
4119
  var serializeAws_queryTagResourceInput = function (input, context) {
4140
4120
  var entries = {};
4141
- if (input.ResourceARN !== undefined && input.ResourceARN !== null) {
4121
+ if (input.ResourceARN != null) {
4142
4122
  entries["ResourceARN"] = input.ResourceARN;
4143
4123
  }
4144
- if (input.Tags !== undefined && input.Tags !== null) {
4124
+ if (input.Tags != null) {
4145
4125
  var memberEntries = serializeAws_queryTagList(input.Tags, context);
4146
4126
  Object.entries(memberEntries).forEach(function (_a) {
4147
4127
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -4153,10 +4133,10 @@ var serializeAws_queryTagResourceInput = function (input, context) {
4153
4133
  };
4154
4134
  var serializeAws_queryUntagResourceInput = function (input, context) {
4155
4135
  var entries = {};
4156
- if (input.ResourceARN !== undefined && input.ResourceARN !== null) {
4136
+ if (input.ResourceARN != null) {
4157
4137
  entries["ResourceARN"] = input.ResourceARN;
4158
4138
  }
4159
- if (input.TagKeys !== undefined && input.TagKeys !== null) {
4139
+ if (input.TagKeys != null) {
4160
4140
  var memberEntries = serializeAws_queryTagKeyList(input.TagKeys, context);
4161
4141
  Object.entries(memberEntries).forEach(function (_a) {
4162
4142
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
@@ -4222,9 +4202,6 @@ var deserializeAws_queryAlarmHistoryItems = function (output, context) {
4222
4202
  return (output || [])
4223
4203
  .filter(function (e) { return e != null; })
4224
4204
  .map(function (entry) {
4225
- if (entry === null) {
4226
- return null;
4227
- }
4228
4205
  return deserializeAws_queryAlarmHistoryItem(entry, context);
4229
4206
  });
4230
4207
  };
@@ -4288,9 +4265,6 @@ var deserializeAws_queryAnomalyDetectorExcludedTimeRanges = function (output, co
4288
4265
  return (output || [])
4289
4266
  .filter(function (e) { return e != null; })
4290
4267
  .map(function (entry) {
4291
- if (entry === null) {
4292
- return null;
4293
- }
4294
4268
  return deserializeAws_queryRange(entry, context);
4295
4269
  });
4296
4270
  };
@@ -4298,9 +4272,6 @@ var deserializeAws_queryAnomalyDetectors = function (output, context) {
4298
4272
  return (output || [])
4299
4273
  .filter(function (e) { return e != null; })
4300
4274
  .map(function (entry) {
4301
- if (entry === null) {
4302
- return null;
4303
- }
4304
4275
  return deserializeAws_queryAnomalyDetector(entry, context);
4305
4276
  });
4306
4277
  };
@@ -4308,9 +4279,6 @@ var deserializeAws_queryBatchFailures = function (output, context) {
4308
4279
  return (output || [])
4309
4280
  .filter(function (e) { return e != null; })
4310
4281
  .map(function (entry) {
4311
- if (entry === null) {
4312
- return null;
4313
- }
4314
4282
  return deserializeAws_queryPartialFailure(entry, context);
4315
4283
  });
4316
4284
  };
@@ -4409,9 +4377,6 @@ var deserializeAws_queryCompositeAlarms = function (output, context) {
4409
4377
  return (output || [])
4410
4378
  .filter(function (e) { return e != null; })
4411
4379
  .map(function (entry) {
4412
- if (entry === null) {
4413
- return null;
4414
- }
4415
4380
  return deserializeAws_queryCompositeAlarm(entry, context);
4416
4381
  });
4417
4382
  };
@@ -4428,9 +4393,6 @@ var deserializeAws_queryDashboardEntries = function (output, context) {
4428
4393
  return (output || [])
4429
4394
  .filter(function (e) { return e != null; })
4430
4395
  .map(function (entry) {
4431
- if (entry === null) {
4432
- return null;
4433
- }
4434
4396
  return deserializeAws_queryDashboardEntry(entry, context);
4435
4397
  });
4436
4398
  };
@@ -4498,9 +4460,6 @@ var deserializeAws_queryDashboardValidationMessages = function (output, context)
4498
4460
  return (output || [])
4499
4461
  .filter(function (e) { return e != null; })
4500
4462
  .map(function (entry) {
4501
- if (entry === null) {
4502
- return null;
4503
- }
4504
4463
  return deserializeAws_queryDashboardValidationMessage(entry, context);
4505
4464
  });
4506
4465
  };
@@ -4548,9 +4507,6 @@ var deserializeAws_queryDatapoints = function (output, context) {
4548
4507
  return (output || [])
4549
4508
  .filter(function (e) { return e != null; })
4550
4509
  .map(function (entry) {
4551
- if (entry === null) {
4552
- return null;
4553
- }
4554
4510
  return deserializeAws_queryDatapoint(entry, context);
4555
4511
  });
4556
4512
  };
@@ -4567,9 +4523,6 @@ var deserializeAws_queryDatapointValues = function (output, context) {
4567
4523
  return (output || [])
4568
4524
  .filter(function (e) { return e != null; })
4569
4525
  .map(function (entry) {
4570
- if (entry === null) {
4571
- return null;
4572
- }
4573
4526
  return __strictParseFloat(entry);
4574
4527
  });
4575
4528
  };
@@ -4697,9 +4650,6 @@ var deserializeAws_queryDimensions = function (output, context) {
4697
4650
  return (output || [])
4698
4651
  .filter(function (e) { return e != null; })
4699
4652
  .map(function (entry) {
4700
- if (entry === null) {
4701
- return null;
4702
- }
4703
4653
  return deserializeAws_queryDimension(entry, context);
4704
4654
  });
4705
4655
  };
@@ -4950,9 +4900,6 @@ var deserializeAws_queryInsightRuleContributorDatapoints = function (output, con
4950
4900
  return (output || [])
4951
4901
  .filter(function (e) { return e != null; })
4952
4902
  .map(function (entry) {
4953
- if (entry === null) {
4954
- return null;
4955
- }
4956
4903
  return deserializeAws_queryInsightRuleContributorDatapoint(entry, context);
4957
4904
  });
4958
4905
  };
@@ -4960,9 +4907,6 @@ var deserializeAws_queryInsightRuleContributorKeyLabels = function (output, cont
4960
4907
  return (output || [])
4961
4908
  .filter(function (e) { return e != null; })
4962
4909
  .map(function (entry) {
4963
- if (entry === null) {
4964
- return null;
4965
- }
4966
4910
  return __expectString(entry);
4967
4911
  });
4968
4912
  };
@@ -4970,9 +4914,6 @@ var deserializeAws_queryInsightRuleContributorKeys = function (output, context)
4970
4914
  return (output || [])
4971
4915
  .filter(function (e) { return e != null; })
4972
4916
  .map(function (entry) {
4973
- if (entry === null) {
4974
- return null;
4975
- }
4976
4917
  return __expectString(entry);
4977
4918
  });
4978
4919
  };
@@ -4980,9 +4921,6 @@ var deserializeAws_queryInsightRuleContributors = function (output, context) {
4980
4921
  return (output || [])
4981
4922
  .filter(function (e) { return e != null; })
4982
4923
  .map(function (entry) {
4983
- if (entry === null) {
4984
- return null;
4985
- }
4986
4924
  return deserializeAws_queryInsightRuleContributor(entry, context);
4987
4925
  });
4988
4926
  };
@@ -5027,9 +4965,6 @@ var deserializeAws_queryInsightRuleMetricDatapoints = function (output, context)
5027
4965
  return (output || [])
5028
4966
  .filter(function (e) { return e != null; })
5029
4967
  .map(function (entry) {
5030
- if (entry === null) {
5031
- return null;
5032
- }
5033
4968
  return deserializeAws_queryInsightRuleMetricDatapoint(entry, context);
5034
4969
  });
5035
4970
  };
@@ -5037,9 +4972,6 @@ var deserializeAws_queryInsightRules = function (output, context) {
5037
4972
  return (output || [])
5038
4973
  .filter(function (e) { return e != null; })
5039
4974
  .map(function (entry) {
5040
- if (entry === null) {
5041
- return null;
5042
- }
5043
4975
  return deserializeAws_queryInsightRule(entry, context);
5044
4976
  });
5045
4977
  };
@@ -5332,9 +5264,6 @@ var deserializeAws_queryMetricAlarms = function (output, context) {
5332
5264
  return (output || [])
5333
5265
  .filter(function (e) { return e != null; })
5334
5266
  .map(function (entry) {
5335
- if (entry === null) {
5336
- return null;
5337
- }
5338
5267
  return deserializeAws_queryMetricAlarm(entry, context);
5339
5268
  });
5340
5269
  };
@@ -5342,9 +5271,6 @@ var deserializeAws_queryMetricDataQueries = function (output, context) {
5342
5271
  return (output || [])
5343
5272
  .filter(function (e) { return e != null; })
5344
5273
  .map(function (entry) {
5345
- if (entry === null) {
5346
- return null;
5347
- }
5348
5274
  return deserializeAws_queryMetricDataQuery(entry, context);
5349
5275
  });
5350
5276
  };
@@ -5423,9 +5349,6 @@ var deserializeAws_queryMetricDataResultMessages = function (output, context) {
5423
5349
  return (output || [])
5424
5350
  .filter(function (e) { return e != null; })
5425
5351
  .map(function (entry) {
5426
- if (entry === null) {
5427
- return null;
5428
- }
5429
5352
  return deserializeAws_queryMessageData(entry, context);
5430
5353
  });
5431
5354
  };
@@ -5433,9 +5356,6 @@ var deserializeAws_queryMetricDataResults = function (output, context) {
5433
5356
  return (output || [])
5434
5357
  .filter(function (e) { return e != null; })
5435
5358
  .map(function (entry) {
5436
- if (entry === null) {
5437
- return null;
5438
- }
5439
5359
  return deserializeAws_queryMetricDataResult(entry, context);
5440
5360
  });
5441
5361
  };
@@ -5455,9 +5375,6 @@ var deserializeAws_queryMetrics = function (output, context) {
5455
5375
  return (output || [])
5456
5376
  .filter(function (e) { return e != null; })
5457
5377
  .map(function (entry) {
5458
- if (entry === null) {
5459
- return null;
5460
- }
5461
5378
  return deserializeAws_queryMetric(entry, context);
5462
5379
  });
5463
5380
  };
@@ -5486,9 +5403,6 @@ var deserializeAws_queryMetricStreamEntries = function (output, context) {
5486
5403
  return (output || [])
5487
5404
  .filter(function (e) { return e != null; })
5488
5405
  .map(function (entry) {
5489
- if (entry === null) {
5490
- return null;
5491
- }
5492
5406
  return deserializeAws_queryMetricStreamEntry(entry, context);
5493
5407
  });
5494
5408
  };
@@ -5538,9 +5452,6 @@ var deserializeAws_queryMetricStreamFilters = function (output, context) {
5538
5452
  return (output || [])
5539
5453
  .filter(function (e) { return e != null; })
5540
5454
  .map(function (entry) {
5541
- if (entry === null) {
5542
- return null;
5543
- }
5544
5455
  return deserializeAws_queryMetricStreamFilter(entry, context);
5545
5456
  });
5546
5457
  };
@@ -5548,9 +5459,6 @@ var deserializeAws_queryMetricStreamStatisticsAdditionalStatistics = function (o
5548
5459
  return (output || [])
5549
5460
  .filter(function (e) { return e != null; })
5550
5461
  .map(function (entry) {
5551
- if (entry === null) {
5552
- return null;
5553
- }
5554
5462
  return __expectString(entry);
5555
5463
  });
5556
5464
  };
@@ -5577,9 +5485,6 @@ var deserializeAws_queryMetricStreamStatisticsConfigurations = function (output,
5577
5485
  return (output || [])
5578
5486
  .filter(function (e) { return e != null; })
5579
5487
  .map(function (entry) {
5580
- if (entry === null) {
5581
- return null;
5582
- }
5583
5488
  return deserializeAws_queryMetricStreamStatisticsConfiguration(entry, context);
5584
5489
  });
5585
5490
  };
@@ -5587,9 +5492,6 @@ var deserializeAws_queryMetricStreamStatisticsIncludeMetrics = function (output,
5587
5492
  return (output || [])
5588
5493
  .filter(function (e) { return e != null; })
5589
5494
  .map(function (entry) {
5590
- if (entry === null) {
5591
- return null;
5592
- }
5593
5495
  return deserializeAws_queryMetricStreamStatisticsMetric(entry, context);
5594
5496
  });
5595
5497
  };
@@ -5683,9 +5585,6 @@ var deserializeAws_queryResourceList = function (output, context) {
5683
5585
  return (output || [])
5684
5586
  .filter(function (e) { return e != null; })
5685
5587
  .map(function (entry) {
5686
- if (entry === null) {
5687
- return null;
5688
- }
5689
5588
  return __expectString(entry);
5690
5589
  });
5691
5590
  };
@@ -5764,9 +5663,6 @@ var deserializeAws_queryTagList = function (output, context) {
5764
5663
  return (output || [])
5765
5664
  .filter(function (e) { return e != null; })
5766
5665
  .map(function (entry) {
5767
- if (entry === null) {
5768
- return null;
5769
- }
5770
5666
  return deserializeAws_queryTag(entry, context);
5771
5667
  });
5772
5668
  };
@@ -5778,9 +5674,6 @@ var deserializeAws_queryTimestamps = function (output, context) {
5778
5674
  return (output || [])
5779
5675
  .filter(function (e) { return e != null; })
5780
5676
  .map(function (entry) {
5781
- if (entry === null) {
5782
- return null;
5783
- }
5784
5677
  return __expectNonNull(__parseRfc3339DateTime(entry));
5785
5678
  });
5786
5679
  };