@aws-sdk/client-devops-guru 3.52.0 → 3.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist-cjs/DevOpsGuru.js +30 -0
  3. package/dist-cjs/commands/DescribeEventSourcesConfigCommand.js +36 -0
  4. package/dist-cjs/commands/UpdateEventSourcesConfigCommand.js +36 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/index.js +3 -0
  7. package/dist-cjs/models/DevOpsGuruServiceException.js +11 -0
  8. package/dist-cjs/models/models_0.js +160 -3
  9. package/dist-cjs/protocols/Aws_restJson1.js +527 -1096
  10. package/dist-es/DevOpsGuru.js +30 -0
  11. package/dist-es/commands/DescribeEventSourcesConfigCommand.js +39 -0
  12. package/dist-es/commands/UpdateEventSourcesConfigCommand.js +39 -0
  13. package/dist-es/commands/index.js +2 -0
  14. package/dist-es/index.js +1 -0
  15. package/dist-es/models/DevOpsGuruServiceException.js +12 -0
  16. package/dist-es/models/models_0.js +136 -1
  17. package/dist-es/protocols/Aws_restJson1.js +891 -1208
  18. package/dist-types/DevOpsGuru.d.ts +19 -4
  19. package/dist-types/DevOpsGuruClient.d.ts +6 -4
  20. package/dist-types/commands/DescribeEventSourcesConfigCommand.d.ts +36 -0
  21. package/dist-types/commands/SearchOrganizationInsightsCommand.d.ts +4 -4
  22. package/dist-types/commands/UpdateEventSourcesConfigCommand.d.ts +35 -0
  23. package/dist-types/commands/index.d.ts +2 -0
  24. package/dist-types/index.d.ts +1 -0
  25. package/dist-types/models/DevOpsGuruServiceException.d.ts +10 -0
  26. package/dist-types/models/models_0.d.ts +394 -220
  27. package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
  28. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  29. package/dist-types/runtimeConfig.d.ts +1 -1
  30. package/dist-types/runtimeConfig.native.d.ts +1 -1
  31. package/dist-types/ts3.4/DevOpsGuru.d.ts +10 -0
  32. package/dist-types/ts3.4/DevOpsGuruClient.d.ts +6 -4
  33. package/dist-types/ts3.4/commands/DescribeEventSourcesConfigCommand.d.ts +17 -0
  34. package/dist-types/ts3.4/commands/UpdateEventSourcesConfigCommand.d.ts +17 -0
  35. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  36. package/dist-types/ts3.4/index.d.ts +1 -0
  37. package/dist-types/ts3.4/models/DevOpsGuruServiceException.d.ts +6 -0
  38. package/dist-types/ts3.4/models/models_0.d.ts +114 -22
  39. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
  40. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  41. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  42. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  43. package/package.json +27 -27
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1StartCostEstimationCommand = exports.deserializeAws_restJson1SearchOrganizationInsightsCommand = exports.deserializeAws_restJson1SearchInsightsCommand = exports.deserializeAws_restJson1RemoveNotificationChannelCommand = exports.deserializeAws_restJson1PutFeedbackCommand = exports.deserializeAws_restJson1ListRecommendationsCommand = exports.deserializeAws_restJson1ListOrganizationInsightsCommand = exports.deserializeAws_restJson1ListNotificationChannelsCommand = exports.deserializeAws_restJson1ListInsightsCommand = exports.deserializeAws_restJson1ListEventsCommand = exports.deserializeAws_restJson1ListAnomaliesForInsightCommand = exports.deserializeAws_restJson1GetResourceCollectionCommand = exports.deserializeAws_restJson1GetCostEstimationCommand = exports.deserializeAws_restJson1DescribeServiceIntegrationCommand = exports.deserializeAws_restJson1DescribeResourceCollectionHealthCommand = exports.deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = exports.deserializeAws_restJson1DescribeOrganizationOverviewCommand = exports.deserializeAws_restJson1DescribeOrganizationHealthCommand = exports.deserializeAws_restJson1DescribeInsightCommand = exports.deserializeAws_restJson1DescribeFeedbackCommand = exports.deserializeAws_restJson1DescribeAnomalyCommand = exports.deserializeAws_restJson1DescribeAccountOverviewCommand = exports.deserializeAws_restJson1DescribeAccountHealthCommand = exports.deserializeAws_restJson1AddNotificationChannelCommand = exports.serializeAws_restJson1UpdateServiceIntegrationCommand = exports.serializeAws_restJson1UpdateResourceCollectionCommand = exports.serializeAws_restJson1StartCostEstimationCommand = exports.serializeAws_restJson1SearchOrganizationInsightsCommand = exports.serializeAws_restJson1SearchInsightsCommand = exports.serializeAws_restJson1RemoveNotificationChannelCommand = exports.serializeAws_restJson1PutFeedbackCommand = exports.serializeAws_restJson1ListRecommendationsCommand = exports.serializeAws_restJson1ListOrganizationInsightsCommand = exports.serializeAws_restJson1ListNotificationChannelsCommand = exports.serializeAws_restJson1ListInsightsCommand = exports.serializeAws_restJson1ListEventsCommand = exports.serializeAws_restJson1ListAnomaliesForInsightCommand = exports.serializeAws_restJson1GetResourceCollectionCommand = exports.serializeAws_restJson1GetCostEstimationCommand = exports.serializeAws_restJson1DescribeServiceIntegrationCommand = exports.serializeAws_restJson1DescribeResourceCollectionHealthCommand = exports.serializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = exports.serializeAws_restJson1DescribeOrganizationOverviewCommand = exports.serializeAws_restJson1DescribeOrganizationHealthCommand = exports.serializeAws_restJson1DescribeInsightCommand = exports.serializeAws_restJson1DescribeFeedbackCommand = exports.serializeAws_restJson1DescribeAnomalyCommand = exports.serializeAws_restJson1DescribeAccountOverviewCommand = exports.serializeAws_restJson1DescribeAccountHealthCommand = exports.serializeAws_restJson1AddNotificationChannelCommand = void 0;
4
- exports.deserializeAws_restJson1UpdateServiceIntegrationCommand = exports.deserializeAws_restJson1UpdateResourceCollectionCommand = void 0;
3
+ exports.deserializeAws_restJson1RemoveNotificationChannelCommand = exports.deserializeAws_restJson1PutFeedbackCommand = exports.deserializeAws_restJson1ListRecommendationsCommand = exports.deserializeAws_restJson1ListOrganizationInsightsCommand = exports.deserializeAws_restJson1ListNotificationChannelsCommand = exports.deserializeAws_restJson1ListInsightsCommand = exports.deserializeAws_restJson1ListEventsCommand = exports.deserializeAws_restJson1ListAnomaliesForInsightCommand = exports.deserializeAws_restJson1GetResourceCollectionCommand = exports.deserializeAws_restJson1GetCostEstimationCommand = exports.deserializeAws_restJson1DescribeServiceIntegrationCommand = exports.deserializeAws_restJson1DescribeResourceCollectionHealthCommand = exports.deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = exports.deserializeAws_restJson1DescribeOrganizationOverviewCommand = exports.deserializeAws_restJson1DescribeOrganizationHealthCommand = exports.deserializeAws_restJson1DescribeInsightCommand = exports.deserializeAws_restJson1DescribeFeedbackCommand = exports.deserializeAws_restJson1DescribeEventSourcesConfigCommand = exports.deserializeAws_restJson1DescribeAnomalyCommand = exports.deserializeAws_restJson1DescribeAccountOverviewCommand = exports.deserializeAws_restJson1DescribeAccountHealthCommand = exports.deserializeAws_restJson1AddNotificationChannelCommand = exports.serializeAws_restJson1UpdateServiceIntegrationCommand = exports.serializeAws_restJson1UpdateResourceCollectionCommand = exports.serializeAws_restJson1UpdateEventSourcesConfigCommand = exports.serializeAws_restJson1StartCostEstimationCommand = exports.serializeAws_restJson1SearchOrganizationInsightsCommand = exports.serializeAws_restJson1SearchInsightsCommand = exports.serializeAws_restJson1RemoveNotificationChannelCommand = exports.serializeAws_restJson1PutFeedbackCommand = exports.serializeAws_restJson1ListRecommendationsCommand = exports.serializeAws_restJson1ListOrganizationInsightsCommand = exports.serializeAws_restJson1ListNotificationChannelsCommand = exports.serializeAws_restJson1ListInsightsCommand = exports.serializeAws_restJson1ListEventsCommand = exports.serializeAws_restJson1ListAnomaliesForInsightCommand = exports.serializeAws_restJson1GetResourceCollectionCommand = exports.serializeAws_restJson1GetCostEstimationCommand = exports.serializeAws_restJson1DescribeServiceIntegrationCommand = exports.serializeAws_restJson1DescribeResourceCollectionHealthCommand = exports.serializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = exports.serializeAws_restJson1DescribeOrganizationOverviewCommand = exports.serializeAws_restJson1DescribeOrganizationHealthCommand = exports.serializeAws_restJson1DescribeInsightCommand = exports.serializeAws_restJson1DescribeFeedbackCommand = exports.serializeAws_restJson1DescribeEventSourcesConfigCommand = exports.serializeAws_restJson1DescribeAnomalyCommand = exports.serializeAws_restJson1DescribeAccountOverviewCommand = exports.serializeAws_restJson1DescribeAccountHealthCommand = exports.serializeAws_restJson1AddNotificationChannelCommand = void 0;
4
+ exports.deserializeAws_restJson1UpdateServiceIntegrationCommand = exports.deserializeAws_restJson1UpdateResourceCollectionCommand = exports.deserializeAws_restJson1UpdateEventSourcesConfigCommand = exports.deserializeAws_restJson1StartCostEstimationCommand = exports.deserializeAws_restJson1SearchOrganizationInsightsCommand = exports.deserializeAws_restJson1SearchInsightsCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const uuid_1 = require("uuid");
8
+ const DevOpsGuruServiceException_1 = require("../models/DevOpsGuruServiceException");
9
+ const models_0_1 = require("../models/models_0");
8
10
  const serializeAws_restJson1AddNotificationChannelCommand = async (input, context) => {
9
11
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
12
  const headers = {
@@ -99,6 +101,25 @@ const serializeAws_restJson1DescribeAnomalyCommand = async (input, context) => {
99
101
  });
100
102
  };
101
103
  exports.serializeAws_restJson1DescribeAnomalyCommand = serializeAws_restJson1DescribeAnomalyCommand;
104
+ const serializeAws_restJson1DescribeEventSourcesConfigCommand = async (input, context) => {
105
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
106
+ const headers = {
107
+ "content-type": "application/json",
108
+ };
109
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/event-sources";
110
+ let body;
111
+ body = "";
112
+ return new protocol_http_1.HttpRequest({
113
+ protocol,
114
+ hostname,
115
+ port,
116
+ method: "POST",
117
+ headers,
118
+ path: resolvedPath,
119
+ body,
120
+ });
121
+ };
122
+ exports.serializeAws_restJson1DescribeEventSourcesConfigCommand = serializeAws_restJson1DescribeEventSourcesConfigCommand;
102
123
  const serializeAws_restJson1DescribeFeedbackCommand = async (input, context) => {
103
124
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
125
  const headers = {
@@ -645,6 +666,30 @@ const serializeAws_restJson1StartCostEstimationCommand = async (input, context)
645
666
  });
646
667
  };
647
668
  exports.serializeAws_restJson1StartCostEstimationCommand = serializeAws_restJson1StartCostEstimationCommand;
669
+ const serializeAws_restJson1UpdateEventSourcesConfigCommand = async (input, context) => {
670
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
671
+ const headers = {
672
+ "content-type": "application/json",
673
+ };
674
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/event-sources";
675
+ let body;
676
+ body = JSON.stringify({
677
+ ...(input.EventSources !== undefined &&
678
+ input.EventSources !== null && {
679
+ EventSources: serializeAws_restJson1EventSourcesConfig(input.EventSources, context),
680
+ }),
681
+ });
682
+ return new protocol_http_1.HttpRequest({
683
+ protocol,
684
+ hostname,
685
+ port,
686
+ method: "PUT",
687
+ headers,
688
+ path: resolvedPath,
689
+ body,
690
+ });
691
+ };
692
+ exports.serializeAws_restJson1UpdateEventSourcesConfigCommand = serializeAws_restJson1UpdateEventSourcesConfigCommand;
648
693
  const serializeAws_restJson1UpdateResourceCollectionCommand = async (input, context) => {
649
694
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
650
695
  const headers = {
@@ -720,75 +765,34 @@ const deserializeAws_restJson1AddNotificationChannelCommandError = async (output
720
765
  switch (errorCode) {
721
766
  case "AccessDeniedException":
722
767
  case "com.amazonaws.devopsguru#AccessDeniedException":
723
- response = {
724
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
725
- name: errorCode,
726
- $metadata: deserializeMetadata(output),
727
- };
728
- break;
768
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
729
769
  case "ConflictException":
730
770
  case "com.amazonaws.devopsguru#ConflictException":
731
- response = {
732
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
733
- name: errorCode,
734
- $metadata: deserializeMetadata(output),
735
- };
736
- break;
771
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
737
772
  case "InternalServerException":
738
773
  case "com.amazonaws.devopsguru#InternalServerException":
739
- response = {
740
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
741
- name: errorCode,
742
- $metadata: deserializeMetadata(output),
743
- };
744
- break;
774
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
745
775
  case "ResourceNotFoundException":
746
776
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
747
- response = {
748
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
749
- name: errorCode,
750
- $metadata: deserializeMetadata(output),
751
- };
752
- break;
777
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
753
778
  case "ServiceQuotaExceededException":
754
779
  case "com.amazonaws.devopsguru#ServiceQuotaExceededException":
755
- response = {
756
- ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
757
- name: errorCode,
758
- $metadata: deserializeMetadata(output),
759
- };
760
- break;
780
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
761
781
  case "ThrottlingException":
762
782
  case "com.amazonaws.devopsguru#ThrottlingException":
763
- response = {
764
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
765
- name: errorCode,
766
- $metadata: deserializeMetadata(output),
767
- };
768
- break;
783
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
769
784
  case "ValidationException":
770
785
  case "com.amazonaws.devopsguru#ValidationException":
771
- response = {
772
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
773
- name: errorCode,
774
- $metadata: deserializeMetadata(output),
775
- };
776
- break;
786
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
777
787
  default:
778
788
  const parsedBody = parsedOutput.body;
779
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
780
- response = {
781
- ...parsedBody,
782
- name: `${errorCode}`,
783
- message: parsedBody.message || parsedBody.Message || errorCode,
789
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
790
+ name: parsedBody.code || parsedBody.Code || errorCode,
784
791
  $fault: "client",
785
792
  $metadata: deserializeMetadata(output),
786
- };
793
+ });
794
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
787
795
  }
788
- const message = response.message || response.Message || errorCode;
789
- response.message = message;
790
- delete response.Message;
791
- return Promise.reject(Object.assign(new Error(message), response));
792
796
  };
793
797
  const deserializeAws_restJson1DescribeAccountHealthCommand = async (output, context) => {
794
798
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -828,51 +832,25 @@ const deserializeAws_restJson1DescribeAccountHealthCommandError = async (output,
828
832
  switch (errorCode) {
829
833
  case "AccessDeniedException":
830
834
  case "com.amazonaws.devopsguru#AccessDeniedException":
831
- response = {
832
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
833
- name: errorCode,
834
- $metadata: deserializeMetadata(output),
835
- };
836
- break;
835
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
837
836
  case "InternalServerException":
838
837
  case "com.amazonaws.devopsguru#InternalServerException":
839
- response = {
840
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
841
- name: errorCode,
842
- $metadata: deserializeMetadata(output),
843
- };
844
- break;
838
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
845
839
  case "ThrottlingException":
846
840
  case "com.amazonaws.devopsguru#ThrottlingException":
847
- response = {
848
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
849
- name: errorCode,
850
- $metadata: deserializeMetadata(output),
851
- };
852
- break;
841
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
853
842
  case "ValidationException":
854
843
  case "com.amazonaws.devopsguru#ValidationException":
855
- response = {
856
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
857
- name: errorCode,
858
- $metadata: deserializeMetadata(output),
859
- };
860
- break;
844
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
861
845
  default:
862
846
  const parsedBody = parsedOutput.body;
863
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
864
- response = {
865
- ...parsedBody,
866
- name: `${errorCode}`,
867
- message: parsedBody.message || parsedBody.Message || errorCode,
847
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
848
+ name: parsedBody.code || parsedBody.Code || errorCode,
868
849
  $fault: "client",
869
850
  $metadata: deserializeMetadata(output),
870
- };
851
+ });
852
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
871
853
  }
872
- const message = response.message || response.Message || errorCode;
873
- response.message = message;
874
- delete response.Message;
875
- return Promise.reject(Object.assign(new Error(message), response));
876
854
  };
877
855
  const deserializeAws_restJson1DescribeAccountOverviewCommand = async (output, context) => {
878
856
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -908,51 +886,25 @@ const deserializeAws_restJson1DescribeAccountOverviewCommandError = async (outpu
908
886
  switch (errorCode) {
909
887
  case "AccessDeniedException":
910
888
  case "com.amazonaws.devopsguru#AccessDeniedException":
911
- response = {
912
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
913
- name: errorCode,
914
- $metadata: deserializeMetadata(output),
915
- };
916
- break;
889
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
917
890
  case "InternalServerException":
918
891
  case "com.amazonaws.devopsguru#InternalServerException":
919
- response = {
920
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
921
- name: errorCode,
922
- $metadata: deserializeMetadata(output),
923
- };
924
- break;
892
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
925
893
  case "ThrottlingException":
926
894
  case "com.amazonaws.devopsguru#ThrottlingException":
927
- response = {
928
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
929
- name: errorCode,
930
- $metadata: deserializeMetadata(output),
931
- };
932
- break;
895
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
933
896
  case "ValidationException":
934
897
  case "com.amazonaws.devopsguru#ValidationException":
935
- response = {
936
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
937
- name: errorCode,
938
- $metadata: deserializeMetadata(output),
939
- };
940
- break;
898
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
941
899
  default:
942
900
  const parsedBody = parsedOutput.body;
943
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
944
- response = {
945
- ...parsedBody,
946
- name: `${errorCode}`,
947
- message: parsedBody.message || parsedBody.Message || errorCode,
901
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
902
+ name: parsedBody.code || parsedBody.Code || errorCode,
948
903
  $fault: "client",
949
904
  $metadata: deserializeMetadata(output),
950
- };
905
+ });
906
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
951
907
  }
952
- const message = response.message || response.Message || errorCode;
953
- response.message = message;
954
- delete response.Message;
955
- return Promise.reject(Object.assign(new Error(message), response));
956
908
  };
957
909
  const deserializeAws_restJson1DescribeAnomalyCommand = async (output, context) => {
958
910
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -984,59 +936,74 @@ const deserializeAws_restJson1DescribeAnomalyCommandError = async (output, conte
984
936
  switch (errorCode) {
985
937
  case "AccessDeniedException":
986
938
  case "com.amazonaws.devopsguru#AccessDeniedException":
987
- response = {
988
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
989
- name: errorCode,
990
- $metadata: deserializeMetadata(output),
991
- };
992
- break;
939
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
993
940
  case "InternalServerException":
994
941
  case "com.amazonaws.devopsguru#InternalServerException":
995
- response = {
996
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
997
- name: errorCode,
998
- $metadata: deserializeMetadata(output),
999
- };
1000
- break;
942
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1001
943
  case "ResourceNotFoundException":
1002
944
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
1003
- response = {
1004
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1005
- name: errorCode,
1006
- $metadata: deserializeMetadata(output),
1007
- };
1008
- break;
945
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1009
946
  case "ThrottlingException":
1010
947
  case "com.amazonaws.devopsguru#ThrottlingException":
1011
- response = {
1012
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1013
- name: errorCode,
1014
- $metadata: deserializeMetadata(output),
1015
- };
1016
- break;
948
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1017
949
  case "ValidationException":
1018
950
  case "com.amazonaws.devopsguru#ValidationException":
1019
- response = {
1020
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1021
- name: errorCode,
951
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
952
+ default:
953
+ const parsedBody = parsedOutput.body;
954
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
955
+ name: parsedBody.code || parsedBody.Code || errorCode,
956
+ $fault: "client",
1022
957
  $metadata: deserializeMetadata(output),
1023
- };
1024
- break;
958
+ });
959
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
960
+ }
961
+ };
962
+ const deserializeAws_restJson1DescribeEventSourcesConfigCommand = async (output, context) => {
963
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
964
+ return deserializeAws_restJson1DescribeEventSourcesConfigCommandError(output, context);
965
+ }
966
+ const contents = {
967
+ $metadata: deserializeMetadata(output),
968
+ EventSources: undefined,
969
+ };
970
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
971
+ if (data.EventSources !== undefined && data.EventSources !== null) {
972
+ contents.EventSources = deserializeAws_restJson1EventSourcesConfig(data.EventSources, context);
973
+ }
974
+ return Promise.resolve(contents);
975
+ };
976
+ exports.deserializeAws_restJson1DescribeEventSourcesConfigCommand = deserializeAws_restJson1DescribeEventSourcesConfigCommand;
977
+ const deserializeAws_restJson1DescribeEventSourcesConfigCommandError = async (output, context) => {
978
+ const parsedOutput = {
979
+ ...output,
980
+ body: await parseBody(output.body, context),
981
+ };
982
+ let response;
983
+ let errorCode = "UnknownError";
984
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
985
+ switch (errorCode) {
986
+ case "AccessDeniedException":
987
+ case "com.amazonaws.devopsguru#AccessDeniedException":
988
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
989
+ case "InternalServerException":
990
+ case "com.amazonaws.devopsguru#InternalServerException":
991
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
992
+ case "ThrottlingException":
993
+ case "com.amazonaws.devopsguru#ThrottlingException":
994
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
995
+ case "ValidationException":
996
+ case "com.amazonaws.devopsguru#ValidationException":
997
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1025
998
  default:
1026
999
  const parsedBody = parsedOutput.body;
1027
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1028
- response = {
1029
- ...parsedBody,
1030
- name: `${errorCode}`,
1031
- message: parsedBody.message || parsedBody.Message || errorCode,
1000
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1001
+ name: parsedBody.code || parsedBody.Code || errorCode,
1032
1002
  $fault: "client",
1033
1003
  $metadata: deserializeMetadata(output),
1034
- };
1004
+ });
1005
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1035
1006
  }
1036
- const message = response.message || response.Message || errorCode;
1037
- response.message = message;
1038
- delete response.Message;
1039
- return Promise.reject(Object.assign(new Error(message), response));
1040
1007
  };
1041
1008
  const deserializeAws_restJson1DescribeFeedbackCommand = async (output, context) => {
1042
1009
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1064,59 +1031,28 @@ const deserializeAws_restJson1DescribeFeedbackCommandError = async (output, cont
1064
1031
  switch (errorCode) {
1065
1032
  case "AccessDeniedException":
1066
1033
  case "com.amazonaws.devopsguru#AccessDeniedException":
1067
- response = {
1068
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1069
- name: errorCode,
1070
- $metadata: deserializeMetadata(output),
1071
- };
1072
- break;
1034
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1073
1035
  case "InternalServerException":
1074
1036
  case "com.amazonaws.devopsguru#InternalServerException":
1075
- response = {
1076
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1077
- name: errorCode,
1078
- $metadata: deserializeMetadata(output),
1079
- };
1080
- break;
1037
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1081
1038
  case "ResourceNotFoundException":
1082
1039
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
1083
- response = {
1084
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1085
- name: errorCode,
1086
- $metadata: deserializeMetadata(output),
1087
- };
1088
- break;
1040
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1089
1041
  case "ThrottlingException":
1090
1042
  case "com.amazonaws.devopsguru#ThrottlingException":
1091
- response = {
1092
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1093
- name: errorCode,
1094
- $metadata: deserializeMetadata(output),
1095
- };
1096
- break;
1043
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1097
1044
  case "ValidationException":
1098
1045
  case "com.amazonaws.devopsguru#ValidationException":
1099
- response = {
1100
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1101
- name: errorCode,
1102
- $metadata: deserializeMetadata(output),
1103
- };
1104
- break;
1046
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1105
1047
  default:
1106
1048
  const parsedBody = parsedOutput.body;
1107
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1108
- response = {
1109
- ...parsedBody,
1110
- name: `${errorCode}`,
1111
- message: parsedBody.message || parsedBody.Message || errorCode,
1049
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1050
+ name: parsedBody.code || parsedBody.Code || errorCode,
1112
1051
  $fault: "client",
1113
1052
  $metadata: deserializeMetadata(output),
1114
- };
1053
+ });
1054
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1115
1055
  }
1116
- const message = response.message || response.Message || errorCode;
1117
- response.message = message;
1118
- delete response.Message;
1119
- return Promise.reject(Object.assign(new Error(message), response));
1120
1056
  };
1121
1057
  const deserializeAws_restJson1DescribeInsightCommand = async (output, context) => {
1122
1058
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1148,59 +1084,28 @@ const deserializeAws_restJson1DescribeInsightCommandError = async (output, conte
1148
1084
  switch (errorCode) {
1149
1085
  case "AccessDeniedException":
1150
1086
  case "com.amazonaws.devopsguru#AccessDeniedException":
1151
- response = {
1152
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1153
- name: errorCode,
1154
- $metadata: deserializeMetadata(output),
1155
- };
1156
- break;
1087
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1157
1088
  case "InternalServerException":
1158
1089
  case "com.amazonaws.devopsguru#InternalServerException":
1159
- response = {
1160
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1161
- name: errorCode,
1162
- $metadata: deserializeMetadata(output),
1163
- };
1164
- break;
1090
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1165
1091
  case "ResourceNotFoundException":
1166
1092
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
1167
- response = {
1168
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1169
- name: errorCode,
1170
- $metadata: deserializeMetadata(output),
1171
- };
1172
- break;
1093
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1173
1094
  case "ThrottlingException":
1174
1095
  case "com.amazonaws.devopsguru#ThrottlingException":
1175
- response = {
1176
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1177
- name: errorCode,
1178
- $metadata: deserializeMetadata(output),
1179
- };
1180
- break;
1096
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1181
1097
  case "ValidationException":
1182
1098
  case "com.amazonaws.devopsguru#ValidationException":
1183
- response = {
1184
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1185
- name: errorCode,
1186
- $metadata: deserializeMetadata(output),
1187
- };
1188
- break;
1099
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1189
1100
  default:
1190
1101
  const parsedBody = parsedOutput.body;
1191
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1192
- response = {
1193
- ...parsedBody,
1194
- name: `${errorCode}`,
1195
- message: parsedBody.message || parsedBody.Message || errorCode,
1102
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1103
+ name: parsedBody.code || parsedBody.Code || errorCode,
1196
1104
  $fault: "client",
1197
1105
  $metadata: deserializeMetadata(output),
1198
- };
1106
+ });
1107
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1199
1108
  }
1200
- const message = response.message || response.Message || errorCode;
1201
- response.message = message;
1202
- delete response.Message;
1203
- return Promise.reject(Object.assign(new Error(message), response));
1204
1109
  };
1205
1110
  const deserializeAws_restJson1DescribeOrganizationHealthCommand = async (output, context) => {
1206
1111
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1240,51 +1145,25 @@ const deserializeAws_restJson1DescribeOrganizationHealthCommandError = async (ou
1240
1145
  switch (errorCode) {
1241
1146
  case "AccessDeniedException":
1242
1147
  case "com.amazonaws.devopsguru#AccessDeniedException":
1243
- response = {
1244
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1245
- name: errorCode,
1246
- $metadata: deserializeMetadata(output),
1247
- };
1248
- break;
1148
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1249
1149
  case "InternalServerException":
1250
1150
  case "com.amazonaws.devopsguru#InternalServerException":
1251
- response = {
1252
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1253
- name: errorCode,
1254
- $metadata: deserializeMetadata(output),
1255
- };
1256
- break;
1151
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1257
1152
  case "ThrottlingException":
1258
1153
  case "com.amazonaws.devopsguru#ThrottlingException":
1259
- response = {
1260
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1261
- name: errorCode,
1262
- $metadata: deserializeMetadata(output),
1263
- };
1264
- break;
1154
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1265
1155
  case "ValidationException":
1266
1156
  case "com.amazonaws.devopsguru#ValidationException":
1267
- response = {
1268
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1269
- name: errorCode,
1270
- $metadata: deserializeMetadata(output),
1271
- };
1272
- break;
1157
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1273
1158
  default:
1274
1159
  const parsedBody = parsedOutput.body;
1275
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1276
- response = {
1277
- ...parsedBody,
1278
- name: `${errorCode}`,
1279
- message: parsedBody.message || parsedBody.Message || errorCode,
1160
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1161
+ name: parsedBody.code || parsedBody.Code || errorCode,
1280
1162
  $fault: "client",
1281
1163
  $metadata: deserializeMetadata(output),
1282
- };
1164
+ });
1165
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1283
1166
  }
1284
- const message = response.message || response.Message || errorCode;
1285
- response.message = message;
1286
- delete response.Message;
1287
- return Promise.reject(Object.assign(new Error(message), response));
1288
1167
  };
1289
1168
  const deserializeAws_restJson1DescribeOrganizationOverviewCommand = async (output, context) => {
1290
1169
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1316,51 +1195,25 @@ const deserializeAws_restJson1DescribeOrganizationOverviewCommandError = async (
1316
1195
  switch (errorCode) {
1317
1196
  case "AccessDeniedException":
1318
1197
  case "com.amazonaws.devopsguru#AccessDeniedException":
1319
- response = {
1320
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1321
- name: errorCode,
1322
- $metadata: deserializeMetadata(output),
1323
- };
1324
- break;
1198
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1325
1199
  case "InternalServerException":
1326
1200
  case "com.amazonaws.devopsguru#InternalServerException":
1327
- response = {
1328
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1329
- name: errorCode,
1330
- $metadata: deserializeMetadata(output),
1331
- };
1332
- break;
1201
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1333
1202
  case "ThrottlingException":
1334
1203
  case "com.amazonaws.devopsguru#ThrottlingException":
1335
- response = {
1336
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1337
- name: errorCode,
1338
- $metadata: deserializeMetadata(output),
1339
- };
1340
- break;
1204
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1341
1205
  case "ValidationException":
1342
1206
  case "com.amazonaws.devopsguru#ValidationException":
1343
- response = {
1344
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1345
- name: errorCode,
1346
- $metadata: deserializeMetadata(output),
1347
- };
1348
- break;
1207
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1349
1208
  default:
1350
1209
  const parsedBody = parsedOutput.body;
1351
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1352
- response = {
1353
- ...parsedBody,
1354
- name: `${errorCode}`,
1355
- message: parsedBody.message || parsedBody.Message || errorCode,
1210
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1211
+ name: parsedBody.code || parsedBody.Code || errorCode,
1356
1212
  $fault: "client",
1357
1213
  $metadata: deserializeMetadata(output),
1358
- };
1214
+ });
1215
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1359
1216
  }
1360
- const message = response.message || response.Message || errorCode;
1361
- response.message = message;
1362
- delete response.Message;
1363
- return Promise.reject(Object.assign(new Error(message), response));
1364
1217
  };
1365
1218
  const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = async (output, context) => {
1366
1219
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1404,51 +1257,25 @@ const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthComman
1404
1257
  switch (errorCode) {
1405
1258
  case "AccessDeniedException":
1406
1259
  case "com.amazonaws.devopsguru#AccessDeniedException":
1407
- response = {
1408
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1409
- name: errorCode,
1410
- $metadata: deserializeMetadata(output),
1411
- };
1412
- break;
1260
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1413
1261
  case "InternalServerException":
1414
1262
  case "com.amazonaws.devopsguru#InternalServerException":
1415
- response = {
1416
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1417
- name: errorCode,
1418
- $metadata: deserializeMetadata(output),
1419
- };
1420
- break;
1263
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1421
1264
  case "ThrottlingException":
1422
1265
  case "com.amazonaws.devopsguru#ThrottlingException":
1423
- response = {
1424
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1425
- name: errorCode,
1426
- $metadata: deserializeMetadata(output),
1427
- };
1428
- break;
1266
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1429
1267
  case "ValidationException":
1430
1268
  case "com.amazonaws.devopsguru#ValidationException":
1431
- response = {
1432
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1433
- name: errorCode,
1434
- $metadata: deserializeMetadata(output),
1435
- };
1436
- break;
1269
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1437
1270
  default:
1438
1271
  const parsedBody = parsedOutput.body;
1439
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1440
- response = {
1441
- ...parsedBody,
1442
- name: `${errorCode}`,
1443
- message: parsedBody.message || parsedBody.Message || errorCode,
1272
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1273
+ name: parsedBody.code || parsedBody.Code || errorCode,
1444
1274
  $fault: "client",
1445
1275
  $metadata: deserializeMetadata(output),
1446
- };
1276
+ });
1277
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1447
1278
  }
1448
- const message = response.message || response.Message || errorCode;
1449
- response.message = message;
1450
- delete response.Message;
1451
- return Promise.reject(Object.assign(new Error(message), response));
1452
1279
  };
1453
1280
  const deserializeAws_restJson1DescribeResourceCollectionHealthCommand = async (output, context) => {
1454
1281
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1488,51 +1315,25 @@ const deserializeAws_restJson1DescribeResourceCollectionHealthCommandError = asy
1488
1315
  switch (errorCode) {
1489
1316
  case "AccessDeniedException":
1490
1317
  case "com.amazonaws.devopsguru#AccessDeniedException":
1491
- response = {
1492
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1493
- name: errorCode,
1494
- $metadata: deserializeMetadata(output),
1495
- };
1496
- break;
1318
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1497
1319
  case "InternalServerException":
1498
1320
  case "com.amazonaws.devopsguru#InternalServerException":
1499
- response = {
1500
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1501
- name: errorCode,
1502
- $metadata: deserializeMetadata(output),
1503
- };
1504
- break;
1321
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1505
1322
  case "ThrottlingException":
1506
1323
  case "com.amazonaws.devopsguru#ThrottlingException":
1507
- response = {
1508
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1509
- name: errorCode,
1510
- $metadata: deserializeMetadata(output),
1511
- };
1512
- break;
1324
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1513
1325
  case "ValidationException":
1514
1326
  case "com.amazonaws.devopsguru#ValidationException":
1515
- response = {
1516
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1517
- name: errorCode,
1518
- $metadata: deserializeMetadata(output),
1519
- };
1520
- break;
1327
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1521
1328
  default:
1522
1329
  const parsedBody = parsedOutput.body;
1523
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1524
- response = {
1525
- ...parsedBody,
1526
- name: `${errorCode}`,
1527
- message: parsedBody.message || parsedBody.Message || errorCode,
1330
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1331
+ name: parsedBody.code || parsedBody.Code || errorCode,
1528
1332
  $fault: "client",
1529
1333
  $metadata: deserializeMetadata(output),
1530
- };
1334
+ });
1335
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1531
1336
  }
1532
- const message = response.message || response.Message || errorCode;
1533
- response.message = message;
1534
- delete response.Message;
1535
- return Promise.reject(Object.assign(new Error(message), response));
1536
1337
  };
1537
1338
  const deserializeAws_restJson1DescribeServiceIntegrationCommand = async (output, context) => {
1538
1339
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1560,51 +1361,25 @@ const deserializeAws_restJson1DescribeServiceIntegrationCommandError = async (ou
1560
1361
  switch (errorCode) {
1561
1362
  case "AccessDeniedException":
1562
1363
  case "com.amazonaws.devopsguru#AccessDeniedException":
1563
- response = {
1564
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1565
- name: errorCode,
1566
- $metadata: deserializeMetadata(output),
1567
- };
1568
- break;
1364
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1569
1365
  case "InternalServerException":
1570
1366
  case "com.amazonaws.devopsguru#InternalServerException":
1571
- response = {
1572
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1573
- name: errorCode,
1574
- $metadata: deserializeMetadata(output),
1575
- };
1576
- break;
1367
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1577
1368
  case "ThrottlingException":
1578
1369
  case "com.amazonaws.devopsguru#ThrottlingException":
1579
- response = {
1580
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1581
- name: errorCode,
1582
- $metadata: deserializeMetadata(output),
1583
- };
1584
- break;
1370
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1585
1371
  case "ValidationException":
1586
1372
  case "com.amazonaws.devopsguru#ValidationException":
1587
- response = {
1588
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1589
- name: errorCode,
1590
- $metadata: deserializeMetadata(output),
1591
- };
1592
- break;
1373
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1593
1374
  default:
1594
1375
  const parsedBody = parsedOutput.body;
1595
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1596
- response = {
1597
- ...parsedBody,
1598
- name: `${errorCode}`,
1599
- message: parsedBody.message || parsedBody.Message || errorCode,
1376
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1377
+ name: parsedBody.code || parsedBody.Code || errorCode,
1600
1378
  $fault: "client",
1601
1379
  $metadata: deserializeMetadata(output),
1602
- };
1380
+ });
1381
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1603
1382
  }
1604
- const message = response.message || response.Message || errorCode;
1605
- response.message = message;
1606
- delete response.Message;
1607
- return Promise.reject(Object.assign(new Error(message), response));
1608
1383
  };
1609
1384
  const deserializeAws_restJson1GetCostEstimationCommand = async (output, context) => {
1610
1385
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1652,59 +1427,28 @@ const deserializeAws_restJson1GetCostEstimationCommandError = async (output, con
1652
1427
  switch (errorCode) {
1653
1428
  case "AccessDeniedException":
1654
1429
  case "com.amazonaws.devopsguru#AccessDeniedException":
1655
- response = {
1656
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1657
- name: errorCode,
1658
- $metadata: deserializeMetadata(output),
1659
- };
1660
- break;
1430
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1661
1431
  case "InternalServerException":
1662
1432
  case "com.amazonaws.devopsguru#InternalServerException":
1663
- response = {
1664
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1665
- name: errorCode,
1666
- $metadata: deserializeMetadata(output),
1667
- };
1668
- break;
1433
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1669
1434
  case "ResourceNotFoundException":
1670
1435
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
1671
- response = {
1672
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1673
- name: errorCode,
1674
- $metadata: deserializeMetadata(output),
1675
- };
1676
- break;
1436
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1677
1437
  case "ThrottlingException":
1678
1438
  case "com.amazonaws.devopsguru#ThrottlingException":
1679
- response = {
1680
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1681
- name: errorCode,
1682
- $metadata: deserializeMetadata(output),
1683
- };
1684
- break;
1439
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1685
1440
  case "ValidationException":
1686
1441
  case "com.amazonaws.devopsguru#ValidationException":
1687
- response = {
1688
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1689
- name: errorCode,
1690
- $metadata: deserializeMetadata(output),
1691
- };
1692
- break;
1442
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1693
1443
  default:
1694
1444
  const parsedBody = parsedOutput.body;
1695
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1696
- response = {
1697
- ...parsedBody,
1698
- name: `${errorCode}`,
1699
- message: parsedBody.message || parsedBody.Message || errorCode,
1445
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1446
+ name: parsedBody.code || parsedBody.Code || errorCode,
1700
1447
  $fault: "client",
1701
1448
  $metadata: deserializeMetadata(output),
1702
- };
1449
+ });
1450
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1703
1451
  }
1704
- const message = response.message || response.Message || errorCode;
1705
- response.message = message;
1706
- delete response.Message;
1707
- return Promise.reject(Object.assign(new Error(message), response));
1708
1452
  };
1709
1453
  const deserializeAws_restJson1GetResourceCollectionCommand = async (output, context) => {
1710
1454
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1736,59 +1480,28 @@ const deserializeAws_restJson1GetResourceCollectionCommandError = async (output,
1736
1480
  switch (errorCode) {
1737
1481
  case "AccessDeniedException":
1738
1482
  case "com.amazonaws.devopsguru#AccessDeniedException":
1739
- response = {
1740
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1741
- name: errorCode,
1742
- $metadata: deserializeMetadata(output),
1743
- };
1744
- break;
1483
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1745
1484
  case "InternalServerException":
1746
1485
  case "com.amazonaws.devopsguru#InternalServerException":
1747
- response = {
1748
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1749
- name: errorCode,
1750
- $metadata: deserializeMetadata(output),
1751
- };
1752
- break;
1486
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1753
1487
  case "ResourceNotFoundException":
1754
1488
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
1755
- response = {
1756
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1757
- name: errorCode,
1758
- $metadata: deserializeMetadata(output),
1759
- };
1760
- break;
1489
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1761
1490
  case "ThrottlingException":
1762
1491
  case "com.amazonaws.devopsguru#ThrottlingException":
1763
- response = {
1764
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1765
- name: errorCode,
1766
- $metadata: deserializeMetadata(output),
1767
- };
1768
- break;
1492
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1769
1493
  case "ValidationException":
1770
1494
  case "com.amazonaws.devopsguru#ValidationException":
1771
- response = {
1772
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1773
- name: errorCode,
1774
- $metadata: deserializeMetadata(output),
1775
- };
1776
- break;
1495
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1777
1496
  default:
1778
1497
  const parsedBody = parsedOutput.body;
1779
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1780
- response = {
1781
- ...parsedBody,
1782
- name: `${errorCode}`,
1783
- message: parsedBody.message || parsedBody.Message || errorCode,
1498
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1499
+ name: parsedBody.code || parsedBody.Code || errorCode,
1784
1500
  $fault: "client",
1785
1501
  $metadata: deserializeMetadata(output),
1786
- };
1502
+ });
1503
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1787
1504
  }
1788
- const message = response.message || response.Message || errorCode;
1789
- response.message = message;
1790
- delete response.Message;
1791
- return Promise.reject(Object.assign(new Error(message), response));
1792
1505
  };
1793
1506
  const deserializeAws_restJson1ListAnomaliesForInsightCommand = async (output, context) => {
1794
1507
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1824,59 +1537,28 @@ const deserializeAws_restJson1ListAnomaliesForInsightCommandError = async (outpu
1824
1537
  switch (errorCode) {
1825
1538
  case "AccessDeniedException":
1826
1539
  case "com.amazonaws.devopsguru#AccessDeniedException":
1827
- response = {
1828
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1829
- name: errorCode,
1830
- $metadata: deserializeMetadata(output),
1831
- };
1832
- break;
1540
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1833
1541
  case "InternalServerException":
1834
1542
  case "com.amazonaws.devopsguru#InternalServerException":
1835
- response = {
1836
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1837
- name: errorCode,
1838
- $metadata: deserializeMetadata(output),
1839
- };
1840
- break;
1543
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1841
1544
  case "ResourceNotFoundException":
1842
1545
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
1843
- response = {
1844
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1845
- name: errorCode,
1846
- $metadata: deserializeMetadata(output),
1847
- };
1848
- break;
1546
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1849
1547
  case "ThrottlingException":
1850
1548
  case "com.amazonaws.devopsguru#ThrottlingException":
1851
- response = {
1852
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1853
- name: errorCode,
1854
- $metadata: deserializeMetadata(output),
1855
- };
1856
- break;
1549
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1857
1550
  case "ValidationException":
1858
1551
  case "com.amazonaws.devopsguru#ValidationException":
1859
- response = {
1860
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1861
- name: errorCode,
1862
- $metadata: deserializeMetadata(output),
1863
- };
1864
- break;
1552
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1865
1553
  default:
1866
1554
  const parsedBody = parsedOutput.body;
1867
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1868
- response = {
1869
- ...parsedBody,
1870
- name: `${errorCode}`,
1871
- message: parsedBody.message || parsedBody.Message || errorCode,
1555
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1556
+ name: parsedBody.code || parsedBody.Code || errorCode,
1872
1557
  $fault: "client",
1873
1558
  $metadata: deserializeMetadata(output),
1874
- };
1559
+ });
1560
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1875
1561
  }
1876
- const message = response.message || response.Message || errorCode;
1877
- response.message = message;
1878
- delete response.Message;
1879
- return Promise.reject(Object.assign(new Error(message), response));
1880
1562
  };
1881
1563
  const deserializeAws_restJson1ListEventsCommand = async (output, context) => {
1882
1564
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1908,59 +1590,28 @@ const deserializeAws_restJson1ListEventsCommandError = async (output, context) =
1908
1590
  switch (errorCode) {
1909
1591
  case "AccessDeniedException":
1910
1592
  case "com.amazonaws.devopsguru#AccessDeniedException":
1911
- response = {
1912
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1913
- name: errorCode,
1914
- $metadata: deserializeMetadata(output),
1915
- };
1916
- break;
1593
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1917
1594
  case "InternalServerException":
1918
1595
  case "com.amazonaws.devopsguru#InternalServerException":
1919
- response = {
1920
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1921
- name: errorCode,
1922
- $metadata: deserializeMetadata(output),
1923
- };
1924
- break;
1596
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1925
1597
  case "ResourceNotFoundException":
1926
1598
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
1927
- response = {
1928
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1929
- name: errorCode,
1930
- $metadata: deserializeMetadata(output),
1931
- };
1932
- break;
1599
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1933
1600
  case "ThrottlingException":
1934
1601
  case "com.amazonaws.devopsguru#ThrottlingException":
1935
- response = {
1936
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1937
- name: errorCode,
1938
- $metadata: deserializeMetadata(output),
1939
- };
1940
- break;
1602
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1941
1603
  case "ValidationException":
1942
1604
  case "com.amazonaws.devopsguru#ValidationException":
1943
- response = {
1944
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1945
- name: errorCode,
1946
- $metadata: deserializeMetadata(output),
1947
- };
1948
- break;
1605
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1949
1606
  default:
1950
1607
  const parsedBody = parsedOutput.body;
1951
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1952
- response = {
1953
- ...parsedBody,
1954
- name: `${errorCode}`,
1955
- message: parsedBody.message || parsedBody.Message || errorCode,
1608
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1609
+ name: parsedBody.code || parsedBody.Code || errorCode,
1956
1610
  $fault: "client",
1957
1611
  $metadata: deserializeMetadata(output),
1958
- };
1612
+ });
1613
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1959
1614
  }
1960
- const message = response.message || response.Message || errorCode;
1961
- response.message = message;
1962
- delete response.Message;
1963
- return Promise.reject(Object.assign(new Error(message), response));
1964
1615
  };
1965
1616
  const deserializeAws_restJson1ListInsightsCommand = async (output, context) => {
1966
1617
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1996,51 +1647,25 @@ const deserializeAws_restJson1ListInsightsCommandError = async (output, context)
1996
1647
  switch (errorCode) {
1997
1648
  case "AccessDeniedException":
1998
1649
  case "com.amazonaws.devopsguru#AccessDeniedException":
1999
- response = {
2000
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2001
- name: errorCode,
2002
- $metadata: deserializeMetadata(output),
2003
- };
2004
- break;
1650
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2005
1651
  case "InternalServerException":
2006
1652
  case "com.amazonaws.devopsguru#InternalServerException":
2007
- response = {
2008
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2009
- name: errorCode,
2010
- $metadata: deserializeMetadata(output),
2011
- };
2012
- break;
1653
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2013
1654
  case "ThrottlingException":
2014
1655
  case "com.amazonaws.devopsguru#ThrottlingException":
2015
- response = {
2016
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2017
- name: errorCode,
2018
- $metadata: deserializeMetadata(output),
2019
- };
2020
- break;
1656
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2021
1657
  case "ValidationException":
2022
1658
  case "com.amazonaws.devopsguru#ValidationException":
2023
- response = {
2024
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2025
- name: errorCode,
2026
- $metadata: deserializeMetadata(output),
2027
- };
2028
- break;
1659
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2029
1660
  default:
2030
1661
  const parsedBody = parsedOutput.body;
2031
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2032
- response = {
2033
- ...parsedBody,
2034
- name: `${errorCode}`,
2035
- message: parsedBody.message || parsedBody.Message || errorCode,
1662
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1663
+ name: parsedBody.code || parsedBody.Code || errorCode,
2036
1664
  $fault: "client",
2037
1665
  $metadata: deserializeMetadata(output),
2038
- };
1666
+ });
1667
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2039
1668
  }
2040
- const message = response.message || response.Message || errorCode;
2041
- response.message = message;
2042
- delete response.Message;
2043
- return Promise.reject(Object.assign(new Error(message), response));
2044
1669
  };
2045
1670
  const deserializeAws_restJson1ListNotificationChannelsCommand = async (output, context) => {
2046
1671
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2072,51 +1697,25 @@ const deserializeAws_restJson1ListNotificationChannelsCommandError = async (outp
2072
1697
  switch (errorCode) {
2073
1698
  case "AccessDeniedException":
2074
1699
  case "com.amazonaws.devopsguru#AccessDeniedException":
2075
- response = {
2076
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2077
- name: errorCode,
2078
- $metadata: deserializeMetadata(output),
2079
- };
2080
- break;
1700
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2081
1701
  case "InternalServerException":
2082
1702
  case "com.amazonaws.devopsguru#InternalServerException":
2083
- response = {
2084
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2085
- name: errorCode,
2086
- $metadata: deserializeMetadata(output),
2087
- };
2088
- break;
1703
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2089
1704
  case "ThrottlingException":
2090
1705
  case "com.amazonaws.devopsguru#ThrottlingException":
2091
- response = {
2092
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2093
- name: errorCode,
2094
- $metadata: deserializeMetadata(output),
2095
- };
2096
- break;
1706
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2097
1707
  case "ValidationException":
2098
1708
  case "com.amazonaws.devopsguru#ValidationException":
2099
- response = {
2100
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2101
- name: errorCode,
2102
- $metadata: deserializeMetadata(output),
2103
- };
2104
- break;
1709
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2105
1710
  default:
2106
1711
  const parsedBody = parsedOutput.body;
2107
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2108
- response = {
2109
- ...parsedBody,
2110
- name: `${errorCode}`,
2111
- message: parsedBody.message || parsedBody.Message || errorCode,
1712
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1713
+ name: parsedBody.code || parsedBody.Code || errorCode,
2112
1714
  $fault: "client",
2113
1715
  $metadata: deserializeMetadata(output),
2114
- };
1716
+ });
1717
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2115
1718
  }
2116
- const message = response.message || response.Message || errorCode;
2117
- response.message = message;
2118
- delete response.Message;
2119
- return Promise.reject(Object.assign(new Error(message), response));
2120
1719
  };
2121
1720
  const deserializeAws_restJson1ListOrganizationInsightsCommand = async (output, context) => {
2122
1721
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2152,51 +1751,25 @@ const deserializeAws_restJson1ListOrganizationInsightsCommandError = async (outp
2152
1751
  switch (errorCode) {
2153
1752
  case "AccessDeniedException":
2154
1753
  case "com.amazonaws.devopsguru#AccessDeniedException":
2155
- response = {
2156
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2157
- name: errorCode,
2158
- $metadata: deserializeMetadata(output),
2159
- };
2160
- break;
1754
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2161
1755
  case "InternalServerException":
2162
1756
  case "com.amazonaws.devopsguru#InternalServerException":
2163
- response = {
2164
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2165
- name: errorCode,
2166
- $metadata: deserializeMetadata(output),
2167
- };
2168
- break;
1757
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2169
1758
  case "ThrottlingException":
2170
1759
  case "com.amazonaws.devopsguru#ThrottlingException":
2171
- response = {
2172
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2173
- name: errorCode,
2174
- $metadata: deserializeMetadata(output),
2175
- };
2176
- break;
1760
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2177
1761
  case "ValidationException":
2178
1762
  case "com.amazonaws.devopsguru#ValidationException":
2179
- response = {
2180
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2181
- name: errorCode,
2182
- $metadata: deserializeMetadata(output),
2183
- };
2184
- break;
1763
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2185
1764
  default:
2186
1765
  const parsedBody = parsedOutput.body;
2187
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2188
- response = {
2189
- ...parsedBody,
2190
- name: `${errorCode}`,
2191
- message: parsedBody.message || parsedBody.Message || errorCode,
1766
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1767
+ name: parsedBody.code || parsedBody.Code || errorCode,
2192
1768
  $fault: "client",
2193
1769
  $metadata: deserializeMetadata(output),
2194
- };
1770
+ });
1771
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2195
1772
  }
2196
- const message = response.message || response.Message || errorCode;
2197
- response.message = message;
2198
- delete response.Message;
2199
- return Promise.reject(Object.assign(new Error(message), response));
2200
1773
  };
2201
1774
  const deserializeAws_restJson1ListRecommendationsCommand = async (output, context) => {
2202
1775
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2228,59 +1801,28 @@ const deserializeAws_restJson1ListRecommendationsCommandError = async (output, c
2228
1801
  switch (errorCode) {
2229
1802
  case "AccessDeniedException":
2230
1803
  case "com.amazonaws.devopsguru#AccessDeniedException":
2231
- response = {
2232
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2233
- name: errorCode,
2234
- $metadata: deserializeMetadata(output),
2235
- };
2236
- break;
1804
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2237
1805
  case "InternalServerException":
2238
1806
  case "com.amazonaws.devopsguru#InternalServerException":
2239
- response = {
2240
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2241
- name: errorCode,
2242
- $metadata: deserializeMetadata(output),
2243
- };
2244
- break;
1807
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2245
1808
  case "ResourceNotFoundException":
2246
1809
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
2247
- response = {
2248
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2249
- name: errorCode,
2250
- $metadata: deserializeMetadata(output),
2251
- };
2252
- break;
1810
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2253
1811
  case "ThrottlingException":
2254
1812
  case "com.amazonaws.devopsguru#ThrottlingException":
2255
- response = {
2256
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2257
- name: errorCode,
2258
- $metadata: deserializeMetadata(output),
2259
- };
2260
- break;
1813
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2261
1814
  case "ValidationException":
2262
1815
  case "com.amazonaws.devopsguru#ValidationException":
2263
- response = {
2264
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2265
- name: errorCode,
2266
- $metadata: deserializeMetadata(output),
2267
- };
2268
- break;
1816
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2269
1817
  default:
2270
1818
  const parsedBody = parsedOutput.body;
2271
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2272
- response = {
2273
- ...parsedBody,
2274
- name: `${errorCode}`,
2275
- message: parsedBody.message || parsedBody.Message || errorCode,
1819
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1820
+ name: parsedBody.code || parsedBody.Code || errorCode,
2276
1821
  $fault: "client",
2277
1822
  $metadata: deserializeMetadata(output),
2278
- };
1823
+ });
1824
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2279
1825
  }
2280
- const message = response.message || response.Message || errorCode;
2281
- response.message = message;
2282
- delete response.Message;
2283
- return Promise.reject(Object.assign(new Error(message), response));
2284
1826
  };
2285
1827
  const deserializeAws_restJson1PutFeedbackCommand = async (output, context) => {
2286
1828
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2304,67 +1846,31 @@ const deserializeAws_restJson1PutFeedbackCommandError = async (output, context)
2304
1846
  switch (errorCode) {
2305
1847
  case "AccessDeniedException":
2306
1848
  case "com.amazonaws.devopsguru#AccessDeniedException":
2307
- response = {
2308
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2309
- name: errorCode,
2310
- $metadata: deserializeMetadata(output),
2311
- };
2312
- break;
1849
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2313
1850
  case "ConflictException":
2314
1851
  case "com.amazonaws.devopsguru#ConflictException":
2315
- response = {
2316
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2317
- name: errorCode,
2318
- $metadata: deserializeMetadata(output),
2319
- };
2320
- break;
1852
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2321
1853
  case "InternalServerException":
2322
1854
  case "com.amazonaws.devopsguru#InternalServerException":
2323
- response = {
2324
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2325
- name: errorCode,
2326
- $metadata: deserializeMetadata(output),
2327
- };
2328
- break;
1855
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2329
1856
  case "ResourceNotFoundException":
2330
1857
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
2331
- response = {
2332
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2333
- name: errorCode,
2334
- $metadata: deserializeMetadata(output),
2335
- };
2336
- break;
1858
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2337
1859
  case "ThrottlingException":
2338
1860
  case "com.amazonaws.devopsguru#ThrottlingException":
2339
- response = {
2340
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2341
- name: errorCode,
2342
- $metadata: deserializeMetadata(output),
2343
- };
2344
- break;
1861
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2345
1862
  case "ValidationException":
2346
1863
  case "com.amazonaws.devopsguru#ValidationException":
2347
- response = {
2348
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2349
- name: errorCode,
2350
- $metadata: deserializeMetadata(output),
2351
- };
2352
- break;
1864
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2353
1865
  default:
2354
1866
  const parsedBody = parsedOutput.body;
2355
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2356
- response = {
2357
- ...parsedBody,
2358
- name: `${errorCode}`,
2359
- message: parsedBody.message || parsedBody.Message || errorCode,
1867
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1868
+ name: parsedBody.code || parsedBody.Code || errorCode,
2360
1869
  $fault: "client",
2361
1870
  $metadata: deserializeMetadata(output),
2362
- };
1871
+ });
1872
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2363
1873
  }
2364
- const message = response.message || response.Message || errorCode;
2365
- response.message = message;
2366
- delete response.Message;
2367
- return Promise.reject(Object.assign(new Error(message), response));
2368
1874
  };
2369
1875
  const deserializeAws_restJson1RemoveNotificationChannelCommand = async (output, context) => {
2370
1876
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2388,67 +1894,31 @@ const deserializeAws_restJson1RemoveNotificationChannelCommandError = async (out
2388
1894
  switch (errorCode) {
2389
1895
  case "AccessDeniedException":
2390
1896
  case "com.amazonaws.devopsguru#AccessDeniedException":
2391
- response = {
2392
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2393
- name: errorCode,
2394
- $metadata: deserializeMetadata(output),
2395
- };
2396
- break;
1897
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2397
1898
  case "ConflictException":
2398
1899
  case "com.amazonaws.devopsguru#ConflictException":
2399
- response = {
2400
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2401
- name: errorCode,
2402
- $metadata: deserializeMetadata(output),
2403
- };
2404
- break;
1900
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2405
1901
  case "InternalServerException":
2406
1902
  case "com.amazonaws.devopsguru#InternalServerException":
2407
- response = {
2408
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2409
- name: errorCode,
2410
- $metadata: deserializeMetadata(output),
2411
- };
2412
- break;
1903
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2413
1904
  case "ResourceNotFoundException":
2414
1905
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
2415
- response = {
2416
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2417
- name: errorCode,
2418
- $metadata: deserializeMetadata(output),
2419
- };
2420
- break;
1906
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2421
1907
  case "ThrottlingException":
2422
1908
  case "com.amazonaws.devopsguru#ThrottlingException":
2423
- response = {
2424
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2425
- name: errorCode,
2426
- $metadata: deserializeMetadata(output),
2427
- };
2428
- break;
1909
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2429
1910
  case "ValidationException":
2430
1911
  case "com.amazonaws.devopsguru#ValidationException":
2431
- response = {
2432
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2433
- name: errorCode,
2434
- $metadata: deserializeMetadata(output),
2435
- };
2436
- break;
1912
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2437
1913
  default:
2438
1914
  const parsedBody = parsedOutput.body;
2439
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2440
- response = {
2441
- ...parsedBody,
2442
- name: `${errorCode}`,
2443
- message: parsedBody.message || parsedBody.Message || errorCode,
1915
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1916
+ name: parsedBody.code || parsedBody.Code || errorCode,
2444
1917
  $fault: "client",
2445
1918
  $metadata: deserializeMetadata(output),
2446
- };
1919
+ });
1920
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2447
1921
  }
2448
- const message = response.message || response.Message || errorCode;
2449
- response.message = message;
2450
- delete response.Message;
2451
- return Promise.reject(Object.assign(new Error(message), response));
2452
1922
  };
2453
1923
  const deserializeAws_restJson1SearchInsightsCommand = async (output, context) => {
2454
1924
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2484,51 +1954,25 @@ const deserializeAws_restJson1SearchInsightsCommandError = async (output, contex
2484
1954
  switch (errorCode) {
2485
1955
  case "AccessDeniedException":
2486
1956
  case "com.amazonaws.devopsguru#AccessDeniedException":
2487
- response = {
2488
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2489
- name: errorCode,
2490
- $metadata: deserializeMetadata(output),
2491
- };
2492
- break;
1957
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2493
1958
  case "InternalServerException":
2494
1959
  case "com.amazonaws.devopsguru#InternalServerException":
2495
- response = {
2496
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2497
- name: errorCode,
2498
- $metadata: deserializeMetadata(output),
2499
- };
2500
- break;
1960
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2501
1961
  case "ThrottlingException":
2502
1962
  case "com.amazonaws.devopsguru#ThrottlingException":
2503
- response = {
2504
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2505
- name: errorCode,
2506
- $metadata: deserializeMetadata(output),
2507
- };
2508
- break;
1963
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2509
1964
  case "ValidationException":
2510
1965
  case "com.amazonaws.devopsguru#ValidationException":
2511
- response = {
2512
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2513
- name: errorCode,
2514
- $metadata: deserializeMetadata(output),
2515
- };
2516
- break;
1966
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2517
1967
  default:
2518
1968
  const parsedBody = parsedOutput.body;
2519
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2520
- response = {
2521
- ...parsedBody,
2522
- name: `${errorCode}`,
2523
- message: parsedBody.message || parsedBody.Message || errorCode,
1969
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1970
+ name: parsedBody.code || parsedBody.Code || errorCode,
2524
1971
  $fault: "client",
2525
1972
  $metadata: deserializeMetadata(output),
2526
- };
1973
+ });
1974
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2527
1975
  }
2528
- const message = response.message || response.Message || errorCode;
2529
- response.message = message;
2530
- delete response.Message;
2531
- return Promise.reject(Object.assign(new Error(message), response));
2532
1976
  };
2533
1977
  const deserializeAws_restJson1SearchOrganizationInsightsCommand = async (output, context) => {
2534
1978
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2564,51 +2008,25 @@ const deserializeAws_restJson1SearchOrganizationInsightsCommandError = async (ou
2564
2008
  switch (errorCode) {
2565
2009
  case "AccessDeniedException":
2566
2010
  case "com.amazonaws.devopsguru#AccessDeniedException":
2567
- response = {
2568
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2569
- name: errorCode,
2570
- $metadata: deserializeMetadata(output),
2571
- };
2572
- break;
2011
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2573
2012
  case "InternalServerException":
2574
2013
  case "com.amazonaws.devopsguru#InternalServerException":
2575
- response = {
2576
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2577
- name: errorCode,
2578
- $metadata: deserializeMetadata(output),
2579
- };
2580
- break;
2014
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2581
2015
  case "ThrottlingException":
2582
2016
  case "com.amazonaws.devopsguru#ThrottlingException":
2583
- response = {
2584
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2585
- name: errorCode,
2586
- $metadata: deserializeMetadata(output),
2587
- };
2588
- break;
2017
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2589
2018
  case "ValidationException":
2590
2019
  case "com.amazonaws.devopsguru#ValidationException":
2591
- response = {
2592
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2593
- name: errorCode,
2594
- $metadata: deserializeMetadata(output),
2595
- };
2596
- break;
2020
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2597
2021
  default:
2598
2022
  const parsedBody = parsedOutput.body;
2599
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2600
- response = {
2601
- ...parsedBody,
2602
- name: `${errorCode}`,
2603
- message: parsedBody.message || parsedBody.Message || errorCode,
2023
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2024
+ name: parsedBody.code || parsedBody.Code || errorCode,
2604
2025
  $fault: "client",
2605
2026
  $metadata: deserializeMetadata(output),
2606
- };
2027
+ });
2028
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2607
2029
  }
2608
- const message = response.message || response.Message || errorCode;
2609
- response.message = message;
2610
- delete response.Message;
2611
- return Promise.reject(Object.assign(new Error(message), response));
2612
2030
  };
2613
2031
  const deserializeAws_restJson1StartCostEstimationCommand = async (output, context) => {
2614
2032
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2632,67 +2050,73 @@ const deserializeAws_restJson1StartCostEstimationCommandError = async (output, c
2632
2050
  switch (errorCode) {
2633
2051
  case "AccessDeniedException":
2634
2052
  case "com.amazonaws.devopsguru#AccessDeniedException":
2635
- response = {
2636
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2637
- name: errorCode,
2638
- $metadata: deserializeMetadata(output),
2639
- };
2640
- break;
2053
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2641
2054
  case "ConflictException":
2642
2055
  case "com.amazonaws.devopsguru#ConflictException":
2643
- response = {
2644
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2645
- name: errorCode,
2646
- $metadata: deserializeMetadata(output),
2647
- };
2648
- break;
2056
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2649
2057
  case "InternalServerException":
2650
2058
  case "com.amazonaws.devopsguru#InternalServerException":
2651
- response = {
2652
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2653
- name: errorCode,
2654
- $metadata: deserializeMetadata(output),
2655
- };
2656
- break;
2059
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2657
2060
  case "ResourceNotFoundException":
2658
2061
  case "com.amazonaws.devopsguru#ResourceNotFoundException":
2659
- response = {
2660
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2661
- name: errorCode,
2662
- $metadata: deserializeMetadata(output),
2663
- };
2664
- break;
2062
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2665
2063
  case "ThrottlingException":
2666
2064
  case "com.amazonaws.devopsguru#ThrottlingException":
2667
- response = {
2668
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2669
- name: errorCode,
2670
- $metadata: deserializeMetadata(output),
2671
- };
2672
- break;
2065
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2673
2066
  case "ValidationException":
2674
2067
  case "com.amazonaws.devopsguru#ValidationException":
2675
- response = {
2676
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2677
- name: errorCode,
2068
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2069
+ default:
2070
+ const parsedBody = parsedOutput.body;
2071
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2072
+ name: parsedBody.code || parsedBody.Code || errorCode,
2073
+ $fault: "client",
2678
2074
  $metadata: deserializeMetadata(output),
2679
- };
2680
- break;
2075
+ });
2076
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2077
+ }
2078
+ };
2079
+ const deserializeAws_restJson1UpdateEventSourcesConfigCommand = async (output, context) => {
2080
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2081
+ return deserializeAws_restJson1UpdateEventSourcesConfigCommandError(output, context);
2082
+ }
2083
+ const contents = {
2084
+ $metadata: deserializeMetadata(output),
2085
+ };
2086
+ await collectBody(output.body, context);
2087
+ return Promise.resolve(contents);
2088
+ };
2089
+ exports.deserializeAws_restJson1UpdateEventSourcesConfigCommand = deserializeAws_restJson1UpdateEventSourcesConfigCommand;
2090
+ const deserializeAws_restJson1UpdateEventSourcesConfigCommandError = async (output, context) => {
2091
+ const parsedOutput = {
2092
+ ...output,
2093
+ body: await parseBody(output.body, context),
2094
+ };
2095
+ let response;
2096
+ let errorCode = "UnknownError";
2097
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2098
+ switch (errorCode) {
2099
+ case "AccessDeniedException":
2100
+ case "com.amazonaws.devopsguru#AccessDeniedException":
2101
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2102
+ case "InternalServerException":
2103
+ case "com.amazonaws.devopsguru#InternalServerException":
2104
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2105
+ case "ThrottlingException":
2106
+ case "com.amazonaws.devopsguru#ThrottlingException":
2107
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2108
+ case "ValidationException":
2109
+ case "com.amazonaws.devopsguru#ValidationException":
2110
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2681
2111
  default:
2682
2112
  const parsedBody = parsedOutput.body;
2683
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2684
- response = {
2685
- ...parsedBody,
2686
- name: `${errorCode}`,
2687
- message: parsedBody.message || parsedBody.Message || errorCode,
2113
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2114
+ name: parsedBody.code || parsedBody.Code || errorCode,
2688
2115
  $fault: "client",
2689
2116
  $metadata: deserializeMetadata(output),
2690
- };
2117
+ });
2118
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2691
2119
  }
2692
- const message = response.message || response.Message || errorCode;
2693
- response.message = message;
2694
- delete response.Message;
2695
- return Promise.reject(Object.assign(new Error(message), response));
2696
2120
  };
2697
2121
  const deserializeAws_restJson1UpdateResourceCollectionCommand = async (output, context) => {
2698
2122
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2716,59 +2140,28 @@ const deserializeAws_restJson1UpdateResourceCollectionCommandError = async (outp
2716
2140
  switch (errorCode) {
2717
2141
  case "AccessDeniedException":
2718
2142
  case "com.amazonaws.devopsguru#AccessDeniedException":
2719
- response = {
2720
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2721
- name: errorCode,
2722
- $metadata: deserializeMetadata(output),
2723
- };
2724
- break;
2143
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2725
2144
  case "ConflictException":
2726
2145
  case "com.amazonaws.devopsguru#ConflictException":
2727
- response = {
2728
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2729
- name: errorCode,
2730
- $metadata: deserializeMetadata(output),
2731
- };
2732
- break;
2146
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2733
2147
  case "InternalServerException":
2734
2148
  case "com.amazonaws.devopsguru#InternalServerException":
2735
- response = {
2736
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2737
- name: errorCode,
2738
- $metadata: deserializeMetadata(output),
2739
- };
2740
- break;
2149
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2741
2150
  case "ThrottlingException":
2742
2151
  case "com.amazonaws.devopsguru#ThrottlingException":
2743
- response = {
2744
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2745
- name: errorCode,
2746
- $metadata: deserializeMetadata(output),
2747
- };
2748
- break;
2152
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2749
2153
  case "ValidationException":
2750
2154
  case "com.amazonaws.devopsguru#ValidationException":
2751
- response = {
2752
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2753
- name: errorCode,
2754
- $metadata: deserializeMetadata(output),
2755
- };
2756
- break;
2155
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2757
2156
  default:
2758
2157
  const parsedBody = parsedOutput.body;
2759
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2760
- response = {
2761
- ...parsedBody,
2762
- name: `${errorCode}`,
2763
- message: parsedBody.message || parsedBody.Message || errorCode,
2158
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2159
+ name: parsedBody.code || parsedBody.Code || errorCode,
2764
2160
  $fault: "client",
2765
2161
  $metadata: deserializeMetadata(output),
2766
- };
2162
+ });
2163
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2767
2164
  }
2768
- const message = response.message || response.Message || errorCode;
2769
- response.message = message;
2770
- delete response.Message;
2771
- return Promise.reject(Object.assign(new Error(message), response));
2772
2165
  };
2773
2166
  const deserializeAws_restJson1UpdateServiceIntegrationCommand = async (output, context) => {
2774
2167
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2792,82 +2185,43 @@ const deserializeAws_restJson1UpdateServiceIntegrationCommandError = async (outp
2792
2185
  switch (errorCode) {
2793
2186
  case "AccessDeniedException":
2794
2187
  case "com.amazonaws.devopsguru#AccessDeniedException":
2795
- response = {
2796
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2797
- name: errorCode,
2798
- $metadata: deserializeMetadata(output),
2799
- };
2800
- break;
2188
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2801
2189
  case "ConflictException":
2802
2190
  case "com.amazonaws.devopsguru#ConflictException":
2803
- response = {
2804
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2805
- name: errorCode,
2806
- $metadata: deserializeMetadata(output),
2807
- };
2808
- break;
2191
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2809
2192
  case "InternalServerException":
2810
2193
  case "com.amazonaws.devopsguru#InternalServerException":
2811
- response = {
2812
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2813
- name: errorCode,
2814
- $metadata: deserializeMetadata(output),
2815
- };
2816
- break;
2194
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2817
2195
  case "ThrottlingException":
2818
2196
  case "com.amazonaws.devopsguru#ThrottlingException":
2819
- response = {
2820
- ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2821
- name: errorCode,
2822
- $metadata: deserializeMetadata(output),
2823
- };
2824
- break;
2197
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2825
2198
  case "ValidationException":
2826
2199
  case "com.amazonaws.devopsguru#ValidationException":
2827
- response = {
2828
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2829
- name: errorCode,
2830
- $metadata: deserializeMetadata(output),
2831
- };
2832
- break;
2200
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2833
2201
  default:
2834
2202
  const parsedBody = parsedOutput.body;
2835
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2836
- response = {
2837
- ...parsedBody,
2838
- name: `${errorCode}`,
2839
- message: parsedBody.message || parsedBody.Message || errorCode,
2203
+ response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2204
+ name: parsedBody.code || parsedBody.Code || errorCode,
2840
2205
  $fault: "client",
2841
2206
  $metadata: deserializeMetadata(output),
2842
- };
2207
+ });
2208
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2843
2209
  }
2844
- const message = response.message || response.Message || errorCode;
2845
- response.message = message;
2846
- delete response.Message;
2847
- return Promise.reject(Object.assign(new Error(message), response));
2848
2210
  };
2849
2211
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
2850
- const contents = {
2851
- name: "AccessDeniedException",
2852
- $fault: "client",
2853
- $metadata: deserializeMetadata(parsedOutput),
2854
- Message: undefined,
2855
- };
2212
+ const contents = {};
2856
2213
  const data = parsedOutput.body;
2857
2214
  if (data.Message !== undefined && data.Message !== null) {
2858
2215
  contents.Message = smithy_client_1.expectString(data.Message);
2859
2216
  }
2860
- return contents;
2217
+ const exception = new models_0_1.AccessDeniedException({
2218
+ $metadata: deserializeMetadata(parsedOutput),
2219
+ ...contents,
2220
+ });
2221
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
2861
2222
  };
2862
2223
  const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
2863
- const contents = {
2864
- name: "ConflictException",
2865
- $fault: "client",
2866
- $metadata: deserializeMetadata(parsedOutput),
2867
- Message: undefined,
2868
- ResourceId: undefined,
2869
- ResourceType: undefined,
2870
- };
2224
+ const contents = {};
2871
2225
  const data = parsedOutput.body;
2872
2226
  if (data.Message !== undefined && data.Message !== null) {
2873
2227
  contents.Message = smithy_client_1.expectString(data.Message);
@@ -2878,16 +2232,14 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
2878
2232
  if (data.ResourceType !== undefined && data.ResourceType !== null) {
2879
2233
  contents.ResourceType = smithy_client_1.expectString(data.ResourceType);
2880
2234
  }
2881
- return contents;
2235
+ const exception = new models_0_1.ConflictException({
2236
+ $metadata: deserializeMetadata(parsedOutput),
2237
+ ...contents,
2238
+ });
2239
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
2882
2240
  };
2883
2241
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
2884
- const contents = {
2885
- name: "InternalServerException",
2886
- $fault: "server",
2887
- $metadata: deserializeMetadata(parsedOutput),
2888
- Message: undefined,
2889
- RetryAfterSeconds: undefined,
2890
- };
2242
+ const contents = {};
2891
2243
  if (parsedOutput.headers["retry-after"] !== undefined) {
2892
2244
  contents.RetryAfterSeconds = smithy_client_1.strictParseInt32(parsedOutput.headers["retry-after"]);
2893
2245
  }
@@ -2895,17 +2247,14 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
2895
2247
  if (data.Message !== undefined && data.Message !== null) {
2896
2248
  contents.Message = smithy_client_1.expectString(data.Message);
2897
2249
  }
2898
- return contents;
2250
+ const exception = new models_0_1.InternalServerException({
2251
+ $metadata: deserializeMetadata(parsedOutput),
2252
+ ...contents,
2253
+ });
2254
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
2899
2255
  };
2900
2256
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
2901
- const contents = {
2902
- name: "ResourceNotFoundException",
2903
- $fault: "client",
2904
- $metadata: deserializeMetadata(parsedOutput),
2905
- Message: undefined,
2906
- ResourceId: undefined,
2907
- ResourceType: undefined,
2908
- };
2257
+ const contents = {};
2909
2258
  const data = parsedOutput.body;
2910
2259
  if (data.Message !== undefined && data.Message !== null) {
2911
2260
  contents.Message = smithy_client_1.expectString(data.Message);
@@ -2916,31 +2265,26 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
2916
2265
  if (data.ResourceType !== undefined && data.ResourceType !== null) {
2917
2266
  contents.ResourceType = smithy_client_1.expectString(data.ResourceType);
2918
2267
  }
2919
- return contents;
2268
+ const exception = new models_0_1.ResourceNotFoundException({
2269
+ $metadata: deserializeMetadata(parsedOutput),
2270
+ ...contents,
2271
+ });
2272
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
2920
2273
  };
2921
2274
  const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
2922
- const contents = {
2923
- name: "ServiceQuotaExceededException",
2924
- $fault: "client",
2925
- $metadata: deserializeMetadata(parsedOutput),
2926
- Message: undefined,
2927
- };
2275
+ const contents = {};
2928
2276
  const data = parsedOutput.body;
2929
2277
  if (data.Message !== undefined && data.Message !== null) {
2930
2278
  contents.Message = smithy_client_1.expectString(data.Message);
2931
2279
  }
2932
- return contents;
2280
+ const exception = new models_0_1.ServiceQuotaExceededException({
2281
+ $metadata: deserializeMetadata(parsedOutput),
2282
+ ...contents,
2283
+ });
2284
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
2933
2285
  };
2934
2286
  const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
2935
- const contents = {
2936
- name: "ThrottlingException",
2937
- $fault: "client",
2938
- $metadata: deserializeMetadata(parsedOutput),
2939
- Message: undefined,
2940
- QuotaCode: undefined,
2941
- RetryAfterSeconds: undefined,
2942
- ServiceCode: undefined,
2943
- };
2287
+ const contents = {};
2944
2288
  if (parsedOutput.headers["retry-after"] !== undefined) {
2945
2289
  contents.RetryAfterSeconds = smithy_client_1.strictParseInt32(parsedOutput.headers["retry-after"]);
2946
2290
  }
@@ -2954,17 +2298,14 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
2954
2298
  if (data.ServiceCode !== undefined && data.ServiceCode !== null) {
2955
2299
  contents.ServiceCode = smithy_client_1.expectString(data.ServiceCode);
2956
2300
  }
2957
- return contents;
2301
+ const exception = new models_0_1.ThrottlingException({
2302
+ $metadata: deserializeMetadata(parsedOutput),
2303
+ ...contents,
2304
+ });
2305
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
2958
2306
  };
2959
2307
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
2960
- const contents = {
2961
- name: "ValidationException",
2962
- $fault: "client",
2963
- $metadata: deserializeMetadata(parsedOutput),
2964
- Fields: undefined,
2965
- Message: undefined,
2966
- Reason: undefined,
2967
- };
2308
+ const contents = {};
2968
2309
  const data = parsedOutput.body;
2969
2310
  if (data.Fields !== undefined && data.Fields !== null) {
2970
2311
  contents.Fields = deserializeAws_restJson1ValidationExceptionFields(data.Fields, context);
@@ -2975,7 +2316,11 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
2975
2316
  if (data.Reason !== undefined && data.Reason !== null) {
2976
2317
  contents.Reason = smithy_client_1.expectString(data.Reason);
2977
2318
  }
2978
- return contents;
2319
+ const exception = new models_0_1.ValidationException({
2320
+ $metadata: deserializeMetadata(parsedOutput),
2321
+ ...contents,
2322
+ });
2323
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
2979
2324
  };
2980
2325
  const serializeAws_restJson1AccountIdList = (input, context) => {
2981
2326
  return input
@@ -2987,6 +2332,11 @@ const serializeAws_restJson1AccountIdList = (input, context) => {
2987
2332
  return entry;
2988
2333
  });
2989
2334
  };
2335
+ const serializeAws_restJson1AmazonCodeGuruProfilerIntegration = (input, context) => {
2336
+ return {
2337
+ ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
2338
+ };
2339
+ };
2990
2340
  const serializeAws_restJson1CloudFormationCollection = (input, context) => {
2991
2341
  return {
2992
2342
  ...(input.StackNames !== undefined &&
@@ -3040,6 +2390,14 @@ const serializeAws_restJson1EndTimeRange = (input, context) => {
3040
2390
  ...(input.ToTime !== undefined && input.ToTime !== null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }),
3041
2391
  };
3042
2392
  };
2393
+ const serializeAws_restJson1EventSourcesConfig = (input, context) => {
2394
+ return {
2395
+ ...(input.AmazonCodeGuruProfiler !== undefined &&
2396
+ input.AmazonCodeGuruProfiler !== null && {
2397
+ AmazonCodeGuruProfiler: serializeAws_restJson1AmazonCodeGuruProfilerIntegration(input.AmazonCodeGuruProfiler, context),
2398
+ }),
2399
+ };
2400
+ };
3043
2401
  const serializeAws_restJson1EventTimeRange = (input, context) => {
3044
2402
  return {
3045
2403
  ...(input.FromTime !== undefined &&
@@ -3372,7 +2730,7 @@ const deserializeAws_restJson1AccountHealth = (output, context) => {
3372
2730
  };
3373
2731
  };
3374
2732
  const deserializeAws_restJson1AccountHealths = (output, context) => {
3375
- return (output || [])
2733
+ const retVal = (output || [])
3376
2734
  .filter((e) => e != null)
3377
2735
  .map((entry) => {
3378
2736
  if (entry === null) {
@@ -3380,6 +2738,7 @@ const deserializeAws_restJson1AccountHealths = (output, context) => {
3380
2738
  }
3381
2739
  return deserializeAws_restJson1AccountHealth(entry, context);
3382
2740
  });
2741
+ return retVal;
3383
2742
  };
3384
2743
  const deserializeAws_restJson1AccountInsightHealth = (output, context) => {
3385
2744
  return {
@@ -3387,6 +2746,11 @@ const deserializeAws_restJson1AccountInsightHealth = (output, context) => {
3387
2746
  OpenReactiveInsights: smithy_client_1.expectInt32(output.OpenReactiveInsights),
3388
2747
  };
3389
2748
  };
2749
+ const deserializeAws_restJson1AmazonCodeGuruProfilerIntegration = (output, context) => {
2750
+ return {
2751
+ Status: smithy_client_1.expectString(output.Status),
2752
+ };
2753
+ };
3390
2754
  const deserializeAws_restJson1AnomalyReportedTimeRange = (output, context) => {
3391
2755
  return {
3392
2756
  CloseTime: output.CloseTime !== undefined && output.CloseTime !== null
@@ -3404,7 +2768,7 @@ const deserializeAws_restJson1AnomalyResource = (output, context) => {
3404
2768
  };
3405
2769
  };
3406
2770
  const deserializeAws_restJson1AnomalyResources = (output, context) => {
3407
- return (output || [])
2771
+ const retVal = (output || [])
3408
2772
  .filter((e) => e != null)
3409
2773
  .map((entry) => {
3410
2774
  if (entry === null) {
@@ -3412,6 +2776,7 @@ const deserializeAws_restJson1AnomalyResources = (output, context) => {
3412
2776
  }
3413
2777
  return deserializeAws_restJson1AnomalyResource(entry, context);
3414
2778
  });
2779
+ return retVal;
3415
2780
  };
3416
2781
  const deserializeAws_restJson1AnomalySourceDetails = (output, context) => {
3417
2782
  return {
@@ -3423,6 +2788,13 @@ const deserializeAws_restJson1AnomalySourceDetails = (output, context) => {
3423
2788
  : undefined,
3424
2789
  };
3425
2790
  };
2791
+ const deserializeAws_restJson1AnomalySourceMetadata = (output, context) => {
2792
+ return {
2793
+ Source: smithy_client_1.expectString(output.Source),
2794
+ SourceResourceName: smithy_client_1.expectString(output.SourceResourceName),
2795
+ SourceResourceType: smithy_client_1.expectString(output.SourceResourceType),
2796
+ };
2797
+ };
3426
2798
  const deserializeAws_restJson1AnomalyTimeRange = (output, context) => {
3427
2799
  return {
3428
2800
  EndTime: output.EndTime !== undefined && output.EndTime !== null
@@ -3434,7 +2806,7 @@ const deserializeAws_restJson1AnomalyTimeRange = (output, context) => {
3434
2806
  };
3435
2807
  };
3436
2808
  const deserializeAws_restJson1AssociatedResourceArns = (output, context) => {
3437
- return (output || [])
2809
+ const retVal = (output || [])
3438
2810
  .filter((e) => e != null)
3439
2811
  .map((entry) => {
3440
2812
  if (entry === null) {
@@ -3442,9 +2814,10 @@ const deserializeAws_restJson1AssociatedResourceArns = (output, context) => {
3442
2814
  }
3443
2815
  return smithy_client_1.expectString(entry);
3444
2816
  });
2817
+ return retVal;
3445
2818
  };
3446
2819
  const deserializeAws_restJson1Channels = (output, context) => {
3447
- return (output || [])
2820
+ const retVal = (output || [])
3448
2821
  .filter((e) => e != null)
3449
2822
  .map((entry) => {
3450
2823
  if (entry === null) {
@@ -3452,6 +2825,7 @@ const deserializeAws_restJson1Channels = (output, context) => {
3452
2825
  }
3453
2826
  return deserializeAws_restJson1NotificationChannel(entry, context);
3454
2827
  });
2828
+ return retVal;
3455
2829
  };
3456
2830
  const deserializeAws_restJson1CloudFormationCollection = (output, context) => {
3457
2831
  return {
@@ -3483,7 +2857,7 @@ const deserializeAws_restJson1CloudFormationHealth = (output, context) => {
3483
2857
  };
3484
2858
  };
3485
2859
  const deserializeAws_restJson1CloudFormationHealths = (output, context) => {
3486
- return (output || [])
2860
+ const retVal = (output || [])
3487
2861
  .filter((e) => e != null)
3488
2862
  .map((entry) => {
3489
2863
  if (entry === null) {
@@ -3491,6 +2865,7 @@ const deserializeAws_restJson1CloudFormationHealths = (output, context) => {
3491
2865
  }
3492
2866
  return deserializeAws_restJson1CloudFormationHealth(entry, context);
3493
2867
  });
2868
+ return retVal;
3494
2869
  };
3495
2870
  const deserializeAws_restJson1CloudWatchMetricsDataSummary = (output, context) => {
3496
2871
  return {
@@ -3516,7 +2891,7 @@ const deserializeAws_restJson1CloudWatchMetricsDetail = (output, context) => {
3516
2891
  };
3517
2892
  };
3518
2893
  const deserializeAws_restJson1CloudWatchMetricsDetails = (output, context) => {
3519
- return (output || [])
2894
+ const retVal = (output || [])
3520
2895
  .filter((e) => e != null)
3521
2896
  .map((entry) => {
3522
2897
  if (entry === null) {
@@ -3524,6 +2899,7 @@ const deserializeAws_restJson1CloudWatchMetricsDetails = (output, context) => {
3524
2899
  }
3525
2900
  return deserializeAws_restJson1CloudWatchMetricsDetail(entry, context);
3526
2901
  });
2902
+ return retVal;
3527
2903
  };
3528
2904
  const deserializeAws_restJson1CloudWatchMetricsDimension = (output, context) => {
3529
2905
  return {
@@ -3532,7 +2908,7 @@ const deserializeAws_restJson1CloudWatchMetricsDimension = (output, context) =>
3532
2908
  };
3533
2909
  };
3534
2910
  const deserializeAws_restJson1CloudWatchMetricsDimensions = (output, context) => {
3535
- return (output || [])
2911
+ const retVal = (output || [])
3536
2912
  .filter((e) => e != null)
3537
2913
  .map((entry) => {
3538
2914
  if (entry === null) {
@@ -3540,6 +2916,7 @@ const deserializeAws_restJson1CloudWatchMetricsDimensions = (output, context) =>
3540
2916
  }
3541
2917
  return deserializeAws_restJson1CloudWatchMetricsDimension(entry, context);
3542
2918
  });
2919
+ return retVal;
3543
2920
  };
3544
2921
  const deserializeAws_restJson1CostEstimationResourceCollectionFilter = (output, context) => {
3545
2922
  return {
@@ -3552,7 +2929,7 @@ const deserializeAws_restJson1CostEstimationResourceCollectionFilter = (output,
3552
2929
  };
3553
2930
  };
3554
2931
  const deserializeAws_restJson1CostEstimationStackNames = (output, context) => {
3555
- return (output || [])
2932
+ const retVal = (output || [])
3556
2933
  .filter((e) => e != null)
3557
2934
  .map((entry) => {
3558
2935
  if (entry === null) {
@@ -3560,9 +2937,10 @@ const deserializeAws_restJson1CostEstimationStackNames = (output, context) => {
3560
2937
  }
3561
2938
  return smithy_client_1.expectString(entry);
3562
2939
  });
2940
+ return retVal;
3563
2941
  };
3564
2942
  const deserializeAws_restJson1CostEstimationTagValues = (output, context) => {
3565
- return (output || [])
2943
+ const retVal = (output || [])
3566
2944
  .filter((e) => e != null)
3567
2945
  .map((entry) => {
3568
2946
  if (entry === null) {
@@ -3570,6 +2948,7 @@ const deserializeAws_restJson1CostEstimationTagValues = (output, context) => {
3570
2948
  }
3571
2949
  return smithy_client_1.expectString(entry);
3572
2950
  });
2951
+ return retVal;
3573
2952
  };
3574
2953
  const deserializeAws_restJson1CostEstimationTimeRange = (output, context) => {
3575
2954
  return {
@@ -3607,7 +2986,7 @@ const deserializeAws_restJson1EventResource = (output, context) => {
3607
2986
  };
3608
2987
  };
3609
2988
  const deserializeAws_restJson1EventResources = (output, context) => {
3610
- return (output || [])
2989
+ const retVal = (output || [])
3611
2990
  .filter((e) => e != null)
3612
2991
  .map((entry) => {
3613
2992
  if (entry === null) {
@@ -3615,9 +2994,10 @@ const deserializeAws_restJson1EventResources = (output, context) => {
3615
2994
  }
3616
2995
  return deserializeAws_restJson1EventResource(entry, context);
3617
2996
  });
2997
+ return retVal;
3618
2998
  };
3619
2999
  const deserializeAws_restJson1Events = (output, context) => {
3620
- return (output || [])
3000
+ const retVal = (output || [])
3621
3001
  .filter((e) => e != null)
3622
3002
  .map((entry) => {
3623
3003
  if (entry === null) {
@@ -3625,6 +3005,14 @@ const deserializeAws_restJson1Events = (output, context) => {
3625
3005
  }
3626
3006
  return deserializeAws_restJson1Event(entry, context);
3627
3007
  });
3008
+ return retVal;
3009
+ };
3010
+ const deserializeAws_restJson1EventSourcesConfig = (output, context) => {
3011
+ return {
3012
+ AmazonCodeGuruProfiler: output.AmazonCodeGuruProfiler !== undefined && output.AmazonCodeGuruProfiler !== null
3013
+ ? deserializeAws_restJson1AmazonCodeGuruProfilerIntegration(output.AmazonCodeGuruProfiler, context)
3014
+ : undefined,
3015
+ };
3628
3016
  };
3629
3017
  const deserializeAws_restJson1InsightFeedback = (output, context) => {
3630
3018
  return {
@@ -3679,7 +3067,7 @@ const deserializeAws_restJson1PerformanceInsightsMetricDimensionGroup = (output,
3679
3067
  };
3680
3068
  };
3681
3069
  const deserializeAws_restJson1PerformanceInsightsMetricDimensions = (output, context) => {
3682
- return (output || [])
3070
+ const retVal = (output || [])
3683
3071
  .filter((e) => e != null)
3684
3072
  .map((entry) => {
3685
3073
  if (entry === null) {
@@ -3687,6 +3075,7 @@ const deserializeAws_restJson1PerformanceInsightsMetricDimensions = (output, con
3687
3075
  }
3688
3076
  return smithy_client_1.expectString(entry);
3689
3077
  });
3078
+ return retVal;
3690
3079
  };
3691
3080
  const deserializeAws_restJson1PerformanceInsightsMetricFilterMap = (output, context) => {
3692
3081
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -3729,7 +3118,7 @@ const deserializeAws_restJson1PerformanceInsightsMetricsDetail = (output, contex
3729
3118
  };
3730
3119
  };
3731
3120
  const deserializeAws_restJson1PerformanceInsightsMetricsDetails = (output, context) => {
3732
- return (output || [])
3121
+ const retVal = (output || [])
3733
3122
  .filter((e) => e != null)
3734
3123
  .map((entry) => {
3735
3124
  if (entry === null) {
@@ -3737,6 +3126,7 @@ const deserializeAws_restJson1PerformanceInsightsMetricsDetails = (output, conte
3737
3126
  }
3738
3127
  return deserializeAws_restJson1PerformanceInsightsMetricsDetail(entry, context);
3739
3128
  });
3129
+ return retVal;
3740
3130
  };
3741
3131
  const deserializeAws_restJson1PerformanceInsightsReferenceComparisonValues = (output, context) => {
3742
3132
  return {
@@ -3757,7 +3147,7 @@ const deserializeAws_restJson1PerformanceInsightsReferenceData = (output, contex
3757
3147
  };
3758
3148
  };
3759
3149
  const deserializeAws_restJson1PerformanceInsightsReferenceDataList = (output, context) => {
3760
- return (output || [])
3150
+ const retVal = (output || [])
3761
3151
  .filter((e) => e != null)
3762
3152
  .map((entry) => {
3763
3153
  if (entry === null) {
@@ -3765,6 +3155,7 @@ const deserializeAws_restJson1PerformanceInsightsReferenceDataList = (output, co
3765
3155
  }
3766
3156
  return deserializeAws_restJson1PerformanceInsightsReferenceData(entry, context);
3767
3157
  });
3158
+ return retVal;
3768
3159
  };
3769
3160
  const deserializeAws_restJson1PerformanceInsightsReferenceMetric = (output, context) => {
3770
3161
  return {
@@ -3785,7 +3176,7 @@ const deserializeAws_restJson1PerformanceInsightsStat = (output, context) => {
3785
3176
  };
3786
3177
  };
3787
3178
  const deserializeAws_restJson1PerformanceInsightsStats = (output, context) => {
3788
- return (output || [])
3179
+ const retVal = (output || [])
3789
3180
  .filter((e) => e != null)
3790
3181
  .map((entry) => {
3791
3182
  if (entry === null) {
@@ -3793,6 +3184,7 @@ const deserializeAws_restJson1PerformanceInsightsStats = (output, context) => {
3793
3184
  }
3794
3185
  return deserializeAws_restJson1PerformanceInsightsStat(entry, context);
3795
3186
  });
3187
+ return retVal;
3796
3188
  };
3797
3189
  const deserializeAws_restJson1PredictionTimeRange = (output, context) => {
3798
3190
  return {
@@ -3805,7 +3197,7 @@ const deserializeAws_restJson1PredictionTimeRange = (output, context) => {
3805
3197
  };
3806
3198
  };
3807
3199
  const deserializeAws_restJson1ProactiveAnomalies = (output, context) => {
3808
- return (output || [])
3200
+ const retVal = (output || [])
3809
3201
  .filter((e) => e != null)
3810
3202
  .map((entry) => {
3811
3203
  if (entry === null) {
@@ -3813,12 +3205,16 @@ const deserializeAws_restJson1ProactiveAnomalies = (output, context) => {
3813
3205
  }
3814
3206
  return deserializeAws_restJson1ProactiveAnomalySummary(entry, context);
3815
3207
  });
3208
+ return retVal;
3816
3209
  };
3817
3210
  const deserializeAws_restJson1ProactiveAnomaly = (output, context) => {
3818
3211
  return {
3819
3212
  AnomalyReportedTimeRange: output.AnomalyReportedTimeRange !== undefined && output.AnomalyReportedTimeRange !== null
3820
3213
  ? deserializeAws_restJson1AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context)
3821
3214
  : undefined,
3215
+ AnomalyResources: output.AnomalyResources !== undefined && output.AnomalyResources !== null
3216
+ ? deserializeAws_restJson1AnomalyResources(output.AnomalyResources, context)
3217
+ : undefined,
3822
3218
  AnomalyTimeRange: output.AnomalyTimeRange !== undefined && output.AnomalyTimeRange !== null
3823
3219
  ? deserializeAws_restJson1AnomalyTimeRange(output.AnomalyTimeRange, context)
3824
3220
  : undefined,
@@ -3835,6 +3231,9 @@ const deserializeAws_restJson1ProactiveAnomaly = (output, context) => {
3835
3231
  SourceDetails: output.SourceDetails !== undefined && output.SourceDetails !== null
3836
3232
  ? deserializeAws_restJson1AnomalySourceDetails(output.SourceDetails, context)
3837
3233
  : undefined,
3234
+ SourceMetadata: output.SourceMetadata !== undefined && output.SourceMetadata !== null
3235
+ ? deserializeAws_restJson1AnomalySourceMetadata(output.SourceMetadata, context)
3236
+ : undefined,
3838
3237
  Status: smithy_client_1.expectString(output.Status),
3839
3238
  UpdateTime: output.UpdateTime !== undefined && output.UpdateTime !== null
3840
3239
  ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.UpdateTime)))
@@ -3846,6 +3245,9 @@ const deserializeAws_restJson1ProactiveAnomalySummary = (output, context) => {
3846
3245
  AnomalyReportedTimeRange: output.AnomalyReportedTimeRange !== undefined && output.AnomalyReportedTimeRange !== null
3847
3246
  ? deserializeAws_restJson1AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context)
3848
3247
  : undefined,
3248
+ AnomalyResources: output.AnomalyResources !== undefined && output.AnomalyResources !== null
3249
+ ? deserializeAws_restJson1AnomalyResources(output.AnomalyResources, context)
3250
+ : undefined,
3849
3251
  AnomalyTimeRange: output.AnomalyTimeRange !== undefined && output.AnomalyTimeRange !== null
3850
3252
  ? deserializeAws_restJson1AnomalyTimeRange(output.AnomalyTimeRange, context)
3851
3253
  : undefined,
@@ -3862,6 +3264,9 @@ const deserializeAws_restJson1ProactiveAnomalySummary = (output, context) => {
3862
3264
  SourceDetails: output.SourceDetails !== undefined && output.SourceDetails !== null
3863
3265
  ? deserializeAws_restJson1AnomalySourceDetails(output.SourceDetails, context)
3864
3266
  : undefined,
3267
+ SourceMetadata: output.SourceMetadata !== undefined && output.SourceMetadata !== null
3268
+ ? deserializeAws_restJson1AnomalySourceMetadata(output.SourceMetadata, context)
3269
+ : undefined,
3865
3270
  Status: smithy_client_1.expectString(output.Status),
3866
3271
  UpdateTime: output.UpdateTime !== undefined && output.UpdateTime !== null
3867
3272
  ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.UpdateTime)))
@@ -3870,6 +3275,7 @@ const deserializeAws_restJson1ProactiveAnomalySummary = (output, context) => {
3870
3275
  };
3871
3276
  const deserializeAws_restJson1ProactiveInsight = (output, context) => {
3872
3277
  return {
3278
+ Description: smithy_client_1.expectString(output.Description),
3873
3279
  Id: smithy_client_1.expectString(output.Id),
3874
3280
  InsightTimeRange: output.InsightTimeRange !== undefined && output.InsightTimeRange !== null
3875
3281
  ? deserializeAws_restJson1InsightTimeRange(output.InsightTimeRange, context)
@@ -3887,7 +3293,7 @@ const deserializeAws_restJson1ProactiveInsight = (output, context) => {
3887
3293
  };
3888
3294
  };
3889
3295
  const deserializeAws_restJson1ProactiveInsights = (output, context) => {
3890
- return (output || [])
3296
+ const retVal = (output || [])
3891
3297
  .filter((e) => e != null)
3892
3298
  .map((entry) => {
3893
3299
  if (entry === null) {
@@ -3895,6 +3301,7 @@ const deserializeAws_restJson1ProactiveInsights = (output, context) => {
3895
3301
  }
3896
3302
  return deserializeAws_restJson1ProactiveInsightSummary(entry, context);
3897
3303
  });
3304
+ return retVal;
3898
3305
  };
3899
3306
  const deserializeAws_restJson1ProactiveInsightSummary = (output, context) => {
3900
3307
  return {
@@ -3920,7 +3327,7 @@ const deserializeAws_restJson1ProactiveInsightSummary = (output, context) => {
3920
3327
  };
3921
3328
  };
3922
3329
  const deserializeAws_restJson1ProactiveOrganizationInsights = (output, context) => {
3923
- return (output || [])
3330
+ const retVal = (output || [])
3924
3331
  .filter((e) => e != null)
3925
3332
  .map((entry) => {
3926
3333
  if (entry === null) {
@@ -3928,6 +3335,7 @@ const deserializeAws_restJson1ProactiveOrganizationInsights = (output, context)
3928
3335
  }
3929
3336
  return deserializeAws_restJson1ProactiveOrganizationInsightSummary(entry, context);
3930
3337
  });
3338
+ return retVal;
3931
3339
  };
3932
3340
  const deserializeAws_restJson1ProactiveOrganizationInsightSummary = (output, context) => {
3933
3341
  return {
@@ -3952,7 +3360,7 @@ const deserializeAws_restJson1ProactiveOrganizationInsightSummary = (output, con
3952
3360
  };
3953
3361
  };
3954
3362
  const deserializeAws_restJson1ReactiveAnomalies = (output, context) => {
3955
- return (output || [])
3363
+ const retVal = (output || [])
3956
3364
  .filter((e) => e != null)
3957
3365
  .map((entry) => {
3958
3366
  if (entry === null) {
@@ -3960,6 +3368,7 @@ const deserializeAws_restJson1ReactiveAnomalies = (output, context) => {
3960
3368
  }
3961
3369
  return deserializeAws_restJson1ReactiveAnomalySummary(entry, context);
3962
3370
  });
3371
+ return retVal;
3963
3372
  };
3964
3373
  const deserializeAws_restJson1ReactiveAnomaly = (output, context) => {
3965
3374
  return {
@@ -4017,6 +3426,7 @@ const deserializeAws_restJson1ReactiveAnomalySummary = (output, context) => {
4017
3426
  };
4018
3427
  const deserializeAws_restJson1ReactiveInsight = (output, context) => {
4019
3428
  return {
3429
+ Description: smithy_client_1.expectString(output.Description),
4020
3430
  Id: smithy_client_1.expectString(output.Id),
4021
3431
  InsightTimeRange: output.InsightTimeRange !== undefined && output.InsightTimeRange !== null
4022
3432
  ? deserializeAws_restJson1InsightTimeRange(output.InsightTimeRange, context)
@@ -4031,7 +3441,7 @@ const deserializeAws_restJson1ReactiveInsight = (output, context) => {
4031
3441
  };
4032
3442
  };
4033
3443
  const deserializeAws_restJson1ReactiveInsights = (output, context) => {
4034
- return (output || [])
3444
+ const retVal = (output || [])
4035
3445
  .filter((e) => e != null)
4036
3446
  .map((entry) => {
4037
3447
  if (entry === null) {
@@ -4039,6 +3449,7 @@ const deserializeAws_restJson1ReactiveInsights = (output, context) => {
4039
3449
  }
4040
3450
  return deserializeAws_restJson1ReactiveInsightSummary(entry, context);
4041
3451
  });
3452
+ return retVal;
4042
3453
  };
4043
3454
  const deserializeAws_restJson1ReactiveInsightSummary = (output, context) => {
4044
3455
  return {
@@ -4061,7 +3472,7 @@ const deserializeAws_restJson1ReactiveInsightSummary = (output, context) => {
4061
3472
  };
4062
3473
  };
4063
3474
  const deserializeAws_restJson1ReactiveOrganizationInsights = (output, context) => {
4064
- return (output || [])
3475
+ const retVal = (output || [])
4065
3476
  .filter((e) => e != null)
4066
3477
  .map((entry) => {
4067
3478
  if (entry === null) {
@@ -4069,6 +3480,7 @@ const deserializeAws_restJson1ReactiveOrganizationInsights = (output, context) =
4069
3480
  }
4070
3481
  return deserializeAws_restJson1ReactiveOrganizationInsightSummary(entry, context);
4071
3482
  });
3483
+ return retVal;
4072
3484
  };
4073
3485
  const deserializeAws_restJson1ReactiveOrganizationInsightSummary = (output, context) => {
4074
3486
  return {
@@ -4091,6 +3503,7 @@ const deserializeAws_restJson1ReactiveOrganizationInsightSummary = (output, cont
4091
3503
  };
4092
3504
  const deserializeAws_restJson1Recommendation = (output, context) => {
4093
3505
  return {
3506
+ Category: smithy_client_1.expectString(output.Category),
4094
3507
  Description: smithy_client_1.expectString(output.Description),
4095
3508
  Link: smithy_client_1.expectString(output.Link),
4096
3509
  Name: smithy_client_1.expectString(output.Name),
@@ -4104,7 +3517,7 @@ const deserializeAws_restJson1Recommendation = (output, context) => {
4104
3517
  };
4105
3518
  };
4106
3519
  const deserializeAws_restJson1RecommendationRelatedAnomalies = (output, context) => {
4107
- return (output || [])
3520
+ const retVal = (output || [])
4108
3521
  .filter((e) => e != null)
4109
3522
  .map((entry) => {
4110
3523
  if (entry === null) {
@@ -4112,6 +3525,7 @@ const deserializeAws_restJson1RecommendationRelatedAnomalies = (output, context)
4112
3525
  }
4113
3526
  return deserializeAws_restJson1RecommendationRelatedAnomaly(entry, context);
4114
3527
  });
3528
+ return retVal;
4115
3529
  };
4116
3530
  const deserializeAws_restJson1RecommendationRelatedAnomaly = (output, context) => {
4117
3531
  return {
@@ -4131,7 +3545,7 @@ const deserializeAws_restJson1RecommendationRelatedAnomalyResource = (output, co
4131
3545
  };
4132
3546
  };
4133
3547
  const deserializeAws_restJson1RecommendationRelatedAnomalyResources = (output, context) => {
4134
- return (output || [])
3548
+ const retVal = (output || [])
4135
3549
  .filter((e) => e != null)
4136
3550
  .map((entry) => {
4137
3551
  if (entry === null) {
@@ -4139,6 +3553,7 @@ const deserializeAws_restJson1RecommendationRelatedAnomalyResources = (output, c
4139
3553
  }
4140
3554
  return deserializeAws_restJson1RecommendationRelatedAnomalyResource(entry, context);
4141
3555
  });
3556
+ return retVal;
4142
3557
  };
4143
3558
  const deserializeAws_restJson1RecommendationRelatedAnomalySourceDetail = (output, context) => {
4144
3559
  return {
@@ -4154,7 +3569,7 @@ const deserializeAws_restJson1RecommendationRelatedCloudWatchMetricsSourceDetail
4154
3569
  };
4155
3570
  };
4156
3571
  const deserializeAws_restJson1RecommendationRelatedCloudWatchMetricsSourceDetails = (output, context) => {
4157
- return (output || [])
3572
+ const retVal = (output || [])
4158
3573
  .filter((e) => e != null)
4159
3574
  .map((entry) => {
4160
3575
  if (entry === null) {
@@ -4162,6 +3577,7 @@ const deserializeAws_restJson1RecommendationRelatedCloudWatchMetricsSourceDetail
4162
3577
  }
4163
3578
  return deserializeAws_restJson1RecommendationRelatedCloudWatchMetricsSourceDetail(entry, context);
4164
3579
  });
3580
+ return retVal;
4165
3581
  };
4166
3582
  const deserializeAws_restJson1RecommendationRelatedEvent = (output, context) => {
4167
3583
  return {
@@ -4178,7 +3594,7 @@ const deserializeAws_restJson1RecommendationRelatedEventResource = (output, cont
4178
3594
  };
4179
3595
  };
4180
3596
  const deserializeAws_restJson1RecommendationRelatedEventResources = (output, context) => {
4181
- return (output || [])
3597
+ const retVal = (output || [])
4182
3598
  .filter((e) => e != null)
4183
3599
  .map((entry) => {
4184
3600
  if (entry === null) {
@@ -4186,9 +3602,10 @@ const deserializeAws_restJson1RecommendationRelatedEventResources = (output, con
4186
3602
  }
4187
3603
  return deserializeAws_restJson1RecommendationRelatedEventResource(entry, context);
4188
3604
  });
3605
+ return retVal;
4189
3606
  };
4190
3607
  const deserializeAws_restJson1RecommendationRelatedEvents = (output, context) => {
4191
- return (output || [])
3608
+ const retVal = (output || [])
4192
3609
  .filter((e) => e != null)
4193
3610
  .map((entry) => {
4194
3611
  if (entry === null) {
@@ -4196,9 +3613,10 @@ const deserializeAws_restJson1RecommendationRelatedEvents = (output, context) =>
4196
3613
  }
4197
3614
  return deserializeAws_restJson1RecommendationRelatedEvent(entry, context);
4198
3615
  });
3616
+ return retVal;
4199
3617
  };
4200
3618
  const deserializeAws_restJson1Recommendations = (output, context) => {
4201
- return (output || [])
3619
+ const retVal = (output || [])
4202
3620
  .filter((e) => e != null)
4203
3621
  .map((entry) => {
4204
3622
  if (entry === null) {
@@ -4206,9 +3624,10 @@ const deserializeAws_restJson1Recommendations = (output, context) => {
4206
3624
  }
4207
3625
  return deserializeAws_restJson1Recommendation(entry, context);
4208
3626
  });
3627
+ return retVal;
4209
3628
  };
4210
3629
  const deserializeAws_restJson1RelatedAnomalySourceDetails = (output, context) => {
4211
- return (output || [])
3630
+ const retVal = (output || [])
4212
3631
  .filter((e) => e != null)
4213
3632
  .map((entry) => {
4214
3633
  if (entry === null) {
@@ -4216,6 +3635,7 @@ const deserializeAws_restJson1RelatedAnomalySourceDetails = (output, context) =>
4216
3635
  }
4217
3636
  return deserializeAws_restJson1RecommendationRelatedAnomalySourceDetail(entry, context);
4218
3637
  });
3638
+ return retVal;
4219
3639
  };
4220
3640
  const deserializeAws_restJson1ResourceCollection = (output, context) => {
4221
3641
  return {
@@ -4253,7 +3673,7 @@ const deserializeAws_restJson1ServiceHealth = (output, context) => {
4253
3673
  };
4254
3674
  };
4255
3675
  const deserializeAws_restJson1ServiceHealths = (output, context) => {
4256
- return (output || [])
3676
+ const retVal = (output || [])
4257
3677
  .filter((e) => e != null)
4258
3678
  .map((entry) => {
4259
3679
  if (entry === null) {
@@ -4261,6 +3681,7 @@ const deserializeAws_restJson1ServiceHealths = (output, context) => {
4261
3681
  }
4262
3682
  return deserializeAws_restJson1ServiceHealth(entry, context);
4263
3683
  });
3684
+ return retVal;
4264
3685
  };
4265
3686
  const deserializeAws_restJson1ServiceInsightHealth = (output, context) => {
4266
3687
  return {
@@ -4276,7 +3697,7 @@ const deserializeAws_restJson1ServiceIntegrationConfig = (output, context) => {
4276
3697
  };
4277
3698
  };
4278
3699
  const deserializeAws_restJson1ServiceNames = (output, context) => {
4279
- return (output || [])
3700
+ const retVal = (output || [])
4280
3701
  .filter((e) => e != null)
4281
3702
  .map((entry) => {
4282
3703
  if (entry === null) {
@@ -4284,6 +3705,7 @@ const deserializeAws_restJson1ServiceNames = (output, context) => {
4284
3705
  }
4285
3706
  return smithy_client_1.expectString(entry);
4286
3707
  });
3708
+ return retVal;
4287
3709
  };
4288
3710
  const deserializeAws_restJson1ServiceResourceCost = (output, context) => {
4289
3711
  return {
@@ -4295,7 +3717,7 @@ const deserializeAws_restJson1ServiceResourceCost = (output, context) => {
4295
3717
  };
4296
3718
  };
4297
3719
  const deserializeAws_restJson1ServiceResourceCosts = (output, context) => {
4298
- return (output || [])
3720
+ const retVal = (output || [])
4299
3721
  .filter((e) => e != null)
4300
3722
  .map((entry) => {
4301
3723
  if (entry === null) {
@@ -4303,6 +3725,7 @@ const deserializeAws_restJson1ServiceResourceCosts = (output, context) => {
4303
3725
  }
4304
3726
  return deserializeAws_restJson1ServiceResourceCost(entry, context);
4305
3727
  });
3728
+ return retVal;
4306
3729
  };
4307
3730
  const deserializeAws_restJson1SnsChannelConfig = (output, context) => {
4308
3731
  return {
@@ -4310,7 +3733,7 @@ const deserializeAws_restJson1SnsChannelConfig = (output, context) => {
4310
3733
  };
4311
3734
  };
4312
3735
  const deserializeAws_restJson1StackNames = (output, context) => {
4313
- return (output || [])
3736
+ const retVal = (output || [])
4314
3737
  .filter((e) => e != null)
4315
3738
  .map((entry) => {
4316
3739
  if (entry === null) {
@@ -4318,6 +3741,7 @@ const deserializeAws_restJson1StackNames = (output, context) => {
4318
3741
  }
4319
3742
  return smithy_client_1.expectString(entry);
4320
3743
  });
3744
+ return retVal;
4321
3745
  };
4322
3746
  const deserializeAws_restJson1TagCollection = (output, context) => {
4323
3747
  return {
@@ -4336,7 +3760,7 @@ const deserializeAws_restJson1TagCollectionFilter = (output, context) => {
4336
3760
  };
4337
3761
  };
4338
3762
  const deserializeAws_restJson1TagCollectionFilters = (output, context) => {
4339
- return (output || [])
3763
+ const retVal = (output || [])
4340
3764
  .filter((e) => e != null)
4341
3765
  .map((entry) => {
4342
3766
  if (entry === null) {
@@ -4344,9 +3768,10 @@ const deserializeAws_restJson1TagCollectionFilters = (output, context) => {
4344
3768
  }
4345
3769
  return deserializeAws_restJson1TagCollectionFilter(entry, context);
4346
3770
  });
3771
+ return retVal;
4347
3772
  };
4348
3773
  const deserializeAws_restJson1TagCollections = (output, context) => {
4349
- return (output || [])
3774
+ const retVal = (output || [])
4350
3775
  .filter((e) => e != null)
4351
3776
  .map((entry) => {
4352
3777
  if (entry === null) {
@@ -4354,6 +3779,7 @@ const deserializeAws_restJson1TagCollections = (output, context) => {
4354
3779
  }
4355
3780
  return deserializeAws_restJson1TagCollection(entry, context);
4356
3781
  });
3782
+ return retVal;
4357
3783
  };
4358
3784
  const deserializeAws_restJson1TagCostEstimationResourceCollectionFilter = (output, context) => {
4359
3785
  return {
@@ -4364,7 +3790,7 @@ const deserializeAws_restJson1TagCostEstimationResourceCollectionFilter = (outpu
4364
3790
  };
4365
3791
  };
4366
3792
  const deserializeAws_restJson1TagCostEstimationResourceCollectionFilters = (output, context) => {
4367
- return (output || [])
3793
+ const retVal = (output || [])
4368
3794
  .filter((e) => e != null)
4369
3795
  .map((entry) => {
4370
3796
  if (entry === null) {
@@ -4372,6 +3798,7 @@ const deserializeAws_restJson1TagCostEstimationResourceCollectionFilters = (outp
4372
3798
  }
4373
3799
  return deserializeAws_restJson1TagCostEstimationResourceCollectionFilter(entry, context);
4374
3800
  });
3801
+ return retVal;
4375
3802
  };
4376
3803
  const deserializeAws_restJson1TagHealth = (output, context) => {
4377
3804
  return {
@@ -4383,7 +3810,7 @@ const deserializeAws_restJson1TagHealth = (output, context) => {
4383
3810
  };
4384
3811
  };
4385
3812
  const deserializeAws_restJson1TagHealths = (output, context) => {
4386
- return (output || [])
3813
+ const retVal = (output || [])
4387
3814
  .filter((e) => e != null)
4388
3815
  .map((entry) => {
4389
3816
  if (entry === null) {
@@ -4391,9 +3818,10 @@ const deserializeAws_restJson1TagHealths = (output, context) => {
4391
3818
  }
4392
3819
  return deserializeAws_restJson1TagHealth(entry, context);
4393
3820
  });
3821
+ return retVal;
4394
3822
  };
4395
3823
  const deserializeAws_restJson1TagValues = (output, context) => {
4396
- return (output || [])
3824
+ const retVal = (output || [])
4397
3825
  .filter((e) => e != null)
4398
3826
  .map((entry) => {
4399
3827
  if (entry === null) {
@@ -4401,6 +3829,7 @@ const deserializeAws_restJson1TagValues = (output, context) => {
4401
3829
  }
4402
3830
  return smithy_client_1.expectString(entry);
4403
3831
  });
3832
+ return retVal;
4404
3833
  };
4405
3834
  const deserializeAws_restJson1TimestampMetricValuePair = (output, context) => {
4406
3835
  return {
@@ -4411,7 +3840,7 @@ const deserializeAws_restJson1TimestampMetricValuePair = (output, context) => {
4411
3840
  };
4412
3841
  };
4413
3842
  const deserializeAws_restJson1TimestampMetricValuePairList = (output, context) => {
4414
- return (output || [])
3843
+ const retVal = (output || [])
4415
3844
  .filter((e) => e != null)
4416
3845
  .map((entry) => {
4417
3846
  if (entry === null) {
@@ -4419,6 +3848,7 @@ const deserializeAws_restJson1TimestampMetricValuePairList = (output, context) =
4419
3848
  }
4420
3849
  return deserializeAws_restJson1TimestampMetricValuePair(entry, context);
4421
3850
  });
3851
+ return retVal;
4422
3852
  };
4423
3853
  const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
4424
3854
  return {
@@ -4427,7 +3857,7 @@ const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
4427
3857
  };
4428
3858
  };
4429
3859
  const deserializeAws_restJson1ValidationExceptionFields = (output, context) => {
4430
- return (output || [])
3860
+ const retVal = (output || [])
4431
3861
  .filter((e) => e != null)
4432
3862
  .map((entry) => {
4433
3863
  if (entry === null) {
@@ -4435,6 +3865,7 @@ const deserializeAws_restJson1ValidationExceptionFields = (output, context) => {
4435
3865
  }
4436
3866
  return deserializeAws_restJson1ValidationExceptionField(entry, context);
4437
3867
  });
3868
+ return retVal;
4438
3869
  };
4439
3870
  const deserializeMetadata = (output) => {
4440
3871
  var _a;