@aws-sdk/client-devops-guru 3.133.0 → 3.142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist-cjs/commands/AddNotificationChannelCommand.js +2 -2
  4. package/dist-cjs/commands/DeleteInsightCommand.js +2 -2
  5. package/dist-cjs/commands/DescribeAccountHealthCommand.js +2 -2
  6. package/dist-cjs/commands/DescribeAccountOverviewCommand.js +2 -2
  7. package/dist-cjs/commands/DescribeAnomalyCommand.js +2 -2
  8. package/dist-cjs/commands/DescribeEventSourcesConfigCommand.js +2 -2
  9. package/dist-cjs/commands/DescribeFeedbackCommand.js +2 -2
  10. package/dist-cjs/commands/DescribeInsightCommand.js +2 -2
  11. package/dist-cjs/commands/DescribeOrganizationHealthCommand.js +2 -2
  12. package/dist-cjs/commands/DescribeOrganizationOverviewCommand.js +2 -2
  13. package/dist-cjs/commands/DescribeOrganizationResourceCollectionHealthCommand.js +2 -2
  14. package/dist-cjs/commands/DescribeResourceCollectionHealthCommand.js +2 -2
  15. package/dist-cjs/commands/DescribeServiceIntegrationCommand.js +2 -2
  16. package/dist-cjs/commands/GetCostEstimationCommand.js +2 -2
  17. package/dist-cjs/commands/GetResourceCollectionCommand.js +2 -2
  18. package/dist-cjs/commands/ListAnomaliesForInsightCommand.js +2 -2
  19. package/dist-cjs/commands/ListAnomalousLogGroupsCommand.js +2 -2
  20. package/dist-cjs/commands/ListEventsCommand.js +2 -2
  21. package/dist-cjs/commands/ListInsightsCommand.js +2 -2
  22. package/dist-cjs/commands/ListMonitoredResourcesCommand.js +2 -2
  23. package/dist-cjs/commands/ListNotificationChannelsCommand.js +2 -2
  24. package/dist-cjs/commands/ListOrganizationInsightsCommand.js +2 -2
  25. package/dist-cjs/commands/ListRecommendationsCommand.js +2 -2
  26. package/dist-cjs/commands/PutFeedbackCommand.js +2 -2
  27. package/dist-cjs/commands/RemoveNotificationChannelCommand.js +2 -2
  28. package/dist-cjs/commands/SearchInsightsCommand.js +2 -2
  29. package/dist-cjs/commands/SearchOrganizationInsightsCommand.js +2 -2
  30. package/dist-cjs/commands/StartCostEstimationCommand.js +2 -2
  31. package/dist-cjs/commands/UpdateEventSourcesConfigCommand.js +2 -2
  32. package/dist-cjs/commands/UpdateResourceCollectionCommand.js +2 -2
  33. package/dist-cjs/commands/UpdateServiceIntegrationCommand.js +2 -2
  34. package/dist-cjs/models/models_0.js +604 -904
  35. package/dist-cjs/protocols/Aws_restJson1.js +367 -636
  36. package/dist-es/commands/AddNotificationChannelCommand.js +3 -3
  37. package/dist-es/commands/DeleteInsightCommand.js +3 -3
  38. package/dist-es/commands/DescribeAccountHealthCommand.js +3 -3
  39. package/dist-es/commands/DescribeAccountOverviewCommand.js +3 -3
  40. package/dist-es/commands/DescribeAnomalyCommand.js +3 -3
  41. package/dist-es/commands/DescribeEventSourcesConfigCommand.js +3 -3
  42. package/dist-es/commands/DescribeFeedbackCommand.js +3 -3
  43. package/dist-es/commands/DescribeInsightCommand.js +3 -3
  44. package/dist-es/commands/DescribeOrganizationHealthCommand.js +3 -3
  45. package/dist-es/commands/DescribeOrganizationOverviewCommand.js +3 -3
  46. package/dist-es/commands/DescribeOrganizationResourceCollectionHealthCommand.js +3 -3
  47. package/dist-es/commands/DescribeResourceCollectionHealthCommand.js +3 -3
  48. package/dist-es/commands/DescribeServiceIntegrationCommand.js +3 -3
  49. package/dist-es/commands/GetCostEstimationCommand.js +3 -3
  50. package/dist-es/commands/GetResourceCollectionCommand.js +3 -3
  51. package/dist-es/commands/ListAnomaliesForInsightCommand.js +3 -3
  52. package/dist-es/commands/ListAnomalousLogGroupsCommand.js +3 -3
  53. package/dist-es/commands/ListEventsCommand.js +3 -3
  54. package/dist-es/commands/ListInsightsCommand.js +3 -3
  55. package/dist-es/commands/ListMonitoredResourcesCommand.js +3 -3
  56. package/dist-es/commands/ListNotificationChannelsCommand.js +3 -3
  57. package/dist-es/commands/ListOrganizationInsightsCommand.js +3 -3
  58. package/dist-es/commands/ListRecommendationsCommand.js +3 -3
  59. package/dist-es/commands/PutFeedbackCommand.js +3 -3
  60. package/dist-es/commands/RemoveNotificationChannelCommand.js +3 -3
  61. package/dist-es/commands/SearchInsightsCommand.js +3 -3
  62. package/dist-es/commands/SearchOrganizationInsightsCommand.js +3 -3
  63. package/dist-es/commands/StartCostEstimationCommand.js +3 -3
  64. package/dist-es/commands/UpdateEventSourcesConfigCommand.js +3 -3
  65. package/dist-es/commands/UpdateResourceCollectionCommand.js +3 -3
  66. package/dist-es/commands/UpdateServiceIntegrationCommand.js +3 -3
  67. package/dist-es/models/models_0.js +150 -600
  68. package/dist-es/protocols/Aws_restJson1.js +468 -634
  69. package/dist-types/models/models_0.d.ts +600 -900
  70. package/dist-types/ts3.4/models/models_0.d.ts +300 -600
  71. package/package.json +6 -6
@@ -32,16 +32,7 @@ const serializeAws_restJson1DeleteInsightCommand = async (input, context) => {
32
32
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
33
  const headers = {};
34
34
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/insights/{Id}";
35
- if (input.Id !== undefined) {
36
- const labelValue = input.Id;
37
- if (labelValue.length <= 0) {
38
- throw new Error("Empty value provided for input HTTP label: Id.");
39
- }
40
- resolvedPath = resolvedPath.replace("{Id}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
41
- }
42
- else {
43
- throw new Error("No value provided for input HTTP label: Id.");
44
- }
35
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
45
36
  let body;
46
37
  return new protocol_http_1.HttpRequest({
47
38
  protocol,
@@ -99,19 +90,10 @@ const serializeAws_restJson1DescribeAnomalyCommand = async (input, context) => {
99
90
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
91
  const headers = {};
101
92
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/anomalies/{Id}";
102
- if (input.Id !== undefined) {
103
- const labelValue = input.Id;
104
- if (labelValue.length <= 0) {
105
- throw new Error("Empty value provided for input HTTP label: Id.");
106
- }
107
- resolvedPath = resolvedPath.replace("{Id}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
108
- }
109
- else {
110
- throw new Error("No value provided for input HTTP label: Id.");
111
- }
112
- const query = {
113
- ...(input.AccountId !== undefined && { AccountId: input.AccountId }),
114
- };
93
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
94
+ const query = map({
95
+ AccountId: [, input.AccountId],
96
+ });
115
97
  let body;
116
98
  return new protocol_http_1.HttpRequest({
117
99
  protocol,
@@ -169,19 +151,10 @@ const serializeAws_restJson1DescribeInsightCommand = async (input, context) => {
169
151
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
170
152
  const headers = {};
171
153
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/insights/{Id}";
172
- if (input.Id !== undefined) {
173
- const labelValue = input.Id;
174
- if (labelValue.length <= 0) {
175
- throw new Error("Empty value provided for input HTTP label: Id.");
176
- }
177
- resolvedPath = resolvedPath.replace("{Id}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
178
- }
179
- else {
180
- throw new Error("No value provided for input HTTP label: Id.");
181
- }
182
- const query = {
183
- ...(input.AccountId !== undefined && { AccountId: input.AccountId }),
184
- };
154
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
155
+ const query = map({
156
+ AccountId: [, input.AccountId],
157
+ });
185
158
  let body;
186
159
  return new protocol_http_1.HttpRequest({
187
160
  protocol,
@@ -279,19 +252,10 @@ const serializeAws_restJson1DescribeResourceCollectionHealthCommand = async (inp
279
252
  const headers = {};
280
253
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
281
254
  "/accounts/health/resource-collection/{ResourceCollectionType}";
282
- if (input.ResourceCollectionType !== undefined) {
283
- const labelValue = input.ResourceCollectionType;
284
- if (labelValue.length <= 0) {
285
- throw new Error("Empty value provided for input HTTP label: ResourceCollectionType.");
286
- }
287
- resolvedPath = resolvedPath.replace("{ResourceCollectionType}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
288
- }
289
- else {
290
- throw new Error("No value provided for input HTTP label: ResourceCollectionType.");
291
- }
292
- const query = {
293
- ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
294
- };
255
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceCollectionType", () => input.ResourceCollectionType, "{ResourceCollectionType}", false);
256
+ const query = map({
257
+ NextToken: [, input.NextToken],
258
+ });
295
259
  let body;
296
260
  return new protocol_http_1.HttpRequest({
297
261
  protocol,
@@ -328,9 +292,9 @@ const serializeAws_restJson1GetCostEstimationCommand = async (input, context) =>
328
292
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
329
293
  const headers = {};
330
294
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/cost-estimation";
331
- const query = {
332
- ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
333
- };
295
+ const query = map({
296
+ NextToken: [, input.NextToken],
297
+ });
334
298
  let body;
335
299
  return new protocol_http_1.HttpRequest({
336
300
  protocol,
@@ -349,19 +313,10 @@ const serializeAws_restJson1GetResourceCollectionCommand = async (input, context
349
313
  const headers = {};
350
314
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
351
315
  "/resource-collections/{ResourceCollectionType}";
352
- if (input.ResourceCollectionType !== undefined) {
353
- const labelValue = input.ResourceCollectionType;
354
- if (labelValue.length <= 0) {
355
- throw new Error("Empty value provided for input HTTP label: ResourceCollectionType.");
356
- }
357
- resolvedPath = resolvedPath.replace("{ResourceCollectionType}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
358
- }
359
- else {
360
- throw new Error("No value provided for input HTTP label: ResourceCollectionType.");
361
- }
362
- const query = {
363
- ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
364
- };
316
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceCollectionType", () => input.ResourceCollectionType, "{ResourceCollectionType}", false);
317
+ const query = map({
318
+ NextToken: [, input.NextToken],
319
+ });
365
320
  let body;
366
321
  return new protocol_http_1.HttpRequest({
367
322
  protocol,
@@ -381,16 +336,7 @@ const serializeAws_restJson1ListAnomaliesForInsightCommand = async (input, conte
381
336
  "content-type": "application/json",
382
337
  };
383
338
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/anomalies/insight/{InsightId}";
384
- if (input.InsightId !== undefined) {
385
- const labelValue = input.InsightId;
386
- if (labelValue.length <= 0) {
387
- throw new Error("Empty value provided for input HTTP label: InsightId.");
388
- }
389
- resolvedPath = resolvedPath.replace("{InsightId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
390
- }
391
- else {
392
- throw new Error("No value provided for input HTTP label: InsightId.");
393
- }
339
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InsightId", () => input.InsightId, "{InsightId}", false);
394
340
  let body;
395
341
  body = JSON.stringify({
396
342
  ...(input.AccountId != null && { AccountId: input.AccountId }),
@@ -611,16 +557,7 @@ const serializeAws_restJson1RemoveNotificationChannelCommand = async (input, con
611
557
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
612
558
  const headers = {};
613
559
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}";
614
- if (input.Id !== undefined) {
615
- const labelValue = input.Id;
616
- if (labelValue.length <= 0) {
617
- throw new Error("Empty value provided for input HTTP label: Id.");
618
- }
619
- resolvedPath = resolvedPath.replace("{Id}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
620
- }
621
- else {
622
- throw new Error("No value provided for input HTTP label: Id.");
623
- }
560
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
624
561
  let body;
625
562
  return new protocol_http_1.HttpRequest({
626
563
  protocol,
@@ -791,15 +728,14 @@ const deserializeAws_restJson1AddNotificationChannelCommand = async (output, con
791
728
  if (output.statusCode !== 200 && output.statusCode >= 300) {
792
729
  return deserializeAws_restJson1AddNotificationChannelCommandError(output, context);
793
730
  }
794
- const contents = {
731
+ const contents = map({
795
732
  $metadata: deserializeMetadata(output),
796
- Id: undefined,
797
- };
733
+ });
798
734
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
799
- if (data.Id !== undefined && data.Id !== null) {
735
+ if (data.Id != null) {
800
736
  contents.Id = (0, smithy_client_1.expectString)(data.Id);
801
737
  }
802
- return Promise.resolve(contents);
738
+ return contents;
803
739
  };
804
740
  exports.deserializeAws_restJson1AddNotificationChannelCommand = deserializeAws_restJson1AddNotificationChannelCommand;
805
741
  const deserializeAws_restJson1AddNotificationChannelCommandError = async (output, context) => {
@@ -807,7 +743,6 @@ const deserializeAws_restJson1AddNotificationChannelCommandError = async (output
807
743
  ...output,
808
744
  body: await parseBody(output.body, context),
809
745
  };
810
- let response;
811
746
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
812
747
  switch (errorCode) {
813
748
  case "AccessDeniedException":
@@ -833,25 +768,23 @@ const deserializeAws_restJson1AddNotificationChannelCommandError = async (output
833
768
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
834
769
  default:
835
770
  const parsedBody = parsedOutput.body;
836
- const $metadata = deserializeMetadata(output);
837
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
838
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
839
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
840
- $fault: "client",
841
- $metadata,
771
+ (0, smithy_client_1.throwDefaultError)({
772
+ output,
773
+ parsedBody,
774
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
775
+ errorCode,
842
776
  });
843
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
844
777
  }
845
778
  };
846
779
  const deserializeAws_restJson1DeleteInsightCommand = async (output, context) => {
847
780
  if (output.statusCode !== 200 && output.statusCode >= 300) {
848
781
  return deserializeAws_restJson1DeleteInsightCommandError(output, context);
849
782
  }
850
- const contents = {
783
+ const contents = map({
851
784
  $metadata: deserializeMetadata(output),
852
- };
785
+ });
853
786
  await collectBody(output.body, context);
854
- return Promise.resolve(contents);
787
+ return contents;
855
788
  };
856
789
  exports.deserializeAws_restJson1DeleteInsightCommand = deserializeAws_restJson1DeleteInsightCommand;
857
790
  const deserializeAws_restJson1DeleteInsightCommandError = async (output, context) => {
@@ -859,7 +792,6 @@ const deserializeAws_restJson1DeleteInsightCommandError = async (output, context
859
792
  ...output,
860
793
  body: await parseBody(output.body, context),
861
794
  };
862
- let response;
863
795
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
864
796
  switch (errorCode) {
865
797
  case "AccessDeniedException":
@@ -882,41 +814,35 @@ const deserializeAws_restJson1DeleteInsightCommandError = async (output, context
882
814
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
883
815
  default:
884
816
  const parsedBody = parsedOutput.body;
885
- const $metadata = deserializeMetadata(output);
886
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
887
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
888
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
889
- $fault: "client",
890
- $metadata,
817
+ (0, smithy_client_1.throwDefaultError)({
818
+ output,
819
+ parsedBody,
820
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
821
+ errorCode,
891
822
  });
892
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
893
823
  }
894
824
  };
895
825
  const deserializeAws_restJson1DescribeAccountHealthCommand = async (output, context) => {
896
826
  if (output.statusCode !== 200 && output.statusCode >= 300) {
897
827
  return deserializeAws_restJson1DescribeAccountHealthCommandError(output, context);
898
828
  }
899
- const contents = {
829
+ const contents = map({
900
830
  $metadata: deserializeMetadata(output),
901
- MetricsAnalyzed: undefined,
902
- OpenProactiveInsights: undefined,
903
- OpenReactiveInsights: undefined,
904
- ResourceHours: undefined,
905
- };
831
+ });
906
832
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
907
- if (data.MetricsAnalyzed !== undefined && data.MetricsAnalyzed !== null) {
833
+ if (data.MetricsAnalyzed != null) {
908
834
  contents.MetricsAnalyzed = (0, smithy_client_1.expectInt32)(data.MetricsAnalyzed);
909
835
  }
910
- if (data.OpenProactiveInsights !== undefined && data.OpenProactiveInsights !== null) {
836
+ if (data.OpenProactiveInsights != null) {
911
837
  contents.OpenProactiveInsights = (0, smithy_client_1.expectInt32)(data.OpenProactiveInsights);
912
838
  }
913
- if (data.OpenReactiveInsights !== undefined && data.OpenReactiveInsights !== null) {
839
+ if (data.OpenReactiveInsights != null) {
914
840
  contents.OpenReactiveInsights = (0, smithy_client_1.expectInt32)(data.OpenReactiveInsights);
915
841
  }
916
- if (data.ResourceHours !== undefined && data.ResourceHours !== null) {
842
+ if (data.ResourceHours != null) {
917
843
  contents.ResourceHours = (0, smithy_client_1.expectLong)(data.ResourceHours);
918
844
  }
919
- return Promise.resolve(contents);
845
+ return contents;
920
846
  };
921
847
  exports.deserializeAws_restJson1DescribeAccountHealthCommand = deserializeAws_restJson1DescribeAccountHealthCommand;
922
848
  const deserializeAws_restJson1DescribeAccountHealthCommandError = async (output, context) => {
@@ -924,7 +850,6 @@ const deserializeAws_restJson1DescribeAccountHealthCommandError = async (output,
924
850
  ...output,
925
851
  body: await parseBody(output.body, context),
926
852
  };
927
- let response;
928
853
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
929
854
  switch (errorCode) {
930
855
  case "AccessDeniedException":
@@ -941,37 +866,32 @@ const deserializeAws_restJson1DescribeAccountHealthCommandError = async (output,
941
866
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
942
867
  default:
943
868
  const parsedBody = parsedOutput.body;
944
- const $metadata = deserializeMetadata(output);
945
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
946
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
947
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
948
- $fault: "client",
949
- $metadata,
869
+ (0, smithy_client_1.throwDefaultError)({
870
+ output,
871
+ parsedBody,
872
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
873
+ errorCode,
950
874
  });
951
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
952
875
  }
953
876
  };
954
877
  const deserializeAws_restJson1DescribeAccountOverviewCommand = async (output, context) => {
955
878
  if (output.statusCode !== 200 && output.statusCode >= 300) {
956
879
  return deserializeAws_restJson1DescribeAccountOverviewCommandError(output, context);
957
880
  }
958
- const contents = {
881
+ const contents = map({
959
882
  $metadata: deserializeMetadata(output),
960
- MeanTimeToRecoverInMilliseconds: undefined,
961
- ProactiveInsights: undefined,
962
- ReactiveInsights: undefined,
963
- };
883
+ });
964
884
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
965
- if (data.MeanTimeToRecoverInMilliseconds !== undefined && data.MeanTimeToRecoverInMilliseconds !== null) {
885
+ if (data.MeanTimeToRecoverInMilliseconds != null) {
966
886
  contents.MeanTimeToRecoverInMilliseconds = (0, smithy_client_1.expectLong)(data.MeanTimeToRecoverInMilliseconds);
967
887
  }
968
- if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
888
+ if (data.ProactiveInsights != null) {
969
889
  contents.ProactiveInsights = (0, smithy_client_1.expectInt32)(data.ProactiveInsights);
970
890
  }
971
- if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
891
+ if (data.ReactiveInsights != null) {
972
892
  contents.ReactiveInsights = (0, smithy_client_1.expectInt32)(data.ReactiveInsights);
973
893
  }
974
- return Promise.resolve(contents);
894
+ return contents;
975
895
  };
976
896
  exports.deserializeAws_restJson1DescribeAccountOverviewCommand = deserializeAws_restJson1DescribeAccountOverviewCommand;
977
897
  const deserializeAws_restJson1DescribeAccountOverviewCommandError = async (output, context) => {
@@ -979,7 +899,6 @@ const deserializeAws_restJson1DescribeAccountOverviewCommandError = async (outpu
979
899
  ...output,
980
900
  body: await parseBody(output.body, context),
981
901
  };
982
- let response;
983
902
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
984
903
  switch (errorCode) {
985
904
  case "AccessDeniedException":
@@ -996,33 +915,29 @@ const deserializeAws_restJson1DescribeAccountOverviewCommandError = async (outpu
996
915
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
997
916
  default:
998
917
  const parsedBody = parsedOutput.body;
999
- const $metadata = deserializeMetadata(output);
1000
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1001
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1002
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1003
- $fault: "client",
1004
- $metadata,
918
+ (0, smithy_client_1.throwDefaultError)({
919
+ output,
920
+ parsedBody,
921
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
922
+ errorCode,
1005
923
  });
1006
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1007
924
  }
1008
925
  };
1009
926
  const deserializeAws_restJson1DescribeAnomalyCommand = async (output, context) => {
1010
927
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1011
928
  return deserializeAws_restJson1DescribeAnomalyCommandError(output, context);
1012
929
  }
1013
- const contents = {
930
+ const contents = map({
1014
931
  $metadata: deserializeMetadata(output),
1015
- ProactiveAnomaly: undefined,
1016
- ReactiveAnomaly: undefined,
1017
- };
932
+ });
1018
933
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1019
- if (data.ProactiveAnomaly !== undefined && data.ProactiveAnomaly !== null) {
934
+ if (data.ProactiveAnomaly != null) {
1020
935
  contents.ProactiveAnomaly = deserializeAws_restJson1ProactiveAnomaly(data.ProactiveAnomaly, context);
1021
936
  }
1022
- if (data.ReactiveAnomaly !== undefined && data.ReactiveAnomaly !== null) {
937
+ if (data.ReactiveAnomaly != null) {
1023
938
  contents.ReactiveAnomaly = deserializeAws_restJson1ReactiveAnomaly(data.ReactiveAnomaly, context);
1024
939
  }
1025
- return Promise.resolve(contents);
940
+ return contents;
1026
941
  };
1027
942
  exports.deserializeAws_restJson1DescribeAnomalyCommand = deserializeAws_restJson1DescribeAnomalyCommand;
1028
943
  const deserializeAws_restJson1DescribeAnomalyCommandError = async (output, context) => {
@@ -1030,7 +945,6 @@ const deserializeAws_restJson1DescribeAnomalyCommandError = async (output, conte
1030
945
  ...output,
1031
946
  body: await parseBody(output.body, context),
1032
947
  };
1033
- let response;
1034
948
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1035
949
  switch (errorCode) {
1036
950
  case "AccessDeniedException":
@@ -1050,29 +964,26 @@ const deserializeAws_restJson1DescribeAnomalyCommandError = async (output, conte
1050
964
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1051
965
  default:
1052
966
  const parsedBody = parsedOutput.body;
1053
- const $metadata = deserializeMetadata(output);
1054
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1055
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1056
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1057
- $fault: "client",
1058
- $metadata,
967
+ (0, smithy_client_1.throwDefaultError)({
968
+ output,
969
+ parsedBody,
970
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
971
+ errorCode,
1059
972
  });
1060
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1061
973
  }
1062
974
  };
1063
975
  const deserializeAws_restJson1DescribeEventSourcesConfigCommand = async (output, context) => {
1064
976
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1065
977
  return deserializeAws_restJson1DescribeEventSourcesConfigCommandError(output, context);
1066
978
  }
1067
- const contents = {
979
+ const contents = map({
1068
980
  $metadata: deserializeMetadata(output),
1069
- EventSources: undefined,
1070
- };
981
+ });
1071
982
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1072
- if (data.EventSources !== undefined && data.EventSources !== null) {
983
+ if (data.EventSources != null) {
1073
984
  contents.EventSources = deserializeAws_restJson1EventSourcesConfig(data.EventSources, context);
1074
985
  }
1075
- return Promise.resolve(contents);
986
+ return contents;
1076
987
  };
1077
988
  exports.deserializeAws_restJson1DescribeEventSourcesConfigCommand = deserializeAws_restJson1DescribeEventSourcesConfigCommand;
1078
989
  const deserializeAws_restJson1DescribeEventSourcesConfigCommandError = async (output, context) => {
@@ -1080,7 +991,6 @@ const deserializeAws_restJson1DescribeEventSourcesConfigCommandError = async (ou
1080
991
  ...output,
1081
992
  body: await parseBody(output.body, context),
1082
993
  };
1083
- let response;
1084
994
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1085
995
  switch (errorCode) {
1086
996
  case "AccessDeniedException":
@@ -1097,29 +1007,26 @@ const deserializeAws_restJson1DescribeEventSourcesConfigCommandError = async (ou
1097
1007
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1098
1008
  default:
1099
1009
  const parsedBody = parsedOutput.body;
1100
- const $metadata = deserializeMetadata(output);
1101
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1102
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1103
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1104
- $fault: "client",
1105
- $metadata,
1010
+ (0, smithy_client_1.throwDefaultError)({
1011
+ output,
1012
+ parsedBody,
1013
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1014
+ errorCode,
1106
1015
  });
1107
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1108
1016
  }
1109
1017
  };
1110
1018
  const deserializeAws_restJson1DescribeFeedbackCommand = async (output, context) => {
1111
1019
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1112
1020
  return deserializeAws_restJson1DescribeFeedbackCommandError(output, context);
1113
1021
  }
1114
- const contents = {
1022
+ const contents = map({
1115
1023
  $metadata: deserializeMetadata(output),
1116
- InsightFeedback: undefined,
1117
- };
1024
+ });
1118
1025
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1119
- if (data.InsightFeedback !== undefined && data.InsightFeedback !== null) {
1026
+ if (data.InsightFeedback != null) {
1120
1027
  contents.InsightFeedback = deserializeAws_restJson1InsightFeedback(data.InsightFeedback, context);
1121
1028
  }
1122
- return Promise.resolve(contents);
1029
+ return contents;
1123
1030
  };
1124
1031
  exports.deserializeAws_restJson1DescribeFeedbackCommand = deserializeAws_restJson1DescribeFeedbackCommand;
1125
1032
  const deserializeAws_restJson1DescribeFeedbackCommandError = async (output, context) => {
@@ -1127,7 +1034,6 @@ const deserializeAws_restJson1DescribeFeedbackCommandError = async (output, cont
1127
1034
  ...output,
1128
1035
  body: await parseBody(output.body, context),
1129
1036
  };
1130
- let response;
1131
1037
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1132
1038
  switch (errorCode) {
1133
1039
  case "AccessDeniedException":
@@ -1147,33 +1053,29 @@ const deserializeAws_restJson1DescribeFeedbackCommandError = async (output, cont
1147
1053
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1148
1054
  default:
1149
1055
  const parsedBody = parsedOutput.body;
1150
- const $metadata = deserializeMetadata(output);
1151
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1152
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1153
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1154
- $fault: "client",
1155
- $metadata,
1056
+ (0, smithy_client_1.throwDefaultError)({
1057
+ output,
1058
+ parsedBody,
1059
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1060
+ errorCode,
1156
1061
  });
1157
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1158
1062
  }
1159
1063
  };
1160
1064
  const deserializeAws_restJson1DescribeInsightCommand = async (output, context) => {
1161
1065
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1162
1066
  return deserializeAws_restJson1DescribeInsightCommandError(output, context);
1163
1067
  }
1164
- const contents = {
1068
+ const contents = map({
1165
1069
  $metadata: deserializeMetadata(output),
1166
- ProactiveInsight: undefined,
1167
- ReactiveInsight: undefined,
1168
- };
1070
+ });
1169
1071
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1170
- if (data.ProactiveInsight !== undefined && data.ProactiveInsight !== null) {
1072
+ if (data.ProactiveInsight != null) {
1171
1073
  contents.ProactiveInsight = deserializeAws_restJson1ProactiveInsight(data.ProactiveInsight, context);
1172
1074
  }
1173
- if (data.ReactiveInsight !== undefined && data.ReactiveInsight !== null) {
1075
+ if (data.ReactiveInsight != null) {
1174
1076
  contents.ReactiveInsight = deserializeAws_restJson1ReactiveInsight(data.ReactiveInsight, context);
1175
1077
  }
1176
- return Promise.resolve(contents);
1078
+ return contents;
1177
1079
  };
1178
1080
  exports.deserializeAws_restJson1DescribeInsightCommand = deserializeAws_restJson1DescribeInsightCommand;
1179
1081
  const deserializeAws_restJson1DescribeInsightCommandError = async (output, context) => {
@@ -1181,7 +1083,6 @@ const deserializeAws_restJson1DescribeInsightCommandError = async (output, conte
1181
1083
  ...output,
1182
1084
  body: await parseBody(output.body, context),
1183
1085
  };
1184
- let response;
1185
1086
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1186
1087
  switch (errorCode) {
1187
1088
  case "AccessDeniedException":
@@ -1201,41 +1102,35 @@ const deserializeAws_restJson1DescribeInsightCommandError = async (output, conte
1201
1102
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1202
1103
  default:
1203
1104
  const parsedBody = parsedOutput.body;
1204
- const $metadata = deserializeMetadata(output);
1205
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1206
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1207
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1208
- $fault: "client",
1209
- $metadata,
1105
+ (0, smithy_client_1.throwDefaultError)({
1106
+ output,
1107
+ parsedBody,
1108
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1109
+ errorCode,
1210
1110
  });
1211
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1212
1111
  }
1213
1112
  };
1214
1113
  const deserializeAws_restJson1DescribeOrganizationHealthCommand = async (output, context) => {
1215
1114
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1216
1115
  return deserializeAws_restJson1DescribeOrganizationHealthCommandError(output, context);
1217
1116
  }
1218
- const contents = {
1117
+ const contents = map({
1219
1118
  $metadata: deserializeMetadata(output),
1220
- MetricsAnalyzed: undefined,
1221
- OpenProactiveInsights: undefined,
1222
- OpenReactiveInsights: undefined,
1223
- ResourceHours: undefined,
1224
- };
1119
+ });
1225
1120
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1226
- if (data.MetricsAnalyzed !== undefined && data.MetricsAnalyzed !== null) {
1121
+ if (data.MetricsAnalyzed != null) {
1227
1122
  contents.MetricsAnalyzed = (0, smithy_client_1.expectInt32)(data.MetricsAnalyzed);
1228
1123
  }
1229
- if (data.OpenProactiveInsights !== undefined && data.OpenProactiveInsights !== null) {
1124
+ if (data.OpenProactiveInsights != null) {
1230
1125
  contents.OpenProactiveInsights = (0, smithy_client_1.expectInt32)(data.OpenProactiveInsights);
1231
1126
  }
1232
- if (data.OpenReactiveInsights !== undefined && data.OpenReactiveInsights !== null) {
1127
+ if (data.OpenReactiveInsights != null) {
1233
1128
  contents.OpenReactiveInsights = (0, smithy_client_1.expectInt32)(data.OpenReactiveInsights);
1234
1129
  }
1235
- if (data.ResourceHours !== undefined && data.ResourceHours !== null) {
1130
+ if (data.ResourceHours != null) {
1236
1131
  contents.ResourceHours = (0, smithy_client_1.expectLong)(data.ResourceHours);
1237
1132
  }
1238
- return Promise.resolve(contents);
1133
+ return contents;
1239
1134
  };
1240
1135
  exports.deserializeAws_restJson1DescribeOrganizationHealthCommand = deserializeAws_restJson1DescribeOrganizationHealthCommand;
1241
1136
  const deserializeAws_restJson1DescribeOrganizationHealthCommandError = async (output, context) => {
@@ -1243,7 +1138,6 @@ const deserializeAws_restJson1DescribeOrganizationHealthCommandError = async (ou
1243
1138
  ...output,
1244
1139
  body: await parseBody(output.body, context),
1245
1140
  };
1246
- let response;
1247
1141
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1248
1142
  switch (errorCode) {
1249
1143
  case "AccessDeniedException":
@@ -1260,33 +1154,29 @@ const deserializeAws_restJson1DescribeOrganizationHealthCommandError = async (ou
1260
1154
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1261
1155
  default:
1262
1156
  const parsedBody = parsedOutput.body;
1263
- const $metadata = deserializeMetadata(output);
1264
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1265
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1266
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1267
- $fault: "client",
1268
- $metadata,
1157
+ (0, smithy_client_1.throwDefaultError)({
1158
+ output,
1159
+ parsedBody,
1160
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1161
+ errorCode,
1269
1162
  });
1270
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1271
1163
  }
1272
1164
  };
1273
1165
  const deserializeAws_restJson1DescribeOrganizationOverviewCommand = async (output, context) => {
1274
1166
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1275
1167
  return deserializeAws_restJson1DescribeOrganizationOverviewCommandError(output, context);
1276
1168
  }
1277
- const contents = {
1169
+ const contents = map({
1278
1170
  $metadata: deserializeMetadata(output),
1279
- ProactiveInsights: undefined,
1280
- ReactiveInsights: undefined,
1281
- };
1171
+ });
1282
1172
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1283
- if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
1173
+ if (data.ProactiveInsights != null) {
1284
1174
  contents.ProactiveInsights = (0, smithy_client_1.expectInt32)(data.ProactiveInsights);
1285
1175
  }
1286
- if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
1176
+ if (data.ReactiveInsights != null) {
1287
1177
  contents.ReactiveInsights = (0, smithy_client_1.expectInt32)(data.ReactiveInsights);
1288
1178
  }
1289
- return Promise.resolve(contents);
1179
+ return contents;
1290
1180
  };
1291
1181
  exports.deserializeAws_restJson1DescribeOrganizationOverviewCommand = deserializeAws_restJson1DescribeOrganizationOverviewCommand;
1292
1182
  const deserializeAws_restJson1DescribeOrganizationOverviewCommandError = async (output, context) => {
@@ -1294,7 +1184,6 @@ const deserializeAws_restJson1DescribeOrganizationOverviewCommandError = async (
1294
1184
  ...output,
1295
1185
  body: await parseBody(output.body, context),
1296
1186
  };
1297
- let response;
1298
1187
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1299
1188
  switch (errorCode) {
1300
1189
  case "AccessDeniedException":
@@ -1311,45 +1200,38 @@ const deserializeAws_restJson1DescribeOrganizationOverviewCommandError = async (
1311
1200
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1312
1201
  default:
1313
1202
  const parsedBody = parsedOutput.body;
1314
- const $metadata = deserializeMetadata(output);
1315
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1316
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1317
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1318
- $fault: "client",
1319
- $metadata,
1203
+ (0, smithy_client_1.throwDefaultError)({
1204
+ output,
1205
+ parsedBody,
1206
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1207
+ errorCode,
1320
1208
  });
1321
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1322
1209
  }
1323
1210
  };
1324
1211
  const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = async (output, context) => {
1325
1212
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1326
1213
  return deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommandError(output, context);
1327
1214
  }
1328
- const contents = {
1215
+ const contents = map({
1329
1216
  $metadata: deserializeMetadata(output),
1330
- Account: undefined,
1331
- CloudFormation: undefined,
1332
- NextToken: undefined,
1333
- Service: undefined,
1334
- Tags: undefined,
1335
- };
1217
+ });
1336
1218
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1337
- if (data.Account !== undefined && data.Account !== null) {
1219
+ if (data.Account != null) {
1338
1220
  contents.Account = deserializeAws_restJson1AccountHealths(data.Account, context);
1339
1221
  }
1340
- if (data.CloudFormation !== undefined && data.CloudFormation !== null) {
1222
+ if (data.CloudFormation != null) {
1341
1223
  contents.CloudFormation = deserializeAws_restJson1CloudFormationHealths(data.CloudFormation, context);
1342
1224
  }
1343
- if (data.NextToken !== undefined && data.NextToken !== null) {
1225
+ if (data.NextToken != null) {
1344
1226
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1345
1227
  }
1346
- if (data.Service !== undefined && data.Service !== null) {
1228
+ if (data.Service != null) {
1347
1229
  contents.Service = deserializeAws_restJson1ServiceHealths(data.Service, context);
1348
1230
  }
1349
- if (data.Tags !== undefined && data.Tags !== null) {
1231
+ if (data.Tags != null) {
1350
1232
  contents.Tags = deserializeAws_restJson1TagHealths(data.Tags, context);
1351
1233
  }
1352
- return Promise.resolve(contents);
1234
+ return contents;
1353
1235
  };
1354
1236
  exports.deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand;
1355
1237
  const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommandError = async (output, context) => {
@@ -1357,7 +1239,6 @@ const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthComman
1357
1239
  ...output,
1358
1240
  body: await parseBody(output.body, context),
1359
1241
  };
1360
- let response;
1361
1242
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1362
1243
  switch (errorCode) {
1363
1244
  case "AccessDeniedException":
@@ -1374,41 +1255,35 @@ const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthComman
1374
1255
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1375
1256
  default:
1376
1257
  const parsedBody = parsedOutput.body;
1377
- const $metadata = deserializeMetadata(output);
1378
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1379
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1380
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1381
- $fault: "client",
1382
- $metadata,
1258
+ (0, smithy_client_1.throwDefaultError)({
1259
+ output,
1260
+ parsedBody,
1261
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1262
+ errorCode,
1383
1263
  });
1384
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1385
1264
  }
1386
1265
  };
1387
1266
  const deserializeAws_restJson1DescribeResourceCollectionHealthCommand = async (output, context) => {
1388
1267
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1389
1268
  return deserializeAws_restJson1DescribeResourceCollectionHealthCommandError(output, context);
1390
1269
  }
1391
- const contents = {
1270
+ const contents = map({
1392
1271
  $metadata: deserializeMetadata(output),
1393
- CloudFormation: undefined,
1394
- NextToken: undefined,
1395
- Service: undefined,
1396
- Tags: undefined,
1397
- };
1272
+ });
1398
1273
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1399
- if (data.CloudFormation !== undefined && data.CloudFormation !== null) {
1274
+ if (data.CloudFormation != null) {
1400
1275
  contents.CloudFormation = deserializeAws_restJson1CloudFormationHealths(data.CloudFormation, context);
1401
1276
  }
1402
- if (data.NextToken !== undefined && data.NextToken !== null) {
1277
+ if (data.NextToken != null) {
1403
1278
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1404
1279
  }
1405
- if (data.Service !== undefined && data.Service !== null) {
1280
+ if (data.Service != null) {
1406
1281
  contents.Service = deserializeAws_restJson1ServiceHealths(data.Service, context);
1407
1282
  }
1408
- if (data.Tags !== undefined && data.Tags !== null) {
1283
+ if (data.Tags != null) {
1409
1284
  contents.Tags = deserializeAws_restJson1TagHealths(data.Tags, context);
1410
1285
  }
1411
- return Promise.resolve(contents);
1286
+ return contents;
1412
1287
  };
1413
1288
  exports.deserializeAws_restJson1DescribeResourceCollectionHealthCommand = deserializeAws_restJson1DescribeResourceCollectionHealthCommand;
1414
1289
  const deserializeAws_restJson1DescribeResourceCollectionHealthCommandError = async (output, context) => {
@@ -1416,7 +1291,6 @@ const deserializeAws_restJson1DescribeResourceCollectionHealthCommandError = asy
1416
1291
  ...output,
1417
1292
  body: await parseBody(output.body, context),
1418
1293
  };
1419
- let response;
1420
1294
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1421
1295
  switch (errorCode) {
1422
1296
  case "AccessDeniedException":
@@ -1433,29 +1307,26 @@ const deserializeAws_restJson1DescribeResourceCollectionHealthCommandError = asy
1433
1307
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1434
1308
  default:
1435
1309
  const parsedBody = parsedOutput.body;
1436
- const $metadata = deserializeMetadata(output);
1437
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1438
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1439
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1440
- $fault: "client",
1441
- $metadata,
1310
+ (0, smithy_client_1.throwDefaultError)({
1311
+ output,
1312
+ parsedBody,
1313
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1314
+ errorCode,
1442
1315
  });
1443
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1444
1316
  }
1445
1317
  };
1446
1318
  const deserializeAws_restJson1DescribeServiceIntegrationCommand = async (output, context) => {
1447
1319
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1448
1320
  return deserializeAws_restJson1DescribeServiceIntegrationCommandError(output, context);
1449
1321
  }
1450
- const contents = {
1322
+ const contents = map({
1451
1323
  $metadata: deserializeMetadata(output),
1452
- ServiceIntegration: undefined,
1453
- };
1324
+ });
1454
1325
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1455
- if (data.ServiceIntegration !== undefined && data.ServiceIntegration !== null) {
1326
+ if (data.ServiceIntegration != null) {
1456
1327
  contents.ServiceIntegration = deserializeAws_restJson1ServiceIntegrationConfig(data.ServiceIntegration, context);
1457
1328
  }
1458
- return Promise.resolve(contents);
1329
+ return contents;
1459
1330
  };
1460
1331
  exports.deserializeAws_restJson1DescribeServiceIntegrationCommand = deserializeAws_restJson1DescribeServiceIntegrationCommand;
1461
1332
  const deserializeAws_restJson1DescribeServiceIntegrationCommandError = async (output, context) => {
@@ -1463,7 +1334,6 @@ const deserializeAws_restJson1DescribeServiceIntegrationCommandError = async (ou
1463
1334
  ...output,
1464
1335
  body: await parseBody(output.body, context),
1465
1336
  };
1466
- let response;
1467
1337
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1468
1338
  switch (errorCode) {
1469
1339
  case "AccessDeniedException":
@@ -1483,49 +1353,41 @@ const deserializeAws_restJson1DescribeServiceIntegrationCommandError = async (ou
1483
1353
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1484
1354
  default:
1485
1355
  const parsedBody = parsedOutput.body;
1486
- const $metadata = deserializeMetadata(output);
1487
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1488
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1489
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1490
- $fault: "client",
1491
- $metadata,
1356
+ (0, smithy_client_1.throwDefaultError)({
1357
+ output,
1358
+ parsedBody,
1359
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1360
+ errorCode,
1492
1361
  });
1493
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1494
1362
  }
1495
1363
  };
1496
1364
  const deserializeAws_restJson1GetCostEstimationCommand = async (output, context) => {
1497
1365
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1498
1366
  return deserializeAws_restJson1GetCostEstimationCommandError(output, context);
1499
1367
  }
1500
- const contents = {
1368
+ const contents = map({
1501
1369
  $metadata: deserializeMetadata(output),
1502
- Costs: undefined,
1503
- NextToken: undefined,
1504
- ResourceCollection: undefined,
1505
- Status: undefined,
1506
- TimeRange: undefined,
1507
- TotalCost: undefined,
1508
- };
1370
+ });
1509
1371
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1510
- if (data.Costs !== undefined && data.Costs !== null) {
1372
+ if (data.Costs != null) {
1511
1373
  contents.Costs = deserializeAws_restJson1ServiceResourceCosts(data.Costs, context);
1512
1374
  }
1513
- if (data.NextToken !== undefined && data.NextToken !== null) {
1375
+ if (data.NextToken != null) {
1514
1376
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1515
1377
  }
1516
- if (data.ResourceCollection !== undefined && data.ResourceCollection !== null) {
1378
+ if (data.ResourceCollection != null) {
1517
1379
  contents.ResourceCollection = deserializeAws_restJson1CostEstimationResourceCollectionFilter(data.ResourceCollection, context);
1518
1380
  }
1519
- if (data.Status !== undefined && data.Status !== null) {
1381
+ if (data.Status != null) {
1520
1382
  contents.Status = (0, smithy_client_1.expectString)(data.Status);
1521
1383
  }
1522
- if (data.TimeRange !== undefined && data.TimeRange !== null) {
1384
+ if (data.TimeRange != null) {
1523
1385
  contents.TimeRange = deserializeAws_restJson1CostEstimationTimeRange(data.TimeRange, context);
1524
1386
  }
1525
- if (data.TotalCost !== undefined && data.TotalCost !== null) {
1387
+ if (data.TotalCost != null) {
1526
1388
  contents.TotalCost = (0, smithy_client_1.limitedParseDouble)(data.TotalCost);
1527
1389
  }
1528
- return Promise.resolve(contents);
1390
+ return contents;
1529
1391
  };
1530
1392
  exports.deserializeAws_restJson1GetCostEstimationCommand = deserializeAws_restJson1GetCostEstimationCommand;
1531
1393
  const deserializeAws_restJson1GetCostEstimationCommandError = async (output, context) => {
@@ -1533,7 +1395,6 @@ const deserializeAws_restJson1GetCostEstimationCommandError = async (output, con
1533
1395
  ...output,
1534
1396
  body: await parseBody(output.body, context),
1535
1397
  };
1536
- let response;
1537
1398
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1538
1399
  switch (errorCode) {
1539
1400
  case "AccessDeniedException":
@@ -1553,33 +1414,29 @@ const deserializeAws_restJson1GetCostEstimationCommandError = async (output, con
1553
1414
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1554
1415
  default:
1555
1416
  const parsedBody = parsedOutput.body;
1556
- const $metadata = deserializeMetadata(output);
1557
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1558
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1559
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1560
- $fault: "client",
1561
- $metadata,
1417
+ (0, smithy_client_1.throwDefaultError)({
1418
+ output,
1419
+ parsedBody,
1420
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1421
+ errorCode,
1562
1422
  });
1563
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1564
1423
  }
1565
1424
  };
1566
1425
  const deserializeAws_restJson1GetResourceCollectionCommand = async (output, context) => {
1567
1426
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1568
1427
  return deserializeAws_restJson1GetResourceCollectionCommandError(output, context);
1569
1428
  }
1570
- const contents = {
1429
+ const contents = map({
1571
1430
  $metadata: deserializeMetadata(output),
1572
- NextToken: undefined,
1573
- ResourceCollection: undefined,
1574
- };
1431
+ });
1575
1432
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1576
- if (data.NextToken !== undefined && data.NextToken !== null) {
1433
+ if (data.NextToken != null) {
1577
1434
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1578
1435
  }
1579
- if (data.ResourceCollection !== undefined && data.ResourceCollection !== null) {
1436
+ if (data.ResourceCollection != null) {
1580
1437
  contents.ResourceCollection = deserializeAws_restJson1ResourceCollectionFilter(data.ResourceCollection, context);
1581
1438
  }
1582
- return Promise.resolve(contents);
1439
+ return contents;
1583
1440
  };
1584
1441
  exports.deserializeAws_restJson1GetResourceCollectionCommand = deserializeAws_restJson1GetResourceCollectionCommand;
1585
1442
  const deserializeAws_restJson1GetResourceCollectionCommandError = async (output, context) => {
@@ -1587,7 +1444,6 @@ const deserializeAws_restJson1GetResourceCollectionCommandError = async (output,
1587
1444
  ...output,
1588
1445
  body: await parseBody(output.body, context),
1589
1446
  };
1590
- let response;
1591
1447
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1592
1448
  switch (errorCode) {
1593
1449
  case "AccessDeniedException":
@@ -1607,37 +1463,32 @@ const deserializeAws_restJson1GetResourceCollectionCommandError = async (output,
1607
1463
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1608
1464
  default:
1609
1465
  const parsedBody = parsedOutput.body;
1610
- const $metadata = deserializeMetadata(output);
1611
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1612
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1613
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1614
- $fault: "client",
1615
- $metadata,
1466
+ (0, smithy_client_1.throwDefaultError)({
1467
+ output,
1468
+ parsedBody,
1469
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1470
+ errorCode,
1616
1471
  });
1617
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1618
1472
  }
1619
1473
  };
1620
1474
  const deserializeAws_restJson1ListAnomaliesForInsightCommand = async (output, context) => {
1621
1475
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1622
1476
  return deserializeAws_restJson1ListAnomaliesForInsightCommandError(output, context);
1623
1477
  }
1624
- const contents = {
1478
+ const contents = map({
1625
1479
  $metadata: deserializeMetadata(output),
1626
- NextToken: undefined,
1627
- ProactiveAnomalies: undefined,
1628
- ReactiveAnomalies: undefined,
1629
- };
1480
+ });
1630
1481
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1631
- if (data.NextToken !== undefined && data.NextToken !== null) {
1482
+ if (data.NextToken != null) {
1632
1483
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1633
1484
  }
1634
- if (data.ProactiveAnomalies !== undefined && data.ProactiveAnomalies !== null) {
1485
+ if (data.ProactiveAnomalies != null) {
1635
1486
  contents.ProactiveAnomalies = deserializeAws_restJson1ProactiveAnomalies(data.ProactiveAnomalies, context);
1636
1487
  }
1637
- if (data.ReactiveAnomalies !== undefined && data.ReactiveAnomalies !== null) {
1488
+ if (data.ReactiveAnomalies != null) {
1638
1489
  contents.ReactiveAnomalies = deserializeAws_restJson1ReactiveAnomalies(data.ReactiveAnomalies, context);
1639
1490
  }
1640
- return Promise.resolve(contents);
1491
+ return contents;
1641
1492
  };
1642
1493
  exports.deserializeAws_restJson1ListAnomaliesForInsightCommand = deserializeAws_restJson1ListAnomaliesForInsightCommand;
1643
1494
  const deserializeAws_restJson1ListAnomaliesForInsightCommandError = async (output, context) => {
@@ -1645,7 +1496,6 @@ const deserializeAws_restJson1ListAnomaliesForInsightCommandError = async (outpu
1645
1496
  ...output,
1646
1497
  body: await parseBody(output.body, context),
1647
1498
  };
1648
- let response;
1649
1499
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1650
1500
  switch (errorCode) {
1651
1501
  case "AccessDeniedException":
@@ -1665,37 +1515,32 @@ const deserializeAws_restJson1ListAnomaliesForInsightCommandError = async (outpu
1665
1515
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1666
1516
  default:
1667
1517
  const parsedBody = parsedOutput.body;
1668
- const $metadata = deserializeMetadata(output);
1669
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1670
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1671
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1672
- $fault: "client",
1673
- $metadata,
1518
+ (0, smithy_client_1.throwDefaultError)({
1519
+ output,
1520
+ parsedBody,
1521
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1522
+ errorCode,
1674
1523
  });
1675
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1676
1524
  }
1677
1525
  };
1678
1526
  const deserializeAws_restJson1ListAnomalousLogGroupsCommand = async (output, context) => {
1679
1527
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1680
1528
  return deserializeAws_restJson1ListAnomalousLogGroupsCommandError(output, context);
1681
1529
  }
1682
- const contents = {
1530
+ const contents = map({
1683
1531
  $metadata: deserializeMetadata(output),
1684
- AnomalousLogGroups: undefined,
1685
- InsightId: undefined,
1686
- NextToken: undefined,
1687
- };
1532
+ });
1688
1533
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1689
- if (data.AnomalousLogGroups !== undefined && data.AnomalousLogGroups !== null) {
1534
+ if (data.AnomalousLogGroups != null) {
1690
1535
  contents.AnomalousLogGroups = deserializeAws_restJson1AnomalousLogGroups(data.AnomalousLogGroups, context);
1691
1536
  }
1692
- if (data.InsightId !== undefined && data.InsightId !== null) {
1537
+ if (data.InsightId != null) {
1693
1538
  contents.InsightId = (0, smithy_client_1.expectString)(data.InsightId);
1694
1539
  }
1695
- if (data.NextToken !== undefined && data.NextToken !== null) {
1540
+ if (data.NextToken != null) {
1696
1541
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1697
1542
  }
1698
- return Promise.resolve(contents);
1543
+ return contents;
1699
1544
  };
1700
1545
  exports.deserializeAws_restJson1ListAnomalousLogGroupsCommand = deserializeAws_restJson1ListAnomalousLogGroupsCommand;
1701
1546
  const deserializeAws_restJson1ListAnomalousLogGroupsCommandError = async (output, context) => {
@@ -1703,7 +1548,6 @@ const deserializeAws_restJson1ListAnomalousLogGroupsCommandError = async (output
1703
1548
  ...output,
1704
1549
  body: await parseBody(output.body, context),
1705
1550
  };
1706
- let response;
1707
1551
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1708
1552
  switch (errorCode) {
1709
1553
  case "AccessDeniedException":
@@ -1723,33 +1567,29 @@ const deserializeAws_restJson1ListAnomalousLogGroupsCommandError = async (output
1723
1567
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1724
1568
  default:
1725
1569
  const parsedBody = parsedOutput.body;
1726
- const $metadata = deserializeMetadata(output);
1727
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1728
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1729
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1730
- $fault: "client",
1731
- $metadata,
1570
+ (0, smithy_client_1.throwDefaultError)({
1571
+ output,
1572
+ parsedBody,
1573
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1574
+ errorCode,
1732
1575
  });
1733
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1734
1576
  }
1735
1577
  };
1736
1578
  const deserializeAws_restJson1ListEventsCommand = async (output, context) => {
1737
1579
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1738
1580
  return deserializeAws_restJson1ListEventsCommandError(output, context);
1739
1581
  }
1740
- const contents = {
1582
+ const contents = map({
1741
1583
  $metadata: deserializeMetadata(output),
1742
- Events: undefined,
1743
- NextToken: undefined,
1744
- };
1584
+ });
1745
1585
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1746
- if (data.Events !== undefined && data.Events !== null) {
1586
+ if (data.Events != null) {
1747
1587
  contents.Events = deserializeAws_restJson1Events(data.Events, context);
1748
1588
  }
1749
- if (data.NextToken !== undefined && data.NextToken !== null) {
1589
+ if (data.NextToken != null) {
1750
1590
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1751
1591
  }
1752
- return Promise.resolve(contents);
1592
+ return contents;
1753
1593
  };
1754
1594
  exports.deserializeAws_restJson1ListEventsCommand = deserializeAws_restJson1ListEventsCommand;
1755
1595
  const deserializeAws_restJson1ListEventsCommandError = async (output, context) => {
@@ -1757,7 +1597,6 @@ const deserializeAws_restJson1ListEventsCommandError = async (output, context) =
1757
1597
  ...output,
1758
1598
  body: await parseBody(output.body, context),
1759
1599
  };
1760
- let response;
1761
1600
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1762
1601
  switch (errorCode) {
1763
1602
  case "AccessDeniedException":
@@ -1777,37 +1616,32 @@ const deserializeAws_restJson1ListEventsCommandError = async (output, context) =
1777
1616
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1778
1617
  default:
1779
1618
  const parsedBody = parsedOutput.body;
1780
- const $metadata = deserializeMetadata(output);
1781
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1782
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1783
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1784
- $fault: "client",
1785
- $metadata,
1619
+ (0, smithy_client_1.throwDefaultError)({
1620
+ output,
1621
+ parsedBody,
1622
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1623
+ errorCode,
1786
1624
  });
1787
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1788
1625
  }
1789
1626
  };
1790
1627
  const deserializeAws_restJson1ListInsightsCommand = async (output, context) => {
1791
1628
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1792
1629
  return deserializeAws_restJson1ListInsightsCommandError(output, context);
1793
1630
  }
1794
- const contents = {
1631
+ const contents = map({
1795
1632
  $metadata: deserializeMetadata(output),
1796
- NextToken: undefined,
1797
- ProactiveInsights: undefined,
1798
- ReactiveInsights: undefined,
1799
- };
1633
+ });
1800
1634
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1801
- if (data.NextToken !== undefined && data.NextToken !== null) {
1635
+ if (data.NextToken != null) {
1802
1636
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1803
1637
  }
1804
- if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
1638
+ if (data.ProactiveInsights != null) {
1805
1639
  contents.ProactiveInsights = deserializeAws_restJson1ProactiveInsights(data.ProactiveInsights, context);
1806
1640
  }
1807
- if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
1641
+ if (data.ReactiveInsights != null) {
1808
1642
  contents.ReactiveInsights = deserializeAws_restJson1ReactiveInsights(data.ReactiveInsights, context);
1809
1643
  }
1810
- return Promise.resolve(contents);
1644
+ return contents;
1811
1645
  };
1812
1646
  exports.deserializeAws_restJson1ListInsightsCommand = deserializeAws_restJson1ListInsightsCommand;
1813
1647
  const deserializeAws_restJson1ListInsightsCommandError = async (output, context) => {
@@ -1815,7 +1649,6 @@ const deserializeAws_restJson1ListInsightsCommandError = async (output, context)
1815
1649
  ...output,
1816
1650
  body: await parseBody(output.body, context),
1817
1651
  };
1818
- let response;
1819
1652
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1820
1653
  switch (errorCode) {
1821
1654
  case "AccessDeniedException":
@@ -1832,33 +1665,29 @@ const deserializeAws_restJson1ListInsightsCommandError = async (output, context)
1832
1665
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1833
1666
  default:
1834
1667
  const parsedBody = parsedOutput.body;
1835
- const $metadata = deserializeMetadata(output);
1836
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1837
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1838
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1839
- $fault: "client",
1840
- $metadata,
1668
+ (0, smithy_client_1.throwDefaultError)({
1669
+ output,
1670
+ parsedBody,
1671
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1672
+ errorCode,
1841
1673
  });
1842
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1843
1674
  }
1844
1675
  };
1845
1676
  const deserializeAws_restJson1ListMonitoredResourcesCommand = async (output, context) => {
1846
1677
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1847
1678
  return deserializeAws_restJson1ListMonitoredResourcesCommandError(output, context);
1848
1679
  }
1849
- const contents = {
1680
+ const contents = map({
1850
1681
  $metadata: deserializeMetadata(output),
1851
- MonitoredResourceIdentifiers: undefined,
1852
- NextToken: undefined,
1853
- };
1682
+ });
1854
1683
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1855
- if (data.MonitoredResourceIdentifiers !== undefined && data.MonitoredResourceIdentifiers !== null) {
1684
+ if (data.MonitoredResourceIdentifiers != null) {
1856
1685
  contents.MonitoredResourceIdentifiers = deserializeAws_restJson1MonitoredResourceIdentifiers(data.MonitoredResourceIdentifiers, context);
1857
1686
  }
1858
- if (data.NextToken !== undefined && data.NextToken !== null) {
1687
+ if (data.NextToken != null) {
1859
1688
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1860
1689
  }
1861
- return Promise.resolve(contents);
1690
+ return contents;
1862
1691
  };
1863
1692
  exports.deserializeAws_restJson1ListMonitoredResourcesCommand = deserializeAws_restJson1ListMonitoredResourcesCommand;
1864
1693
  const deserializeAws_restJson1ListMonitoredResourcesCommandError = async (output, context) => {
@@ -1866,7 +1695,6 @@ const deserializeAws_restJson1ListMonitoredResourcesCommandError = async (output
1866
1695
  ...output,
1867
1696
  body: await parseBody(output.body, context),
1868
1697
  };
1869
- let response;
1870
1698
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1871
1699
  switch (errorCode) {
1872
1700
  case "InternalServerException":
@@ -1883,33 +1711,29 @@ const deserializeAws_restJson1ListMonitoredResourcesCommandError = async (output
1883
1711
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1884
1712
  default:
1885
1713
  const parsedBody = parsedOutput.body;
1886
- const $metadata = deserializeMetadata(output);
1887
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1888
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1889
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1890
- $fault: "client",
1891
- $metadata,
1714
+ (0, smithy_client_1.throwDefaultError)({
1715
+ output,
1716
+ parsedBody,
1717
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1718
+ errorCode,
1892
1719
  });
1893
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1894
1720
  }
1895
1721
  };
1896
1722
  const deserializeAws_restJson1ListNotificationChannelsCommand = async (output, context) => {
1897
1723
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1898
1724
  return deserializeAws_restJson1ListNotificationChannelsCommandError(output, context);
1899
1725
  }
1900
- const contents = {
1726
+ const contents = map({
1901
1727
  $metadata: deserializeMetadata(output),
1902
- Channels: undefined,
1903
- NextToken: undefined,
1904
- };
1728
+ });
1905
1729
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1906
- if (data.Channels !== undefined && data.Channels !== null) {
1730
+ if (data.Channels != null) {
1907
1731
  contents.Channels = deserializeAws_restJson1Channels(data.Channels, context);
1908
1732
  }
1909
- if (data.NextToken !== undefined && data.NextToken !== null) {
1733
+ if (data.NextToken != null) {
1910
1734
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1911
1735
  }
1912
- return Promise.resolve(contents);
1736
+ return contents;
1913
1737
  };
1914
1738
  exports.deserializeAws_restJson1ListNotificationChannelsCommand = deserializeAws_restJson1ListNotificationChannelsCommand;
1915
1739
  const deserializeAws_restJson1ListNotificationChannelsCommandError = async (output, context) => {
@@ -1917,7 +1741,6 @@ const deserializeAws_restJson1ListNotificationChannelsCommandError = async (outp
1917
1741
  ...output,
1918
1742
  body: await parseBody(output.body, context),
1919
1743
  };
1920
- let response;
1921
1744
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1922
1745
  switch (errorCode) {
1923
1746
  case "AccessDeniedException":
@@ -1934,37 +1757,32 @@ const deserializeAws_restJson1ListNotificationChannelsCommandError = async (outp
1934
1757
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1935
1758
  default:
1936
1759
  const parsedBody = parsedOutput.body;
1937
- const $metadata = deserializeMetadata(output);
1938
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1939
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1940
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1941
- $fault: "client",
1942
- $metadata,
1760
+ (0, smithy_client_1.throwDefaultError)({
1761
+ output,
1762
+ parsedBody,
1763
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1764
+ errorCode,
1943
1765
  });
1944
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1945
1766
  }
1946
1767
  };
1947
1768
  const deserializeAws_restJson1ListOrganizationInsightsCommand = async (output, context) => {
1948
1769
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1949
1770
  return deserializeAws_restJson1ListOrganizationInsightsCommandError(output, context);
1950
1771
  }
1951
- const contents = {
1772
+ const contents = map({
1952
1773
  $metadata: deserializeMetadata(output),
1953
- NextToken: undefined,
1954
- ProactiveInsights: undefined,
1955
- ReactiveInsights: undefined,
1956
- };
1774
+ });
1957
1775
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1958
- if (data.NextToken !== undefined && data.NextToken !== null) {
1776
+ if (data.NextToken != null) {
1959
1777
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1960
1778
  }
1961
- if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
1779
+ if (data.ProactiveInsights != null) {
1962
1780
  contents.ProactiveInsights = deserializeAws_restJson1ProactiveOrganizationInsights(data.ProactiveInsights, context);
1963
1781
  }
1964
- if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
1782
+ if (data.ReactiveInsights != null) {
1965
1783
  contents.ReactiveInsights = deserializeAws_restJson1ReactiveOrganizationInsights(data.ReactiveInsights, context);
1966
1784
  }
1967
- return Promise.resolve(contents);
1785
+ return contents;
1968
1786
  };
1969
1787
  exports.deserializeAws_restJson1ListOrganizationInsightsCommand = deserializeAws_restJson1ListOrganizationInsightsCommand;
1970
1788
  const deserializeAws_restJson1ListOrganizationInsightsCommandError = async (output, context) => {
@@ -1972,7 +1790,6 @@ const deserializeAws_restJson1ListOrganizationInsightsCommandError = async (outp
1972
1790
  ...output,
1973
1791
  body: await parseBody(output.body, context),
1974
1792
  };
1975
- let response;
1976
1793
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1977
1794
  switch (errorCode) {
1978
1795
  case "AccessDeniedException":
@@ -1989,33 +1806,29 @@ const deserializeAws_restJson1ListOrganizationInsightsCommandError = async (outp
1989
1806
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1990
1807
  default:
1991
1808
  const parsedBody = parsedOutput.body;
1992
- const $metadata = deserializeMetadata(output);
1993
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1994
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
1995
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1996
- $fault: "client",
1997
- $metadata,
1809
+ (0, smithy_client_1.throwDefaultError)({
1810
+ output,
1811
+ parsedBody,
1812
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1813
+ errorCode,
1998
1814
  });
1999
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2000
1815
  }
2001
1816
  };
2002
1817
  const deserializeAws_restJson1ListRecommendationsCommand = async (output, context) => {
2003
1818
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2004
1819
  return deserializeAws_restJson1ListRecommendationsCommandError(output, context);
2005
1820
  }
2006
- const contents = {
1821
+ const contents = map({
2007
1822
  $metadata: deserializeMetadata(output),
2008
- NextToken: undefined,
2009
- Recommendations: undefined,
2010
- };
1823
+ });
2011
1824
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2012
- if (data.NextToken !== undefined && data.NextToken !== null) {
1825
+ if (data.NextToken != null) {
2013
1826
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2014
1827
  }
2015
- if (data.Recommendations !== undefined && data.Recommendations !== null) {
1828
+ if (data.Recommendations != null) {
2016
1829
  contents.Recommendations = deserializeAws_restJson1Recommendations(data.Recommendations, context);
2017
1830
  }
2018
- return Promise.resolve(contents);
1831
+ return contents;
2019
1832
  };
2020
1833
  exports.deserializeAws_restJson1ListRecommendationsCommand = deserializeAws_restJson1ListRecommendationsCommand;
2021
1834
  const deserializeAws_restJson1ListRecommendationsCommandError = async (output, context) => {
@@ -2023,7 +1836,6 @@ const deserializeAws_restJson1ListRecommendationsCommandError = async (output, c
2023
1836
  ...output,
2024
1837
  body: await parseBody(output.body, context),
2025
1838
  };
2026
- let response;
2027
1839
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2028
1840
  switch (errorCode) {
2029
1841
  case "AccessDeniedException":
@@ -2043,25 +1855,23 @@ const deserializeAws_restJson1ListRecommendationsCommandError = async (output, c
2043
1855
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2044
1856
  default:
2045
1857
  const parsedBody = parsedOutput.body;
2046
- const $metadata = deserializeMetadata(output);
2047
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2048
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2049
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2050
- $fault: "client",
2051
- $metadata,
1858
+ (0, smithy_client_1.throwDefaultError)({
1859
+ output,
1860
+ parsedBody,
1861
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1862
+ errorCode,
2052
1863
  });
2053
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2054
1864
  }
2055
1865
  };
2056
1866
  const deserializeAws_restJson1PutFeedbackCommand = async (output, context) => {
2057
1867
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2058
1868
  return deserializeAws_restJson1PutFeedbackCommandError(output, context);
2059
1869
  }
2060
- const contents = {
1870
+ const contents = map({
2061
1871
  $metadata: deserializeMetadata(output),
2062
- };
1872
+ });
2063
1873
  await collectBody(output.body, context);
2064
- return Promise.resolve(contents);
1874
+ return contents;
2065
1875
  };
2066
1876
  exports.deserializeAws_restJson1PutFeedbackCommand = deserializeAws_restJson1PutFeedbackCommand;
2067
1877
  const deserializeAws_restJson1PutFeedbackCommandError = async (output, context) => {
@@ -2069,7 +1879,6 @@ const deserializeAws_restJson1PutFeedbackCommandError = async (output, context)
2069
1879
  ...output,
2070
1880
  body: await parseBody(output.body, context),
2071
1881
  };
2072
- let response;
2073
1882
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2074
1883
  switch (errorCode) {
2075
1884
  case "AccessDeniedException":
@@ -2092,25 +1901,23 @@ const deserializeAws_restJson1PutFeedbackCommandError = async (output, context)
2092
1901
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2093
1902
  default:
2094
1903
  const parsedBody = parsedOutput.body;
2095
- const $metadata = deserializeMetadata(output);
2096
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2097
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2098
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2099
- $fault: "client",
2100
- $metadata,
1904
+ (0, smithy_client_1.throwDefaultError)({
1905
+ output,
1906
+ parsedBody,
1907
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1908
+ errorCode,
2101
1909
  });
2102
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2103
1910
  }
2104
1911
  };
2105
1912
  const deserializeAws_restJson1RemoveNotificationChannelCommand = async (output, context) => {
2106
1913
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2107
1914
  return deserializeAws_restJson1RemoveNotificationChannelCommandError(output, context);
2108
1915
  }
2109
- const contents = {
1916
+ const contents = map({
2110
1917
  $metadata: deserializeMetadata(output),
2111
- };
1918
+ });
2112
1919
  await collectBody(output.body, context);
2113
- return Promise.resolve(contents);
1920
+ return contents;
2114
1921
  };
2115
1922
  exports.deserializeAws_restJson1RemoveNotificationChannelCommand = deserializeAws_restJson1RemoveNotificationChannelCommand;
2116
1923
  const deserializeAws_restJson1RemoveNotificationChannelCommandError = async (output, context) => {
@@ -2118,7 +1925,6 @@ const deserializeAws_restJson1RemoveNotificationChannelCommandError = async (out
2118
1925
  ...output,
2119
1926
  body: await parseBody(output.body, context),
2120
1927
  };
2121
- let response;
2122
1928
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2123
1929
  switch (errorCode) {
2124
1930
  case "AccessDeniedException":
@@ -2141,37 +1947,32 @@ const deserializeAws_restJson1RemoveNotificationChannelCommandError = async (out
2141
1947
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2142
1948
  default:
2143
1949
  const parsedBody = parsedOutput.body;
2144
- const $metadata = deserializeMetadata(output);
2145
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2146
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2147
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2148
- $fault: "client",
2149
- $metadata,
1950
+ (0, smithy_client_1.throwDefaultError)({
1951
+ output,
1952
+ parsedBody,
1953
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
1954
+ errorCode,
2150
1955
  });
2151
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2152
1956
  }
2153
1957
  };
2154
1958
  const deserializeAws_restJson1SearchInsightsCommand = async (output, context) => {
2155
1959
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2156
1960
  return deserializeAws_restJson1SearchInsightsCommandError(output, context);
2157
1961
  }
2158
- const contents = {
1962
+ const contents = map({
2159
1963
  $metadata: deserializeMetadata(output),
2160
- NextToken: undefined,
2161
- ProactiveInsights: undefined,
2162
- ReactiveInsights: undefined,
2163
- };
1964
+ });
2164
1965
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2165
- if (data.NextToken !== undefined && data.NextToken !== null) {
1966
+ if (data.NextToken != null) {
2166
1967
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2167
1968
  }
2168
- if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
1969
+ if (data.ProactiveInsights != null) {
2169
1970
  contents.ProactiveInsights = deserializeAws_restJson1ProactiveInsights(data.ProactiveInsights, context);
2170
1971
  }
2171
- if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
1972
+ if (data.ReactiveInsights != null) {
2172
1973
  contents.ReactiveInsights = deserializeAws_restJson1ReactiveInsights(data.ReactiveInsights, context);
2173
1974
  }
2174
- return Promise.resolve(contents);
1975
+ return contents;
2175
1976
  };
2176
1977
  exports.deserializeAws_restJson1SearchInsightsCommand = deserializeAws_restJson1SearchInsightsCommand;
2177
1978
  const deserializeAws_restJson1SearchInsightsCommandError = async (output, context) => {
@@ -2179,7 +1980,6 @@ const deserializeAws_restJson1SearchInsightsCommandError = async (output, contex
2179
1980
  ...output,
2180
1981
  body: await parseBody(output.body, context),
2181
1982
  };
2182
- let response;
2183
1983
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2184
1984
  switch (errorCode) {
2185
1985
  case "AccessDeniedException":
@@ -2196,37 +1996,32 @@ const deserializeAws_restJson1SearchInsightsCommandError = async (output, contex
2196
1996
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2197
1997
  default:
2198
1998
  const parsedBody = parsedOutput.body;
2199
- const $metadata = deserializeMetadata(output);
2200
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2201
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2202
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2203
- $fault: "client",
2204
- $metadata,
1999
+ (0, smithy_client_1.throwDefaultError)({
2000
+ output,
2001
+ parsedBody,
2002
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
2003
+ errorCode,
2205
2004
  });
2206
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2207
2005
  }
2208
2006
  };
2209
2007
  const deserializeAws_restJson1SearchOrganizationInsightsCommand = async (output, context) => {
2210
2008
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2211
2009
  return deserializeAws_restJson1SearchOrganizationInsightsCommandError(output, context);
2212
2010
  }
2213
- const contents = {
2011
+ const contents = map({
2214
2012
  $metadata: deserializeMetadata(output),
2215
- NextToken: undefined,
2216
- ProactiveInsights: undefined,
2217
- ReactiveInsights: undefined,
2218
- };
2013
+ });
2219
2014
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2220
- if (data.NextToken !== undefined && data.NextToken !== null) {
2015
+ if (data.NextToken != null) {
2221
2016
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2222
2017
  }
2223
- if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
2018
+ if (data.ProactiveInsights != null) {
2224
2019
  contents.ProactiveInsights = deserializeAws_restJson1ProactiveInsights(data.ProactiveInsights, context);
2225
2020
  }
2226
- if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
2021
+ if (data.ReactiveInsights != null) {
2227
2022
  contents.ReactiveInsights = deserializeAws_restJson1ReactiveInsights(data.ReactiveInsights, context);
2228
2023
  }
2229
- return Promise.resolve(contents);
2024
+ return contents;
2230
2025
  };
2231
2026
  exports.deserializeAws_restJson1SearchOrganizationInsightsCommand = deserializeAws_restJson1SearchOrganizationInsightsCommand;
2232
2027
  const deserializeAws_restJson1SearchOrganizationInsightsCommandError = async (output, context) => {
@@ -2234,7 +2029,6 @@ const deserializeAws_restJson1SearchOrganizationInsightsCommandError = async (ou
2234
2029
  ...output,
2235
2030
  body: await parseBody(output.body, context),
2236
2031
  };
2237
- let response;
2238
2032
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2239
2033
  switch (errorCode) {
2240
2034
  case "AccessDeniedException":
@@ -2251,25 +2045,23 @@ const deserializeAws_restJson1SearchOrganizationInsightsCommandError = async (ou
2251
2045
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2252
2046
  default:
2253
2047
  const parsedBody = parsedOutput.body;
2254
- const $metadata = deserializeMetadata(output);
2255
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2256
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2257
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2258
- $fault: "client",
2259
- $metadata,
2048
+ (0, smithy_client_1.throwDefaultError)({
2049
+ output,
2050
+ parsedBody,
2051
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
2052
+ errorCode,
2260
2053
  });
2261
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2262
2054
  }
2263
2055
  };
2264
2056
  const deserializeAws_restJson1StartCostEstimationCommand = async (output, context) => {
2265
2057
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2266
2058
  return deserializeAws_restJson1StartCostEstimationCommandError(output, context);
2267
2059
  }
2268
- const contents = {
2060
+ const contents = map({
2269
2061
  $metadata: deserializeMetadata(output),
2270
- };
2062
+ });
2271
2063
  await collectBody(output.body, context);
2272
- return Promise.resolve(contents);
2064
+ return contents;
2273
2065
  };
2274
2066
  exports.deserializeAws_restJson1StartCostEstimationCommand = deserializeAws_restJson1StartCostEstimationCommand;
2275
2067
  const deserializeAws_restJson1StartCostEstimationCommandError = async (output, context) => {
@@ -2277,7 +2069,6 @@ const deserializeAws_restJson1StartCostEstimationCommandError = async (output, c
2277
2069
  ...output,
2278
2070
  body: await parseBody(output.body, context),
2279
2071
  };
2280
- let response;
2281
2072
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2282
2073
  switch (errorCode) {
2283
2074
  case "AccessDeniedException":
@@ -2300,25 +2091,23 @@ const deserializeAws_restJson1StartCostEstimationCommandError = async (output, c
2300
2091
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2301
2092
  default:
2302
2093
  const parsedBody = parsedOutput.body;
2303
- const $metadata = deserializeMetadata(output);
2304
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2305
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2306
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2307
- $fault: "client",
2308
- $metadata,
2094
+ (0, smithy_client_1.throwDefaultError)({
2095
+ output,
2096
+ parsedBody,
2097
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
2098
+ errorCode,
2309
2099
  });
2310
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2311
2100
  }
2312
2101
  };
2313
2102
  const deserializeAws_restJson1UpdateEventSourcesConfigCommand = async (output, context) => {
2314
2103
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2315
2104
  return deserializeAws_restJson1UpdateEventSourcesConfigCommandError(output, context);
2316
2105
  }
2317
- const contents = {
2106
+ const contents = map({
2318
2107
  $metadata: deserializeMetadata(output),
2319
- };
2108
+ });
2320
2109
  await collectBody(output.body, context);
2321
- return Promise.resolve(contents);
2110
+ return contents;
2322
2111
  };
2323
2112
  exports.deserializeAws_restJson1UpdateEventSourcesConfigCommand = deserializeAws_restJson1UpdateEventSourcesConfigCommand;
2324
2113
  const deserializeAws_restJson1UpdateEventSourcesConfigCommandError = async (output, context) => {
@@ -2326,7 +2115,6 @@ const deserializeAws_restJson1UpdateEventSourcesConfigCommandError = async (outp
2326
2115
  ...output,
2327
2116
  body: await parseBody(output.body, context),
2328
2117
  };
2329
- let response;
2330
2118
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2331
2119
  switch (errorCode) {
2332
2120
  case "AccessDeniedException":
@@ -2343,25 +2131,23 @@ const deserializeAws_restJson1UpdateEventSourcesConfigCommandError = async (outp
2343
2131
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2344
2132
  default:
2345
2133
  const parsedBody = parsedOutput.body;
2346
- const $metadata = deserializeMetadata(output);
2347
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2348
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2349
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2350
- $fault: "client",
2351
- $metadata,
2134
+ (0, smithy_client_1.throwDefaultError)({
2135
+ output,
2136
+ parsedBody,
2137
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
2138
+ errorCode,
2352
2139
  });
2353
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2354
2140
  }
2355
2141
  };
2356
2142
  const deserializeAws_restJson1UpdateResourceCollectionCommand = async (output, context) => {
2357
2143
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2358
2144
  return deserializeAws_restJson1UpdateResourceCollectionCommandError(output, context);
2359
2145
  }
2360
- const contents = {
2146
+ const contents = map({
2361
2147
  $metadata: deserializeMetadata(output),
2362
- };
2148
+ });
2363
2149
  await collectBody(output.body, context);
2364
- return Promise.resolve(contents);
2150
+ return contents;
2365
2151
  };
2366
2152
  exports.deserializeAws_restJson1UpdateResourceCollectionCommand = deserializeAws_restJson1UpdateResourceCollectionCommand;
2367
2153
  const deserializeAws_restJson1UpdateResourceCollectionCommandError = async (output, context) => {
@@ -2369,7 +2155,6 @@ const deserializeAws_restJson1UpdateResourceCollectionCommandError = async (outp
2369
2155
  ...output,
2370
2156
  body: await parseBody(output.body, context),
2371
2157
  };
2372
- let response;
2373
2158
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2374
2159
  switch (errorCode) {
2375
2160
  case "AccessDeniedException":
@@ -2389,25 +2174,23 @@ const deserializeAws_restJson1UpdateResourceCollectionCommandError = async (outp
2389
2174
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2390
2175
  default:
2391
2176
  const parsedBody = parsedOutput.body;
2392
- const $metadata = deserializeMetadata(output);
2393
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2394
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2395
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2396
- $fault: "client",
2397
- $metadata,
2177
+ (0, smithy_client_1.throwDefaultError)({
2178
+ output,
2179
+ parsedBody,
2180
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
2181
+ errorCode,
2398
2182
  });
2399
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2400
2183
  }
2401
2184
  };
2402
2185
  const deserializeAws_restJson1UpdateServiceIntegrationCommand = async (output, context) => {
2403
2186
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2404
2187
  return deserializeAws_restJson1UpdateServiceIntegrationCommandError(output, context);
2405
2188
  }
2406
- const contents = {
2189
+ const contents = map({
2407
2190
  $metadata: deserializeMetadata(output),
2408
- };
2191
+ });
2409
2192
  await collectBody(output.body, context);
2410
- return Promise.resolve(contents);
2193
+ return contents;
2411
2194
  };
2412
2195
  exports.deserializeAws_restJson1UpdateServiceIntegrationCommand = deserializeAws_restJson1UpdateServiceIntegrationCommand;
2413
2196
  const deserializeAws_restJson1UpdateServiceIntegrationCommandError = async (output, context) => {
@@ -2415,7 +2198,6 @@ const deserializeAws_restJson1UpdateServiceIntegrationCommandError = async (outp
2415
2198
  ...output,
2416
2199
  body: await parseBody(output.body, context),
2417
2200
  };
2418
- let response;
2419
2201
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2420
2202
  switch (errorCode) {
2421
2203
  case "AccessDeniedException":
@@ -2435,20 +2217,19 @@ const deserializeAws_restJson1UpdateServiceIntegrationCommandError = async (outp
2435
2217
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2436
2218
  default:
2437
2219
  const parsedBody = parsedOutput.body;
2438
- const $metadata = deserializeMetadata(output);
2439
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2440
- response = new DevOpsGuruServiceException_1.DevOpsGuruServiceException({
2441
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2442
- $fault: "client",
2443
- $metadata,
2220
+ (0, smithy_client_1.throwDefaultError)({
2221
+ output,
2222
+ parsedBody,
2223
+ exceptionCtor: DevOpsGuruServiceException_1.DevOpsGuruServiceException,
2224
+ errorCode,
2444
2225
  });
2445
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2446
2226
  }
2447
2227
  };
2228
+ const map = smithy_client_1.map;
2448
2229
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
2449
- const contents = {};
2230
+ const contents = map({});
2450
2231
  const data = parsedOutput.body;
2451
- if (data.Message !== undefined && data.Message !== null) {
2232
+ if (data.Message != null) {
2452
2233
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
2453
2234
  }
2454
2235
  const exception = new models_0_1.AccessDeniedException({
@@ -2458,15 +2239,15 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
2458
2239
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2459
2240
  };
2460
2241
  const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
2461
- const contents = {};
2242
+ const contents = map({});
2462
2243
  const data = parsedOutput.body;
2463
- if (data.Message !== undefined && data.Message !== null) {
2244
+ if (data.Message != null) {
2464
2245
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
2465
2246
  }
2466
- if (data.ResourceId !== undefined && data.ResourceId !== null) {
2247
+ if (data.ResourceId != null) {
2467
2248
  contents.ResourceId = (0, smithy_client_1.expectString)(data.ResourceId);
2468
2249
  }
2469
- if (data.ResourceType !== undefined && data.ResourceType !== null) {
2250
+ if (data.ResourceType != null) {
2470
2251
  contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
2471
2252
  }
2472
2253
  const exception = new models_0_1.ConflictException({
@@ -2476,12 +2257,14 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
2476
2257
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2477
2258
  };
2478
2259
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
2479
- const contents = {};
2480
- if (parsedOutput.headers["retry-after"] !== undefined) {
2481
- contents.RetryAfterSeconds = (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]);
2482
- }
2260
+ const contents = map({
2261
+ RetryAfterSeconds: [
2262
+ () => void 0 !== parsedOutput.headers["retry-after"],
2263
+ () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
2264
+ ],
2265
+ });
2483
2266
  const data = parsedOutput.body;
2484
- if (data.Message !== undefined && data.Message !== null) {
2267
+ if (data.Message != null) {
2485
2268
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
2486
2269
  }
2487
2270
  const exception = new models_0_1.InternalServerException({
@@ -2491,15 +2274,15 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
2491
2274
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2492
2275
  };
2493
2276
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
2494
- const contents = {};
2277
+ const contents = map({});
2495
2278
  const data = parsedOutput.body;
2496
- if (data.Message !== undefined && data.Message !== null) {
2279
+ if (data.Message != null) {
2497
2280
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
2498
2281
  }
2499
- if (data.ResourceId !== undefined && data.ResourceId !== null) {
2282
+ if (data.ResourceId != null) {
2500
2283
  contents.ResourceId = (0, smithy_client_1.expectString)(data.ResourceId);
2501
2284
  }
2502
- if (data.ResourceType !== undefined && data.ResourceType !== null) {
2285
+ if (data.ResourceType != null) {
2503
2286
  contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
2504
2287
  }
2505
2288
  const exception = new models_0_1.ResourceNotFoundException({
@@ -2509,9 +2292,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
2509
2292
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2510
2293
  };
2511
2294
  const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
2512
- const contents = {};
2295
+ const contents = map({});
2513
2296
  const data = parsedOutput.body;
2514
- if (data.Message !== undefined && data.Message !== null) {
2297
+ if (data.Message != null) {
2515
2298
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
2516
2299
  }
2517
2300
  const exception = new models_0_1.ServiceQuotaExceededException({
@@ -2521,18 +2304,20 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
2521
2304
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2522
2305
  };
2523
2306
  const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
2524
- const contents = {};
2525
- if (parsedOutput.headers["retry-after"] !== undefined) {
2526
- contents.RetryAfterSeconds = (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]);
2527
- }
2307
+ const contents = map({
2308
+ RetryAfterSeconds: [
2309
+ () => void 0 !== parsedOutput.headers["retry-after"],
2310
+ () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
2311
+ ],
2312
+ });
2528
2313
  const data = parsedOutput.body;
2529
- if (data.Message !== undefined && data.Message !== null) {
2314
+ if (data.Message != null) {
2530
2315
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
2531
2316
  }
2532
- if (data.QuotaCode !== undefined && data.QuotaCode !== null) {
2317
+ if (data.QuotaCode != null) {
2533
2318
  contents.QuotaCode = (0, smithy_client_1.expectString)(data.QuotaCode);
2534
2319
  }
2535
- if (data.ServiceCode !== undefined && data.ServiceCode !== null) {
2320
+ if (data.ServiceCode != null) {
2536
2321
  contents.ServiceCode = (0, smithy_client_1.expectString)(data.ServiceCode);
2537
2322
  }
2538
2323
  const exception = new models_0_1.ThrottlingException({
@@ -2542,15 +2327,15 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
2542
2327
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2543
2328
  };
2544
2329
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
2545
- const contents = {};
2330
+ const contents = map({});
2546
2331
  const data = parsedOutput.body;
2547
- if (data.Fields !== undefined && data.Fields !== null) {
2332
+ if (data.Fields != null) {
2548
2333
  contents.Fields = deserializeAws_restJson1ValidationExceptionFields(data.Fields, context);
2549
2334
  }
2550
- if (data.Message !== undefined && data.Message !== null) {
2335
+ if (data.Message != null) {
2551
2336
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
2552
2337
  }
2553
- if (data.Reason !== undefined && data.Reason !== null) {
2338
+ if (data.Reason != null) {
2554
2339
  contents.Reason = (0, smithy_client_1.expectString)(data.Reason);
2555
2340
  }
2556
2341
  const exception = new models_0_1.ValidationException({
@@ -2563,9 +2348,6 @@ const serializeAws_restJson1AccountIdList = (input, context) => {
2563
2348
  return input
2564
2349
  .filter((e) => e != null)
2565
2350
  .map((entry) => {
2566
- if (entry === null) {
2567
- return null;
2568
- }
2569
2351
  return entry;
2570
2352
  });
2571
2353
  };
@@ -2600,9 +2382,6 @@ const serializeAws_restJson1CostEstimationStackNames = (input, context) => {
2600
2382
  return input
2601
2383
  .filter((e) => e != null)
2602
2384
  .map((entry) => {
2603
- if (entry === null) {
2604
- return null;
2605
- }
2606
2385
  return entry;
2607
2386
  });
2608
2387
  };
@@ -2610,9 +2389,6 @@ const serializeAws_restJson1CostEstimationTagValues = (input, context) => {
2610
2389
  return input
2611
2390
  .filter((e) => e != null)
2612
2391
  .map((entry) => {
2613
- if (entry === null) {
2614
- return null;
2615
- }
2616
2392
  return entry;
2617
2393
  });
2618
2394
  };
@@ -2645,9 +2421,6 @@ const serializeAws_restJson1InsightSeverities = (input, context) => {
2645
2421
  return input
2646
2422
  .filter((e) => e != null)
2647
2423
  .map((entry) => {
2648
- if (entry === null) {
2649
- return null;
2650
- }
2651
2424
  return entry;
2652
2425
  });
2653
2426
  };
@@ -2655,9 +2428,6 @@ const serializeAws_restJson1InsightStatuses = (input, context) => {
2655
2428
  return input
2656
2429
  .filter((e) => e != null)
2657
2430
  .map((entry) => {
2658
- if (entry === null) {
2659
- return null;
2660
- }
2661
2431
  return entry;
2662
2432
  });
2663
2433
  };
@@ -2679,9 +2449,6 @@ const serializeAws_restJson1ListInsightsAccountIdList = (input, context) => {
2679
2449
  return input
2680
2450
  .filter((e) => e != null)
2681
2451
  .map((entry) => {
2682
- if (entry === null) {
2683
- return null;
2684
- }
2685
2452
  return entry;
2686
2453
  });
2687
2454
  };
@@ -2710,9 +2477,6 @@ const serializeAws_restJson1ListInsightsOrganizationalUnitIdList = (input, conte
2710
2477
  return input
2711
2478
  .filter((e) => e != null)
2712
2479
  .map((entry) => {
2713
- if (entry === null) {
2714
- return null;
2715
- }
2716
2480
  return entry;
2717
2481
  });
2718
2482
  };
@@ -2754,9 +2518,6 @@ const serializeAws_restJson1OrganizationalUnitIdList = (input, context) => {
2754
2518
  return input
2755
2519
  .filter((e) => e != null)
2756
2520
  .map((entry) => {
2757
- if (entry === null) {
2758
- return null;
2759
- }
2760
2521
  return entry;
2761
2522
  });
2762
2523
  };
@@ -2772,9 +2533,6 @@ const serializeAws_restJson1ResourceTypeFilters = (input, context) => {
2772
2533
  return input
2773
2534
  .filter((e) => e != null)
2774
2535
  .map((entry) => {
2775
- if (entry === null) {
2776
- return null;
2777
- }
2778
2536
  return entry;
2779
2537
  });
2780
2538
  };
@@ -2782,9 +2540,6 @@ const serializeAws_restJson1SearchInsightsAccountIdList = (input, context) => {
2782
2540
  return input
2783
2541
  .filter((e) => e != null)
2784
2542
  .map((entry) => {
2785
- if (entry === null) {
2786
- return null;
2787
- }
2788
2543
  return entry;
2789
2544
  });
2790
2545
  };
@@ -2823,9 +2578,6 @@ const serializeAws_restJson1ServiceNames = (input, context) => {
2823
2578
  return input
2824
2579
  .filter((e) => e != null)
2825
2580
  .map((entry) => {
2826
- if (entry === null) {
2827
- return null;
2828
- }
2829
2581
  return entry;
2830
2582
  });
2831
2583
  };
@@ -2838,9 +2590,6 @@ const serializeAws_restJson1StackNames = (input, context) => {
2838
2590
  return input
2839
2591
  .filter((e) => e != null)
2840
2592
  .map((entry) => {
2841
- if (entry === null) {
2842
- return null;
2843
- }
2844
2593
  return entry;
2845
2594
  });
2846
2595
  };
@@ -2860,9 +2609,6 @@ const serializeAws_restJson1TagCollections = (input, context) => {
2860
2609
  return input
2861
2610
  .filter((e) => e != null)
2862
2611
  .map((entry) => {
2863
- if (entry === null) {
2864
- return null;
2865
- }
2866
2612
  return serializeAws_restJson1TagCollection(entry, context);
2867
2613
  });
2868
2614
  };
@@ -2878,9 +2624,6 @@ const serializeAws_restJson1TagCostEstimationResourceCollectionFilters = (input,
2878
2624
  return input
2879
2625
  .filter((e) => e != null)
2880
2626
  .map((entry) => {
2881
- if (entry === null) {
2882
- return null;
2883
- }
2884
2627
  return serializeAws_restJson1TagCostEstimationResourceCollectionFilter(entry, context);
2885
2628
  });
2886
2629
  };
@@ -2888,9 +2631,6 @@ const serializeAws_restJson1TagValues = (input, context) => {
2888
2631
  return input
2889
2632
  .filter((e) => e != null)
2890
2633
  .map((entry) => {
2891
- if (entry === null) {
2892
- return null;
2893
- }
2894
2634
  return entry;
2895
2635
  });
2896
2636
  };
@@ -2921,9 +2661,6 @@ const serializeAws_restJson1UpdateStackNames = (input, context) => {
2921
2661
  return input
2922
2662
  .filter((e) => e != null)
2923
2663
  .map((entry) => {
2924
- if (entry === null) {
2925
- return null;
2926
- }
2927
2664
  return entry;
2928
2665
  });
2929
2666
  };
@@ -2937,9 +2674,6 @@ const serializeAws_restJson1UpdateTagCollectionFilters = (input, context) => {
2937
2674
  return input
2938
2675
  .filter((e) => e != null)
2939
2676
  .map((entry) => {
2940
- if (entry === null) {
2941
- return null;
2942
- }
2943
2677
  return serializeAws_restJson1UpdateTagCollectionFilter(entry, context);
2944
2678
  });
2945
2679
  };
@@ -2947,9 +2681,6 @@ const serializeAws_restJson1UpdateTagValues = (input, context) => {
2947
2681
  return input
2948
2682
  .filter((e) => e != null)
2949
2683
  .map((entry) => {
2950
- if (entry === null) {
2951
- return null;
2952
- }
2953
2684
  return entry;
2954
2685
  });
2955
2686
  };