@aws-sdk/client-compute-optimizer 3.180.0 → 3.183.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 (31) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_json1_0.js +24 -18
  3. package/dist-es/ComputeOptimizer.js +74 -81
  4. package/dist-es/ComputeOptimizerClient.js +22 -28
  5. package/dist-es/commands/DeleteRecommendationPreferencesCommand.js +21 -28
  6. package/dist-es/commands/DescribeRecommendationExportJobsCommand.js +21 -28
  7. package/dist-es/commands/ExportAutoScalingGroupRecommendationsCommand.js +21 -28
  8. package/dist-es/commands/ExportEBSVolumeRecommendationsCommand.js +21 -28
  9. package/dist-es/commands/ExportEC2InstanceRecommendationsCommand.js +21 -28
  10. package/dist-es/commands/ExportLambdaFunctionRecommendationsCommand.js +21 -28
  11. package/dist-es/commands/GetAutoScalingGroupRecommendationsCommand.js +21 -28
  12. package/dist-es/commands/GetEBSVolumeRecommendationsCommand.js +21 -28
  13. package/dist-es/commands/GetEC2InstanceRecommendationsCommand.js +21 -28
  14. package/dist-es/commands/GetEC2RecommendationProjectedMetricsCommand.js +21 -28
  15. package/dist-es/commands/GetEffectiveRecommendationPreferencesCommand.js +21 -28
  16. package/dist-es/commands/GetEnrollmentStatusCommand.js +21 -28
  17. package/dist-es/commands/GetEnrollmentStatusesForOrganizationCommand.js +21 -28
  18. package/dist-es/commands/GetLambdaFunctionRecommendationsCommand.js +21 -28
  19. package/dist-es/commands/GetRecommendationPreferencesCommand.js +21 -28
  20. package/dist-es/commands/GetRecommendationSummariesCommand.js +21 -28
  21. package/dist-es/commands/PutRecommendationPreferencesCommand.js +21 -28
  22. package/dist-es/commands/UpdateEnrollmentStatusCommand.js +21 -28
  23. package/dist-es/endpoints.js +8 -8
  24. package/dist-es/models/ComputeOptimizerServiceException.js +5 -10
  25. package/dist-es/models/models_0.js +321 -174
  26. package/dist-es/protocols/Aws_json1_0.js +1679 -2051
  27. package/dist-es/runtimeConfig.browser.js +26 -12
  28. package/dist-es/runtimeConfig.js +30 -12
  29. package/dist-es/runtimeConfig.native.js +8 -5
  30. package/dist-es/runtimeConfig.shared.js +8 -11
  31. package/package.json +33 -33
@@ -1,1929 +1,1567 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
2
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { ComputeOptimizerServiceException as __BaseException } from "../models/ComputeOptimizerServiceException";
5
4
  import { AccessDeniedException, InternalServerException, InvalidParameterValueException, LimitExceededException, MissingAuthenticationToken, OptInRequiredException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, } from "../models/models_0";
6
- export var serializeAws_json1_0DeleteRecommendationPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var headers, body;
8
- return __generator(this, function (_a) {
9
- headers = {
10
- "content-type": "application/x-amz-json-1.0",
11
- "x-amz-target": "ComputeOptimizerService.DeleteRecommendationPreferences",
12
- };
13
- body = JSON.stringify(serializeAws_json1_0DeleteRecommendationPreferencesRequest(input, context));
14
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
- });
16
- }); };
17
- export var serializeAws_json1_0DescribeRecommendationExportJobsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
- var headers, body;
19
- return __generator(this, function (_a) {
20
- headers = {
21
- "content-type": "application/x-amz-json-1.0",
22
- "x-amz-target": "ComputeOptimizerService.DescribeRecommendationExportJobs",
23
- };
24
- body = JSON.stringify(serializeAws_json1_0DescribeRecommendationExportJobsRequest(input, context));
25
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
- });
27
- }); };
28
- export var serializeAws_json1_0ExportAutoScalingGroupRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
29
- var headers, body;
30
- return __generator(this, function (_a) {
31
- headers = {
32
- "content-type": "application/x-amz-json-1.0",
33
- "x-amz-target": "ComputeOptimizerService.ExportAutoScalingGroupRecommendations",
34
- };
35
- body = JSON.stringify(serializeAws_json1_0ExportAutoScalingGroupRecommendationsRequest(input, context));
36
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
- });
38
- }); };
39
- export var serializeAws_json1_0ExportEBSVolumeRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
- var headers, body;
41
- return __generator(this, function (_a) {
42
- headers = {
43
- "content-type": "application/x-amz-json-1.0",
44
- "x-amz-target": "ComputeOptimizerService.ExportEBSVolumeRecommendations",
45
- };
46
- body = JSON.stringify(serializeAws_json1_0ExportEBSVolumeRecommendationsRequest(input, context));
47
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
- });
49
- }); };
50
- export var serializeAws_json1_0ExportEC2InstanceRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
51
- var headers, body;
52
- return __generator(this, function (_a) {
53
- headers = {
54
- "content-type": "application/x-amz-json-1.0",
55
- "x-amz-target": "ComputeOptimizerService.ExportEC2InstanceRecommendations",
56
- };
57
- body = JSON.stringify(serializeAws_json1_0ExportEC2InstanceRecommendationsRequest(input, context));
58
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
- });
60
- }); };
61
- export var serializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
- var headers, body;
63
- return __generator(this, function (_a) {
64
- headers = {
65
- "content-type": "application/x-amz-json-1.0",
66
- "x-amz-target": "ComputeOptimizerService.ExportLambdaFunctionRecommendations",
67
- };
68
- body = JSON.stringify(serializeAws_json1_0ExportLambdaFunctionRecommendationsRequest(input, context));
69
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
- });
71
- }); };
72
- export var serializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
73
- var headers, body;
74
- return __generator(this, function (_a) {
75
- headers = {
76
- "content-type": "application/x-amz-json-1.0",
77
- "x-amz-target": "ComputeOptimizerService.GetAutoScalingGroupRecommendations",
78
- };
79
- body = JSON.stringify(serializeAws_json1_0GetAutoScalingGroupRecommendationsRequest(input, context));
80
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
- });
82
- }); };
83
- export var serializeAws_json1_0GetEBSVolumeRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
84
- var headers, body;
85
- return __generator(this, function (_a) {
86
- headers = {
87
- "content-type": "application/x-amz-json-1.0",
88
- "x-amz-target": "ComputeOptimizerService.GetEBSVolumeRecommendations",
89
- };
90
- body = JSON.stringify(serializeAws_json1_0GetEBSVolumeRecommendationsRequest(input, context));
91
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
- });
93
- }); };
94
- export var serializeAws_json1_0GetEC2InstanceRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
95
- var headers, body;
96
- return __generator(this, function (_a) {
97
- headers = {
98
- "content-type": "application/x-amz-json-1.0",
99
- "x-amz-target": "ComputeOptimizerService.GetEC2InstanceRecommendations",
100
- };
101
- body = JSON.stringify(serializeAws_json1_0GetEC2InstanceRecommendationsRequest(input, context));
102
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
- });
104
- }); };
105
- export var serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
106
- var headers, body;
107
- return __generator(this, function (_a) {
108
- headers = {
109
- "content-type": "application/x-amz-json-1.0",
110
- "x-amz-target": "ComputeOptimizerService.GetEC2RecommendationProjectedMetrics",
111
- };
112
- body = JSON.stringify(serializeAws_json1_0GetEC2RecommendationProjectedMetricsRequest(input, context));
113
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
- });
115
- }); };
116
- export var serializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
117
- var headers, body;
118
- return __generator(this, function (_a) {
119
- headers = {
120
- "content-type": "application/x-amz-json-1.0",
121
- "x-amz-target": "ComputeOptimizerService.GetEffectiveRecommendationPreferences",
122
- };
123
- body = JSON.stringify(serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest(input, context));
124
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
- });
126
- }); };
127
- export var serializeAws_json1_0GetEnrollmentStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
128
- var headers, body;
129
- return __generator(this, function (_a) {
130
- headers = {
131
- "content-type": "application/x-amz-json-1.0",
132
- "x-amz-target": "ComputeOptimizerService.GetEnrollmentStatus",
133
- };
134
- body = JSON.stringify(serializeAws_json1_0GetEnrollmentStatusRequest(input, context));
135
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
- });
137
- }); };
138
- export var serializeAws_json1_0GetEnrollmentStatusesForOrganizationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
139
- var headers, body;
140
- return __generator(this, function (_a) {
141
- headers = {
142
- "content-type": "application/x-amz-json-1.0",
143
- "x-amz-target": "ComputeOptimizerService.GetEnrollmentStatusesForOrganization",
144
- };
145
- body = JSON.stringify(serializeAws_json1_0GetEnrollmentStatusesForOrganizationRequest(input, context));
146
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
- });
148
- }); };
149
- export var serializeAws_json1_0GetLambdaFunctionRecommendationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
150
- var headers, body;
151
- return __generator(this, function (_a) {
152
- headers = {
153
- "content-type": "application/x-amz-json-1.0",
154
- "x-amz-target": "ComputeOptimizerService.GetLambdaFunctionRecommendations",
155
- };
156
- body = JSON.stringify(serializeAws_json1_0GetLambdaFunctionRecommendationsRequest(input, context));
157
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
- });
159
- }); };
160
- export var serializeAws_json1_0GetRecommendationPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
161
- var headers, body;
162
- return __generator(this, function (_a) {
163
- headers = {
164
- "content-type": "application/x-amz-json-1.0",
165
- "x-amz-target": "ComputeOptimizerService.GetRecommendationPreferences",
166
- };
167
- body = JSON.stringify(serializeAws_json1_0GetRecommendationPreferencesRequest(input, context));
168
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
- });
170
- }); };
171
- export var serializeAws_json1_0GetRecommendationSummariesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
172
- var headers, body;
173
- return __generator(this, function (_a) {
174
- headers = {
175
- "content-type": "application/x-amz-json-1.0",
176
- "x-amz-target": "ComputeOptimizerService.GetRecommendationSummaries",
177
- };
178
- body = JSON.stringify(serializeAws_json1_0GetRecommendationSummariesRequest(input, context));
179
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
180
- });
181
- }); };
182
- export var serializeAws_json1_0PutRecommendationPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
183
- var headers, body;
184
- return __generator(this, function (_a) {
185
- headers = {
186
- "content-type": "application/x-amz-json-1.0",
187
- "x-amz-target": "ComputeOptimizerService.PutRecommendationPreferences",
188
- };
189
- body = JSON.stringify(serializeAws_json1_0PutRecommendationPreferencesRequest(input, context));
190
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
191
- });
192
- }); };
193
- export var serializeAws_json1_0UpdateEnrollmentStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
194
- var headers, body;
195
- return __generator(this, function (_a) {
196
- headers = {
197
- "content-type": "application/x-amz-json-1.0",
198
- "x-amz-target": "ComputeOptimizerService.UpdateEnrollmentStatus",
199
- };
200
- body = JSON.stringify(serializeAws_json1_0UpdateEnrollmentStatusRequest(input, context));
201
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
202
- });
203
- }); };
204
- export var deserializeAws_json1_0DeleteRecommendationPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
205
- var data, contents, response;
206
- return __generator(this, function (_a) {
207
- switch (_a.label) {
208
- case 0:
209
- if (output.statusCode >= 300) {
210
- return [2, deserializeAws_json1_0DeleteRecommendationPreferencesCommandError(output, context)];
211
- }
212
- return [4, parseBody(output.body, context)];
213
- case 1:
214
- data = _a.sent();
215
- contents = {};
216
- contents = deserializeAws_json1_0DeleteRecommendationPreferencesResponse(data, context);
217
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
218
- return [2, Promise.resolve(response)];
219
- }
220
- });
221
- }); };
222
- var deserializeAws_json1_0DeleteRecommendationPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
223
- var parsedOutput, _a, errorCode, _b, parsedBody;
224
- var _c;
225
- return __generator(this, function (_d) {
226
- switch (_d.label) {
227
- case 0:
228
- _a = [__assign({}, output)];
229
- _c = {};
230
- return [4, parseBody(output.body, context)];
231
- case 1:
232
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
233
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
234
- _b = errorCode;
235
- switch (_b) {
236
- case "AccessDeniedException": return [3, 2];
237
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
238
- case "InternalServerException": return [3, 4];
239
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
240
- case "InvalidParameterValueException": return [3, 6];
241
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
242
- case "MissingAuthenticationToken": return [3, 8];
243
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
244
- case "OptInRequiredException": return [3, 10];
245
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
246
- case "ResourceNotFoundException": return [3, 12];
247
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
248
- case "ServiceUnavailableException": return [3, 14];
249
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
250
- case "ThrottlingException": return [3, 16];
251
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
252
- }
253
- return [3, 18];
254
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
255
- case 3: throw _d.sent();
256
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
257
- case 5: throw _d.sent();
258
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
259
- case 7: throw _d.sent();
260
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
261
- case 9: throw _d.sent();
262
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
263
- case 11: throw _d.sent();
264
- case 12: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
265
- case 13: throw _d.sent();
266
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
267
- case 15: throw _d.sent();
268
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
269
- case 17: throw _d.sent();
270
- case 18:
271
- parsedBody = parsedOutput.body;
272
- throwDefaultError({
273
- output: output,
274
- parsedBody: parsedBody,
275
- exceptionCtor: __BaseException,
276
- errorCode: errorCode,
277
- });
278
- _d.label = 19;
279
- case 19: return [2];
280
- }
281
- });
282
- }); };
283
- export var deserializeAws_json1_0DescribeRecommendationExportJobsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
284
- var data, contents, response;
285
- return __generator(this, function (_a) {
286
- switch (_a.label) {
287
- case 0:
288
- if (output.statusCode >= 300) {
289
- return [2, deserializeAws_json1_0DescribeRecommendationExportJobsCommandError(output, context)];
290
- }
291
- return [4, parseBody(output.body, context)];
292
- case 1:
293
- data = _a.sent();
294
- contents = {};
295
- contents = deserializeAws_json1_0DescribeRecommendationExportJobsResponse(data, context);
296
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
297
- return [2, Promise.resolve(response)];
298
- }
299
- });
300
- }); };
301
- var deserializeAws_json1_0DescribeRecommendationExportJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
302
- var parsedOutput, _a, errorCode, _b, parsedBody;
303
- var _c;
304
- return __generator(this, function (_d) {
305
- switch (_d.label) {
306
- case 0:
307
- _a = [__assign({}, output)];
308
- _c = {};
309
- return [4, parseBody(output.body, context)];
310
- case 1:
311
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
312
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
313
- _b = errorCode;
314
- switch (_b) {
315
- case "AccessDeniedException": return [3, 2];
316
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
317
- case "InternalServerException": return [3, 4];
318
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
319
- case "InvalidParameterValueException": return [3, 6];
320
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
321
- case "MissingAuthenticationToken": return [3, 8];
322
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
323
- case "OptInRequiredException": return [3, 10];
324
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
325
- case "ResourceNotFoundException": return [3, 12];
326
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
327
- case "ServiceUnavailableException": return [3, 14];
328
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
329
- case "ThrottlingException": return [3, 16];
330
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
331
- }
332
- return [3, 18];
333
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
334
- case 3: throw _d.sent();
335
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
336
- case 5: throw _d.sent();
337
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
338
- case 7: throw _d.sent();
339
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
340
- case 9: throw _d.sent();
341
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
342
- case 11: throw _d.sent();
343
- case 12: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
344
- case 13: throw _d.sent();
345
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
346
- case 15: throw _d.sent();
347
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
348
- case 17: throw _d.sent();
349
- case 18:
350
- parsedBody = parsedOutput.body;
351
- throwDefaultError({
352
- output: output,
353
- parsedBody: parsedBody,
354
- exceptionCtor: __BaseException,
355
- errorCode: errorCode,
356
- });
357
- _d.label = 19;
358
- case 19: return [2];
359
- }
360
- });
361
- }); };
362
- export var deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
363
- var data, contents, response;
364
- return __generator(this, function (_a) {
365
- switch (_a.label) {
366
- case 0:
367
- if (output.statusCode >= 300) {
368
- return [2, deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommandError(output, context)];
369
- }
370
- return [4, parseBody(output.body, context)];
371
- case 1:
372
- data = _a.sent();
373
- contents = {};
374
- contents = deserializeAws_json1_0ExportAutoScalingGroupRecommendationsResponse(data, context);
375
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
376
- return [2, Promise.resolve(response)];
377
- }
378
- });
379
- }); };
380
- var deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
381
- var parsedOutput, _a, errorCode, _b, parsedBody;
382
- var _c;
383
- return __generator(this, function (_d) {
384
- switch (_d.label) {
385
- case 0:
386
- _a = [__assign({}, output)];
387
- _c = {};
388
- return [4, parseBody(output.body, context)];
389
- case 1:
390
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
391
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
392
- _b = errorCode;
393
- switch (_b) {
394
- case "AccessDeniedException": return [3, 2];
395
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
396
- case "InternalServerException": return [3, 4];
397
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
398
- case "InvalidParameterValueException": return [3, 6];
399
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
400
- case "LimitExceededException": return [3, 8];
401
- case "com.amazonaws.computeoptimizer#LimitExceededException": return [3, 8];
402
- case "MissingAuthenticationToken": return [3, 10];
403
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 10];
404
- case "OptInRequiredException": return [3, 12];
405
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 12];
406
- case "ServiceUnavailableException": return [3, 14];
407
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
408
- case "ThrottlingException": return [3, 16];
409
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
410
- }
411
- return [3, 18];
412
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
413
- case 3: throw _d.sent();
414
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
415
- case 5: throw _d.sent();
416
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
417
- case 7: throw _d.sent();
418
- case 8: return [4, deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context)];
419
- case 9: throw _d.sent();
420
- case 10: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
421
- case 11: throw _d.sent();
422
- case 12: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
423
- case 13: throw _d.sent();
424
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
425
- case 15: throw _d.sent();
426
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
427
- case 17: throw _d.sent();
428
- case 18:
429
- parsedBody = parsedOutput.body;
430
- throwDefaultError({
431
- output: output,
432
- parsedBody: parsedBody,
433
- exceptionCtor: __BaseException,
434
- errorCode: errorCode,
435
- });
436
- _d.label = 19;
437
- case 19: return [2];
438
- }
439
- });
440
- }); };
441
- export var deserializeAws_json1_0ExportEBSVolumeRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
442
- var data, contents, response;
443
- return __generator(this, function (_a) {
444
- switch (_a.label) {
445
- case 0:
446
- if (output.statusCode >= 300) {
447
- return [2, deserializeAws_json1_0ExportEBSVolumeRecommendationsCommandError(output, context)];
448
- }
449
- return [4, parseBody(output.body, context)];
450
- case 1:
451
- data = _a.sent();
452
- contents = {};
453
- contents = deserializeAws_json1_0ExportEBSVolumeRecommendationsResponse(data, context);
454
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
455
- return [2, Promise.resolve(response)];
456
- }
457
- });
458
- }); };
459
- var deserializeAws_json1_0ExportEBSVolumeRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
460
- var parsedOutput, _a, errorCode, _b, parsedBody;
461
- var _c;
462
- return __generator(this, function (_d) {
463
- switch (_d.label) {
464
- case 0:
465
- _a = [__assign({}, output)];
466
- _c = {};
467
- return [4, parseBody(output.body, context)];
468
- case 1:
469
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
470
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
471
- _b = errorCode;
472
- switch (_b) {
473
- case "AccessDeniedException": return [3, 2];
474
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
475
- case "InternalServerException": return [3, 4];
476
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
477
- case "InvalidParameterValueException": return [3, 6];
478
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
479
- case "LimitExceededException": return [3, 8];
480
- case "com.amazonaws.computeoptimizer#LimitExceededException": return [3, 8];
481
- case "MissingAuthenticationToken": return [3, 10];
482
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 10];
483
- case "OptInRequiredException": return [3, 12];
484
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 12];
485
- case "ServiceUnavailableException": return [3, 14];
486
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
487
- case "ThrottlingException": return [3, 16];
488
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
489
- }
490
- return [3, 18];
491
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
492
- case 3: throw _d.sent();
493
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
494
- case 5: throw _d.sent();
495
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
496
- case 7: throw _d.sent();
497
- case 8: return [4, deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context)];
498
- case 9: throw _d.sent();
499
- case 10: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
500
- case 11: throw _d.sent();
501
- case 12: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
502
- case 13: throw _d.sent();
503
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
504
- case 15: throw _d.sent();
505
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
506
- case 17: throw _d.sent();
507
- case 18:
508
- parsedBody = parsedOutput.body;
509
- throwDefaultError({
510
- output: output,
511
- parsedBody: parsedBody,
512
- exceptionCtor: __BaseException,
513
- errorCode: errorCode,
514
- });
515
- _d.label = 19;
516
- case 19: return [2];
517
- }
518
- });
519
- }); };
520
- export var deserializeAws_json1_0ExportEC2InstanceRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
521
- var data, contents, response;
522
- return __generator(this, function (_a) {
523
- switch (_a.label) {
524
- case 0:
525
- if (output.statusCode >= 300) {
526
- return [2, deserializeAws_json1_0ExportEC2InstanceRecommendationsCommandError(output, context)];
527
- }
528
- return [4, parseBody(output.body, context)];
529
- case 1:
530
- data = _a.sent();
531
- contents = {};
532
- contents = deserializeAws_json1_0ExportEC2InstanceRecommendationsResponse(data, context);
533
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
534
- return [2, Promise.resolve(response)];
535
- }
536
- });
537
- }); };
538
- var deserializeAws_json1_0ExportEC2InstanceRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
539
- var parsedOutput, _a, errorCode, _b, parsedBody;
540
- var _c;
541
- return __generator(this, function (_d) {
542
- switch (_d.label) {
543
- case 0:
544
- _a = [__assign({}, output)];
545
- _c = {};
546
- return [4, parseBody(output.body, context)];
547
- case 1:
548
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
549
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
550
- _b = errorCode;
551
- switch (_b) {
552
- case "AccessDeniedException": return [3, 2];
553
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
554
- case "InternalServerException": return [3, 4];
555
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
556
- case "InvalidParameterValueException": return [3, 6];
557
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
558
- case "LimitExceededException": return [3, 8];
559
- case "com.amazonaws.computeoptimizer#LimitExceededException": return [3, 8];
560
- case "MissingAuthenticationToken": return [3, 10];
561
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 10];
562
- case "OptInRequiredException": return [3, 12];
563
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 12];
564
- case "ServiceUnavailableException": return [3, 14];
565
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
566
- case "ThrottlingException": return [3, 16];
567
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
568
- }
569
- return [3, 18];
570
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
571
- case 3: throw _d.sent();
572
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
573
- case 5: throw _d.sent();
574
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
575
- case 7: throw _d.sent();
576
- case 8: return [4, deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context)];
577
- case 9: throw _d.sent();
578
- case 10: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
579
- case 11: throw _d.sent();
580
- case 12: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
581
- case 13: throw _d.sent();
582
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
583
- case 15: throw _d.sent();
584
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
585
- case 17: throw _d.sent();
586
- case 18:
587
- parsedBody = parsedOutput.body;
588
- throwDefaultError({
589
- output: output,
590
- parsedBody: parsedBody,
591
- exceptionCtor: __BaseException,
592
- errorCode: errorCode,
593
- });
594
- _d.label = 19;
595
- case 19: return [2];
596
- }
597
- });
598
- }); };
599
- export var deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
600
- var data, contents, response;
601
- return __generator(this, function (_a) {
602
- switch (_a.label) {
603
- case 0:
604
- if (output.statusCode >= 300) {
605
- return [2, deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommandError(output, context)];
606
- }
607
- return [4, parseBody(output.body, context)];
608
- case 1:
609
- data = _a.sent();
610
- contents = {};
611
- contents = deserializeAws_json1_0ExportLambdaFunctionRecommendationsResponse(data, context);
612
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
613
- return [2, Promise.resolve(response)];
614
- }
615
- });
616
- }); };
617
- var deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
618
- var parsedOutput, _a, errorCode, _b, parsedBody;
619
- var _c;
620
- return __generator(this, function (_d) {
621
- switch (_d.label) {
622
- case 0:
623
- _a = [__assign({}, output)];
624
- _c = {};
625
- return [4, parseBody(output.body, context)];
626
- case 1:
627
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
628
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
629
- _b = errorCode;
630
- switch (_b) {
631
- case "AccessDeniedException": return [3, 2];
632
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
633
- case "InternalServerException": return [3, 4];
634
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
635
- case "InvalidParameterValueException": return [3, 6];
636
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
637
- case "LimitExceededException": return [3, 8];
638
- case "com.amazonaws.computeoptimizer#LimitExceededException": return [3, 8];
639
- case "MissingAuthenticationToken": return [3, 10];
640
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 10];
641
- case "OptInRequiredException": return [3, 12];
642
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 12];
643
- case "ServiceUnavailableException": return [3, 14];
644
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
645
- case "ThrottlingException": return [3, 16];
646
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
647
- }
648
- return [3, 18];
649
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
650
- case 3: throw _d.sent();
651
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
652
- case 5: throw _d.sent();
653
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
654
- case 7: throw _d.sent();
655
- case 8: return [4, deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context)];
656
- case 9: throw _d.sent();
657
- case 10: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
658
- case 11: throw _d.sent();
659
- case 12: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
660
- case 13: throw _d.sent();
661
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
662
- case 15: throw _d.sent();
663
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
664
- case 17: throw _d.sent();
665
- case 18:
666
- parsedBody = parsedOutput.body;
667
- throwDefaultError({
668
- output: output,
669
- parsedBody: parsedBody,
670
- exceptionCtor: __BaseException,
671
- errorCode: errorCode,
672
- });
673
- _d.label = 19;
674
- case 19: return [2];
675
- }
676
- });
677
- }); };
678
- export var deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
679
- var data, contents, response;
680
- return __generator(this, function (_a) {
681
- switch (_a.label) {
682
- case 0:
683
- if (output.statusCode >= 300) {
684
- return [2, deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommandError(output, context)];
685
- }
686
- return [4, parseBody(output.body, context)];
687
- case 1:
688
- data = _a.sent();
689
- contents = {};
690
- contents = deserializeAws_json1_0GetAutoScalingGroupRecommendationsResponse(data, context);
691
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
692
- return [2, Promise.resolve(response)];
693
- }
694
- });
695
- }); };
696
- var deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
697
- var parsedOutput, _a, errorCode, _b, parsedBody;
698
- var _c;
699
- return __generator(this, function (_d) {
700
- switch (_d.label) {
701
- case 0:
702
- _a = [__assign({}, output)];
703
- _c = {};
704
- return [4, parseBody(output.body, context)];
705
- case 1:
706
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
707
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
708
- _b = errorCode;
709
- switch (_b) {
710
- case "AccessDeniedException": return [3, 2];
711
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
712
- case "InternalServerException": return [3, 4];
713
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
714
- case "InvalidParameterValueException": return [3, 6];
715
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
716
- case "MissingAuthenticationToken": return [3, 8];
717
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
718
- case "OptInRequiredException": return [3, 10];
719
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
720
- case "ResourceNotFoundException": return [3, 12];
721
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
722
- case "ServiceUnavailableException": return [3, 14];
723
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
724
- case "ThrottlingException": return [3, 16];
725
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
726
- }
727
- return [3, 18];
728
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
729
- case 3: throw _d.sent();
730
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
731
- case 5: throw _d.sent();
732
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
733
- case 7: throw _d.sent();
734
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
735
- case 9: throw _d.sent();
736
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
737
- case 11: throw _d.sent();
738
- case 12: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
739
- case 13: throw _d.sent();
740
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
741
- case 15: throw _d.sent();
742
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
743
- case 17: throw _d.sent();
744
- case 18:
745
- parsedBody = parsedOutput.body;
746
- throwDefaultError({
747
- output: output,
748
- parsedBody: parsedBody,
749
- exceptionCtor: __BaseException,
750
- errorCode: errorCode,
751
- });
752
- _d.label = 19;
753
- case 19: return [2];
754
- }
755
- });
756
- }); };
757
- export var deserializeAws_json1_0GetEBSVolumeRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
758
- var data, contents, response;
759
- return __generator(this, function (_a) {
760
- switch (_a.label) {
761
- case 0:
762
- if (output.statusCode >= 300) {
763
- return [2, deserializeAws_json1_0GetEBSVolumeRecommendationsCommandError(output, context)];
764
- }
765
- return [4, parseBody(output.body, context)];
766
- case 1:
767
- data = _a.sent();
768
- contents = {};
769
- contents = deserializeAws_json1_0GetEBSVolumeRecommendationsResponse(data, context);
770
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
771
- return [2, Promise.resolve(response)];
772
- }
773
- });
774
- }); };
775
- var deserializeAws_json1_0GetEBSVolumeRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
776
- var parsedOutput, _a, errorCode, _b, parsedBody;
777
- var _c;
778
- return __generator(this, function (_d) {
779
- switch (_d.label) {
780
- case 0:
781
- _a = [__assign({}, output)];
782
- _c = {};
783
- return [4, parseBody(output.body, context)];
784
- case 1:
785
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
786
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
787
- _b = errorCode;
788
- switch (_b) {
789
- case "AccessDeniedException": return [3, 2];
790
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
791
- case "InternalServerException": return [3, 4];
792
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
793
- case "InvalidParameterValueException": return [3, 6];
794
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
795
- case "MissingAuthenticationToken": return [3, 8];
796
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
797
- case "OptInRequiredException": return [3, 10];
798
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
799
- case "ResourceNotFoundException": return [3, 12];
800
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
801
- case "ServiceUnavailableException": return [3, 14];
802
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
803
- case "ThrottlingException": return [3, 16];
804
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
805
- }
806
- return [3, 18];
807
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
808
- case 3: throw _d.sent();
809
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
810
- case 5: throw _d.sent();
811
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
812
- case 7: throw _d.sent();
813
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
814
- case 9: throw _d.sent();
815
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
816
- case 11: throw _d.sent();
817
- case 12: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
818
- case 13: throw _d.sent();
819
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
820
- case 15: throw _d.sent();
821
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
822
- case 17: throw _d.sent();
823
- case 18:
824
- parsedBody = parsedOutput.body;
825
- throwDefaultError({
826
- output: output,
827
- parsedBody: parsedBody,
828
- exceptionCtor: __BaseException,
829
- errorCode: errorCode,
830
- });
831
- _d.label = 19;
832
- case 19: return [2];
833
- }
834
- });
835
- }); };
836
- export var deserializeAws_json1_0GetEC2InstanceRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
837
- var data, contents, response;
838
- return __generator(this, function (_a) {
839
- switch (_a.label) {
840
- case 0:
841
- if (output.statusCode >= 300) {
842
- return [2, deserializeAws_json1_0GetEC2InstanceRecommendationsCommandError(output, context)];
843
- }
844
- return [4, parseBody(output.body, context)];
845
- case 1:
846
- data = _a.sent();
847
- contents = {};
848
- contents = deserializeAws_json1_0GetEC2InstanceRecommendationsResponse(data, context);
849
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
850
- return [2, Promise.resolve(response)];
851
- }
852
- });
853
- }); };
854
- var deserializeAws_json1_0GetEC2InstanceRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
855
- var parsedOutput, _a, errorCode, _b, parsedBody;
856
- var _c;
857
- return __generator(this, function (_d) {
858
- switch (_d.label) {
859
- case 0:
860
- _a = [__assign({}, output)];
861
- _c = {};
862
- return [4, parseBody(output.body, context)];
863
- case 1:
864
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
865
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
866
- _b = errorCode;
867
- switch (_b) {
868
- case "AccessDeniedException": return [3, 2];
869
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
870
- case "InternalServerException": return [3, 4];
871
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
872
- case "InvalidParameterValueException": return [3, 6];
873
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
874
- case "MissingAuthenticationToken": return [3, 8];
875
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
876
- case "OptInRequiredException": return [3, 10];
877
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
878
- case "ResourceNotFoundException": return [3, 12];
879
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
880
- case "ServiceUnavailableException": return [3, 14];
881
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
882
- case "ThrottlingException": return [3, 16];
883
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
884
- }
885
- return [3, 18];
886
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
887
- case 3: throw _d.sent();
888
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
889
- case 5: throw _d.sent();
890
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
891
- case 7: throw _d.sent();
892
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
893
- case 9: throw _d.sent();
894
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
895
- case 11: throw _d.sent();
896
- case 12: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
897
- case 13: throw _d.sent();
898
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
899
- case 15: throw _d.sent();
900
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
901
- case 17: throw _d.sent();
902
- case 18:
903
- parsedBody = parsedOutput.body;
904
- throwDefaultError({
905
- output: output,
906
- parsedBody: parsedBody,
907
- exceptionCtor: __BaseException,
908
- errorCode: errorCode,
909
- });
910
- _d.label = 19;
911
- case 19: return [2];
912
- }
913
- });
914
- }); };
915
- export var deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
916
- var data, contents, response;
917
- return __generator(this, function (_a) {
918
- switch (_a.label) {
919
- case 0:
920
- if (output.statusCode >= 300) {
921
- return [2, deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommandError(output, context)];
922
- }
923
- return [4, parseBody(output.body, context)];
924
- case 1:
925
- data = _a.sent();
926
- contents = {};
927
- contents = deserializeAws_json1_0GetEC2RecommendationProjectedMetricsResponse(data, context);
928
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
929
- return [2, Promise.resolve(response)];
930
- }
931
- });
932
- }); };
933
- var deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
934
- var parsedOutput, _a, errorCode, _b, parsedBody;
935
- var _c;
936
- return __generator(this, function (_d) {
937
- switch (_d.label) {
938
- case 0:
939
- _a = [__assign({}, output)];
940
- _c = {};
941
- return [4, parseBody(output.body, context)];
942
- case 1:
943
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
944
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
945
- _b = errorCode;
946
- switch (_b) {
947
- case "AccessDeniedException": return [3, 2];
948
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
949
- case "InternalServerException": return [3, 4];
950
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
951
- case "InvalidParameterValueException": return [3, 6];
952
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
953
- case "MissingAuthenticationToken": return [3, 8];
954
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
955
- case "OptInRequiredException": return [3, 10];
956
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
957
- case "ResourceNotFoundException": return [3, 12];
958
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
959
- case "ServiceUnavailableException": return [3, 14];
960
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
961
- case "ThrottlingException": return [3, 16];
962
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
963
- }
964
- return [3, 18];
965
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
966
- case 3: throw _d.sent();
967
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
968
- case 5: throw _d.sent();
969
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
970
- case 7: throw _d.sent();
971
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
972
- case 9: throw _d.sent();
973
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
974
- case 11: throw _d.sent();
975
- case 12: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
976
- case 13: throw _d.sent();
977
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
978
- case 15: throw _d.sent();
979
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
980
- case 17: throw _d.sent();
981
- case 18:
982
- parsedBody = parsedOutput.body;
983
- throwDefaultError({
984
- output: output,
985
- parsedBody: parsedBody,
986
- exceptionCtor: __BaseException,
987
- errorCode: errorCode,
988
- });
989
- _d.label = 19;
990
- case 19: return [2];
991
- }
992
- });
993
- }); };
994
- export var deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
995
- var data, contents, response;
996
- return __generator(this, function (_a) {
997
- switch (_a.label) {
998
- case 0:
999
- if (output.statusCode >= 300) {
1000
- return [2, deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError(output, context)];
1001
- }
1002
- return [4, parseBody(output.body, context)];
1003
- case 1:
1004
- data = _a.sent();
1005
- contents = {};
1006
- contents = deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse(data, context);
1007
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1008
- return [2, Promise.resolve(response)];
1009
- }
1010
- });
1011
- }); };
1012
- var deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1013
- var parsedOutput, _a, errorCode, _b, parsedBody;
1014
- var _c;
1015
- return __generator(this, function (_d) {
1016
- switch (_d.label) {
1017
- case 0:
1018
- _a = [__assign({}, output)];
1019
- _c = {};
1020
- return [4, parseBody(output.body, context)];
1021
- case 1:
1022
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1023
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1024
- _b = errorCode;
1025
- switch (_b) {
1026
- case "AccessDeniedException": return [3, 2];
1027
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
1028
- case "InternalServerException": return [3, 4];
1029
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
1030
- case "InvalidParameterValueException": return [3, 6];
1031
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
1032
- case "MissingAuthenticationToken": return [3, 8];
1033
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
1034
- case "OptInRequiredException": return [3, 10];
1035
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
1036
- case "ResourceNotFoundException": return [3, 12];
1037
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
1038
- case "ServiceUnavailableException": return [3, 14];
1039
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
1040
- case "ThrottlingException": return [3, 16];
1041
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
1042
- }
1043
- return [3, 18];
1044
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1045
- case 3: throw _d.sent();
1046
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1047
- case 5: throw _d.sent();
1048
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
1049
- case 7: throw _d.sent();
1050
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
1051
- case 9: throw _d.sent();
1052
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
1053
- case 11: throw _d.sent();
1054
- case 12: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1055
- case 13: throw _d.sent();
1056
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
1057
- case 15: throw _d.sent();
1058
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1059
- case 17: throw _d.sent();
1060
- case 18:
1061
- parsedBody = parsedOutput.body;
1062
- throwDefaultError({
1063
- output: output,
1064
- parsedBody: parsedBody,
1065
- exceptionCtor: __BaseException,
1066
- errorCode: errorCode,
1067
- });
1068
- _d.label = 19;
1069
- case 19: return [2];
1070
- }
1071
- });
1072
- }); };
1073
- export var deserializeAws_json1_0GetEnrollmentStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1074
- var data, contents, response;
1075
- return __generator(this, function (_a) {
1076
- switch (_a.label) {
1077
- case 0:
1078
- if (output.statusCode >= 300) {
1079
- return [2, deserializeAws_json1_0GetEnrollmentStatusCommandError(output, context)];
1080
- }
1081
- return [4, parseBody(output.body, context)];
1082
- case 1:
1083
- data = _a.sent();
1084
- contents = {};
1085
- contents = deserializeAws_json1_0GetEnrollmentStatusResponse(data, context);
1086
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1087
- return [2, Promise.resolve(response)];
1088
- }
1089
- });
1090
- }); };
1091
- var deserializeAws_json1_0GetEnrollmentStatusCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1092
- var parsedOutput, _a, errorCode, _b, parsedBody;
1093
- var _c;
1094
- return __generator(this, function (_d) {
1095
- switch (_d.label) {
1096
- case 0:
1097
- _a = [__assign({}, output)];
1098
- _c = {};
1099
- return [4, parseBody(output.body, context)];
1100
- case 1:
1101
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1102
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1103
- _b = errorCode;
1104
- switch (_b) {
1105
- case "AccessDeniedException": return [3, 2];
1106
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
1107
- case "InternalServerException": return [3, 4];
1108
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
1109
- case "InvalidParameterValueException": return [3, 6];
1110
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
1111
- case "MissingAuthenticationToken": return [3, 8];
1112
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
1113
- case "ServiceUnavailableException": return [3, 10];
1114
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 10];
1115
- case "ThrottlingException": return [3, 12];
1116
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 12];
1117
- }
1118
- return [3, 14];
1119
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1120
- case 3: throw _d.sent();
1121
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1122
- case 5: throw _d.sent();
1123
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
1124
- case 7: throw _d.sent();
1125
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
1126
- case 9: throw _d.sent();
1127
- case 10: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
1128
- case 11: throw _d.sent();
1129
- case 12: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1130
- case 13: throw _d.sent();
1131
- case 14:
1132
- parsedBody = parsedOutput.body;
1133
- throwDefaultError({
1134
- output: output,
1135
- parsedBody: parsedBody,
1136
- exceptionCtor: __BaseException,
1137
- errorCode: errorCode,
1138
- });
1139
- _d.label = 15;
1140
- case 15: return [2];
1141
- }
1142
- });
1143
- }); };
1144
- export var deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1145
- var data, contents, response;
1146
- return __generator(this, function (_a) {
1147
- switch (_a.label) {
1148
- case 0:
1149
- if (output.statusCode >= 300) {
1150
- return [2, deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommandError(output, context)];
1151
- }
1152
- return [4, parseBody(output.body, context)];
1153
- case 1:
1154
- data = _a.sent();
1155
- contents = {};
1156
- contents = deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse(data, context);
1157
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1158
- return [2, Promise.resolve(response)];
1159
- }
1160
- });
1161
- }); };
1162
- var deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1163
- var parsedOutput, _a, errorCode, _b, parsedBody;
1164
- var _c;
1165
- return __generator(this, function (_d) {
1166
- switch (_d.label) {
1167
- case 0:
1168
- _a = [__assign({}, output)];
1169
- _c = {};
1170
- return [4, parseBody(output.body, context)];
1171
- case 1:
1172
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1173
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1174
- _b = errorCode;
1175
- switch (_b) {
1176
- case "AccessDeniedException": return [3, 2];
1177
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
1178
- case "InternalServerException": return [3, 4];
1179
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
1180
- case "InvalidParameterValueException": return [3, 6];
1181
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
1182
- case "MissingAuthenticationToken": return [3, 8];
1183
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
1184
- case "ServiceUnavailableException": return [3, 10];
1185
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 10];
1186
- case "ThrottlingException": return [3, 12];
1187
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 12];
1188
- }
1189
- return [3, 14];
1190
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1191
- case 3: throw _d.sent();
1192
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1193
- case 5: throw _d.sent();
1194
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
1195
- case 7: throw _d.sent();
1196
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
1197
- case 9: throw _d.sent();
1198
- case 10: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
1199
- case 11: throw _d.sent();
1200
- case 12: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1201
- case 13: throw _d.sent();
1202
- case 14:
1203
- parsedBody = parsedOutput.body;
1204
- throwDefaultError({
1205
- output: output,
1206
- parsedBody: parsedBody,
1207
- exceptionCtor: __BaseException,
1208
- errorCode: errorCode,
1209
- });
1210
- _d.label = 15;
1211
- case 15: return [2];
1212
- }
1213
- });
1214
- }); };
1215
- export var deserializeAws_json1_0GetLambdaFunctionRecommendationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1216
- var data, contents, response;
1217
- return __generator(this, function (_a) {
1218
- switch (_a.label) {
1219
- case 0:
1220
- if (output.statusCode >= 300) {
1221
- return [2, deserializeAws_json1_0GetLambdaFunctionRecommendationsCommandError(output, context)];
1222
- }
1223
- return [4, parseBody(output.body, context)];
1224
- case 1:
1225
- data = _a.sent();
1226
- contents = {};
1227
- contents = deserializeAws_json1_0GetLambdaFunctionRecommendationsResponse(data, context);
1228
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1229
- return [2, Promise.resolve(response)];
1230
- }
1231
- });
1232
- }); };
1233
- var deserializeAws_json1_0GetLambdaFunctionRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1234
- var parsedOutput, _a, errorCode, _b, parsedBody;
1235
- var _c;
1236
- return __generator(this, function (_d) {
1237
- switch (_d.label) {
1238
- case 0:
1239
- _a = [__assign({}, output)];
1240
- _c = {};
1241
- return [4, parseBody(output.body, context)];
1242
- case 1:
1243
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1244
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1245
- _b = errorCode;
1246
- switch (_b) {
1247
- case "AccessDeniedException": return [3, 2];
1248
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
1249
- case "InternalServerException": return [3, 4];
1250
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
1251
- case "InvalidParameterValueException": return [3, 6];
1252
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
1253
- case "LimitExceededException": return [3, 8];
1254
- case "com.amazonaws.computeoptimizer#LimitExceededException": return [3, 8];
1255
- case "MissingAuthenticationToken": return [3, 10];
1256
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 10];
1257
- case "OptInRequiredException": return [3, 12];
1258
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 12];
1259
- case "ServiceUnavailableException": return [3, 14];
1260
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
1261
- case "ThrottlingException": return [3, 16];
1262
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
1263
- }
1264
- return [3, 18];
1265
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1266
- case 3: throw _d.sent();
1267
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1268
- case 5: throw _d.sent();
1269
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
1270
- case 7: throw _d.sent();
1271
- case 8: return [4, deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context)];
1272
- case 9: throw _d.sent();
1273
- case 10: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
1274
- case 11: throw _d.sent();
1275
- case 12: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
1276
- case 13: throw _d.sent();
1277
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
1278
- case 15: throw _d.sent();
1279
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1280
- case 17: throw _d.sent();
1281
- case 18:
1282
- parsedBody = parsedOutput.body;
1283
- throwDefaultError({
1284
- output: output,
1285
- parsedBody: parsedBody,
1286
- exceptionCtor: __BaseException,
1287
- errorCode: errorCode,
1288
- });
1289
- _d.label = 19;
1290
- case 19: return [2];
1291
- }
1292
- });
1293
- }); };
1294
- export var deserializeAws_json1_0GetRecommendationPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1295
- var data, contents, response;
1296
- return __generator(this, function (_a) {
1297
- switch (_a.label) {
1298
- case 0:
1299
- if (output.statusCode >= 300) {
1300
- return [2, deserializeAws_json1_0GetRecommendationPreferencesCommandError(output, context)];
1301
- }
1302
- return [4, parseBody(output.body, context)];
1303
- case 1:
1304
- data = _a.sent();
1305
- contents = {};
1306
- contents = deserializeAws_json1_0GetRecommendationPreferencesResponse(data, context);
1307
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1308
- return [2, Promise.resolve(response)];
1309
- }
1310
- });
1311
- }); };
1312
- var deserializeAws_json1_0GetRecommendationPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1313
- var parsedOutput, _a, errorCode, _b, parsedBody;
1314
- var _c;
1315
- return __generator(this, function (_d) {
1316
- switch (_d.label) {
1317
- case 0:
1318
- _a = [__assign({}, output)];
1319
- _c = {};
1320
- return [4, parseBody(output.body, context)];
1321
- case 1:
1322
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1323
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1324
- _b = errorCode;
1325
- switch (_b) {
1326
- case "AccessDeniedException": return [3, 2];
1327
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
1328
- case "InternalServerException": return [3, 4];
1329
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
1330
- case "InvalidParameterValueException": return [3, 6];
1331
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
1332
- case "MissingAuthenticationToken": return [3, 8];
1333
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
1334
- case "OptInRequiredException": return [3, 10];
1335
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
1336
- case "ResourceNotFoundException": return [3, 12];
1337
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
1338
- case "ServiceUnavailableException": return [3, 14];
1339
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
1340
- case "ThrottlingException": return [3, 16];
1341
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
1342
- }
1343
- return [3, 18];
1344
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1345
- case 3: throw _d.sent();
1346
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1347
- case 5: throw _d.sent();
1348
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
1349
- case 7: throw _d.sent();
1350
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
1351
- case 9: throw _d.sent();
1352
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
1353
- case 11: throw _d.sent();
1354
- case 12: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1355
- case 13: throw _d.sent();
1356
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
1357
- case 15: throw _d.sent();
1358
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1359
- case 17: throw _d.sent();
1360
- case 18:
1361
- parsedBody = parsedOutput.body;
1362
- throwDefaultError({
1363
- output: output,
1364
- parsedBody: parsedBody,
1365
- exceptionCtor: __BaseException,
1366
- errorCode: errorCode,
1367
- });
1368
- _d.label = 19;
1369
- case 19: return [2];
1370
- }
1371
- });
1372
- }); };
1373
- export var deserializeAws_json1_0GetRecommendationSummariesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1374
- var data, contents, response;
1375
- return __generator(this, function (_a) {
1376
- switch (_a.label) {
1377
- case 0:
1378
- if (output.statusCode >= 300) {
1379
- return [2, deserializeAws_json1_0GetRecommendationSummariesCommandError(output, context)];
1380
- }
1381
- return [4, parseBody(output.body, context)];
1382
- case 1:
1383
- data = _a.sent();
1384
- contents = {};
1385
- contents = deserializeAws_json1_0GetRecommendationSummariesResponse(data, context);
1386
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1387
- return [2, Promise.resolve(response)];
1388
- }
1389
- });
1390
- }); };
1391
- var deserializeAws_json1_0GetRecommendationSummariesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1392
- var parsedOutput, _a, errorCode, _b, parsedBody;
1393
- var _c;
1394
- return __generator(this, function (_d) {
1395
- switch (_d.label) {
1396
- case 0:
1397
- _a = [__assign({}, output)];
1398
- _c = {};
1399
- return [4, parseBody(output.body, context)];
1400
- case 1:
1401
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1402
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1403
- _b = errorCode;
1404
- switch (_b) {
1405
- case "AccessDeniedException": return [3, 2];
1406
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
1407
- case "InternalServerException": return [3, 4];
1408
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
1409
- case "InvalidParameterValueException": return [3, 6];
1410
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
1411
- case "MissingAuthenticationToken": return [3, 8];
1412
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
1413
- case "OptInRequiredException": return [3, 10];
1414
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
1415
- case "ServiceUnavailableException": return [3, 12];
1416
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 12];
1417
- case "ThrottlingException": return [3, 14];
1418
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 14];
1419
- }
1420
- return [3, 16];
1421
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1422
- case 3: throw _d.sent();
1423
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1424
- case 5: throw _d.sent();
1425
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
1426
- case 7: throw _d.sent();
1427
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
1428
- case 9: throw _d.sent();
1429
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
1430
- case 11: throw _d.sent();
1431
- case 12: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
1432
- case 13: throw _d.sent();
1433
- case 14: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1434
- case 15: throw _d.sent();
1435
- case 16:
1436
- parsedBody = parsedOutput.body;
1437
- throwDefaultError({
1438
- output: output,
1439
- parsedBody: parsedBody,
1440
- exceptionCtor: __BaseException,
1441
- errorCode: errorCode,
1442
- });
1443
- _d.label = 17;
1444
- case 17: return [2];
1445
- }
1446
- });
1447
- }); };
1448
- export var deserializeAws_json1_0PutRecommendationPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1449
- var data, contents, response;
1450
- return __generator(this, function (_a) {
1451
- switch (_a.label) {
1452
- case 0:
1453
- if (output.statusCode >= 300) {
1454
- return [2, deserializeAws_json1_0PutRecommendationPreferencesCommandError(output, context)];
1455
- }
1456
- return [4, parseBody(output.body, context)];
1457
- case 1:
1458
- data = _a.sent();
1459
- contents = {};
1460
- contents = deserializeAws_json1_0PutRecommendationPreferencesResponse(data, context);
1461
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1462
- return [2, Promise.resolve(response)];
1463
- }
1464
- });
1465
- }); };
1466
- var deserializeAws_json1_0PutRecommendationPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1467
- var parsedOutput, _a, errorCode, _b, parsedBody;
1468
- var _c;
1469
- return __generator(this, function (_d) {
1470
- switch (_d.label) {
1471
- case 0:
1472
- _a = [__assign({}, output)];
1473
- _c = {};
1474
- return [4, parseBody(output.body, context)];
1475
- case 1:
1476
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1477
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1478
- _b = errorCode;
1479
- switch (_b) {
1480
- case "AccessDeniedException": return [3, 2];
1481
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
1482
- case "InternalServerException": return [3, 4];
1483
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
1484
- case "InvalidParameterValueException": return [3, 6];
1485
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
1486
- case "MissingAuthenticationToken": return [3, 8];
1487
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
1488
- case "OptInRequiredException": return [3, 10];
1489
- case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
1490
- case "ResourceNotFoundException": return [3, 12];
1491
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
1492
- case "ServiceUnavailableException": return [3, 14];
1493
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
1494
- case "ThrottlingException": return [3, 16];
1495
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
1496
- }
1497
- return [3, 18];
1498
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1499
- case 3: throw _d.sent();
1500
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1501
- case 5: throw _d.sent();
1502
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
1503
- case 7: throw _d.sent();
1504
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
1505
- case 9: throw _d.sent();
1506
- case 10: return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
1507
- case 11: throw _d.sent();
1508
- case 12: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1509
- case 13: throw _d.sent();
1510
- case 14: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
1511
- case 15: throw _d.sent();
1512
- case 16: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1513
- case 17: throw _d.sent();
1514
- case 18:
1515
- parsedBody = parsedOutput.body;
1516
- throwDefaultError({
1517
- output: output,
1518
- parsedBody: parsedBody,
1519
- exceptionCtor: __BaseException,
1520
- errorCode: errorCode,
1521
- });
1522
- _d.label = 19;
1523
- case 19: return [2];
1524
- }
1525
- });
1526
- }); };
1527
- export var deserializeAws_json1_0UpdateEnrollmentStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1528
- var data, contents, response;
1529
- return __generator(this, function (_a) {
1530
- switch (_a.label) {
1531
- case 0:
1532
- if (output.statusCode >= 300) {
1533
- return [2, deserializeAws_json1_0UpdateEnrollmentStatusCommandError(output, context)];
1534
- }
1535
- return [4, parseBody(output.body, context)];
1536
- case 1:
1537
- data = _a.sent();
1538
- contents = {};
1539
- contents = deserializeAws_json1_0UpdateEnrollmentStatusResponse(data, context);
1540
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1541
- return [2, Promise.resolve(response)];
1542
- }
1543
- });
1544
- }); };
1545
- var deserializeAws_json1_0UpdateEnrollmentStatusCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1546
- var parsedOutput, _a, errorCode, _b, parsedBody;
1547
- var _c;
1548
- return __generator(this, function (_d) {
1549
- switch (_d.label) {
1550
- case 0:
1551
- _a = [__assign({}, output)];
1552
- _c = {};
1553
- return [4, parseBody(output.body, context)];
1554
- case 1:
1555
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1556
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1557
- _b = errorCode;
1558
- switch (_b) {
1559
- case "AccessDeniedException": return [3, 2];
1560
- case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
1561
- case "InternalServerException": return [3, 4];
1562
- case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
1563
- case "InvalidParameterValueException": return [3, 6];
1564
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
1565
- case "MissingAuthenticationToken": return [3, 8];
1566
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
1567
- case "ServiceUnavailableException": return [3, 10];
1568
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 10];
1569
- case "ThrottlingException": return [3, 12];
1570
- case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 12];
1571
- }
1572
- return [3, 14];
1573
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1574
- case 3: throw _d.sent();
1575
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1576
- case 5: throw _d.sent();
1577
- case 6: return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
1578
- case 7: throw _d.sent();
1579
- case 8: return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
1580
- case 9: throw _d.sent();
1581
- case 10: return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
1582
- case 11: throw _d.sent();
1583
- case 12: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1584
- case 13: throw _d.sent();
1585
- case 14:
1586
- parsedBody = parsedOutput.body;
1587
- throwDefaultError({
1588
- output: output,
1589
- parsedBody: parsedBody,
1590
- exceptionCtor: __BaseException,
1591
- errorCode: errorCode,
1592
- });
1593
- _d.label = 15;
1594
- case 15: return [2];
1595
- }
1596
- });
1597
- }); };
1598
- var deserializeAws_json1_0AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1599
- var body, deserialized, exception;
1600
- return __generator(this, function (_a) {
1601
- body = parsedOutput.body;
1602
- deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
1603
- exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1604
- return [2, __decorateServiceException(exception, body)];
1605
- });
1606
- }); };
1607
- var deserializeAws_json1_0InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1608
- var body, deserialized, exception;
1609
- return __generator(this, function (_a) {
1610
- body = parsedOutput.body;
1611
- deserialized = deserializeAws_json1_0InternalServerException(body, context);
1612
- exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1613
- return [2, __decorateServiceException(exception, body)];
1614
- });
1615
- }); };
1616
- var deserializeAws_json1_0InvalidParameterValueExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1617
- var body, deserialized, exception;
1618
- return __generator(this, function (_a) {
1619
- body = parsedOutput.body;
1620
- deserialized = deserializeAws_json1_0InvalidParameterValueException(body, context);
1621
- exception = new InvalidParameterValueException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1622
- return [2, __decorateServiceException(exception, body)];
1623
- });
1624
- }); };
1625
- var deserializeAws_json1_0LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1626
- var body, deserialized, exception;
1627
- return __generator(this, function (_a) {
1628
- body = parsedOutput.body;
1629
- deserialized = deserializeAws_json1_0LimitExceededException(body, context);
1630
- exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1631
- return [2, __decorateServiceException(exception, body)];
1632
- });
1633
- }); };
1634
- var deserializeAws_json1_0MissingAuthenticationTokenResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1635
- var body, deserialized, exception;
1636
- return __generator(this, function (_a) {
1637
- body = parsedOutput.body;
1638
- deserialized = deserializeAws_json1_0MissingAuthenticationToken(body, context);
1639
- exception = new MissingAuthenticationToken(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1640
- return [2, __decorateServiceException(exception, body)];
1641
- });
1642
- }); };
1643
- var deserializeAws_json1_0OptInRequiredExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1644
- var body, deserialized, exception;
1645
- return __generator(this, function (_a) {
1646
- body = parsedOutput.body;
1647
- deserialized = deserializeAws_json1_0OptInRequiredException(body, context);
1648
- exception = new OptInRequiredException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1649
- return [2, __decorateServiceException(exception, body)];
1650
- });
1651
- }); };
1652
- var deserializeAws_json1_0ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1653
- var body, deserialized, exception;
1654
- return __generator(this, function (_a) {
1655
- body = parsedOutput.body;
1656
- deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
1657
- exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1658
- return [2, __decorateServiceException(exception, body)];
1659
- });
1660
- }); };
1661
- var deserializeAws_json1_0ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1662
- var body, deserialized, exception;
1663
- return __generator(this, function (_a) {
1664
- body = parsedOutput.body;
1665
- deserialized = deserializeAws_json1_0ServiceUnavailableException(body, context);
1666
- exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1667
- return [2, __decorateServiceException(exception, body)];
1668
- });
1669
- }); };
1670
- var deserializeAws_json1_0ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1671
- var body, deserialized, exception;
1672
- return __generator(this, function (_a) {
1673
- body = parsedOutput.body;
1674
- deserialized = deserializeAws_json1_0ThrottlingException(body, context);
1675
- exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1676
- return [2, __decorateServiceException(exception, body)];
1677
- });
1678
- }); };
1679
- var serializeAws_json1_0AccountIds = function (input, context) {
5
+ export const serializeAws_json1_0DeleteRecommendationPreferencesCommand = async (input, context) => {
6
+ const headers = {
7
+ "content-type": "application/x-amz-json-1.0",
8
+ "x-amz-target": "ComputeOptimizerService.DeleteRecommendationPreferences",
9
+ };
10
+ let body;
11
+ body = JSON.stringify(serializeAws_json1_0DeleteRecommendationPreferencesRequest(input, context));
12
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
+ };
14
+ export const serializeAws_json1_0DescribeRecommendationExportJobsCommand = async (input, context) => {
15
+ const headers = {
16
+ "content-type": "application/x-amz-json-1.0",
17
+ "x-amz-target": "ComputeOptimizerService.DescribeRecommendationExportJobs",
18
+ };
19
+ let body;
20
+ body = JSON.stringify(serializeAws_json1_0DescribeRecommendationExportJobsRequest(input, context));
21
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
+ };
23
+ export const serializeAws_json1_0ExportAutoScalingGroupRecommendationsCommand = async (input, context) => {
24
+ const headers = {
25
+ "content-type": "application/x-amz-json-1.0",
26
+ "x-amz-target": "ComputeOptimizerService.ExportAutoScalingGroupRecommendations",
27
+ };
28
+ let body;
29
+ body = JSON.stringify(serializeAws_json1_0ExportAutoScalingGroupRecommendationsRequest(input, context));
30
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
+ };
32
+ export const serializeAws_json1_0ExportEBSVolumeRecommendationsCommand = async (input, context) => {
33
+ const headers = {
34
+ "content-type": "application/x-amz-json-1.0",
35
+ "x-amz-target": "ComputeOptimizerService.ExportEBSVolumeRecommendations",
36
+ };
37
+ let body;
38
+ body = JSON.stringify(serializeAws_json1_0ExportEBSVolumeRecommendationsRequest(input, context));
39
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
+ };
41
+ export const serializeAws_json1_0ExportEC2InstanceRecommendationsCommand = async (input, context) => {
42
+ const headers = {
43
+ "content-type": "application/x-amz-json-1.0",
44
+ "x-amz-target": "ComputeOptimizerService.ExportEC2InstanceRecommendations",
45
+ };
46
+ let body;
47
+ body = JSON.stringify(serializeAws_json1_0ExportEC2InstanceRecommendationsRequest(input, context));
48
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
+ };
50
+ export const serializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = async (input, context) => {
51
+ const headers = {
52
+ "content-type": "application/x-amz-json-1.0",
53
+ "x-amz-target": "ComputeOptimizerService.ExportLambdaFunctionRecommendations",
54
+ };
55
+ let body;
56
+ body = JSON.stringify(serializeAws_json1_0ExportLambdaFunctionRecommendationsRequest(input, context));
57
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
+ };
59
+ export const serializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = async (input, context) => {
60
+ const headers = {
61
+ "content-type": "application/x-amz-json-1.0",
62
+ "x-amz-target": "ComputeOptimizerService.GetAutoScalingGroupRecommendations",
63
+ };
64
+ let body;
65
+ body = JSON.stringify(serializeAws_json1_0GetAutoScalingGroupRecommendationsRequest(input, context));
66
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
+ };
68
+ export const serializeAws_json1_0GetEBSVolumeRecommendationsCommand = async (input, context) => {
69
+ const headers = {
70
+ "content-type": "application/x-amz-json-1.0",
71
+ "x-amz-target": "ComputeOptimizerService.GetEBSVolumeRecommendations",
72
+ };
73
+ let body;
74
+ body = JSON.stringify(serializeAws_json1_0GetEBSVolumeRecommendationsRequest(input, context));
75
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
+ };
77
+ export const serializeAws_json1_0GetEC2InstanceRecommendationsCommand = async (input, context) => {
78
+ const headers = {
79
+ "content-type": "application/x-amz-json-1.0",
80
+ "x-amz-target": "ComputeOptimizerService.GetEC2InstanceRecommendations",
81
+ };
82
+ let body;
83
+ body = JSON.stringify(serializeAws_json1_0GetEC2InstanceRecommendationsRequest(input, context));
84
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
+ };
86
+ export const serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = async (input, context) => {
87
+ const headers = {
88
+ "content-type": "application/x-amz-json-1.0",
89
+ "x-amz-target": "ComputeOptimizerService.GetEC2RecommendationProjectedMetrics",
90
+ };
91
+ let body;
92
+ body = JSON.stringify(serializeAws_json1_0GetEC2RecommendationProjectedMetricsRequest(input, context));
93
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
+ };
95
+ export const serializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = async (input, context) => {
96
+ const headers = {
97
+ "content-type": "application/x-amz-json-1.0",
98
+ "x-amz-target": "ComputeOptimizerService.GetEffectiveRecommendationPreferences",
99
+ };
100
+ let body;
101
+ body = JSON.stringify(serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest(input, context));
102
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
+ };
104
+ export const serializeAws_json1_0GetEnrollmentStatusCommand = async (input, context) => {
105
+ const headers = {
106
+ "content-type": "application/x-amz-json-1.0",
107
+ "x-amz-target": "ComputeOptimizerService.GetEnrollmentStatus",
108
+ };
109
+ let body;
110
+ body = JSON.stringify(serializeAws_json1_0GetEnrollmentStatusRequest(input, context));
111
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
+ };
113
+ export const serializeAws_json1_0GetEnrollmentStatusesForOrganizationCommand = async (input, context) => {
114
+ const headers = {
115
+ "content-type": "application/x-amz-json-1.0",
116
+ "x-amz-target": "ComputeOptimizerService.GetEnrollmentStatusesForOrganization",
117
+ };
118
+ let body;
119
+ body = JSON.stringify(serializeAws_json1_0GetEnrollmentStatusesForOrganizationRequest(input, context));
120
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
+ };
122
+ export const serializeAws_json1_0GetLambdaFunctionRecommendationsCommand = async (input, context) => {
123
+ const headers = {
124
+ "content-type": "application/x-amz-json-1.0",
125
+ "x-amz-target": "ComputeOptimizerService.GetLambdaFunctionRecommendations",
126
+ };
127
+ let body;
128
+ body = JSON.stringify(serializeAws_json1_0GetLambdaFunctionRecommendationsRequest(input, context));
129
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
+ };
131
+ export const serializeAws_json1_0GetRecommendationPreferencesCommand = async (input, context) => {
132
+ const headers = {
133
+ "content-type": "application/x-amz-json-1.0",
134
+ "x-amz-target": "ComputeOptimizerService.GetRecommendationPreferences",
135
+ };
136
+ let body;
137
+ body = JSON.stringify(serializeAws_json1_0GetRecommendationPreferencesRequest(input, context));
138
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
+ };
140
+ export const serializeAws_json1_0GetRecommendationSummariesCommand = async (input, context) => {
141
+ const headers = {
142
+ "content-type": "application/x-amz-json-1.0",
143
+ "x-amz-target": "ComputeOptimizerService.GetRecommendationSummaries",
144
+ };
145
+ let body;
146
+ body = JSON.stringify(serializeAws_json1_0GetRecommendationSummariesRequest(input, context));
147
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
+ };
149
+ export const serializeAws_json1_0PutRecommendationPreferencesCommand = async (input, context) => {
150
+ const headers = {
151
+ "content-type": "application/x-amz-json-1.0",
152
+ "x-amz-target": "ComputeOptimizerService.PutRecommendationPreferences",
153
+ };
154
+ let body;
155
+ body = JSON.stringify(serializeAws_json1_0PutRecommendationPreferencesRequest(input, context));
156
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
+ };
158
+ export const serializeAws_json1_0UpdateEnrollmentStatusCommand = async (input, context) => {
159
+ const headers = {
160
+ "content-type": "application/x-amz-json-1.0",
161
+ "x-amz-target": "ComputeOptimizerService.UpdateEnrollmentStatus",
162
+ };
163
+ let body;
164
+ body = JSON.stringify(serializeAws_json1_0UpdateEnrollmentStatusRequest(input, context));
165
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
+ };
167
+ export const deserializeAws_json1_0DeleteRecommendationPreferencesCommand = async (output, context) => {
168
+ if (output.statusCode >= 300) {
169
+ return deserializeAws_json1_0DeleteRecommendationPreferencesCommandError(output, context);
170
+ }
171
+ const data = await parseBody(output.body, context);
172
+ let contents = {};
173
+ contents = deserializeAws_json1_0DeleteRecommendationPreferencesResponse(data, context);
174
+ const response = {
175
+ $metadata: deserializeMetadata(output),
176
+ ...contents,
177
+ };
178
+ return Promise.resolve(response);
179
+ };
180
+ const deserializeAws_json1_0DeleteRecommendationPreferencesCommandError = async (output, context) => {
181
+ const parsedOutput = {
182
+ ...output,
183
+ body: await parseErrorBody(output.body, context),
184
+ };
185
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
186
+ switch (errorCode) {
187
+ case "AccessDeniedException":
188
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
189
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
190
+ case "InternalServerException":
191
+ case "com.amazonaws.computeoptimizer#InternalServerException":
192
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
193
+ case "InvalidParameterValueException":
194
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
195
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
196
+ case "MissingAuthenticationToken":
197
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
198
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
199
+ case "OptInRequiredException":
200
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
201
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
202
+ case "ResourceNotFoundException":
203
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
204
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
205
+ case "ServiceUnavailableException":
206
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
207
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
208
+ case "ThrottlingException":
209
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
210
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
211
+ default:
212
+ const parsedBody = parsedOutput.body;
213
+ throwDefaultError({
214
+ output,
215
+ parsedBody,
216
+ exceptionCtor: __BaseException,
217
+ errorCode,
218
+ });
219
+ }
220
+ };
221
+ export const deserializeAws_json1_0DescribeRecommendationExportJobsCommand = async (output, context) => {
222
+ if (output.statusCode >= 300) {
223
+ return deserializeAws_json1_0DescribeRecommendationExportJobsCommandError(output, context);
224
+ }
225
+ const data = await parseBody(output.body, context);
226
+ let contents = {};
227
+ contents = deserializeAws_json1_0DescribeRecommendationExportJobsResponse(data, context);
228
+ const response = {
229
+ $metadata: deserializeMetadata(output),
230
+ ...contents,
231
+ };
232
+ return Promise.resolve(response);
233
+ };
234
+ const deserializeAws_json1_0DescribeRecommendationExportJobsCommandError = async (output, context) => {
235
+ const parsedOutput = {
236
+ ...output,
237
+ body: await parseErrorBody(output.body, context),
238
+ };
239
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
240
+ switch (errorCode) {
241
+ case "AccessDeniedException":
242
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
243
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
244
+ case "InternalServerException":
245
+ case "com.amazonaws.computeoptimizer#InternalServerException":
246
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
247
+ case "InvalidParameterValueException":
248
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
249
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
250
+ case "MissingAuthenticationToken":
251
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
252
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
253
+ case "OptInRequiredException":
254
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
255
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
256
+ case "ResourceNotFoundException":
257
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
258
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
259
+ case "ServiceUnavailableException":
260
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
261
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
262
+ case "ThrottlingException":
263
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
264
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
265
+ default:
266
+ const parsedBody = parsedOutput.body;
267
+ throwDefaultError({
268
+ output,
269
+ parsedBody,
270
+ exceptionCtor: __BaseException,
271
+ errorCode,
272
+ });
273
+ }
274
+ };
275
+ export const deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommand = async (output, context) => {
276
+ if (output.statusCode >= 300) {
277
+ return deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommandError(output, context);
278
+ }
279
+ const data = await parseBody(output.body, context);
280
+ let contents = {};
281
+ contents = deserializeAws_json1_0ExportAutoScalingGroupRecommendationsResponse(data, context);
282
+ const response = {
283
+ $metadata: deserializeMetadata(output),
284
+ ...contents,
285
+ };
286
+ return Promise.resolve(response);
287
+ };
288
+ const deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommandError = async (output, context) => {
289
+ const parsedOutput = {
290
+ ...output,
291
+ body: await parseErrorBody(output.body, context),
292
+ };
293
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
294
+ switch (errorCode) {
295
+ case "AccessDeniedException":
296
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
297
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
298
+ case "InternalServerException":
299
+ case "com.amazonaws.computeoptimizer#InternalServerException":
300
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
301
+ case "InvalidParameterValueException":
302
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
303
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
304
+ case "LimitExceededException":
305
+ case "com.amazonaws.computeoptimizer#LimitExceededException":
306
+ throw await deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context);
307
+ case "MissingAuthenticationToken":
308
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
309
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
310
+ case "OptInRequiredException":
311
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
312
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
313
+ case "ServiceUnavailableException":
314
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
315
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
316
+ case "ThrottlingException":
317
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
318
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
319
+ default:
320
+ const parsedBody = parsedOutput.body;
321
+ throwDefaultError({
322
+ output,
323
+ parsedBody,
324
+ exceptionCtor: __BaseException,
325
+ errorCode,
326
+ });
327
+ }
328
+ };
329
+ export const deserializeAws_json1_0ExportEBSVolumeRecommendationsCommand = async (output, context) => {
330
+ if (output.statusCode >= 300) {
331
+ return deserializeAws_json1_0ExportEBSVolumeRecommendationsCommandError(output, context);
332
+ }
333
+ const data = await parseBody(output.body, context);
334
+ let contents = {};
335
+ contents = deserializeAws_json1_0ExportEBSVolumeRecommendationsResponse(data, context);
336
+ const response = {
337
+ $metadata: deserializeMetadata(output),
338
+ ...contents,
339
+ };
340
+ return Promise.resolve(response);
341
+ };
342
+ const deserializeAws_json1_0ExportEBSVolumeRecommendationsCommandError = async (output, context) => {
343
+ const parsedOutput = {
344
+ ...output,
345
+ body: await parseErrorBody(output.body, context),
346
+ };
347
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
348
+ switch (errorCode) {
349
+ case "AccessDeniedException":
350
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
351
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
352
+ case "InternalServerException":
353
+ case "com.amazonaws.computeoptimizer#InternalServerException":
354
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
355
+ case "InvalidParameterValueException":
356
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
357
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
358
+ case "LimitExceededException":
359
+ case "com.amazonaws.computeoptimizer#LimitExceededException":
360
+ throw await deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context);
361
+ case "MissingAuthenticationToken":
362
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
363
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
364
+ case "OptInRequiredException":
365
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
366
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
367
+ case "ServiceUnavailableException":
368
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
369
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
370
+ case "ThrottlingException":
371
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
372
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
373
+ default:
374
+ const parsedBody = parsedOutput.body;
375
+ throwDefaultError({
376
+ output,
377
+ parsedBody,
378
+ exceptionCtor: __BaseException,
379
+ errorCode,
380
+ });
381
+ }
382
+ };
383
+ export const deserializeAws_json1_0ExportEC2InstanceRecommendationsCommand = async (output, context) => {
384
+ if (output.statusCode >= 300) {
385
+ return deserializeAws_json1_0ExportEC2InstanceRecommendationsCommandError(output, context);
386
+ }
387
+ const data = await parseBody(output.body, context);
388
+ let contents = {};
389
+ contents = deserializeAws_json1_0ExportEC2InstanceRecommendationsResponse(data, context);
390
+ const response = {
391
+ $metadata: deserializeMetadata(output),
392
+ ...contents,
393
+ };
394
+ return Promise.resolve(response);
395
+ };
396
+ const deserializeAws_json1_0ExportEC2InstanceRecommendationsCommandError = async (output, context) => {
397
+ const parsedOutput = {
398
+ ...output,
399
+ body: await parseErrorBody(output.body, context),
400
+ };
401
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
402
+ switch (errorCode) {
403
+ case "AccessDeniedException":
404
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
405
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
406
+ case "InternalServerException":
407
+ case "com.amazonaws.computeoptimizer#InternalServerException":
408
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
409
+ case "InvalidParameterValueException":
410
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
411
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
412
+ case "LimitExceededException":
413
+ case "com.amazonaws.computeoptimizer#LimitExceededException":
414
+ throw await deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context);
415
+ case "MissingAuthenticationToken":
416
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
417
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
418
+ case "OptInRequiredException":
419
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
420
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
421
+ case "ServiceUnavailableException":
422
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
423
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
424
+ case "ThrottlingException":
425
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
426
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
427
+ default:
428
+ const parsedBody = parsedOutput.body;
429
+ throwDefaultError({
430
+ output,
431
+ parsedBody,
432
+ exceptionCtor: __BaseException,
433
+ errorCode,
434
+ });
435
+ }
436
+ };
437
+ export const deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = async (output, context) => {
438
+ if (output.statusCode >= 300) {
439
+ return deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommandError(output, context);
440
+ }
441
+ const data = await parseBody(output.body, context);
442
+ let contents = {};
443
+ contents = deserializeAws_json1_0ExportLambdaFunctionRecommendationsResponse(data, context);
444
+ const response = {
445
+ $metadata: deserializeMetadata(output),
446
+ ...contents,
447
+ };
448
+ return Promise.resolve(response);
449
+ };
450
+ const deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommandError = async (output, context) => {
451
+ const parsedOutput = {
452
+ ...output,
453
+ body: await parseErrorBody(output.body, context),
454
+ };
455
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
456
+ switch (errorCode) {
457
+ case "AccessDeniedException":
458
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
459
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
460
+ case "InternalServerException":
461
+ case "com.amazonaws.computeoptimizer#InternalServerException":
462
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
463
+ case "InvalidParameterValueException":
464
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
465
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
466
+ case "LimitExceededException":
467
+ case "com.amazonaws.computeoptimizer#LimitExceededException":
468
+ throw await deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context);
469
+ case "MissingAuthenticationToken":
470
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
471
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
472
+ case "OptInRequiredException":
473
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
474
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
475
+ case "ServiceUnavailableException":
476
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
477
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
478
+ case "ThrottlingException":
479
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
480
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
481
+ default:
482
+ const parsedBody = parsedOutput.body;
483
+ throwDefaultError({
484
+ output,
485
+ parsedBody,
486
+ exceptionCtor: __BaseException,
487
+ errorCode,
488
+ });
489
+ }
490
+ };
491
+ export const deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = async (output, context) => {
492
+ if (output.statusCode >= 300) {
493
+ return deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommandError(output, context);
494
+ }
495
+ const data = await parseBody(output.body, context);
496
+ let contents = {};
497
+ contents = deserializeAws_json1_0GetAutoScalingGroupRecommendationsResponse(data, context);
498
+ const response = {
499
+ $metadata: deserializeMetadata(output),
500
+ ...contents,
501
+ };
502
+ return Promise.resolve(response);
503
+ };
504
+ const deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommandError = async (output, context) => {
505
+ const parsedOutput = {
506
+ ...output,
507
+ body: await parseErrorBody(output.body, context),
508
+ };
509
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
510
+ switch (errorCode) {
511
+ case "AccessDeniedException":
512
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
513
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
514
+ case "InternalServerException":
515
+ case "com.amazonaws.computeoptimizer#InternalServerException":
516
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
517
+ case "InvalidParameterValueException":
518
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
519
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
520
+ case "MissingAuthenticationToken":
521
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
522
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
523
+ case "OptInRequiredException":
524
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
525
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
526
+ case "ResourceNotFoundException":
527
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
528
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
529
+ case "ServiceUnavailableException":
530
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
531
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
532
+ case "ThrottlingException":
533
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
534
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
535
+ default:
536
+ const parsedBody = parsedOutput.body;
537
+ throwDefaultError({
538
+ output,
539
+ parsedBody,
540
+ exceptionCtor: __BaseException,
541
+ errorCode,
542
+ });
543
+ }
544
+ };
545
+ export const deserializeAws_json1_0GetEBSVolumeRecommendationsCommand = async (output, context) => {
546
+ if (output.statusCode >= 300) {
547
+ return deserializeAws_json1_0GetEBSVolumeRecommendationsCommandError(output, context);
548
+ }
549
+ const data = await parseBody(output.body, context);
550
+ let contents = {};
551
+ contents = deserializeAws_json1_0GetEBSVolumeRecommendationsResponse(data, context);
552
+ const response = {
553
+ $metadata: deserializeMetadata(output),
554
+ ...contents,
555
+ };
556
+ return Promise.resolve(response);
557
+ };
558
+ const deserializeAws_json1_0GetEBSVolumeRecommendationsCommandError = async (output, context) => {
559
+ const parsedOutput = {
560
+ ...output,
561
+ body: await parseErrorBody(output.body, context),
562
+ };
563
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
564
+ switch (errorCode) {
565
+ case "AccessDeniedException":
566
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
567
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
568
+ case "InternalServerException":
569
+ case "com.amazonaws.computeoptimizer#InternalServerException":
570
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
571
+ case "InvalidParameterValueException":
572
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
573
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
574
+ case "MissingAuthenticationToken":
575
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
576
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
577
+ case "OptInRequiredException":
578
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
579
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
580
+ case "ResourceNotFoundException":
581
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
582
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
583
+ case "ServiceUnavailableException":
584
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
585
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
586
+ case "ThrottlingException":
587
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
588
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
589
+ default:
590
+ const parsedBody = parsedOutput.body;
591
+ throwDefaultError({
592
+ output,
593
+ parsedBody,
594
+ exceptionCtor: __BaseException,
595
+ errorCode,
596
+ });
597
+ }
598
+ };
599
+ export const deserializeAws_json1_0GetEC2InstanceRecommendationsCommand = async (output, context) => {
600
+ if (output.statusCode >= 300) {
601
+ return deserializeAws_json1_0GetEC2InstanceRecommendationsCommandError(output, context);
602
+ }
603
+ const data = await parseBody(output.body, context);
604
+ let contents = {};
605
+ contents = deserializeAws_json1_0GetEC2InstanceRecommendationsResponse(data, context);
606
+ const response = {
607
+ $metadata: deserializeMetadata(output),
608
+ ...contents,
609
+ };
610
+ return Promise.resolve(response);
611
+ };
612
+ const deserializeAws_json1_0GetEC2InstanceRecommendationsCommandError = async (output, context) => {
613
+ const parsedOutput = {
614
+ ...output,
615
+ body: await parseErrorBody(output.body, context),
616
+ };
617
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
618
+ switch (errorCode) {
619
+ case "AccessDeniedException":
620
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
621
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
622
+ case "InternalServerException":
623
+ case "com.amazonaws.computeoptimizer#InternalServerException":
624
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
625
+ case "InvalidParameterValueException":
626
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
627
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
628
+ case "MissingAuthenticationToken":
629
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
630
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
631
+ case "OptInRequiredException":
632
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
633
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
634
+ case "ResourceNotFoundException":
635
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
636
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
637
+ case "ServiceUnavailableException":
638
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
639
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
640
+ case "ThrottlingException":
641
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
642
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
643
+ default:
644
+ const parsedBody = parsedOutput.body;
645
+ throwDefaultError({
646
+ output,
647
+ parsedBody,
648
+ exceptionCtor: __BaseException,
649
+ errorCode,
650
+ });
651
+ }
652
+ };
653
+ export const deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = async (output, context) => {
654
+ if (output.statusCode >= 300) {
655
+ return deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommandError(output, context);
656
+ }
657
+ const data = await parseBody(output.body, context);
658
+ let contents = {};
659
+ contents = deserializeAws_json1_0GetEC2RecommendationProjectedMetricsResponse(data, context);
660
+ const response = {
661
+ $metadata: deserializeMetadata(output),
662
+ ...contents,
663
+ };
664
+ return Promise.resolve(response);
665
+ };
666
+ const deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommandError = async (output, context) => {
667
+ const parsedOutput = {
668
+ ...output,
669
+ body: await parseErrorBody(output.body, context),
670
+ };
671
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
672
+ switch (errorCode) {
673
+ case "AccessDeniedException":
674
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
675
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
676
+ case "InternalServerException":
677
+ case "com.amazonaws.computeoptimizer#InternalServerException":
678
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
679
+ case "InvalidParameterValueException":
680
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
681
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
682
+ case "MissingAuthenticationToken":
683
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
684
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
685
+ case "OptInRequiredException":
686
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
687
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
688
+ case "ResourceNotFoundException":
689
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
690
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
691
+ case "ServiceUnavailableException":
692
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
693
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
694
+ case "ThrottlingException":
695
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
696
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
697
+ default:
698
+ const parsedBody = parsedOutput.body;
699
+ throwDefaultError({
700
+ output,
701
+ parsedBody,
702
+ exceptionCtor: __BaseException,
703
+ errorCode,
704
+ });
705
+ }
706
+ };
707
+ export const deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = async (output, context) => {
708
+ if (output.statusCode >= 300) {
709
+ return deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError(output, context);
710
+ }
711
+ const data = await parseBody(output.body, context);
712
+ let contents = {};
713
+ contents = deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse(data, context);
714
+ const response = {
715
+ $metadata: deserializeMetadata(output),
716
+ ...contents,
717
+ };
718
+ return Promise.resolve(response);
719
+ };
720
+ const deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError = async (output, context) => {
721
+ const parsedOutput = {
722
+ ...output,
723
+ body: await parseErrorBody(output.body, context),
724
+ };
725
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
726
+ switch (errorCode) {
727
+ case "AccessDeniedException":
728
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
729
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
730
+ case "InternalServerException":
731
+ case "com.amazonaws.computeoptimizer#InternalServerException":
732
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
733
+ case "InvalidParameterValueException":
734
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
735
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
736
+ case "MissingAuthenticationToken":
737
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
738
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
739
+ case "OptInRequiredException":
740
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
741
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
742
+ case "ResourceNotFoundException":
743
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
744
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
745
+ case "ServiceUnavailableException":
746
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
747
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
748
+ case "ThrottlingException":
749
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
750
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
751
+ default:
752
+ const parsedBody = parsedOutput.body;
753
+ throwDefaultError({
754
+ output,
755
+ parsedBody,
756
+ exceptionCtor: __BaseException,
757
+ errorCode,
758
+ });
759
+ }
760
+ };
761
+ export const deserializeAws_json1_0GetEnrollmentStatusCommand = async (output, context) => {
762
+ if (output.statusCode >= 300) {
763
+ return deserializeAws_json1_0GetEnrollmentStatusCommandError(output, context);
764
+ }
765
+ const data = await parseBody(output.body, context);
766
+ let contents = {};
767
+ contents = deserializeAws_json1_0GetEnrollmentStatusResponse(data, context);
768
+ const response = {
769
+ $metadata: deserializeMetadata(output),
770
+ ...contents,
771
+ };
772
+ return Promise.resolve(response);
773
+ };
774
+ const deserializeAws_json1_0GetEnrollmentStatusCommandError = async (output, context) => {
775
+ const parsedOutput = {
776
+ ...output,
777
+ body: await parseErrorBody(output.body, context),
778
+ };
779
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
780
+ switch (errorCode) {
781
+ case "AccessDeniedException":
782
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
783
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
784
+ case "InternalServerException":
785
+ case "com.amazonaws.computeoptimizer#InternalServerException":
786
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
787
+ case "InvalidParameterValueException":
788
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
789
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
790
+ case "MissingAuthenticationToken":
791
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
792
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
793
+ case "ServiceUnavailableException":
794
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
795
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
796
+ case "ThrottlingException":
797
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
798
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
799
+ default:
800
+ const parsedBody = parsedOutput.body;
801
+ throwDefaultError({
802
+ output,
803
+ parsedBody,
804
+ exceptionCtor: __BaseException,
805
+ errorCode,
806
+ });
807
+ }
808
+ };
809
+ export const deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommand = async (output, context) => {
810
+ if (output.statusCode >= 300) {
811
+ return deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommandError(output, context);
812
+ }
813
+ const data = await parseBody(output.body, context);
814
+ let contents = {};
815
+ contents = deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse(data, context);
816
+ const response = {
817
+ $metadata: deserializeMetadata(output),
818
+ ...contents,
819
+ };
820
+ return Promise.resolve(response);
821
+ };
822
+ const deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommandError = async (output, context) => {
823
+ const parsedOutput = {
824
+ ...output,
825
+ body: await parseErrorBody(output.body, context),
826
+ };
827
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
828
+ switch (errorCode) {
829
+ case "AccessDeniedException":
830
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
831
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
832
+ case "InternalServerException":
833
+ case "com.amazonaws.computeoptimizer#InternalServerException":
834
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
835
+ case "InvalidParameterValueException":
836
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
837
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
838
+ case "MissingAuthenticationToken":
839
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
840
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
841
+ case "ServiceUnavailableException":
842
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
843
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
844
+ case "ThrottlingException":
845
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
846
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
847
+ default:
848
+ const parsedBody = parsedOutput.body;
849
+ throwDefaultError({
850
+ output,
851
+ parsedBody,
852
+ exceptionCtor: __BaseException,
853
+ errorCode,
854
+ });
855
+ }
856
+ };
857
+ export const deserializeAws_json1_0GetLambdaFunctionRecommendationsCommand = async (output, context) => {
858
+ if (output.statusCode >= 300) {
859
+ return deserializeAws_json1_0GetLambdaFunctionRecommendationsCommandError(output, context);
860
+ }
861
+ const data = await parseBody(output.body, context);
862
+ let contents = {};
863
+ contents = deserializeAws_json1_0GetLambdaFunctionRecommendationsResponse(data, context);
864
+ const response = {
865
+ $metadata: deserializeMetadata(output),
866
+ ...contents,
867
+ };
868
+ return Promise.resolve(response);
869
+ };
870
+ const deserializeAws_json1_0GetLambdaFunctionRecommendationsCommandError = async (output, context) => {
871
+ const parsedOutput = {
872
+ ...output,
873
+ body: await parseErrorBody(output.body, context),
874
+ };
875
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
876
+ switch (errorCode) {
877
+ case "AccessDeniedException":
878
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
879
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
880
+ case "InternalServerException":
881
+ case "com.amazonaws.computeoptimizer#InternalServerException":
882
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
883
+ case "InvalidParameterValueException":
884
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
885
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
886
+ case "LimitExceededException":
887
+ case "com.amazonaws.computeoptimizer#LimitExceededException":
888
+ throw await deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context);
889
+ case "MissingAuthenticationToken":
890
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
891
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
892
+ case "OptInRequiredException":
893
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
894
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
895
+ case "ServiceUnavailableException":
896
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
897
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
898
+ case "ThrottlingException":
899
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
900
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
901
+ default:
902
+ const parsedBody = parsedOutput.body;
903
+ throwDefaultError({
904
+ output,
905
+ parsedBody,
906
+ exceptionCtor: __BaseException,
907
+ errorCode,
908
+ });
909
+ }
910
+ };
911
+ export const deserializeAws_json1_0GetRecommendationPreferencesCommand = async (output, context) => {
912
+ if (output.statusCode >= 300) {
913
+ return deserializeAws_json1_0GetRecommendationPreferencesCommandError(output, context);
914
+ }
915
+ const data = await parseBody(output.body, context);
916
+ let contents = {};
917
+ contents = deserializeAws_json1_0GetRecommendationPreferencesResponse(data, context);
918
+ const response = {
919
+ $metadata: deserializeMetadata(output),
920
+ ...contents,
921
+ };
922
+ return Promise.resolve(response);
923
+ };
924
+ const deserializeAws_json1_0GetRecommendationPreferencesCommandError = async (output, context) => {
925
+ const parsedOutput = {
926
+ ...output,
927
+ body: await parseErrorBody(output.body, context),
928
+ };
929
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
930
+ switch (errorCode) {
931
+ case "AccessDeniedException":
932
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
933
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
934
+ case "InternalServerException":
935
+ case "com.amazonaws.computeoptimizer#InternalServerException":
936
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
937
+ case "InvalidParameterValueException":
938
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
939
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
940
+ case "MissingAuthenticationToken":
941
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
942
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
943
+ case "OptInRequiredException":
944
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
945
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
946
+ case "ResourceNotFoundException":
947
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
948
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
949
+ case "ServiceUnavailableException":
950
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
951
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
952
+ case "ThrottlingException":
953
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
954
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
955
+ default:
956
+ const parsedBody = parsedOutput.body;
957
+ throwDefaultError({
958
+ output,
959
+ parsedBody,
960
+ exceptionCtor: __BaseException,
961
+ errorCode,
962
+ });
963
+ }
964
+ };
965
+ export const deserializeAws_json1_0GetRecommendationSummariesCommand = async (output, context) => {
966
+ if (output.statusCode >= 300) {
967
+ return deserializeAws_json1_0GetRecommendationSummariesCommandError(output, context);
968
+ }
969
+ const data = await parseBody(output.body, context);
970
+ let contents = {};
971
+ contents = deserializeAws_json1_0GetRecommendationSummariesResponse(data, context);
972
+ const response = {
973
+ $metadata: deserializeMetadata(output),
974
+ ...contents,
975
+ };
976
+ return Promise.resolve(response);
977
+ };
978
+ const deserializeAws_json1_0GetRecommendationSummariesCommandError = async (output, context) => {
979
+ const parsedOutput = {
980
+ ...output,
981
+ body: await parseErrorBody(output.body, context),
982
+ };
983
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
984
+ switch (errorCode) {
985
+ case "AccessDeniedException":
986
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
987
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
988
+ case "InternalServerException":
989
+ case "com.amazonaws.computeoptimizer#InternalServerException":
990
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
991
+ case "InvalidParameterValueException":
992
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
993
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
994
+ case "MissingAuthenticationToken":
995
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
996
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
997
+ case "OptInRequiredException":
998
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
999
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
1000
+ case "ServiceUnavailableException":
1001
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
1002
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
1003
+ case "ThrottlingException":
1004
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
1005
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
1006
+ default:
1007
+ const parsedBody = parsedOutput.body;
1008
+ throwDefaultError({
1009
+ output,
1010
+ parsedBody,
1011
+ exceptionCtor: __BaseException,
1012
+ errorCode,
1013
+ });
1014
+ }
1015
+ };
1016
+ export const deserializeAws_json1_0PutRecommendationPreferencesCommand = async (output, context) => {
1017
+ if (output.statusCode >= 300) {
1018
+ return deserializeAws_json1_0PutRecommendationPreferencesCommandError(output, context);
1019
+ }
1020
+ const data = await parseBody(output.body, context);
1021
+ let contents = {};
1022
+ contents = deserializeAws_json1_0PutRecommendationPreferencesResponse(data, context);
1023
+ const response = {
1024
+ $metadata: deserializeMetadata(output),
1025
+ ...contents,
1026
+ };
1027
+ return Promise.resolve(response);
1028
+ };
1029
+ const deserializeAws_json1_0PutRecommendationPreferencesCommandError = async (output, context) => {
1030
+ const parsedOutput = {
1031
+ ...output,
1032
+ body: await parseErrorBody(output.body, context),
1033
+ };
1034
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1035
+ switch (errorCode) {
1036
+ case "AccessDeniedException":
1037
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
1038
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
1039
+ case "InternalServerException":
1040
+ case "com.amazonaws.computeoptimizer#InternalServerException":
1041
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
1042
+ case "InvalidParameterValueException":
1043
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
1044
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
1045
+ case "MissingAuthenticationToken":
1046
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
1047
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
1048
+ case "OptInRequiredException":
1049
+ case "com.amazonaws.computeoptimizer#OptInRequiredException":
1050
+ throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
1051
+ case "ResourceNotFoundException":
1052
+ case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
1053
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
1054
+ case "ServiceUnavailableException":
1055
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
1056
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
1057
+ case "ThrottlingException":
1058
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
1059
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
1060
+ default:
1061
+ const parsedBody = parsedOutput.body;
1062
+ throwDefaultError({
1063
+ output,
1064
+ parsedBody,
1065
+ exceptionCtor: __BaseException,
1066
+ errorCode,
1067
+ });
1068
+ }
1069
+ };
1070
+ export const deserializeAws_json1_0UpdateEnrollmentStatusCommand = async (output, context) => {
1071
+ if (output.statusCode >= 300) {
1072
+ return deserializeAws_json1_0UpdateEnrollmentStatusCommandError(output, context);
1073
+ }
1074
+ const data = await parseBody(output.body, context);
1075
+ let contents = {};
1076
+ contents = deserializeAws_json1_0UpdateEnrollmentStatusResponse(data, context);
1077
+ const response = {
1078
+ $metadata: deserializeMetadata(output),
1079
+ ...contents,
1080
+ };
1081
+ return Promise.resolve(response);
1082
+ };
1083
+ const deserializeAws_json1_0UpdateEnrollmentStatusCommandError = async (output, context) => {
1084
+ const parsedOutput = {
1085
+ ...output,
1086
+ body: await parseErrorBody(output.body, context),
1087
+ };
1088
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1089
+ switch (errorCode) {
1090
+ case "AccessDeniedException":
1091
+ case "com.amazonaws.computeoptimizer#AccessDeniedException":
1092
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
1093
+ case "InternalServerException":
1094
+ case "com.amazonaws.computeoptimizer#InternalServerException":
1095
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
1096
+ case "InvalidParameterValueException":
1097
+ case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
1098
+ throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
1099
+ case "MissingAuthenticationToken":
1100
+ case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
1101
+ throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
1102
+ case "ServiceUnavailableException":
1103
+ case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
1104
+ throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
1105
+ case "ThrottlingException":
1106
+ case "com.amazonaws.computeoptimizer#ThrottlingException":
1107
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
1108
+ default:
1109
+ const parsedBody = parsedOutput.body;
1110
+ throwDefaultError({
1111
+ output,
1112
+ parsedBody,
1113
+ exceptionCtor: __BaseException,
1114
+ errorCode,
1115
+ });
1116
+ }
1117
+ };
1118
+ const deserializeAws_json1_0AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1119
+ const body = parsedOutput.body;
1120
+ const deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
1121
+ const exception = new AccessDeniedException({
1122
+ $metadata: deserializeMetadata(parsedOutput),
1123
+ ...deserialized,
1124
+ });
1125
+ return __decorateServiceException(exception, body);
1126
+ };
1127
+ const deserializeAws_json1_0InternalServerExceptionResponse = async (parsedOutput, context) => {
1128
+ const body = parsedOutput.body;
1129
+ const deserialized = deserializeAws_json1_0InternalServerException(body, context);
1130
+ const exception = new InternalServerException({
1131
+ $metadata: deserializeMetadata(parsedOutput),
1132
+ ...deserialized,
1133
+ });
1134
+ return __decorateServiceException(exception, body);
1135
+ };
1136
+ const deserializeAws_json1_0InvalidParameterValueExceptionResponse = async (parsedOutput, context) => {
1137
+ const body = parsedOutput.body;
1138
+ const deserialized = deserializeAws_json1_0InvalidParameterValueException(body, context);
1139
+ const exception = new InvalidParameterValueException({
1140
+ $metadata: deserializeMetadata(parsedOutput),
1141
+ ...deserialized,
1142
+ });
1143
+ return __decorateServiceException(exception, body);
1144
+ };
1145
+ const deserializeAws_json1_0LimitExceededExceptionResponse = async (parsedOutput, context) => {
1146
+ const body = parsedOutput.body;
1147
+ const deserialized = deserializeAws_json1_0LimitExceededException(body, context);
1148
+ const exception = new LimitExceededException({
1149
+ $metadata: deserializeMetadata(parsedOutput),
1150
+ ...deserialized,
1151
+ });
1152
+ return __decorateServiceException(exception, body);
1153
+ };
1154
+ const deserializeAws_json1_0MissingAuthenticationTokenResponse = async (parsedOutput, context) => {
1155
+ const body = parsedOutput.body;
1156
+ const deserialized = deserializeAws_json1_0MissingAuthenticationToken(body, context);
1157
+ const exception = new MissingAuthenticationToken({
1158
+ $metadata: deserializeMetadata(parsedOutput),
1159
+ ...deserialized,
1160
+ });
1161
+ return __decorateServiceException(exception, body);
1162
+ };
1163
+ const deserializeAws_json1_0OptInRequiredExceptionResponse = async (parsedOutput, context) => {
1164
+ const body = parsedOutput.body;
1165
+ const deserialized = deserializeAws_json1_0OptInRequiredException(body, context);
1166
+ const exception = new OptInRequiredException({
1167
+ $metadata: deserializeMetadata(parsedOutput),
1168
+ ...deserialized,
1169
+ });
1170
+ return __decorateServiceException(exception, body);
1171
+ };
1172
+ const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1173
+ const body = parsedOutput.body;
1174
+ const deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
1175
+ const exception = new ResourceNotFoundException({
1176
+ $metadata: deserializeMetadata(parsedOutput),
1177
+ ...deserialized,
1178
+ });
1179
+ return __decorateServiceException(exception, body);
1180
+ };
1181
+ const deserializeAws_json1_0ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
1182
+ const body = parsedOutput.body;
1183
+ const deserialized = deserializeAws_json1_0ServiceUnavailableException(body, context);
1184
+ const exception = new ServiceUnavailableException({
1185
+ $metadata: deserializeMetadata(parsedOutput),
1186
+ ...deserialized,
1187
+ });
1188
+ return __decorateServiceException(exception, body);
1189
+ };
1190
+ const deserializeAws_json1_0ThrottlingExceptionResponse = async (parsedOutput, context) => {
1191
+ const body = parsedOutput.body;
1192
+ const deserialized = deserializeAws_json1_0ThrottlingException(body, context);
1193
+ const exception = new ThrottlingException({
1194
+ $metadata: deserializeMetadata(parsedOutput),
1195
+ ...deserialized,
1196
+ });
1197
+ return __decorateServiceException(exception, body);
1198
+ };
1199
+ const serializeAws_json1_0AccountIds = (input, context) => {
1680
1200
  return input
1681
- .filter(function (e) { return e != null; })
1682
- .map(function (entry) {
1201
+ .filter((e) => e != null)
1202
+ .map((entry) => {
1683
1203
  return entry;
1684
1204
  });
1685
1205
  };
1686
- var serializeAws_json1_0AutoScalingGroupArns = function (input, context) {
1206
+ const serializeAws_json1_0AutoScalingGroupArns = (input, context) => {
1687
1207
  return input
1688
- .filter(function (e) { return e != null; })
1689
- .map(function (entry) {
1208
+ .filter((e) => e != null)
1209
+ .map((entry) => {
1690
1210
  return entry;
1691
1211
  });
1692
1212
  };
1693
- var serializeAws_json1_0CpuVendorArchitectures = function (input, context) {
1213
+ const serializeAws_json1_0CpuVendorArchitectures = (input, context) => {
1694
1214
  return input
1695
- .filter(function (e) { return e != null; })
1696
- .map(function (entry) {
1215
+ .filter((e) => e != null)
1216
+ .map((entry) => {
1697
1217
  return entry;
1698
1218
  });
1699
1219
  };
1700
- var serializeAws_json1_0DeleteRecommendationPreferencesRequest = function (input, context) {
1701
- return __assign(__assign(__assign({}, (input.recommendationPreferenceNames != null && {
1702
- recommendationPreferenceNames: serializeAws_json1_0RecommendationPreferenceNames(input.recommendationPreferenceNames, context),
1703
- })), (input.resourceType != null && { resourceType: input.resourceType })), (input.scope != null && { scope: serializeAws_json1_0Scope(input.scope, context) }));
1220
+ const serializeAws_json1_0DeleteRecommendationPreferencesRequest = (input, context) => {
1221
+ return {
1222
+ ...(input.recommendationPreferenceNames != null && {
1223
+ recommendationPreferenceNames: serializeAws_json1_0RecommendationPreferenceNames(input.recommendationPreferenceNames, context),
1224
+ }),
1225
+ ...(input.resourceType != null && { resourceType: input.resourceType }),
1226
+ ...(input.scope != null && { scope: serializeAws_json1_0Scope(input.scope, context) }),
1227
+ };
1704
1228
  };
1705
- var serializeAws_json1_0DescribeRecommendationExportJobsRequest = function (input, context) {
1706
- return __assign(__assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_json1_0JobFilters(input.filters, context) })), (input.jobIds != null && { jobIds: serializeAws_json1_0JobIds(input.jobIds, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1229
+ const serializeAws_json1_0DescribeRecommendationExportJobsRequest = (input, context) => {
1230
+ return {
1231
+ ...(input.filters != null && { filters: serializeAws_json1_0JobFilters(input.filters, context) }),
1232
+ ...(input.jobIds != null && { jobIds: serializeAws_json1_0JobIds(input.jobIds, context) }),
1233
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
1234
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
1235
+ };
1707
1236
  };
1708
- var serializeAws_json1_0EBSFilter = function (input, context) {
1709
- return __assign(__assign({}, (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }));
1237
+ const serializeAws_json1_0EBSFilter = (input, context) => {
1238
+ return {
1239
+ ...(input.name != null && { name: input.name }),
1240
+ ...(input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }),
1241
+ };
1710
1242
  };
1711
- var serializeAws_json1_0EBSFilters = function (input, context) {
1243
+ const serializeAws_json1_0EBSFilters = (input, context) => {
1712
1244
  return input
1713
- .filter(function (e) { return e != null; })
1714
- .map(function (entry) {
1245
+ .filter((e) => e != null)
1246
+ .map((entry) => {
1715
1247
  return serializeAws_json1_0EBSFilter(entry, context);
1716
1248
  });
1717
1249
  };
1718
- var serializeAws_json1_0EnrollmentFilter = function (input, context) {
1719
- return __assign(__assign({}, (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }));
1250
+ const serializeAws_json1_0EnrollmentFilter = (input, context) => {
1251
+ return {
1252
+ ...(input.name != null && { name: input.name }),
1253
+ ...(input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }),
1254
+ };
1720
1255
  };
1721
- var serializeAws_json1_0EnrollmentFilters = function (input, context) {
1256
+ const serializeAws_json1_0EnrollmentFilters = (input, context) => {
1722
1257
  return input
1723
- .filter(function (e) { return e != null; })
1724
- .map(function (entry) {
1258
+ .filter((e) => e != null)
1259
+ .map((entry) => {
1725
1260
  return serializeAws_json1_0EnrollmentFilter(entry, context);
1726
1261
  });
1727
1262
  };
1728
- var serializeAws_json1_0ExportableAutoScalingGroupFields = function (input, context) {
1263
+ const serializeAws_json1_0ExportableAutoScalingGroupFields = (input, context) => {
1729
1264
  return input
1730
- .filter(function (e) { return e != null; })
1731
- .map(function (entry) {
1265
+ .filter((e) => e != null)
1266
+ .map((entry) => {
1732
1267
  return entry;
1733
1268
  });
1734
1269
  };
1735
- var serializeAws_json1_0ExportableInstanceFields = function (input, context) {
1270
+ const serializeAws_json1_0ExportableInstanceFields = (input, context) => {
1736
1271
  return input
1737
- .filter(function (e) { return e != null; })
1738
- .map(function (entry) {
1272
+ .filter((e) => e != null)
1273
+ .map((entry) => {
1739
1274
  return entry;
1740
1275
  });
1741
1276
  };
1742
- var serializeAws_json1_0ExportableLambdaFunctionFields = function (input, context) {
1277
+ const serializeAws_json1_0ExportableLambdaFunctionFields = (input, context) => {
1743
1278
  return input
1744
- .filter(function (e) { return e != null; })
1745
- .map(function (entry) {
1279
+ .filter((e) => e != null)
1280
+ .map((entry) => {
1746
1281
  return entry;
1747
1282
  });
1748
1283
  };
1749
- var serializeAws_json1_0ExportableVolumeFields = function (input, context) {
1284
+ const serializeAws_json1_0ExportableVolumeFields = (input, context) => {
1750
1285
  return input
1751
- .filter(function (e) { return e != null; })
1752
- .map(function (entry) {
1286
+ .filter((e) => e != null)
1287
+ .map((entry) => {
1753
1288
  return entry;
1754
1289
  });
1755
1290
  };
1756
- var serializeAws_json1_0ExportAutoScalingGroupRecommendationsRequest = function (input, context) {
1757
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.fieldsToExport != null && {
1758
- fieldsToExport: serializeAws_json1_0ExportableAutoScalingGroupFields(input.fieldsToExport, context),
1759
- })), (input.fileFormat != null && { fileFormat: input.fileFormat })), (input.filters != null && { filters: serializeAws_json1_0Filters(input.filters, context) })), (input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts })), (input.recommendationPreferences != null && {
1760
- recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1761
- })), (input.s3DestinationConfig != null && {
1762
- s3DestinationConfig: serializeAws_json1_0S3DestinationConfig(input.s3DestinationConfig, context),
1763
- }));
1764
- };
1765
- var serializeAws_json1_0ExportEBSVolumeRecommendationsRequest = function (input, context) {
1766
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.fieldsToExport != null && {
1767
- fieldsToExport: serializeAws_json1_0ExportableVolumeFields(input.fieldsToExport, context),
1768
- })), (input.fileFormat != null && { fileFormat: input.fileFormat })), (input.filters != null && { filters: serializeAws_json1_0EBSFilters(input.filters, context) })), (input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts })), (input.s3DestinationConfig != null && {
1769
- s3DestinationConfig: serializeAws_json1_0S3DestinationConfig(input.s3DestinationConfig, context),
1770
- }));
1771
- };
1772
- var serializeAws_json1_0ExportEC2InstanceRecommendationsRequest = function (input, context) {
1773
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.fieldsToExport != null && {
1774
- fieldsToExport: serializeAws_json1_0ExportableInstanceFields(input.fieldsToExport, context),
1775
- })), (input.fileFormat != null && { fileFormat: input.fileFormat })), (input.filters != null && { filters: serializeAws_json1_0Filters(input.filters, context) })), (input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts })), (input.recommendationPreferences != null && {
1776
- recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1777
- })), (input.s3DestinationConfig != null && {
1778
- s3DestinationConfig: serializeAws_json1_0S3DestinationConfig(input.s3DestinationConfig, context),
1779
- }));
1780
- };
1781
- var serializeAws_json1_0ExportLambdaFunctionRecommendationsRequest = function (input, context) {
1782
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.fieldsToExport != null && {
1783
- fieldsToExport: serializeAws_json1_0ExportableLambdaFunctionFields(input.fieldsToExport, context),
1784
- })), (input.fileFormat != null && { fileFormat: input.fileFormat })), (input.filters != null && {
1785
- filters: serializeAws_json1_0LambdaFunctionRecommendationFilters(input.filters, context),
1786
- })), (input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts })), (input.s3DestinationConfig != null && {
1787
- s3DestinationConfig: serializeAws_json1_0S3DestinationConfig(input.s3DestinationConfig, context),
1788
- }));
1789
- };
1790
- var serializeAws_json1_0Filter = function (input, context) {
1791
- return __assign(__assign({}, (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }));
1792
- };
1793
- var serializeAws_json1_0Filters = function (input, context) {
1291
+ const serializeAws_json1_0ExportAutoScalingGroupRecommendationsRequest = (input, context) => {
1292
+ return {
1293
+ ...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
1294
+ ...(input.fieldsToExport != null && {
1295
+ fieldsToExport: serializeAws_json1_0ExportableAutoScalingGroupFields(input.fieldsToExport, context),
1296
+ }),
1297
+ ...(input.fileFormat != null && { fileFormat: input.fileFormat }),
1298
+ ...(input.filters != null && { filters: serializeAws_json1_0Filters(input.filters, context) }),
1299
+ ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1300
+ ...(input.recommendationPreferences != null && {
1301
+ recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1302
+ }),
1303
+ ...(input.s3DestinationConfig != null && {
1304
+ s3DestinationConfig: serializeAws_json1_0S3DestinationConfig(input.s3DestinationConfig, context),
1305
+ }),
1306
+ };
1307
+ };
1308
+ const serializeAws_json1_0ExportEBSVolumeRecommendationsRequest = (input, context) => {
1309
+ return {
1310
+ ...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
1311
+ ...(input.fieldsToExport != null && {
1312
+ fieldsToExport: serializeAws_json1_0ExportableVolumeFields(input.fieldsToExport, context),
1313
+ }),
1314
+ ...(input.fileFormat != null && { fileFormat: input.fileFormat }),
1315
+ ...(input.filters != null && { filters: serializeAws_json1_0EBSFilters(input.filters, context) }),
1316
+ ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1317
+ ...(input.s3DestinationConfig != null && {
1318
+ s3DestinationConfig: serializeAws_json1_0S3DestinationConfig(input.s3DestinationConfig, context),
1319
+ }),
1320
+ };
1321
+ };
1322
+ const serializeAws_json1_0ExportEC2InstanceRecommendationsRequest = (input, context) => {
1323
+ return {
1324
+ ...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
1325
+ ...(input.fieldsToExport != null && {
1326
+ fieldsToExport: serializeAws_json1_0ExportableInstanceFields(input.fieldsToExport, context),
1327
+ }),
1328
+ ...(input.fileFormat != null && { fileFormat: input.fileFormat }),
1329
+ ...(input.filters != null && { filters: serializeAws_json1_0Filters(input.filters, context) }),
1330
+ ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1331
+ ...(input.recommendationPreferences != null && {
1332
+ recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1333
+ }),
1334
+ ...(input.s3DestinationConfig != null && {
1335
+ s3DestinationConfig: serializeAws_json1_0S3DestinationConfig(input.s3DestinationConfig, context),
1336
+ }),
1337
+ };
1338
+ };
1339
+ const serializeAws_json1_0ExportLambdaFunctionRecommendationsRequest = (input, context) => {
1340
+ return {
1341
+ ...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
1342
+ ...(input.fieldsToExport != null && {
1343
+ fieldsToExport: serializeAws_json1_0ExportableLambdaFunctionFields(input.fieldsToExport, context),
1344
+ }),
1345
+ ...(input.fileFormat != null && { fileFormat: input.fileFormat }),
1346
+ ...(input.filters != null && {
1347
+ filters: serializeAws_json1_0LambdaFunctionRecommendationFilters(input.filters, context),
1348
+ }),
1349
+ ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1350
+ ...(input.s3DestinationConfig != null && {
1351
+ s3DestinationConfig: serializeAws_json1_0S3DestinationConfig(input.s3DestinationConfig, context),
1352
+ }),
1353
+ };
1354
+ };
1355
+ const serializeAws_json1_0Filter = (input, context) => {
1356
+ return {
1357
+ ...(input.name != null && { name: input.name }),
1358
+ ...(input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }),
1359
+ };
1360
+ };
1361
+ const serializeAws_json1_0Filters = (input, context) => {
1794
1362
  return input
1795
- .filter(function (e) { return e != null; })
1796
- .map(function (entry) {
1363
+ .filter((e) => e != null)
1364
+ .map((entry) => {
1797
1365
  return serializeAws_json1_0Filter(entry, context);
1798
1366
  });
1799
1367
  };
1800
- var serializeAws_json1_0FilterValues = function (input, context) {
1368
+ const serializeAws_json1_0FilterValues = (input, context) => {
1801
1369
  return input
1802
- .filter(function (e) { return e != null; })
1803
- .map(function (entry) {
1370
+ .filter((e) => e != null)
1371
+ .map((entry) => {
1804
1372
  return entry;
1805
1373
  });
1806
1374
  };
1807
- var serializeAws_json1_0FunctionArns = function (input, context) {
1375
+ const serializeAws_json1_0FunctionArns = (input, context) => {
1808
1376
  return input
1809
- .filter(function (e) { return e != null; })
1810
- .map(function (entry) {
1377
+ .filter((e) => e != null)
1378
+ .map((entry) => {
1811
1379
  return entry;
1812
1380
  });
1813
1381
  };
1814
- var serializeAws_json1_0GetAutoScalingGroupRecommendationsRequest = function (input, context) {
1815
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.autoScalingGroupArns != null && {
1816
- autoScalingGroupArns: serializeAws_json1_0AutoScalingGroupArns(input.autoScalingGroupArns, context),
1817
- })), (input.filters != null && { filters: serializeAws_json1_0Filters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.recommendationPreferences != null && {
1818
- recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1819
- }));
1382
+ const serializeAws_json1_0GetAutoScalingGroupRecommendationsRequest = (input, context) => {
1383
+ return {
1384
+ ...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
1385
+ ...(input.autoScalingGroupArns != null && {
1386
+ autoScalingGroupArns: serializeAws_json1_0AutoScalingGroupArns(input.autoScalingGroupArns, context),
1387
+ }),
1388
+ ...(input.filters != null && { filters: serializeAws_json1_0Filters(input.filters, context) }),
1389
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
1390
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
1391
+ ...(input.recommendationPreferences != null && {
1392
+ recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1393
+ }),
1394
+ };
1820
1395
  };
1821
- var serializeAws_json1_0GetEBSVolumeRecommendationsRequest = function (input, context) {
1822
- return __assign(__assign(__assign(__assign(__assign({}, (input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.filters != null && { filters: serializeAws_json1_0EBSFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.volumeArns != null && { volumeArns: serializeAws_json1_0VolumeArns(input.volumeArns, context) }));
1396
+ const serializeAws_json1_0GetEBSVolumeRecommendationsRequest = (input, context) => {
1397
+ return {
1398
+ ...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
1399
+ ...(input.filters != null && { filters: serializeAws_json1_0EBSFilters(input.filters, context) }),
1400
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
1401
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
1402
+ ...(input.volumeArns != null && { volumeArns: serializeAws_json1_0VolumeArns(input.volumeArns, context) }),
1403
+ };
1823
1404
  };
1824
- var serializeAws_json1_0GetEC2InstanceRecommendationsRequest = function (input, context) {
1825
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.filters != null && { filters: serializeAws_json1_0Filters(input.filters, context) })), (input.instanceArns != null && { instanceArns: serializeAws_json1_0InstanceArns(input.instanceArns, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.recommendationPreferences != null && {
1826
- recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1827
- }));
1405
+ const serializeAws_json1_0GetEC2InstanceRecommendationsRequest = (input, context) => {
1406
+ return {
1407
+ ...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
1408
+ ...(input.filters != null && { filters: serializeAws_json1_0Filters(input.filters, context) }),
1409
+ ...(input.instanceArns != null && { instanceArns: serializeAws_json1_0InstanceArns(input.instanceArns, context) }),
1410
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
1411
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
1412
+ ...(input.recommendationPreferences != null && {
1413
+ recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1414
+ }),
1415
+ };
1828
1416
  };
1829
- var serializeAws_json1_0GetEC2RecommendationProjectedMetricsRequest = function (input, context) {
1830
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) })), (input.instanceArn != null && { instanceArn: input.instanceArn })), (input.period != null && { period: input.period })), (input.recommendationPreferences != null && {
1831
- recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1832
- })), (input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) })), (input.stat != null && { stat: input.stat }));
1417
+ const serializeAws_json1_0GetEC2RecommendationProjectedMetricsRequest = (input, context) => {
1418
+ return {
1419
+ ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
1420
+ ...(input.instanceArn != null && { instanceArn: input.instanceArn }),
1421
+ ...(input.period != null && { period: input.period }),
1422
+ ...(input.recommendationPreferences != null && {
1423
+ recommendationPreferences: serializeAws_json1_0RecommendationPreferences(input.recommendationPreferences, context),
1424
+ }),
1425
+ ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
1426
+ ...(input.stat != null && { stat: input.stat }),
1427
+ };
1833
1428
  };
1834
- var serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest = function (input, context) {
1835
- return __assign({}, (input.resourceArn != null && { resourceArn: input.resourceArn }));
1429
+ const serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest = (input, context) => {
1430
+ return {
1431
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1432
+ };
1836
1433
  };
1837
- var serializeAws_json1_0GetEnrollmentStatusesForOrganizationRequest = function (input, context) {
1838
- return __assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_json1_0EnrollmentFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1434
+ const serializeAws_json1_0GetEnrollmentStatusesForOrganizationRequest = (input, context) => {
1435
+ return {
1436
+ ...(input.filters != null && { filters: serializeAws_json1_0EnrollmentFilters(input.filters, context) }),
1437
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
1438
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
1439
+ };
1839
1440
  };
1840
- var serializeAws_json1_0GetEnrollmentStatusRequest = function (input, context) {
1441
+ const serializeAws_json1_0GetEnrollmentStatusRequest = (input, context) => {
1841
1442
  return {};
1842
1443
  };
1843
- var serializeAws_json1_0GetLambdaFunctionRecommendationsRequest = function (input, context) {
1844
- return __assign(__assign(__assign(__assign(__assign({}, (input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.filters != null && {
1845
- filters: serializeAws_json1_0LambdaFunctionRecommendationFilters(input.filters, context),
1846
- })), (input.functionArns != null && { functionArns: serializeAws_json1_0FunctionArns(input.functionArns, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1444
+ const serializeAws_json1_0GetLambdaFunctionRecommendationsRequest = (input, context) => {
1445
+ return {
1446
+ ...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
1447
+ ...(input.filters != null && {
1448
+ filters: serializeAws_json1_0LambdaFunctionRecommendationFilters(input.filters, context),
1449
+ }),
1450
+ ...(input.functionArns != null && { functionArns: serializeAws_json1_0FunctionArns(input.functionArns, context) }),
1451
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
1452
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
1453
+ };
1847
1454
  };
1848
- var serializeAws_json1_0GetRecommendationPreferencesRequest = function (input, context) {
1849
- return __assign(__assign(__assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.resourceType != null && { resourceType: input.resourceType })), (input.scope != null && { scope: serializeAws_json1_0Scope(input.scope, context) }));
1455
+ const serializeAws_json1_0GetRecommendationPreferencesRequest = (input, context) => {
1456
+ return {
1457
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
1458
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
1459
+ ...(input.resourceType != null && { resourceType: input.resourceType }),
1460
+ ...(input.scope != null && { scope: serializeAws_json1_0Scope(input.scope, context) }),
1461
+ };
1850
1462
  };
1851
- var serializeAws_json1_0GetRecommendationSummariesRequest = function (input, context) {
1852
- return __assign(__assign(__assign({}, (input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
1463
+ const serializeAws_json1_0GetRecommendationSummariesRequest = (input, context) => {
1464
+ return {
1465
+ ...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
1466
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
1467
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
1468
+ };
1853
1469
  };
1854
- var serializeAws_json1_0InstanceArns = function (input, context) {
1470
+ const serializeAws_json1_0InstanceArns = (input, context) => {
1855
1471
  return input
1856
- .filter(function (e) { return e != null; })
1857
- .map(function (entry) {
1472
+ .filter((e) => e != null)
1473
+ .map((entry) => {
1858
1474
  return entry;
1859
1475
  });
1860
1476
  };
1861
- var serializeAws_json1_0JobFilter = function (input, context) {
1862
- return __assign(__assign({}, (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }));
1477
+ const serializeAws_json1_0JobFilter = (input, context) => {
1478
+ return {
1479
+ ...(input.name != null && { name: input.name }),
1480
+ ...(input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }),
1481
+ };
1863
1482
  };
1864
- var serializeAws_json1_0JobFilters = function (input, context) {
1483
+ const serializeAws_json1_0JobFilters = (input, context) => {
1865
1484
  return input
1866
- .filter(function (e) { return e != null; })
1867
- .map(function (entry) {
1485
+ .filter((e) => e != null)
1486
+ .map((entry) => {
1868
1487
  return serializeAws_json1_0JobFilter(entry, context);
1869
1488
  });
1870
1489
  };
1871
- var serializeAws_json1_0JobIds = function (input, context) {
1490
+ const serializeAws_json1_0JobIds = (input, context) => {
1872
1491
  return input
1873
- .filter(function (e) { return e != null; })
1874
- .map(function (entry) {
1492
+ .filter((e) => e != null)
1493
+ .map((entry) => {
1875
1494
  return entry;
1876
1495
  });
1877
1496
  };
1878
- var serializeAws_json1_0LambdaFunctionRecommendationFilter = function (input, context) {
1879
- return __assign(__assign({}, (input.name != null && { name: input.name })), (input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }));
1497
+ const serializeAws_json1_0LambdaFunctionRecommendationFilter = (input, context) => {
1498
+ return {
1499
+ ...(input.name != null && { name: input.name }),
1500
+ ...(input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }),
1501
+ };
1880
1502
  };
1881
- var serializeAws_json1_0LambdaFunctionRecommendationFilters = function (input, context) {
1503
+ const serializeAws_json1_0LambdaFunctionRecommendationFilters = (input, context) => {
1882
1504
  return input
1883
- .filter(function (e) { return e != null; })
1884
- .map(function (entry) {
1505
+ .filter((e) => e != null)
1506
+ .map((entry) => {
1885
1507
  return serializeAws_json1_0LambdaFunctionRecommendationFilter(entry, context);
1886
1508
  });
1887
1509
  };
1888
- var serializeAws_json1_0PutRecommendationPreferencesRequest = function (input, context) {
1889
- return __assign(__assign(__assign(__assign({}, (input.enhancedInfrastructureMetrics != null && {
1890
- enhancedInfrastructureMetrics: input.enhancedInfrastructureMetrics,
1891
- })), (input.inferredWorkloadTypes != null && { inferredWorkloadTypes: input.inferredWorkloadTypes })), (input.resourceType != null && { resourceType: input.resourceType })), (input.scope != null && { scope: serializeAws_json1_0Scope(input.scope, context) }));
1510
+ const serializeAws_json1_0PutRecommendationPreferencesRequest = (input, context) => {
1511
+ return {
1512
+ ...(input.enhancedInfrastructureMetrics != null && {
1513
+ enhancedInfrastructureMetrics: input.enhancedInfrastructureMetrics,
1514
+ }),
1515
+ ...(input.inferredWorkloadTypes != null && { inferredWorkloadTypes: input.inferredWorkloadTypes }),
1516
+ ...(input.resourceType != null && { resourceType: input.resourceType }),
1517
+ ...(input.scope != null && { scope: serializeAws_json1_0Scope(input.scope, context) }),
1518
+ };
1892
1519
  };
1893
- var serializeAws_json1_0RecommendationPreferenceNames = function (input, context) {
1520
+ const serializeAws_json1_0RecommendationPreferenceNames = (input, context) => {
1894
1521
  return input
1895
- .filter(function (e) { return e != null; })
1896
- .map(function (entry) {
1522
+ .filter((e) => e != null)
1523
+ .map((entry) => {
1897
1524
  return entry;
1898
1525
  });
1899
1526
  };
1900
- var serializeAws_json1_0RecommendationPreferences = function (input, context) {
1901
- return __assign({}, (input.cpuVendorArchitectures != null && {
1902
- cpuVendorArchitectures: serializeAws_json1_0CpuVendorArchitectures(input.cpuVendorArchitectures, context),
1903
- }));
1527
+ const serializeAws_json1_0RecommendationPreferences = (input, context) => {
1528
+ return {
1529
+ ...(input.cpuVendorArchitectures != null && {
1530
+ cpuVendorArchitectures: serializeAws_json1_0CpuVendorArchitectures(input.cpuVendorArchitectures, context),
1531
+ }),
1532
+ };
1904
1533
  };
1905
- var serializeAws_json1_0S3DestinationConfig = function (input, context) {
1906
- return __assign(__assign({}, (input.bucket != null && { bucket: input.bucket })), (input.keyPrefix != null && { keyPrefix: input.keyPrefix }));
1534
+ const serializeAws_json1_0S3DestinationConfig = (input, context) => {
1535
+ return {
1536
+ ...(input.bucket != null && { bucket: input.bucket }),
1537
+ ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }),
1538
+ };
1907
1539
  };
1908
- var serializeAws_json1_0Scope = function (input, context) {
1909
- return __assign(__assign({}, (input.name != null && { name: input.name })), (input.value != null && { value: input.value }));
1540
+ const serializeAws_json1_0Scope = (input, context) => {
1541
+ return {
1542
+ ...(input.name != null && { name: input.name }),
1543
+ ...(input.value != null && { value: input.value }),
1544
+ };
1910
1545
  };
1911
- var serializeAws_json1_0UpdateEnrollmentStatusRequest = function (input, context) {
1912
- return __assign(__assign({}, (input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts })), (input.status != null && { status: input.status }));
1546
+ const serializeAws_json1_0UpdateEnrollmentStatusRequest = (input, context) => {
1547
+ return {
1548
+ ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1549
+ ...(input.status != null && { status: input.status }),
1550
+ };
1913
1551
  };
1914
- var serializeAws_json1_0VolumeArns = function (input, context) {
1552
+ const serializeAws_json1_0VolumeArns = (input, context) => {
1915
1553
  return input
1916
- .filter(function (e) { return e != null; })
1917
- .map(function (entry) {
1554
+ .filter((e) => e != null)
1555
+ .map((entry) => {
1918
1556
  return entry;
1919
1557
  });
1920
1558
  };
1921
- var deserializeAws_json1_0AccessDeniedException = function (output, context) {
1559
+ const deserializeAws_json1_0AccessDeniedException = (output, context) => {
1922
1560
  return {
1923
1561
  message: __expectString(output.message),
1924
1562
  };
1925
1563
  };
1926
- var deserializeAws_json1_0AccountEnrollmentStatus = function (output, context) {
1564
+ const deserializeAws_json1_0AccountEnrollmentStatus = (output, context) => {
1927
1565
  return {
1928
1566
  accountId: __expectString(output.accountId),
1929
1567
  lastUpdatedTimestamp: output.lastUpdatedTimestamp != null
@@ -1933,10 +1571,10 @@ var deserializeAws_json1_0AccountEnrollmentStatus = function (output, context) {
1933
1571
  statusReason: __expectString(output.statusReason),
1934
1572
  };
1935
1573
  };
1936
- var deserializeAws_json1_0AccountEnrollmentStatuses = function (output, context) {
1937
- var retVal = (output || [])
1938
- .filter(function (e) { return e != null; })
1939
- .map(function (entry) {
1574
+ const deserializeAws_json1_0AccountEnrollmentStatuses = (output, context) => {
1575
+ const retVal = (output || [])
1576
+ .filter((e) => e != null)
1577
+ .map((entry) => {
1940
1578
  if (entry === null) {
1941
1579
  return null;
1942
1580
  }
@@ -1944,7 +1582,7 @@ var deserializeAws_json1_0AccountEnrollmentStatuses = function (output, context)
1944
1582
  });
1945
1583
  return retVal;
1946
1584
  };
1947
- var deserializeAws_json1_0AutoScalingGroupConfiguration = function (output, context) {
1585
+ const deserializeAws_json1_0AutoScalingGroupConfiguration = (output, context) => {
1948
1586
  return {
1949
1587
  desiredCapacity: __expectInt32(output.desiredCapacity),
1950
1588
  instanceType: __expectString(output.instanceType),
@@ -1952,7 +1590,7 @@ var deserializeAws_json1_0AutoScalingGroupConfiguration = function (output, cont
1952
1590
  minSize: __expectInt32(output.minSize),
1953
1591
  };
1954
1592
  };
1955
- var deserializeAws_json1_0AutoScalingGroupRecommendation = function (output, context) {
1593
+ const deserializeAws_json1_0AutoScalingGroupRecommendation = (output, context) => {
1956
1594
  return {
1957
1595
  accountId: __expectString(output.accountId),
1958
1596
  autoScalingGroupArn: __expectString(output.autoScalingGroupArn),
@@ -1980,7 +1618,7 @@ var deserializeAws_json1_0AutoScalingGroupRecommendation = function (output, con
1980
1618
  : undefined,
1981
1619
  };
1982
1620
  };
1983
- var deserializeAws_json1_0AutoScalingGroupRecommendationOption = function (output, context) {
1621
+ const deserializeAws_json1_0AutoScalingGroupRecommendationOption = (output, context) => {
1984
1622
  return {
1985
1623
  configuration: output.configuration != null
1986
1624
  ? deserializeAws_json1_0AutoScalingGroupConfiguration(output.configuration, context)
@@ -1996,10 +1634,10 @@ var deserializeAws_json1_0AutoScalingGroupRecommendationOption = function (outpu
1996
1634
  : undefined,
1997
1635
  };
1998
1636
  };
1999
- var deserializeAws_json1_0AutoScalingGroupRecommendationOptions = function (output, context) {
2000
- var retVal = (output || [])
2001
- .filter(function (e) { return e != null; })
2002
- .map(function (entry) {
1637
+ const deserializeAws_json1_0AutoScalingGroupRecommendationOptions = (output, context) => {
1638
+ const retVal = (output || [])
1639
+ .filter((e) => e != null)
1640
+ .map((entry) => {
2003
1641
  if (entry === null) {
2004
1642
  return null;
2005
1643
  }
@@ -2007,10 +1645,10 @@ var deserializeAws_json1_0AutoScalingGroupRecommendationOptions = function (outp
2007
1645
  });
2008
1646
  return retVal;
2009
1647
  };
2010
- var deserializeAws_json1_0AutoScalingGroupRecommendations = function (output, context) {
2011
- var retVal = (output || [])
2012
- .filter(function (e) { return e != null; })
2013
- .map(function (entry) {
1648
+ const deserializeAws_json1_0AutoScalingGroupRecommendations = (output, context) => {
1649
+ const retVal = (output || [])
1650
+ .filter((e) => e != null)
1651
+ .map((entry) => {
2014
1652
  if (entry === null) {
2015
1653
  return null;
2016
1654
  }
@@ -2018,10 +1656,10 @@ var deserializeAws_json1_0AutoScalingGroupRecommendations = function (output, co
2018
1656
  });
2019
1657
  return retVal;
2020
1658
  };
2021
- var deserializeAws_json1_0CpuVendorArchitectures = function (output, context) {
2022
- var retVal = (output || [])
2023
- .filter(function (e) { return e != null; })
2024
- .map(function (entry) {
1659
+ const deserializeAws_json1_0CpuVendorArchitectures = (output, context) => {
1660
+ const retVal = (output || [])
1661
+ .filter((e) => e != null)
1662
+ .map((entry) => {
2025
1663
  if (entry === null) {
2026
1664
  return null;
2027
1665
  }
@@ -2029,7 +1667,7 @@ var deserializeAws_json1_0CpuVendorArchitectures = function (output, context) {
2029
1667
  });
2030
1668
  return retVal;
2031
1669
  };
2032
- var deserializeAws_json1_0CurrentPerformanceRiskRatings = function (output, context) {
1670
+ const deserializeAws_json1_0CurrentPerformanceRiskRatings = (output, context) => {
2033
1671
  return {
2034
1672
  high: __expectLong(output.high),
2035
1673
  low: __expectLong(output.low),
@@ -2037,10 +1675,10 @@ var deserializeAws_json1_0CurrentPerformanceRiskRatings = function (output, cont
2037
1675
  veryLow: __expectLong(output.veryLow),
2038
1676
  };
2039
1677
  };
2040
- var deserializeAws_json1_0DeleteRecommendationPreferencesResponse = function (output, context) {
1678
+ const deserializeAws_json1_0DeleteRecommendationPreferencesResponse = (output, context) => {
2041
1679
  return {};
2042
1680
  };
2043
- var deserializeAws_json1_0DescribeRecommendationExportJobsResponse = function (output, context) {
1681
+ const deserializeAws_json1_0DescribeRecommendationExportJobsResponse = (output, context) => {
2044
1682
  return {
2045
1683
  nextToken: __expectString(output.nextToken),
2046
1684
  recommendationExportJobs: output.recommendationExportJobs != null
@@ -2048,17 +1686,17 @@ var deserializeAws_json1_0DescribeRecommendationExportJobsResponse = function (o
2048
1686
  : undefined,
2049
1687
  };
2050
1688
  };
2051
- var deserializeAws_json1_0EBSUtilizationMetric = function (output, context) {
1689
+ const deserializeAws_json1_0EBSUtilizationMetric = (output, context) => {
2052
1690
  return {
2053
1691
  name: __expectString(output.name),
2054
1692
  statistic: __expectString(output.statistic),
2055
1693
  value: __limitedParseDouble(output.value),
2056
1694
  };
2057
1695
  };
2058
- var deserializeAws_json1_0EBSUtilizationMetrics = function (output, context) {
2059
- var retVal = (output || [])
2060
- .filter(function (e) { return e != null; })
2061
- .map(function (entry) {
1696
+ const deserializeAws_json1_0EBSUtilizationMetrics = (output, context) => {
1697
+ const retVal = (output || [])
1698
+ .filter((e) => e != null)
1699
+ .map((entry) => {
2062
1700
  if (entry === null) {
2063
1701
  return null;
2064
1702
  }
@@ -2066,7 +1704,7 @@ var deserializeAws_json1_0EBSUtilizationMetrics = function (output, context) {
2066
1704
  });
2067
1705
  return retVal;
2068
1706
  };
2069
- var deserializeAws_json1_0EffectiveRecommendationPreferences = function (output, context) {
1707
+ const deserializeAws_json1_0EffectiveRecommendationPreferences = (output, context) => {
2070
1708
  return {
2071
1709
  cpuVendorArchitectures: output.cpuVendorArchitectures != null
2072
1710
  ? deserializeAws_json1_0CpuVendorArchitectures(output.cpuVendorArchitectures, context)
@@ -2075,42 +1713,42 @@ var deserializeAws_json1_0EffectiveRecommendationPreferences = function (output,
2075
1713
  inferredWorkloadTypes: __expectString(output.inferredWorkloadTypes),
2076
1714
  };
2077
1715
  };
2078
- var deserializeAws_json1_0EstimatedMonthlySavings = function (output, context) {
1716
+ const deserializeAws_json1_0EstimatedMonthlySavings = (output, context) => {
2079
1717
  return {
2080
1718
  currency: __expectString(output.currency),
2081
1719
  value: __limitedParseDouble(output.value),
2082
1720
  };
2083
1721
  };
2084
- var deserializeAws_json1_0ExportAutoScalingGroupRecommendationsResponse = function (output, context) {
1722
+ const deserializeAws_json1_0ExportAutoScalingGroupRecommendationsResponse = (output, context) => {
2085
1723
  return {
2086
1724
  jobId: __expectString(output.jobId),
2087
1725
  s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
2088
1726
  };
2089
1727
  };
2090
- var deserializeAws_json1_0ExportDestination = function (output, context) {
1728
+ const deserializeAws_json1_0ExportDestination = (output, context) => {
2091
1729
  return {
2092
1730
  s3: output.s3 != null ? deserializeAws_json1_0S3Destination(output.s3, context) : undefined,
2093
1731
  };
2094
1732
  };
2095
- var deserializeAws_json1_0ExportEBSVolumeRecommendationsResponse = function (output, context) {
1733
+ const deserializeAws_json1_0ExportEBSVolumeRecommendationsResponse = (output, context) => {
2096
1734
  return {
2097
1735
  jobId: __expectString(output.jobId),
2098
1736
  s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
2099
1737
  };
2100
1738
  };
2101
- var deserializeAws_json1_0ExportEC2InstanceRecommendationsResponse = function (output, context) {
1739
+ const deserializeAws_json1_0ExportEC2InstanceRecommendationsResponse = (output, context) => {
2102
1740
  return {
2103
1741
  jobId: __expectString(output.jobId),
2104
1742
  s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
2105
1743
  };
2106
1744
  };
2107
- var deserializeAws_json1_0ExportLambdaFunctionRecommendationsResponse = function (output, context) {
1745
+ const deserializeAws_json1_0ExportLambdaFunctionRecommendationsResponse = (output, context) => {
2108
1746
  return {
2109
1747
  jobId: __expectString(output.jobId),
2110
1748
  s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
2111
1749
  };
2112
1750
  };
2113
- var deserializeAws_json1_0GetAutoScalingGroupRecommendationsResponse = function (output, context) {
1751
+ const deserializeAws_json1_0GetAutoScalingGroupRecommendationsResponse = (output, context) => {
2114
1752
  return {
2115
1753
  autoScalingGroupRecommendations: output.autoScalingGroupRecommendations != null
2116
1754
  ? deserializeAws_json1_0AutoScalingGroupRecommendations(output.autoScalingGroupRecommendations, context)
@@ -2119,7 +1757,7 @@ var deserializeAws_json1_0GetAutoScalingGroupRecommendationsResponse = function
2119
1757
  nextToken: __expectString(output.nextToken),
2120
1758
  };
2121
1759
  };
2122
- var deserializeAws_json1_0GetEBSVolumeRecommendationsResponse = function (output, context) {
1760
+ const deserializeAws_json1_0GetEBSVolumeRecommendationsResponse = (output, context) => {
2123
1761
  return {
2124
1762
  errors: output.errors != null ? deserializeAws_json1_0GetRecommendationErrors(output.errors, context) : undefined,
2125
1763
  nextToken: __expectString(output.nextToken),
@@ -2128,7 +1766,7 @@ var deserializeAws_json1_0GetEBSVolumeRecommendationsResponse = function (output
2128
1766
  : undefined,
2129
1767
  };
2130
1768
  };
2131
- var deserializeAws_json1_0GetEC2InstanceRecommendationsResponse = function (output, context) {
1769
+ const deserializeAws_json1_0GetEC2InstanceRecommendationsResponse = (output, context) => {
2132
1770
  return {
2133
1771
  errors: output.errors != null ? deserializeAws_json1_0GetRecommendationErrors(output.errors, context) : undefined,
2134
1772
  instanceRecommendations: output.instanceRecommendations != null
@@ -2137,19 +1775,19 @@ var deserializeAws_json1_0GetEC2InstanceRecommendationsResponse = function (outp
2137
1775
  nextToken: __expectString(output.nextToken),
2138
1776
  };
2139
1777
  };
2140
- var deserializeAws_json1_0GetEC2RecommendationProjectedMetricsResponse = function (output, context) {
1778
+ const deserializeAws_json1_0GetEC2RecommendationProjectedMetricsResponse = (output, context) => {
2141
1779
  return {
2142
1780
  recommendedOptionProjectedMetrics: output.recommendedOptionProjectedMetrics != null
2143
1781
  ? deserializeAws_json1_0RecommendedOptionProjectedMetrics(output.recommendedOptionProjectedMetrics, context)
2144
1782
  : undefined,
2145
1783
  };
2146
1784
  };
2147
- var deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse = function (output, context) {
1785
+ const deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse = (output, context) => {
2148
1786
  return {
2149
1787
  enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics),
2150
1788
  };
2151
1789
  };
2152
- var deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse = function (output, context) {
1790
+ const deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse = (output, context) => {
2153
1791
  return {
2154
1792
  accountEnrollmentStatuses: output.accountEnrollmentStatuses != null
2155
1793
  ? deserializeAws_json1_0AccountEnrollmentStatuses(output.accountEnrollmentStatuses, context)
@@ -2157,7 +1795,7 @@ var deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse = functio
2157
1795
  nextToken: __expectString(output.nextToken),
2158
1796
  };
2159
1797
  };
2160
- var deserializeAws_json1_0GetEnrollmentStatusResponse = function (output, context) {
1798
+ const deserializeAws_json1_0GetEnrollmentStatusResponse = (output, context) => {
2161
1799
  return {
2162
1800
  lastUpdatedTimestamp: output.lastUpdatedTimestamp != null
2163
1801
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTimestamp)))
@@ -2168,7 +1806,7 @@ var deserializeAws_json1_0GetEnrollmentStatusResponse = function (output, contex
2168
1806
  statusReason: __expectString(output.statusReason),
2169
1807
  };
2170
1808
  };
2171
- var deserializeAws_json1_0GetLambdaFunctionRecommendationsResponse = function (output, context) {
1809
+ const deserializeAws_json1_0GetLambdaFunctionRecommendationsResponse = (output, context) => {
2172
1810
  return {
2173
1811
  lambdaFunctionRecommendations: output.lambdaFunctionRecommendations != null
2174
1812
  ? deserializeAws_json1_0LambdaFunctionRecommendations(output.lambdaFunctionRecommendations, context)
@@ -2176,17 +1814,17 @@ var deserializeAws_json1_0GetLambdaFunctionRecommendationsResponse = function (o
2176
1814
  nextToken: __expectString(output.nextToken),
2177
1815
  };
2178
1816
  };
2179
- var deserializeAws_json1_0GetRecommendationError = function (output, context) {
1817
+ const deserializeAws_json1_0GetRecommendationError = (output, context) => {
2180
1818
  return {
2181
1819
  code: __expectString(output.code),
2182
1820
  identifier: __expectString(output.identifier),
2183
1821
  message: __expectString(output.message),
2184
1822
  };
2185
1823
  };
2186
- var deserializeAws_json1_0GetRecommendationErrors = function (output, context) {
2187
- var retVal = (output || [])
2188
- .filter(function (e) { return e != null; })
2189
- .map(function (entry) {
1824
+ const deserializeAws_json1_0GetRecommendationErrors = (output, context) => {
1825
+ const retVal = (output || [])
1826
+ .filter((e) => e != null)
1827
+ .map((entry) => {
2190
1828
  if (entry === null) {
2191
1829
  return null;
2192
1830
  }
@@ -2194,7 +1832,7 @@ var deserializeAws_json1_0GetRecommendationErrors = function (output, context) {
2194
1832
  });
2195
1833
  return retVal;
2196
1834
  };
2197
- var deserializeAws_json1_0GetRecommendationPreferencesResponse = function (output, context) {
1835
+ const deserializeAws_json1_0GetRecommendationPreferencesResponse = (output, context) => {
2198
1836
  return {
2199
1837
  nextToken: __expectString(output.nextToken),
2200
1838
  recommendationPreferencesDetails: output.recommendationPreferencesDetails != null
@@ -2202,7 +1840,7 @@ var deserializeAws_json1_0GetRecommendationPreferencesResponse = function (outpu
2202
1840
  : undefined,
2203
1841
  };
2204
1842
  };
2205
- var deserializeAws_json1_0GetRecommendationSummariesResponse = function (output, context) {
1843
+ const deserializeAws_json1_0GetRecommendationSummariesResponse = (output, context) => {
2206
1844
  return {
2207
1845
  nextToken: __expectString(output.nextToken),
2208
1846
  recommendationSummaries: output.recommendationSummaries != null
@@ -2210,10 +1848,10 @@ var deserializeAws_json1_0GetRecommendationSummariesResponse = function (output,
2210
1848
  : undefined,
2211
1849
  };
2212
1850
  };
2213
- var deserializeAws_json1_0InferredWorkloadTypes = function (output, context) {
2214
- var retVal = (output || [])
2215
- .filter(function (e) { return e != null; })
2216
- .map(function (entry) {
1851
+ const deserializeAws_json1_0InferredWorkloadTypes = (output, context) => {
1852
+ const retVal = (output || [])
1853
+ .filter((e) => e != null)
1854
+ .map((entry) => {
2217
1855
  if (entry === null) {
2218
1856
  return null;
2219
1857
  }
@@ -2221,7 +1859,7 @@ var deserializeAws_json1_0InferredWorkloadTypes = function (output, context) {
2221
1859
  });
2222
1860
  return retVal;
2223
1861
  };
2224
- var deserializeAws_json1_0InstanceRecommendation = function (output, context) {
1862
+ const deserializeAws_json1_0InstanceRecommendation = (output, context) => {
2225
1863
  return {
2226
1864
  accountId: __expectString(output.accountId),
2227
1865
  currentInstanceType: __expectString(output.currentInstanceType),
@@ -2253,10 +1891,10 @@ var deserializeAws_json1_0InstanceRecommendation = function (output, context) {
2253
1891
  : undefined,
2254
1892
  };
2255
1893
  };
2256
- var deserializeAws_json1_0InstanceRecommendationFindingReasonCodes = function (output, context) {
2257
- var retVal = (output || [])
2258
- .filter(function (e) { return e != null; })
2259
- .map(function (entry) {
1894
+ const deserializeAws_json1_0InstanceRecommendationFindingReasonCodes = (output, context) => {
1895
+ const retVal = (output || [])
1896
+ .filter((e) => e != null)
1897
+ .map((entry) => {
2260
1898
  if (entry === null) {
2261
1899
  return null;
2262
1900
  }
@@ -2264,7 +1902,7 @@ var deserializeAws_json1_0InstanceRecommendationFindingReasonCodes = function (o
2264
1902
  });
2265
1903
  return retVal;
2266
1904
  };
2267
- var deserializeAws_json1_0InstanceRecommendationOption = function (output, context) {
1905
+ const deserializeAws_json1_0InstanceRecommendationOption = (output, context) => {
2268
1906
  return {
2269
1907
  instanceType: __expectString(output.instanceType),
2270
1908
  migrationEffort: __expectString(output.migrationEffort),
@@ -2281,10 +1919,10 @@ var deserializeAws_json1_0InstanceRecommendationOption = function (output, conte
2281
1919
  : undefined,
2282
1920
  };
2283
1921
  };
2284
- var deserializeAws_json1_0InstanceRecommendations = function (output, context) {
2285
- var retVal = (output || [])
2286
- .filter(function (e) { return e != null; })
2287
- .map(function (entry) {
1922
+ const deserializeAws_json1_0InstanceRecommendations = (output, context) => {
1923
+ const retVal = (output || [])
1924
+ .filter((e) => e != null)
1925
+ .map((entry) => {
2288
1926
  if (entry === null) {
2289
1927
  return null;
2290
1928
  }
@@ -2292,27 +1930,27 @@ var deserializeAws_json1_0InstanceRecommendations = function (output, context) {
2292
1930
  });
2293
1931
  return retVal;
2294
1932
  };
2295
- var deserializeAws_json1_0InternalServerException = function (output, context) {
1933
+ const deserializeAws_json1_0InternalServerException = (output, context) => {
2296
1934
  return {
2297
1935
  message: __expectString(output.message),
2298
1936
  };
2299
1937
  };
2300
- var deserializeAws_json1_0InvalidParameterValueException = function (output, context) {
1938
+ const deserializeAws_json1_0InvalidParameterValueException = (output, context) => {
2301
1939
  return {
2302
1940
  message: __expectString(output.message),
2303
1941
  };
2304
1942
  };
2305
- var deserializeAws_json1_0LambdaFunctionMemoryProjectedMetric = function (output, context) {
1943
+ const deserializeAws_json1_0LambdaFunctionMemoryProjectedMetric = (output, context) => {
2306
1944
  return {
2307
1945
  name: __expectString(output.name),
2308
1946
  statistic: __expectString(output.statistic),
2309
1947
  value: __limitedParseDouble(output.value),
2310
1948
  };
2311
1949
  };
2312
- var deserializeAws_json1_0LambdaFunctionMemoryProjectedMetrics = function (output, context) {
2313
- var retVal = (output || [])
2314
- .filter(function (e) { return e != null; })
2315
- .map(function (entry) {
1950
+ const deserializeAws_json1_0LambdaFunctionMemoryProjectedMetrics = (output, context) => {
1951
+ const retVal = (output || [])
1952
+ .filter((e) => e != null)
1953
+ .map((entry) => {
2316
1954
  if (entry === null) {
2317
1955
  return null;
2318
1956
  }
@@ -2320,7 +1958,7 @@ var deserializeAws_json1_0LambdaFunctionMemoryProjectedMetrics = function (outpu
2320
1958
  });
2321
1959
  return retVal;
2322
1960
  };
2323
- var deserializeAws_json1_0LambdaFunctionMemoryRecommendationOption = function (output, context) {
1961
+ const deserializeAws_json1_0LambdaFunctionMemoryRecommendationOption = (output, context) => {
2324
1962
  return {
2325
1963
  memorySize: __expectInt32(output.memorySize),
2326
1964
  projectedUtilizationMetrics: output.projectedUtilizationMetrics != null
@@ -2332,10 +1970,10 @@ var deserializeAws_json1_0LambdaFunctionMemoryRecommendationOption = function (o
2332
1970
  : undefined,
2333
1971
  };
2334
1972
  };
2335
- var deserializeAws_json1_0LambdaFunctionMemoryRecommendationOptions = function (output, context) {
2336
- var retVal = (output || [])
2337
- .filter(function (e) { return e != null; })
2338
- .map(function (entry) {
1973
+ const deserializeAws_json1_0LambdaFunctionMemoryRecommendationOptions = (output, context) => {
1974
+ const retVal = (output || [])
1975
+ .filter((e) => e != null)
1976
+ .map((entry) => {
2339
1977
  if (entry === null) {
2340
1978
  return null;
2341
1979
  }
@@ -2343,7 +1981,7 @@ var deserializeAws_json1_0LambdaFunctionMemoryRecommendationOptions = function (
2343
1981
  });
2344
1982
  return retVal;
2345
1983
  };
2346
- var deserializeAws_json1_0LambdaFunctionRecommendation = function (output, context) {
1984
+ const deserializeAws_json1_0LambdaFunctionRecommendation = (output, context) => {
2347
1985
  return {
2348
1986
  accountId: __expectString(output.accountId),
2349
1987
  currentMemorySize: __expectInt32(output.currentMemorySize),
@@ -2367,10 +2005,10 @@ var deserializeAws_json1_0LambdaFunctionRecommendation = function (output, conte
2367
2005
  : undefined,
2368
2006
  };
2369
2007
  };
2370
- var deserializeAws_json1_0LambdaFunctionRecommendationFindingReasonCodes = function (output, context) {
2371
- var retVal = (output || [])
2372
- .filter(function (e) { return e != null; })
2373
- .map(function (entry) {
2008
+ const deserializeAws_json1_0LambdaFunctionRecommendationFindingReasonCodes = (output, context) => {
2009
+ const retVal = (output || [])
2010
+ .filter((e) => e != null)
2011
+ .map((entry) => {
2374
2012
  if (entry === null) {
2375
2013
  return null;
2376
2014
  }
@@ -2378,10 +2016,10 @@ var deserializeAws_json1_0LambdaFunctionRecommendationFindingReasonCodes = funct
2378
2016
  });
2379
2017
  return retVal;
2380
2018
  };
2381
- var deserializeAws_json1_0LambdaFunctionRecommendations = function (output, context) {
2382
- var retVal = (output || [])
2383
- .filter(function (e) { return e != null; })
2384
- .map(function (entry) {
2019
+ const deserializeAws_json1_0LambdaFunctionRecommendations = (output, context) => {
2020
+ const retVal = (output || [])
2021
+ .filter((e) => e != null)
2022
+ .map((entry) => {
2385
2023
  if (entry === null) {
2386
2024
  return null;
2387
2025
  }
@@ -2389,17 +2027,17 @@ var deserializeAws_json1_0LambdaFunctionRecommendations = function (output, cont
2389
2027
  });
2390
2028
  return retVal;
2391
2029
  };
2392
- var deserializeAws_json1_0LambdaFunctionUtilizationMetric = function (output, context) {
2030
+ const deserializeAws_json1_0LambdaFunctionUtilizationMetric = (output, context) => {
2393
2031
  return {
2394
2032
  name: __expectString(output.name),
2395
2033
  statistic: __expectString(output.statistic),
2396
2034
  value: __limitedParseDouble(output.value),
2397
2035
  };
2398
2036
  };
2399
- var deserializeAws_json1_0LambdaFunctionUtilizationMetrics = function (output, context) {
2400
- var retVal = (output || [])
2401
- .filter(function (e) { return e != null; })
2402
- .map(function (entry) {
2037
+ const deserializeAws_json1_0LambdaFunctionUtilizationMetrics = (output, context) => {
2038
+ const retVal = (output || [])
2039
+ .filter((e) => e != null)
2040
+ .map((entry) => {
2403
2041
  if (entry === null) {
2404
2042
  return null;
2405
2043
  }
@@ -2407,15 +2045,15 @@ var deserializeAws_json1_0LambdaFunctionUtilizationMetrics = function (output, c
2407
2045
  });
2408
2046
  return retVal;
2409
2047
  };
2410
- var deserializeAws_json1_0LimitExceededException = function (output, context) {
2048
+ const deserializeAws_json1_0LimitExceededException = (output, context) => {
2411
2049
  return {
2412
2050
  message: __expectString(output.message),
2413
2051
  };
2414
2052
  };
2415
- var deserializeAws_json1_0MetricValues = function (output, context) {
2416
- var retVal = (output || [])
2417
- .filter(function (e) { return e != null; })
2418
- .map(function (entry) {
2053
+ const deserializeAws_json1_0MetricValues = (output, context) => {
2054
+ const retVal = (output || [])
2055
+ .filter((e) => e != null)
2056
+ .map((entry) => {
2419
2057
  if (entry === null) {
2420
2058
  return null;
2421
2059
  }
@@ -2423,20 +2061,20 @@ var deserializeAws_json1_0MetricValues = function (output, context) {
2423
2061
  });
2424
2062
  return retVal;
2425
2063
  };
2426
- var deserializeAws_json1_0MissingAuthenticationToken = function (output, context) {
2064
+ const deserializeAws_json1_0MissingAuthenticationToken = (output, context) => {
2427
2065
  return {
2428
2066
  message: __expectString(output.message),
2429
2067
  };
2430
2068
  };
2431
- var deserializeAws_json1_0OptInRequiredException = function (output, context) {
2069
+ const deserializeAws_json1_0OptInRequiredException = (output, context) => {
2432
2070
  return {
2433
2071
  message: __expectString(output.message),
2434
2072
  };
2435
2073
  };
2436
- var deserializeAws_json1_0PlatformDifferences = function (output, context) {
2437
- var retVal = (output || [])
2438
- .filter(function (e) { return e != null; })
2439
- .map(function (entry) {
2074
+ const deserializeAws_json1_0PlatformDifferences = (output, context) => {
2075
+ const retVal = (output || [])
2076
+ .filter((e) => e != null)
2077
+ .map((entry) => {
2440
2078
  if (entry === null) {
2441
2079
  return null;
2442
2080
  }
@@ -2444,17 +2082,17 @@ var deserializeAws_json1_0PlatformDifferences = function (output, context) {
2444
2082
  });
2445
2083
  return retVal;
2446
2084
  };
2447
- var deserializeAws_json1_0ProjectedMetric = function (output, context) {
2085
+ const deserializeAws_json1_0ProjectedMetric = (output, context) => {
2448
2086
  return {
2449
2087
  name: __expectString(output.name),
2450
2088
  timestamps: output.timestamps != null ? deserializeAws_json1_0Timestamps(output.timestamps, context) : undefined,
2451
2089
  values: output.values != null ? deserializeAws_json1_0MetricValues(output.values, context) : undefined,
2452
2090
  };
2453
2091
  };
2454
- var deserializeAws_json1_0ProjectedMetrics = function (output, context) {
2455
- var retVal = (output || [])
2456
- .filter(function (e) { return e != null; })
2457
- .map(function (entry) {
2092
+ const deserializeAws_json1_0ProjectedMetrics = (output, context) => {
2093
+ const retVal = (output || [])
2094
+ .filter((e) => e != null)
2095
+ .map((entry) => {
2458
2096
  if (entry === null) {
2459
2097
  return null;
2460
2098
  }
@@ -2462,10 +2100,10 @@ var deserializeAws_json1_0ProjectedMetrics = function (output, context) {
2462
2100
  });
2463
2101
  return retVal;
2464
2102
  };
2465
- var deserializeAws_json1_0ProjectedUtilizationMetrics = function (output, context) {
2466
- var retVal = (output || [])
2467
- .filter(function (e) { return e != null; })
2468
- .map(function (entry) {
2103
+ const deserializeAws_json1_0ProjectedUtilizationMetrics = (output, context) => {
2104
+ const retVal = (output || [])
2105
+ .filter((e) => e != null)
2106
+ .map((entry) => {
2469
2107
  if (entry === null) {
2470
2108
  return null;
2471
2109
  }
@@ -2473,13 +2111,13 @@ var deserializeAws_json1_0ProjectedUtilizationMetrics = function (output, contex
2473
2111
  });
2474
2112
  return retVal;
2475
2113
  };
2476
- var deserializeAws_json1_0PutRecommendationPreferencesResponse = function (output, context) {
2114
+ const deserializeAws_json1_0PutRecommendationPreferencesResponse = (output, context) => {
2477
2115
  return {};
2478
2116
  };
2479
- var deserializeAws_json1_0ReasonCodeSummaries = function (output, context) {
2480
- var retVal = (output || [])
2481
- .filter(function (e) { return e != null; })
2482
- .map(function (entry) {
2117
+ const deserializeAws_json1_0ReasonCodeSummaries = (output, context) => {
2118
+ const retVal = (output || [])
2119
+ .filter((e) => e != null)
2120
+ .map((entry) => {
2483
2121
  if (entry === null) {
2484
2122
  return null;
2485
2123
  }
@@ -2487,13 +2125,13 @@ var deserializeAws_json1_0ReasonCodeSummaries = function (output, context) {
2487
2125
  });
2488
2126
  return retVal;
2489
2127
  };
2490
- var deserializeAws_json1_0ReasonCodeSummary = function (output, context) {
2128
+ const deserializeAws_json1_0ReasonCodeSummary = (output, context) => {
2491
2129
  return {
2492
2130
  name: __expectString(output.name),
2493
2131
  value: __limitedParseDouble(output.value),
2494
2132
  };
2495
2133
  };
2496
- var deserializeAws_json1_0RecommendationExportJob = function (output, context) {
2134
+ const deserializeAws_json1_0RecommendationExportJob = (output, context) => {
2497
2135
  return {
2498
2136
  creationTimestamp: output.creationTimestamp != null
2499
2137
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp)))
@@ -2508,10 +2146,10 @@ var deserializeAws_json1_0RecommendationExportJob = function (output, context) {
2508
2146
  status: __expectString(output.status),
2509
2147
  };
2510
2148
  };
2511
- var deserializeAws_json1_0RecommendationExportJobs = function (output, context) {
2512
- var retVal = (output || [])
2513
- .filter(function (e) { return e != null; })
2514
- .map(function (entry) {
2149
+ const deserializeAws_json1_0RecommendationExportJobs = (output, context) => {
2150
+ const retVal = (output || [])
2151
+ .filter((e) => e != null)
2152
+ .map((entry) => {
2515
2153
  if (entry === null) {
2516
2154
  return null;
2517
2155
  }
@@ -2519,10 +2157,10 @@ var deserializeAws_json1_0RecommendationExportJobs = function (output, context)
2519
2157
  });
2520
2158
  return retVal;
2521
2159
  };
2522
- var deserializeAws_json1_0RecommendationOptions = function (output, context) {
2523
- var retVal = (output || [])
2524
- .filter(function (e) { return e != null; })
2525
- .map(function (entry) {
2160
+ const deserializeAws_json1_0RecommendationOptions = (output, context) => {
2161
+ const retVal = (output || [])
2162
+ .filter((e) => e != null)
2163
+ .map((entry) => {
2526
2164
  if (entry === null) {
2527
2165
  return null;
2528
2166
  }
@@ -2530,7 +2168,7 @@ var deserializeAws_json1_0RecommendationOptions = function (output, context) {
2530
2168
  });
2531
2169
  return retVal;
2532
2170
  };
2533
- var deserializeAws_json1_0RecommendationPreferencesDetail = function (output, context) {
2171
+ const deserializeAws_json1_0RecommendationPreferencesDetail = (output, context) => {
2534
2172
  return {
2535
2173
  enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics),
2536
2174
  inferredWorkloadTypes: __expectString(output.inferredWorkloadTypes),
@@ -2538,10 +2176,10 @@ var deserializeAws_json1_0RecommendationPreferencesDetail = function (output, co
2538
2176
  scope: output.scope != null ? deserializeAws_json1_0Scope(output.scope, context) : undefined,
2539
2177
  };
2540
2178
  };
2541
- var deserializeAws_json1_0RecommendationPreferencesDetails = function (output, context) {
2542
- var retVal = (output || [])
2543
- .filter(function (e) { return e != null; })
2544
- .map(function (entry) {
2179
+ const deserializeAws_json1_0RecommendationPreferencesDetails = (output, context) => {
2180
+ const retVal = (output || [])
2181
+ .filter((e) => e != null)
2182
+ .map((entry) => {
2545
2183
  if (entry === null) {
2546
2184
  return null;
2547
2185
  }
@@ -2549,16 +2187,16 @@ var deserializeAws_json1_0RecommendationPreferencesDetails = function (output, c
2549
2187
  });
2550
2188
  return retVal;
2551
2189
  };
2552
- var deserializeAws_json1_0RecommendationSource = function (output, context) {
2190
+ const deserializeAws_json1_0RecommendationSource = (output, context) => {
2553
2191
  return {
2554
2192
  recommendationSourceArn: __expectString(output.recommendationSourceArn),
2555
2193
  recommendationSourceType: __expectString(output.recommendationSourceType),
2556
2194
  };
2557
2195
  };
2558
- var deserializeAws_json1_0RecommendationSources = function (output, context) {
2559
- var retVal = (output || [])
2560
- .filter(function (e) { return e != null; })
2561
- .map(function (entry) {
2196
+ const deserializeAws_json1_0RecommendationSources = (output, context) => {
2197
+ const retVal = (output || [])
2198
+ .filter((e) => e != null)
2199
+ .map((entry) => {
2562
2200
  if (entry === null) {
2563
2201
  return null;
2564
2202
  }
@@ -2566,10 +2204,10 @@ var deserializeAws_json1_0RecommendationSources = function (output, context) {
2566
2204
  });
2567
2205
  return retVal;
2568
2206
  };
2569
- var deserializeAws_json1_0RecommendationSummaries = function (output, context) {
2570
- var retVal = (output || [])
2571
- .filter(function (e) { return e != null; })
2572
- .map(function (entry) {
2207
+ const deserializeAws_json1_0RecommendationSummaries = (output, context) => {
2208
+ const retVal = (output || [])
2209
+ .filter((e) => e != null)
2210
+ .map((entry) => {
2573
2211
  if (entry === null) {
2574
2212
  return null;
2575
2213
  }
@@ -2577,7 +2215,7 @@ var deserializeAws_json1_0RecommendationSummaries = function (output, context) {
2577
2215
  });
2578
2216
  return retVal;
2579
2217
  };
2580
- var deserializeAws_json1_0RecommendationSummary = function (output, context) {
2218
+ const deserializeAws_json1_0RecommendationSummary = (output, context) => {
2581
2219
  return {
2582
2220
  accountId: __expectString(output.accountId),
2583
2221
  currentPerformanceRiskRatings: output.currentPerformanceRiskRatings != null
@@ -2590,7 +2228,7 @@ var deserializeAws_json1_0RecommendationSummary = function (output, context) {
2590
2228
  summaries: output.summaries != null ? deserializeAws_json1_0Summaries(output.summaries, context) : undefined,
2591
2229
  };
2592
2230
  };
2593
- var deserializeAws_json1_0RecommendedOptionProjectedMetric = function (output, context) {
2231
+ const deserializeAws_json1_0RecommendedOptionProjectedMetric = (output, context) => {
2594
2232
  return {
2595
2233
  projectedMetrics: output.projectedMetrics != null
2596
2234
  ? deserializeAws_json1_0ProjectedMetrics(output.projectedMetrics, context)
@@ -2599,10 +2237,10 @@ var deserializeAws_json1_0RecommendedOptionProjectedMetric = function (output, c
2599
2237
  recommendedInstanceType: __expectString(output.recommendedInstanceType),
2600
2238
  };
2601
2239
  };
2602
- var deserializeAws_json1_0RecommendedOptionProjectedMetrics = function (output, context) {
2603
- var retVal = (output || [])
2604
- .filter(function (e) { return e != null; })
2605
- .map(function (entry) {
2240
+ const deserializeAws_json1_0RecommendedOptionProjectedMetrics = (output, context) => {
2241
+ const retVal = (output || [])
2242
+ .filter((e) => e != null)
2243
+ .map((entry) => {
2606
2244
  if (entry === null) {
2607
2245
  return null;
2608
2246
  }
@@ -2610,19 +2248,19 @@ var deserializeAws_json1_0RecommendedOptionProjectedMetrics = function (output,
2610
2248
  });
2611
2249
  return retVal;
2612
2250
  };
2613
- var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
2251
+ const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
2614
2252
  return {
2615
2253
  message: __expectString(output.message),
2616
2254
  };
2617
2255
  };
2618
- var deserializeAws_json1_0S3Destination = function (output, context) {
2256
+ const deserializeAws_json1_0S3Destination = (output, context) => {
2619
2257
  return {
2620
2258
  bucket: __expectString(output.bucket),
2621
2259
  key: __expectString(output.key),
2622
2260
  metadataKey: __expectString(output.metadataKey),
2623
2261
  };
2624
2262
  };
2625
- var deserializeAws_json1_0SavingsOpportunity = function (output, context) {
2263
+ const deserializeAws_json1_0SavingsOpportunity = (output, context) => {
2626
2264
  return {
2627
2265
  estimatedMonthlySavings: output.estimatedMonthlySavings != null
2628
2266
  ? deserializeAws_json1_0EstimatedMonthlySavings(output.estimatedMonthlySavings, context)
@@ -2630,21 +2268,21 @@ var deserializeAws_json1_0SavingsOpportunity = function (output, context) {
2630
2268
  savingsOpportunityPercentage: __limitedParseDouble(output.savingsOpportunityPercentage),
2631
2269
  };
2632
2270
  };
2633
- var deserializeAws_json1_0Scope = function (output, context) {
2271
+ const deserializeAws_json1_0Scope = (output, context) => {
2634
2272
  return {
2635
2273
  name: __expectString(output.name),
2636
2274
  value: __expectString(output.value),
2637
2275
  };
2638
2276
  };
2639
- var deserializeAws_json1_0ServiceUnavailableException = function (output, context) {
2277
+ const deserializeAws_json1_0ServiceUnavailableException = (output, context) => {
2640
2278
  return {
2641
2279
  message: __expectString(output.message),
2642
2280
  };
2643
2281
  };
2644
- var deserializeAws_json1_0Summaries = function (output, context) {
2645
- var retVal = (output || [])
2646
- .filter(function (e) { return e != null; })
2647
- .map(function (entry) {
2282
+ const deserializeAws_json1_0Summaries = (output, context) => {
2283
+ const retVal = (output || [])
2284
+ .filter((e) => e != null)
2285
+ .map((entry) => {
2648
2286
  if (entry === null) {
2649
2287
  return null;
2650
2288
  }
@@ -2652,7 +2290,7 @@ var deserializeAws_json1_0Summaries = function (output, context) {
2652
2290
  });
2653
2291
  return retVal;
2654
2292
  };
2655
- var deserializeAws_json1_0Summary = function (output, context) {
2293
+ const deserializeAws_json1_0Summary = (output, context) => {
2656
2294
  return {
2657
2295
  name: __expectString(output.name),
2658
2296
  reasonCodeSummaries: output.reasonCodeSummaries != null
@@ -2661,15 +2299,15 @@ var deserializeAws_json1_0Summary = function (output, context) {
2661
2299
  value: __limitedParseDouble(output.value),
2662
2300
  };
2663
2301
  };
2664
- var deserializeAws_json1_0ThrottlingException = function (output, context) {
2302
+ const deserializeAws_json1_0ThrottlingException = (output, context) => {
2665
2303
  return {
2666
2304
  message: __expectString(output.message),
2667
2305
  };
2668
2306
  };
2669
- var deserializeAws_json1_0Timestamps = function (output, context) {
2670
- var retVal = (output || [])
2671
- .filter(function (e) { return e != null; })
2672
- .map(function (entry) {
2307
+ const deserializeAws_json1_0Timestamps = (output, context) => {
2308
+ const retVal = (output || [])
2309
+ .filter((e) => e != null)
2310
+ .map((entry) => {
2673
2311
  if (entry === null) {
2674
2312
  return null;
2675
2313
  }
@@ -2677,23 +2315,23 @@ var deserializeAws_json1_0Timestamps = function (output, context) {
2677
2315
  });
2678
2316
  return retVal;
2679
2317
  };
2680
- var deserializeAws_json1_0UpdateEnrollmentStatusResponse = function (output, context) {
2318
+ const deserializeAws_json1_0UpdateEnrollmentStatusResponse = (output, context) => {
2681
2319
  return {
2682
2320
  status: __expectString(output.status),
2683
2321
  statusReason: __expectString(output.statusReason),
2684
2322
  };
2685
2323
  };
2686
- var deserializeAws_json1_0UtilizationMetric = function (output, context) {
2324
+ const deserializeAws_json1_0UtilizationMetric = (output, context) => {
2687
2325
  return {
2688
2326
  name: __expectString(output.name),
2689
2327
  statistic: __expectString(output.statistic),
2690
2328
  value: __limitedParseDouble(output.value),
2691
2329
  };
2692
2330
  };
2693
- var deserializeAws_json1_0UtilizationMetrics = function (output, context) {
2694
- var retVal = (output || [])
2695
- .filter(function (e) { return e != null; })
2696
- .map(function (entry) {
2331
+ const deserializeAws_json1_0UtilizationMetrics = (output, context) => {
2332
+ const retVal = (output || [])
2333
+ .filter((e) => e != null)
2334
+ .map((entry) => {
2697
2335
  if (entry === null) {
2698
2336
  return null;
2699
2337
  }
@@ -2701,7 +2339,7 @@ var deserializeAws_json1_0UtilizationMetrics = function (output, context) {
2701
2339
  });
2702
2340
  return retVal;
2703
2341
  };
2704
- var deserializeAws_json1_0VolumeConfiguration = function (output, context) {
2342
+ const deserializeAws_json1_0VolumeConfiguration = (output, context) => {
2705
2343
  return {
2706
2344
  volumeBaselineIOPS: __expectInt32(output.volumeBaselineIOPS),
2707
2345
  volumeBaselineThroughput: __expectInt32(output.volumeBaselineThroughput),
@@ -2711,7 +2349,7 @@ var deserializeAws_json1_0VolumeConfiguration = function (output, context) {
2711
2349
  volumeType: __expectString(output.volumeType),
2712
2350
  };
2713
2351
  };
2714
- var deserializeAws_json1_0VolumeRecommendation = function (output, context) {
2352
+ const deserializeAws_json1_0VolumeRecommendation = (output, context) => {
2715
2353
  return {
2716
2354
  accountId: __expectString(output.accountId),
2717
2355
  currentConfiguration: output.currentConfiguration != null
@@ -2732,7 +2370,7 @@ var deserializeAws_json1_0VolumeRecommendation = function (output, context) {
2732
2370
  : undefined,
2733
2371
  };
2734
2372
  };
2735
- var deserializeAws_json1_0VolumeRecommendationOption = function (output, context) {
2373
+ const deserializeAws_json1_0VolumeRecommendationOption = (output, context) => {
2736
2374
  return {
2737
2375
  configuration: output.configuration != null
2738
2376
  ? deserializeAws_json1_0VolumeConfiguration(output.configuration, context)
@@ -2744,10 +2382,10 @@ var deserializeAws_json1_0VolumeRecommendationOption = function (output, context
2744
2382
  : undefined,
2745
2383
  };
2746
2384
  };
2747
- var deserializeAws_json1_0VolumeRecommendationOptions = function (output, context) {
2748
- var retVal = (output || [])
2749
- .filter(function (e) { return e != null; })
2750
- .map(function (entry) {
2385
+ const deserializeAws_json1_0VolumeRecommendationOptions = (output, context) => {
2386
+ const retVal = (output || [])
2387
+ .filter((e) => e != null)
2388
+ .map((entry) => {
2751
2389
  if (entry === null) {
2752
2390
  return null;
2753
2391
  }
@@ -2755,10 +2393,10 @@ var deserializeAws_json1_0VolumeRecommendationOptions = function (output, contex
2755
2393
  });
2756
2394
  return retVal;
2757
2395
  };
2758
- var deserializeAws_json1_0VolumeRecommendations = function (output, context) {
2759
- var retVal = (output || [])
2760
- .filter(function (e) { return e != null; })
2761
- .map(function (entry) {
2396
+ const deserializeAws_json1_0VolumeRecommendations = (output, context) => {
2397
+ const retVal = (output || [])
2398
+ .filter((e) => e != null)
2399
+ .map((entry) => {
2762
2400
  if (entry === null) {
2763
2401
  return null;
2764
2402
  }
@@ -2766,62 +2404,52 @@ var deserializeAws_json1_0VolumeRecommendations = function (output, context) {
2766
2404
  });
2767
2405
  return retVal;
2768
2406
  };
2769
- var deserializeMetadata = function (output) {
2770
- var _a;
2771
- return ({
2772
- httpStatusCode: output.statusCode,
2773
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
2774
- extendedRequestId: output.headers["x-amz-id-2"],
2775
- cfId: output.headers["x-amz-cf-id"],
2776
- });
2777
- };
2778
- var collectBody = function (streamBody, context) {
2779
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
2407
+ const deserializeMetadata = (output) => ({
2408
+ httpStatusCode: output.statusCode,
2409
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2410
+ extendedRequestId: output.headers["x-amz-id-2"],
2411
+ cfId: output.headers["x-amz-cf-id"],
2412
+ });
2413
+ const collectBody = (streamBody = new Uint8Array(), context) => {
2780
2414
  if (streamBody instanceof Uint8Array) {
2781
2415
  return Promise.resolve(streamBody);
2782
2416
  }
2783
2417
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2784
2418
  };
2785
- var collectBodyString = function (streamBody, context) {
2786
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2787
- };
2788
- var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2789
- var _a, hostname, _b, protocol, port, basePath, contents;
2790
- return __generator(this, function (_c) {
2791
- switch (_c.label) {
2792
- case 0: return [4, context.endpoint()];
2793
- case 1:
2794
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2795
- contents = {
2796
- protocol: protocol,
2797
- hostname: hostname,
2798
- port: port,
2799
- method: "POST",
2800
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2801
- headers: headers,
2802
- };
2803
- if (resolvedHostname !== undefined) {
2804
- contents.hostname = resolvedHostname;
2805
- }
2806
- if (body !== undefined) {
2807
- contents.body = body;
2808
- }
2809
- return [2, new __HttpRequest(contents)];
2810
- }
2811
- });
2812
- }); };
2813
- var parseBody = function (streamBody, context) {
2814
- return collectBodyString(streamBody, context).then(function (encoded) {
2815
- if (encoded.length) {
2816
- return JSON.parse(encoded);
2817
- }
2818
- return {};
2819
- });
2419
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2420
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2421
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2422
+ const contents = {
2423
+ protocol,
2424
+ hostname,
2425
+ port,
2426
+ method: "POST",
2427
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2428
+ headers,
2429
+ };
2430
+ if (resolvedHostname !== undefined) {
2431
+ contents.hostname = resolvedHostname;
2432
+ }
2433
+ if (body !== undefined) {
2434
+ contents.body = body;
2435
+ }
2436
+ return new __HttpRequest(contents);
2820
2437
  };
2821
- var loadRestJsonErrorCode = function (output, data) {
2822
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2823
- var sanitizeErrorCode = function (rawValue) {
2824
- var cleanValue = rawValue;
2438
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2439
+ if (encoded.length) {
2440
+ return JSON.parse(encoded);
2441
+ }
2442
+ return {};
2443
+ });
2444
+ const parseErrorBody = async (errorBody, context) => {
2445
+ const value = await parseBody(errorBody, context);
2446
+ value.message = value.message ?? value.Message;
2447
+ return value;
2448
+ };
2449
+ const loadRestJsonErrorCode = (output, data) => {
2450
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2451
+ const sanitizeErrorCode = (rawValue) => {
2452
+ let cleanValue = rawValue;
2825
2453
  if (typeof cleanValue === "number") {
2826
2454
  cleanValue = cleanValue.toString();
2827
2455
  }
@@ -2836,7 +2464,7 @@ var loadRestJsonErrorCode = function (output, data) {
2836
2464
  }
2837
2465
  return cleanValue;
2838
2466
  };
2839
- var headerKey = findKey(output.headers, "x-amzn-errortype");
2467
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2840
2468
  if (headerKey !== undefined) {
2841
2469
  return sanitizeErrorCode(output.headers[headerKey]);
2842
2470
  }