@aws-sdk/client-trustedadvisor 3.490.0 → 3.496.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 (30) hide show
  1. package/dist-cjs/TrustedAdvisor.js +1 -31
  2. package/dist-cjs/TrustedAdvisorClient.js +1 -43
  3. package/dist-cjs/commands/GetOrganizationRecommendationCommand.js +1 -29
  4. package/dist-cjs/commands/GetRecommendationCommand.js +1 -29
  5. package/dist-cjs/commands/ListChecksCommand.js +1 -28
  6. package/dist-cjs/commands/ListOrganizationRecommendationAccountsCommand.js +1 -29
  7. package/dist-cjs/commands/ListOrganizationRecommendationResourcesCommand.js +1 -28
  8. package/dist-cjs/commands/ListOrganizationRecommendationsCommand.js +1 -28
  9. package/dist-cjs/commands/ListRecommendationResourcesCommand.js +1 -28
  10. package/dist-cjs/commands/ListRecommendationsCommand.js +1 -28
  11. package/dist-cjs/commands/UpdateOrganizationRecommendationLifecycleCommand.js +1 -29
  12. package/dist-cjs/commands/UpdateRecommendationLifecycleCommand.js +1 -29
  13. package/dist-cjs/commands/index.js +1 -13
  14. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  15. package/dist-cjs/extensionConfiguration.js +1 -2
  16. package/dist-cjs/index.js +1594 -11
  17. package/dist-cjs/models/TrustedAdvisorServiceException.js +1 -12
  18. package/dist-cjs/models/index.js +1 -4
  19. package/dist-cjs/models/models_0.js +1 -202
  20. package/dist-cjs/pagination/Interfaces.js +1 -2
  21. package/dist-cjs/pagination/ListChecksPaginator.js +1 -7
  22. package/dist-cjs/pagination/ListOrganizationRecommendationAccountsPaginator.js +1 -7
  23. package/dist-cjs/pagination/ListOrganizationRecommendationResourcesPaginator.js +1 -7
  24. package/dist-cjs/pagination/ListOrganizationRecommendationsPaginator.js +1 -7
  25. package/dist-cjs/pagination/ListRecommendationResourcesPaginator.js +1 -7
  26. package/dist-cjs/pagination/ListRecommendationsPaginator.js +1 -7
  27. package/dist-cjs/pagination/index.js +1 -10
  28. package/dist-cjs/protocols/Aws_restJson1.js +1 -953
  29. package/dist-cjs/runtimeExtensions.js +1 -22
  30. package/package.json +40 -40
package/dist-cjs/index.js CHANGED
@@ -1,12 +1,1595 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TrustedAdvisorServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./TrustedAdvisorClient"), exports);
6
- tslib_1.__exportStar(require("./TrustedAdvisor"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./models"), exports);
10
- require("@aws-sdk/util-endpoints");
11
- var TrustedAdvisorServiceException_1 = require("./models/TrustedAdvisorServiceException");
12
- Object.defineProperty(exports, "TrustedAdvisorServiceException", { enumerable: true, get: function () { return TrustedAdvisorServiceException_1.TrustedAdvisorServiceException; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ AccessDeniedException: () => AccessDeniedException,
25
+ AccountRecommendationLifecycleSummaryFilterSensitiveLog: () => AccountRecommendationLifecycleSummaryFilterSensitiveLog,
26
+ ConflictException: () => ConflictException,
27
+ GetOrganizationRecommendationCommand: () => GetOrganizationRecommendationCommand,
28
+ GetOrganizationRecommendationResponseFilterSensitiveLog: () => GetOrganizationRecommendationResponseFilterSensitiveLog,
29
+ GetRecommendationCommand: () => GetRecommendationCommand,
30
+ GetRecommendationResponseFilterSensitiveLog: () => GetRecommendationResponseFilterSensitiveLog,
31
+ InternalServerException: () => InternalServerException,
32
+ ListChecksCommand: () => ListChecksCommand,
33
+ ListOrganizationRecommendationAccountsCommand: () => ListOrganizationRecommendationAccountsCommand,
34
+ ListOrganizationRecommendationAccountsResponseFilterSensitiveLog: () => ListOrganizationRecommendationAccountsResponseFilterSensitiveLog,
35
+ ListOrganizationRecommendationResourcesCommand: () => ListOrganizationRecommendationResourcesCommand,
36
+ ListOrganizationRecommendationsCommand: () => ListOrganizationRecommendationsCommand,
37
+ ListRecommendationResourcesCommand: () => ListRecommendationResourcesCommand,
38
+ ListRecommendationsCommand: () => ListRecommendationsCommand,
39
+ OrganizationRecommendationFilterSensitiveLog: () => OrganizationRecommendationFilterSensitiveLog,
40
+ RecommendationFilterSensitiveLog: () => RecommendationFilterSensitiveLog,
41
+ RecommendationLanguage: () => RecommendationLanguage,
42
+ RecommendationLifecycleStage: () => RecommendationLifecycleStage,
43
+ RecommendationPillar: () => RecommendationPillar,
44
+ RecommendationSource: () => RecommendationSource,
45
+ RecommendationStatus: () => RecommendationStatus,
46
+ RecommendationType: () => RecommendationType,
47
+ ResourceNotFoundException: () => ResourceNotFoundException,
48
+ ResourceStatus: () => ResourceStatus,
49
+ ThrottlingException: () => ThrottlingException,
50
+ TrustedAdvisor: () => TrustedAdvisor,
51
+ TrustedAdvisorClient: () => TrustedAdvisorClient,
52
+ TrustedAdvisorServiceException: () => TrustedAdvisorServiceException,
53
+ UpdateOrganizationRecommendationLifecycleCommand: () => UpdateOrganizationRecommendationLifecycleCommand,
54
+ UpdateOrganizationRecommendationLifecycleRequestFilterSensitiveLog: () => UpdateOrganizationRecommendationLifecycleRequestFilterSensitiveLog,
55
+ UpdateRecommendationLifecycleCommand: () => UpdateRecommendationLifecycleCommand,
56
+ UpdateRecommendationLifecycleRequestFilterSensitiveLog: () => UpdateRecommendationLifecycleRequestFilterSensitiveLog,
57
+ UpdateRecommendationLifecycleStage: () => UpdateRecommendationLifecycleStage,
58
+ UpdateRecommendationLifecycleStageReasonCode: () => UpdateRecommendationLifecycleStageReasonCode,
59
+ ValidationException: () => ValidationException,
60
+ __Client: () => import_smithy_client.Client,
61
+ paginateListChecks: () => paginateListChecks,
62
+ paginateListOrganizationRecommendationAccounts: () => paginateListOrganizationRecommendationAccounts,
63
+ paginateListOrganizationRecommendationResources: () => paginateListOrganizationRecommendationResources,
64
+ paginateListOrganizationRecommendations: () => paginateListOrganizationRecommendations,
65
+ paginateListRecommendationResources: () => paginateListRecommendationResources,
66
+ paginateListRecommendations: () => paginateListRecommendations
67
+ });
68
+ module.exports = __toCommonJS(src_exports);
69
+
70
+ // src/TrustedAdvisorClient.ts
71
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
72
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
73
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
74
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
75
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
76
+ var import_config_resolver = require("@smithy/config-resolver");
77
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
78
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
79
+ var import_middleware_retry = require("@smithy/middleware-retry");
80
+
81
+
82
+ // src/endpoint/EndpointParameters.ts
83
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
84
+ return {
85
+ ...options,
86
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
87
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
88
+ defaultSigningName: "trustedadvisor"
89
+ };
90
+ }, "resolveClientEndpointParameters");
91
+ var commonParams = {
92
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
93
+ Endpoint: { type: "builtInParams", name: "endpoint" },
94
+ Region: { type: "builtInParams", name: "region" },
95
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
96
+ };
97
+
98
+ // src/TrustedAdvisorClient.ts
99
+ var import_runtimeConfig = require("././runtimeConfig");
100
+
101
+ // src/runtimeExtensions.ts
102
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
103
+ var import_protocol_http = require("@smithy/protocol-http");
104
+ var import_smithy_client = require("@smithy/smithy-client");
105
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
106
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
107
+ const extensionConfiguration = {
108
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
109
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
110
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
111
+ };
112
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
113
+ return {
114
+ ...runtimeConfig,
115
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
116
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
117
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
118
+ };
119
+ }, "resolveRuntimeExtensions");
120
+
121
+ // src/TrustedAdvisorClient.ts
122
+ var _TrustedAdvisorClient = class _TrustedAdvisorClient extends import_smithy_client.Client {
123
+ constructor(...[configuration]) {
124
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
125
+ const _config_1 = resolveClientEndpointParameters(_config_0);
126
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
127
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
128
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
129
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
130
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
131
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
132
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
133
+ super(_config_8);
134
+ this.config = _config_8;
135
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
136
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
137
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
138
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
139
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
140
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
141
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
142
+ }
143
+ /**
144
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
145
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
146
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
147
+ */
148
+ destroy() {
149
+ super.destroy();
150
+ }
151
+ };
152
+ __name(_TrustedAdvisorClient, "TrustedAdvisorClient");
153
+ var TrustedAdvisorClient = _TrustedAdvisorClient;
154
+
155
+ // src/TrustedAdvisor.ts
156
+
157
+
158
+ // src/commands/GetOrganizationRecommendationCommand.ts
159
+
160
+ var import_middleware_serde = require("@smithy/middleware-serde");
161
+
162
+ var import_types = require("@smithy/types");
163
+
164
+ // src/models/models_0.ts
165
+
166
+
167
+ // src/models/TrustedAdvisorServiceException.ts
168
+
169
+ var _TrustedAdvisorServiceException = class _TrustedAdvisorServiceException extends import_smithy_client.ServiceException {
170
+ /**
171
+ * @internal
172
+ */
173
+ constructor(options) {
174
+ super(options);
175
+ Object.setPrototypeOf(this, _TrustedAdvisorServiceException.prototype);
176
+ }
177
+ };
178
+ __name(_TrustedAdvisorServiceException, "TrustedAdvisorServiceException");
179
+ var TrustedAdvisorServiceException = _TrustedAdvisorServiceException;
180
+
181
+ // src/models/models_0.ts
182
+ var _AccessDeniedException = class _AccessDeniedException extends TrustedAdvisorServiceException {
183
+ /**
184
+ * @internal
185
+ */
186
+ constructor(opts) {
187
+ super({
188
+ name: "AccessDeniedException",
189
+ $fault: "client",
190
+ ...opts
191
+ });
192
+ this.name = "AccessDeniedException";
193
+ this.$fault = "client";
194
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
195
+ }
196
+ };
197
+ __name(_AccessDeniedException, "AccessDeniedException");
198
+ var AccessDeniedException = _AccessDeniedException;
199
+ var RecommendationLifecycleStage = {
200
+ DISMISSED: "dismissed",
201
+ IN_PROGRESS: "in_progress",
202
+ PENDING_RESPONSE: "pending_response",
203
+ RESOLVED: "resolved"
204
+ };
205
+ var UpdateRecommendationLifecycleStageReasonCode = {
206
+ LOW_PRIORITY: "low_priority",
207
+ NON_CRITICAL_ACCOUNT: "non_critical_account",
208
+ NOT_APPLICABLE: "not_applicable",
209
+ OTHER: "other",
210
+ OTHER_METHODS_AVAILABLE: "other_methods_available",
211
+ TEMPORARY_ACCOUNT: "temporary_account",
212
+ VALID_BUSINESS_CASE: "valid_business_case"
213
+ };
214
+ var RecommendationPillar = {
215
+ COST_OPTIMIZING: "cost_optimizing",
216
+ FAULT_TOLERANCE: "fault_tolerance",
217
+ OPERATIONAL_EXCELLENCE: "operational_excellence",
218
+ PERFORMANCE: "performance",
219
+ SECURITY: "security",
220
+ SERVICE_LIMITS: "service_limits"
221
+ };
222
+ var RecommendationSource = {
223
+ AWS_CONFIG: "aws_config",
224
+ COMPUTE_OPTIMIZER: "compute_optimizer",
225
+ COST_EXPLORER: "cost_explorer",
226
+ LSE: "lse",
227
+ MANUAL: "manual",
228
+ PSE: "pse",
229
+ RDS: "rds",
230
+ RESILIENCE: "resilience",
231
+ RESILIENCE_HUB: "resilience_hub",
232
+ SECURITY_HUB: "security_hub",
233
+ STIR: "stir",
234
+ TA_CHECK: "ta_check",
235
+ WELL_ARCHITECTED: "well_architected"
236
+ };
237
+ var _ConflictException = class _ConflictException extends TrustedAdvisorServiceException {
238
+ /**
239
+ * @internal
240
+ */
241
+ constructor(opts) {
242
+ super({
243
+ name: "ConflictException",
244
+ $fault: "client",
245
+ ...opts
246
+ });
247
+ this.name = "ConflictException";
248
+ this.$fault = "client";
249
+ Object.setPrototypeOf(this, _ConflictException.prototype);
250
+ }
251
+ };
252
+ __name(_ConflictException, "ConflictException");
253
+ var ConflictException = _ConflictException;
254
+ var RecommendationStatus = {
255
+ ERROR: "error",
256
+ OK: "ok",
257
+ WARNING: "warning"
258
+ };
259
+ var RecommendationType = {
260
+ PRIORITY: "priority",
261
+ STANDARD: "standard"
262
+ };
263
+ var _InternalServerException = class _InternalServerException extends TrustedAdvisorServiceException {
264
+ /**
265
+ * @internal
266
+ */
267
+ constructor(opts) {
268
+ super({
269
+ name: "InternalServerException",
270
+ $fault: "server",
271
+ ...opts
272
+ });
273
+ this.name = "InternalServerException";
274
+ this.$fault = "server";
275
+ this.$retryable = {};
276
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
277
+ }
278
+ };
279
+ __name(_InternalServerException, "InternalServerException");
280
+ var InternalServerException = _InternalServerException;
281
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends TrustedAdvisorServiceException {
282
+ /**
283
+ * @internal
284
+ */
285
+ constructor(opts) {
286
+ super({
287
+ name: "ResourceNotFoundException",
288
+ $fault: "client",
289
+ ...opts
290
+ });
291
+ this.name = "ResourceNotFoundException";
292
+ this.$fault = "client";
293
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
294
+ }
295
+ };
296
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
297
+ var ResourceNotFoundException = _ResourceNotFoundException;
298
+ var _ThrottlingException = class _ThrottlingException extends TrustedAdvisorServiceException {
299
+ /**
300
+ * @internal
301
+ */
302
+ constructor(opts) {
303
+ super({
304
+ name: "ThrottlingException",
305
+ $fault: "client",
306
+ ...opts
307
+ });
308
+ this.name = "ThrottlingException";
309
+ this.$fault = "client";
310
+ this.$retryable = {
311
+ throttling: true
312
+ };
313
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
314
+ }
315
+ };
316
+ __name(_ThrottlingException, "ThrottlingException");
317
+ var ThrottlingException = _ThrottlingException;
318
+ var _ValidationException = class _ValidationException extends TrustedAdvisorServiceException {
319
+ /**
320
+ * @internal
321
+ */
322
+ constructor(opts) {
323
+ super({
324
+ name: "ValidationException",
325
+ $fault: "client",
326
+ ...opts
327
+ });
328
+ this.name = "ValidationException";
329
+ this.$fault = "client";
330
+ Object.setPrototypeOf(this, _ValidationException.prototype);
331
+ }
332
+ };
333
+ __name(_ValidationException, "ValidationException");
334
+ var ValidationException = _ValidationException;
335
+ var RecommendationLanguage = {
336
+ BAHASA_INDONESIA: "id",
337
+ BRAZILIAN_PORTUGUESE: "pt_BR",
338
+ CHINESE: "zh",
339
+ ENGLISH: "en",
340
+ FRENCH: "fr",
341
+ GERMAN: "de",
342
+ ITALIAN: "it",
343
+ JAPANESE: "ja",
344
+ KOREAN: "ko",
345
+ SPANISH: "es",
346
+ TRADITIONAL_CHINESE: "zh_TW"
347
+ };
348
+ var ResourceStatus = {
349
+ ERROR: "error",
350
+ OK: "ok",
351
+ WARNING: "warning"
352
+ };
353
+ var UpdateRecommendationLifecycleStage = {
354
+ DISMISSED: "dismissed",
355
+ IN_PROGRESS: "in_progress",
356
+ PENDING_RESPONSE: "pending_response",
357
+ RESOLVED: "resolved"
358
+ };
359
+ var AccountRecommendationLifecycleSummaryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
360
+ ...obj,
361
+ ...obj.updateReason && { updateReason: import_smithy_client.SENSITIVE_STRING }
362
+ }), "AccountRecommendationLifecycleSummaryFilterSensitiveLog");
363
+ var OrganizationRecommendationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
364
+ ...obj,
365
+ ...obj.updateReason && { updateReason: import_smithy_client.SENSITIVE_STRING }
366
+ }), "OrganizationRecommendationFilterSensitiveLog");
367
+ var GetOrganizationRecommendationResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
368
+ ...obj,
369
+ ...obj.organizationRecommendation && {
370
+ organizationRecommendation: OrganizationRecommendationFilterSensitiveLog(obj.organizationRecommendation)
371
+ }
372
+ }), "GetOrganizationRecommendationResponseFilterSensitiveLog");
373
+ var RecommendationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
374
+ ...obj,
375
+ ...obj.updateReason && { updateReason: import_smithy_client.SENSITIVE_STRING }
376
+ }), "RecommendationFilterSensitiveLog");
377
+ var GetRecommendationResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
378
+ ...obj,
379
+ ...obj.recommendation && { recommendation: RecommendationFilterSensitiveLog(obj.recommendation) }
380
+ }), "GetRecommendationResponseFilterSensitiveLog");
381
+ var ListOrganizationRecommendationAccountsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
382
+ ...obj,
383
+ ...obj.accountRecommendationLifecycleSummaries && {
384
+ accountRecommendationLifecycleSummaries: obj.accountRecommendationLifecycleSummaries.map(
385
+ (item) => AccountRecommendationLifecycleSummaryFilterSensitiveLog(item)
386
+ )
387
+ }
388
+ }), "ListOrganizationRecommendationAccountsResponseFilterSensitiveLog");
389
+ var UpdateOrganizationRecommendationLifecycleRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
390
+ ...obj,
391
+ ...obj.updateReason && { updateReason: import_smithy_client.SENSITIVE_STRING }
392
+ }), "UpdateOrganizationRecommendationLifecycleRequestFilterSensitiveLog");
393
+ var UpdateRecommendationLifecycleRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
394
+ ...obj,
395
+ ...obj.updateReason && { updateReason: import_smithy_client.SENSITIVE_STRING }
396
+ }), "UpdateRecommendationLifecycleRequestFilterSensitiveLog");
397
+
398
+ // src/protocols/Aws_restJson1.ts
399
+ var import_core = require("@smithy/core");
400
+
401
+ var se_GetOrganizationRecommendationCommand = /* @__PURE__ */ __name(async (input, context) => {
402
+ const b = (0, import_core.requestBuilder)(input, context);
403
+ const headers = {};
404
+ b.bp("/v1/organization-recommendations/{organizationRecommendationIdentifier}");
405
+ b.p(
406
+ "organizationRecommendationIdentifier",
407
+ () => input.organizationRecommendationIdentifier,
408
+ "{organizationRecommendationIdentifier}",
409
+ false
410
+ );
411
+ let body;
412
+ b.m("GET").h(headers).b(body);
413
+ return b.build();
414
+ }, "se_GetOrganizationRecommendationCommand");
415
+ var se_GetRecommendationCommand = /* @__PURE__ */ __name(async (input, context) => {
416
+ const b = (0, import_core.requestBuilder)(input, context);
417
+ const headers = {};
418
+ b.bp("/v1/recommendations/{recommendationIdentifier}");
419
+ b.p("recommendationIdentifier", () => input.recommendationIdentifier, "{recommendationIdentifier}", false);
420
+ let body;
421
+ b.m("GET").h(headers).b(body);
422
+ return b.build();
423
+ }, "se_GetRecommendationCommand");
424
+ var se_ListChecksCommand = /* @__PURE__ */ __name(async (input, context) => {
425
+ const b = (0, import_core.requestBuilder)(input, context);
426
+ const headers = {};
427
+ b.bp("/v1/checks");
428
+ const query = (0, import_smithy_client.map)({
429
+ [_nT]: [, input[_nT]],
430
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
431
+ [_p]: [, input[_p]],
432
+ [_aS]: [, input[_aS]],
433
+ [_s]: [, input[_s]],
434
+ [_l]: [, input[_l]]
435
+ });
436
+ let body;
437
+ b.m("GET").h(headers).q(query).b(body);
438
+ return b.build();
439
+ }, "se_ListChecksCommand");
440
+ var se_ListOrganizationRecommendationAccountsCommand = /* @__PURE__ */ __name(async (input, context) => {
441
+ const b = (0, import_core.requestBuilder)(input, context);
442
+ const headers = {};
443
+ b.bp("/v1/organization-recommendations/{organizationRecommendationIdentifier}/accounts");
444
+ b.p(
445
+ "organizationRecommendationIdentifier",
446
+ () => input.organizationRecommendationIdentifier,
447
+ "{organizationRecommendationIdentifier}",
448
+ false
449
+ );
450
+ const query = (0, import_smithy_client.map)({
451
+ [_nT]: [, input[_nT]],
452
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
453
+ [_aAI]: [, input[_aAI]]
454
+ });
455
+ let body;
456
+ b.m("GET").h(headers).q(query).b(body);
457
+ return b.build();
458
+ }, "se_ListOrganizationRecommendationAccountsCommand");
459
+ var se_ListOrganizationRecommendationResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {
460
+ const b = (0, import_core.requestBuilder)(input, context);
461
+ const headers = {};
462
+ b.bp("/v1/organization-recommendations/{organizationRecommendationIdentifier}/resources");
463
+ b.p(
464
+ "organizationRecommendationIdentifier",
465
+ () => input.organizationRecommendationIdentifier,
466
+ "{organizationRecommendationIdentifier}",
467
+ false
468
+ );
469
+ const query = (0, import_smithy_client.map)({
470
+ [_nT]: [, input[_nT]],
471
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
472
+ [_st]: [, input[_st]],
473
+ [_rC]: [, input[_rC]],
474
+ [_aAI]: [, input[_aAI]]
475
+ });
476
+ let body;
477
+ b.m("GET").h(headers).q(query).b(body);
478
+ return b.build();
479
+ }, "se_ListOrganizationRecommendationResourcesCommand");
480
+ var se_ListOrganizationRecommendationsCommand = /* @__PURE__ */ __name(async (input, context) => {
481
+ const b = (0, import_core.requestBuilder)(input, context);
482
+ const headers = {};
483
+ b.bp("/v1/organization-recommendations");
484
+ const query = (0, import_smithy_client.map)({
485
+ [_nT]: [, input[_nT]],
486
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
487
+ [_t]: [, input[_t]],
488
+ [_st]: [, input[_st]],
489
+ [_p]: [, input[_p]],
490
+ [_aS]: [, input[_aS]],
491
+ [_s]: [, input[_s]],
492
+ [_cI]: [, input[_cI]],
493
+ [_aLUA]: [
494
+ () => input.afterLastUpdatedAt !== void 0,
495
+ () => (input[_aLUA].toISOString().split(".")[0] + "Z").toString()
496
+ ],
497
+ [_bLUA]: [
498
+ () => input.beforeLastUpdatedAt !== void 0,
499
+ () => (input[_bLUA].toISOString().split(".")[0] + "Z").toString()
500
+ ]
501
+ });
502
+ let body;
503
+ b.m("GET").h(headers).q(query).b(body);
504
+ return b.build();
505
+ }, "se_ListOrganizationRecommendationsCommand");
506
+ var se_ListRecommendationResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {
507
+ const b = (0, import_core.requestBuilder)(input, context);
508
+ const headers = {};
509
+ b.bp("/v1/recommendations/{recommendationIdentifier}/resources");
510
+ b.p("recommendationIdentifier", () => input.recommendationIdentifier, "{recommendationIdentifier}", false);
511
+ const query = (0, import_smithy_client.map)({
512
+ [_nT]: [, input[_nT]],
513
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
514
+ [_st]: [, input[_st]],
515
+ [_rC]: [, input[_rC]]
516
+ });
517
+ let body;
518
+ b.m("GET").h(headers).q(query).b(body);
519
+ return b.build();
520
+ }, "se_ListRecommendationResourcesCommand");
521
+ var se_ListRecommendationsCommand = /* @__PURE__ */ __name(async (input, context) => {
522
+ const b = (0, import_core.requestBuilder)(input, context);
523
+ const headers = {};
524
+ b.bp("/v1/recommendations");
525
+ const query = (0, import_smithy_client.map)({
526
+ [_nT]: [, input[_nT]],
527
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
528
+ [_t]: [, input[_t]],
529
+ [_st]: [, input[_st]],
530
+ [_p]: [, input[_p]],
531
+ [_aS]: [, input[_aS]],
532
+ [_s]: [, input[_s]],
533
+ [_cI]: [, input[_cI]],
534
+ [_aLUA]: [
535
+ () => input.afterLastUpdatedAt !== void 0,
536
+ () => (input[_aLUA].toISOString().split(".")[0] + "Z").toString()
537
+ ],
538
+ [_bLUA]: [
539
+ () => input.beforeLastUpdatedAt !== void 0,
540
+ () => (input[_bLUA].toISOString().split(".")[0] + "Z").toString()
541
+ ]
542
+ });
543
+ let body;
544
+ b.m("GET").h(headers).q(query).b(body);
545
+ return b.build();
546
+ }, "se_ListRecommendationsCommand");
547
+ var se_UpdateOrganizationRecommendationLifecycleCommand = /* @__PURE__ */ __name(async (input, context) => {
548
+ const b = (0, import_core.requestBuilder)(input, context);
549
+ const headers = {
550
+ "content-type": "application/json"
551
+ };
552
+ b.bp("/v1/organization-recommendations/{organizationRecommendationIdentifier}/lifecycle");
553
+ b.p(
554
+ "organizationRecommendationIdentifier",
555
+ () => input.organizationRecommendationIdentifier,
556
+ "{organizationRecommendationIdentifier}",
557
+ false
558
+ );
559
+ let body;
560
+ body = JSON.stringify(
561
+ (0, import_smithy_client.take)(input, {
562
+ lifecycleStage: [],
563
+ updateReason: [],
564
+ updateReasonCode: []
565
+ })
566
+ );
567
+ b.m("PUT").h(headers).b(body);
568
+ return b.build();
569
+ }, "se_UpdateOrganizationRecommendationLifecycleCommand");
570
+ var se_UpdateRecommendationLifecycleCommand = /* @__PURE__ */ __name(async (input, context) => {
571
+ const b = (0, import_core.requestBuilder)(input, context);
572
+ const headers = {
573
+ "content-type": "application/json"
574
+ };
575
+ b.bp("/v1/recommendations/{recommendationIdentifier}/lifecycle");
576
+ b.p("recommendationIdentifier", () => input.recommendationIdentifier, "{recommendationIdentifier}", false);
577
+ let body;
578
+ body = JSON.stringify(
579
+ (0, import_smithy_client.take)(input, {
580
+ lifecycleStage: [],
581
+ updateReason: [],
582
+ updateReasonCode: []
583
+ })
584
+ );
585
+ b.m("PUT").h(headers).b(body);
586
+ return b.build();
587
+ }, "se_UpdateRecommendationLifecycleCommand");
588
+ var de_GetOrganizationRecommendationCommand = /* @__PURE__ */ __name(async (output, context) => {
589
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
590
+ return de_GetOrganizationRecommendationCommandError(output, context);
591
+ }
592
+ const contents = (0, import_smithy_client.map)({
593
+ $metadata: deserializeMetadata(output)
594
+ });
595
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
596
+ const doc = (0, import_smithy_client.take)(data, {
597
+ organizationRecommendation: (_) => de_OrganizationRecommendation(_, context)
598
+ });
599
+ Object.assign(contents, doc);
600
+ return contents;
601
+ }, "de_GetOrganizationRecommendationCommand");
602
+ var de_GetOrganizationRecommendationCommandError = /* @__PURE__ */ __name(async (output, context) => {
603
+ const parsedOutput = {
604
+ ...output,
605
+ body: await parseErrorBody(output.body, context)
606
+ };
607
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
608
+ switch (errorCode) {
609
+ case "AccessDeniedException":
610
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
611
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
612
+ case "InternalServerException":
613
+ case "com.amazonaws.trustedadvisor#InternalServerException":
614
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
615
+ case "ResourceNotFoundException":
616
+ case "com.amazonaws.trustedadvisor#ResourceNotFoundException":
617
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
618
+ case "ThrottlingException":
619
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
620
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
621
+ case "ValidationException":
622
+ case "com.amazonaws.trustedadvisor#ValidationException":
623
+ throw await de_ValidationExceptionRes(parsedOutput, context);
624
+ default:
625
+ const parsedBody = parsedOutput.body;
626
+ return throwDefaultError({
627
+ output,
628
+ parsedBody,
629
+ errorCode
630
+ });
631
+ }
632
+ }, "de_GetOrganizationRecommendationCommandError");
633
+ var de_GetRecommendationCommand = /* @__PURE__ */ __name(async (output, context) => {
634
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
635
+ return de_GetRecommendationCommandError(output, context);
636
+ }
637
+ const contents = (0, import_smithy_client.map)({
638
+ $metadata: deserializeMetadata(output)
639
+ });
640
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
641
+ const doc = (0, import_smithy_client.take)(data, {
642
+ recommendation: (_) => de_Recommendation(_, context)
643
+ });
644
+ Object.assign(contents, doc);
645
+ return contents;
646
+ }, "de_GetRecommendationCommand");
647
+ var de_GetRecommendationCommandError = /* @__PURE__ */ __name(async (output, context) => {
648
+ const parsedOutput = {
649
+ ...output,
650
+ body: await parseErrorBody(output.body, context)
651
+ };
652
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
653
+ switch (errorCode) {
654
+ case "AccessDeniedException":
655
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
656
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
657
+ case "InternalServerException":
658
+ case "com.amazonaws.trustedadvisor#InternalServerException":
659
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
660
+ case "ResourceNotFoundException":
661
+ case "com.amazonaws.trustedadvisor#ResourceNotFoundException":
662
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
663
+ case "ThrottlingException":
664
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
665
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
666
+ case "ValidationException":
667
+ case "com.amazonaws.trustedadvisor#ValidationException":
668
+ throw await de_ValidationExceptionRes(parsedOutput, context);
669
+ default:
670
+ const parsedBody = parsedOutput.body;
671
+ return throwDefaultError({
672
+ output,
673
+ parsedBody,
674
+ errorCode
675
+ });
676
+ }
677
+ }, "de_GetRecommendationCommandError");
678
+ var de_ListChecksCommand = /* @__PURE__ */ __name(async (output, context) => {
679
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
680
+ return de_ListChecksCommandError(output, context);
681
+ }
682
+ const contents = (0, import_smithy_client.map)({
683
+ $metadata: deserializeMetadata(output)
684
+ });
685
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
686
+ const doc = (0, import_smithy_client.take)(data, {
687
+ checkSummaries: import_smithy_client._json,
688
+ nextToken: import_smithy_client.expectString
689
+ });
690
+ Object.assign(contents, doc);
691
+ return contents;
692
+ }, "de_ListChecksCommand");
693
+ var de_ListChecksCommandError = /* @__PURE__ */ __name(async (output, context) => {
694
+ const parsedOutput = {
695
+ ...output,
696
+ body: await parseErrorBody(output.body, context)
697
+ };
698
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
+ switch (errorCode) {
700
+ case "AccessDeniedException":
701
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
702
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
703
+ case "InternalServerException":
704
+ case "com.amazonaws.trustedadvisor#InternalServerException":
705
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
706
+ case "ThrottlingException":
707
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
708
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
709
+ case "ValidationException":
710
+ case "com.amazonaws.trustedadvisor#ValidationException":
711
+ throw await de_ValidationExceptionRes(parsedOutput, context);
712
+ default:
713
+ const parsedBody = parsedOutput.body;
714
+ return throwDefaultError({
715
+ output,
716
+ parsedBody,
717
+ errorCode
718
+ });
719
+ }
720
+ }, "de_ListChecksCommandError");
721
+ var de_ListOrganizationRecommendationAccountsCommand = /* @__PURE__ */ __name(async (output, context) => {
722
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
723
+ return de_ListOrganizationRecommendationAccountsCommandError(output, context);
724
+ }
725
+ const contents = (0, import_smithy_client.map)({
726
+ $metadata: deserializeMetadata(output)
727
+ });
728
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
729
+ const doc = (0, import_smithy_client.take)(data, {
730
+ accountRecommendationLifecycleSummaries: (_) => de_AccountRecommendationLifecycleSummaryList(_, context),
731
+ nextToken: import_smithy_client.expectString
732
+ });
733
+ Object.assign(contents, doc);
734
+ return contents;
735
+ }, "de_ListOrganizationRecommendationAccountsCommand");
736
+ var de_ListOrganizationRecommendationAccountsCommandError = /* @__PURE__ */ __name(async (output, context) => {
737
+ const parsedOutput = {
738
+ ...output,
739
+ body: await parseErrorBody(output.body, context)
740
+ };
741
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
742
+ switch (errorCode) {
743
+ case "AccessDeniedException":
744
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
745
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
746
+ case "InternalServerException":
747
+ case "com.amazonaws.trustedadvisor#InternalServerException":
748
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
749
+ case "ResourceNotFoundException":
750
+ case "com.amazonaws.trustedadvisor#ResourceNotFoundException":
751
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
752
+ case "ThrottlingException":
753
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
754
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
755
+ case "ValidationException":
756
+ case "com.amazonaws.trustedadvisor#ValidationException":
757
+ throw await de_ValidationExceptionRes(parsedOutput, context);
758
+ default:
759
+ const parsedBody = parsedOutput.body;
760
+ return throwDefaultError({
761
+ output,
762
+ parsedBody,
763
+ errorCode
764
+ });
765
+ }
766
+ }, "de_ListOrganizationRecommendationAccountsCommandError");
767
+ var de_ListOrganizationRecommendationResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
768
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
769
+ return de_ListOrganizationRecommendationResourcesCommandError(output, context);
770
+ }
771
+ const contents = (0, import_smithy_client.map)({
772
+ $metadata: deserializeMetadata(output)
773
+ });
774
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
775
+ const doc = (0, import_smithy_client.take)(data, {
776
+ nextToken: import_smithy_client.expectString,
777
+ organizationRecommendationResourceSummaries: (_) => de_OrganizationRecommendationResourceSummaryList(_, context)
778
+ });
779
+ Object.assign(contents, doc);
780
+ return contents;
781
+ }, "de_ListOrganizationRecommendationResourcesCommand");
782
+ var de_ListOrganizationRecommendationResourcesCommandError = /* @__PURE__ */ __name(async (output, context) => {
783
+ const parsedOutput = {
784
+ ...output,
785
+ body: await parseErrorBody(output.body, context)
786
+ };
787
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
788
+ switch (errorCode) {
789
+ case "AccessDeniedException":
790
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
791
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
792
+ case "InternalServerException":
793
+ case "com.amazonaws.trustedadvisor#InternalServerException":
794
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
795
+ case "ResourceNotFoundException":
796
+ case "com.amazonaws.trustedadvisor#ResourceNotFoundException":
797
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
798
+ case "ThrottlingException":
799
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
800
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
801
+ case "ValidationException":
802
+ case "com.amazonaws.trustedadvisor#ValidationException":
803
+ throw await de_ValidationExceptionRes(parsedOutput, context);
804
+ default:
805
+ const parsedBody = parsedOutput.body;
806
+ return throwDefaultError({
807
+ output,
808
+ parsedBody,
809
+ errorCode
810
+ });
811
+ }
812
+ }, "de_ListOrganizationRecommendationResourcesCommandError");
813
+ var de_ListOrganizationRecommendationsCommand = /* @__PURE__ */ __name(async (output, context) => {
814
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
815
+ return de_ListOrganizationRecommendationsCommandError(output, context);
816
+ }
817
+ const contents = (0, import_smithy_client.map)({
818
+ $metadata: deserializeMetadata(output)
819
+ });
820
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
821
+ const doc = (0, import_smithy_client.take)(data, {
822
+ nextToken: import_smithy_client.expectString,
823
+ organizationRecommendationSummaries: (_) => de_OrganizationRecommendationSummaryList(_, context)
824
+ });
825
+ Object.assign(contents, doc);
826
+ return contents;
827
+ }, "de_ListOrganizationRecommendationsCommand");
828
+ var de_ListOrganizationRecommendationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
829
+ const parsedOutput = {
830
+ ...output,
831
+ body: await parseErrorBody(output.body, context)
832
+ };
833
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
834
+ switch (errorCode) {
835
+ case "AccessDeniedException":
836
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
837
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
838
+ case "InternalServerException":
839
+ case "com.amazonaws.trustedadvisor#InternalServerException":
840
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
841
+ case "ThrottlingException":
842
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
843
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
844
+ case "ValidationException":
845
+ case "com.amazonaws.trustedadvisor#ValidationException":
846
+ throw await de_ValidationExceptionRes(parsedOutput, context);
847
+ default:
848
+ const parsedBody = parsedOutput.body;
849
+ return throwDefaultError({
850
+ output,
851
+ parsedBody,
852
+ errorCode
853
+ });
854
+ }
855
+ }, "de_ListOrganizationRecommendationsCommandError");
856
+ var de_ListRecommendationResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {
857
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
858
+ return de_ListRecommendationResourcesCommandError(output, context);
859
+ }
860
+ const contents = (0, import_smithy_client.map)({
861
+ $metadata: deserializeMetadata(output)
862
+ });
863
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
864
+ const doc = (0, import_smithy_client.take)(data, {
865
+ nextToken: import_smithy_client.expectString,
866
+ recommendationResourceSummaries: (_) => de_RecommendationResourceSummaryList(_, context)
867
+ });
868
+ Object.assign(contents, doc);
869
+ return contents;
870
+ }, "de_ListRecommendationResourcesCommand");
871
+ var de_ListRecommendationResourcesCommandError = /* @__PURE__ */ __name(async (output, context) => {
872
+ const parsedOutput = {
873
+ ...output,
874
+ body: await parseErrorBody(output.body, context)
875
+ };
876
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
877
+ switch (errorCode) {
878
+ case "AccessDeniedException":
879
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
880
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
881
+ case "InternalServerException":
882
+ case "com.amazonaws.trustedadvisor#InternalServerException":
883
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
884
+ case "ResourceNotFoundException":
885
+ case "com.amazonaws.trustedadvisor#ResourceNotFoundException":
886
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
887
+ case "ThrottlingException":
888
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
889
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
890
+ case "ValidationException":
891
+ case "com.amazonaws.trustedadvisor#ValidationException":
892
+ throw await de_ValidationExceptionRes(parsedOutput, context);
893
+ default:
894
+ const parsedBody = parsedOutput.body;
895
+ return throwDefaultError({
896
+ output,
897
+ parsedBody,
898
+ errorCode
899
+ });
900
+ }
901
+ }, "de_ListRecommendationResourcesCommandError");
902
+ var de_ListRecommendationsCommand = /* @__PURE__ */ __name(async (output, context) => {
903
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
904
+ return de_ListRecommendationsCommandError(output, context);
905
+ }
906
+ const contents = (0, import_smithy_client.map)({
907
+ $metadata: deserializeMetadata(output)
908
+ });
909
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
910
+ const doc = (0, import_smithy_client.take)(data, {
911
+ nextToken: import_smithy_client.expectString,
912
+ recommendationSummaries: (_) => de_RecommendationSummaryList(_, context)
913
+ });
914
+ Object.assign(contents, doc);
915
+ return contents;
916
+ }, "de_ListRecommendationsCommand");
917
+ var de_ListRecommendationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
918
+ const parsedOutput = {
919
+ ...output,
920
+ body: await parseErrorBody(output.body, context)
921
+ };
922
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
923
+ switch (errorCode) {
924
+ case "AccessDeniedException":
925
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
926
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
927
+ case "InternalServerException":
928
+ case "com.amazonaws.trustedadvisor#InternalServerException":
929
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
930
+ case "ThrottlingException":
931
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
932
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
933
+ case "ValidationException":
934
+ case "com.amazonaws.trustedadvisor#ValidationException":
935
+ throw await de_ValidationExceptionRes(parsedOutput, context);
936
+ default:
937
+ const parsedBody = parsedOutput.body;
938
+ return throwDefaultError({
939
+ output,
940
+ parsedBody,
941
+ errorCode
942
+ });
943
+ }
944
+ }, "de_ListRecommendationsCommandError");
945
+ var de_UpdateOrganizationRecommendationLifecycleCommand = /* @__PURE__ */ __name(async (output, context) => {
946
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
947
+ return de_UpdateOrganizationRecommendationLifecycleCommandError(output, context);
948
+ }
949
+ const contents = (0, import_smithy_client.map)({
950
+ $metadata: deserializeMetadata(output)
951
+ });
952
+ await (0, import_smithy_client.collectBody)(output.body, context);
953
+ return contents;
954
+ }, "de_UpdateOrganizationRecommendationLifecycleCommand");
955
+ var de_UpdateOrganizationRecommendationLifecycleCommandError = /* @__PURE__ */ __name(async (output, context) => {
956
+ const parsedOutput = {
957
+ ...output,
958
+ body: await parseErrorBody(output.body, context)
959
+ };
960
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
961
+ switch (errorCode) {
962
+ case "AccessDeniedException":
963
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
964
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
965
+ case "ConflictException":
966
+ case "com.amazonaws.trustedadvisor#ConflictException":
967
+ throw await de_ConflictExceptionRes(parsedOutput, context);
968
+ case "InternalServerException":
969
+ case "com.amazonaws.trustedadvisor#InternalServerException":
970
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
971
+ case "ResourceNotFoundException":
972
+ case "com.amazonaws.trustedadvisor#ResourceNotFoundException":
973
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
974
+ case "ThrottlingException":
975
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
976
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
977
+ case "ValidationException":
978
+ case "com.amazonaws.trustedadvisor#ValidationException":
979
+ throw await de_ValidationExceptionRes(parsedOutput, context);
980
+ default:
981
+ const parsedBody = parsedOutput.body;
982
+ return throwDefaultError({
983
+ output,
984
+ parsedBody,
985
+ errorCode
986
+ });
987
+ }
988
+ }, "de_UpdateOrganizationRecommendationLifecycleCommandError");
989
+ var de_UpdateRecommendationLifecycleCommand = /* @__PURE__ */ __name(async (output, context) => {
990
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
991
+ return de_UpdateRecommendationLifecycleCommandError(output, context);
992
+ }
993
+ const contents = (0, import_smithy_client.map)({
994
+ $metadata: deserializeMetadata(output)
995
+ });
996
+ await (0, import_smithy_client.collectBody)(output.body, context);
997
+ return contents;
998
+ }, "de_UpdateRecommendationLifecycleCommand");
999
+ var de_UpdateRecommendationLifecycleCommandError = /* @__PURE__ */ __name(async (output, context) => {
1000
+ const parsedOutput = {
1001
+ ...output,
1002
+ body: await parseErrorBody(output.body, context)
1003
+ };
1004
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1005
+ switch (errorCode) {
1006
+ case "AccessDeniedException":
1007
+ case "com.amazonaws.trustedadvisor#AccessDeniedException":
1008
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1009
+ case "ConflictException":
1010
+ case "com.amazonaws.trustedadvisor#ConflictException":
1011
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1012
+ case "InternalServerException":
1013
+ case "com.amazonaws.trustedadvisor#InternalServerException":
1014
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1015
+ case "ResourceNotFoundException":
1016
+ case "com.amazonaws.trustedadvisor#ResourceNotFoundException":
1017
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1018
+ case "ThrottlingException":
1019
+ case "com.amazonaws.trustedadvisor#ThrottlingException":
1020
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1021
+ case "ValidationException":
1022
+ case "com.amazonaws.trustedadvisor#ValidationException":
1023
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1024
+ default:
1025
+ const parsedBody = parsedOutput.body;
1026
+ return throwDefaultError({
1027
+ output,
1028
+ parsedBody,
1029
+ errorCode
1030
+ });
1031
+ }
1032
+ }, "de_UpdateRecommendationLifecycleCommandError");
1033
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(TrustedAdvisorServiceException);
1034
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1035
+ const contents = (0, import_smithy_client.map)({});
1036
+ const data = parsedOutput.body;
1037
+ const doc = (0, import_smithy_client.take)(data, {
1038
+ message: import_smithy_client.expectString
1039
+ });
1040
+ Object.assign(contents, doc);
1041
+ const exception = new AccessDeniedException({
1042
+ $metadata: deserializeMetadata(parsedOutput),
1043
+ ...contents
1044
+ });
1045
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1046
+ }, "de_AccessDeniedExceptionRes");
1047
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1048
+ const contents = (0, import_smithy_client.map)({});
1049
+ const data = parsedOutput.body;
1050
+ const doc = (0, import_smithy_client.take)(data, {
1051
+ message: import_smithy_client.expectString
1052
+ });
1053
+ Object.assign(contents, doc);
1054
+ const exception = new ConflictException({
1055
+ $metadata: deserializeMetadata(parsedOutput),
1056
+ ...contents
1057
+ });
1058
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1059
+ }, "de_ConflictExceptionRes");
1060
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1061
+ const contents = (0, import_smithy_client.map)({});
1062
+ const data = parsedOutput.body;
1063
+ const doc = (0, import_smithy_client.take)(data, {
1064
+ message: import_smithy_client.expectString
1065
+ });
1066
+ Object.assign(contents, doc);
1067
+ const exception = new InternalServerException({
1068
+ $metadata: deserializeMetadata(parsedOutput),
1069
+ ...contents
1070
+ });
1071
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1072
+ }, "de_InternalServerExceptionRes");
1073
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1074
+ const contents = (0, import_smithy_client.map)({});
1075
+ const data = parsedOutput.body;
1076
+ const doc = (0, import_smithy_client.take)(data, {
1077
+ message: import_smithy_client.expectString
1078
+ });
1079
+ Object.assign(contents, doc);
1080
+ const exception = new ResourceNotFoundException({
1081
+ $metadata: deserializeMetadata(parsedOutput),
1082
+ ...contents
1083
+ });
1084
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1085
+ }, "de_ResourceNotFoundExceptionRes");
1086
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1087
+ const contents = (0, import_smithy_client.map)({});
1088
+ const data = parsedOutput.body;
1089
+ const doc = (0, import_smithy_client.take)(data, {
1090
+ message: import_smithy_client.expectString
1091
+ });
1092
+ Object.assign(contents, doc);
1093
+ const exception = new ThrottlingException({
1094
+ $metadata: deserializeMetadata(parsedOutput),
1095
+ ...contents
1096
+ });
1097
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1098
+ }, "de_ThrottlingExceptionRes");
1099
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1100
+ const contents = (0, import_smithy_client.map)({});
1101
+ const data = parsedOutput.body;
1102
+ const doc = (0, import_smithy_client.take)(data, {
1103
+ message: import_smithy_client.expectString
1104
+ });
1105
+ Object.assign(contents, doc);
1106
+ const exception = new ValidationException({
1107
+ $metadata: deserializeMetadata(parsedOutput),
1108
+ ...contents
1109
+ });
1110
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1111
+ }, "de_ValidationExceptionRes");
1112
+ var de_AccountRecommendationLifecycleSummary = /* @__PURE__ */ __name((output, context) => {
1113
+ return (0, import_smithy_client.take)(output, {
1114
+ accountId: import_smithy_client.expectString,
1115
+ accountRecommendationArn: import_smithy_client.expectString,
1116
+ lastUpdatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1117
+ lifecycleStage: import_smithy_client.expectString,
1118
+ updateReason: import_smithy_client.expectString,
1119
+ updateReasonCode: import_smithy_client.expectString,
1120
+ updatedOnBehalfOf: import_smithy_client.expectString,
1121
+ updatedOnBehalfOfJobTitle: import_smithy_client.expectString
1122
+ });
1123
+ }, "de_AccountRecommendationLifecycleSummary");
1124
+ var de_AccountRecommendationLifecycleSummaryList = /* @__PURE__ */ __name((output, context) => {
1125
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1126
+ return de_AccountRecommendationLifecycleSummary(entry, context);
1127
+ });
1128
+ return retVal;
1129
+ }, "de_AccountRecommendationLifecycleSummaryList");
1130
+ var de_OrganizationRecommendation = /* @__PURE__ */ __name((output, context) => {
1131
+ return (0, import_smithy_client.take)(output, {
1132
+ arn: import_smithy_client.expectString,
1133
+ awsServices: import_smithy_client._json,
1134
+ checkArn: import_smithy_client.expectString,
1135
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1136
+ createdBy: import_smithy_client.expectString,
1137
+ description: import_smithy_client.expectString,
1138
+ id: import_smithy_client.expectString,
1139
+ lastUpdatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1140
+ lifecycleStage: import_smithy_client.expectString,
1141
+ name: import_smithy_client.expectString,
1142
+ pillarSpecificAggregates: (_) => de_RecommendationPillarSpecificAggregates(_, context),
1143
+ pillars: import_smithy_client._json,
1144
+ resolvedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1145
+ resourcesAggregates: import_smithy_client._json,
1146
+ source: import_smithy_client.expectString,
1147
+ status: import_smithy_client.expectString,
1148
+ type: import_smithy_client.expectString,
1149
+ updateReason: import_smithy_client.expectString,
1150
+ updateReasonCode: import_smithy_client.expectString,
1151
+ updatedOnBehalfOf: import_smithy_client.expectString,
1152
+ updatedOnBehalfOfJobTitle: import_smithy_client.expectString
1153
+ });
1154
+ }, "de_OrganizationRecommendation");
1155
+ var de_OrganizationRecommendationResourceSummary = /* @__PURE__ */ __name((output, context) => {
1156
+ return (0, import_smithy_client.take)(output, {
1157
+ accountId: import_smithy_client.expectString,
1158
+ arn: import_smithy_client.expectString,
1159
+ awsResourceId: import_smithy_client.expectString,
1160
+ id: import_smithy_client.expectString,
1161
+ lastUpdatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1162
+ metadata: import_smithy_client._json,
1163
+ recommendationArn: import_smithy_client.expectString,
1164
+ regionCode: import_smithy_client.expectString,
1165
+ status: import_smithy_client.expectString
1166
+ });
1167
+ }, "de_OrganizationRecommendationResourceSummary");
1168
+ var de_OrganizationRecommendationResourceSummaryList = /* @__PURE__ */ __name((output, context) => {
1169
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1170
+ return de_OrganizationRecommendationResourceSummary(entry, context);
1171
+ });
1172
+ return retVal;
1173
+ }, "de_OrganizationRecommendationResourceSummaryList");
1174
+ var de_OrganizationRecommendationSummary = /* @__PURE__ */ __name((output, context) => {
1175
+ return (0, import_smithy_client.take)(output, {
1176
+ arn: import_smithy_client.expectString,
1177
+ awsServices: import_smithy_client._json,
1178
+ checkArn: import_smithy_client.expectString,
1179
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1180
+ id: import_smithy_client.expectString,
1181
+ lastUpdatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1182
+ lifecycleStage: import_smithy_client.expectString,
1183
+ name: import_smithy_client.expectString,
1184
+ pillarSpecificAggregates: (_) => de_RecommendationPillarSpecificAggregates(_, context),
1185
+ pillars: import_smithy_client._json,
1186
+ resourcesAggregates: import_smithy_client._json,
1187
+ source: import_smithy_client.expectString,
1188
+ status: import_smithy_client.expectString,
1189
+ type: import_smithy_client.expectString
1190
+ });
1191
+ }, "de_OrganizationRecommendationSummary");
1192
+ var de_OrganizationRecommendationSummaryList = /* @__PURE__ */ __name((output, context) => {
1193
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1194
+ return de_OrganizationRecommendationSummary(entry, context);
1195
+ });
1196
+ return retVal;
1197
+ }, "de_OrganizationRecommendationSummaryList");
1198
+ var de_Recommendation = /* @__PURE__ */ __name((output, context) => {
1199
+ return (0, import_smithy_client.take)(output, {
1200
+ arn: import_smithy_client.expectString,
1201
+ awsServices: import_smithy_client._json,
1202
+ checkArn: import_smithy_client.expectString,
1203
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1204
+ createdBy: import_smithy_client.expectString,
1205
+ description: import_smithy_client.expectString,
1206
+ id: import_smithy_client.expectString,
1207
+ lastUpdatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1208
+ lifecycleStage: import_smithy_client.expectString,
1209
+ name: import_smithy_client.expectString,
1210
+ pillarSpecificAggregates: (_) => de_RecommendationPillarSpecificAggregates(_, context),
1211
+ pillars: import_smithy_client._json,
1212
+ resolvedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1213
+ resourcesAggregates: import_smithy_client._json,
1214
+ source: import_smithy_client.expectString,
1215
+ status: import_smithy_client.expectString,
1216
+ type: import_smithy_client.expectString,
1217
+ updateReason: import_smithy_client.expectString,
1218
+ updateReasonCode: import_smithy_client.expectString,
1219
+ updatedOnBehalfOf: import_smithy_client.expectString,
1220
+ updatedOnBehalfOfJobTitle: import_smithy_client.expectString
1221
+ });
1222
+ }, "de_Recommendation");
1223
+ var de_RecommendationCostOptimizingAggregates = /* @__PURE__ */ __name((output, context) => {
1224
+ return (0, import_smithy_client.take)(output, {
1225
+ estimatedMonthlySavings: import_smithy_client.limitedParseDouble,
1226
+ estimatedPercentMonthlySavings: import_smithy_client.limitedParseDouble
1227
+ });
1228
+ }, "de_RecommendationCostOptimizingAggregates");
1229
+ var de_RecommendationPillarSpecificAggregates = /* @__PURE__ */ __name((output, context) => {
1230
+ return (0, import_smithy_client.take)(output, {
1231
+ costOptimizing: (_) => de_RecommendationCostOptimizingAggregates(_, context)
1232
+ });
1233
+ }, "de_RecommendationPillarSpecificAggregates");
1234
+ var de_RecommendationResourceSummary = /* @__PURE__ */ __name((output, context) => {
1235
+ return (0, import_smithy_client.take)(output, {
1236
+ arn: import_smithy_client.expectString,
1237
+ awsResourceId: import_smithy_client.expectString,
1238
+ id: import_smithy_client.expectString,
1239
+ lastUpdatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1240
+ metadata: import_smithy_client._json,
1241
+ recommendationArn: import_smithy_client.expectString,
1242
+ regionCode: import_smithy_client.expectString,
1243
+ status: import_smithy_client.expectString
1244
+ });
1245
+ }, "de_RecommendationResourceSummary");
1246
+ var de_RecommendationResourceSummaryList = /* @__PURE__ */ __name((output, context) => {
1247
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1248
+ return de_RecommendationResourceSummary(entry, context);
1249
+ });
1250
+ return retVal;
1251
+ }, "de_RecommendationResourceSummaryList");
1252
+ var de_RecommendationSummary = /* @__PURE__ */ __name((output, context) => {
1253
+ return (0, import_smithy_client.take)(output, {
1254
+ arn: import_smithy_client.expectString,
1255
+ awsServices: import_smithy_client._json,
1256
+ checkArn: import_smithy_client.expectString,
1257
+ createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1258
+ id: import_smithy_client.expectString,
1259
+ lastUpdatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1260
+ lifecycleStage: import_smithy_client.expectString,
1261
+ name: import_smithy_client.expectString,
1262
+ pillarSpecificAggregates: (_) => de_RecommendationPillarSpecificAggregates(_, context),
1263
+ pillars: import_smithy_client._json,
1264
+ resourcesAggregates: import_smithy_client._json,
1265
+ source: import_smithy_client.expectString,
1266
+ status: import_smithy_client.expectString,
1267
+ type: import_smithy_client.expectString
1268
+ });
1269
+ }, "de_RecommendationSummary");
1270
+ var de_RecommendationSummaryList = /* @__PURE__ */ __name((output, context) => {
1271
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1272
+ return de_RecommendationSummary(entry, context);
1273
+ });
1274
+ return retVal;
1275
+ }, "de_RecommendationSummaryList");
1276
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1277
+ httpStatusCode: output.statusCode,
1278
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1279
+ extendedRequestId: output.headers["x-amz-id-2"],
1280
+ cfId: output.headers["x-amz-cf-id"]
1281
+ }), "deserializeMetadata");
1282
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
1283
+ var _aAI = "affectedAccountId";
1284
+ var _aLUA = "afterLastUpdatedAt";
1285
+ var _aS = "awsService";
1286
+ var _bLUA = "beforeLastUpdatedAt";
1287
+ var _cI = "checkIdentifier";
1288
+ var _l = "language";
1289
+ var _mR = "maxResults";
1290
+ var _nT = "nextToken";
1291
+ var _p = "pillar";
1292
+ var _rC = "regionCode";
1293
+ var _s = "source";
1294
+ var _st = "status";
1295
+ var _t = "type";
1296
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1297
+ if (encoded.length) {
1298
+ return JSON.parse(encoded);
1299
+ }
1300
+ return {};
1301
+ }), "parseBody");
1302
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
1303
+ const value = await parseBody(errorBody, context);
1304
+ value.message = value.message ?? value.Message;
1305
+ return value;
1306
+ }, "parseErrorBody");
1307
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
1308
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
1309
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
1310
+ let cleanValue = rawValue;
1311
+ if (typeof cleanValue === "number") {
1312
+ cleanValue = cleanValue.toString();
1313
+ }
1314
+ if (cleanValue.indexOf(",") >= 0) {
1315
+ cleanValue = cleanValue.split(",")[0];
1316
+ }
1317
+ if (cleanValue.indexOf(":") >= 0) {
1318
+ cleanValue = cleanValue.split(":")[0];
1319
+ }
1320
+ if (cleanValue.indexOf("#") >= 0) {
1321
+ cleanValue = cleanValue.split("#")[1];
1322
+ }
1323
+ return cleanValue;
1324
+ }, "sanitizeErrorCode");
1325
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1326
+ if (headerKey !== void 0) {
1327
+ return sanitizeErrorCode(output.headers[headerKey]);
1328
+ }
1329
+ if (data.code !== void 0) {
1330
+ return sanitizeErrorCode(data.code);
1331
+ }
1332
+ if (data["__type"] !== void 0) {
1333
+ return sanitizeErrorCode(data["__type"]);
1334
+ }
1335
+ }, "loadRestJsonErrorCode");
1336
+
1337
+ // src/commands/GetOrganizationRecommendationCommand.ts
1338
+ var _GetOrganizationRecommendationCommand = class _GetOrganizationRecommendationCommand extends import_smithy_client.Command.classBuilder().ep({
1339
+ ...commonParams
1340
+ }).m(function(Command, cs, config, o) {
1341
+ return [
1342
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1343
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1344
+ ];
1345
+ }).s("TrustedAdvisor", "GetOrganizationRecommendation", {}).n("TrustedAdvisorClient", "GetOrganizationRecommendationCommand").f(void 0, GetOrganizationRecommendationResponseFilterSensitiveLog).ser(se_GetOrganizationRecommendationCommand).de(de_GetOrganizationRecommendationCommand).build() {
1346
+ };
1347
+ __name(_GetOrganizationRecommendationCommand, "GetOrganizationRecommendationCommand");
1348
+ var GetOrganizationRecommendationCommand = _GetOrganizationRecommendationCommand;
1349
+
1350
+ // src/commands/GetRecommendationCommand.ts
1351
+
1352
+
1353
+
1354
+
1355
+ var _GetRecommendationCommand = class _GetRecommendationCommand extends import_smithy_client.Command.classBuilder().ep({
1356
+ ...commonParams
1357
+ }).m(function(Command, cs, config, o) {
1358
+ return [
1359
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1360
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1361
+ ];
1362
+ }).s("TrustedAdvisor", "GetRecommendation", {}).n("TrustedAdvisorClient", "GetRecommendationCommand").f(void 0, GetRecommendationResponseFilterSensitiveLog).ser(se_GetRecommendationCommand).de(de_GetRecommendationCommand).build() {
1363
+ };
1364
+ __name(_GetRecommendationCommand, "GetRecommendationCommand");
1365
+ var GetRecommendationCommand = _GetRecommendationCommand;
1366
+
1367
+ // src/commands/ListChecksCommand.ts
1368
+
1369
+
1370
+
1371
+
1372
+ var _ListChecksCommand = class _ListChecksCommand extends import_smithy_client.Command.classBuilder().ep({
1373
+ ...commonParams
1374
+ }).m(function(Command, cs, config, o) {
1375
+ return [
1376
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1377
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1378
+ ];
1379
+ }).s("TrustedAdvisor", "ListChecks", {}).n("TrustedAdvisorClient", "ListChecksCommand").f(void 0, void 0).ser(se_ListChecksCommand).de(de_ListChecksCommand).build() {
1380
+ };
1381
+ __name(_ListChecksCommand, "ListChecksCommand");
1382
+ var ListChecksCommand = _ListChecksCommand;
1383
+
1384
+ // src/commands/ListOrganizationRecommendationAccountsCommand.ts
1385
+
1386
+
1387
+
1388
+
1389
+ var _ListOrganizationRecommendationAccountsCommand = class _ListOrganizationRecommendationAccountsCommand extends import_smithy_client.Command.classBuilder().ep({
1390
+ ...commonParams
1391
+ }).m(function(Command, cs, config, o) {
1392
+ return [
1393
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1394
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1395
+ ];
1396
+ }).s("TrustedAdvisor", "ListOrganizationRecommendationAccounts", {}).n("TrustedAdvisorClient", "ListOrganizationRecommendationAccountsCommand").f(void 0, ListOrganizationRecommendationAccountsResponseFilterSensitiveLog).ser(se_ListOrganizationRecommendationAccountsCommand).de(de_ListOrganizationRecommendationAccountsCommand).build() {
1397
+ };
1398
+ __name(_ListOrganizationRecommendationAccountsCommand, "ListOrganizationRecommendationAccountsCommand");
1399
+ var ListOrganizationRecommendationAccountsCommand = _ListOrganizationRecommendationAccountsCommand;
1400
+
1401
+ // src/commands/ListOrganizationRecommendationResourcesCommand.ts
1402
+
1403
+
1404
+
1405
+
1406
+ var _ListOrganizationRecommendationResourcesCommand = class _ListOrganizationRecommendationResourcesCommand extends import_smithy_client.Command.classBuilder().ep({
1407
+ ...commonParams
1408
+ }).m(function(Command, cs, config, o) {
1409
+ return [
1410
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1411
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1412
+ ];
1413
+ }).s("TrustedAdvisor", "ListOrganizationRecommendationResources", {}).n("TrustedAdvisorClient", "ListOrganizationRecommendationResourcesCommand").f(void 0, void 0).ser(se_ListOrganizationRecommendationResourcesCommand).de(de_ListOrganizationRecommendationResourcesCommand).build() {
1414
+ };
1415
+ __name(_ListOrganizationRecommendationResourcesCommand, "ListOrganizationRecommendationResourcesCommand");
1416
+ var ListOrganizationRecommendationResourcesCommand = _ListOrganizationRecommendationResourcesCommand;
1417
+
1418
+ // src/commands/ListOrganizationRecommendationsCommand.ts
1419
+
1420
+
1421
+
1422
+
1423
+ var _ListOrganizationRecommendationsCommand = class _ListOrganizationRecommendationsCommand extends import_smithy_client.Command.classBuilder().ep({
1424
+ ...commonParams
1425
+ }).m(function(Command, cs, config, o) {
1426
+ return [
1427
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1428
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1429
+ ];
1430
+ }).s("TrustedAdvisor", "ListOrganizationRecommendations", {}).n("TrustedAdvisorClient", "ListOrganizationRecommendationsCommand").f(void 0, void 0).ser(se_ListOrganizationRecommendationsCommand).de(de_ListOrganizationRecommendationsCommand).build() {
1431
+ };
1432
+ __name(_ListOrganizationRecommendationsCommand, "ListOrganizationRecommendationsCommand");
1433
+ var ListOrganizationRecommendationsCommand = _ListOrganizationRecommendationsCommand;
1434
+
1435
+ // src/commands/ListRecommendationResourcesCommand.ts
1436
+
1437
+
1438
+
1439
+
1440
+ var _ListRecommendationResourcesCommand = class _ListRecommendationResourcesCommand extends import_smithy_client.Command.classBuilder().ep({
1441
+ ...commonParams
1442
+ }).m(function(Command, cs, config, o) {
1443
+ return [
1444
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1445
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1446
+ ];
1447
+ }).s("TrustedAdvisor", "ListRecommendationResources", {}).n("TrustedAdvisorClient", "ListRecommendationResourcesCommand").f(void 0, void 0).ser(se_ListRecommendationResourcesCommand).de(de_ListRecommendationResourcesCommand).build() {
1448
+ };
1449
+ __name(_ListRecommendationResourcesCommand, "ListRecommendationResourcesCommand");
1450
+ var ListRecommendationResourcesCommand = _ListRecommendationResourcesCommand;
1451
+
1452
+ // src/commands/ListRecommendationsCommand.ts
1453
+
1454
+
1455
+
1456
+
1457
+ var _ListRecommendationsCommand = class _ListRecommendationsCommand extends import_smithy_client.Command.classBuilder().ep({
1458
+ ...commonParams
1459
+ }).m(function(Command, cs, config, o) {
1460
+ return [
1461
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1462
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1463
+ ];
1464
+ }).s("TrustedAdvisor", "ListRecommendations", {}).n("TrustedAdvisorClient", "ListRecommendationsCommand").f(void 0, void 0).ser(se_ListRecommendationsCommand).de(de_ListRecommendationsCommand).build() {
1465
+ };
1466
+ __name(_ListRecommendationsCommand, "ListRecommendationsCommand");
1467
+ var ListRecommendationsCommand = _ListRecommendationsCommand;
1468
+
1469
+ // src/commands/UpdateOrganizationRecommendationLifecycleCommand.ts
1470
+
1471
+
1472
+
1473
+
1474
+ var _UpdateOrganizationRecommendationLifecycleCommand = class _UpdateOrganizationRecommendationLifecycleCommand extends import_smithy_client.Command.classBuilder().ep({
1475
+ ...commonParams
1476
+ }).m(function(Command, cs, config, o) {
1477
+ return [
1478
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1479
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1480
+ ];
1481
+ }).s("TrustedAdvisor", "UpdateOrganizationRecommendationLifecycle", {}).n("TrustedAdvisorClient", "UpdateOrganizationRecommendationLifecycleCommand").f(UpdateOrganizationRecommendationLifecycleRequestFilterSensitiveLog, void 0).ser(se_UpdateOrganizationRecommendationLifecycleCommand).de(de_UpdateOrganizationRecommendationLifecycleCommand).build() {
1482
+ };
1483
+ __name(_UpdateOrganizationRecommendationLifecycleCommand, "UpdateOrganizationRecommendationLifecycleCommand");
1484
+ var UpdateOrganizationRecommendationLifecycleCommand = _UpdateOrganizationRecommendationLifecycleCommand;
1485
+
1486
+ // src/commands/UpdateRecommendationLifecycleCommand.ts
1487
+
1488
+
1489
+
1490
+
1491
+ var _UpdateRecommendationLifecycleCommand = class _UpdateRecommendationLifecycleCommand extends import_smithy_client.Command.classBuilder().ep({
1492
+ ...commonParams
1493
+ }).m(function(Command, cs, config, o) {
1494
+ return [
1495
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1496
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1497
+ ];
1498
+ }).s("TrustedAdvisor", "UpdateRecommendationLifecycle", {}).n("TrustedAdvisorClient", "UpdateRecommendationLifecycleCommand").f(UpdateRecommendationLifecycleRequestFilterSensitiveLog, void 0).ser(se_UpdateRecommendationLifecycleCommand).de(de_UpdateRecommendationLifecycleCommand).build() {
1499
+ };
1500
+ __name(_UpdateRecommendationLifecycleCommand, "UpdateRecommendationLifecycleCommand");
1501
+ var UpdateRecommendationLifecycleCommand = _UpdateRecommendationLifecycleCommand;
1502
+
1503
+ // src/TrustedAdvisor.ts
1504
+ var commands = {
1505
+ GetOrganizationRecommendationCommand,
1506
+ GetRecommendationCommand,
1507
+ ListChecksCommand,
1508
+ ListOrganizationRecommendationAccountsCommand,
1509
+ ListOrganizationRecommendationResourcesCommand,
1510
+ ListOrganizationRecommendationsCommand,
1511
+ ListRecommendationResourcesCommand,
1512
+ ListRecommendationsCommand,
1513
+ UpdateOrganizationRecommendationLifecycleCommand,
1514
+ UpdateRecommendationLifecycleCommand
1515
+ };
1516
+ var _TrustedAdvisor = class _TrustedAdvisor extends TrustedAdvisorClient {
1517
+ };
1518
+ __name(_TrustedAdvisor, "TrustedAdvisor");
1519
+ var TrustedAdvisor = _TrustedAdvisor;
1520
+ (0, import_smithy_client.createAggregatedClient)(commands, TrustedAdvisor);
1521
+
1522
+ // src/pagination/ListChecksPaginator.ts
1523
+
1524
+ var paginateListChecks = (0, import_core.createPaginator)(TrustedAdvisorClient, ListChecksCommand, "nextToken", "nextToken", "maxResults");
1525
+
1526
+ // src/pagination/ListOrganizationRecommendationAccountsPaginator.ts
1527
+
1528
+ var paginateListOrganizationRecommendationAccounts = (0, import_core.createPaginator)(TrustedAdvisorClient, ListOrganizationRecommendationAccountsCommand, "nextToken", "nextToken", "maxResults");
1529
+
1530
+ // src/pagination/ListOrganizationRecommendationResourcesPaginator.ts
1531
+
1532
+ var paginateListOrganizationRecommendationResources = (0, import_core.createPaginator)(TrustedAdvisorClient, ListOrganizationRecommendationResourcesCommand, "nextToken", "nextToken", "maxResults");
1533
+
1534
+ // src/pagination/ListOrganizationRecommendationsPaginator.ts
1535
+
1536
+ var paginateListOrganizationRecommendations = (0, import_core.createPaginator)(TrustedAdvisorClient, ListOrganizationRecommendationsCommand, "nextToken", "nextToken", "maxResults");
1537
+
1538
+ // src/pagination/ListRecommendationResourcesPaginator.ts
1539
+
1540
+ var paginateListRecommendationResources = (0, import_core.createPaginator)(TrustedAdvisorClient, ListRecommendationResourcesCommand, "nextToken", "nextToken", "maxResults");
1541
+
1542
+ // src/pagination/ListRecommendationsPaginator.ts
1543
+
1544
+ var paginateListRecommendations = (0, import_core.createPaginator)(TrustedAdvisorClient, ListRecommendationsCommand, "nextToken", "nextToken", "maxResults");
1545
+
1546
+ // src/index.ts
1547
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
1548
+ // Annotate the CommonJS export names for ESM import in node:
1549
+
1550
+ 0 && (module.exports = {
1551
+ AccessDeniedException,
1552
+ AccountRecommendationLifecycleSummaryFilterSensitiveLog,
1553
+ ConflictException,
1554
+ GetOrganizationRecommendationCommand,
1555
+ GetOrganizationRecommendationResponseFilterSensitiveLog,
1556
+ GetRecommendationCommand,
1557
+ GetRecommendationResponseFilterSensitiveLog,
1558
+ InternalServerException,
1559
+ ListChecksCommand,
1560
+ ListOrganizationRecommendationAccountsCommand,
1561
+ ListOrganizationRecommendationAccountsResponseFilterSensitiveLog,
1562
+ ListOrganizationRecommendationResourcesCommand,
1563
+ ListOrganizationRecommendationsCommand,
1564
+ ListRecommendationResourcesCommand,
1565
+ ListRecommendationsCommand,
1566
+ OrganizationRecommendationFilterSensitiveLog,
1567
+ RecommendationFilterSensitiveLog,
1568
+ RecommendationLanguage,
1569
+ RecommendationLifecycleStage,
1570
+ RecommendationPillar,
1571
+ RecommendationSource,
1572
+ RecommendationStatus,
1573
+ RecommendationType,
1574
+ ResourceNotFoundException,
1575
+ ResourceStatus,
1576
+ ThrottlingException,
1577
+ TrustedAdvisor,
1578
+ TrustedAdvisorClient,
1579
+ TrustedAdvisorServiceException,
1580
+ UpdateOrganizationRecommendationLifecycleCommand,
1581
+ UpdateOrganizationRecommendationLifecycleRequestFilterSensitiveLog,
1582
+ UpdateRecommendationLifecycleCommand,
1583
+ UpdateRecommendationLifecycleRequestFilterSensitiveLog,
1584
+ UpdateRecommendationLifecycleStage,
1585
+ UpdateRecommendationLifecycleStageReasonCode,
1586
+ ValidationException,
1587
+ __Client,
1588
+ paginateListChecks,
1589
+ paginateListOrganizationRecommendationAccounts,
1590
+ paginateListOrganizationRecommendationResources,
1591
+ paginateListOrganizationRecommendations,
1592
+ paginateListRecommendationResources,
1593
+ paginateListRecommendations
1594
+ });
1595
+