@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.
@@ -492,7 +492,6 @@ const deserializeAws_queryDeleteAlarmsCommandError = async (output, context) =>
492
492
  ...output,
493
493
  body: await parseBody(output.body, context),
494
494
  };
495
- let response;
496
495
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
497
496
  switch (errorCode) {
498
497
  case "ResourceNotFound":
@@ -500,14 +499,12 @@ const deserializeAws_queryDeleteAlarmsCommandError = async (output, context) =>
500
499
  throw await deserializeAws_queryResourceNotFoundResponse(parsedOutput, context);
501
500
  default:
502
501
  const parsedBody = parsedOutput.body;
503
- const $metadata = deserializeMetadata(output);
504
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
505
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
506
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
507
- $fault: "client",
508
- $metadata,
502
+ (0, smithy_client_1.throwDefaultError)({
503
+ output,
504
+ parsedBody: parsedBody.Error,
505
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
506
+ errorCode,
509
507
  });
510
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
511
508
  }
512
509
  };
513
510
  const deserializeAws_queryDeleteAnomalyDetectorCommand = async (output, context) => {
@@ -529,7 +526,6 @@ const deserializeAws_queryDeleteAnomalyDetectorCommandError = async (output, con
529
526
  ...output,
530
527
  body: await parseBody(output.body, context),
531
528
  };
532
- let response;
533
529
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
534
530
  switch (errorCode) {
535
531
  case "InternalServiceFault":
@@ -549,14 +545,12 @@ const deserializeAws_queryDeleteAnomalyDetectorCommandError = async (output, con
549
545
  throw await deserializeAws_queryResourceNotFoundExceptionResponse(parsedOutput, context);
550
546
  default:
551
547
  const parsedBody = parsedOutput.body;
552
- const $metadata = deserializeMetadata(output);
553
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
554
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
555
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
556
- $fault: "client",
557
- $metadata,
548
+ (0, smithy_client_1.throwDefaultError)({
549
+ output,
550
+ parsedBody: parsedBody.Error,
551
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
552
+ errorCode,
558
553
  });
559
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
560
554
  }
561
555
  };
562
556
  const deserializeAws_queryDeleteDashboardsCommand = async (output, context) => {
@@ -578,7 +572,6 @@ const deserializeAws_queryDeleteDashboardsCommandError = async (output, context)
578
572
  ...output,
579
573
  body: await parseBody(output.body, context),
580
574
  };
581
- let response;
582
575
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
583
576
  switch (errorCode) {
584
577
  case "DashboardNotFoundError":
@@ -592,14 +585,12 @@ const deserializeAws_queryDeleteDashboardsCommandError = async (output, context)
592
585
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
593
586
  default:
594
587
  const parsedBody = parsedOutput.body;
595
- const $metadata = deserializeMetadata(output);
596
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
597
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
598
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
599
- $fault: "client",
600
- $metadata,
588
+ (0, smithy_client_1.throwDefaultError)({
589
+ output,
590
+ parsedBody: parsedBody.Error,
591
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
592
+ errorCode,
601
593
  });
602
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
603
594
  }
604
595
  };
605
596
  const deserializeAws_queryDeleteInsightRulesCommand = async (output, context) => {
@@ -621,7 +612,6 @@ const deserializeAws_queryDeleteInsightRulesCommandError = async (output, contex
621
612
  ...output,
622
613
  body: await parseBody(output.body, context),
623
614
  };
624
- let response;
625
615
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
626
616
  switch (errorCode) {
627
617
  case "InvalidParameterValueException":
@@ -632,14 +622,12 @@ const deserializeAws_queryDeleteInsightRulesCommandError = async (output, contex
632
622
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
633
623
  default:
634
624
  const parsedBody = parsedOutput.body;
635
- const $metadata = deserializeMetadata(output);
636
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
637
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
638
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
639
- $fault: "client",
640
- $metadata,
625
+ (0, smithy_client_1.throwDefaultError)({
626
+ output,
627
+ parsedBody: parsedBody.Error,
628
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
629
+ errorCode,
641
630
  });
642
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
643
631
  }
644
632
  };
645
633
  const deserializeAws_queryDeleteMetricStreamCommand = async (output, context) => {
@@ -661,7 +649,6 @@ const deserializeAws_queryDeleteMetricStreamCommandError = async (output, contex
661
649
  ...output,
662
650
  body: await parseBody(output.body, context),
663
651
  };
664
- let response;
665
652
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
666
653
  switch (errorCode) {
667
654
  case "InternalServiceFault":
@@ -675,14 +662,12 @@ const deserializeAws_queryDeleteMetricStreamCommandError = async (output, contex
675
662
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
676
663
  default:
677
664
  const parsedBody = parsedOutput.body;
678
- const $metadata = deserializeMetadata(output);
679
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
680
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
681
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
682
- $fault: "client",
683
- $metadata,
665
+ (0, smithy_client_1.throwDefaultError)({
666
+ output,
667
+ parsedBody: parsedBody.Error,
668
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
669
+ errorCode,
684
670
  });
685
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
686
671
  }
687
672
  };
688
673
  const deserializeAws_queryDescribeAlarmHistoryCommand = async (output, context) => {
@@ -704,7 +689,6 @@ const deserializeAws_queryDescribeAlarmHistoryCommandError = async (output, cont
704
689
  ...output,
705
690
  body: await parseBody(output.body, context),
706
691
  };
707
- let response;
708
692
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
709
693
  switch (errorCode) {
710
694
  case "InvalidNextToken":
@@ -712,14 +696,12 @@ const deserializeAws_queryDescribeAlarmHistoryCommandError = async (output, cont
712
696
  throw await deserializeAws_queryInvalidNextTokenResponse(parsedOutput, context);
713
697
  default:
714
698
  const parsedBody = parsedOutput.body;
715
- const $metadata = deserializeMetadata(output);
716
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
717
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
718
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
719
- $fault: "client",
720
- $metadata,
699
+ (0, smithy_client_1.throwDefaultError)({
700
+ output,
701
+ parsedBody: parsedBody.Error,
702
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
703
+ errorCode,
721
704
  });
722
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
723
705
  }
724
706
  };
725
707
  const deserializeAws_queryDescribeAlarmsCommand = async (output, context) => {
@@ -741,7 +723,6 @@ const deserializeAws_queryDescribeAlarmsCommandError = async (output, context) =
741
723
  ...output,
742
724
  body: await parseBody(output.body, context),
743
725
  };
744
- let response;
745
726
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
746
727
  switch (errorCode) {
747
728
  case "InvalidNextToken":
@@ -749,14 +730,12 @@ const deserializeAws_queryDescribeAlarmsCommandError = async (output, context) =
749
730
  throw await deserializeAws_queryInvalidNextTokenResponse(parsedOutput, context);
750
731
  default:
751
732
  const parsedBody = parsedOutput.body;
752
- const $metadata = deserializeMetadata(output);
753
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
754
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
755
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
756
- $fault: "client",
757
- $metadata,
733
+ (0, smithy_client_1.throwDefaultError)({
734
+ output,
735
+ parsedBody: parsedBody.Error,
736
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
737
+ errorCode,
758
738
  });
759
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
760
739
  }
761
740
  };
762
741
  const deserializeAws_queryDescribeAlarmsForMetricCommand = async (output, context) => {
@@ -778,20 +757,14 @@ const deserializeAws_queryDescribeAlarmsForMetricCommandError = async (output, c
778
757
  ...output,
779
758
  body: await parseBody(output.body, context),
780
759
  };
781
- let response;
782
760
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
783
- switch (errorCode) {
784
- default:
785
- const parsedBody = parsedOutput.body;
786
- const $metadata = deserializeMetadata(output);
787
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
788
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
789
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
790
- $fault: "client",
791
- $metadata,
792
- });
793
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
794
- }
761
+ const parsedBody = parsedOutput.body;
762
+ (0, smithy_client_1.throwDefaultError)({
763
+ output,
764
+ parsedBody: parsedBody.Error,
765
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
766
+ errorCode,
767
+ });
795
768
  };
796
769
  const deserializeAws_queryDescribeAnomalyDetectorsCommand = async (output, context) => {
797
770
  if (output.statusCode >= 300) {
@@ -812,7 +785,6 @@ const deserializeAws_queryDescribeAnomalyDetectorsCommandError = async (output,
812
785
  ...output,
813
786
  body: await parseBody(output.body, context),
814
787
  };
815
- let response;
816
788
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
817
789
  switch (errorCode) {
818
790
  case "InternalServiceFault":
@@ -829,14 +801,12 @@ const deserializeAws_queryDescribeAnomalyDetectorsCommandError = async (output,
829
801
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
830
802
  default:
831
803
  const parsedBody = parsedOutput.body;
832
- const $metadata = deserializeMetadata(output);
833
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
834
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
835
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
836
- $fault: "client",
837
- $metadata,
804
+ (0, smithy_client_1.throwDefaultError)({
805
+ output,
806
+ parsedBody: parsedBody.Error,
807
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
808
+ errorCode,
838
809
  });
839
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
840
810
  }
841
811
  };
842
812
  const deserializeAws_queryDescribeInsightRulesCommand = async (output, context) => {
@@ -858,7 +828,6 @@ const deserializeAws_queryDescribeInsightRulesCommandError = async (output, cont
858
828
  ...output,
859
829
  body: await parseBody(output.body, context),
860
830
  };
861
- let response;
862
831
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
863
832
  switch (errorCode) {
864
833
  case "InvalidNextToken":
@@ -866,14 +835,12 @@ const deserializeAws_queryDescribeInsightRulesCommandError = async (output, cont
866
835
  throw await deserializeAws_queryInvalidNextTokenResponse(parsedOutput, context);
867
836
  default:
868
837
  const parsedBody = parsedOutput.body;
869
- const $metadata = deserializeMetadata(output);
870
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
871
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
872
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
873
- $fault: "client",
874
- $metadata,
838
+ (0, smithy_client_1.throwDefaultError)({
839
+ output,
840
+ parsedBody: parsedBody.Error,
841
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
842
+ errorCode,
875
843
  });
876
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
877
844
  }
878
845
  };
879
846
  const deserializeAws_queryDisableAlarmActionsCommand = async (output, context) => {
@@ -892,20 +859,14 @@ const deserializeAws_queryDisableAlarmActionsCommandError = async (output, conte
892
859
  ...output,
893
860
  body: await parseBody(output.body, context),
894
861
  };
895
- let response;
896
862
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
897
- switch (errorCode) {
898
- default:
899
- const parsedBody = parsedOutput.body;
900
- const $metadata = deserializeMetadata(output);
901
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
902
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
903
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
904
- $fault: "client",
905
- $metadata,
906
- });
907
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
908
- }
863
+ const parsedBody = parsedOutput.body;
864
+ (0, smithy_client_1.throwDefaultError)({
865
+ output,
866
+ parsedBody: parsedBody.Error,
867
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
868
+ errorCode,
869
+ });
909
870
  };
910
871
  const deserializeAws_queryDisableInsightRulesCommand = async (output, context) => {
911
872
  if (output.statusCode >= 300) {
@@ -926,7 +887,6 @@ const deserializeAws_queryDisableInsightRulesCommandError = async (output, conte
926
887
  ...output,
927
888
  body: await parseBody(output.body, context),
928
889
  };
929
- let response;
930
890
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
931
891
  switch (errorCode) {
932
892
  case "InvalidParameterValueException":
@@ -937,14 +897,12 @@ const deserializeAws_queryDisableInsightRulesCommandError = async (output, conte
937
897
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
938
898
  default:
939
899
  const parsedBody = parsedOutput.body;
940
- const $metadata = deserializeMetadata(output);
941
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
942
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
943
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
944
- $fault: "client",
945
- $metadata,
900
+ (0, smithy_client_1.throwDefaultError)({
901
+ output,
902
+ parsedBody: parsedBody.Error,
903
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
904
+ errorCode,
946
905
  });
947
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
948
906
  }
949
907
  };
950
908
  const deserializeAws_queryEnableAlarmActionsCommand = async (output, context) => {
@@ -963,20 +921,14 @@ const deserializeAws_queryEnableAlarmActionsCommandError = async (output, contex
963
921
  ...output,
964
922
  body: await parseBody(output.body, context),
965
923
  };
966
- let response;
967
924
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
968
- switch (errorCode) {
969
- default:
970
- const parsedBody = parsedOutput.body;
971
- const $metadata = deserializeMetadata(output);
972
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
973
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
974
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
975
- $fault: "client",
976
- $metadata,
977
- });
978
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
979
- }
925
+ const parsedBody = parsedOutput.body;
926
+ (0, smithy_client_1.throwDefaultError)({
927
+ output,
928
+ parsedBody: parsedBody.Error,
929
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
930
+ errorCode,
931
+ });
980
932
  };
981
933
  const deserializeAws_queryEnableInsightRulesCommand = async (output, context) => {
982
934
  if (output.statusCode >= 300) {
@@ -997,7 +949,6 @@ const deserializeAws_queryEnableInsightRulesCommandError = async (output, contex
997
949
  ...output,
998
950
  body: await parseBody(output.body, context),
999
951
  };
1000
- let response;
1001
952
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1002
953
  switch (errorCode) {
1003
954
  case "InvalidParameterValueException":
@@ -1011,14 +962,12 @@ const deserializeAws_queryEnableInsightRulesCommandError = async (output, contex
1011
962
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
1012
963
  default:
1013
964
  const parsedBody = parsedOutput.body;
1014
- const $metadata = deserializeMetadata(output);
1015
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1016
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1017
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1018
- $fault: "client",
1019
- $metadata,
965
+ (0, smithy_client_1.throwDefaultError)({
966
+ output,
967
+ parsedBody: parsedBody.Error,
968
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
969
+ errorCode,
1020
970
  });
1021
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1022
971
  }
1023
972
  };
1024
973
  const deserializeAws_queryGetDashboardCommand = async (output, context) => {
@@ -1040,7 +989,6 @@ const deserializeAws_queryGetDashboardCommandError = async (output, context) =>
1040
989
  ...output,
1041
990
  body: await parseBody(output.body, context),
1042
991
  };
1043
- let response;
1044
992
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1045
993
  switch (errorCode) {
1046
994
  case "DashboardNotFoundError":
@@ -1054,14 +1002,12 @@ const deserializeAws_queryGetDashboardCommandError = async (output, context) =>
1054
1002
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
1055
1003
  default:
1056
1004
  const parsedBody = parsedOutput.body;
1057
- const $metadata = deserializeMetadata(output);
1058
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1059
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1060
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1061
- $fault: "client",
1062
- $metadata,
1005
+ (0, smithy_client_1.throwDefaultError)({
1006
+ output,
1007
+ parsedBody: parsedBody.Error,
1008
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1009
+ errorCode,
1063
1010
  });
1064
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1065
1011
  }
1066
1012
  };
1067
1013
  const deserializeAws_queryGetInsightRuleReportCommand = async (output, context) => {
@@ -1083,7 +1029,6 @@ const deserializeAws_queryGetInsightRuleReportCommandError = async (output, cont
1083
1029
  ...output,
1084
1030
  body: await parseBody(output.body, context),
1085
1031
  };
1086
- let response;
1087
1032
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1088
1033
  switch (errorCode) {
1089
1034
  case "InvalidParameterValueException":
@@ -1097,14 +1042,12 @@ const deserializeAws_queryGetInsightRuleReportCommandError = async (output, cont
1097
1042
  throw await deserializeAws_queryResourceNotFoundExceptionResponse(parsedOutput, context);
1098
1043
  default:
1099
1044
  const parsedBody = parsedOutput.body;
1100
- const $metadata = deserializeMetadata(output);
1101
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1102
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1103
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1104
- $fault: "client",
1105
- $metadata,
1045
+ (0, smithy_client_1.throwDefaultError)({
1046
+ output,
1047
+ parsedBody: parsedBody.Error,
1048
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1049
+ errorCode,
1106
1050
  });
1107
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1108
1051
  }
1109
1052
  };
1110
1053
  const deserializeAws_queryGetMetricDataCommand = async (output, context) => {
@@ -1126,7 +1069,6 @@ const deserializeAws_queryGetMetricDataCommandError = async (output, context) =>
1126
1069
  ...output,
1127
1070
  body: await parseBody(output.body, context),
1128
1071
  };
1129
- let response;
1130
1072
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1131
1073
  switch (errorCode) {
1132
1074
  case "InvalidNextToken":
@@ -1134,14 +1076,12 @@ const deserializeAws_queryGetMetricDataCommandError = async (output, context) =>
1134
1076
  throw await deserializeAws_queryInvalidNextTokenResponse(parsedOutput, context);
1135
1077
  default:
1136
1078
  const parsedBody = parsedOutput.body;
1137
- const $metadata = deserializeMetadata(output);
1138
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1139
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1140
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1141
- $fault: "client",
1142
- $metadata,
1079
+ (0, smithy_client_1.throwDefaultError)({
1080
+ output,
1081
+ parsedBody: parsedBody.Error,
1082
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1083
+ errorCode,
1143
1084
  });
1144
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1145
1085
  }
1146
1086
  };
1147
1087
  const deserializeAws_queryGetMetricStatisticsCommand = async (output, context) => {
@@ -1163,7 +1103,6 @@ const deserializeAws_queryGetMetricStatisticsCommandError = async (output, conte
1163
1103
  ...output,
1164
1104
  body: await parseBody(output.body, context),
1165
1105
  };
1166
- let response;
1167
1106
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1168
1107
  switch (errorCode) {
1169
1108
  case "InternalServiceFault":
@@ -1180,14 +1119,12 @@ const deserializeAws_queryGetMetricStatisticsCommandError = async (output, conte
1180
1119
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
1181
1120
  default:
1182
1121
  const parsedBody = parsedOutput.body;
1183
- const $metadata = deserializeMetadata(output);
1184
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1185
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1186
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1187
- $fault: "client",
1188
- $metadata,
1122
+ (0, smithy_client_1.throwDefaultError)({
1123
+ output,
1124
+ parsedBody: parsedBody.Error,
1125
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1126
+ errorCode,
1189
1127
  });
1190
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1191
1128
  }
1192
1129
  };
1193
1130
  const deserializeAws_queryGetMetricStreamCommand = async (output, context) => {
@@ -1209,7 +1146,6 @@ const deserializeAws_queryGetMetricStreamCommandError = async (output, context)
1209
1146
  ...output,
1210
1147
  body: await parseBody(output.body, context),
1211
1148
  };
1212
- let response;
1213
1149
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1214
1150
  switch (errorCode) {
1215
1151
  case "InternalServiceFault":
@@ -1229,14 +1165,12 @@ const deserializeAws_queryGetMetricStreamCommandError = async (output, context)
1229
1165
  throw await deserializeAws_queryResourceNotFoundExceptionResponse(parsedOutput, context);
1230
1166
  default:
1231
1167
  const parsedBody = parsedOutput.body;
1232
- const $metadata = deserializeMetadata(output);
1233
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1234
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1235
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1236
- $fault: "client",
1237
- $metadata,
1168
+ (0, smithy_client_1.throwDefaultError)({
1169
+ output,
1170
+ parsedBody: parsedBody.Error,
1171
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1172
+ errorCode,
1238
1173
  });
1239
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1240
1174
  }
1241
1175
  };
1242
1176
  const deserializeAws_queryGetMetricWidgetImageCommand = async (output, context) => {
@@ -1258,20 +1192,14 @@ const deserializeAws_queryGetMetricWidgetImageCommandError = async (output, cont
1258
1192
  ...output,
1259
1193
  body: await parseBody(output.body, context),
1260
1194
  };
1261
- let response;
1262
1195
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1263
- switch (errorCode) {
1264
- default:
1265
- const parsedBody = parsedOutput.body;
1266
- const $metadata = deserializeMetadata(output);
1267
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1268
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1269
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1270
- $fault: "client",
1271
- $metadata,
1272
- });
1273
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1274
- }
1196
+ const parsedBody = parsedOutput.body;
1197
+ (0, smithy_client_1.throwDefaultError)({
1198
+ output,
1199
+ parsedBody: parsedBody.Error,
1200
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1201
+ errorCode,
1202
+ });
1275
1203
  };
1276
1204
  const deserializeAws_queryListDashboardsCommand = async (output, context) => {
1277
1205
  if (output.statusCode >= 300) {
@@ -1292,7 +1220,6 @@ const deserializeAws_queryListDashboardsCommandError = async (output, context) =
1292
1220
  ...output,
1293
1221
  body: await parseBody(output.body, context),
1294
1222
  };
1295
- let response;
1296
1223
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1297
1224
  switch (errorCode) {
1298
1225
  case "InternalServiceFault":
@@ -1303,14 +1230,12 @@ const deserializeAws_queryListDashboardsCommandError = async (output, context) =
1303
1230
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
1304
1231
  default:
1305
1232
  const parsedBody = parsedOutput.body;
1306
- const $metadata = deserializeMetadata(output);
1307
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1308
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1309
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1310
- $fault: "client",
1311
- $metadata,
1233
+ (0, smithy_client_1.throwDefaultError)({
1234
+ output,
1235
+ parsedBody: parsedBody.Error,
1236
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1237
+ errorCode,
1312
1238
  });
1313
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1314
1239
  }
1315
1240
  };
1316
1241
  const deserializeAws_queryListMetricsCommand = async (output, context) => {
@@ -1332,7 +1257,6 @@ const deserializeAws_queryListMetricsCommandError = async (output, context) => {
1332
1257
  ...output,
1333
1258
  body: await parseBody(output.body, context),
1334
1259
  };
1335
- let response;
1336
1260
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1337
1261
  switch (errorCode) {
1338
1262
  case "InternalServiceFault":
@@ -1343,14 +1267,12 @@ const deserializeAws_queryListMetricsCommandError = async (output, context) => {
1343
1267
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
1344
1268
  default:
1345
1269
  const parsedBody = parsedOutput.body;
1346
- const $metadata = deserializeMetadata(output);
1347
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1348
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1349
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1350
- $fault: "client",
1351
- $metadata,
1270
+ (0, smithy_client_1.throwDefaultError)({
1271
+ output,
1272
+ parsedBody: parsedBody.Error,
1273
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1274
+ errorCode,
1352
1275
  });
1353
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1354
1276
  }
1355
1277
  };
1356
1278
  const deserializeAws_queryListMetricStreamsCommand = async (output, context) => {
@@ -1372,7 +1294,6 @@ const deserializeAws_queryListMetricStreamsCommandError = async (output, context
1372
1294
  ...output,
1373
1295
  body: await parseBody(output.body, context),
1374
1296
  };
1375
- let response;
1376
1297
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1377
1298
  switch (errorCode) {
1378
1299
  case "InternalServiceFault":
@@ -1389,14 +1310,12 @@ const deserializeAws_queryListMetricStreamsCommandError = async (output, context
1389
1310
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
1390
1311
  default:
1391
1312
  const parsedBody = parsedOutput.body;
1392
- const $metadata = deserializeMetadata(output);
1393
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1394
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1395
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1396
- $fault: "client",
1397
- $metadata,
1313
+ (0, smithy_client_1.throwDefaultError)({
1314
+ output,
1315
+ parsedBody: parsedBody.Error,
1316
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1317
+ errorCode,
1398
1318
  });
1399
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1400
1319
  }
1401
1320
  };
1402
1321
  const deserializeAws_queryListTagsForResourceCommand = async (output, context) => {
@@ -1418,7 +1337,6 @@ const deserializeAws_queryListTagsForResourceCommandError = async (output, conte
1418
1337
  ...output,
1419
1338
  body: await parseBody(output.body, context),
1420
1339
  };
1421
- let response;
1422
1340
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1423
1341
  switch (errorCode) {
1424
1342
  case "InternalServiceFault":
@@ -1432,14 +1350,12 @@ const deserializeAws_queryListTagsForResourceCommandError = async (output, conte
1432
1350
  throw await deserializeAws_queryResourceNotFoundExceptionResponse(parsedOutput, context);
1433
1351
  default:
1434
1352
  const parsedBody = parsedOutput.body;
1435
- const $metadata = deserializeMetadata(output);
1436
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1437
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1438
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1439
- $fault: "client",
1440
- $metadata,
1353
+ (0, smithy_client_1.throwDefaultError)({
1354
+ output,
1355
+ parsedBody: parsedBody.Error,
1356
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1357
+ errorCode,
1441
1358
  });
1442
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1443
1359
  }
1444
1360
  };
1445
1361
  const deserializeAws_queryPutAnomalyDetectorCommand = async (output, context) => {
@@ -1461,7 +1377,6 @@ const deserializeAws_queryPutAnomalyDetectorCommandError = async (output, contex
1461
1377
  ...output,
1462
1378
  body: await parseBody(output.body, context),
1463
1379
  };
1464
- let response;
1465
1380
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1466
1381
  switch (errorCode) {
1467
1382
  case "InternalServiceFault":
@@ -1481,14 +1396,12 @@ const deserializeAws_queryPutAnomalyDetectorCommandError = async (output, contex
1481
1396
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
1482
1397
  default:
1483
1398
  const parsedBody = parsedOutput.body;
1484
- const $metadata = deserializeMetadata(output);
1485
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1486
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1487
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1488
- $fault: "client",
1489
- $metadata,
1399
+ (0, smithy_client_1.throwDefaultError)({
1400
+ output,
1401
+ parsedBody: parsedBody.Error,
1402
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1403
+ errorCode,
1490
1404
  });
1491
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1492
1405
  }
1493
1406
  };
1494
1407
  const deserializeAws_queryPutCompositeAlarmCommand = async (output, context) => {
@@ -1507,7 +1420,6 @@ const deserializeAws_queryPutCompositeAlarmCommandError = async (output, context
1507
1420
  ...output,
1508
1421
  body: await parseBody(output.body, context),
1509
1422
  };
1510
- let response;
1511
1423
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1512
1424
  switch (errorCode) {
1513
1425
  case "LimitExceededFault":
@@ -1515,14 +1427,12 @@ const deserializeAws_queryPutCompositeAlarmCommandError = async (output, context
1515
1427
  throw await deserializeAws_queryLimitExceededFaultResponse(parsedOutput, context);
1516
1428
  default:
1517
1429
  const parsedBody = parsedOutput.body;
1518
- const $metadata = deserializeMetadata(output);
1519
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1520
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1521
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1522
- $fault: "client",
1523
- $metadata,
1430
+ (0, smithy_client_1.throwDefaultError)({
1431
+ output,
1432
+ parsedBody: parsedBody.Error,
1433
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1434
+ errorCode,
1524
1435
  });
1525
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1526
1436
  }
1527
1437
  };
1528
1438
  const deserializeAws_queryPutDashboardCommand = async (output, context) => {
@@ -1544,7 +1454,6 @@ const deserializeAws_queryPutDashboardCommandError = async (output, context) =>
1544
1454
  ...output,
1545
1455
  body: await parseBody(output.body, context),
1546
1456
  };
1547
- let response;
1548
1457
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1549
1458
  switch (errorCode) {
1550
1459
  case "DashboardInvalidInputError":
@@ -1555,14 +1464,12 @@ const deserializeAws_queryPutDashboardCommandError = async (output, context) =>
1555
1464
  throw await deserializeAws_queryInternalServiceFaultResponse(parsedOutput, context);
1556
1465
  default:
1557
1466
  const parsedBody = parsedOutput.body;
1558
- const $metadata = deserializeMetadata(output);
1559
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1560
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1561
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1562
- $fault: "client",
1563
- $metadata,
1467
+ (0, smithy_client_1.throwDefaultError)({
1468
+ output,
1469
+ parsedBody: parsedBody.Error,
1470
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1471
+ errorCode,
1564
1472
  });
1565
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1566
1473
  }
1567
1474
  };
1568
1475
  const deserializeAws_queryPutInsightRuleCommand = async (output, context) => {
@@ -1584,7 +1491,6 @@ const deserializeAws_queryPutInsightRuleCommandError = async (output, context) =
1584
1491
  ...output,
1585
1492
  body: await parseBody(output.body, context),
1586
1493
  };
1587
- let response;
1588
1494
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1589
1495
  switch (errorCode) {
1590
1496
  case "InvalidParameterValueException":
@@ -1598,14 +1504,12 @@ const deserializeAws_queryPutInsightRuleCommandError = async (output, context) =
1598
1504
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
1599
1505
  default:
1600
1506
  const parsedBody = parsedOutput.body;
1601
- const $metadata = deserializeMetadata(output);
1602
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1603
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1604
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1605
- $fault: "client",
1606
- $metadata,
1507
+ (0, smithy_client_1.throwDefaultError)({
1508
+ output,
1509
+ parsedBody: parsedBody.Error,
1510
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1511
+ errorCode,
1607
1512
  });
1608
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1609
1513
  }
1610
1514
  };
1611
1515
  const deserializeAws_queryPutMetricAlarmCommand = async (output, context) => {
@@ -1624,7 +1528,6 @@ const deserializeAws_queryPutMetricAlarmCommandError = async (output, context) =
1624
1528
  ...output,
1625
1529
  body: await parseBody(output.body, context),
1626
1530
  };
1627
- let response;
1628
1531
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1629
1532
  switch (errorCode) {
1630
1533
  case "LimitExceededFault":
@@ -1632,14 +1535,12 @@ const deserializeAws_queryPutMetricAlarmCommandError = async (output, context) =
1632
1535
  throw await deserializeAws_queryLimitExceededFaultResponse(parsedOutput, context);
1633
1536
  default:
1634
1537
  const parsedBody = parsedOutput.body;
1635
- const $metadata = deserializeMetadata(output);
1636
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1637
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1638
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1639
- $fault: "client",
1640
- $metadata,
1538
+ (0, smithy_client_1.throwDefaultError)({
1539
+ output,
1540
+ parsedBody: parsedBody.Error,
1541
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1542
+ errorCode,
1641
1543
  });
1642
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1643
1544
  }
1644
1545
  };
1645
1546
  const deserializeAws_queryPutMetricDataCommand = async (output, context) => {
@@ -1658,7 +1559,6 @@ const deserializeAws_queryPutMetricDataCommandError = async (output, context) =>
1658
1559
  ...output,
1659
1560
  body: await parseBody(output.body, context),
1660
1561
  };
1661
- let response;
1662
1562
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1663
1563
  switch (errorCode) {
1664
1564
  case "InternalServiceFault":
@@ -1675,14 +1575,12 @@ const deserializeAws_queryPutMetricDataCommandError = async (output, context) =>
1675
1575
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
1676
1576
  default:
1677
1577
  const parsedBody = parsedOutput.body;
1678
- const $metadata = deserializeMetadata(output);
1679
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1680
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1681
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1682
- $fault: "client",
1683
- $metadata,
1578
+ (0, smithy_client_1.throwDefaultError)({
1579
+ output,
1580
+ parsedBody: parsedBody.Error,
1581
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1582
+ errorCode,
1684
1583
  });
1685
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1686
1584
  }
1687
1585
  };
1688
1586
  const deserializeAws_queryPutMetricStreamCommand = async (output, context) => {
@@ -1704,7 +1602,6 @@ const deserializeAws_queryPutMetricStreamCommandError = async (output, context)
1704
1602
  ...output,
1705
1603
  body: await parseBody(output.body, context),
1706
1604
  };
1707
- let response;
1708
1605
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1709
1606
  switch (errorCode) {
1710
1607
  case "ConcurrentModificationException":
@@ -1724,14 +1621,12 @@ const deserializeAws_queryPutMetricStreamCommandError = async (output, context)
1724
1621
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
1725
1622
  default:
1726
1623
  const parsedBody = parsedOutput.body;
1727
- const $metadata = deserializeMetadata(output);
1728
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1729
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1730
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1731
- $fault: "client",
1732
- $metadata,
1624
+ (0, smithy_client_1.throwDefaultError)({
1625
+ output,
1626
+ parsedBody: parsedBody.Error,
1627
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1628
+ errorCode,
1733
1629
  });
1734
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1735
1630
  }
1736
1631
  };
1737
1632
  const deserializeAws_querySetAlarmStateCommand = async (output, context) => {
@@ -1750,7 +1645,6 @@ const deserializeAws_querySetAlarmStateCommandError = async (output, context) =>
1750
1645
  ...output,
1751
1646
  body: await parseBody(output.body, context),
1752
1647
  };
1753
- let response;
1754
1648
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1755
1649
  switch (errorCode) {
1756
1650
  case "InvalidFormatFault":
@@ -1761,14 +1655,12 @@ const deserializeAws_querySetAlarmStateCommandError = async (output, context) =>
1761
1655
  throw await deserializeAws_queryResourceNotFoundResponse(parsedOutput, context);
1762
1656
  default:
1763
1657
  const parsedBody = parsedOutput.body;
1764
- const $metadata = deserializeMetadata(output);
1765
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1766
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1767
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1768
- $fault: "client",
1769
- $metadata,
1658
+ (0, smithy_client_1.throwDefaultError)({
1659
+ output,
1660
+ parsedBody: parsedBody.Error,
1661
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1662
+ errorCode,
1770
1663
  });
1771
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1772
1664
  }
1773
1665
  };
1774
1666
  const deserializeAws_queryStartMetricStreamsCommand = async (output, context) => {
@@ -1790,7 +1682,6 @@ const deserializeAws_queryStartMetricStreamsCommandError = async (output, contex
1790
1682
  ...output,
1791
1683
  body: await parseBody(output.body, context),
1792
1684
  };
1793
- let response;
1794
1685
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1795
1686
  switch (errorCode) {
1796
1687
  case "InternalServiceFault":
@@ -1804,14 +1695,12 @@ const deserializeAws_queryStartMetricStreamsCommandError = async (output, contex
1804
1695
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
1805
1696
  default:
1806
1697
  const parsedBody = parsedOutput.body;
1807
- const $metadata = deserializeMetadata(output);
1808
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1809
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1810
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1811
- $fault: "client",
1812
- $metadata,
1698
+ (0, smithy_client_1.throwDefaultError)({
1699
+ output,
1700
+ parsedBody: parsedBody.Error,
1701
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1702
+ errorCode,
1813
1703
  });
1814
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1815
1704
  }
1816
1705
  };
1817
1706
  const deserializeAws_queryStopMetricStreamsCommand = async (output, context) => {
@@ -1833,7 +1722,6 @@ const deserializeAws_queryStopMetricStreamsCommandError = async (output, context
1833
1722
  ...output,
1834
1723
  body: await parseBody(output.body, context),
1835
1724
  };
1836
- let response;
1837
1725
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1838
1726
  switch (errorCode) {
1839
1727
  case "InternalServiceFault":
@@ -1847,14 +1735,12 @@ const deserializeAws_queryStopMetricStreamsCommandError = async (output, context
1847
1735
  throw await deserializeAws_queryMissingRequiredParameterExceptionResponse(parsedOutput, context);
1848
1736
  default:
1849
1737
  const parsedBody = parsedOutput.body;
1850
- const $metadata = deserializeMetadata(output);
1851
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1852
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1853
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1854
- $fault: "client",
1855
- $metadata,
1738
+ (0, smithy_client_1.throwDefaultError)({
1739
+ output,
1740
+ parsedBody: parsedBody.Error,
1741
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1742
+ errorCode,
1856
1743
  });
1857
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1858
1744
  }
1859
1745
  };
1860
1746
  const deserializeAws_queryTagResourceCommand = async (output, context) => {
@@ -1876,7 +1762,6 @@ const deserializeAws_queryTagResourceCommandError = async (output, context) => {
1876
1762
  ...output,
1877
1763
  body: await parseBody(output.body, context),
1878
1764
  };
1879
- let response;
1880
1765
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1881
1766
  switch (errorCode) {
1882
1767
  case "ConcurrentModificationException":
@@ -1893,14 +1778,12 @@ const deserializeAws_queryTagResourceCommandError = async (output, context) => {
1893
1778
  throw await deserializeAws_queryResourceNotFoundExceptionResponse(parsedOutput, context);
1894
1779
  default:
1895
1780
  const parsedBody = parsedOutput.body;
1896
- const $metadata = deserializeMetadata(output);
1897
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1898
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1899
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1900
- $fault: "client",
1901
- $metadata,
1781
+ (0, smithy_client_1.throwDefaultError)({
1782
+ output,
1783
+ parsedBody: parsedBody.Error,
1784
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1785
+ errorCode,
1902
1786
  });
1903
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1904
1787
  }
1905
1788
  };
1906
1789
  const deserializeAws_queryUntagResourceCommand = async (output, context) => {
@@ -1922,7 +1805,6 @@ const deserializeAws_queryUntagResourceCommandError = async (output, context) =>
1922
1805
  ...output,
1923
1806
  body: await parseBody(output.body, context),
1924
1807
  };
1925
- let response;
1926
1808
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1927
1809
  switch (errorCode) {
1928
1810
  case "ConcurrentModificationException":
@@ -1939,14 +1821,12 @@ const deserializeAws_queryUntagResourceCommandError = async (output, context) =>
1939
1821
  throw await deserializeAws_queryResourceNotFoundExceptionResponse(parsedOutput, context);
1940
1822
  default:
1941
1823
  const parsedBody = parsedOutput.body;
1942
- const $metadata = deserializeMetadata(output);
1943
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1944
- response = new CloudWatchServiceException_1.CloudWatchServiceException({
1945
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1946
- $fault: "client",
1947
- $metadata,
1824
+ (0, smithy_client_1.throwDefaultError)({
1825
+ output,
1826
+ parsedBody: parsedBody.Error,
1827
+ exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1828
+ errorCode,
1948
1829
  });
1949
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1950
1830
  }
1951
1831
  };
1952
1832
  const deserializeAws_queryConcurrentModificationExceptionResponse = async (parsedOutput, context) => {
@@ -2092,14 +1972,14 @@ const serializeAws_queryAlarmTypes = (input, context) => {
2092
1972
  };
2093
1973
  const serializeAws_queryAnomalyDetectorConfiguration = (input, context) => {
2094
1974
  const entries = {};
2095
- if (input.ExcludedTimeRanges !== undefined && input.ExcludedTimeRanges !== null) {
1975
+ if (input.ExcludedTimeRanges != null) {
2096
1976
  const memberEntries = serializeAws_queryAnomalyDetectorExcludedTimeRanges(input.ExcludedTimeRanges, context);
2097
1977
  Object.entries(memberEntries).forEach(([key, value]) => {
2098
1978
  const loc = `ExcludedTimeRanges.${key}`;
2099
1979
  entries[loc] = value;
2100
1980
  });
2101
1981
  }
2102
- if (input.MetricTimezone !== undefined && input.MetricTimezone !== null) {
1982
+ if (input.MetricTimezone != null) {
2103
1983
  entries["MetricTimezone"] = input.MetricTimezone;
2104
1984
  }
2105
1985
  return entries;
@@ -2157,7 +2037,7 @@ const serializeAws_queryDashboardNames = (input, context) => {
2157
2037
  };
2158
2038
  const serializeAws_queryDeleteAlarmsInput = (input, context) => {
2159
2039
  const entries = {};
2160
- if (input.AlarmNames !== undefined && input.AlarmNames !== null) {
2040
+ if (input.AlarmNames != null) {
2161
2041
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2162
2042
  Object.entries(memberEntries).forEach(([key, value]) => {
2163
2043
  const loc = `AlarmNames.${key}`;
@@ -2168,30 +2048,30 @@ const serializeAws_queryDeleteAlarmsInput = (input, context) => {
2168
2048
  };
2169
2049
  const serializeAws_queryDeleteAnomalyDetectorInput = (input, context) => {
2170
2050
  const entries = {};
2171
- if (input.Namespace !== undefined && input.Namespace !== null) {
2051
+ if (input.Namespace != null) {
2172
2052
  entries["Namespace"] = input.Namespace;
2173
2053
  }
2174
- if (input.MetricName !== undefined && input.MetricName !== null) {
2054
+ if (input.MetricName != null) {
2175
2055
  entries["MetricName"] = input.MetricName;
2176
2056
  }
2177
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2057
+ if (input.Dimensions != null) {
2178
2058
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2179
2059
  Object.entries(memberEntries).forEach(([key, value]) => {
2180
2060
  const loc = `Dimensions.${key}`;
2181
2061
  entries[loc] = value;
2182
2062
  });
2183
2063
  }
2184
- if (input.Stat !== undefined && input.Stat !== null) {
2064
+ if (input.Stat != null) {
2185
2065
  entries["Stat"] = input.Stat;
2186
2066
  }
2187
- if (input.SingleMetricAnomalyDetector !== undefined && input.SingleMetricAnomalyDetector !== null) {
2067
+ if (input.SingleMetricAnomalyDetector != null) {
2188
2068
  const memberEntries = serializeAws_querySingleMetricAnomalyDetector(input.SingleMetricAnomalyDetector, context);
2189
2069
  Object.entries(memberEntries).forEach(([key, value]) => {
2190
2070
  const loc = `SingleMetricAnomalyDetector.${key}`;
2191
2071
  entries[loc] = value;
2192
2072
  });
2193
2073
  }
2194
- if (input.MetricMathAnomalyDetector !== undefined && input.MetricMathAnomalyDetector !== null) {
2074
+ if (input.MetricMathAnomalyDetector != null) {
2195
2075
  const memberEntries = serializeAws_queryMetricMathAnomalyDetector(input.MetricMathAnomalyDetector, context);
2196
2076
  Object.entries(memberEntries).forEach(([key, value]) => {
2197
2077
  const loc = `MetricMathAnomalyDetector.${key}`;
@@ -2202,7 +2082,7 @@ const serializeAws_queryDeleteAnomalyDetectorInput = (input, context) => {
2202
2082
  };
2203
2083
  const serializeAws_queryDeleteDashboardsInput = (input, context) => {
2204
2084
  const entries = {};
2205
- if (input.DashboardNames !== undefined && input.DashboardNames !== null) {
2085
+ if (input.DashboardNames != null) {
2206
2086
  const memberEntries = serializeAws_queryDashboardNames(input.DashboardNames, context);
2207
2087
  Object.entries(memberEntries).forEach(([key, value]) => {
2208
2088
  const loc = `DashboardNames.${key}`;
@@ -2213,7 +2093,7 @@ const serializeAws_queryDeleteDashboardsInput = (input, context) => {
2213
2093
  };
2214
2094
  const serializeAws_queryDeleteInsightRulesInput = (input, context) => {
2215
2095
  const entries = {};
2216
- if (input.RuleNames !== undefined && input.RuleNames !== null) {
2096
+ if (input.RuleNames != null) {
2217
2097
  const memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2218
2098
  Object.entries(memberEntries).forEach(([key, value]) => {
2219
2099
  const loc = `RuleNames.${key}`;
@@ -2224,133 +2104,133 @@ const serializeAws_queryDeleteInsightRulesInput = (input, context) => {
2224
2104
  };
2225
2105
  const serializeAws_queryDeleteMetricStreamInput = (input, context) => {
2226
2106
  const entries = {};
2227
- if (input.Name !== undefined && input.Name !== null) {
2107
+ if (input.Name != null) {
2228
2108
  entries["Name"] = input.Name;
2229
2109
  }
2230
2110
  return entries;
2231
2111
  };
2232
2112
  const serializeAws_queryDescribeAlarmHistoryInput = (input, context) => {
2233
2113
  const entries = {};
2234
- if (input.AlarmName !== undefined && input.AlarmName !== null) {
2114
+ if (input.AlarmName != null) {
2235
2115
  entries["AlarmName"] = input.AlarmName;
2236
2116
  }
2237
- if (input.AlarmTypes !== undefined && input.AlarmTypes !== null) {
2117
+ if (input.AlarmTypes != null) {
2238
2118
  const memberEntries = serializeAws_queryAlarmTypes(input.AlarmTypes, context);
2239
2119
  Object.entries(memberEntries).forEach(([key, value]) => {
2240
2120
  const loc = `AlarmTypes.${key}`;
2241
2121
  entries[loc] = value;
2242
2122
  });
2243
2123
  }
2244
- if (input.HistoryItemType !== undefined && input.HistoryItemType !== null) {
2124
+ if (input.HistoryItemType != null) {
2245
2125
  entries["HistoryItemType"] = input.HistoryItemType;
2246
2126
  }
2247
- if (input.StartDate !== undefined && input.StartDate !== null) {
2127
+ if (input.StartDate != null) {
2248
2128
  entries["StartDate"] = input.StartDate.toISOString().split(".")[0] + "Z";
2249
2129
  }
2250
- if (input.EndDate !== undefined && input.EndDate !== null) {
2130
+ if (input.EndDate != null) {
2251
2131
  entries["EndDate"] = input.EndDate.toISOString().split(".")[0] + "Z";
2252
2132
  }
2253
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
2133
+ if (input.MaxRecords != null) {
2254
2134
  entries["MaxRecords"] = input.MaxRecords;
2255
2135
  }
2256
- if (input.NextToken !== undefined && input.NextToken !== null) {
2136
+ if (input.NextToken != null) {
2257
2137
  entries["NextToken"] = input.NextToken;
2258
2138
  }
2259
- if (input.ScanBy !== undefined && input.ScanBy !== null) {
2139
+ if (input.ScanBy != null) {
2260
2140
  entries["ScanBy"] = input.ScanBy;
2261
2141
  }
2262
2142
  return entries;
2263
2143
  };
2264
2144
  const serializeAws_queryDescribeAlarmsForMetricInput = (input, context) => {
2265
2145
  const entries = {};
2266
- if (input.MetricName !== undefined && input.MetricName !== null) {
2146
+ if (input.MetricName != null) {
2267
2147
  entries["MetricName"] = input.MetricName;
2268
2148
  }
2269
- if (input.Namespace !== undefined && input.Namespace !== null) {
2149
+ if (input.Namespace != null) {
2270
2150
  entries["Namespace"] = input.Namespace;
2271
2151
  }
2272
- if (input.Statistic !== undefined && input.Statistic !== null) {
2152
+ if (input.Statistic != null) {
2273
2153
  entries["Statistic"] = input.Statistic;
2274
2154
  }
2275
- if (input.ExtendedStatistic !== undefined && input.ExtendedStatistic !== null) {
2155
+ if (input.ExtendedStatistic != null) {
2276
2156
  entries["ExtendedStatistic"] = input.ExtendedStatistic;
2277
2157
  }
2278
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2158
+ if (input.Dimensions != null) {
2279
2159
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2280
2160
  Object.entries(memberEntries).forEach(([key, value]) => {
2281
2161
  const loc = `Dimensions.${key}`;
2282
2162
  entries[loc] = value;
2283
2163
  });
2284
2164
  }
2285
- if (input.Period !== undefined && input.Period !== null) {
2165
+ if (input.Period != null) {
2286
2166
  entries["Period"] = input.Period;
2287
2167
  }
2288
- if (input.Unit !== undefined && input.Unit !== null) {
2168
+ if (input.Unit != null) {
2289
2169
  entries["Unit"] = input.Unit;
2290
2170
  }
2291
2171
  return entries;
2292
2172
  };
2293
2173
  const serializeAws_queryDescribeAlarmsInput = (input, context) => {
2294
2174
  const entries = {};
2295
- if (input.AlarmNames !== undefined && input.AlarmNames !== null) {
2175
+ if (input.AlarmNames != null) {
2296
2176
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2297
2177
  Object.entries(memberEntries).forEach(([key, value]) => {
2298
2178
  const loc = `AlarmNames.${key}`;
2299
2179
  entries[loc] = value;
2300
2180
  });
2301
2181
  }
2302
- if (input.AlarmNamePrefix !== undefined && input.AlarmNamePrefix !== null) {
2182
+ if (input.AlarmNamePrefix != null) {
2303
2183
  entries["AlarmNamePrefix"] = input.AlarmNamePrefix;
2304
2184
  }
2305
- if (input.AlarmTypes !== undefined && input.AlarmTypes !== null) {
2185
+ if (input.AlarmTypes != null) {
2306
2186
  const memberEntries = serializeAws_queryAlarmTypes(input.AlarmTypes, context);
2307
2187
  Object.entries(memberEntries).forEach(([key, value]) => {
2308
2188
  const loc = `AlarmTypes.${key}`;
2309
2189
  entries[loc] = value;
2310
2190
  });
2311
2191
  }
2312
- if (input.ChildrenOfAlarmName !== undefined && input.ChildrenOfAlarmName !== null) {
2192
+ if (input.ChildrenOfAlarmName != null) {
2313
2193
  entries["ChildrenOfAlarmName"] = input.ChildrenOfAlarmName;
2314
2194
  }
2315
- if (input.ParentsOfAlarmName !== undefined && input.ParentsOfAlarmName !== null) {
2195
+ if (input.ParentsOfAlarmName != null) {
2316
2196
  entries["ParentsOfAlarmName"] = input.ParentsOfAlarmName;
2317
2197
  }
2318
- if (input.StateValue !== undefined && input.StateValue !== null) {
2198
+ if (input.StateValue != null) {
2319
2199
  entries["StateValue"] = input.StateValue;
2320
2200
  }
2321
- if (input.ActionPrefix !== undefined && input.ActionPrefix !== null) {
2201
+ if (input.ActionPrefix != null) {
2322
2202
  entries["ActionPrefix"] = input.ActionPrefix;
2323
2203
  }
2324
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
2204
+ if (input.MaxRecords != null) {
2325
2205
  entries["MaxRecords"] = input.MaxRecords;
2326
2206
  }
2327
- if (input.NextToken !== undefined && input.NextToken !== null) {
2207
+ if (input.NextToken != null) {
2328
2208
  entries["NextToken"] = input.NextToken;
2329
2209
  }
2330
2210
  return entries;
2331
2211
  };
2332
2212
  const serializeAws_queryDescribeAnomalyDetectorsInput = (input, context) => {
2333
2213
  const entries = {};
2334
- if (input.NextToken !== undefined && input.NextToken !== null) {
2214
+ if (input.NextToken != null) {
2335
2215
  entries["NextToken"] = input.NextToken;
2336
2216
  }
2337
- if (input.MaxResults !== undefined && input.MaxResults !== null) {
2217
+ if (input.MaxResults != null) {
2338
2218
  entries["MaxResults"] = input.MaxResults;
2339
2219
  }
2340
- if (input.Namespace !== undefined && input.Namespace !== null) {
2220
+ if (input.Namespace != null) {
2341
2221
  entries["Namespace"] = input.Namespace;
2342
2222
  }
2343
- if (input.MetricName !== undefined && input.MetricName !== null) {
2223
+ if (input.MetricName != null) {
2344
2224
  entries["MetricName"] = input.MetricName;
2345
2225
  }
2346
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2226
+ if (input.Dimensions != null) {
2347
2227
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2348
2228
  Object.entries(memberEntries).forEach(([key, value]) => {
2349
2229
  const loc = `Dimensions.${key}`;
2350
2230
  entries[loc] = value;
2351
2231
  });
2352
2232
  }
2353
- if (input.AnomalyDetectorTypes !== undefined && input.AnomalyDetectorTypes !== null) {
2233
+ if (input.AnomalyDetectorTypes != null) {
2354
2234
  const memberEntries = serializeAws_queryAnomalyDetectorTypes(input.AnomalyDetectorTypes, context);
2355
2235
  Object.entries(memberEntries).forEach(([key, value]) => {
2356
2236
  const loc = `AnomalyDetectorTypes.${key}`;
@@ -2361,30 +2241,30 @@ const serializeAws_queryDescribeAnomalyDetectorsInput = (input, context) => {
2361
2241
  };
2362
2242
  const serializeAws_queryDescribeInsightRulesInput = (input, context) => {
2363
2243
  const entries = {};
2364
- if (input.NextToken !== undefined && input.NextToken !== null) {
2244
+ if (input.NextToken != null) {
2365
2245
  entries["NextToken"] = input.NextToken;
2366
2246
  }
2367
- if (input.MaxResults !== undefined && input.MaxResults !== null) {
2247
+ if (input.MaxResults != null) {
2368
2248
  entries["MaxResults"] = input.MaxResults;
2369
2249
  }
2370
2250
  return entries;
2371
2251
  };
2372
2252
  const serializeAws_queryDimension = (input, context) => {
2373
2253
  const entries = {};
2374
- if (input.Name !== undefined && input.Name !== null) {
2254
+ if (input.Name != null) {
2375
2255
  entries["Name"] = input.Name;
2376
2256
  }
2377
- if (input.Value !== undefined && input.Value !== null) {
2257
+ if (input.Value != null) {
2378
2258
  entries["Value"] = input.Value;
2379
2259
  }
2380
2260
  return entries;
2381
2261
  };
2382
2262
  const serializeAws_queryDimensionFilter = (input, context) => {
2383
2263
  const entries = {};
2384
- if (input.Name !== undefined && input.Name !== null) {
2264
+ if (input.Name != null) {
2385
2265
  entries["Name"] = input.Name;
2386
2266
  }
2387
- if (input.Value !== undefined && input.Value !== null) {
2267
+ if (input.Value != null) {
2388
2268
  entries["Value"] = input.Value;
2389
2269
  }
2390
2270
  return entries;
@@ -2421,7 +2301,7 @@ const serializeAws_queryDimensions = (input, context) => {
2421
2301
  };
2422
2302
  const serializeAws_queryDisableAlarmActionsInput = (input, context) => {
2423
2303
  const entries = {};
2424
- if (input.AlarmNames !== undefined && input.AlarmNames !== null) {
2304
+ if (input.AlarmNames != null) {
2425
2305
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2426
2306
  Object.entries(memberEntries).forEach(([key, value]) => {
2427
2307
  const loc = `AlarmNames.${key}`;
@@ -2432,7 +2312,7 @@ const serializeAws_queryDisableAlarmActionsInput = (input, context) => {
2432
2312
  };
2433
2313
  const serializeAws_queryDisableInsightRulesInput = (input, context) => {
2434
2314
  const entries = {};
2435
- if (input.RuleNames !== undefined && input.RuleNames !== null) {
2315
+ if (input.RuleNames != null) {
2436
2316
  const memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2437
2317
  Object.entries(memberEntries).forEach(([key, value]) => {
2438
2318
  const loc = `RuleNames.${key}`;
@@ -2443,7 +2323,7 @@ const serializeAws_queryDisableInsightRulesInput = (input, context) => {
2443
2323
  };
2444
2324
  const serializeAws_queryEnableAlarmActionsInput = (input, context) => {
2445
2325
  const entries = {};
2446
- if (input.AlarmNames !== undefined && input.AlarmNames !== null) {
2326
+ if (input.AlarmNames != null) {
2447
2327
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2448
2328
  Object.entries(memberEntries).forEach(([key, value]) => {
2449
2329
  const loc = `AlarmNames.${key}`;
@@ -2454,7 +2334,7 @@ const serializeAws_queryEnableAlarmActionsInput = (input, context) => {
2454
2334
  };
2455
2335
  const serializeAws_queryEnableInsightRulesInput = (input, context) => {
2456
2336
  const entries = {};
2457
- if (input.RuleNames !== undefined && input.RuleNames !== null) {
2337
+ if (input.RuleNames != null) {
2458
2338
  const memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2459
2339
  Object.entries(memberEntries).forEach(([key, value]) => {
2460
2340
  const loc = `RuleNames.${key}`;
@@ -2477,65 +2357,65 @@ const serializeAws_queryExtendedStatistics = (input, context) => {
2477
2357
  };
2478
2358
  const serializeAws_queryGetDashboardInput = (input, context) => {
2479
2359
  const entries = {};
2480
- if (input.DashboardName !== undefined && input.DashboardName !== null) {
2360
+ if (input.DashboardName != null) {
2481
2361
  entries["DashboardName"] = input.DashboardName;
2482
2362
  }
2483
2363
  return entries;
2484
2364
  };
2485
2365
  const serializeAws_queryGetInsightRuleReportInput = (input, context) => {
2486
2366
  const entries = {};
2487
- if (input.RuleName !== undefined && input.RuleName !== null) {
2367
+ if (input.RuleName != null) {
2488
2368
  entries["RuleName"] = input.RuleName;
2489
2369
  }
2490
- if (input.StartTime !== undefined && input.StartTime !== null) {
2370
+ if (input.StartTime != null) {
2491
2371
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
2492
2372
  }
2493
- if (input.EndTime !== undefined && input.EndTime !== null) {
2373
+ if (input.EndTime != null) {
2494
2374
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
2495
2375
  }
2496
- if (input.Period !== undefined && input.Period !== null) {
2376
+ if (input.Period != null) {
2497
2377
  entries["Period"] = input.Period;
2498
2378
  }
2499
- if (input.MaxContributorCount !== undefined && input.MaxContributorCount !== null) {
2379
+ if (input.MaxContributorCount != null) {
2500
2380
  entries["MaxContributorCount"] = input.MaxContributorCount;
2501
2381
  }
2502
- if (input.Metrics !== undefined && input.Metrics !== null) {
2382
+ if (input.Metrics != null) {
2503
2383
  const memberEntries = serializeAws_queryInsightRuleMetricList(input.Metrics, context);
2504
2384
  Object.entries(memberEntries).forEach(([key, value]) => {
2505
2385
  const loc = `Metrics.${key}`;
2506
2386
  entries[loc] = value;
2507
2387
  });
2508
2388
  }
2509
- if (input.OrderBy !== undefined && input.OrderBy !== null) {
2389
+ if (input.OrderBy != null) {
2510
2390
  entries["OrderBy"] = input.OrderBy;
2511
2391
  }
2512
2392
  return entries;
2513
2393
  };
2514
2394
  const serializeAws_queryGetMetricDataInput = (input, context) => {
2515
2395
  const entries = {};
2516
- if (input.MetricDataQueries !== undefined && input.MetricDataQueries !== null) {
2396
+ if (input.MetricDataQueries != null) {
2517
2397
  const memberEntries = serializeAws_queryMetricDataQueries(input.MetricDataQueries, context);
2518
2398
  Object.entries(memberEntries).forEach(([key, value]) => {
2519
2399
  const loc = `MetricDataQueries.${key}`;
2520
2400
  entries[loc] = value;
2521
2401
  });
2522
2402
  }
2523
- if (input.StartTime !== undefined && input.StartTime !== null) {
2403
+ if (input.StartTime != null) {
2524
2404
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
2525
2405
  }
2526
- if (input.EndTime !== undefined && input.EndTime !== null) {
2406
+ if (input.EndTime != null) {
2527
2407
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
2528
2408
  }
2529
- if (input.NextToken !== undefined && input.NextToken !== null) {
2409
+ if (input.NextToken != null) {
2530
2410
  entries["NextToken"] = input.NextToken;
2531
2411
  }
2532
- if (input.ScanBy !== undefined && input.ScanBy !== null) {
2412
+ if (input.ScanBy != null) {
2533
2413
  entries["ScanBy"] = input.ScanBy;
2534
2414
  }
2535
- if (input.MaxDatapoints !== undefined && input.MaxDatapoints !== null) {
2415
+ if (input.MaxDatapoints != null) {
2536
2416
  entries["MaxDatapoints"] = input.MaxDatapoints;
2537
2417
  }
2538
- if (input.LabelOptions !== undefined && input.LabelOptions !== null) {
2418
+ if (input.LabelOptions != null) {
2539
2419
  const memberEntries = serializeAws_queryLabelOptions(input.LabelOptions, context);
2540
2420
  Object.entries(memberEntries).forEach(([key, value]) => {
2541
2421
  const loc = `LabelOptions.${key}`;
@@ -2546,60 +2426,60 @@ const serializeAws_queryGetMetricDataInput = (input, context) => {
2546
2426
  };
2547
2427
  const serializeAws_queryGetMetricStatisticsInput = (input, context) => {
2548
2428
  const entries = {};
2549
- if (input.Namespace !== undefined && input.Namespace !== null) {
2429
+ if (input.Namespace != null) {
2550
2430
  entries["Namespace"] = input.Namespace;
2551
2431
  }
2552
- if (input.MetricName !== undefined && input.MetricName !== null) {
2432
+ if (input.MetricName != null) {
2553
2433
  entries["MetricName"] = input.MetricName;
2554
2434
  }
2555
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2435
+ if (input.Dimensions != null) {
2556
2436
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2557
2437
  Object.entries(memberEntries).forEach(([key, value]) => {
2558
2438
  const loc = `Dimensions.${key}`;
2559
2439
  entries[loc] = value;
2560
2440
  });
2561
2441
  }
2562
- if (input.StartTime !== undefined && input.StartTime !== null) {
2442
+ if (input.StartTime != null) {
2563
2443
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
2564
2444
  }
2565
- if (input.EndTime !== undefined && input.EndTime !== null) {
2445
+ if (input.EndTime != null) {
2566
2446
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
2567
2447
  }
2568
- if (input.Period !== undefined && input.Period !== null) {
2448
+ if (input.Period != null) {
2569
2449
  entries["Period"] = input.Period;
2570
2450
  }
2571
- if (input.Statistics !== undefined && input.Statistics !== null) {
2451
+ if (input.Statistics != null) {
2572
2452
  const memberEntries = serializeAws_queryStatistics(input.Statistics, context);
2573
2453
  Object.entries(memberEntries).forEach(([key, value]) => {
2574
2454
  const loc = `Statistics.${key}`;
2575
2455
  entries[loc] = value;
2576
2456
  });
2577
2457
  }
2578
- if (input.ExtendedStatistics !== undefined && input.ExtendedStatistics !== null) {
2458
+ if (input.ExtendedStatistics != null) {
2579
2459
  const memberEntries = serializeAws_queryExtendedStatistics(input.ExtendedStatistics, context);
2580
2460
  Object.entries(memberEntries).forEach(([key, value]) => {
2581
2461
  const loc = `ExtendedStatistics.${key}`;
2582
2462
  entries[loc] = value;
2583
2463
  });
2584
2464
  }
2585
- if (input.Unit !== undefined && input.Unit !== null) {
2465
+ if (input.Unit != null) {
2586
2466
  entries["Unit"] = input.Unit;
2587
2467
  }
2588
2468
  return entries;
2589
2469
  };
2590
2470
  const serializeAws_queryGetMetricStreamInput = (input, context) => {
2591
2471
  const entries = {};
2592
- if (input.Name !== undefined && input.Name !== null) {
2472
+ if (input.Name != null) {
2593
2473
  entries["Name"] = input.Name;
2594
2474
  }
2595
2475
  return entries;
2596
2476
  };
2597
2477
  const serializeAws_queryGetMetricWidgetImageInput = (input, context) => {
2598
2478
  const entries = {};
2599
- if (input.MetricWidget !== undefined && input.MetricWidget !== null) {
2479
+ if (input.MetricWidget != null) {
2600
2480
  entries["MetricWidget"] = input.MetricWidget;
2601
2481
  }
2602
- if (input.OutputFormat !== undefined && input.OutputFormat !== null) {
2482
+ if (input.OutputFormat != null) {
2603
2483
  entries["OutputFormat"] = input.OutputFormat;
2604
2484
  }
2605
2485
  return entries;
@@ -2630,70 +2510,70 @@ const serializeAws_queryInsightRuleNames = (input, context) => {
2630
2510
  };
2631
2511
  const serializeAws_queryLabelOptions = (input, context) => {
2632
2512
  const entries = {};
2633
- if (input.Timezone !== undefined && input.Timezone !== null) {
2513
+ if (input.Timezone != null) {
2634
2514
  entries["Timezone"] = input.Timezone;
2635
2515
  }
2636
2516
  return entries;
2637
2517
  };
2638
2518
  const serializeAws_queryListDashboardsInput = (input, context) => {
2639
2519
  const entries = {};
2640
- if (input.DashboardNamePrefix !== undefined && input.DashboardNamePrefix !== null) {
2520
+ if (input.DashboardNamePrefix != null) {
2641
2521
  entries["DashboardNamePrefix"] = input.DashboardNamePrefix;
2642
2522
  }
2643
- if (input.NextToken !== undefined && input.NextToken !== null) {
2523
+ if (input.NextToken != null) {
2644
2524
  entries["NextToken"] = input.NextToken;
2645
2525
  }
2646
2526
  return entries;
2647
2527
  };
2648
2528
  const serializeAws_queryListMetricsInput = (input, context) => {
2649
2529
  const entries = {};
2650
- if (input.Namespace !== undefined && input.Namespace !== null) {
2530
+ if (input.Namespace != null) {
2651
2531
  entries["Namespace"] = input.Namespace;
2652
2532
  }
2653
- if (input.MetricName !== undefined && input.MetricName !== null) {
2533
+ if (input.MetricName != null) {
2654
2534
  entries["MetricName"] = input.MetricName;
2655
2535
  }
2656
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2536
+ if (input.Dimensions != null) {
2657
2537
  const memberEntries = serializeAws_queryDimensionFilters(input.Dimensions, context);
2658
2538
  Object.entries(memberEntries).forEach(([key, value]) => {
2659
2539
  const loc = `Dimensions.${key}`;
2660
2540
  entries[loc] = value;
2661
2541
  });
2662
2542
  }
2663
- if (input.NextToken !== undefined && input.NextToken !== null) {
2543
+ if (input.NextToken != null) {
2664
2544
  entries["NextToken"] = input.NextToken;
2665
2545
  }
2666
- if (input.RecentlyActive !== undefined && input.RecentlyActive !== null) {
2546
+ if (input.RecentlyActive != null) {
2667
2547
  entries["RecentlyActive"] = input.RecentlyActive;
2668
2548
  }
2669
2549
  return entries;
2670
2550
  };
2671
2551
  const serializeAws_queryListMetricStreamsInput = (input, context) => {
2672
2552
  const entries = {};
2673
- if (input.NextToken !== undefined && input.NextToken !== null) {
2553
+ if (input.NextToken != null) {
2674
2554
  entries["NextToken"] = input.NextToken;
2675
2555
  }
2676
- if (input.MaxResults !== undefined && input.MaxResults !== null) {
2556
+ if (input.MaxResults != null) {
2677
2557
  entries["MaxResults"] = input.MaxResults;
2678
2558
  }
2679
2559
  return entries;
2680
2560
  };
2681
2561
  const serializeAws_queryListTagsForResourceInput = (input, context) => {
2682
2562
  const entries = {};
2683
- if (input.ResourceARN !== undefined && input.ResourceARN !== null) {
2563
+ if (input.ResourceARN != null) {
2684
2564
  entries["ResourceARN"] = input.ResourceARN;
2685
2565
  }
2686
2566
  return entries;
2687
2567
  };
2688
2568
  const serializeAws_queryMetric = (input, context) => {
2689
2569
  const entries = {};
2690
- if (input.Namespace !== undefined && input.Namespace !== null) {
2570
+ if (input.Namespace != null) {
2691
2571
  entries["Namespace"] = input.Namespace;
2692
2572
  }
2693
- if (input.MetricName !== undefined && input.MetricName !== null) {
2573
+ if (input.MetricName != null) {
2694
2574
  entries["MetricName"] = input.MetricName;
2695
2575
  }
2696
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2576
+ if (input.Dimensions != null) {
2697
2577
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2698
2578
  Object.entries(memberEntries).forEach(([key, value]) => {
2699
2579
  const loc = `Dimensions.${key}`;
@@ -2734,83 +2614,83 @@ const serializeAws_queryMetricDataQueries = (input, context) => {
2734
2614
  };
2735
2615
  const serializeAws_queryMetricDataQuery = (input, context) => {
2736
2616
  const entries = {};
2737
- if (input.Id !== undefined && input.Id !== null) {
2617
+ if (input.Id != null) {
2738
2618
  entries["Id"] = input.Id;
2739
2619
  }
2740
- if (input.MetricStat !== undefined && input.MetricStat !== null) {
2620
+ if (input.MetricStat != null) {
2741
2621
  const memberEntries = serializeAws_queryMetricStat(input.MetricStat, context);
2742
2622
  Object.entries(memberEntries).forEach(([key, value]) => {
2743
2623
  const loc = `MetricStat.${key}`;
2744
2624
  entries[loc] = value;
2745
2625
  });
2746
2626
  }
2747
- if (input.Expression !== undefined && input.Expression !== null) {
2627
+ if (input.Expression != null) {
2748
2628
  entries["Expression"] = input.Expression;
2749
2629
  }
2750
- if (input.Label !== undefined && input.Label !== null) {
2630
+ if (input.Label != null) {
2751
2631
  entries["Label"] = input.Label;
2752
2632
  }
2753
- if (input.ReturnData !== undefined && input.ReturnData !== null) {
2633
+ if (input.ReturnData != null) {
2754
2634
  entries["ReturnData"] = input.ReturnData;
2755
2635
  }
2756
- if (input.Period !== undefined && input.Period !== null) {
2636
+ if (input.Period != null) {
2757
2637
  entries["Period"] = input.Period;
2758
2638
  }
2759
- if (input.AccountId !== undefined && input.AccountId !== null) {
2639
+ if (input.AccountId != null) {
2760
2640
  entries["AccountId"] = input.AccountId;
2761
2641
  }
2762
2642
  return entries;
2763
2643
  };
2764
2644
  const serializeAws_queryMetricDatum = (input, context) => {
2765
2645
  const entries = {};
2766
- if (input.MetricName !== undefined && input.MetricName !== null) {
2646
+ if (input.MetricName != null) {
2767
2647
  entries["MetricName"] = input.MetricName;
2768
2648
  }
2769
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2649
+ if (input.Dimensions != null) {
2770
2650
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2771
2651
  Object.entries(memberEntries).forEach(([key, value]) => {
2772
2652
  const loc = `Dimensions.${key}`;
2773
2653
  entries[loc] = value;
2774
2654
  });
2775
2655
  }
2776
- if (input.Timestamp !== undefined && input.Timestamp !== null) {
2656
+ if (input.Timestamp != null) {
2777
2657
  entries["Timestamp"] = input.Timestamp.toISOString().split(".")[0] + "Z";
2778
2658
  }
2779
- if (input.Value !== undefined && input.Value !== null) {
2659
+ if (input.Value != null) {
2780
2660
  entries["Value"] = (0, smithy_client_1.serializeFloat)(input.Value);
2781
2661
  }
2782
- if (input.StatisticValues !== undefined && input.StatisticValues !== null) {
2662
+ if (input.StatisticValues != null) {
2783
2663
  const memberEntries = serializeAws_queryStatisticSet(input.StatisticValues, context);
2784
2664
  Object.entries(memberEntries).forEach(([key, value]) => {
2785
2665
  const loc = `StatisticValues.${key}`;
2786
2666
  entries[loc] = value;
2787
2667
  });
2788
2668
  }
2789
- if (input.Values !== undefined && input.Values !== null) {
2669
+ if (input.Values != null) {
2790
2670
  const memberEntries = serializeAws_queryValues(input.Values, context);
2791
2671
  Object.entries(memberEntries).forEach(([key, value]) => {
2792
2672
  const loc = `Values.${key}`;
2793
2673
  entries[loc] = value;
2794
2674
  });
2795
2675
  }
2796
- if (input.Counts !== undefined && input.Counts !== null) {
2676
+ if (input.Counts != null) {
2797
2677
  const memberEntries = serializeAws_queryCounts(input.Counts, context);
2798
2678
  Object.entries(memberEntries).forEach(([key, value]) => {
2799
2679
  const loc = `Counts.${key}`;
2800
2680
  entries[loc] = value;
2801
2681
  });
2802
2682
  }
2803
- if (input.Unit !== undefined && input.Unit !== null) {
2683
+ if (input.Unit != null) {
2804
2684
  entries["Unit"] = input.Unit;
2805
2685
  }
2806
- if (input.StorageResolution !== undefined && input.StorageResolution !== null) {
2686
+ if (input.StorageResolution != null) {
2807
2687
  entries["StorageResolution"] = input.StorageResolution;
2808
2688
  }
2809
2689
  return entries;
2810
2690
  };
2811
2691
  const serializeAws_queryMetricMathAnomalyDetector = (input, context) => {
2812
2692
  const entries = {};
2813
- if (input.MetricDataQueries !== undefined && input.MetricDataQueries !== null) {
2693
+ if (input.MetricDataQueries != null) {
2814
2694
  const memberEntries = serializeAws_queryMetricDataQueries(input.MetricDataQueries, context);
2815
2695
  Object.entries(memberEntries).forEach(([key, value]) => {
2816
2696
  const loc = `MetricDataQueries.${key}`;
@@ -2821,27 +2701,27 @@ const serializeAws_queryMetricMathAnomalyDetector = (input, context) => {
2821
2701
  };
2822
2702
  const serializeAws_queryMetricStat = (input, context) => {
2823
2703
  const entries = {};
2824
- if (input.Metric !== undefined && input.Metric !== null) {
2704
+ if (input.Metric != null) {
2825
2705
  const memberEntries = serializeAws_queryMetric(input.Metric, context);
2826
2706
  Object.entries(memberEntries).forEach(([key, value]) => {
2827
2707
  const loc = `Metric.${key}`;
2828
2708
  entries[loc] = value;
2829
2709
  });
2830
2710
  }
2831
- if (input.Period !== undefined && input.Period !== null) {
2711
+ if (input.Period != null) {
2832
2712
  entries["Period"] = input.Period;
2833
2713
  }
2834
- if (input.Stat !== undefined && input.Stat !== null) {
2714
+ if (input.Stat != null) {
2835
2715
  entries["Stat"] = input.Stat;
2836
2716
  }
2837
- if (input.Unit !== undefined && input.Unit !== null) {
2717
+ if (input.Unit != null) {
2838
2718
  entries["Unit"] = input.Unit;
2839
2719
  }
2840
2720
  return entries;
2841
2721
  };
2842
2722
  const serializeAws_queryMetricStreamFilter = (input, context) => {
2843
2723
  const entries = {};
2844
- if (input.Namespace !== undefined && input.Namespace !== null) {
2724
+ if (input.Namespace != null) {
2845
2725
  entries["Namespace"] = input.Namespace;
2846
2726
  }
2847
2727
  return entries;
@@ -2887,14 +2767,14 @@ const serializeAws_queryMetricStreamStatisticsAdditionalStatistics = (input, con
2887
2767
  };
2888
2768
  const serializeAws_queryMetricStreamStatisticsConfiguration = (input, context) => {
2889
2769
  const entries = {};
2890
- if (input.IncludeMetrics !== undefined && input.IncludeMetrics !== null) {
2770
+ if (input.IncludeMetrics != null) {
2891
2771
  const memberEntries = serializeAws_queryMetricStreamStatisticsIncludeMetrics(input.IncludeMetrics, context);
2892
2772
  Object.entries(memberEntries).forEach(([key, value]) => {
2893
2773
  const loc = `IncludeMetrics.${key}`;
2894
2774
  entries[loc] = value;
2895
2775
  });
2896
2776
  }
2897
- if (input.AdditionalStatistics !== undefined && input.AdditionalStatistics !== null) {
2777
+ if (input.AdditionalStatistics != null) {
2898
2778
  const memberEntries = serializeAws_queryMetricStreamStatisticsAdditionalStatistics(input.AdditionalStatistics, context);
2899
2779
  Object.entries(memberEntries).forEach(([key, value]) => {
2900
2780
  const loc = `AdditionalStatistics.${key}`;
@@ -2935,47 +2815,47 @@ const serializeAws_queryMetricStreamStatisticsIncludeMetrics = (input, context)
2935
2815
  };
2936
2816
  const serializeAws_queryMetricStreamStatisticsMetric = (input, context) => {
2937
2817
  const entries = {};
2938
- if (input.Namespace !== undefined && input.Namespace !== null) {
2818
+ if (input.Namespace != null) {
2939
2819
  entries["Namespace"] = input.Namespace;
2940
2820
  }
2941
- if (input.MetricName !== undefined && input.MetricName !== null) {
2821
+ if (input.MetricName != null) {
2942
2822
  entries["MetricName"] = input.MetricName;
2943
2823
  }
2944
2824
  return entries;
2945
2825
  };
2946
2826
  const serializeAws_queryPutAnomalyDetectorInput = (input, context) => {
2947
2827
  const entries = {};
2948
- if (input.Namespace !== undefined && input.Namespace !== null) {
2828
+ if (input.Namespace != null) {
2949
2829
  entries["Namespace"] = input.Namespace;
2950
2830
  }
2951
- if (input.MetricName !== undefined && input.MetricName !== null) {
2831
+ if (input.MetricName != null) {
2952
2832
  entries["MetricName"] = input.MetricName;
2953
2833
  }
2954
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2834
+ if (input.Dimensions != null) {
2955
2835
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2956
2836
  Object.entries(memberEntries).forEach(([key, value]) => {
2957
2837
  const loc = `Dimensions.${key}`;
2958
2838
  entries[loc] = value;
2959
2839
  });
2960
2840
  }
2961
- if (input.Stat !== undefined && input.Stat !== null) {
2841
+ if (input.Stat != null) {
2962
2842
  entries["Stat"] = input.Stat;
2963
2843
  }
2964
- if (input.Configuration !== undefined && input.Configuration !== null) {
2844
+ if (input.Configuration != null) {
2965
2845
  const memberEntries = serializeAws_queryAnomalyDetectorConfiguration(input.Configuration, context);
2966
2846
  Object.entries(memberEntries).forEach(([key, value]) => {
2967
2847
  const loc = `Configuration.${key}`;
2968
2848
  entries[loc] = value;
2969
2849
  });
2970
2850
  }
2971
- if (input.SingleMetricAnomalyDetector !== undefined && input.SingleMetricAnomalyDetector !== null) {
2851
+ if (input.SingleMetricAnomalyDetector != null) {
2972
2852
  const memberEntries = serializeAws_querySingleMetricAnomalyDetector(input.SingleMetricAnomalyDetector, context);
2973
2853
  Object.entries(memberEntries).forEach(([key, value]) => {
2974
2854
  const loc = `SingleMetricAnomalyDetector.${key}`;
2975
2855
  entries[loc] = value;
2976
2856
  });
2977
2857
  }
2978
- if (input.MetricMathAnomalyDetector !== undefined && input.MetricMathAnomalyDetector !== null) {
2858
+ if (input.MetricMathAnomalyDetector != null) {
2979
2859
  const memberEntries = serializeAws_queryMetricMathAnomalyDetector(input.MetricMathAnomalyDetector, context);
2980
2860
  Object.entries(memberEntries).forEach(([key, value]) => {
2981
2861
  const loc = `MetricMathAnomalyDetector.${key}`;
@@ -2986,79 +2866,79 @@ const serializeAws_queryPutAnomalyDetectorInput = (input, context) => {
2986
2866
  };
2987
2867
  const serializeAws_queryPutCompositeAlarmInput = (input, context) => {
2988
2868
  const entries = {};
2989
- if (input.ActionsEnabled !== undefined && input.ActionsEnabled !== null) {
2869
+ if (input.ActionsEnabled != null) {
2990
2870
  entries["ActionsEnabled"] = input.ActionsEnabled;
2991
2871
  }
2992
- if (input.AlarmActions !== undefined && input.AlarmActions !== null) {
2872
+ if (input.AlarmActions != null) {
2993
2873
  const memberEntries = serializeAws_queryResourceList(input.AlarmActions, context);
2994
2874
  Object.entries(memberEntries).forEach(([key, value]) => {
2995
2875
  const loc = `AlarmActions.${key}`;
2996
2876
  entries[loc] = value;
2997
2877
  });
2998
2878
  }
2999
- if (input.AlarmDescription !== undefined && input.AlarmDescription !== null) {
2879
+ if (input.AlarmDescription != null) {
3000
2880
  entries["AlarmDescription"] = input.AlarmDescription;
3001
2881
  }
3002
- if (input.AlarmName !== undefined && input.AlarmName !== null) {
2882
+ if (input.AlarmName != null) {
3003
2883
  entries["AlarmName"] = input.AlarmName;
3004
2884
  }
3005
- if (input.AlarmRule !== undefined && input.AlarmRule !== null) {
2885
+ if (input.AlarmRule != null) {
3006
2886
  entries["AlarmRule"] = input.AlarmRule;
3007
2887
  }
3008
- if (input.InsufficientDataActions !== undefined && input.InsufficientDataActions !== null) {
2888
+ if (input.InsufficientDataActions != null) {
3009
2889
  const memberEntries = serializeAws_queryResourceList(input.InsufficientDataActions, context);
3010
2890
  Object.entries(memberEntries).forEach(([key, value]) => {
3011
2891
  const loc = `InsufficientDataActions.${key}`;
3012
2892
  entries[loc] = value;
3013
2893
  });
3014
2894
  }
3015
- if (input.OKActions !== undefined && input.OKActions !== null) {
2895
+ if (input.OKActions != null) {
3016
2896
  const memberEntries = serializeAws_queryResourceList(input.OKActions, context);
3017
2897
  Object.entries(memberEntries).forEach(([key, value]) => {
3018
2898
  const loc = `OKActions.${key}`;
3019
2899
  entries[loc] = value;
3020
2900
  });
3021
2901
  }
3022
- if (input.Tags !== undefined && input.Tags !== null) {
2902
+ if (input.Tags != null) {
3023
2903
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3024
2904
  Object.entries(memberEntries).forEach(([key, value]) => {
3025
2905
  const loc = `Tags.${key}`;
3026
2906
  entries[loc] = value;
3027
2907
  });
3028
2908
  }
3029
- if (input.ActionsSuppressor !== undefined && input.ActionsSuppressor !== null) {
2909
+ if (input.ActionsSuppressor != null) {
3030
2910
  entries["ActionsSuppressor"] = input.ActionsSuppressor;
3031
2911
  }
3032
- if (input.ActionsSuppressorWaitPeriod !== undefined && input.ActionsSuppressorWaitPeriod !== null) {
2912
+ if (input.ActionsSuppressorWaitPeriod != null) {
3033
2913
  entries["ActionsSuppressorWaitPeriod"] = input.ActionsSuppressorWaitPeriod;
3034
2914
  }
3035
- if (input.ActionsSuppressorExtensionPeriod !== undefined && input.ActionsSuppressorExtensionPeriod !== null) {
2915
+ if (input.ActionsSuppressorExtensionPeriod != null) {
3036
2916
  entries["ActionsSuppressorExtensionPeriod"] = input.ActionsSuppressorExtensionPeriod;
3037
2917
  }
3038
2918
  return entries;
3039
2919
  };
3040
2920
  const serializeAws_queryPutDashboardInput = (input, context) => {
3041
2921
  const entries = {};
3042
- if (input.DashboardName !== undefined && input.DashboardName !== null) {
2922
+ if (input.DashboardName != null) {
3043
2923
  entries["DashboardName"] = input.DashboardName;
3044
2924
  }
3045
- if (input.DashboardBody !== undefined && input.DashboardBody !== null) {
2925
+ if (input.DashboardBody != null) {
3046
2926
  entries["DashboardBody"] = input.DashboardBody;
3047
2927
  }
3048
2928
  return entries;
3049
2929
  };
3050
2930
  const serializeAws_queryPutInsightRuleInput = (input, context) => {
3051
2931
  const entries = {};
3052
- if (input.RuleName !== undefined && input.RuleName !== null) {
2932
+ if (input.RuleName != null) {
3053
2933
  entries["RuleName"] = input.RuleName;
3054
2934
  }
3055
- if (input.RuleState !== undefined && input.RuleState !== null) {
2935
+ if (input.RuleState != null) {
3056
2936
  entries["RuleState"] = input.RuleState;
3057
2937
  }
3058
- if (input.RuleDefinition !== undefined && input.RuleDefinition !== null) {
2938
+ if (input.RuleDefinition != null) {
3059
2939
  entries["RuleDefinition"] = input.RuleDefinition;
3060
2940
  }
3061
- if (input.Tags !== undefined && input.Tags !== null) {
2941
+ if (input.Tags != null) {
3062
2942
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3063
2943
  Object.entries(memberEntries).forEach(([key, value]) => {
3064
2944
  const loc = `Tags.${key}`;
@@ -3069,104 +2949,104 @@ const serializeAws_queryPutInsightRuleInput = (input, context) => {
3069
2949
  };
3070
2950
  const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3071
2951
  const entries = {};
3072
- if (input.AlarmName !== undefined && input.AlarmName !== null) {
2952
+ if (input.AlarmName != null) {
3073
2953
  entries["AlarmName"] = input.AlarmName;
3074
2954
  }
3075
- if (input.AlarmDescription !== undefined && input.AlarmDescription !== null) {
2955
+ if (input.AlarmDescription != null) {
3076
2956
  entries["AlarmDescription"] = input.AlarmDescription;
3077
2957
  }
3078
- if (input.ActionsEnabled !== undefined && input.ActionsEnabled !== null) {
2958
+ if (input.ActionsEnabled != null) {
3079
2959
  entries["ActionsEnabled"] = input.ActionsEnabled;
3080
2960
  }
3081
- if (input.OKActions !== undefined && input.OKActions !== null) {
2961
+ if (input.OKActions != null) {
3082
2962
  const memberEntries = serializeAws_queryResourceList(input.OKActions, context);
3083
2963
  Object.entries(memberEntries).forEach(([key, value]) => {
3084
2964
  const loc = `OKActions.${key}`;
3085
2965
  entries[loc] = value;
3086
2966
  });
3087
2967
  }
3088
- if (input.AlarmActions !== undefined && input.AlarmActions !== null) {
2968
+ if (input.AlarmActions != null) {
3089
2969
  const memberEntries = serializeAws_queryResourceList(input.AlarmActions, context);
3090
2970
  Object.entries(memberEntries).forEach(([key, value]) => {
3091
2971
  const loc = `AlarmActions.${key}`;
3092
2972
  entries[loc] = value;
3093
2973
  });
3094
2974
  }
3095
- if (input.InsufficientDataActions !== undefined && input.InsufficientDataActions !== null) {
2975
+ if (input.InsufficientDataActions != null) {
3096
2976
  const memberEntries = serializeAws_queryResourceList(input.InsufficientDataActions, context);
3097
2977
  Object.entries(memberEntries).forEach(([key, value]) => {
3098
2978
  const loc = `InsufficientDataActions.${key}`;
3099
2979
  entries[loc] = value;
3100
2980
  });
3101
2981
  }
3102
- if (input.MetricName !== undefined && input.MetricName !== null) {
2982
+ if (input.MetricName != null) {
3103
2983
  entries["MetricName"] = input.MetricName;
3104
2984
  }
3105
- if (input.Namespace !== undefined && input.Namespace !== null) {
2985
+ if (input.Namespace != null) {
3106
2986
  entries["Namespace"] = input.Namespace;
3107
2987
  }
3108
- if (input.Statistic !== undefined && input.Statistic !== null) {
2988
+ if (input.Statistic != null) {
3109
2989
  entries["Statistic"] = input.Statistic;
3110
2990
  }
3111
- if (input.ExtendedStatistic !== undefined && input.ExtendedStatistic !== null) {
2991
+ if (input.ExtendedStatistic != null) {
3112
2992
  entries["ExtendedStatistic"] = input.ExtendedStatistic;
3113
2993
  }
3114
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
2994
+ if (input.Dimensions != null) {
3115
2995
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3116
2996
  Object.entries(memberEntries).forEach(([key, value]) => {
3117
2997
  const loc = `Dimensions.${key}`;
3118
2998
  entries[loc] = value;
3119
2999
  });
3120
3000
  }
3121
- if (input.Period !== undefined && input.Period !== null) {
3001
+ if (input.Period != null) {
3122
3002
  entries["Period"] = input.Period;
3123
3003
  }
3124
- if (input.Unit !== undefined && input.Unit !== null) {
3004
+ if (input.Unit != null) {
3125
3005
  entries["Unit"] = input.Unit;
3126
3006
  }
3127
- if (input.EvaluationPeriods !== undefined && input.EvaluationPeriods !== null) {
3007
+ if (input.EvaluationPeriods != null) {
3128
3008
  entries["EvaluationPeriods"] = input.EvaluationPeriods;
3129
3009
  }
3130
- if (input.DatapointsToAlarm !== undefined && input.DatapointsToAlarm !== null) {
3010
+ if (input.DatapointsToAlarm != null) {
3131
3011
  entries["DatapointsToAlarm"] = input.DatapointsToAlarm;
3132
3012
  }
3133
- if (input.Threshold !== undefined && input.Threshold !== null) {
3013
+ if (input.Threshold != null) {
3134
3014
  entries["Threshold"] = (0, smithy_client_1.serializeFloat)(input.Threshold);
3135
3015
  }
3136
- if (input.ComparisonOperator !== undefined && input.ComparisonOperator !== null) {
3016
+ if (input.ComparisonOperator != null) {
3137
3017
  entries["ComparisonOperator"] = input.ComparisonOperator;
3138
3018
  }
3139
- if (input.TreatMissingData !== undefined && input.TreatMissingData !== null) {
3019
+ if (input.TreatMissingData != null) {
3140
3020
  entries["TreatMissingData"] = input.TreatMissingData;
3141
3021
  }
3142
- if (input.EvaluateLowSampleCountPercentile !== undefined && input.EvaluateLowSampleCountPercentile !== null) {
3022
+ if (input.EvaluateLowSampleCountPercentile != null) {
3143
3023
  entries["EvaluateLowSampleCountPercentile"] = input.EvaluateLowSampleCountPercentile;
3144
3024
  }
3145
- if (input.Metrics !== undefined && input.Metrics !== null) {
3025
+ if (input.Metrics != null) {
3146
3026
  const memberEntries = serializeAws_queryMetricDataQueries(input.Metrics, context);
3147
3027
  Object.entries(memberEntries).forEach(([key, value]) => {
3148
3028
  const loc = `Metrics.${key}`;
3149
3029
  entries[loc] = value;
3150
3030
  });
3151
3031
  }
3152
- if (input.Tags !== undefined && input.Tags !== null) {
3032
+ if (input.Tags != null) {
3153
3033
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3154
3034
  Object.entries(memberEntries).forEach(([key, value]) => {
3155
3035
  const loc = `Tags.${key}`;
3156
3036
  entries[loc] = value;
3157
3037
  });
3158
3038
  }
3159
- if (input.ThresholdMetricId !== undefined && input.ThresholdMetricId !== null) {
3039
+ if (input.ThresholdMetricId != null) {
3160
3040
  entries["ThresholdMetricId"] = input.ThresholdMetricId;
3161
3041
  }
3162
3042
  return entries;
3163
3043
  };
3164
3044
  const serializeAws_queryPutMetricDataInput = (input, context) => {
3165
3045
  const entries = {};
3166
- if (input.Namespace !== undefined && input.Namespace !== null) {
3046
+ if (input.Namespace != null) {
3167
3047
  entries["Namespace"] = input.Namespace;
3168
3048
  }
3169
- if (input.MetricData !== undefined && input.MetricData !== null) {
3049
+ if (input.MetricData != null) {
3170
3050
  const memberEntries = serializeAws_queryMetricData(input.MetricData, context);
3171
3051
  Object.entries(memberEntries).forEach(([key, value]) => {
3172
3052
  const loc = `MetricData.${key}`;
@@ -3177,40 +3057,40 @@ const serializeAws_queryPutMetricDataInput = (input, context) => {
3177
3057
  };
3178
3058
  const serializeAws_queryPutMetricStreamInput = (input, context) => {
3179
3059
  const entries = {};
3180
- if (input.Name !== undefined && input.Name !== null) {
3060
+ if (input.Name != null) {
3181
3061
  entries["Name"] = input.Name;
3182
3062
  }
3183
- if (input.IncludeFilters !== undefined && input.IncludeFilters !== null) {
3063
+ if (input.IncludeFilters != null) {
3184
3064
  const memberEntries = serializeAws_queryMetricStreamFilters(input.IncludeFilters, context);
3185
3065
  Object.entries(memberEntries).forEach(([key, value]) => {
3186
3066
  const loc = `IncludeFilters.${key}`;
3187
3067
  entries[loc] = value;
3188
3068
  });
3189
3069
  }
3190
- if (input.ExcludeFilters !== undefined && input.ExcludeFilters !== null) {
3070
+ if (input.ExcludeFilters != null) {
3191
3071
  const memberEntries = serializeAws_queryMetricStreamFilters(input.ExcludeFilters, context);
3192
3072
  Object.entries(memberEntries).forEach(([key, value]) => {
3193
3073
  const loc = `ExcludeFilters.${key}`;
3194
3074
  entries[loc] = value;
3195
3075
  });
3196
3076
  }
3197
- if (input.FirehoseArn !== undefined && input.FirehoseArn !== null) {
3077
+ if (input.FirehoseArn != null) {
3198
3078
  entries["FirehoseArn"] = input.FirehoseArn;
3199
3079
  }
3200
- if (input.RoleArn !== undefined && input.RoleArn !== null) {
3080
+ if (input.RoleArn != null) {
3201
3081
  entries["RoleArn"] = input.RoleArn;
3202
3082
  }
3203
- if (input.OutputFormat !== undefined && input.OutputFormat !== null) {
3083
+ if (input.OutputFormat != null) {
3204
3084
  entries["OutputFormat"] = input.OutputFormat;
3205
3085
  }
3206
- if (input.Tags !== undefined && input.Tags !== null) {
3086
+ if (input.Tags != null) {
3207
3087
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3208
3088
  Object.entries(memberEntries).forEach(([key, value]) => {
3209
3089
  const loc = `Tags.${key}`;
3210
3090
  entries[loc] = value;
3211
3091
  });
3212
3092
  }
3213
- if (input.StatisticsConfigurations !== undefined && input.StatisticsConfigurations !== null) {
3093
+ if (input.StatisticsConfigurations != null) {
3214
3094
  const memberEntries = serializeAws_queryMetricStreamStatisticsConfigurations(input.StatisticsConfigurations, context);
3215
3095
  Object.entries(memberEntries).forEach(([key, value]) => {
3216
3096
  const loc = `StatisticsConfigurations.${key}`;
@@ -3221,10 +3101,10 @@ const serializeAws_queryPutMetricStreamInput = (input, context) => {
3221
3101
  };
3222
3102
  const serializeAws_queryRange = (input, context) => {
3223
3103
  const entries = {};
3224
- if (input.StartTime !== undefined && input.StartTime !== null) {
3104
+ if (input.StartTime != null) {
3225
3105
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
3226
3106
  }
3227
- if (input.EndTime !== undefined && input.EndTime !== null) {
3107
+ if (input.EndTime != null) {
3228
3108
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
3229
3109
  }
3230
3110
  return entries;
@@ -3243,43 +3123,43 @@ const serializeAws_queryResourceList = (input, context) => {
3243
3123
  };
3244
3124
  const serializeAws_querySetAlarmStateInput = (input, context) => {
3245
3125
  const entries = {};
3246
- if (input.AlarmName !== undefined && input.AlarmName !== null) {
3126
+ if (input.AlarmName != null) {
3247
3127
  entries["AlarmName"] = input.AlarmName;
3248
3128
  }
3249
- if (input.StateValue !== undefined && input.StateValue !== null) {
3129
+ if (input.StateValue != null) {
3250
3130
  entries["StateValue"] = input.StateValue;
3251
3131
  }
3252
- if (input.StateReason !== undefined && input.StateReason !== null) {
3132
+ if (input.StateReason != null) {
3253
3133
  entries["StateReason"] = input.StateReason;
3254
3134
  }
3255
- if (input.StateReasonData !== undefined && input.StateReasonData !== null) {
3135
+ if (input.StateReasonData != null) {
3256
3136
  entries["StateReasonData"] = input.StateReasonData;
3257
3137
  }
3258
3138
  return entries;
3259
3139
  };
3260
3140
  const serializeAws_querySingleMetricAnomalyDetector = (input, context) => {
3261
3141
  const entries = {};
3262
- if (input.Namespace !== undefined && input.Namespace !== null) {
3142
+ if (input.Namespace != null) {
3263
3143
  entries["Namespace"] = input.Namespace;
3264
3144
  }
3265
- if (input.MetricName !== undefined && input.MetricName !== null) {
3145
+ if (input.MetricName != null) {
3266
3146
  entries["MetricName"] = input.MetricName;
3267
3147
  }
3268
- if (input.Dimensions !== undefined && input.Dimensions !== null) {
3148
+ if (input.Dimensions != null) {
3269
3149
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3270
3150
  Object.entries(memberEntries).forEach(([key, value]) => {
3271
3151
  const loc = `Dimensions.${key}`;
3272
3152
  entries[loc] = value;
3273
3153
  });
3274
3154
  }
3275
- if (input.Stat !== undefined && input.Stat !== null) {
3155
+ if (input.Stat != null) {
3276
3156
  entries["Stat"] = input.Stat;
3277
3157
  }
3278
3158
  return entries;
3279
3159
  };
3280
3160
  const serializeAws_queryStartMetricStreamsInput = (input, context) => {
3281
3161
  const entries = {};
3282
- if (input.Names !== undefined && input.Names !== null) {
3162
+ if (input.Names != null) {
3283
3163
  const memberEntries = serializeAws_queryMetricStreamNames(input.Names, context);
3284
3164
  Object.entries(memberEntries).forEach(([key, value]) => {
3285
3165
  const loc = `Names.${key}`;
@@ -3302,23 +3182,23 @@ const serializeAws_queryStatistics = (input, context) => {
3302
3182
  };
3303
3183
  const serializeAws_queryStatisticSet = (input, context) => {
3304
3184
  const entries = {};
3305
- if (input.SampleCount !== undefined && input.SampleCount !== null) {
3185
+ if (input.SampleCount != null) {
3306
3186
  entries["SampleCount"] = (0, smithy_client_1.serializeFloat)(input.SampleCount);
3307
3187
  }
3308
- if (input.Sum !== undefined && input.Sum !== null) {
3188
+ if (input.Sum != null) {
3309
3189
  entries["Sum"] = (0, smithy_client_1.serializeFloat)(input.Sum);
3310
3190
  }
3311
- if (input.Minimum !== undefined && input.Minimum !== null) {
3191
+ if (input.Minimum != null) {
3312
3192
  entries["Minimum"] = (0, smithy_client_1.serializeFloat)(input.Minimum);
3313
3193
  }
3314
- if (input.Maximum !== undefined && input.Maximum !== null) {
3194
+ if (input.Maximum != null) {
3315
3195
  entries["Maximum"] = (0, smithy_client_1.serializeFloat)(input.Maximum);
3316
3196
  }
3317
3197
  return entries;
3318
3198
  };
3319
3199
  const serializeAws_queryStopMetricStreamsInput = (input, context) => {
3320
3200
  const entries = {};
3321
- if (input.Names !== undefined && input.Names !== null) {
3201
+ if (input.Names != null) {
3322
3202
  const memberEntries = serializeAws_queryMetricStreamNames(input.Names, context);
3323
3203
  Object.entries(memberEntries).forEach(([key, value]) => {
3324
3204
  const loc = `Names.${key}`;
@@ -3329,10 +3209,10 @@ const serializeAws_queryStopMetricStreamsInput = (input, context) => {
3329
3209
  };
3330
3210
  const serializeAws_queryTag = (input, context) => {
3331
3211
  const entries = {};
3332
- if (input.Key !== undefined && input.Key !== null) {
3212
+ if (input.Key != null) {
3333
3213
  entries["Key"] = input.Key;
3334
3214
  }
3335
- if (input.Value !== undefined && input.Value !== null) {
3215
+ if (input.Value != null) {
3336
3216
  entries["Value"] = input.Value;
3337
3217
  }
3338
3218
  return entries;
@@ -3366,10 +3246,10 @@ const serializeAws_queryTagList = (input, context) => {
3366
3246
  };
3367
3247
  const serializeAws_queryTagResourceInput = (input, context) => {
3368
3248
  const entries = {};
3369
- if (input.ResourceARN !== undefined && input.ResourceARN !== null) {
3249
+ if (input.ResourceARN != null) {
3370
3250
  entries["ResourceARN"] = input.ResourceARN;
3371
3251
  }
3372
- if (input.Tags !== undefined && input.Tags !== null) {
3252
+ if (input.Tags != null) {
3373
3253
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3374
3254
  Object.entries(memberEntries).forEach(([key, value]) => {
3375
3255
  const loc = `Tags.${key}`;
@@ -3380,10 +3260,10 @@ const serializeAws_queryTagResourceInput = (input, context) => {
3380
3260
  };
3381
3261
  const serializeAws_queryUntagResourceInput = (input, context) => {
3382
3262
  const entries = {};
3383
- if (input.ResourceARN !== undefined && input.ResourceARN !== null) {
3263
+ if (input.ResourceARN != null) {
3384
3264
  entries["ResourceARN"] = input.ResourceARN;
3385
3265
  }
3386
- if (input.TagKeys !== undefined && input.TagKeys !== null) {
3266
+ if (input.TagKeys != null) {
3387
3267
  const memberEntries = serializeAws_queryTagKeyList(input.TagKeys, context);
3388
3268
  Object.entries(memberEntries).forEach(([key, value]) => {
3389
3269
  const loc = `TagKeys.${key}`;
@@ -3437,9 +3317,6 @@ const deserializeAws_queryAlarmHistoryItems = (output, context) => {
3437
3317
  return (output || [])
3438
3318
  .filter((e) => e != null)
3439
3319
  .map((entry) => {
3440
- if (entry === null) {
3441
- return null;
3442
- }
3443
3320
  return deserializeAws_queryAlarmHistoryItem(entry, context);
3444
3321
  });
3445
3322
  };
@@ -3503,9 +3380,6 @@ const deserializeAws_queryAnomalyDetectorExcludedTimeRanges = (output, context)
3503
3380
  return (output || [])
3504
3381
  .filter((e) => e != null)
3505
3382
  .map((entry) => {
3506
- if (entry === null) {
3507
- return null;
3508
- }
3509
3383
  return deserializeAws_queryRange(entry, context);
3510
3384
  });
3511
3385
  };
@@ -3513,9 +3387,6 @@ const deserializeAws_queryAnomalyDetectors = (output, context) => {
3513
3387
  return (output || [])
3514
3388
  .filter((e) => e != null)
3515
3389
  .map((entry) => {
3516
- if (entry === null) {
3517
- return null;
3518
- }
3519
3390
  return deserializeAws_queryAnomalyDetector(entry, context);
3520
3391
  });
3521
3392
  };
@@ -3523,9 +3394,6 @@ const deserializeAws_queryBatchFailures = (output, context) => {
3523
3394
  return (output || [])
3524
3395
  .filter((e) => e != null)
3525
3396
  .map((entry) => {
3526
- if (entry === null) {
3527
- return null;
3528
- }
3529
3397
  return deserializeAws_queryPartialFailure(entry, context);
3530
3398
  });
3531
3399
  };
@@ -3624,9 +3492,6 @@ const deserializeAws_queryCompositeAlarms = (output, context) => {
3624
3492
  return (output || [])
3625
3493
  .filter((e) => e != null)
3626
3494
  .map((entry) => {
3627
- if (entry === null) {
3628
- return null;
3629
- }
3630
3495
  return deserializeAws_queryCompositeAlarm(entry, context);
3631
3496
  });
3632
3497
  };
@@ -3643,9 +3508,6 @@ const deserializeAws_queryDashboardEntries = (output, context) => {
3643
3508
  return (output || [])
3644
3509
  .filter((e) => e != null)
3645
3510
  .map((entry) => {
3646
- if (entry === null) {
3647
- return null;
3648
- }
3649
3511
  return deserializeAws_queryDashboardEntry(entry, context);
3650
3512
  });
3651
3513
  };
@@ -3713,9 +3575,6 @@ const deserializeAws_queryDashboardValidationMessages = (output, context) => {
3713
3575
  return (output || [])
3714
3576
  .filter((e) => e != null)
3715
3577
  .map((entry) => {
3716
- if (entry === null) {
3717
- return null;
3718
- }
3719
3578
  return deserializeAws_queryDashboardValidationMessage(entry, context);
3720
3579
  });
3721
3580
  };
@@ -3763,9 +3622,6 @@ const deserializeAws_queryDatapoints = (output, context) => {
3763
3622
  return (output || [])
3764
3623
  .filter((e) => e != null)
3765
3624
  .map((entry) => {
3766
- if (entry === null) {
3767
- return null;
3768
- }
3769
3625
  return deserializeAws_queryDatapoint(entry, context);
3770
3626
  });
3771
3627
  };
@@ -3784,9 +3640,6 @@ const deserializeAws_queryDatapointValues = (output, context) => {
3784
3640
  return (output || [])
3785
3641
  .filter((e) => e != null)
3786
3642
  .map((entry) => {
3787
- if (entry === null) {
3788
- return null;
3789
- }
3790
3643
  return (0, smithy_client_1.strictParseFloat)(entry);
3791
3644
  });
3792
3645
  };
@@ -3914,9 +3767,6 @@ const deserializeAws_queryDimensions = (output, context) => {
3914
3767
  return (output || [])
3915
3768
  .filter((e) => e != null)
3916
3769
  .map((entry) => {
3917
- if (entry === null) {
3918
- return null;
3919
- }
3920
3770
  return deserializeAws_queryDimension(entry, context);
3921
3771
  });
3922
3772
  };
@@ -4167,9 +4017,6 @@ const deserializeAws_queryInsightRuleContributorDatapoints = (output, context) =
4167
4017
  return (output || [])
4168
4018
  .filter((e) => e != null)
4169
4019
  .map((entry) => {
4170
- if (entry === null) {
4171
- return null;
4172
- }
4173
4020
  return deserializeAws_queryInsightRuleContributorDatapoint(entry, context);
4174
4021
  });
4175
4022
  };
@@ -4177,9 +4024,6 @@ const deserializeAws_queryInsightRuleContributorKeyLabels = (output, context) =>
4177
4024
  return (output || [])
4178
4025
  .filter((e) => e != null)
4179
4026
  .map((entry) => {
4180
- if (entry === null) {
4181
- return null;
4182
- }
4183
4027
  return (0, smithy_client_1.expectString)(entry);
4184
4028
  });
4185
4029
  };
@@ -4187,9 +4031,6 @@ const deserializeAws_queryInsightRuleContributorKeys = (output, context) => {
4187
4031
  return (output || [])
4188
4032
  .filter((e) => e != null)
4189
4033
  .map((entry) => {
4190
- if (entry === null) {
4191
- return null;
4192
- }
4193
4034
  return (0, smithy_client_1.expectString)(entry);
4194
4035
  });
4195
4036
  };
@@ -4197,9 +4038,6 @@ const deserializeAws_queryInsightRuleContributors = (output, context) => {
4197
4038
  return (output || [])
4198
4039
  .filter((e) => e != null)
4199
4040
  .map((entry) => {
4200
- if (entry === null) {
4201
- return null;
4202
- }
4203
4041
  return deserializeAws_queryInsightRuleContributor(entry, context);
4204
4042
  });
4205
4043
  };
@@ -4244,9 +4082,6 @@ const deserializeAws_queryInsightRuleMetricDatapoints = (output, context) => {
4244
4082
  return (output || [])
4245
4083
  .filter((e) => e != null)
4246
4084
  .map((entry) => {
4247
- if (entry === null) {
4248
- return null;
4249
- }
4250
4085
  return deserializeAws_queryInsightRuleMetricDatapoint(entry, context);
4251
4086
  });
4252
4087
  };
@@ -4254,9 +4089,6 @@ const deserializeAws_queryInsightRules = (output, context) => {
4254
4089
  return (output || [])
4255
4090
  .filter((e) => e != null)
4256
4091
  .map((entry) => {
4257
- if (entry === null) {
4258
- return null;
4259
- }
4260
4092
  return deserializeAws_queryInsightRule(entry, context);
4261
4093
  });
4262
4094
  };
@@ -4549,9 +4381,6 @@ const deserializeAws_queryMetricAlarms = (output, context) => {
4549
4381
  return (output || [])
4550
4382
  .filter((e) => e != null)
4551
4383
  .map((entry) => {
4552
- if (entry === null) {
4553
- return null;
4554
- }
4555
4384
  return deserializeAws_queryMetricAlarm(entry, context);
4556
4385
  });
4557
4386
  };
@@ -4559,9 +4388,6 @@ const deserializeAws_queryMetricDataQueries = (output, context) => {
4559
4388
  return (output || [])
4560
4389
  .filter((e) => e != null)
4561
4390
  .map((entry) => {
4562
- if (entry === null) {
4563
- return null;
4564
- }
4565
4391
  return deserializeAws_queryMetricDataQuery(entry, context);
4566
4392
  });
4567
4393
  };
@@ -4640,9 +4466,6 @@ const deserializeAws_queryMetricDataResultMessages = (output, context) => {
4640
4466
  return (output || [])
4641
4467
  .filter((e) => e != null)
4642
4468
  .map((entry) => {
4643
- if (entry === null) {
4644
- return null;
4645
- }
4646
4469
  return deserializeAws_queryMessageData(entry, context);
4647
4470
  });
4648
4471
  };
@@ -4650,9 +4473,6 @@ const deserializeAws_queryMetricDataResults = (output, context) => {
4650
4473
  return (output || [])
4651
4474
  .filter((e) => e != null)
4652
4475
  .map((entry) => {
4653
- if (entry === null) {
4654
- return null;
4655
- }
4656
4476
  return deserializeAws_queryMetricDataResult(entry, context);
4657
4477
  });
4658
4478
  };
@@ -4672,9 +4492,6 @@ const deserializeAws_queryMetrics = (output, context) => {
4672
4492
  return (output || [])
4673
4493
  .filter((e) => e != null)
4674
4494
  .map((entry) => {
4675
- if (entry === null) {
4676
- return null;
4677
- }
4678
4495
  return deserializeAws_queryMetric(entry, context);
4679
4496
  });
4680
4497
  };
@@ -4703,9 +4520,6 @@ const deserializeAws_queryMetricStreamEntries = (output, context) => {
4703
4520
  return (output || [])
4704
4521
  .filter((e) => e != null)
4705
4522
  .map((entry) => {
4706
- if (entry === null) {
4707
- return null;
4708
- }
4709
4523
  return deserializeAws_queryMetricStreamEntry(entry, context);
4710
4524
  });
4711
4525
  };
@@ -4755,9 +4569,6 @@ const deserializeAws_queryMetricStreamFilters = (output, context) => {
4755
4569
  return (output || [])
4756
4570
  .filter((e) => e != null)
4757
4571
  .map((entry) => {
4758
- if (entry === null) {
4759
- return null;
4760
- }
4761
4572
  return deserializeAws_queryMetricStreamFilter(entry, context);
4762
4573
  });
4763
4574
  };
@@ -4765,9 +4576,6 @@ const deserializeAws_queryMetricStreamStatisticsAdditionalStatistics = (output,
4765
4576
  return (output || [])
4766
4577
  .filter((e) => e != null)
4767
4578
  .map((entry) => {
4768
- if (entry === null) {
4769
- return null;
4770
- }
4771
4579
  return (0, smithy_client_1.expectString)(entry);
4772
4580
  });
4773
4581
  };
@@ -4794,9 +4602,6 @@ const deserializeAws_queryMetricStreamStatisticsConfigurations = (output, contex
4794
4602
  return (output || [])
4795
4603
  .filter((e) => e != null)
4796
4604
  .map((entry) => {
4797
- if (entry === null) {
4798
- return null;
4799
- }
4800
4605
  return deserializeAws_queryMetricStreamStatisticsConfiguration(entry, context);
4801
4606
  });
4802
4607
  };
@@ -4804,9 +4609,6 @@ const deserializeAws_queryMetricStreamStatisticsIncludeMetrics = (output, contex
4804
4609
  return (output || [])
4805
4610
  .filter((e) => e != null)
4806
4611
  .map((entry) => {
4807
- if (entry === null) {
4808
- return null;
4809
- }
4810
4612
  return deserializeAws_queryMetricStreamStatisticsMetric(entry, context);
4811
4613
  });
4812
4614
  };
@@ -4900,9 +4702,6 @@ const deserializeAws_queryResourceList = (output, context) => {
4900
4702
  return (output || [])
4901
4703
  .filter((e) => e != null)
4902
4704
  .map((entry) => {
4903
- if (entry === null) {
4904
- return null;
4905
- }
4906
4705
  return (0, smithy_client_1.expectString)(entry);
4907
4706
  });
4908
4707
  };
@@ -4981,9 +4780,6 @@ const deserializeAws_queryTagList = (output, context) => {
4981
4780
  return (output || [])
4982
4781
  .filter((e) => e != null)
4983
4782
  .map((entry) => {
4984
- if (entry === null) {
4985
- return null;
4986
- }
4987
4783
  return deserializeAws_queryTag(entry, context);
4988
4784
  });
4989
4785
  };
@@ -4995,9 +4791,6 @@ const deserializeAws_queryTimestamps = (output, context) => {
4995
4791
  return (output || [])
4996
4792
  .filter((e) => e != null)
4997
4793
  .map((entry) => {
4998
- if (entry === null) {
4999
- return null;
5000
- }
5001
4794
  return (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(entry));
5002
4795
  });
5003
4796
  };