@aws-sdk/client-devops-guru 3.39.0 → 3.43.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 (90) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +14 -16
  3. package/dist-cjs/DevOpsGuru.js +75 -0
  4. package/dist-cjs/commands/DescribeOrganizationHealthCommand.js +36 -0
  5. package/dist-cjs/commands/DescribeOrganizationOverviewCommand.js +36 -0
  6. package/dist-cjs/commands/DescribeOrganizationResourceCollectionHealthCommand.js +36 -0
  7. package/dist-cjs/commands/ListOrganizationInsightsCommand.js +36 -0
  8. package/dist-cjs/commands/SearchOrganizationInsightsCommand.js +36 -0
  9. package/dist-cjs/commands/index.js +5 -0
  10. package/dist-cjs/endpoints.js +74 -5
  11. package/dist-cjs/models/models_0.js +126 -12
  12. package/dist-cjs/pagination/DescribeOrganizationResourceCollectionHealthPaginator.js +34 -0
  13. package/dist-cjs/pagination/ListOrganizationInsightsPaginator.js +35 -0
  14. package/dist-cjs/pagination/SearchOrganizationInsightsPaginator.js +35 -0
  15. package/dist-cjs/pagination/index.js +3 -0
  16. package/dist-cjs/protocols/Aws_restJson1.js +773 -21
  17. package/dist-cjs/runtimeConfig.browser.js +6 -3
  18. package/dist-cjs/runtimeConfig.js +5 -3
  19. package/dist-es/DevOpsGuru.js +75 -0
  20. package/dist-es/commands/DescribeOrganizationHealthCommand.js +39 -0
  21. package/dist-es/commands/DescribeOrganizationOverviewCommand.js +39 -0
  22. package/dist-es/commands/DescribeOrganizationResourceCollectionHealthCommand.js +39 -0
  23. package/dist-es/commands/ListOrganizationInsightsCommand.js +39 -0
  24. package/dist-es/commands/SearchOrganizationInsightsCommand.js +39 -0
  25. package/dist-es/commands/index.js +5 -0
  26. package/dist-es/endpoints.js +74 -5
  27. package/dist-es/models/models_0.js +89 -9
  28. package/dist-es/pagination/DescribeOrganizationResourceCollectionHealthPaginator.js +73 -0
  29. package/dist-es/pagination/ListOrganizationInsightsPaginator.js +74 -0
  30. package/dist-es/pagination/SearchOrganizationInsightsPaginator.js +74 -0
  31. package/dist-es/pagination/index.js +3 -0
  32. package/dist-es/protocols/Aws_restJson1.js +826 -19
  33. package/dist-es/runtimeConfig.browser.js +3 -2
  34. package/dist-es/runtimeConfig.js +3 -3
  35. package/dist-types/DevOpsGuru.d.ts +114 -92
  36. package/dist-types/DevOpsGuruClient.d.ts +27 -16
  37. package/dist-types/commands/AddNotificationChannelCommand.d.ts +5 -7
  38. package/dist-types/commands/DescribeAccountHealthCommand.d.ts +4 -5
  39. package/dist-types/commands/DescribeAccountOverviewCommand.d.ts +4 -5
  40. package/dist-types/commands/DescribeAnomalyCommand.d.ts +2 -4
  41. package/dist-types/commands/DescribeFeedbackCommand.d.ts +2 -3
  42. package/dist-types/commands/DescribeInsightCommand.d.ts +2 -4
  43. package/dist-types/commands/DescribeOrganizationHealthCommand.d.ts +36 -0
  44. package/dist-types/commands/DescribeOrganizationOverviewCommand.d.ts +36 -0
  45. package/dist-types/commands/DescribeOrganizationResourceCollectionHealthCommand.d.ts +37 -0
  46. package/dist-types/commands/DescribeResourceCollectionHealthCommand.d.ts +5 -6
  47. package/dist-types/commands/DescribeServiceIntegrationCommand.d.ts +3 -5
  48. package/dist-types/commands/GetCostEstimationCommand.d.ts +2 -2
  49. package/dist-types/commands/GetResourceCollectionCommand.d.ts +4 -5
  50. package/dist-types/commands/ListAnomaliesForInsightCommand.d.ts +3 -4
  51. package/dist-types/commands/ListEventsCommand.d.ts +3 -4
  52. package/dist-types/commands/ListInsightsCommand.d.ts +4 -5
  53. package/dist-types/commands/ListNotificationChannelsCommand.d.ts +5 -6
  54. package/dist-types/commands/ListOrganizationInsightsCommand.d.ts +35 -0
  55. package/dist-types/commands/ListRecommendationsCommand.d.ts +3 -4
  56. package/dist-types/commands/PutFeedbackCommand.d.ts +2 -4
  57. package/dist-types/commands/RemoveNotificationChannelCommand.d.ts +4 -5
  58. package/dist-types/commands/SearchInsightsCommand.d.ts +9 -10
  59. package/dist-types/commands/SearchOrganizationInsightsCommand.d.ts +42 -0
  60. package/dist-types/commands/StartCostEstimationCommand.d.ts +3 -2
  61. package/dist-types/commands/UpdateResourceCollectionCommand.d.ts +4 -4
  62. package/dist-types/commands/UpdateServiceIntegrationCommand.d.ts +4 -5
  63. package/dist-types/commands/index.d.ts +5 -0
  64. package/dist-types/models/models_0.d.ts +1000 -832
  65. package/dist-types/pagination/DescribeOrganizationResourceCollectionHealthPaginator.d.ts +4 -0
  66. package/dist-types/pagination/ListOrganizationInsightsPaginator.d.ts +4 -0
  67. package/dist-types/pagination/SearchOrganizationInsightsPaginator.d.ts +4 -0
  68. package/dist-types/pagination/index.d.ts +3 -0
  69. package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
  70. package/dist-types/runtimeConfig.browser.d.ts +2 -0
  71. package/dist-types/runtimeConfig.d.ts +2 -0
  72. package/dist-types/runtimeConfig.native.d.ts +2 -0
  73. package/dist-types/ts3.4/DevOpsGuru.d.ts +25 -0
  74. package/dist-types/ts3.4/DevOpsGuruClient.d.ts +11 -2
  75. package/dist-types/ts3.4/commands/DescribeOrganizationHealthCommand.d.ts +17 -0
  76. package/dist-types/ts3.4/commands/DescribeOrganizationOverviewCommand.d.ts +17 -0
  77. package/dist-types/ts3.4/commands/DescribeOrganizationResourceCollectionHealthCommand.d.ts +17 -0
  78. package/dist-types/ts3.4/commands/ListOrganizationInsightsCommand.d.ts +17 -0
  79. package/dist-types/ts3.4/commands/SearchOrganizationInsightsCommand.d.ts +17 -0
  80. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  81. package/dist-types/ts3.4/models/models_0.d.ts +274 -5
  82. package/dist-types/ts3.4/pagination/DescribeOrganizationResourceCollectionHealthPaginator.d.ts +4 -0
  83. package/dist-types/ts3.4/pagination/ListOrganizationInsightsPaginator.d.ts +4 -0
  84. package/dist-types/ts3.4/pagination/SearchOrganizationInsightsPaginator.d.ts +4 -0
  85. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  86. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +15 -0
  87. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  88. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  89. package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  90. package/package.json +23 -23
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1UpdateServiceIntegrationCommand = exports.deserializeAws_restJson1UpdateResourceCollectionCommand = exports.deserializeAws_restJson1StartCostEstimationCommand = exports.deserializeAws_restJson1SearchInsightsCommand = exports.deserializeAws_restJson1RemoveNotificationChannelCommand = exports.deserializeAws_restJson1PutFeedbackCommand = exports.deserializeAws_restJson1ListRecommendationsCommand = exports.deserializeAws_restJson1ListNotificationChannelsCommand = exports.deserializeAws_restJson1ListInsightsCommand = exports.deserializeAws_restJson1ListEventsCommand = exports.deserializeAws_restJson1ListAnomaliesForInsightCommand = exports.deserializeAws_restJson1GetResourceCollectionCommand = exports.deserializeAws_restJson1GetCostEstimationCommand = exports.deserializeAws_restJson1DescribeServiceIntegrationCommand = exports.deserializeAws_restJson1DescribeResourceCollectionHealthCommand = exports.deserializeAws_restJson1DescribeInsightCommand = exports.deserializeAws_restJson1DescribeFeedbackCommand = exports.deserializeAws_restJson1DescribeAnomalyCommand = exports.deserializeAws_restJson1DescribeAccountOverviewCommand = exports.deserializeAws_restJson1DescribeAccountHealthCommand = exports.deserializeAws_restJson1AddNotificationChannelCommand = exports.serializeAws_restJson1UpdateServiceIntegrationCommand = exports.serializeAws_restJson1UpdateResourceCollectionCommand = exports.serializeAws_restJson1StartCostEstimationCommand = exports.serializeAws_restJson1SearchInsightsCommand = exports.serializeAws_restJson1RemoveNotificationChannelCommand = exports.serializeAws_restJson1PutFeedbackCommand = exports.serializeAws_restJson1ListRecommendationsCommand = exports.serializeAws_restJson1ListNotificationChannelsCommand = exports.serializeAws_restJson1ListInsightsCommand = exports.serializeAws_restJson1ListEventsCommand = exports.serializeAws_restJson1ListAnomaliesForInsightCommand = exports.serializeAws_restJson1GetResourceCollectionCommand = exports.serializeAws_restJson1GetCostEstimationCommand = exports.serializeAws_restJson1DescribeServiceIntegrationCommand = exports.serializeAws_restJson1DescribeResourceCollectionHealthCommand = exports.serializeAws_restJson1DescribeInsightCommand = exports.serializeAws_restJson1DescribeFeedbackCommand = exports.serializeAws_restJson1DescribeAnomalyCommand = exports.serializeAws_restJson1DescribeAccountOverviewCommand = exports.serializeAws_restJson1DescribeAccountHealthCommand = exports.serializeAws_restJson1AddNotificationChannelCommand = void 0;
3
+ exports.deserializeAws_restJson1StartCostEstimationCommand = exports.deserializeAws_restJson1SearchOrganizationInsightsCommand = exports.deserializeAws_restJson1SearchInsightsCommand = exports.deserializeAws_restJson1RemoveNotificationChannelCommand = exports.deserializeAws_restJson1PutFeedbackCommand = exports.deserializeAws_restJson1ListRecommendationsCommand = exports.deserializeAws_restJson1ListOrganizationInsightsCommand = exports.deserializeAws_restJson1ListNotificationChannelsCommand = exports.deserializeAws_restJson1ListInsightsCommand = exports.deserializeAws_restJson1ListEventsCommand = exports.deserializeAws_restJson1ListAnomaliesForInsightCommand = exports.deserializeAws_restJson1GetResourceCollectionCommand = exports.deserializeAws_restJson1GetCostEstimationCommand = exports.deserializeAws_restJson1DescribeServiceIntegrationCommand = exports.deserializeAws_restJson1DescribeResourceCollectionHealthCommand = exports.deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = exports.deserializeAws_restJson1DescribeOrganizationOverviewCommand = exports.deserializeAws_restJson1DescribeOrganizationHealthCommand = exports.deserializeAws_restJson1DescribeInsightCommand = exports.deserializeAws_restJson1DescribeFeedbackCommand = exports.deserializeAws_restJson1DescribeAnomalyCommand = exports.deserializeAws_restJson1DescribeAccountOverviewCommand = exports.deserializeAws_restJson1DescribeAccountHealthCommand = exports.deserializeAws_restJson1AddNotificationChannelCommand = exports.serializeAws_restJson1UpdateServiceIntegrationCommand = exports.serializeAws_restJson1UpdateResourceCollectionCommand = exports.serializeAws_restJson1StartCostEstimationCommand = exports.serializeAws_restJson1SearchOrganizationInsightsCommand = exports.serializeAws_restJson1SearchInsightsCommand = exports.serializeAws_restJson1RemoveNotificationChannelCommand = exports.serializeAws_restJson1PutFeedbackCommand = exports.serializeAws_restJson1ListRecommendationsCommand = exports.serializeAws_restJson1ListOrganizationInsightsCommand = exports.serializeAws_restJson1ListNotificationChannelsCommand = exports.serializeAws_restJson1ListInsightsCommand = exports.serializeAws_restJson1ListEventsCommand = exports.serializeAws_restJson1ListAnomaliesForInsightCommand = exports.serializeAws_restJson1GetResourceCollectionCommand = exports.serializeAws_restJson1GetCostEstimationCommand = exports.serializeAws_restJson1DescribeServiceIntegrationCommand = exports.serializeAws_restJson1DescribeResourceCollectionHealthCommand = exports.serializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = exports.serializeAws_restJson1DescribeOrganizationOverviewCommand = exports.serializeAws_restJson1DescribeOrganizationHealthCommand = exports.serializeAws_restJson1DescribeInsightCommand = exports.serializeAws_restJson1DescribeFeedbackCommand = exports.serializeAws_restJson1DescribeAnomalyCommand = exports.serializeAws_restJson1DescribeAccountOverviewCommand = exports.serializeAws_restJson1DescribeAccountHealthCommand = exports.serializeAws_restJson1AddNotificationChannelCommand = void 0;
4
+ exports.deserializeAws_restJson1UpdateServiceIntegrationCommand = exports.deserializeAws_restJson1UpdateResourceCollectionCommand = void 0;
4
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
7
  const uuid_1 = require("uuid");
@@ -82,6 +83,9 @@ const serializeAws_restJson1DescribeAnomalyCommand = async (input, context) => {
82
83
  else {
83
84
  throw new Error("No value provided for input HTTP label: Id.");
84
85
  }
86
+ const query = {
87
+ ...(input.AccountId !== undefined && { AccountId: input.AccountId }),
88
+ };
85
89
  let body;
86
90
  return new protocol_http_1.HttpRequest({
87
91
  protocol,
@@ -90,6 +94,7 @@ const serializeAws_restJson1DescribeAnomalyCommand = async (input, context) => {
90
94
  method: "GET",
91
95
  headers,
92
96
  path: resolvedPath,
97
+ query,
93
98
  body,
94
99
  });
95
100
  };
@@ -129,6 +134,9 @@ const serializeAws_restJson1DescribeInsightCommand = async (input, context) => {
129
134
  else {
130
135
  throw new Error("No value provided for input HTTP label: Id.");
131
136
  }
137
+ const query = {
138
+ ...(input.AccountId !== undefined && { AccountId: input.AccountId }),
139
+ };
132
140
  let body;
133
141
  return new protocol_http_1.HttpRequest({
134
142
  protocol,
@@ -137,10 +145,98 @@ const serializeAws_restJson1DescribeInsightCommand = async (input, context) => {
137
145
  method: "GET",
138
146
  headers,
139
147
  path: resolvedPath,
148
+ query,
140
149
  body,
141
150
  });
142
151
  };
143
152
  exports.serializeAws_restJson1DescribeInsightCommand = serializeAws_restJson1DescribeInsightCommand;
153
+ const serializeAws_restJson1DescribeOrganizationHealthCommand = async (input, context) => {
154
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
155
+ const headers = {
156
+ "content-type": "application/json",
157
+ };
158
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health";
159
+ let body;
160
+ body = JSON.stringify({
161
+ ...(input.AccountIds !== undefined &&
162
+ input.AccountIds !== null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }),
163
+ ...(input.OrganizationalUnitIds !== undefined &&
164
+ input.OrganizationalUnitIds !== null && {
165
+ OrganizationalUnitIds: serializeAws_restJson1OrganizationalUnitIdList(input.OrganizationalUnitIds, context),
166
+ }),
167
+ });
168
+ return new protocol_http_1.HttpRequest({
169
+ protocol,
170
+ hostname,
171
+ port,
172
+ method: "POST",
173
+ headers,
174
+ path: resolvedPath,
175
+ body,
176
+ });
177
+ };
178
+ exports.serializeAws_restJson1DescribeOrganizationHealthCommand = serializeAws_restJson1DescribeOrganizationHealthCommand;
179
+ const serializeAws_restJson1DescribeOrganizationOverviewCommand = async (input, context) => {
180
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
+ const headers = {
182
+ "content-type": "application/json",
183
+ };
184
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/organization/overview";
185
+ let body;
186
+ body = JSON.stringify({
187
+ ...(input.AccountIds !== undefined &&
188
+ input.AccountIds !== null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }),
189
+ ...(input.FromTime !== undefined &&
190
+ input.FromTime !== null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }),
191
+ ...(input.OrganizationalUnitIds !== undefined &&
192
+ input.OrganizationalUnitIds !== null && {
193
+ OrganizationalUnitIds: serializeAws_restJson1OrganizationalUnitIdList(input.OrganizationalUnitIds, context),
194
+ }),
195
+ ...(input.ToTime !== undefined && input.ToTime !== null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }),
196
+ });
197
+ return new protocol_http_1.HttpRequest({
198
+ protocol,
199
+ hostname,
200
+ port,
201
+ method: "POST",
202
+ headers,
203
+ path: resolvedPath,
204
+ body,
205
+ });
206
+ };
207
+ exports.serializeAws_restJson1DescribeOrganizationOverviewCommand = serializeAws_restJson1DescribeOrganizationOverviewCommand;
208
+ const serializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = async (input, context) => {
209
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
210
+ const headers = {
211
+ "content-type": "application/json",
212
+ };
213
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health/resource-collection";
214
+ let body;
215
+ body = JSON.stringify({
216
+ ...(input.AccountIds !== undefined &&
217
+ input.AccountIds !== null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }),
218
+ ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
219
+ ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
220
+ ...(input.OrganizationResourceCollectionType !== undefined &&
221
+ input.OrganizationResourceCollectionType !== null && {
222
+ OrganizationResourceCollectionType: input.OrganizationResourceCollectionType,
223
+ }),
224
+ ...(input.OrganizationalUnitIds !== undefined &&
225
+ input.OrganizationalUnitIds !== null && {
226
+ OrganizationalUnitIds: serializeAws_restJson1OrganizationalUnitIdList(input.OrganizationalUnitIds, context),
227
+ }),
228
+ });
229
+ return new protocol_http_1.HttpRequest({
230
+ protocol,
231
+ hostname,
232
+ port,
233
+ method: "POST",
234
+ headers,
235
+ path: resolvedPath,
236
+ body,
237
+ });
238
+ };
239
+ exports.serializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = serializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand;
144
240
  const serializeAws_restJson1DescribeResourceCollectionHealthCommand = async (input, context) => {
145
241
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
146
242
  const headers = {};
@@ -260,6 +356,7 @@ const serializeAws_restJson1ListAnomaliesForInsightCommand = async (input, conte
260
356
  }
261
357
  let body;
262
358
  body = JSON.stringify({
359
+ ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }),
263
360
  ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
264
361
  ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
265
362
  ...(input.StartTimeRange !== undefined &&
@@ -286,6 +383,7 @@ const serializeAws_restJson1ListEventsCommand = async (input, context) => {
286
383
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/events";
287
384
  let body;
288
385
  body = JSON.stringify({
386
+ ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }),
289
387
  ...(input.Filters !== undefined &&
290
388
  input.Filters !== null && { Filters: serializeAws_restJson1ListEventsFilters(input.Filters, context) }),
291
389
  ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
@@ -349,6 +447,40 @@ const serializeAws_restJson1ListNotificationChannelsCommand = async (input, cont
349
447
  });
350
448
  };
351
449
  exports.serializeAws_restJson1ListNotificationChannelsCommand = serializeAws_restJson1ListNotificationChannelsCommand;
450
+ const serializeAws_restJson1ListOrganizationInsightsCommand = async (input, context) => {
451
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
452
+ const headers = {
453
+ "content-type": "application/json",
454
+ };
455
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights";
456
+ let body;
457
+ body = JSON.stringify({
458
+ ...(input.AccountIds !== undefined &&
459
+ input.AccountIds !== null && {
460
+ AccountIds: serializeAws_restJson1ListInsightsAccountIdList(input.AccountIds, context),
461
+ }),
462
+ ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
463
+ ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
464
+ ...(input.OrganizationalUnitIds !== undefined &&
465
+ input.OrganizationalUnitIds !== null && {
466
+ OrganizationalUnitIds: serializeAws_restJson1ListInsightsOrganizationalUnitIdList(input.OrganizationalUnitIds, context),
467
+ }),
468
+ ...(input.StatusFilter !== undefined &&
469
+ input.StatusFilter !== null && {
470
+ StatusFilter: serializeAws_restJson1ListInsightsStatusFilter(input.StatusFilter, context),
471
+ }),
472
+ });
473
+ return new protocol_http_1.HttpRequest({
474
+ protocol,
475
+ hostname,
476
+ port,
477
+ method: "POST",
478
+ headers,
479
+ path: resolvedPath,
480
+ body,
481
+ });
482
+ };
483
+ exports.serializeAws_restJson1ListOrganizationInsightsCommand = serializeAws_restJson1ListOrganizationInsightsCommand;
352
484
  const serializeAws_restJson1ListRecommendationsCommand = async (input, context) => {
353
485
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
354
486
  const headers = {
@@ -357,6 +489,7 @@ const serializeAws_restJson1ListRecommendationsCommand = async (input, context)
357
489
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/recommendations";
358
490
  let body;
359
491
  body = JSON.stringify({
492
+ ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }),
360
493
  ...(input.InsightId !== undefined && input.InsightId !== null && { InsightId: input.InsightId }),
361
494
  ...(input.Locale !== undefined && input.Locale !== null && { Locale: input.Locale }),
362
495
  ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
@@ -451,6 +584,41 @@ const serializeAws_restJson1SearchInsightsCommand = async (input, context) => {
451
584
  });
452
585
  };
453
586
  exports.serializeAws_restJson1SearchInsightsCommand = serializeAws_restJson1SearchInsightsCommand;
587
+ const serializeAws_restJson1SearchOrganizationInsightsCommand = async (input, context) => {
588
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
589
+ const headers = {
590
+ "content-type": "application/json",
591
+ };
592
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights/search";
593
+ let body;
594
+ body = JSON.stringify({
595
+ ...(input.AccountIds !== undefined &&
596
+ input.AccountIds !== null && {
597
+ AccountIds: serializeAws_restJson1SearchInsightsAccountIdList(input.AccountIds, context),
598
+ }),
599
+ ...(input.Filters !== undefined &&
600
+ input.Filters !== null && {
601
+ Filters: serializeAws_restJson1SearchOrganizationInsightsFilters(input.Filters, context),
602
+ }),
603
+ ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
604
+ ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
605
+ ...(input.StartTimeRange !== undefined &&
606
+ input.StartTimeRange !== null && {
607
+ StartTimeRange: serializeAws_restJson1StartTimeRange(input.StartTimeRange, context),
608
+ }),
609
+ ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
610
+ });
611
+ return new protocol_http_1.HttpRequest({
612
+ protocol,
613
+ hostname,
614
+ port,
615
+ method: "POST",
616
+ headers,
617
+ path: resolvedPath,
618
+ body,
619
+ });
620
+ };
621
+ exports.serializeAws_restJson1SearchOrganizationInsightsCommand = serializeAws_restJson1SearchOrganizationInsightsCommand;
454
622
  const serializeAws_restJson1StartCostEstimationCommand = async (input, context) => {
455
623
  var _a;
456
624
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -1034,6 +1202,250 @@ const deserializeAws_restJson1DescribeInsightCommandError = async (output, conte
1034
1202
  delete response.Message;
1035
1203
  return Promise.reject(Object.assign(new Error(message), response));
1036
1204
  };
1205
+ const deserializeAws_restJson1DescribeOrganizationHealthCommand = async (output, context) => {
1206
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1207
+ return deserializeAws_restJson1DescribeOrganizationHealthCommandError(output, context);
1208
+ }
1209
+ const contents = {
1210
+ $metadata: deserializeMetadata(output),
1211
+ MetricsAnalyzed: undefined,
1212
+ OpenProactiveInsights: undefined,
1213
+ OpenReactiveInsights: undefined,
1214
+ ResourceHours: undefined,
1215
+ };
1216
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1217
+ if (data.MetricsAnalyzed !== undefined && data.MetricsAnalyzed !== null) {
1218
+ contents.MetricsAnalyzed = smithy_client_1.expectInt32(data.MetricsAnalyzed);
1219
+ }
1220
+ if (data.OpenProactiveInsights !== undefined && data.OpenProactiveInsights !== null) {
1221
+ contents.OpenProactiveInsights = smithy_client_1.expectInt32(data.OpenProactiveInsights);
1222
+ }
1223
+ if (data.OpenReactiveInsights !== undefined && data.OpenReactiveInsights !== null) {
1224
+ contents.OpenReactiveInsights = smithy_client_1.expectInt32(data.OpenReactiveInsights);
1225
+ }
1226
+ if (data.ResourceHours !== undefined && data.ResourceHours !== null) {
1227
+ contents.ResourceHours = smithy_client_1.expectLong(data.ResourceHours);
1228
+ }
1229
+ return Promise.resolve(contents);
1230
+ };
1231
+ exports.deserializeAws_restJson1DescribeOrganizationHealthCommand = deserializeAws_restJson1DescribeOrganizationHealthCommand;
1232
+ const deserializeAws_restJson1DescribeOrganizationHealthCommandError = async (output, context) => {
1233
+ const parsedOutput = {
1234
+ ...output,
1235
+ body: await parseBody(output.body, context),
1236
+ };
1237
+ let response;
1238
+ let errorCode = "UnknownError";
1239
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1240
+ switch (errorCode) {
1241
+ case "AccessDeniedException":
1242
+ case "com.amazonaws.devopsguru#AccessDeniedException":
1243
+ response = {
1244
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1245
+ name: errorCode,
1246
+ $metadata: deserializeMetadata(output),
1247
+ };
1248
+ break;
1249
+ case "InternalServerException":
1250
+ case "com.amazonaws.devopsguru#InternalServerException":
1251
+ response = {
1252
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1253
+ name: errorCode,
1254
+ $metadata: deserializeMetadata(output),
1255
+ };
1256
+ break;
1257
+ case "ThrottlingException":
1258
+ case "com.amazonaws.devopsguru#ThrottlingException":
1259
+ response = {
1260
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1261
+ name: errorCode,
1262
+ $metadata: deserializeMetadata(output),
1263
+ };
1264
+ break;
1265
+ case "ValidationException":
1266
+ case "com.amazonaws.devopsguru#ValidationException":
1267
+ response = {
1268
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1269
+ name: errorCode,
1270
+ $metadata: deserializeMetadata(output),
1271
+ };
1272
+ break;
1273
+ default:
1274
+ const parsedBody = parsedOutput.body;
1275
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1276
+ response = {
1277
+ ...parsedBody,
1278
+ name: `${errorCode}`,
1279
+ message: parsedBody.message || parsedBody.Message || errorCode,
1280
+ $fault: "client",
1281
+ $metadata: deserializeMetadata(output),
1282
+ };
1283
+ }
1284
+ const message = response.message || response.Message || errorCode;
1285
+ response.message = message;
1286
+ delete response.Message;
1287
+ return Promise.reject(Object.assign(new Error(message), response));
1288
+ };
1289
+ const deserializeAws_restJson1DescribeOrganizationOverviewCommand = async (output, context) => {
1290
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1291
+ return deserializeAws_restJson1DescribeOrganizationOverviewCommandError(output, context);
1292
+ }
1293
+ const contents = {
1294
+ $metadata: deserializeMetadata(output),
1295
+ ProactiveInsights: undefined,
1296
+ ReactiveInsights: undefined,
1297
+ };
1298
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1299
+ if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
1300
+ contents.ProactiveInsights = smithy_client_1.expectInt32(data.ProactiveInsights);
1301
+ }
1302
+ if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
1303
+ contents.ReactiveInsights = smithy_client_1.expectInt32(data.ReactiveInsights);
1304
+ }
1305
+ return Promise.resolve(contents);
1306
+ };
1307
+ exports.deserializeAws_restJson1DescribeOrganizationOverviewCommand = deserializeAws_restJson1DescribeOrganizationOverviewCommand;
1308
+ const deserializeAws_restJson1DescribeOrganizationOverviewCommandError = async (output, context) => {
1309
+ const parsedOutput = {
1310
+ ...output,
1311
+ body: await parseBody(output.body, context),
1312
+ };
1313
+ let response;
1314
+ let errorCode = "UnknownError";
1315
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1316
+ switch (errorCode) {
1317
+ case "AccessDeniedException":
1318
+ case "com.amazonaws.devopsguru#AccessDeniedException":
1319
+ response = {
1320
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1321
+ name: errorCode,
1322
+ $metadata: deserializeMetadata(output),
1323
+ };
1324
+ break;
1325
+ case "InternalServerException":
1326
+ case "com.amazonaws.devopsguru#InternalServerException":
1327
+ response = {
1328
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1329
+ name: errorCode,
1330
+ $metadata: deserializeMetadata(output),
1331
+ };
1332
+ break;
1333
+ case "ThrottlingException":
1334
+ case "com.amazonaws.devopsguru#ThrottlingException":
1335
+ response = {
1336
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1337
+ name: errorCode,
1338
+ $metadata: deserializeMetadata(output),
1339
+ };
1340
+ break;
1341
+ case "ValidationException":
1342
+ case "com.amazonaws.devopsguru#ValidationException":
1343
+ response = {
1344
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1345
+ name: errorCode,
1346
+ $metadata: deserializeMetadata(output),
1347
+ };
1348
+ break;
1349
+ default:
1350
+ const parsedBody = parsedOutput.body;
1351
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1352
+ response = {
1353
+ ...parsedBody,
1354
+ name: `${errorCode}`,
1355
+ message: parsedBody.message || parsedBody.Message || errorCode,
1356
+ $fault: "client",
1357
+ $metadata: deserializeMetadata(output),
1358
+ };
1359
+ }
1360
+ const message = response.message || response.Message || errorCode;
1361
+ response.message = message;
1362
+ delete response.Message;
1363
+ return Promise.reject(Object.assign(new Error(message), response));
1364
+ };
1365
+ const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = async (output, context) => {
1366
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1367
+ return deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommandError(output, context);
1368
+ }
1369
+ const contents = {
1370
+ $metadata: deserializeMetadata(output),
1371
+ Account: undefined,
1372
+ CloudFormation: undefined,
1373
+ NextToken: undefined,
1374
+ Service: undefined,
1375
+ };
1376
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1377
+ if (data.Account !== undefined && data.Account !== null) {
1378
+ contents.Account = deserializeAws_restJson1AccountHealths(data.Account, context);
1379
+ }
1380
+ if (data.CloudFormation !== undefined && data.CloudFormation !== null) {
1381
+ contents.CloudFormation = deserializeAws_restJson1CloudFormationHealths(data.CloudFormation, context);
1382
+ }
1383
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1384
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
1385
+ }
1386
+ if (data.Service !== undefined && data.Service !== null) {
1387
+ contents.Service = deserializeAws_restJson1ServiceHealths(data.Service, context);
1388
+ }
1389
+ return Promise.resolve(contents);
1390
+ };
1391
+ exports.deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand;
1392
+ const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommandError = async (output, context) => {
1393
+ const parsedOutput = {
1394
+ ...output,
1395
+ body: await parseBody(output.body, context),
1396
+ };
1397
+ let response;
1398
+ let errorCode = "UnknownError";
1399
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1400
+ switch (errorCode) {
1401
+ case "AccessDeniedException":
1402
+ case "com.amazonaws.devopsguru#AccessDeniedException":
1403
+ response = {
1404
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1405
+ name: errorCode,
1406
+ $metadata: deserializeMetadata(output),
1407
+ };
1408
+ break;
1409
+ case "InternalServerException":
1410
+ case "com.amazonaws.devopsguru#InternalServerException":
1411
+ response = {
1412
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1413
+ name: errorCode,
1414
+ $metadata: deserializeMetadata(output),
1415
+ };
1416
+ break;
1417
+ case "ThrottlingException":
1418
+ case "com.amazonaws.devopsguru#ThrottlingException":
1419
+ response = {
1420
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1421
+ name: errorCode,
1422
+ $metadata: deserializeMetadata(output),
1423
+ };
1424
+ break;
1425
+ case "ValidationException":
1426
+ case "com.amazonaws.devopsguru#ValidationException":
1427
+ response = {
1428
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1429
+ name: errorCode,
1430
+ $metadata: deserializeMetadata(output),
1431
+ };
1432
+ break;
1433
+ default:
1434
+ const parsedBody = parsedOutput.body;
1435
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1436
+ response = {
1437
+ ...parsedBody,
1438
+ name: `${errorCode}`,
1439
+ message: parsedBody.message || parsedBody.Message || errorCode,
1440
+ $fault: "client",
1441
+ $metadata: deserializeMetadata(output),
1442
+ };
1443
+ }
1444
+ const message = response.message || response.Message || errorCode;
1445
+ response.message = message;
1446
+ delete response.Message;
1447
+ return Promise.reject(Object.assign(new Error(message), response));
1448
+ };
1037
1449
  const deserializeAws_restJson1DescribeResourceCollectionHealthCommand = async (output, context) => {
1038
1450
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1039
1451
  return deserializeAws_restJson1DescribeResourceCollectionHealthCommandError(output, context);
@@ -1542,30 +1954,106 @@ const deserializeAws_restJson1ListEventsCommandError = async (output, context) =
1542
1954
  delete response.Message;
1543
1955
  return Promise.reject(Object.assign(new Error(message), response));
1544
1956
  };
1545
- const deserializeAws_restJson1ListInsightsCommand = async (output, context) => {
1957
+ const deserializeAws_restJson1ListInsightsCommand = async (output, context) => {
1958
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1959
+ return deserializeAws_restJson1ListInsightsCommandError(output, context);
1960
+ }
1961
+ const contents = {
1962
+ $metadata: deserializeMetadata(output),
1963
+ NextToken: undefined,
1964
+ ProactiveInsights: undefined,
1965
+ ReactiveInsights: undefined,
1966
+ };
1967
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1968
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1969
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
1970
+ }
1971
+ if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
1972
+ contents.ProactiveInsights = deserializeAws_restJson1ProactiveInsights(data.ProactiveInsights, context);
1973
+ }
1974
+ if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
1975
+ contents.ReactiveInsights = deserializeAws_restJson1ReactiveInsights(data.ReactiveInsights, context);
1976
+ }
1977
+ return Promise.resolve(contents);
1978
+ };
1979
+ exports.deserializeAws_restJson1ListInsightsCommand = deserializeAws_restJson1ListInsightsCommand;
1980
+ const deserializeAws_restJson1ListInsightsCommandError = async (output, context) => {
1981
+ const parsedOutput = {
1982
+ ...output,
1983
+ body: await parseBody(output.body, context),
1984
+ };
1985
+ let response;
1986
+ let errorCode = "UnknownError";
1987
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1988
+ switch (errorCode) {
1989
+ case "AccessDeniedException":
1990
+ case "com.amazonaws.devopsguru#AccessDeniedException":
1991
+ response = {
1992
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1993
+ name: errorCode,
1994
+ $metadata: deserializeMetadata(output),
1995
+ };
1996
+ break;
1997
+ case "InternalServerException":
1998
+ case "com.amazonaws.devopsguru#InternalServerException":
1999
+ response = {
2000
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2001
+ name: errorCode,
2002
+ $metadata: deserializeMetadata(output),
2003
+ };
2004
+ break;
2005
+ case "ThrottlingException":
2006
+ case "com.amazonaws.devopsguru#ThrottlingException":
2007
+ response = {
2008
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2009
+ name: errorCode,
2010
+ $metadata: deserializeMetadata(output),
2011
+ };
2012
+ break;
2013
+ case "ValidationException":
2014
+ case "com.amazonaws.devopsguru#ValidationException":
2015
+ response = {
2016
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2017
+ name: errorCode,
2018
+ $metadata: deserializeMetadata(output),
2019
+ };
2020
+ break;
2021
+ default:
2022
+ const parsedBody = parsedOutput.body;
2023
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2024
+ response = {
2025
+ ...parsedBody,
2026
+ name: `${errorCode}`,
2027
+ message: parsedBody.message || parsedBody.Message || errorCode,
2028
+ $fault: "client",
2029
+ $metadata: deserializeMetadata(output),
2030
+ };
2031
+ }
2032
+ const message = response.message || response.Message || errorCode;
2033
+ response.message = message;
2034
+ delete response.Message;
2035
+ return Promise.reject(Object.assign(new Error(message), response));
2036
+ };
2037
+ const deserializeAws_restJson1ListNotificationChannelsCommand = async (output, context) => {
1546
2038
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1547
- return deserializeAws_restJson1ListInsightsCommandError(output, context);
2039
+ return deserializeAws_restJson1ListNotificationChannelsCommandError(output, context);
1548
2040
  }
1549
2041
  const contents = {
1550
2042
  $metadata: deserializeMetadata(output),
2043
+ Channels: undefined,
1551
2044
  NextToken: undefined,
1552
- ProactiveInsights: undefined,
1553
- ReactiveInsights: undefined,
1554
2045
  };
1555
2046
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2047
+ if (data.Channels !== undefined && data.Channels !== null) {
2048
+ contents.Channels = deserializeAws_restJson1Channels(data.Channels, context);
2049
+ }
1556
2050
  if (data.NextToken !== undefined && data.NextToken !== null) {
1557
2051
  contents.NextToken = smithy_client_1.expectString(data.NextToken);
1558
2052
  }
1559
- if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
1560
- contents.ProactiveInsights = deserializeAws_restJson1ProactiveInsights(data.ProactiveInsights, context);
1561
- }
1562
- if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
1563
- contents.ReactiveInsights = deserializeAws_restJson1ReactiveInsights(data.ReactiveInsights, context);
1564
- }
1565
2053
  return Promise.resolve(contents);
1566
2054
  };
1567
- exports.deserializeAws_restJson1ListInsightsCommand = deserializeAws_restJson1ListInsightsCommand;
1568
- const deserializeAws_restJson1ListInsightsCommandError = async (output, context) => {
2055
+ exports.deserializeAws_restJson1ListNotificationChannelsCommand = deserializeAws_restJson1ListNotificationChannelsCommand;
2056
+ const deserializeAws_restJson1ListNotificationChannelsCommandError = async (output, context) => {
1569
2057
  const parsedOutput = {
1570
2058
  ...output,
1571
2059
  body: await parseBody(output.body, context),
@@ -1622,26 +2110,30 @@ const deserializeAws_restJson1ListInsightsCommandError = async (output, context)
1622
2110
  delete response.Message;
1623
2111
  return Promise.reject(Object.assign(new Error(message), response));
1624
2112
  };
1625
- const deserializeAws_restJson1ListNotificationChannelsCommand = async (output, context) => {
2113
+ const deserializeAws_restJson1ListOrganizationInsightsCommand = async (output, context) => {
1626
2114
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1627
- return deserializeAws_restJson1ListNotificationChannelsCommandError(output, context);
2115
+ return deserializeAws_restJson1ListOrganizationInsightsCommandError(output, context);
1628
2116
  }
1629
2117
  const contents = {
1630
2118
  $metadata: deserializeMetadata(output),
1631
- Channels: undefined,
1632
2119
  NextToken: undefined,
2120
+ ProactiveInsights: undefined,
2121
+ ReactiveInsights: undefined,
1633
2122
  };
1634
2123
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1635
- if (data.Channels !== undefined && data.Channels !== null) {
1636
- contents.Channels = deserializeAws_restJson1Channels(data.Channels, context);
1637
- }
1638
2124
  if (data.NextToken !== undefined && data.NextToken !== null) {
1639
2125
  contents.NextToken = smithy_client_1.expectString(data.NextToken);
1640
2126
  }
2127
+ if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
2128
+ contents.ProactiveInsights = deserializeAws_restJson1ProactiveOrganizationInsights(data.ProactiveInsights, context);
2129
+ }
2130
+ if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
2131
+ contents.ReactiveInsights = deserializeAws_restJson1ReactiveOrganizationInsights(data.ReactiveInsights, context);
2132
+ }
1641
2133
  return Promise.resolve(contents);
1642
2134
  };
1643
- exports.deserializeAws_restJson1ListNotificationChannelsCommand = deserializeAws_restJson1ListNotificationChannelsCommand;
1644
- const deserializeAws_restJson1ListNotificationChannelsCommandError = async (output, context) => {
2135
+ exports.deserializeAws_restJson1ListOrganizationInsightsCommand = deserializeAws_restJson1ListOrganizationInsightsCommand;
2136
+ const deserializeAws_restJson1ListOrganizationInsightsCommandError = async (output, context) => {
1645
2137
  const parsedOutput = {
1646
2138
  ...output,
1647
2139
  body: await parseBody(output.body, context),
@@ -2030,6 +2522,86 @@ const deserializeAws_restJson1SearchInsightsCommandError = async (output, contex
2030
2522
  delete response.Message;
2031
2523
  return Promise.reject(Object.assign(new Error(message), response));
2032
2524
  };
2525
+ const deserializeAws_restJson1SearchOrganizationInsightsCommand = async (output, context) => {
2526
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2527
+ return deserializeAws_restJson1SearchOrganizationInsightsCommandError(output, context);
2528
+ }
2529
+ const contents = {
2530
+ $metadata: deserializeMetadata(output),
2531
+ NextToken: undefined,
2532
+ ProactiveInsights: undefined,
2533
+ ReactiveInsights: undefined,
2534
+ };
2535
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2536
+ if (data.NextToken !== undefined && data.NextToken !== null) {
2537
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
2538
+ }
2539
+ if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) {
2540
+ contents.ProactiveInsights = deserializeAws_restJson1ProactiveInsights(data.ProactiveInsights, context);
2541
+ }
2542
+ if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) {
2543
+ contents.ReactiveInsights = deserializeAws_restJson1ReactiveInsights(data.ReactiveInsights, context);
2544
+ }
2545
+ return Promise.resolve(contents);
2546
+ };
2547
+ exports.deserializeAws_restJson1SearchOrganizationInsightsCommand = deserializeAws_restJson1SearchOrganizationInsightsCommand;
2548
+ const deserializeAws_restJson1SearchOrganizationInsightsCommandError = async (output, context) => {
2549
+ const parsedOutput = {
2550
+ ...output,
2551
+ body: await parseBody(output.body, context),
2552
+ };
2553
+ let response;
2554
+ let errorCode = "UnknownError";
2555
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2556
+ switch (errorCode) {
2557
+ case "AccessDeniedException":
2558
+ case "com.amazonaws.devopsguru#AccessDeniedException":
2559
+ response = {
2560
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2561
+ name: errorCode,
2562
+ $metadata: deserializeMetadata(output),
2563
+ };
2564
+ break;
2565
+ case "InternalServerException":
2566
+ case "com.amazonaws.devopsguru#InternalServerException":
2567
+ response = {
2568
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2569
+ name: errorCode,
2570
+ $metadata: deserializeMetadata(output),
2571
+ };
2572
+ break;
2573
+ case "ThrottlingException":
2574
+ case "com.amazonaws.devopsguru#ThrottlingException":
2575
+ response = {
2576
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2577
+ name: errorCode,
2578
+ $metadata: deserializeMetadata(output),
2579
+ };
2580
+ break;
2581
+ case "ValidationException":
2582
+ case "com.amazonaws.devopsguru#ValidationException":
2583
+ response = {
2584
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2585
+ name: errorCode,
2586
+ $metadata: deserializeMetadata(output),
2587
+ };
2588
+ break;
2589
+ default:
2590
+ const parsedBody = parsedOutput.body;
2591
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2592
+ response = {
2593
+ ...parsedBody,
2594
+ name: `${errorCode}`,
2595
+ message: parsedBody.message || parsedBody.Message || errorCode,
2596
+ $fault: "client",
2597
+ $metadata: deserializeMetadata(output),
2598
+ };
2599
+ }
2600
+ const message = response.message || response.Message || errorCode;
2601
+ response.message = message;
2602
+ delete response.Message;
2603
+ return Promise.reject(Object.assign(new Error(message), response));
2604
+ };
2033
2605
  const deserializeAws_restJson1StartCostEstimationCommand = async (output, context) => {
2034
2606
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2035
2607
  return deserializeAws_restJson1StartCostEstimationCommandError(output, context);
@@ -2397,6 +2969,16 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
2397
2969
  }
2398
2970
  return contents;
2399
2971
  };
2972
+ const serializeAws_restJson1AccountIdList = (input, context) => {
2973
+ return input
2974
+ .filter((e) => e != null)
2975
+ .map((entry) => {
2976
+ if (entry === null) {
2977
+ return null;
2978
+ }
2979
+ return entry;
2980
+ });
2981
+ };
2400
2982
  const serializeAws_restJson1CloudFormationCollection = (input, context) => {
2401
2983
  return {
2402
2984
  ...(input.StackNames !== undefined &&
@@ -2485,6 +3067,16 @@ const serializeAws_restJson1ListEventsFilters = (input, context) => {
2485
3067
  }),
2486
3068
  };
2487
3069
  };
3070
+ const serializeAws_restJson1ListInsightsAccountIdList = (input, context) => {
3071
+ return input
3072
+ .filter((e) => e != null)
3073
+ .map((entry) => {
3074
+ if (entry === null) {
3075
+ return null;
3076
+ }
3077
+ return entry;
3078
+ });
3079
+ };
2488
3080
  const serializeAws_restJson1ListInsightsAnyStatusFilter = (input, context) => {
2489
3081
  return {
2490
3082
  ...(input.StartTimeRange !== undefined &&
@@ -2506,6 +3098,16 @@ const serializeAws_restJson1ListInsightsOngoingStatusFilter = (input, context) =
2506
3098
  ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
2507
3099
  };
2508
3100
  };
3101
+ const serializeAws_restJson1ListInsightsOrganizationalUnitIdList = (input, context) => {
3102
+ return input
3103
+ .filter((e) => e != null)
3104
+ .map((entry) => {
3105
+ if (entry === null) {
3106
+ return null;
3107
+ }
3108
+ return entry;
3109
+ });
3110
+ };
2509
3111
  const serializeAws_restJson1ListInsightsStatusFilter = (input, context) => {
2510
3112
  return {
2511
3113
  ...(input.Any !== undefined &&
@@ -2529,6 +3131,16 @@ const serializeAws_restJson1OpsCenterIntegrationConfig = (input, context) => {
2529
3131
  ...(input.OptInStatus !== undefined && input.OptInStatus !== null && { OptInStatus: input.OptInStatus }),
2530
3132
  };
2531
3133
  };
3134
+ const serializeAws_restJson1OrganizationalUnitIdList = (input, context) => {
3135
+ return input
3136
+ .filter((e) => e != null)
3137
+ .map((entry) => {
3138
+ if (entry === null) {
3139
+ return null;
3140
+ }
3141
+ return entry;
3142
+ });
3143
+ };
2532
3144
  const serializeAws_restJson1ResourceCollection = (input, context) => {
2533
3145
  return {
2534
3146
  ...(input.CloudFormation !== undefined &&
@@ -2537,6 +3149,16 @@ const serializeAws_restJson1ResourceCollection = (input, context) => {
2537
3149
  }),
2538
3150
  };
2539
3151
  };
3152
+ const serializeAws_restJson1SearchInsightsAccountIdList = (input, context) => {
3153
+ return input
3154
+ .filter((e) => e != null)
3155
+ .map((entry) => {
3156
+ if (entry === null) {
3157
+ return null;
3158
+ }
3159
+ return entry;
3160
+ });
3161
+ };
2540
3162
  const serializeAws_restJson1SearchInsightsFilters = (input, context) => {
2541
3163
  return {
2542
3164
  ...(input.ResourceCollection !== undefined &&
@@ -2553,6 +3175,22 @@ const serializeAws_restJson1SearchInsightsFilters = (input, context) => {
2553
3175
  input.Statuses !== null && { Statuses: serializeAws_restJson1InsightStatuses(input.Statuses, context) }),
2554
3176
  };
2555
3177
  };
3178
+ const serializeAws_restJson1SearchOrganizationInsightsFilters = (input, context) => {
3179
+ return {
3180
+ ...(input.ResourceCollection !== undefined &&
3181
+ input.ResourceCollection !== null && {
3182
+ ResourceCollection: serializeAws_restJson1ResourceCollection(input.ResourceCollection, context),
3183
+ }),
3184
+ ...(input.ServiceCollection !== undefined &&
3185
+ input.ServiceCollection !== null && {
3186
+ ServiceCollection: serializeAws_restJson1ServiceCollection(input.ServiceCollection, context),
3187
+ }),
3188
+ ...(input.Severities !== undefined &&
3189
+ input.Severities !== null && { Severities: serializeAws_restJson1InsightSeverities(input.Severities, context) }),
3190
+ ...(input.Statuses !== undefined &&
3191
+ input.Statuses !== null && { Statuses: serializeAws_restJson1InsightStatuses(input.Statuses, context) }),
3192
+ };
3193
+ };
2556
3194
  const serializeAws_restJson1ServiceCollection = (input, context) => {
2557
3195
  return {
2558
3196
  ...(input.ServiceNames !== undefined &&
@@ -2623,6 +3261,30 @@ const serializeAws_restJson1UpdateStackNames = (input, context) => {
2623
3261
  return entry;
2624
3262
  });
2625
3263
  };
3264
+ const deserializeAws_restJson1AccountHealth = (output, context) => {
3265
+ return {
3266
+ AccountId: smithy_client_1.expectString(output.AccountId),
3267
+ Insight: output.Insight !== undefined && output.Insight !== null
3268
+ ? deserializeAws_restJson1AccountInsightHealth(output.Insight, context)
3269
+ : undefined,
3270
+ };
3271
+ };
3272
+ const deserializeAws_restJson1AccountHealths = (output, context) => {
3273
+ return (output || [])
3274
+ .filter((e) => e != null)
3275
+ .map((entry) => {
3276
+ if (entry === null) {
3277
+ return null;
3278
+ }
3279
+ return deserializeAws_restJson1AccountHealth(entry, context);
3280
+ });
3281
+ };
3282
+ const deserializeAws_restJson1AccountInsightHealth = (output, context) => {
3283
+ return {
3284
+ OpenProactiveInsights: smithy_client_1.expectInt32(output.OpenProactiveInsights),
3285
+ OpenReactiveInsights: smithy_client_1.expectInt32(output.OpenReactiveInsights),
3286
+ };
3287
+ };
2626
3288
  const deserializeAws_restJson1AnomalyReportedTimeRange = (output, context) => {
2627
3289
  return {
2628
3290
  CloseTime: output.CloseTime !== undefined && output.CloseTime !== null
@@ -2699,11 +3361,22 @@ const deserializeAws_restJson1CloudFormationHealths = (output, context) => {
2699
3361
  return deserializeAws_restJson1CloudFormationHealth(entry, context);
2700
3362
  });
2701
3363
  };
3364
+ const deserializeAws_restJson1CloudWatchMetricsDataSummary = (output, context) => {
3365
+ return {
3366
+ StatusCode: smithy_client_1.expectString(output.StatusCode),
3367
+ TimestampMetricValuePairList: output.TimestampMetricValuePairList !== undefined && output.TimestampMetricValuePairList !== null
3368
+ ? deserializeAws_restJson1TimestampMetricValuePairList(output.TimestampMetricValuePairList, context)
3369
+ : undefined,
3370
+ };
3371
+ };
2702
3372
  const deserializeAws_restJson1CloudWatchMetricsDetail = (output, context) => {
2703
3373
  return {
2704
3374
  Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
2705
3375
  ? deserializeAws_restJson1CloudWatchMetricsDimensions(output.Dimensions, context)
2706
3376
  : undefined,
3377
+ MetricDataSummary: output.MetricDataSummary !== undefined && output.MetricDataSummary !== null
3378
+ ? deserializeAws_restJson1CloudWatchMetricsDataSummary(output.MetricDataSummary, context)
3379
+ : undefined,
2707
3380
  MetricName: smithy_client_1.expectString(output.MetricName),
2708
3381
  Namespace: smithy_client_1.expectString(output.Namespace),
2709
3382
  Period: smithy_client_1.expectInt32(output.Period),
@@ -2974,6 +3647,38 @@ const deserializeAws_restJson1ProactiveInsightSummary = (output, context) => {
2974
3647
  Status: smithy_client_1.expectString(output.Status),
2975
3648
  };
2976
3649
  };
3650
+ const deserializeAws_restJson1ProactiveOrganizationInsights = (output, context) => {
3651
+ return (output || [])
3652
+ .filter((e) => e != null)
3653
+ .map((entry) => {
3654
+ if (entry === null) {
3655
+ return null;
3656
+ }
3657
+ return deserializeAws_restJson1ProactiveOrganizationInsightSummary(entry, context);
3658
+ });
3659
+ };
3660
+ const deserializeAws_restJson1ProactiveOrganizationInsightSummary = (output, context) => {
3661
+ return {
3662
+ AccountId: smithy_client_1.expectString(output.AccountId),
3663
+ Id: smithy_client_1.expectString(output.Id),
3664
+ InsightTimeRange: output.InsightTimeRange !== undefined && output.InsightTimeRange !== null
3665
+ ? deserializeAws_restJson1InsightTimeRange(output.InsightTimeRange, context)
3666
+ : undefined,
3667
+ Name: smithy_client_1.expectString(output.Name),
3668
+ OrganizationalUnitId: smithy_client_1.expectString(output.OrganizationalUnitId),
3669
+ PredictionTimeRange: output.PredictionTimeRange !== undefined && output.PredictionTimeRange !== null
3670
+ ? deserializeAws_restJson1PredictionTimeRange(output.PredictionTimeRange, context)
3671
+ : undefined,
3672
+ ResourceCollection: output.ResourceCollection !== undefined && output.ResourceCollection !== null
3673
+ ? deserializeAws_restJson1ResourceCollection(output.ResourceCollection, context)
3674
+ : undefined,
3675
+ ServiceCollection: output.ServiceCollection !== undefined && output.ServiceCollection !== null
3676
+ ? deserializeAws_restJson1ServiceCollection(output.ServiceCollection, context)
3677
+ : undefined,
3678
+ Severity: smithy_client_1.expectString(output.Severity),
3679
+ Status: smithy_client_1.expectString(output.Status),
3680
+ };
3681
+ };
2977
3682
  const deserializeAws_restJson1ReactiveAnomalies = (output, context) => {
2978
3683
  return (output || [])
2979
3684
  .filter((e) => e != null)
@@ -3066,6 +3771,35 @@ const deserializeAws_restJson1ReactiveInsightSummary = (output, context) => {
3066
3771
  Status: smithy_client_1.expectString(output.Status),
3067
3772
  };
3068
3773
  };
3774
+ const deserializeAws_restJson1ReactiveOrganizationInsights = (output, context) => {
3775
+ return (output || [])
3776
+ .filter((e) => e != null)
3777
+ .map((entry) => {
3778
+ if (entry === null) {
3779
+ return null;
3780
+ }
3781
+ return deserializeAws_restJson1ReactiveOrganizationInsightSummary(entry, context);
3782
+ });
3783
+ };
3784
+ const deserializeAws_restJson1ReactiveOrganizationInsightSummary = (output, context) => {
3785
+ return {
3786
+ AccountId: smithy_client_1.expectString(output.AccountId),
3787
+ Id: smithy_client_1.expectString(output.Id),
3788
+ InsightTimeRange: output.InsightTimeRange !== undefined && output.InsightTimeRange !== null
3789
+ ? deserializeAws_restJson1InsightTimeRange(output.InsightTimeRange, context)
3790
+ : undefined,
3791
+ Name: smithy_client_1.expectString(output.Name),
3792
+ OrganizationalUnitId: smithy_client_1.expectString(output.OrganizationalUnitId),
3793
+ ResourceCollection: output.ResourceCollection !== undefined && output.ResourceCollection !== null
3794
+ ? deserializeAws_restJson1ResourceCollection(output.ResourceCollection, context)
3795
+ : undefined,
3796
+ ServiceCollection: output.ServiceCollection !== undefined && output.ServiceCollection !== null
3797
+ ? deserializeAws_restJson1ServiceCollection(output.ServiceCollection, context)
3798
+ : undefined,
3799
+ Severity: smithy_client_1.expectString(output.Severity),
3800
+ Status: smithy_client_1.expectString(output.Status),
3801
+ };
3802
+ };
3069
3803
  const deserializeAws_restJson1Recommendation = (output, context) => {
3070
3804
  return {
3071
3805
  Description: smithy_client_1.expectString(output.Description),
@@ -3289,6 +4023,24 @@ const deserializeAws_restJson1StackNames = (output, context) => {
3289
4023
  return smithy_client_1.expectString(entry);
3290
4024
  });
3291
4025
  };
4026
+ const deserializeAws_restJson1TimestampMetricValuePair = (output, context) => {
4027
+ return {
4028
+ MetricValue: smithy_client_1.limitedParseDouble(output.MetricValue),
4029
+ Timestamp: output.Timestamp !== undefined && output.Timestamp !== null
4030
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.Timestamp)))
4031
+ : undefined,
4032
+ };
4033
+ };
4034
+ const deserializeAws_restJson1TimestampMetricValuePairList = (output, context) => {
4035
+ return (output || [])
4036
+ .filter((e) => e != null)
4037
+ .map((entry) => {
4038
+ if (entry === null) {
4039
+ return null;
4040
+ }
4041
+ return deserializeAws_restJson1TimestampMetricValuePair(entry, context);
4042
+ });
4043
+ };
3292
4044
  const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
3293
4045
  return {
3294
4046
  Message: smithy_client_1.expectString(output.Message),