@aws-sdk/client-compute-optimizer 3.183.0 → 3.186.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 +19 -0
  2. package/dist-cjs/protocols/Aws_json1_0.js +2 -2
  3. package/dist-es/ComputeOptimizer.js +81 -74
  4. package/dist-es/ComputeOptimizerClient.js +28 -22
  5. package/dist-es/commands/DeleteRecommendationPreferencesCommand.js +28 -21
  6. package/dist-es/commands/DescribeRecommendationExportJobsCommand.js +28 -21
  7. package/dist-es/commands/ExportAutoScalingGroupRecommendationsCommand.js +28 -21
  8. package/dist-es/commands/ExportEBSVolumeRecommendationsCommand.js +28 -21
  9. package/dist-es/commands/ExportEC2InstanceRecommendationsCommand.js +28 -21
  10. package/dist-es/commands/ExportLambdaFunctionRecommendationsCommand.js +28 -21
  11. package/dist-es/commands/GetAutoScalingGroupRecommendationsCommand.js +28 -21
  12. package/dist-es/commands/GetEBSVolumeRecommendationsCommand.js +28 -21
  13. package/dist-es/commands/GetEC2InstanceRecommendationsCommand.js +28 -21
  14. package/dist-es/commands/GetEC2RecommendationProjectedMetricsCommand.js +28 -21
  15. package/dist-es/commands/GetEffectiveRecommendationPreferencesCommand.js +28 -21
  16. package/dist-es/commands/GetEnrollmentStatusCommand.js +28 -21
  17. package/dist-es/commands/GetEnrollmentStatusesForOrganizationCommand.js +28 -21
  18. package/dist-es/commands/GetLambdaFunctionRecommendationsCommand.js +28 -21
  19. package/dist-es/commands/GetRecommendationPreferencesCommand.js +28 -21
  20. package/dist-es/commands/GetRecommendationSummariesCommand.js +28 -21
  21. package/dist-es/commands/PutRecommendationPreferencesCommand.js +28 -21
  22. package/dist-es/commands/UpdateEnrollmentStatusCommand.js +28 -21
  23. package/dist-es/endpoints.js +8 -8
  24. package/dist-es/models/ComputeOptimizerServiceException.js +10 -5
  25. package/dist-es/models/models_0.js +174 -321
  26. package/dist-es/protocols/Aws_json1_0.js +2064 -1679
  27. package/dist-es/runtimeConfig.browser.js +12 -26
  28. package/dist-es/runtimeConfig.js +12 -30
  29. package/dist-es/runtimeConfig.native.js +5 -8
  30. package/dist-es/runtimeConfig.shared.js +11 -8
  31. package/package.json +33 -33
@@ -1,1567 +1,1929 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  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";
3
4
  import { ComputeOptimizerServiceException as __BaseException } from "../models/ComputeOptimizerServiceException";
4
5
  import { AccessDeniedException, InternalServerException, InvalidParameterValueException, LimitExceededException, MissingAuthenticationToken, OptInRequiredException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, } from "../models/models_0";
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) => {
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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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, parseErrorBody(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) {
1200
1680
  return input
1201
- .filter((e) => e != null)
1202
- .map((entry) => {
1681
+ .filter(function (e) { return e != null; })
1682
+ .map(function (entry) {
1203
1683
  return entry;
1204
1684
  });
1205
1685
  };
1206
- const serializeAws_json1_0AutoScalingGroupArns = (input, context) => {
1686
+ var serializeAws_json1_0AutoScalingGroupArns = function (input, context) {
1207
1687
  return input
1208
- .filter((e) => e != null)
1209
- .map((entry) => {
1688
+ .filter(function (e) { return e != null; })
1689
+ .map(function (entry) {
1210
1690
  return entry;
1211
1691
  });
1212
1692
  };
1213
- const serializeAws_json1_0CpuVendorArchitectures = (input, context) => {
1693
+ var serializeAws_json1_0CpuVendorArchitectures = function (input, context) {
1214
1694
  return input
1215
- .filter((e) => e != null)
1216
- .map((entry) => {
1695
+ .filter(function (e) { return e != null; })
1696
+ .map(function (entry) {
1217
1697
  return entry;
1218
1698
  });
1219
1699
  };
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
- };
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) }));
1228
1704
  };
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
- };
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 }));
1236
1707
  };
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
- };
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) }));
1242
1710
  };
1243
- const serializeAws_json1_0EBSFilters = (input, context) => {
1711
+ var serializeAws_json1_0EBSFilters = function (input, context) {
1244
1712
  return input
1245
- .filter((e) => e != null)
1246
- .map((entry) => {
1713
+ .filter(function (e) { return e != null; })
1714
+ .map(function (entry) {
1247
1715
  return serializeAws_json1_0EBSFilter(entry, context);
1248
1716
  });
1249
1717
  };
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
- };
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) }));
1255
1720
  };
1256
- const serializeAws_json1_0EnrollmentFilters = (input, context) => {
1721
+ var serializeAws_json1_0EnrollmentFilters = function (input, context) {
1257
1722
  return input
1258
- .filter((e) => e != null)
1259
- .map((entry) => {
1723
+ .filter(function (e) { return e != null; })
1724
+ .map(function (entry) {
1260
1725
  return serializeAws_json1_0EnrollmentFilter(entry, context);
1261
1726
  });
1262
1727
  };
1263
- const serializeAws_json1_0ExportableAutoScalingGroupFields = (input, context) => {
1728
+ var serializeAws_json1_0ExportableAutoScalingGroupFields = function (input, context) {
1264
1729
  return input
1265
- .filter((e) => e != null)
1266
- .map((entry) => {
1730
+ .filter(function (e) { return e != null; })
1731
+ .map(function (entry) {
1267
1732
  return entry;
1268
1733
  });
1269
1734
  };
1270
- const serializeAws_json1_0ExportableInstanceFields = (input, context) => {
1735
+ var serializeAws_json1_0ExportableInstanceFields = function (input, context) {
1271
1736
  return input
1272
- .filter((e) => e != null)
1273
- .map((entry) => {
1737
+ .filter(function (e) { return e != null; })
1738
+ .map(function (entry) {
1274
1739
  return entry;
1275
1740
  });
1276
1741
  };
1277
- const serializeAws_json1_0ExportableLambdaFunctionFields = (input, context) => {
1742
+ var serializeAws_json1_0ExportableLambdaFunctionFields = function (input, context) {
1278
1743
  return input
1279
- .filter((e) => e != null)
1280
- .map((entry) => {
1744
+ .filter(function (e) { return e != null; })
1745
+ .map(function (entry) {
1281
1746
  return entry;
1282
1747
  });
1283
1748
  };
1284
- const serializeAws_json1_0ExportableVolumeFields = (input, context) => {
1749
+ var serializeAws_json1_0ExportableVolumeFields = function (input, context) {
1285
1750
  return input
1286
- .filter((e) => e != null)
1287
- .map((entry) => {
1751
+ .filter(function (e) { return e != null; })
1752
+ .map(function (entry) {
1288
1753
  return entry;
1289
1754
  });
1290
1755
  };
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) => {
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) {
1362
1794
  return input
1363
- .filter((e) => e != null)
1364
- .map((entry) => {
1795
+ .filter(function (e) { return e != null; })
1796
+ .map(function (entry) {
1365
1797
  return serializeAws_json1_0Filter(entry, context);
1366
1798
  });
1367
1799
  };
1368
- const serializeAws_json1_0FilterValues = (input, context) => {
1800
+ var serializeAws_json1_0FilterValues = function (input, context) {
1369
1801
  return input
1370
- .filter((e) => e != null)
1371
- .map((entry) => {
1802
+ .filter(function (e) { return e != null; })
1803
+ .map(function (entry) {
1372
1804
  return entry;
1373
1805
  });
1374
1806
  };
1375
- const serializeAws_json1_0FunctionArns = (input, context) => {
1807
+ var serializeAws_json1_0FunctionArns = function (input, context) {
1376
1808
  return input
1377
- .filter((e) => e != null)
1378
- .map((entry) => {
1809
+ .filter(function (e) { return e != null; })
1810
+ .map(function (entry) {
1379
1811
  return entry;
1380
1812
  });
1381
1813
  };
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
- };
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
+ }));
1395
1820
  };
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
- };
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) }));
1404
1823
  };
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
- };
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
+ }));
1416
1828
  };
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
- };
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 }));
1428
1833
  };
1429
- const serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest = (input, context) => {
1430
- return {
1431
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1432
- };
1834
+ var serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest = function (input, context) {
1835
+ return __assign({}, (input.resourceArn != null && { resourceArn: input.resourceArn }));
1433
1836
  };
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
- };
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 }));
1440
1839
  };
1441
- const serializeAws_json1_0GetEnrollmentStatusRequest = (input, context) => {
1840
+ var serializeAws_json1_0GetEnrollmentStatusRequest = function (input, context) {
1442
1841
  return {};
1443
1842
  };
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
- };
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 }));
1454
1847
  };
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
- };
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) }));
1462
1850
  };
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
- };
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 }));
1469
1853
  };
1470
- const serializeAws_json1_0InstanceArns = (input, context) => {
1854
+ var serializeAws_json1_0InstanceArns = function (input, context) {
1471
1855
  return input
1472
- .filter((e) => e != null)
1473
- .map((entry) => {
1856
+ .filter(function (e) { return e != null; })
1857
+ .map(function (entry) {
1474
1858
  return entry;
1475
1859
  });
1476
1860
  };
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
- };
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) }));
1482
1863
  };
1483
- const serializeAws_json1_0JobFilters = (input, context) => {
1864
+ var serializeAws_json1_0JobFilters = function (input, context) {
1484
1865
  return input
1485
- .filter((e) => e != null)
1486
- .map((entry) => {
1866
+ .filter(function (e) { return e != null; })
1867
+ .map(function (entry) {
1487
1868
  return serializeAws_json1_0JobFilter(entry, context);
1488
1869
  });
1489
1870
  };
1490
- const serializeAws_json1_0JobIds = (input, context) => {
1871
+ var serializeAws_json1_0JobIds = function (input, context) {
1491
1872
  return input
1492
- .filter((e) => e != null)
1493
- .map((entry) => {
1873
+ .filter(function (e) { return e != null; })
1874
+ .map(function (entry) {
1494
1875
  return entry;
1495
1876
  });
1496
1877
  };
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
- };
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) }));
1502
1880
  };
1503
- const serializeAws_json1_0LambdaFunctionRecommendationFilters = (input, context) => {
1881
+ var serializeAws_json1_0LambdaFunctionRecommendationFilters = function (input, context) {
1504
1882
  return input
1505
- .filter((e) => e != null)
1506
- .map((entry) => {
1883
+ .filter(function (e) { return e != null; })
1884
+ .map(function (entry) {
1507
1885
  return serializeAws_json1_0LambdaFunctionRecommendationFilter(entry, context);
1508
1886
  });
1509
1887
  };
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
- };
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) }));
1519
1892
  };
1520
- const serializeAws_json1_0RecommendationPreferenceNames = (input, context) => {
1893
+ var serializeAws_json1_0RecommendationPreferenceNames = function (input, context) {
1521
1894
  return input
1522
- .filter((e) => e != null)
1523
- .map((entry) => {
1895
+ .filter(function (e) { return e != null; })
1896
+ .map(function (entry) {
1524
1897
  return entry;
1525
1898
  });
1526
1899
  };
1527
- const serializeAws_json1_0RecommendationPreferences = (input, context) => {
1528
- return {
1529
- ...(input.cpuVendorArchitectures != null && {
1530
- cpuVendorArchitectures: serializeAws_json1_0CpuVendorArchitectures(input.cpuVendorArchitectures, context),
1531
- }),
1532
- };
1900
+ var serializeAws_json1_0RecommendationPreferences = function (input, context) {
1901
+ return __assign({}, (input.cpuVendorArchitectures != null && {
1902
+ cpuVendorArchitectures: serializeAws_json1_0CpuVendorArchitectures(input.cpuVendorArchitectures, context),
1903
+ }));
1533
1904
  };
1534
- const serializeAws_json1_0S3DestinationConfig = (input, context) => {
1535
- return {
1536
- ...(input.bucket != null && { bucket: input.bucket }),
1537
- ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }),
1538
- };
1905
+ var serializeAws_json1_0S3DestinationConfig = function (input, context) {
1906
+ return __assign(__assign({}, (input.bucket != null && { bucket: input.bucket })), (input.keyPrefix != null && { keyPrefix: input.keyPrefix }));
1539
1907
  };
1540
- const serializeAws_json1_0Scope = (input, context) => {
1541
- return {
1542
- ...(input.name != null && { name: input.name }),
1543
- ...(input.value != null && { value: input.value }),
1544
- };
1908
+ var serializeAws_json1_0Scope = function (input, context) {
1909
+ return __assign(__assign({}, (input.name != null && { name: input.name })), (input.value != null && { value: input.value }));
1545
1910
  };
1546
- const serializeAws_json1_0UpdateEnrollmentStatusRequest = (input, context) => {
1547
- return {
1548
- ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1549
- ...(input.status != null && { status: input.status }),
1550
- };
1911
+ var serializeAws_json1_0UpdateEnrollmentStatusRequest = function (input, context) {
1912
+ return __assign(__assign({}, (input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts })), (input.status != null && { status: input.status }));
1551
1913
  };
1552
- const serializeAws_json1_0VolumeArns = (input, context) => {
1914
+ var serializeAws_json1_0VolumeArns = function (input, context) {
1553
1915
  return input
1554
- .filter((e) => e != null)
1555
- .map((entry) => {
1916
+ .filter(function (e) { return e != null; })
1917
+ .map(function (entry) {
1556
1918
  return entry;
1557
1919
  });
1558
1920
  };
1559
- const deserializeAws_json1_0AccessDeniedException = (output, context) => {
1921
+ var deserializeAws_json1_0AccessDeniedException = function (output, context) {
1560
1922
  return {
1561
1923
  message: __expectString(output.message),
1562
1924
  };
1563
1925
  };
1564
- const deserializeAws_json1_0AccountEnrollmentStatus = (output, context) => {
1926
+ var deserializeAws_json1_0AccountEnrollmentStatus = function (output, context) {
1565
1927
  return {
1566
1928
  accountId: __expectString(output.accountId),
1567
1929
  lastUpdatedTimestamp: output.lastUpdatedTimestamp != null
@@ -1571,10 +1933,10 @@ const deserializeAws_json1_0AccountEnrollmentStatus = (output, context) => {
1571
1933
  statusReason: __expectString(output.statusReason),
1572
1934
  };
1573
1935
  };
1574
- const deserializeAws_json1_0AccountEnrollmentStatuses = (output, context) => {
1575
- const retVal = (output || [])
1576
- .filter((e) => e != null)
1577
- .map((entry) => {
1936
+ var deserializeAws_json1_0AccountEnrollmentStatuses = function (output, context) {
1937
+ var retVal = (output || [])
1938
+ .filter(function (e) { return e != null; })
1939
+ .map(function (entry) {
1578
1940
  if (entry === null) {
1579
1941
  return null;
1580
1942
  }
@@ -1582,7 +1944,7 @@ const deserializeAws_json1_0AccountEnrollmentStatuses = (output, context) => {
1582
1944
  });
1583
1945
  return retVal;
1584
1946
  };
1585
- const deserializeAws_json1_0AutoScalingGroupConfiguration = (output, context) => {
1947
+ var deserializeAws_json1_0AutoScalingGroupConfiguration = function (output, context) {
1586
1948
  return {
1587
1949
  desiredCapacity: __expectInt32(output.desiredCapacity),
1588
1950
  instanceType: __expectString(output.instanceType),
@@ -1590,7 +1952,7 @@ const deserializeAws_json1_0AutoScalingGroupConfiguration = (output, context) =>
1590
1952
  minSize: __expectInt32(output.minSize),
1591
1953
  };
1592
1954
  };
1593
- const deserializeAws_json1_0AutoScalingGroupRecommendation = (output, context) => {
1955
+ var deserializeAws_json1_0AutoScalingGroupRecommendation = function (output, context) {
1594
1956
  return {
1595
1957
  accountId: __expectString(output.accountId),
1596
1958
  autoScalingGroupArn: __expectString(output.autoScalingGroupArn),
@@ -1618,7 +1980,7 @@ const deserializeAws_json1_0AutoScalingGroupRecommendation = (output, context) =
1618
1980
  : undefined,
1619
1981
  };
1620
1982
  };
1621
- const deserializeAws_json1_0AutoScalingGroupRecommendationOption = (output, context) => {
1983
+ var deserializeAws_json1_0AutoScalingGroupRecommendationOption = function (output, context) {
1622
1984
  return {
1623
1985
  configuration: output.configuration != null
1624
1986
  ? deserializeAws_json1_0AutoScalingGroupConfiguration(output.configuration, context)
@@ -1634,10 +1996,10 @@ const deserializeAws_json1_0AutoScalingGroupRecommendationOption = (output, cont
1634
1996
  : undefined,
1635
1997
  };
1636
1998
  };
1637
- const deserializeAws_json1_0AutoScalingGroupRecommendationOptions = (output, context) => {
1638
- const retVal = (output || [])
1639
- .filter((e) => e != null)
1640
- .map((entry) => {
1999
+ var deserializeAws_json1_0AutoScalingGroupRecommendationOptions = function (output, context) {
2000
+ var retVal = (output || [])
2001
+ .filter(function (e) { return e != null; })
2002
+ .map(function (entry) {
1641
2003
  if (entry === null) {
1642
2004
  return null;
1643
2005
  }
@@ -1645,10 +2007,10 @@ const deserializeAws_json1_0AutoScalingGroupRecommendationOptions = (output, con
1645
2007
  });
1646
2008
  return retVal;
1647
2009
  };
1648
- const deserializeAws_json1_0AutoScalingGroupRecommendations = (output, context) => {
1649
- const retVal = (output || [])
1650
- .filter((e) => e != null)
1651
- .map((entry) => {
2010
+ var deserializeAws_json1_0AutoScalingGroupRecommendations = function (output, context) {
2011
+ var retVal = (output || [])
2012
+ .filter(function (e) { return e != null; })
2013
+ .map(function (entry) {
1652
2014
  if (entry === null) {
1653
2015
  return null;
1654
2016
  }
@@ -1656,10 +2018,10 @@ const deserializeAws_json1_0AutoScalingGroupRecommendations = (output, context)
1656
2018
  });
1657
2019
  return retVal;
1658
2020
  };
1659
- const deserializeAws_json1_0CpuVendorArchitectures = (output, context) => {
1660
- const retVal = (output || [])
1661
- .filter((e) => e != null)
1662
- .map((entry) => {
2021
+ var deserializeAws_json1_0CpuVendorArchitectures = function (output, context) {
2022
+ var retVal = (output || [])
2023
+ .filter(function (e) { return e != null; })
2024
+ .map(function (entry) {
1663
2025
  if (entry === null) {
1664
2026
  return null;
1665
2027
  }
@@ -1667,7 +2029,7 @@ const deserializeAws_json1_0CpuVendorArchitectures = (output, context) => {
1667
2029
  });
1668
2030
  return retVal;
1669
2031
  };
1670
- const deserializeAws_json1_0CurrentPerformanceRiskRatings = (output, context) => {
2032
+ var deserializeAws_json1_0CurrentPerformanceRiskRatings = function (output, context) {
1671
2033
  return {
1672
2034
  high: __expectLong(output.high),
1673
2035
  low: __expectLong(output.low),
@@ -1675,10 +2037,10 @@ const deserializeAws_json1_0CurrentPerformanceRiskRatings = (output, context) =>
1675
2037
  veryLow: __expectLong(output.veryLow),
1676
2038
  };
1677
2039
  };
1678
- const deserializeAws_json1_0DeleteRecommendationPreferencesResponse = (output, context) => {
2040
+ var deserializeAws_json1_0DeleteRecommendationPreferencesResponse = function (output, context) {
1679
2041
  return {};
1680
2042
  };
1681
- const deserializeAws_json1_0DescribeRecommendationExportJobsResponse = (output, context) => {
2043
+ var deserializeAws_json1_0DescribeRecommendationExportJobsResponse = function (output, context) {
1682
2044
  return {
1683
2045
  nextToken: __expectString(output.nextToken),
1684
2046
  recommendationExportJobs: output.recommendationExportJobs != null
@@ -1686,17 +2048,17 @@ const deserializeAws_json1_0DescribeRecommendationExportJobsResponse = (output,
1686
2048
  : undefined,
1687
2049
  };
1688
2050
  };
1689
- const deserializeAws_json1_0EBSUtilizationMetric = (output, context) => {
2051
+ var deserializeAws_json1_0EBSUtilizationMetric = function (output, context) {
1690
2052
  return {
1691
2053
  name: __expectString(output.name),
1692
2054
  statistic: __expectString(output.statistic),
1693
2055
  value: __limitedParseDouble(output.value),
1694
2056
  };
1695
2057
  };
1696
- const deserializeAws_json1_0EBSUtilizationMetrics = (output, context) => {
1697
- const retVal = (output || [])
1698
- .filter((e) => e != null)
1699
- .map((entry) => {
2058
+ var deserializeAws_json1_0EBSUtilizationMetrics = function (output, context) {
2059
+ var retVal = (output || [])
2060
+ .filter(function (e) { return e != null; })
2061
+ .map(function (entry) {
1700
2062
  if (entry === null) {
1701
2063
  return null;
1702
2064
  }
@@ -1704,7 +2066,7 @@ const deserializeAws_json1_0EBSUtilizationMetrics = (output, context) => {
1704
2066
  });
1705
2067
  return retVal;
1706
2068
  };
1707
- const deserializeAws_json1_0EffectiveRecommendationPreferences = (output, context) => {
2069
+ var deserializeAws_json1_0EffectiveRecommendationPreferences = function (output, context) {
1708
2070
  return {
1709
2071
  cpuVendorArchitectures: output.cpuVendorArchitectures != null
1710
2072
  ? deserializeAws_json1_0CpuVendorArchitectures(output.cpuVendorArchitectures, context)
@@ -1713,42 +2075,42 @@ const deserializeAws_json1_0EffectiveRecommendationPreferences = (output, contex
1713
2075
  inferredWorkloadTypes: __expectString(output.inferredWorkloadTypes),
1714
2076
  };
1715
2077
  };
1716
- const deserializeAws_json1_0EstimatedMonthlySavings = (output, context) => {
2078
+ var deserializeAws_json1_0EstimatedMonthlySavings = function (output, context) {
1717
2079
  return {
1718
2080
  currency: __expectString(output.currency),
1719
2081
  value: __limitedParseDouble(output.value),
1720
2082
  };
1721
2083
  };
1722
- const deserializeAws_json1_0ExportAutoScalingGroupRecommendationsResponse = (output, context) => {
2084
+ var deserializeAws_json1_0ExportAutoScalingGroupRecommendationsResponse = function (output, context) {
1723
2085
  return {
1724
2086
  jobId: __expectString(output.jobId),
1725
2087
  s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
1726
2088
  };
1727
2089
  };
1728
- const deserializeAws_json1_0ExportDestination = (output, context) => {
2090
+ var deserializeAws_json1_0ExportDestination = function (output, context) {
1729
2091
  return {
1730
2092
  s3: output.s3 != null ? deserializeAws_json1_0S3Destination(output.s3, context) : undefined,
1731
2093
  };
1732
2094
  };
1733
- const deserializeAws_json1_0ExportEBSVolumeRecommendationsResponse = (output, context) => {
2095
+ var deserializeAws_json1_0ExportEBSVolumeRecommendationsResponse = function (output, context) {
1734
2096
  return {
1735
2097
  jobId: __expectString(output.jobId),
1736
2098
  s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
1737
2099
  };
1738
2100
  };
1739
- const deserializeAws_json1_0ExportEC2InstanceRecommendationsResponse = (output, context) => {
2101
+ var deserializeAws_json1_0ExportEC2InstanceRecommendationsResponse = function (output, context) {
1740
2102
  return {
1741
2103
  jobId: __expectString(output.jobId),
1742
2104
  s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
1743
2105
  };
1744
2106
  };
1745
- const deserializeAws_json1_0ExportLambdaFunctionRecommendationsResponse = (output, context) => {
2107
+ var deserializeAws_json1_0ExportLambdaFunctionRecommendationsResponse = function (output, context) {
1746
2108
  return {
1747
2109
  jobId: __expectString(output.jobId),
1748
2110
  s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
1749
2111
  };
1750
2112
  };
1751
- const deserializeAws_json1_0GetAutoScalingGroupRecommendationsResponse = (output, context) => {
2113
+ var deserializeAws_json1_0GetAutoScalingGroupRecommendationsResponse = function (output, context) {
1752
2114
  return {
1753
2115
  autoScalingGroupRecommendations: output.autoScalingGroupRecommendations != null
1754
2116
  ? deserializeAws_json1_0AutoScalingGroupRecommendations(output.autoScalingGroupRecommendations, context)
@@ -1757,7 +2119,7 @@ const deserializeAws_json1_0GetAutoScalingGroupRecommendationsResponse = (output
1757
2119
  nextToken: __expectString(output.nextToken),
1758
2120
  };
1759
2121
  };
1760
- const deserializeAws_json1_0GetEBSVolumeRecommendationsResponse = (output, context) => {
2122
+ var deserializeAws_json1_0GetEBSVolumeRecommendationsResponse = function (output, context) {
1761
2123
  return {
1762
2124
  errors: output.errors != null ? deserializeAws_json1_0GetRecommendationErrors(output.errors, context) : undefined,
1763
2125
  nextToken: __expectString(output.nextToken),
@@ -1766,7 +2128,7 @@ const deserializeAws_json1_0GetEBSVolumeRecommendationsResponse = (output, conte
1766
2128
  : undefined,
1767
2129
  };
1768
2130
  };
1769
- const deserializeAws_json1_0GetEC2InstanceRecommendationsResponse = (output, context) => {
2131
+ var deserializeAws_json1_0GetEC2InstanceRecommendationsResponse = function (output, context) {
1770
2132
  return {
1771
2133
  errors: output.errors != null ? deserializeAws_json1_0GetRecommendationErrors(output.errors, context) : undefined,
1772
2134
  instanceRecommendations: output.instanceRecommendations != null
@@ -1775,19 +2137,19 @@ const deserializeAws_json1_0GetEC2InstanceRecommendationsResponse = (output, con
1775
2137
  nextToken: __expectString(output.nextToken),
1776
2138
  };
1777
2139
  };
1778
- const deserializeAws_json1_0GetEC2RecommendationProjectedMetricsResponse = (output, context) => {
2140
+ var deserializeAws_json1_0GetEC2RecommendationProjectedMetricsResponse = function (output, context) {
1779
2141
  return {
1780
2142
  recommendedOptionProjectedMetrics: output.recommendedOptionProjectedMetrics != null
1781
2143
  ? deserializeAws_json1_0RecommendedOptionProjectedMetrics(output.recommendedOptionProjectedMetrics, context)
1782
2144
  : undefined,
1783
2145
  };
1784
2146
  };
1785
- const deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse = (output, context) => {
2147
+ var deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse = function (output, context) {
1786
2148
  return {
1787
2149
  enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics),
1788
2150
  };
1789
2151
  };
1790
- const deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse = (output, context) => {
2152
+ var deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse = function (output, context) {
1791
2153
  return {
1792
2154
  accountEnrollmentStatuses: output.accountEnrollmentStatuses != null
1793
2155
  ? deserializeAws_json1_0AccountEnrollmentStatuses(output.accountEnrollmentStatuses, context)
@@ -1795,7 +2157,7 @@ const deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse = (outp
1795
2157
  nextToken: __expectString(output.nextToken),
1796
2158
  };
1797
2159
  };
1798
- const deserializeAws_json1_0GetEnrollmentStatusResponse = (output, context) => {
2160
+ var deserializeAws_json1_0GetEnrollmentStatusResponse = function (output, context) {
1799
2161
  return {
1800
2162
  lastUpdatedTimestamp: output.lastUpdatedTimestamp != null
1801
2163
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTimestamp)))
@@ -1806,7 +2168,7 @@ const deserializeAws_json1_0GetEnrollmentStatusResponse = (output, context) => {
1806
2168
  statusReason: __expectString(output.statusReason),
1807
2169
  };
1808
2170
  };
1809
- const deserializeAws_json1_0GetLambdaFunctionRecommendationsResponse = (output, context) => {
2171
+ var deserializeAws_json1_0GetLambdaFunctionRecommendationsResponse = function (output, context) {
1810
2172
  return {
1811
2173
  lambdaFunctionRecommendations: output.lambdaFunctionRecommendations != null
1812
2174
  ? deserializeAws_json1_0LambdaFunctionRecommendations(output.lambdaFunctionRecommendations, context)
@@ -1814,17 +2176,17 @@ const deserializeAws_json1_0GetLambdaFunctionRecommendationsResponse = (output,
1814
2176
  nextToken: __expectString(output.nextToken),
1815
2177
  };
1816
2178
  };
1817
- const deserializeAws_json1_0GetRecommendationError = (output, context) => {
2179
+ var deserializeAws_json1_0GetRecommendationError = function (output, context) {
1818
2180
  return {
1819
2181
  code: __expectString(output.code),
1820
2182
  identifier: __expectString(output.identifier),
1821
2183
  message: __expectString(output.message),
1822
2184
  };
1823
2185
  };
1824
- const deserializeAws_json1_0GetRecommendationErrors = (output, context) => {
1825
- const retVal = (output || [])
1826
- .filter((e) => e != null)
1827
- .map((entry) => {
2186
+ var deserializeAws_json1_0GetRecommendationErrors = function (output, context) {
2187
+ var retVal = (output || [])
2188
+ .filter(function (e) { return e != null; })
2189
+ .map(function (entry) {
1828
2190
  if (entry === null) {
1829
2191
  return null;
1830
2192
  }
@@ -1832,7 +2194,7 @@ const deserializeAws_json1_0GetRecommendationErrors = (output, context) => {
1832
2194
  });
1833
2195
  return retVal;
1834
2196
  };
1835
- const deserializeAws_json1_0GetRecommendationPreferencesResponse = (output, context) => {
2197
+ var deserializeAws_json1_0GetRecommendationPreferencesResponse = function (output, context) {
1836
2198
  return {
1837
2199
  nextToken: __expectString(output.nextToken),
1838
2200
  recommendationPreferencesDetails: output.recommendationPreferencesDetails != null
@@ -1840,7 +2202,7 @@ const deserializeAws_json1_0GetRecommendationPreferencesResponse = (output, cont
1840
2202
  : undefined,
1841
2203
  };
1842
2204
  };
1843
- const deserializeAws_json1_0GetRecommendationSummariesResponse = (output, context) => {
2205
+ var deserializeAws_json1_0GetRecommendationSummariesResponse = function (output, context) {
1844
2206
  return {
1845
2207
  nextToken: __expectString(output.nextToken),
1846
2208
  recommendationSummaries: output.recommendationSummaries != null
@@ -1848,10 +2210,10 @@ const deserializeAws_json1_0GetRecommendationSummariesResponse = (output, contex
1848
2210
  : undefined,
1849
2211
  };
1850
2212
  };
1851
- const deserializeAws_json1_0InferredWorkloadTypes = (output, context) => {
1852
- const retVal = (output || [])
1853
- .filter((e) => e != null)
1854
- .map((entry) => {
2213
+ var deserializeAws_json1_0InferredWorkloadTypes = function (output, context) {
2214
+ var retVal = (output || [])
2215
+ .filter(function (e) { return e != null; })
2216
+ .map(function (entry) {
1855
2217
  if (entry === null) {
1856
2218
  return null;
1857
2219
  }
@@ -1859,7 +2221,7 @@ const deserializeAws_json1_0InferredWorkloadTypes = (output, context) => {
1859
2221
  });
1860
2222
  return retVal;
1861
2223
  };
1862
- const deserializeAws_json1_0InstanceRecommendation = (output, context) => {
2224
+ var deserializeAws_json1_0InstanceRecommendation = function (output, context) {
1863
2225
  return {
1864
2226
  accountId: __expectString(output.accountId),
1865
2227
  currentInstanceType: __expectString(output.currentInstanceType),
@@ -1891,10 +2253,10 @@ const deserializeAws_json1_0InstanceRecommendation = (output, context) => {
1891
2253
  : undefined,
1892
2254
  };
1893
2255
  };
1894
- const deserializeAws_json1_0InstanceRecommendationFindingReasonCodes = (output, context) => {
1895
- const retVal = (output || [])
1896
- .filter((e) => e != null)
1897
- .map((entry) => {
2256
+ var deserializeAws_json1_0InstanceRecommendationFindingReasonCodes = function (output, context) {
2257
+ var retVal = (output || [])
2258
+ .filter(function (e) { return e != null; })
2259
+ .map(function (entry) {
1898
2260
  if (entry === null) {
1899
2261
  return null;
1900
2262
  }
@@ -1902,7 +2264,7 @@ const deserializeAws_json1_0InstanceRecommendationFindingReasonCodes = (output,
1902
2264
  });
1903
2265
  return retVal;
1904
2266
  };
1905
- const deserializeAws_json1_0InstanceRecommendationOption = (output, context) => {
2267
+ var deserializeAws_json1_0InstanceRecommendationOption = function (output, context) {
1906
2268
  return {
1907
2269
  instanceType: __expectString(output.instanceType),
1908
2270
  migrationEffort: __expectString(output.migrationEffort),
@@ -1919,10 +2281,10 @@ const deserializeAws_json1_0InstanceRecommendationOption = (output, context) =>
1919
2281
  : undefined,
1920
2282
  };
1921
2283
  };
1922
- const deserializeAws_json1_0InstanceRecommendations = (output, context) => {
1923
- const retVal = (output || [])
1924
- .filter((e) => e != null)
1925
- .map((entry) => {
2284
+ var deserializeAws_json1_0InstanceRecommendations = function (output, context) {
2285
+ var retVal = (output || [])
2286
+ .filter(function (e) { return e != null; })
2287
+ .map(function (entry) {
1926
2288
  if (entry === null) {
1927
2289
  return null;
1928
2290
  }
@@ -1930,27 +2292,27 @@ const deserializeAws_json1_0InstanceRecommendations = (output, context) => {
1930
2292
  });
1931
2293
  return retVal;
1932
2294
  };
1933
- const deserializeAws_json1_0InternalServerException = (output, context) => {
2295
+ var deserializeAws_json1_0InternalServerException = function (output, context) {
1934
2296
  return {
1935
2297
  message: __expectString(output.message),
1936
2298
  };
1937
2299
  };
1938
- const deserializeAws_json1_0InvalidParameterValueException = (output, context) => {
2300
+ var deserializeAws_json1_0InvalidParameterValueException = function (output, context) {
1939
2301
  return {
1940
2302
  message: __expectString(output.message),
1941
2303
  };
1942
2304
  };
1943
- const deserializeAws_json1_0LambdaFunctionMemoryProjectedMetric = (output, context) => {
2305
+ var deserializeAws_json1_0LambdaFunctionMemoryProjectedMetric = function (output, context) {
1944
2306
  return {
1945
2307
  name: __expectString(output.name),
1946
2308
  statistic: __expectString(output.statistic),
1947
2309
  value: __limitedParseDouble(output.value),
1948
2310
  };
1949
2311
  };
1950
- const deserializeAws_json1_0LambdaFunctionMemoryProjectedMetrics = (output, context) => {
1951
- const retVal = (output || [])
1952
- .filter((e) => e != null)
1953
- .map((entry) => {
2312
+ var deserializeAws_json1_0LambdaFunctionMemoryProjectedMetrics = function (output, context) {
2313
+ var retVal = (output || [])
2314
+ .filter(function (e) { return e != null; })
2315
+ .map(function (entry) {
1954
2316
  if (entry === null) {
1955
2317
  return null;
1956
2318
  }
@@ -1958,7 +2320,7 @@ const deserializeAws_json1_0LambdaFunctionMemoryProjectedMetrics = (output, cont
1958
2320
  });
1959
2321
  return retVal;
1960
2322
  };
1961
- const deserializeAws_json1_0LambdaFunctionMemoryRecommendationOption = (output, context) => {
2323
+ var deserializeAws_json1_0LambdaFunctionMemoryRecommendationOption = function (output, context) {
1962
2324
  return {
1963
2325
  memorySize: __expectInt32(output.memorySize),
1964
2326
  projectedUtilizationMetrics: output.projectedUtilizationMetrics != null
@@ -1970,10 +2332,10 @@ const deserializeAws_json1_0LambdaFunctionMemoryRecommendationOption = (output,
1970
2332
  : undefined,
1971
2333
  };
1972
2334
  };
1973
- const deserializeAws_json1_0LambdaFunctionMemoryRecommendationOptions = (output, context) => {
1974
- const retVal = (output || [])
1975
- .filter((e) => e != null)
1976
- .map((entry) => {
2335
+ var deserializeAws_json1_0LambdaFunctionMemoryRecommendationOptions = function (output, context) {
2336
+ var retVal = (output || [])
2337
+ .filter(function (e) { return e != null; })
2338
+ .map(function (entry) {
1977
2339
  if (entry === null) {
1978
2340
  return null;
1979
2341
  }
@@ -1981,7 +2343,7 @@ const deserializeAws_json1_0LambdaFunctionMemoryRecommendationOptions = (output,
1981
2343
  });
1982
2344
  return retVal;
1983
2345
  };
1984
- const deserializeAws_json1_0LambdaFunctionRecommendation = (output, context) => {
2346
+ var deserializeAws_json1_0LambdaFunctionRecommendation = function (output, context) {
1985
2347
  return {
1986
2348
  accountId: __expectString(output.accountId),
1987
2349
  currentMemorySize: __expectInt32(output.currentMemorySize),
@@ -2005,10 +2367,10 @@ const deserializeAws_json1_0LambdaFunctionRecommendation = (output, context) =>
2005
2367
  : undefined,
2006
2368
  };
2007
2369
  };
2008
- const deserializeAws_json1_0LambdaFunctionRecommendationFindingReasonCodes = (output, context) => {
2009
- const retVal = (output || [])
2010
- .filter((e) => e != null)
2011
- .map((entry) => {
2370
+ var deserializeAws_json1_0LambdaFunctionRecommendationFindingReasonCodes = function (output, context) {
2371
+ var retVal = (output || [])
2372
+ .filter(function (e) { return e != null; })
2373
+ .map(function (entry) {
2012
2374
  if (entry === null) {
2013
2375
  return null;
2014
2376
  }
@@ -2016,10 +2378,10 @@ const deserializeAws_json1_0LambdaFunctionRecommendationFindingReasonCodes = (ou
2016
2378
  });
2017
2379
  return retVal;
2018
2380
  };
2019
- const deserializeAws_json1_0LambdaFunctionRecommendations = (output, context) => {
2020
- const retVal = (output || [])
2021
- .filter((e) => e != null)
2022
- .map((entry) => {
2381
+ var deserializeAws_json1_0LambdaFunctionRecommendations = function (output, context) {
2382
+ var retVal = (output || [])
2383
+ .filter(function (e) { return e != null; })
2384
+ .map(function (entry) {
2023
2385
  if (entry === null) {
2024
2386
  return null;
2025
2387
  }
@@ -2027,17 +2389,17 @@ const deserializeAws_json1_0LambdaFunctionRecommendations = (output, context) =>
2027
2389
  });
2028
2390
  return retVal;
2029
2391
  };
2030
- const deserializeAws_json1_0LambdaFunctionUtilizationMetric = (output, context) => {
2392
+ var deserializeAws_json1_0LambdaFunctionUtilizationMetric = function (output, context) {
2031
2393
  return {
2032
2394
  name: __expectString(output.name),
2033
2395
  statistic: __expectString(output.statistic),
2034
2396
  value: __limitedParseDouble(output.value),
2035
2397
  };
2036
2398
  };
2037
- const deserializeAws_json1_0LambdaFunctionUtilizationMetrics = (output, context) => {
2038
- const retVal = (output || [])
2039
- .filter((e) => e != null)
2040
- .map((entry) => {
2399
+ var deserializeAws_json1_0LambdaFunctionUtilizationMetrics = function (output, context) {
2400
+ var retVal = (output || [])
2401
+ .filter(function (e) { return e != null; })
2402
+ .map(function (entry) {
2041
2403
  if (entry === null) {
2042
2404
  return null;
2043
2405
  }
@@ -2045,15 +2407,15 @@ const deserializeAws_json1_0LambdaFunctionUtilizationMetrics = (output, context)
2045
2407
  });
2046
2408
  return retVal;
2047
2409
  };
2048
- const deserializeAws_json1_0LimitExceededException = (output, context) => {
2410
+ var deserializeAws_json1_0LimitExceededException = function (output, context) {
2049
2411
  return {
2050
2412
  message: __expectString(output.message),
2051
2413
  };
2052
2414
  };
2053
- const deserializeAws_json1_0MetricValues = (output, context) => {
2054
- const retVal = (output || [])
2055
- .filter((e) => e != null)
2056
- .map((entry) => {
2415
+ var deserializeAws_json1_0MetricValues = function (output, context) {
2416
+ var retVal = (output || [])
2417
+ .filter(function (e) { return e != null; })
2418
+ .map(function (entry) {
2057
2419
  if (entry === null) {
2058
2420
  return null;
2059
2421
  }
@@ -2061,20 +2423,20 @@ const deserializeAws_json1_0MetricValues = (output, context) => {
2061
2423
  });
2062
2424
  return retVal;
2063
2425
  };
2064
- const deserializeAws_json1_0MissingAuthenticationToken = (output, context) => {
2426
+ var deserializeAws_json1_0MissingAuthenticationToken = function (output, context) {
2065
2427
  return {
2066
2428
  message: __expectString(output.message),
2067
2429
  };
2068
2430
  };
2069
- const deserializeAws_json1_0OptInRequiredException = (output, context) => {
2431
+ var deserializeAws_json1_0OptInRequiredException = function (output, context) {
2070
2432
  return {
2071
2433
  message: __expectString(output.message),
2072
2434
  };
2073
2435
  };
2074
- const deserializeAws_json1_0PlatformDifferences = (output, context) => {
2075
- const retVal = (output || [])
2076
- .filter((e) => e != null)
2077
- .map((entry) => {
2436
+ var deserializeAws_json1_0PlatformDifferences = function (output, context) {
2437
+ var retVal = (output || [])
2438
+ .filter(function (e) { return e != null; })
2439
+ .map(function (entry) {
2078
2440
  if (entry === null) {
2079
2441
  return null;
2080
2442
  }
@@ -2082,17 +2444,17 @@ const deserializeAws_json1_0PlatformDifferences = (output, context) => {
2082
2444
  });
2083
2445
  return retVal;
2084
2446
  };
2085
- const deserializeAws_json1_0ProjectedMetric = (output, context) => {
2447
+ var deserializeAws_json1_0ProjectedMetric = function (output, context) {
2086
2448
  return {
2087
2449
  name: __expectString(output.name),
2088
2450
  timestamps: output.timestamps != null ? deserializeAws_json1_0Timestamps(output.timestamps, context) : undefined,
2089
2451
  values: output.values != null ? deserializeAws_json1_0MetricValues(output.values, context) : undefined,
2090
2452
  };
2091
2453
  };
2092
- const deserializeAws_json1_0ProjectedMetrics = (output, context) => {
2093
- const retVal = (output || [])
2094
- .filter((e) => e != null)
2095
- .map((entry) => {
2454
+ var deserializeAws_json1_0ProjectedMetrics = function (output, context) {
2455
+ var retVal = (output || [])
2456
+ .filter(function (e) { return e != null; })
2457
+ .map(function (entry) {
2096
2458
  if (entry === null) {
2097
2459
  return null;
2098
2460
  }
@@ -2100,10 +2462,10 @@ const deserializeAws_json1_0ProjectedMetrics = (output, context) => {
2100
2462
  });
2101
2463
  return retVal;
2102
2464
  };
2103
- const deserializeAws_json1_0ProjectedUtilizationMetrics = (output, context) => {
2104
- const retVal = (output || [])
2105
- .filter((e) => e != null)
2106
- .map((entry) => {
2465
+ var deserializeAws_json1_0ProjectedUtilizationMetrics = function (output, context) {
2466
+ var retVal = (output || [])
2467
+ .filter(function (e) { return e != null; })
2468
+ .map(function (entry) {
2107
2469
  if (entry === null) {
2108
2470
  return null;
2109
2471
  }
@@ -2111,13 +2473,13 @@ const deserializeAws_json1_0ProjectedUtilizationMetrics = (output, context) => {
2111
2473
  });
2112
2474
  return retVal;
2113
2475
  };
2114
- const deserializeAws_json1_0PutRecommendationPreferencesResponse = (output, context) => {
2476
+ var deserializeAws_json1_0PutRecommendationPreferencesResponse = function (output, context) {
2115
2477
  return {};
2116
2478
  };
2117
- const deserializeAws_json1_0ReasonCodeSummaries = (output, context) => {
2118
- const retVal = (output || [])
2119
- .filter((e) => e != null)
2120
- .map((entry) => {
2479
+ var deserializeAws_json1_0ReasonCodeSummaries = function (output, context) {
2480
+ var retVal = (output || [])
2481
+ .filter(function (e) { return e != null; })
2482
+ .map(function (entry) {
2121
2483
  if (entry === null) {
2122
2484
  return null;
2123
2485
  }
@@ -2125,13 +2487,13 @@ const deserializeAws_json1_0ReasonCodeSummaries = (output, context) => {
2125
2487
  });
2126
2488
  return retVal;
2127
2489
  };
2128
- const deserializeAws_json1_0ReasonCodeSummary = (output, context) => {
2490
+ var deserializeAws_json1_0ReasonCodeSummary = function (output, context) {
2129
2491
  return {
2130
2492
  name: __expectString(output.name),
2131
2493
  value: __limitedParseDouble(output.value),
2132
2494
  };
2133
2495
  };
2134
- const deserializeAws_json1_0RecommendationExportJob = (output, context) => {
2496
+ var deserializeAws_json1_0RecommendationExportJob = function (output, context) {
2135
2497
  return {
2136
2498
  creationTimestamp: output.creationTimestamp != null
2137
2499
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp)))
@@ -2146,10 +2508,10 @@ const deserializeAws_json1_0RecommendationExportJob = (output, context) => {
2146
2508
  status: __expectString(output.status),
2147
2509
  };
2148
2510
  };
2149
- const deserializeAws_json1_0RecommendationExportJobs = (output, context) => {
2150
- const retVal = (output || [])
2151
- .filter((e) => e != null)
2152
- .map((entry) => {
2511
+ var deserializeAws_json1_0RecommendationExportJobs = function (output, context) {
2512
+ var retVal = (output || [])
2513
+ .filter(function (e) { return e != null; })
2514
+ .map(function (entry) {
2153
2515
  if (entry === null) {
2154
2516
  return null;
2155
2517
  }
@@ -2157,10 +2519,10 @@ const deserializeAws_json1_0RecommendationExportJobs = (output, context) => {
2157
2519
  });
2158
2520
  return retVal;
2159
2521
  };
2160
- const deserializeAws_json1_0RecommendationOptions = (output, context) => {
2161
- const retVal = (output || [])
2162
- .filter((e) => e != null)
2163
- .map((entry) => {
2522
+ var deserializeAws_json1_0RecommendationOptions = function (output, context) {
2523
+ var retVal = (output || [])
2524
+ .filter(function (e) { return e != null; })
2525
+ .map(function (entry) {
2164
2526
  if (entry === null) {
2165
2527
  return null;
2166
2528
  }
@@ -2168,7 +2530,7 @@ const deserializeAws_json1_0RecommendationOptions = (output, context) => {
2168
2530
  });
2169
2531
  return retVal;
2170
2532
  };
2171
- const deserializeAws_json1_0RecommendationPreferencesDetail = (output, context) => {
2533
+ var deserializeAws_json1_0RecommendationPreferencesDetail = function (output, context) {
2172
2534
  return {
2173
2535
  enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics),
2174
2536
  inferredWorkloadTypes: __expectString(output.inferredWorkloadTypes),
@@ -2176,10 +2538,10 @@ const deserializeAws_json1_0RecommendationPreferencesDetail = (output, context)
2176
2538
  scope: output.scope != null ? deserializeAws_json1_0Scope(output.scope, context) : undefined,
2177
2539
  };
2178
2540
  };
2179
- const deserializeAws_json1_0RecommendationPreferencesDetails = (output, context) => {
2180
- const retVal = (output || [])
2181
- .filter((e) => e != null)
2182
- .map((entry) => {
2541
+ var deserializeAws_json1_0RecommendationPreferencesDetails = function (output, context) {
2542
+ var retVal = (output || [])
2543
+ .filter(function (e) { return e != null; })
2544
+ .map(function (entry) {
2183
2545
  if (entry === null) {
2184
2546
  return null;
2185
2547
  }
@@ -2187,16 +2549,16 @@ const deserializeAws_json1_0RecommendationPreferencesDetails = (output, context)
2187
2549
  });
2188
2550
  return retVal;
2189
2551
  };
2190
- const deserializeAws_json1_0RecommendationSource = (output, context) => {
2552
+ var deserializeAws_json1_0RecommendationSource = function (output, context) {
2191
2553
  return {
2192
2554
  recommendationSourceArn: __expectString(output.recommendationSourceArn),
2193
2555
  recommendationSourceType: __expectString(output.recommendationSourceType),
2194
2556
  };
2195
2557
  };
2196
- const deserializeAws_json1_0RecommendationSources = (output, context) => {
2197
- const retVal = (output || [])
2198
- .filter((e) => e != null)
2199
- .map((entry) => {
2558
+ var deserializeAws_json1_0RecommendationSources = function (output, context) {
2559
+ var retVal = (output || [])
2560
+ .filter(function (e) { return e != null; })
2561
+ .map(function (entry) {
2200
2562
  if (entry === null) {
2201
2563
  return null;
2202
2564
  }
@@ -2204,10 +2566,10 @@ const deserializeAws_json1_0RecommendationSources = (output, context) => {
2204
2566
  });
2205
2567
  return retVal;
2206
2568
  };
2207
- const deserializeAws_json1_0RecommendationSummaries = (output, context) => {
2208
- const retVal = (output || [])
2209
- .filter((e) => e != null)
2210
- .map((entry) => {
2569
+ var deserializeAws_json1_0RecommendationSummaries = function (output, context) {
2570
+ var retVal = (output || [])
2571
+ .filter(function (e) { return e != null; })
2572
+ .map(function (entry) {
2211
2573
  if (entry === null) {
2212
2574
  return null;
2213
2575
  }
@@ -2215,7 +2577,7 @@ const deserializeAws_json1_0RecommendationSummaries = (output, context) => {
2215
2577
  });
2216
2578
  return retVal;
2217
2579
  };
2218
- const deserializeAws_json1_0RecommendationSummary = (output, context) => {
2580
+ var deserializeAws_json1_0RecommendationSummary = function (output, context) {
2219
2581
  return {
2220
2582
  accountId: __expectString(output.accountId),
2221
2583
  currentPerformanceRiskRatings: output.currentPerformanceRiskRatings != null
@@ -2228,7 +2590,7 @@ const deserializeAws_json1_0RecommendationSummary = (output, context) => {
2228
2590
  summaries: output.summaries != null ? deserializeAws_json1_0Summaries(output.summaries, context) : undefined,
2229
2591
  };
2230
2592
  };
2231
- const deserializeAws_json1_0RecommendedOptionProjectedMetric = (output, context) => {
2593
+ var deserializeAws_json1_0RecommendedOptionProjectedMetric = function (output, context) {
2232
2594
  return {
2233
2595
  projectedMetrics: output.projectedMetrics != null
2234
2596
  ? deserializeAws_json1_0ProjectedMetrics(output.projectedMetrics, context)
@@ -2237,10 +2599,10 @@ const deserializeAws_json1_0RecommendedOptionProjectedMetric = (output, context)
2237
2599
  recommendedInstanceType: __expectString(output.recommendedInstanceType),
2238
2600
  };
2239
2601
  };
2240
- const deserializeAws_json1_0RecommendedOptionProjectedMetrics = (output, context) => {
2241
- const retVal = (output || [])
2242
- .filter((e) => e != null)
2243
- .map((entry) => {
2602
+ var deserializeAws_json1_0RecommendedOptionProjectedMetrics = function (output, context) {
2603
+ var retVal = (output || [])
2604
+ .filter(function (e) { return e != null; })
2605
+ .map(function (entry) {
2244
2606
  if (entry === null) {
2245
2607
  return null;
2246
2608
  }
@@ -2248,19 +2610,19 @@ const deserializeAws_json1_0RecommendedOptionProjectedMetrics = (output, context
2248
2610
  });
2249
2611
  return retVal;
2250
2612
  };
2251
- const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
2613
+ var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
2252
2614
  return {
2253
2615
  message: __expectString(output.message),
2254
2616
  };
2255
2617
  };
2256
- const deserializeAws_json1_0S3Destination = (output, context) => {
2618
+ var deserializeAws_json1_0S3Destination = function (output, context) {
2257
2619
  return {
2258
2620
  bucket: __expectString(output.bucket),
2259
2621
  key: __expectString(output.key),
2260
2622
  metadataKey: __expectString(output.metadataKey),
2261
2623
  };
2262
2624
  };
2263
- const deserializeAws_json1_0SavingsOpportunity = (output, context) => {
2625
+ var deserializeAws_json1_0SavingsOpportunity = function (output, context) {
2264
2626
  return {
2265
2627
  estimatedMonthlySavings: output.estimatedMonthlySavings != null
2266
2628
  ? deserializeAws_json1_0EstimatedMonthlySavings(output.estimatedMonthlySavings, context)
@@ -2268,21 +2630,21 @@ const deserializeAws_json1_0SavingsOpportunity = (output, context) => {
2268
2630
  savingsOpportunityPercentage: __limitedParseDouble(output.savingsOpportunityPercentage),
2269
2631
  };
2270
2632
  };
2271
- const deserializeAws_json1_0Scope = (output, context) => {
2633
+ var deserializeAws_json1_0Scope = function (output, context) {
2272
2634
  return {
2273
2635
  name: __expectString(output.name),
2274
2636
  value: __expectString(output.value),
2275
2637
  };
2276
2638
  };
2277
- const deserializeAws_json1_0ServiceUnavailableException = (output, context) => {
2639
+ var deserializeAws_json1_0ServiceUnavailableException = function (output, context) {
2278
2640
  return {
2279
2641
  message: __expectString(output.message),
2280
2642
  };
2281
2643
  };
2282
- const deserializeAws_json1_0Summaries = (output, context) => {
2283
- const retVal = (output || [])
2284
- .filter((e) => e != null)
2285
- .map((entry) => {
2644
+ var deserializeAws_json1_0Summaries = function (output, context) {
2645
+ var retVal = (output || [])
2646
+ .filter(function (e) { return e != null; })
2647
+ .map(function (entry) {
2286
2648
  if (entry === null) {
2287
2649
  return null;
2288
2650
  }
@@ -2290,7 +2652,7 @@ const deserializeAws_json1_0Summaries = (output, context) => {
2290
2652
  });
2291
2653
  return retVal;
2292
2654
  };
2293
- const deserializeAws_json1_0Summary = (output, context) => {
2655
+ var deserializeAws_json1_0Summary = function (output, context) {
2294
2656
  return {
2295
2657
  name: __expectString(output.name),
2296
2658
  reasonCodeSummaries: output.reasonCodeSummaries != null
@@ -2299,15 +2661,15 @@ const deserializeAws_json1_0Summary = (output, context) => {
2299
2661
  value: __limitedParseDouble(output.value),
2300
2662
  };
2301
2663
  };
2302
- const deserializeAws_json1_0ThrottlingException = (output, context) => {
2664
+ var deserializeAws_json1_0ThrottlingException = function (output, context) {
2303
2665
  return {
2304
2666
  message: __expectString(output.message),
2305
2667
  };
2306
2668
  };
2307
- const deserializeAws_json1_0Timestamps = (output, context) => {
2308
- const retVal = (output || [])
2309
- .filter((e) => e != null)
2310
- .map((entry) => {
2669
+ var deserializeAws_json1_0Timestamps = function (output, context) {
2670
+ var retVal = (output || [])
2671
+ .filter(function (e) { return e != null; })
2672
+ .map(function (entry) {
2311
2673
  if (entry === null) {
2312
2674
  return null;
2313
2675
  }
@@ -2315,23 +2677,23 @@ const deserializeAws_json1_0Timestamps = (output, context) => {
2315
2677
  });
2316
2678
  return retVal;
2317
2679
  };
2318
- const deserializeAws_json1_0UpdateEnrollmentStatusResponse = (output, context) => {
2680
+ var deserializeAws_json1_0UpdateEnrollmentStatusResponse = function (output, context) {
2319
2681
  return {
2320
2682
  status: __expectString(output.status),
2321
2683
  statusReason: __expectString(output.statusReason),
2322
2684
  };
2323
2685
  };
2324
- const deserializeAws_json1_0UtilizationMetric = (output, context) => {
2686
+ var deserializeAws_json1_0UtilizationMetric = function (output, context) {
2325
2687
  return {
2326
2688
  name: __expectString(output.name),
2327
2689
  statistic: __expectString(output.statistic),
2328
2690
  value: __limitedParseDouble(output.value),
2329
2691
  };
2330
2692
  };
2331
- const deserializeAws_json1_0UtilizationMetrics = (output, context) => {
2332
- const retVal = (output || [])
2333
- .filter((e) => e != null)
2334
- .map((entry) => {
2693
+ var deserializeAws_json1_0UtilizationMetrics = function (output, context) {
2694
+ var retVal = (output || [])
2695
+ .filter(function (e) { return e != null; })
2696
+ .map(function (entry) {
2335
2697
  if (entry === null) {
2336
2698
  return null;
2337
2699
  }
@@ -2339,7 +2701,7 @@ const deserializeAws_json1_0UtilizationMetrics = (output, context) => {
2339
2701
  });
2340
2702
  return retVal;
2341
2703
  };
2342
- const deserializeAws_json1_0VolumeConfiguration = (output, context) => {
2704
+ var deserializeAws_json1_0VolumeConfiguration = function (output, context) {
2343
2705
  return {
2344
2706
  volumeBaselineIOPS: __expectInt32(output.volumeBaselineIOPS),
2345
2707
  volumeBaselineThroughput: __expectInt32(output.volumeBaselineThroughput),
@@ -2349,7 +2711,7 @@ const deserializeAws_json1_0VolumeConfiguration = (output, context) => {
2349
2711
  volumeType: __expectString(output.volumeType),
2350
2712
  };
2351
2713
  };
2352
- const deserializeAws_json1_0VolumeRecommendation = (output, context) => {
2714
+ var deserializeAws_json1_0VolumeRecommendation = function (output, context) {
2353
2715
  return {
2354
2716
  accountId: __expectString(output.accountId),
2355
2717
  currentConfiguration: output.currentConfiguration != null
@@ -2370,7 +2732,7 @@ const deserializeAws_json1_0VolumeRecommendation = (output, context) => {
2370
2732
  : undefined,
2371
2733
  };
2372
2734
  };
2373
- const deserializeAws_json1_0VolumeRecommendationOption = (output, context) => {
2735
+ var deserializeAws_json1_0VolumeRecommendationOption = function (output, context) {
2374
2736
  return {
2375
2737
  configuration: output.configuration != null
2376
2738
  ? deserializeAws_json1_0VolumeConfiguration(output.configuration, context)
@@ -2382,10 +2744,10 @@ const deserializeAws_json1_0VolumeRecommendationOption = (output, context) => {
2382
2744
  : undefined,
2383
2745
  };
2384
2746
  };
2385
- const deserializeAws_json1_0VolumeRecommendationOptions = (output, context) => {
2386
- const retVal = (output || [])
2387
- .filter((e) => e != null)
2388
- .map((entry) => {
2747
+ var deserializeAws_json1_0VolumeRecommendationOptions = function (output, context) {
2748
+ var retVal = (output || [])
2749
+ .filter(function (e) { return e != null; })
2750
+ .map(function (entry) {
2389
2751
  if (entry === null) {
2390
2752
  return null;
2391
2753
  }
@@ -2393,10 +2755,10 @@ const deserializeAws_json1_0VolumeRecommendationOptions = (output, context) => {
2393
2755
  });
2394
2756
  return retVal;
2395
2757
  };
2396
- const deserializeAws_json1_0VolumeRecommendations = (output, context) => {
2397
- const retVal = (output || [])
2398
- .filter((e) => e != null)
2399
- .map((entry) => {
2758
+ var deserializeAws_json1_0VolumeRecommendations = function (output, context) {
2759
+ var retVal = (output || [])
2760
+ .filter(function (e) { return e != null; })
2761
+ .map(function (entry) {
2400
2762
  if (entry === null) {
2401
2763
  return null;
2402
2764
  }
@@ -2404,52 +2766,75 @@ const deserializeAws_json1_0VolumeRecommendations = (output, context) => {
2404
2766
  });
2405
2767
  return retVal;
2406
2768
  };
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) => {
2769
+ var deserializeMetadata = function (output) {
2770
+ var _a, _b;
2771
+ return ({
2772
+ httpStatusCode: output.statusCode,
2773
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-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(); }
2414
2780
  if (streamBody instanceof Uint8Array) {
2415
2781
  return Promise.resolve(streamBody);
2416
2782
  }
2417
2783
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2418
2784
  };
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);
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
+ });
2437
2820
  };
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;
2821
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2822
+ var value;
2823
+ var _a;
2824
+ return __generator(this, function (_b) {
2825
+ switch (_b.label) {
2826
+ case 0: return [4, parseBody(errorBody, context)];
2827
+ case 1:
2828
+ value = _b.sent();
2829
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2830
+ return [2, value];
2831
+ }
2832
+ });
2833
+ }); };
2834
+ var loadRestJsonErrorCode = function (output, data) {
2835
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2836
+ var sanitizeErrorCode = function (rawValue) {
2837
+ var cleanValue = rawValue;
2453
2838
  if (typeof cleanValue === "number") {
2454
2839
  cleanValue = cleanValue.toString();
2455
2840
  }
@@ -2464,7 +2849,7 @@ const loadRestJsonErrorCode = (output, data) => {
2464
2849
  }
2465
2850
  return cleanValue;
2466
2851
  };
2467
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2852
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
2468
2853
  if (headerKey !== undefined) {
2469
2854
  return sanitizeErrorCode(output.headers[headerKey]);
2470
2855
  }