@aws-sdk/client-compute-optimizer 3.312.0 → 3.315.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.
@@ -8,70 +8,70 @@ const models_0_1 = require("../models/models_0");
8
8
  const se_DeleteRecommendationPreferencesCommand = async (input, context) => {
9
9
  const headers = sharedHeaders("DeleteRecommendationPreferences");
10
10
  let body;
11
- body = JSON.stringify(se_DeleteRecommendationPreferencesRequest(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
12
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
13
  };
14
14
  exports.se_DeleteRecommendationPreferencesCommand = se_DeleteRecommendationPreferencesCommand;
15
15
  const se_DescribeRecommendationExportJobsCommand = async (input, context) => {
16
16
  const headers = sharedHeaders("DescribeRecommendationExportJobs");
17
17
  let body;
18
- body = JSON.stringify(se_DescribeRecommendationExportJobsRequest(input, context));
18
+ body = JSON.stringify((0, smithy_client_1._json)(input));
19
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
20
20
  };
21
21
  exports.se_DescribeRecommendationExportJobsCommand = se_DescribeRecommendationExportJobsCommand;
22
22
  const se_ExportAutoScalingGroupRecommendationsCommand = async (input, context) => {
23
23
  const headers = sharedHeaders("ExportAutoScalingGroupRecommendations");
24
24
  let body;
25
- body = JSON.stringify(se_ExportAutoScalingGroupRecommendationsRequest(input, context));
25
+ body = JSON.stringify((0, smithy_client_1._json)(input));
26
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
27
  };
28
28
  exports.se_ExportAutoScalingGroupRecommendationsCommand = se_ExportAutoScalingGroupRecommendationsCommand;
29
29
  const se_ExportEBSVolumeRecommendationsCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("ExportEBSVolumeRecommendations");
31
31
  let body;
32
- body = JSON.stringify(se_ExportEBSVolumeRecommendationsRequest(input, context));
32
+ body = JSON.stringify((0, smithy_client_1._json)(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  exports.se_ExportEBSVolumeRecommendationsCommand = se_ExportEBSVolumeRecommendationsCommand;
36
36
  const se_ExportEC2InstanceRecommendationsCommand = async (input, context) => {
37
37
  const headers = sharedHeaders("ExportEC2InstanceRecommendations");
38
38
  let body;
39
- body = JSON.stringify(se_ExportEC2InstanceRecommendationsRequest(input, context));
39
+ body = JSON.stringify((0, smithy_client_1._json)(input));
40
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
41
  };
42
42
  exports.se_ExportEC2InstanceRecommendationsCommand = se_ExportEC2InstanceRecommendationsCommand;
43
43
  const se_ExportECSServiceRecommendationsCommand = async (input, context) => {
44
44
  const headers = sharedHeaders("ExportECSServiceRecommendations");
45
45
  let body;
46
- body = JSON.stringify(se_ExportECSServiceRecommendationsRequest(input, context));
46
+ body = JSON.stringify((0, smithy_client_1._json)(input));
47
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
48
  };
49
49
  exports.se_ExportECSServiceRecommendationsCommand = se_ExportECSServiceRecommendationsCommand;
50
50
  const se_ExportLambdaFunctionRecommendationsCommand = async (input, context) => {
51
51
  const headers = sharedHeaders("ExportLambdaFunctionRecommendations");
52
52
  let body;
53
- body = JSON.stringify(se_ExportLambdaFunctionRecommendationsRequest(input, context));
53
+ body = JSON.stringify((0, smithy_client_1._json)(input));
54
54
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
55
55
  };
56
56
  exports.se_ExportLambdaFunctionRecommendationsCommand = se_ExportLambdaFunctionRecommendationsCommand;
57
57
  const se_GetAutoScalingGroupRecommendationsCommand = async (input, context) => {
58
58
  const headers = sharedHeaders("GetAutoScalingGroupRecommendations");
59
59
  let body;
60
- body = JSON.stringify(se_GetAutoScalingGroupRecommendationsRequest(input, context));
60
+ body = JSON.stringify((0, smithy_client_1._json)(input));
61
61
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
62
62
  };
63
63
  exports.se_GetAutoScalingGroupRecommendationsCommand = se_GetAutoScalingGroupRecommendationsCommand;
64
64
  const se_GetEBSVolumeRecommendationsCommand = async (input, context) => {
65
65
  const headers = sharedHeaders("GetEBSVolumeRecommendations");
66
66
  let body;
67
- body = JSON.stringify(se_GetEBSVolumeRecommendationsRequest(input, context));
67
+ body = JSON.stringify((0, smithy_client_1._json)(input));
68
68
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
69
69
  };
70
70
  exports.se_GetEBSVolumeRecommendationsCommand = se_GetEBSVolumeRecommendationsCommand;
71
71
  const se_GetEC2InstanceRecommendationsCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("GetEC2InstanceRecommendations");
73
73
  let body;
74
- body = JSON.stringify(se_GetEC2InstanceRecommendationsRequest(input, context));
74
+ body = JSON.stringify((0, smithy_client_1._json)(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  exports.se_GetEC2InstanceRecommendationsCommand = se_GetEC2InstanceRecommendationsCommand;
@@ -92,63 +92,63 @@ exports.se_GetECSServiceRecommendationProjectedMetricsCommand = se_GetECSService
92
92
  const se_GetECSServiceRecommendationsCommand = async (input, context) => {
93
93
  const headers = sharedHeaders("GetECSServiceRecommendations");
94
94
  let body;
95
- body = JSON.stringify(se_GetECSServiceRecommendationsRequest(input, context));
95
+ body = JSON.stringify((0, smithy_client_1._json)(input));
96
96
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
97
  };
98
98
  exports.se_GetECSServiceRecommendationsCommand = se_GetECSServiceRecommendationsCommand;
99
99
  const se_GetEffectiveRecommendationPreferencesCommand = async (input, context) => {
100
100
  const headers = sharedHeaders("GetEffectiveRecommendationPreferences");
101
101
  let body;
102
- body = JSON.stringify(se_GetEffectiveRecommendationPreferencesRequest(input, context));
102
+ body = JSON.stringify((0, smithy_client_1._json)(input));
103
103
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
104
  };
105
105
  exports.se_GetEffectiveRecommendationPreferencesCommand = se_GetEffectiveRecommendationPreferencesCommand;
106
106
  const se_GetEnrollmentStatusCommand = async (input, context) => {
107
107
  const headers = sharedHeaders("GetEnrollmentStatus");
108
108
  let body;
109
- body = JSON.stringify(se_GetEnrollmentStatusRequest(input, context));
109
+ body = JSON.stringify((0, smithy_client_1._json)(input));
110
110
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
111
111
  };
112
112
  exports.se_GetEnrollmentStatusCommand = se_GetEnrollmentStatusCommand;
113
113
  const se_GetEnrollmentStatusesForOrganizationCommand = async (input, context) => {
114
114
  const headers = sharedHeaders("GetEnrollmentStatusesForOrganization");
115
115
  let body;
116
- body = JSON.stringify(se_GetEnrollmentStatusesForOrganizationRequest(input, context));
116
+ body = JSON.stringify((0, smithy_client_1._json)(input));
117
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
118
  };
119
119
  exports.se_GetEnrollmentStatusesForOrganizationCommand = se_GetEnrollmentStatusesForOrganizationCommand;
120
120
  const se_GetLambdaFunctionRecommendationsCommand = async (input, context) => {
121
121
  const headers = sharedHeaders("GetLambdaFunctionRecommendations");
122
122
  let body;
123
- body = JSON.stringify(se_GetLambdaFunctionRecommendationsRequest(input, context));
123
+ body = JSON.stringify((0, smithy_client_1._json)(input));
124
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
125
  };
126
126
  exports.se_GetLambdaFunctionRecommendationsCommand = se_GetLambdaFunctionRecommendationsCommand;
127
127
  const se_GetRecommendationPreferencesCommand = async (input, context) => {
128
128
  const headers = sharedHeaders("GetRecommendationPreferences");
129
129
  let body;
130
- body = JSON.stringify(se_GetRecommendationPreferencesRequest(input, context));
130
+ body = JSON.stringify((0, smithy_client_1._json)(input));
131
131
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
132
132
  };
133
133
  exports.se_GetRecommendationPreferencesCommand = se_GetRecommendationPreferencesCommand;
134
134
  const se_GetRecommendationSummariesCommand = async (input, context) => {
135
135
  const headers = sharedHeaders("GetRecommendationSummaries");
136
136
  let body;
137
- body = JSON.stringify(se_GetRecommendationSummariesRequest(input, context));
137
+ body = JSON.stringify((0, smithy_client_1._json)(input));
138
138
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
139
  };
140
140
  exports.se_GetRecommendationSummariesCommand = se_GetRecommendationSummariesCommand;
141
141
  const se_PutRecommendationPreferencesCommand = async (input, context) => {
142
142
  const headers = sharedHeaders("PutRecommendationPreferences");
143
143
  let body;
144
- body = JSON.stringify(se_PutRecommendationPreferencesRequest(input, context));
144
+ body = JSON.stringify((0, smithy_client_1._json)(input));
145
145
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
146
146
  };
147
147
  exports.se_PutRecommendationPreferencesCommand = se_PutRecommendationPreferencesCommand;
148
148
  const se_UpdateEnrollmentStatusCommand = async (input, context) => {
149
149
  const headers = sharedHeaders("UpdateEnrollmentStatus");
150
150
  let body;
151
- body = JSON.stringify(se_UpdateEnrollmentStatusRequest(input, context));
151
+ body = JSON.stringify((0, smithy_client_1._json)(input));
152
152
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
153
153
  };
154
154
  exports.se_UpdateEnrollmentStatusCommand = se_UpdateEnrollmentStatusCommand;
@@ -158,12 +158,12 @@ const de_DeleteRecommendationPreferencesCommand = async (output, context) => {
158
158
  }
159
159
  const data = await parseBody(output.body, context);
160
160
  let contents = {};
161
- contents = de_DeleteRecommendationPreferencesResponse(data, context);
161
+ contents = (0, smithy_client_1._json)(data);
162
162
  const response = {
163
163
  $metadata: deserializeMetadata(output),
164
164
  ...contents,
165
165
  };
166
- return Promise.resolve(response);
166
+ return response;
167
167
  };
168
168
  exports.de_DeleteRecommendationPreferencesCommand = de_DeleteRecommendationPreferencesCommand;
169
169
  const de_DeleteRecommendationPreferencesCommandError = async (output, context) => {
@@ -199,10 +199,9 @@ const de_DeleteRecommendationPreferencesCommandError = async (output, context) =
199
199
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
200
200
  default:
201
201
  const parsedBody = parsedOutput.body;
202
- (0, smithy_client_1.throwDefaultError)({
202
+ return throwDefaultError({
203
203
  output,
204
204
  parsedBody,
205
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
206
205
  errorCode,
207
206
  });
208
207
  }
@@ -218,7 +217,7 @@ const de_DescribeRecommendationExportJobsCommand = async (output, context) => {
218
217
  $metadata: deserializeMetadata(output),
219
218
  ...contents,
220
219
  };
221
- return Promise.resolve(response);
220
+ return response;
222
221
  };
223
222
  exports.de_DescribeRecommendationExportJobsCommand = de_DescribeRecommendationExportJobsCommand;
224
223
  const de_DescribeRecommendationExportJobsCommandError = async (output, context) => {
@@ -254,10 +253,9 @@ const de_DescribeRecommendationExportJobsCommandError = async (output, context)
254
253
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
255
254
  default:
256
255
  const parsedBody = parsedOutput.body;
257
- (0, smithy_client_1.throwDefaultError)({
256
+ return throwDefaultError({
258
257
  output,
259
258
  parsedBody,
260
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
261
259
  errorCode,
262
260
  });
263
261
  }
@@ -268,12 +266,12 @@ const de_ExportAutoScalingGroupRecommendationsCommand = async (output, context)
268
266
  }
269
267
  const data = await parseBody(output.body, context);
270
268
  let contents = {};
271
- contents = de_ExportAutoScalingGroupRecommendationsResponse(data, context);
269
+ contents = (0, smithy_client_1._json)(data);
272
270
  const response = {
273
271
  $metadata: deserializeMetadata(output),
274
272
  ...contents,
275
273
  };
276
- return Promise.resolve(response);
274
+ return response;
277
275
  };
278
276
  exports.de_ExportAutoScalingGroupRecommendationsCommand = de_ExportAutoScalingGroupRecommendationsCommand;
279
277
  const de_ExportAutoScalingGroupRecommendationsCommandError = async (output, context) => {
@@ -309,10 +307,9 @@ const de_ExportAutoScalingGroupRecommendationsCommandError = async (output, cont
309
307
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
310
308
  default:
311
309
  const parsedBody = parsedOutput.body;
312
- (0, smithy_client_1.throwDefaultError)({
310
+ return throwDefaultError({
313
311
  output,
314
312
  parsedBody,
315
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
316
313
  errorCode,
317
314
  });
318
315
  }
@@ -323,12 +320,12 @@ const de_ExportEBSVolumeRecommendationsCommand = async (output, context) => {
323
320
  }
324
321
  const data = await parseBody(output.body, context);
325
322
  let contents = {};
326
- contents = de_ExportEBSVolumeRecommendationsResponse(data, context);
323
+ contents = (0, smithy_client_1._json)(data);
327
324
  const response = {
328
325
  $metadata: deserializeMetadata(output),
329
326
  ...contents,
330
327
  };
331
- return Promise.resolve(response);
328
+ return response;
332
329
  };
333
330
  exports.de_ExportEBSVolumeRecommendationsCommand = de_ExportEBSVolumeRecommendationsCommand;
334
331
  const de_ExportEBSVolumeRecommendationsCommandError = async (output, context) => {
@@ -364,10 +361,9 @@ const de_ExportEBSVolumeRecommendationsCommandError = async (output, context) =>
364
361
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
365
362
  default:
366
363
  const parsedBody = parsedOutput.body;
367
- (0, smithy_client_1.throwDefaultError)({
364
+ return throwDefaultError({
368
365
  output,
369
366
  parsedBody,
370
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
371
367
  errorCode,
372
368
  });
373
369
  }
@@ -378,12 +374,12 @@ const de_ExportEC2InstanceRecommendationsCommand = async (output, context) => {
378
374
  }
379
375
  const data = await parseBody(output.body, context);
380
376
  let contents = {};
381
- contents = de_ExportEC2InstanceRecommendationsResponse(data, context);
377
+ contents = (0, smithy_client_1._json)(data);
382
378
  const response = {
383
379
  $metadata: deserializeMetadata(output),
384
380
  ...contents,
385
381
  };
386
- return Promise.resolve(response);
382
+ return response;
387
383
  };
388
384
  exports.de_ExportEC2InstanceRecommendationsCommand = de_ExportEC2InstanceRecommendationsCommand;
389
385
  const de_ExportEC2InstanceRecommendationsCommandError = async (output, context) => {
@@ -419,10 +415,9 @@ const de_ExportEC2InstanceRecommendationsCommandError = async (output, context)
419
415
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
420
416
  default:
421
417
  const parsedBody = parsedOutput.body;
422
- (0, smithy_client_1.throwDefaultError)({
418
+ return throwDefaultError({
423
419
  output,
424
420
  parsedBody,
425
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
426
421
  errorCode,
427
422
  });
428
423
  }
@@ -433,12 +428,12 @@ const de_ExportECSServiceRecommendationsCommand = async (output, context) => {
433
428
  }
434
429
  const data = await parseBody(output.body, context);
435
430
  let contents = {};
436
- contents = de_ExportECSServiceRecommendationsResponse(data, context);
431
+ contents = (0, smithy_client_1._json)(data);
437
432
  const response = {
438
433
  $metadata: deserializeMetadata(output),
439
434
  ...contents,
440
435
  };
441
- return Promise.resolve(response);
436
+ return response;
442
437
  };
443
438
  exports.de_ExportECSServiceRecommendationsCommand = de_ExportECSServiceRecommendationsCommand;
444
439
  const de_ExportECSServiceRecommendationsCommandError = async (output, context) => {
@@ -474,10 +469,9 @@ const de_ExportECSServiceRecommendationsCommandError = async (output, context) =
474
469
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
475
470
  default:
476
471
  const parsedBody = parsedOutput.body;
477
- (0, smithy_client_1.throwDefaultError)({
472
+ return throwDefaultError({
478
473
  output,
479
474
  parsedBody,
480
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
481
475
  errorCode,
482
476
  });
483
477
  }
@@ -488,12 +482,12 @@ const de_ExportLambdaFunctionRecommendationsCommand = async (output, context) =>
488
482
  }
489
483
  const data = await parseBody(output.body, context);
490
484
  let contents = {};
491
- contents = de_ExportLambdaFunctionRecommendationsResponse(data, context);
485
+ contents = (0, smithy_client_1._json)(data);
492
486
  const response = {
493
487
  $metadata: deserializeMetadata(output),
494
488
  ...contents,
495
489
  };
496
- return Promise.resolve(response);
490
+ return response;
497
491
  };
498
492
  exports.de_ExportLambdaFunctionRecommendationsCommand = de_ExportLambdaFunctionRecommendationsCommand;
499
493
  const de_ExportLambdaFunctionRecommendationsCommandError = async (output, context) => {
@@ -529,10 +523,9 @@ const de_ExportLambdaFunctionRecommendationsCommandError = async (output, contex
529
523
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
530
524
  default:
531
525
  const parsedBody = parsedOutput.body;
532
- (0, smithy_client_1.throwDefaultError)({
526
+ return throwDefaultError({
533
527
  output,
534
528
  parsedBody,
535
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
536
529
  errorCode,
537
530
  });
538
531
  }
@@ -548,7 +541,7 @@ const de_GetAutoScalingGroupRecommendationsCommand = async (output, context) =>
548
541
  $metadata: deserializeMetadata(output),
549
542
  ...contents,
550
543
  };
551
- return Promise.resolve(response);
544
+ return response;
552
545
  };
553
546
  exports.de_GetAutoScalingGroupRecommendationsCommand = de_GetAutoScalingGroupRecommendationsCommand;
554
547
  const de_GetAutoScalingGroupRecommendationsCommandError = async (output, context) => {
@@ -584,10 +577,9 @@ const de_GetAutoScalingGroupRecommendationsCommandError = async (output, context
584
577
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
585
578
  default:
586
579
  const parsedBody = parsedOutput.body;
587
- (0, smithy_client_1.throwDefaultError)({
580
+ return throwDefaultError({
588
581
  output,
589
582
  parsedBody,
590
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
591
583
  errorCode,
592
584
  });
593
585
  }
@@ -603,7 +595,7 @@ const de_GetEBSVolumeRecommendationsCommand = async (output, context) => {
603
595
  $metadata: deserializeMetadata(output),
604
596
  ...contents,
605
597
  };
606
- return Promise.resolve(response);
598
+ return response;
607
599
  };
608
600
  exports.de_GetEBSVolumeRecommendationsCommand = de_GetEBSVolumeRecommendationsCommand;
609
601
  const de_GetEBSVolumeRecommendationsCommandError = async (output, context) => {
@@ -639,10 +631,9 @@ const de_GetEBSVolumeRecommendationsCommandError = async (output, context) => {
639
631
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
640
632
  default:
641
633
  const parsedBody = parsedOutput.body;
642
- (0, smithy_client_1.throwDefaultError)({
634
+ return throwDefaultError({
643
635
  output,
644
636
  parsedBody,
645
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
646
637
  errorCode,
647
638
  });
648
639
  }
@@ -658,7 +649,7 @@ const de_GetEC2InstanceRecommendationsCommand = async (output, context) => {
658
649
  $metadata: deserializeMetadata(output),
659
650
  ...contents,
660
651
  };
661
- return Promise.resolve(response);
652
+ return response;
662
653
  };
663
654
  exports.de_GetEC2InstanceRecommendationsCommand = de_GetEC2InstanceRecommendationsCommand;
664
655
  const de_GetEC2InstanceRecommendationsCommandError = async (output, context) => {
@@ -694,10 +685,9 @@ const de_GetEC2InstanceRecommendationsCommandError = async (output, context) =>
694
685
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
695
686
  default:
696
687
  const parsedBody = parsedOutput.body;
697
- (0, smithy_client_1.throwDefaultError)({
688
+ return throwDefaultError({
698
689
  output,
699
690
  parsedBody,
700
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
701
691
  errorCode,
702
692
  });
703
693
  }
@@ -713,7 +703,7 @@ const de_GetEC2RecommendationProjectedMetricsCommand = async (output, context) =
713
703
  $metadata: deserializeMetadata(output),
714
704
  ...contents,
715
705
  };
716
- return Promise.resolve(response);
706
+ return response;
717
707
  };
718
708
  exports.de_GetEC2RecommendationProjectedMetricsCommand = de_GetEC2RecommendationProjectedMetricsCommand;
719
709
  const de_GetEC2RecommendationProjectedMetricsCommandError = async (output, context) => {
@@ -749,10 +739,9 @@ const de_GetEC2RecommendationProjectedMetricsCommandError = async (output, conte
749
739
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
750
740
  default:
751
741
  const parsedBody = parsedOutput.body;
752
- (0, smithy_client_1.throwDefaultError)({
742
+ return throwDefaultError({
753
743
  output,
754
744
  parsedBody,
755
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
756
745
  errorCode,
757
746
  });
758
747
  }
@@ -768,7 +757,7 @@ const de_GetECSServiceRecommendationProjectedMetricsCommand = async (output, con
768
757
  $metadata: deserializeMetadata(output),
769
758
  ...contents,
770
759
  };
771
- return Promise.resolve(response);
760
+ return response;
772
761
  };
773
762
  exports.de_GetECSServiceRecommendationProjectedMetricsCommand = de_GetECSServiceRecommendationProjectedMetricsCommand;
774
763
  const de_GetECSServiceRecommendationProjectedMetricsCommandError = async (output, context) => {
@@ -804,10 +793,9 @@ const de_GetECSServiceRecommendationProjectedMetricsCommandError = async (output
804
793
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
805
794
  default:
806
795
  const parsedBody = parsedOutput.body;
807
- (0, smithy_client_1.throwDefaultError)({
796
+ return throwDefaultError({
808
797
  output,
809
798
  parsedBody,
810
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
811
799
  errorCode,
812
800
  });
813
801
  }
@@ -823,7 +811,7 @@ const de_GetECSServiceRecommendationsCommand = async (output, context) => {
823
811
  $metadata: deserializeMetadata(output),
824
812
  ...contents,
825
813
  };
826
- return Promise.resolve(response);
814
+ return response;
827
815
  };
828
816
  exports.de_GetECSServiceRecommendationsCommand = de_GetECSServiceRecommendationsCommand;
829
817
  const de_GetECSServiceRecommendationsCommandError = async (output, context) => {
@@ -859,10 +847,9 @@ const de_GetECSServiceRecommendationsCommandError = async (output, context) => {
859
847
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
860
848
  default:
861
849
  const parsedBody = parsedOutput.body;
862
- (0, smithy_client_1.throwDefaultError)({
850
+ return throwDefaultError({
863
851
  output,
864
852
  parsedBody,
865
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
866
853
  errorCode,
867
854
  });
868
855
  }
@@ -873,12 +860,12 @@ const de_GetEffectiveRecommendationPreferencesCommand = async (output, context)
873
860
  }
874
861
  const data = await parseBody(output.body, context);
875
862
  let contents = {};
876
- contents = de_GetEffectiveRecommendationPreferencesResponse(data, context);
863
+ contents = (0, smithy_client_1._json)(data);
877
864
  const response = {
878
865
  $metadata: deserializeMetadata(output),
879
866
  ...contents,
880
867
  };
881
- return Promise.resolve(response);
868
+ return response;
882
869
  };
883
870
  exports.de_GetEffectiveRecommendationPreferencesCommand = de_GetEffectiveRecommendationPreferencesCommand;
884
871
  const de_GetEffectiveRecommendationPreferencesCommandError = async (output, context) => {
@@ -914,10 +901,9 @@ const de_GetEffectiveRecommendationPreferencesCommandError = async (output, cont
914
901
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
915
902
  default:
916
903
  const parsedBody = parsedOutput.body;
917
- (0, smithy_client_1.throwDefaultError)({
904
+ return throwDefaultError({
918
905
  output,
919
906
  parsedBody,
920
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
921
907
  errorCode,
922
908
  });
923
909
  }
@@ -933,7 +919,7 @@ const de_GetEnrollmentStatusCommand = async (output, context) => {
933
919
  $metadata: deserializeMetadata(output),
934
920
  ...contents,
935
921
  };
936
- return Promise.resolve(response);
922
+ return response;
937
923
  };
938
924
  exports.de_GetEnrollmentStatusCommand = de_GetEnrollmentStatusCommand;
939
925
  const de_GetEnrollmentStatusCommandError = async (output, context) => {
@@ -963,10 +949,9 @@ const de_GetEnrollmentStatusCommandError = async (output, context) => {
963
949
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
964
950
  default:
965
951
  const parsedBody = parsedOutput.body;
966
- (0, smithy_client_1.throwDefaultError)({
952
+ return throwDefaultError({
967
953
  output,
968
954
  parsedBody,
969
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
970
955
  errorCode,
971
956
  });
972
957
  }
@@ -982,7 +967,7 @@ const de_GetEnrollmentStatusesForOrganizationCommand = async (output, context) =
982
967
  $metadata: deserializeMetadata(output),
983
968
  ...contents,
984
969
  };
985
- return Promise.resolve(response);
970
+ return response;
986
971
  };
987
972
  exports.de_GetEnrollmentStatusesForOrganizationCommand = de_GetEnrollmentStatusesForOrganizationCommand;
988
973
  const de_GetEnrollmentStatusesForOrganizationCommandError = async (output, context) => {
@@ -1012,10 +997,9 @@ const de_GetEnrollmentStatusesForOrganizationCommandError = async (output, conte
1012
997
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1013
998
  default:
1014
999
  const parsedBody = parsedOutput.body;
1015
- (0, smithy_client_1.throwDefaultError)({
1000
+ return throwDefaultError({
1016
1001
  output,
1017
1002
  parsedBody,
1018
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
1019
1003
  errorCode,
1020
1004
  });
1021
1005
  }
@@ -1031,7 +1015,7 @@ const de_GetLambdaFunctionRecommendationsCommand = async (output, context) => {
1031
1015
  $metadata: deserializeMetadata(output),
1032
1016
  ...contents,
1033
1017
  };
1034
- return Promise.resolve(response);
1018
+ return response;
1035
1019
  };
1036
1020
  exports.de_GetLambdaFunctionRecommendationsCommand = de_GetLambdaFunctionRecommendationsCommand;
1037
1021
  const de_GetLambdaFunctionRecommendationsCommandError = async (output, context) => {
@@ -1067,10 +1051,9 @@ const de_GetLambdaFunctionRecommendationsCommandError = async (output, context)
1067
1051
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1068
1052
  default:
1069
1053
  const parsedBody = parsedOutput.body;
1070
- (0, smithy_client_1.throwDefaultError)({
1054
+ return throwDefaultError({
1071
1055
  output,
1072
1056
  parsedBody,
1073
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
1074
1057
  errorCode,
1075
1058
  });
1076
1059
  }
@@ -1081,12 +1064,12 @@ const de_GetRecommendationPreferencesCommand = async (output, context) => {
1081
1064
  }
1082
1065
  const data = await parseBody(output.body, context);
1083
1066
  let contents = {};
1084
- contents = de_GetRecommendationPreferencesResponse(data, context);
1067
+ contents = (0, smithy_client_1._json)(data);
1085
1068
  const response = {
1086
1069
  $metadata: deserializeMetadata(output),
1087
1070
  ...contents,
1088
1071
  };
1089
- return Promise.resolve(response);
1072
+ return response;
1090
1073
  };
1091
1074
  exports.de_GetRecommendationPreferencesCommand = de_GetRecommendationPreferencesCommand;
1092
1075
  const de_GetRecommendationPreferencesCommandError = async (output, context) => {
@@ -1122,10 +1105,9 @@ const de_GetRecommendationPreferencesCommandError = async (output, context) => {
1122
1105
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1123
1106
  default:
1124
1107
  const parsedBody = parsedOutput.body;
1125
- (0, smithy_client_1.throwDefaultError)({
1108
+ return throwDefaultError({
1126
1109
  output,
1127
1110
  parsedBody,
1128
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
1129
1111
  errorCode,
1130
1112
  });
1131
1113
  }
@@ -1141,7 +1123,7 @@ const de_GetRecommendationSummariesCommand = async (output, context) => {
1141
1123
  $metadata: deserializeMetadata(output),
1142
1124
  ...contents,
1143
1125
  };
1144
- return Promise.resolve(response);
1126
+ return response;
1145
1127
  };
1146
1128
  exports.de_GetRecommendationSummariesCommand = de_GetRecommendationSummariesCommand;
1147
1129
  const de_GetRecommendationSummariesCommandError = async (output, context) => {
@@ -1174,10 +1156,9 @@ const de_GetRecommendationSummariesCommandError = async (output, context) => {
1174
1156
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1175
1157
  default:
1176
1158
  const parsedBody = parsedOutput.body;
1177
- (0, smithy_client_1.throwDefaultError)({
1159
+ return throwDefaultError({
1178
1160
  output,
1179
1161
  parsedBody,
1180
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
1181
1162
  errorCode,
1182
1163
  });
1183
1164
  }
@@ -1188,12 +1169,12 @@ const de_PutRecommendationPreferencesCommand = async (output, context) => {
1188
1169
  }
1189
1170
  const data = await parseBody(output.body, context);
1190
1171
  let contents = {};
1191
- contents = de_PutRecommendationPreferencesResponse(data, context);
1172
+ contents = (0, smithy_client_1._json)(data);
1192
1173
  const response = {
1193
1174
  $metadata: deserializeMetadata(output),
1194
1175
  ...contents,
1195
1176
  };
1196
- return Promise.resolve(response);
1177
+ return response;
1197
1178
  };
1198
1179
  exports.de_PutRecommendationPreferencesCommand = de_PutRecommendationPreferencesCommand;
1199
1180
  const de_PutRecommendationPreferencesCommandError = async (output, context) => {
@@ -1229,10 +1210,9 @@ const de_PutRecommendationPreferencesCommandError = async (output, context) => {
1229
1210
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1230
1211
  default:
1231
1212
  const parsedBody = parsedOutput.body;
1232
- (0, smithy_client_1.throwDefaultError)({
1213
+ return throwDefaultError({
1233
1214
  output,
1234
1215
  parsedBody,
1235
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
1236
1216
  errorCode,
1237
1217
  });
1238
1218
  }
@@ -1243,12 +1223,12 @@ const de_UpdateEnrollmentStatusCommand = async (output, context) => {
1243
1223
  }
1244
1224
  const data = await parseBody(output.body, context);
1245
1225
  let contents = {};
1246
- contents = de_UpdateEnrollmentStatusResponse(data, context);
1226
+ contents = (0, smithy_client_1._json)(data);
1247
1227
  const response = {
1248
1228
  $metadata: deserializeMetadata(output),
1249
1229
  ...contents,
1250
1230
  };
1251
- return Promise.resolve(response);
1231
+ return response;
1252
1232
  };
1253
1233
  exports.de_UpdateEnrollmentStatusCommand = de_UpdateEnrollmentStatusCommand;
1254
1234
  const de_UpdateEnrollmentStatusCommandError = async (output, context) => {
@@ -1278,17 +1258,16 @@ const de_UpdateEnrollmentStatusCommandError = async (output, context) => {
1278
1258
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1279
1259
  default:
1280
1260
  const parsedBody = parsedOutput.body;
1281
- (0, smithy_client_1.throwDefaultError)({
1261
+ return throwDefaultError({
1282
1262
  output,
1283
1263
  parsedBody,
1284
- exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
1285
1264
  errorCode,
1286
1265
  });
1287
1266
  }
1288
1267
  };
1289
1268
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1290
1269
  const body = parsedOutput.body;
1291
- const deserialized = de_AccessDeniedException(body, context);
1270
+ const deserialized = (0, smithy_client_1._json)(body);
1292
1271
  const exception = new models_0_1.AccessDeniedException({
1293
1272
  $metadata: deserializeMetadata(parsedOutput),
1294
1273
  ...deserialized,
@@ -1297,7 +1276,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1297
1276
  };
1298
1277
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1299
1278
  const body = parsedOutput.body;
1300
- const deserialized = de_InternalServerException(body, context);
1279
+ const deserialized = (0, smithy_client_1._json)(body);
1301
1280
  const exception = new models_0_1.InternalServerException({
1302
1281
  $metadata: deserializeMetadata(parsedOutput),
1303
1282
  ...deserialized,
@@ -1306,7 +1285,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1306
1285
  };
1307
1286
  const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
1308
1287
  const body = parsedOutput.body;
1309
- const deserialized = de_InvalidParameterValueException(body, context);
1288
+ const deserialized = (0, smithy_client_1._json)(body);
1310
1289
  const exception = new models_0_1.InvalidParameterValueException({
1311
1290
  $metadata: deserializeMetadata(parsedOutput),
1312
1291
  ...deserialized,
@@ -1315,7 +1294,7 @@ const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
1315
1294
  };
1316
1295
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1317
1296
  const body = parsedOutput.body;
1318
- const deserialized = de_LimitExceededException(body, context);
1297
+ const deserialized = (0, smithy_client_1._json)(body);
1319
1298
  const exception = new models_0_1.LimitExceededException({
1320
1299
  $metadata: deserializeMetadata(parsedOutput),
1321
1300
  ...deserialized,
@@ -1324,7 +1303,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1324
1303
  };
1325
1304
  const de_MissingAuthenticationTokenRes = async (parsedOutput, context) => {
1326
1305
  const body = parsedOutput.body;
1327
- const deserialized = de_MissingAuthenticationToken(body, context);
1306
+ const deserialized = (0, smithy_client_1._json)(body);
1328
1307
  const exception = new models_0_1.MissingAuthenticationToken({
1329
1308
  $metadata: deserializeMetadata(parsedOutput),
1330
1309
  ...deserialized,
@@ -1333,7 +1312,7 @@ const de_MissingAuthenticationTokenRes = async (parsedOutput, context) => {
1333
1312
  };
1334
1313
  const de_OptInRequiredExceptionRes = async (parsedOutput, context) => {
1335
1314
  const body = parsedOutput.body;
1336
- const deserialized = de_OptInRequiredException(body, context);
1315
+ const deserialized = (0, smithy_client_1._json)(body);
1337
1316
  const exception = new models_0_1.OptInRequiredException({
1338
1317
  $metadata: deserializeMetadata(parsedOutput),
1339
1318
  ...deserialized,
@@ -1342,7 +1321,7 @@ const de_OptInRequiredExceptionRes = async (parsedOutput, context) => {
1342
1321
  };
1343
1322
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1344
1323
  const body = parsedOutput.body;
1345
- const deserialized = de_ResourceNotFoundException(body, context);
1324
+ const deserialized = (0, smithy_client_1._json)(body);
1346
1325
  const exception = new models_0_1.ResourceNotFoundException({
1347
1326
  $metadata: deserializeMetadata(parsedOutput),
1348
1327
  ...deserialized,
@@ -1351,7 +1330,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1351
1330
  };
1352
1331
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1353
1332
  const body = parsedOutput.body;
1354
- const deserialized = de_ServiceUnavailableException(body, context);
1333
+ const deserialized = (0, smithy_client_1._json)(body);
1355
1334
  const exception = new models_0_1.ServiceUnavailableException({
1356
1335
  $metadata: deserializeMetadata(parsedOutput),
1357
1336
  ...deserialized,
@@ -1360,511 +1339,78 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1360
1339
  };
1361
1340
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1362
1341
  const body = parsedOutput.body;
1363
- const deserialized = de_ThrottlingException(body, context);
1342
+ const deserialized = (0, smithy_client_1._json)(body);
1364
1343
  const exception = new models_0_1.ThrottlingException({
1365
1344
  $metadata: deserializeMetadata(parsedOutput),
1366
1345
  ...deserialized,
1367
1346
  });
1368
1347
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1369
1348
  };
1370
- const se_AccountIds = (input, context) => {
1371
- return input
1372
- .filter((e) => e != null)
1373
- .map((entry) => {
1374
- return entry;
1375
- });
1376
- };
1377
- const se_AutoScalingGroupArns = (input, context) => {
1378
- return input
1379
- .filter((e) => e != null)
1380
- .map((entry) => {
1381
- return entry;
1382
- });
1383
- };
1384
- const se_CpuVendorArchitectures = (input, context) => {
1385
- return input
1386
- .filter((e) => e != null)
1387
- .map((entry) => {
1388
- return entry;
1389
- });
1390
- };
1391
- const se_DeleteRecommendationPreferencesRequest = (input, context) => {
1392
- return {
1393
- ...(input.recommendationPreferenceNames != null && {
1394
- recommendationPreferenceNames: se_RecommendationPreferenceNames(input.recommendationPreferenceNames, context),
1395
- }),
1396
- ...(input.resourceType != null && { resourceType: input.resourceType }),
1397
- ...(input.scope != null && { scope: se_Scope(input.scope, context) }),
1398
- };
1399
- };
1400
- const se_DescribeRecommendationExportJobsRequest = (input, context) => {
1401
- return {
1402
- ...(input.filters != null && { filters: se_JobFilters(input.filters, context) }),
1403
- ...(input.jobIds != null && { jobIds: se_JobIds(input.jobIds, context) }),
1404
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1405
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1406
- };
1407
- };
1408
- const se_EBSFilter = (input, context) => {
1409
- return {
1410
- ...(input.name != null && { name: input.name }),
1411
- ...(input.values != null && { values: se_FilterValues(input.values, context) }),
1412
- };
1413
- };
1414
- const se_EBSFilters = (input, context) => {
1415
- return input
1416
- .filter((e) => e != null)
1417
- .map((entry) => {
1418
- return se_EBSFilter(entry, context);
1419
- });
1420
- };
1421
- const se_ECSServiceRecommendationFilter = (input, context) => {
1422
- return {
1423
- ...(input.name != null && { name: input.name }),
1424
- ...(input.values != null && { values: se_FilterValues(input.values, context) }),
1425
- };
1426
- };
1427
- const se_ECSServiceRecommendationFilters = (input, context) => {
1428
- return input
1429
- .filter((e) => e != null)
1430
- .map((entry) => {
1431
- return se_ECSServiceRecommendationFilter(entry, context);
1432
- });
1433
- };
1434
- const se_EnrollmentFilter = (input, context) => {
1435
- return {
1436
- ...(input.name != null && { name: input.name }),
1437
- ...(input.values != null && { values: se_FilterValues(input.values, context) }),
1438
- };
1439
- };
1440
- const se_EnrollmentFilters = (input, context) => {
1441
- return input
1442
- .filter((e) => e != null)
1443
- .map((entry) => {
1444
- return se_EnrollmentFilter(entry, context);
1445
- });
1446
- };
1447
- const se_ExportableAutoScalingGroupFields = (input, context) => {
1448
- return input
1449
- .filter((e) => e != null)
1450
- .map((entry) => {
1451
- return entry;
1452
- });
1453
- };
1454
- const se_ExportableECSServiceFields = (input, context) => {
1455
- return input
1456
- .filter((e) => e != null)
1457
- .map((entry) => {
1458
- return entry;
1459
- });
1460
- };
1461
- const se_ExportableInstanceFields = (input, context) => {
1462
- return input
1463
- .filter((e) => e != null)
1464
- .map((entry) => {
1465
- return entry;
1466
- });
1467
- };
1468
- const se_ExportableLambdaFunctionFields = (input, context) => {
1469
- return input
1470
- .filter((e) => e != null)
1471
- .map((entry) => {
1472
- return entry;
1473
- });
1474
- };
1475
- const se_ExportableVolumeFields = (input, context) => {
1476
- return input
1477
- .filter((e) => e != null)
1478
- .map((entry) => {
1479
- return entry;
1480
- });
1481
- };
1482
- const se_ExportAutoScalingGroupRecommendationsRequest = (input, context) => {
1483
- return {
1484
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1485
- ...(input.fieldsToExport != null && {
1486
- fieldsToExport: se_ExportableAutoScalingGroupFields(input.fieldsToExport, context),
1487
- }),
1488
- ...(input.fileFormat != null && { fileFormat: input.fileFormat }),
1489
- ...(input.filters != null && { filters: se_Filters(input.filters, context) }),
1490
- ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1491
- ...(input.recommendationPreferences != null && {
1492
- recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context),
1493
- }),
1494
- ...(input.s3DestinationConfig != null && {
1495
- s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context),
1496
- }),
1497
- };
1498
- };
1499
- const se_ExportEBSVolumeRecommendationsRequest = (input, context) => {
1500
- return {
1501
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1502
- ...(input.fieldsToExport != null && { fieldsToExport: se_ExportableVolumeFields(input.fieldsToExport, context) }),
1503
- ...(input.fileFormat != null && { fileFormat: input.fileFormat }),
1504
- ...(input.filters != null && { filters: se_EBSFilters(input.filters, context) }),
1505
- ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1506
- ...(input.s3DestinationConfig != null && {
1507
- s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context),
1508
- }),
1509
- };
1510
- };
1511
- const se_ExportEC2InstanceRecommendationsRequest = (input, context) => {
1512
- return {
1513
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1514
- ...(input.fieldsToExport != null && { fieldsToExport: se_ExportableInstanceFields(input.fieldsToExport, context) }),
1515
- ...(input.fileFormat != null && { fileFormat: input.fileFormat }),
1516
- ...(input.filters != null && { filters: se_Filters(input.filters, context) }),
1517
- ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1518
- ...(input.recommendationPreferences != null && {
1519
- recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context),
1520
- }),
1521
- ...(input.s3DestinationConfig != null && {
1522
- s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context),
1523
- }),
1524
- };
1525
- };
1526
- const se_ExportECSServiceRecommendationsRequest = (input, context) => {
1527
- return {
1528
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1529
- ...(input.fieldsToExport != null && {
1530
- fieldsToExport: se_ExportableECSServiceFields(input.fieldsToExport, context),
1531
- }),
1532
- ...(input.fileFormat != null && { fileFormat: input.fileFormat }),
1533
- ...(input.filters != null && { filters: se_ECSServiceRecommendationFilters(input.filters, context) }),
1534
- ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1535
- ...(input.s3DestinationConfig != null && {
1536
- s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context),
1537
- }),
1538
- };
1539
- };
1540
- const se_ExportLambdaFunctionRecommendationsRequest = (input, context) => {
1541
- return {
1542
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1543
- ...(input.fieldsToExport != null && {
1544
- fieldsToExport: se_ExportableLambdaFunctionFields(input.fieldsToExport, context),
1545
- }),
1546
- ...(input.fileFormat != null && { fileFormat: input.fileFormat }),
1547
- ...(input.filters != null && { filters: se_LambdaFunctionRecommendationFilters(input.filters, context) }),
1548
- ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1549
- ...(input.s3DestinationConfig != null && {
1550
- s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context),
1551
- }),
1552
- };
1553
- };
1554
- const se_ExternalMetricsPreference = (input, context) => {
1555
- return {
1556
- ...(input.source != null && { source: input.source }),
1557
- };
1558
- };
1559
- const se_Filter = (input, context) => {
1560
- return {
1561
- ...(input.name != null && { name: input.name }),
1562
- ...(input.values != null && { values: se_FilterValues(input.values, context) }),
1563
- };
1564
- };
1565
- const se_Filters = (input, context) => {
1566
- return input
1567
- .filter((e) => e != null)
1568
- .map((entry) => {
1569
- return se_Filter(entry, context);
1570
- });
1571
- };
1572
- const se_FilterValues = (input, context) => {
1573
- return input
1574
- .filter((e) => e != null)
1575
- .map((entry) => {
1576
- return entry;
1577
- });
1578
- };
1579
- const se_FunctionArns = (input, context) => {
1580
- return input
1581
- .filter((e) => e != null)
1582
- .map((entry) => {
1583
- return entry;
1584
- });
1585
- };
1586
- const se_GetAutoScalingGroupRecommendationsRequest = (input, context) => {
1587
- return {
1588
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1589
- ...(input.autoScalingGroupArns != null && {
1590
- autoScalingGroupArns: se_AutoScalingGroupArns(input.autoScalingGroupArns, context),
1591
- }),
1592
- ...(input.filters != null && { filters: se_Filters(input.filters, context) }),
1593
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1594
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1595
- ...(input.recommendationPreferences != null && {
1596
- recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context),
1597
- }),
1598
- };
1599
- };
1600
- const se_GetEBSVolumeRecommendationsRequest = (input, context) => {
1601
- return {
1602
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1603
- ...(input.filters != null && { filters: se_EBSFilters(input.filters, context) }),
1604
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1605
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1606
- ...(input.volumeArns != null && { volumeArns: se_VolumeArns(input.volumeArns, context) }),
1607
- };
1608
- };
1609
- const se_GetEC2InstanceRecommendationsRequest = (input, context) => {
1610
- return {
1611
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1612
- ...(input.filters != null && { filters: se_Filters(input.filters, context) }),
1613
- ...(input.instanceArns != null && { instanceArns: se_InstanceArns(input.instanceArns, context) }),
1614
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1615
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1616
- ...(input.recommendationPreferences != null && {
1617
- recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context),
1618
- }),
1619
- };
1620
- };
1621
1349
  const se_GetEC2RecommendationProjectedMetricsRequest = (input, context) => {
1622
- return {
1623
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
1624
- ...(input.instanceArn != null && { instanceArn: input.instanceArn }),
1625
- ...(input.period != null && { period: input.period }),
1626
- ...(input.recommendationPreferences != null && {
1627
- recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context),
1628
- }),
1629
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
1630
- ...(input.stat != null && { stat: input.stat }),
1631
- };
1632
- };
1633
- const se_GetECSServiceRecommendationProjectedMetricsRequest = (input, context) => {
1634
- return {
1635
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
1636
- ...(input.period != null && { period: input.period }),
1637
- ...(input.serviceArn != null && { serviceArn: input.serviceArn }),
1638
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
1639
- ...(input.stat != null && { stat: input.stat }),
1640
- };
1641
- };
1642
- const se_GetECSServiceRecommendationsRequest = (input, context) => {
1643
- return {
1644
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1645
- ...(input.filters != null && { filters: se_ECSServiceRecommendationFilters(input.filters, context) }),
1646
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1647
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1648
- ...(input.serviceArns != null && { serviceArns: se_ServiceArns(input.serviceArns, context) }),
1649
- };
1650
- };
1651
- const se_GetEffectiveRecommendationPreferencesRequest = (input, context) => {
1652
- return {
1653
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1654
- };
1655
- };
1656
- const se_GetEnrollmentStatusesForOrganizationRequest = (input, context) => {
1657
- return {
1658
- ...(input.filters != null && { filters: se_EnrollmentFilters(input.filters, context) }),
1659
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1660
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1661
- };
1662
- };
1663
- const se_GetEnrollmentStatusRequest = (input, context) => {
1664
- return {};
1665
- };
1666
- const se_GetLambdaFunctionRecommendationsRequest = (input, context) => {
1667
- return {
1668
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1669
- ...(input.filters != null && { filters: se_LambdaFunctionRecommendationFilters(input.filters, context) }),
1670
- ...(input.functionArns != null && { functionArns: se_FunctionArns(input.functionArns, context) }),
1671
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1672
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1673
- };
1674
- };
1675
- const se_GetRecommendationPreferencesRequest = (input, context) => {
1676
- return {
1677
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1678
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1679
- ...(input.resourceType != null && { resourceType: input.resourceType }),
1680
- ...(input.scope != null && { scope: se_Scope(input.scope, context) }),
1681
- };
1682
- };
1683
- const se_GetRecommendationSummariesRequest = (input, context) => {
1684
- return {
1685
- ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }),
1686
- ...(input.maxResults != null && { maxResults: input.maxResults }),
1687
- ...(input.nextToken != null && { nextToken: input.nextToken }),
1688
- };
1689
- };
1690
- const se_InstanceArns = (input, context) => {
1691
- return input
1692
- .filter((e) => e != null)
1693
- .map((entry) => {
1694
- return entry;
1695
- });
1696
- };
1697
- const se_JobFilter = (input, context) => {
1698
- return {
1699
- ...(input.name != null && { name: input.name }),
1700
- ...(input.values != null && { values: se_FilterValues(input.values, context) }),
1701
- };
1702
- };
1703
- const se_JobFilters = (input, context) => {
1704
- return input
1705
- .filter((e) => e != null)
1706
- .map((entry) => {
1707
- return se_JobFilter(entry, context);
1350
+ return (0, smithy_client_1.take)(input, {
1351
+ endTime: (_) => Math.round(_.getTime() / 1000),
1352
+ instanceArn: [],
1353
+ period: [],
1354
+ recommendationPreferences: smithy_client_1._json,
1355
+ startTime: (_) => Math.round(_.getTime() / 1000),
1356
+ stat: [],
1708
1357
  });
1709
1358
  };
1710
- const se_JobIds = (input, context) => {
1711
- return input
1712
- .filter((e) => e != null)
1713
- .map((entry) => {
1714
- return entry;
1715
- });
1716
- };
1717
- const se_LambdaFunctionRecommendationFilter = (input, context) => {
1718
- return {
1719
- ...(input.name != null && { name: input.name }),
1720
- ...(input.values != null && { values: se_FilterValues(input.values, context) }),
1721
- };
1722
- };
1723
- const se_LambdaFunctionRecommendationFilters = (input, context) => {
1724
- return input
1725
- .filter((e) => e != null)
1726
- .map((entry) => {
1727
- return se_LambdaFunctionRecommendationFilter(entry, context);
1728
- });
1729
- };
1730
- const se_PutRecommendationPreferencesRequest = (input, context) => {
1731
- return {
1732
- ...(input.enhancedInfrastructureMetrics != null && {
1733
- enhancedInfrastructureMetrics: input.enhancedInfrastructureMetrics,
1734
- }),
1735
- ...(input.externalMetricsPreference != null && {
1736
- externalMetricsPreference: se_ExternalMetricsPreference(input.externalMetricsPreference, context),
1737
- }),
1738
- ...(input.inferredWorkloadTypes != null && { inferredWorkloadTypes: input.inferredWorkloadTypes }),
1739
- ...(input.resourceType != null && { resourceType: input.resourceType }),
1740
- ...(input.scope != null && { scope: se_Scope(input.scope, context) }),
1741
- };
1742
- };
1743
- const se_RecommendationPreferenceNames = (input, context) => {
1744
- return input
1745
- .filter((e) => e != null)
1746
- .map((entry) => {
1747
- return entry;
1748
- });
1749
- };
1750
- const se_RecommendationPreferences = (input, context) => {
1751
- return {
1752
- ...(input.cpuVendorArchitectures != null && {
1753
- cpuVendorArchitectures: se_CpuVendorArchitectures(input.cpuVendorArchitectures, context),
1754
- }),
1755
- };
1756
- };
1757
- const se_S3DestinationConfig = (input, context) => {
1758
- return {
1759
- ...(input.bucket != null && { bucket: input.bucket }),
1760
- ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }),
1761
- };
1762
- };
1763
- const se_Scope = (input, context) => {
1764
- return {
1765
- ...(input.name != null && { name: input.name }),
1766
- ...(input.value != null && { value: input.value }),
1767
- };
1768
- };
1769
- const se_ServiceArns = (input, context) => {
1770
- return input
1771
- .filter((e) => e != null)
1772
- .map((entry) => {
1773
- return entry;
1774
- });
1775
- };
1776
- const se_UpdateEnrollmentStatusRequest = (input, context) => {
1777
- return {
1778
- ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
1779
- ...(input.status != null && { status: input.status }),
1780
- };
1781
- };
1782
- const se_VolumeArns = (input, context) => {
1783
- return input
1784
- .filter((e) => e != null)
1785
- .map((entry) => {
1786
- return entry;
1359
+ const se_GetECSServiceRecommendationProjectedMetricsRequest = (input, context) => {
1360
+ return (0, smithy_client_1.take)(input, {
1361
+ endTime: (_) => Math.round(_.getTime() / 1000),
1362
+ period: [],
1363
+ serviceArn: [],
1364
+ startTime: (_) => Math.round(_.getTime() / 1000),
1365
+ stat: [],
1787
1366
  });
1788
1367
  };
1789
- const de_AccessDeniedException = (output, context) => {
1790
- return {
1791
- message: (0, smithy_client_1.expectString)(output.message),
1792
- };
1793
- };
1794
1368
  const de_AccountEnrollmentStatus = (output, context) => {
1795
- return {
1796
- accountId: (0, smithy_client_1.expectString)(output.accountId),
1797
- lastUpdatedTimestamp: output.lastUpdatedTimestamp != null
1798
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTimestamp)))
1799
- : undefined,
1800
- status: (0, smithy_client_1.expectString)(output.status),
1801
- statusReason: (0, smithy_client_1.expectString)(output.statusReason),
1802
- };
1369
+ return (0, smithy_client_1.take)(output, {
1370
+ accountId: smithy_client_1.expectString,
1371
+ lastUpdatedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1372
+ status: smithy_client_1.expectString,
1373
+ statusReason: smithy_client_1.expectString,
1374
+ });
1803
1375
  };
1804
1376
  const de_AccountEnrollmentStatuses = (output, context) => {
1805
1377
  const retVal = (output || [])
1806
1378
  .filter((e) => e != null)
1807
1379
  .map((entry) => {
1808
- if (entry === null) {
1809
- return null;
1810
- }
1811
1380
  return de_AccountEnrollmentStatus(entry, context);
1812
1381
  });
1813
1382
  return retVal;
1814
1383
  };
1815
- const de_AutoScalingGroupConfiguration = (output, context) => {
1816
- return {
1817
- desiredCapacity: (0, smithy_client_1.expectInt32)(output.desiredCapacity),
1818
- instanceType: (0, smithy_client_1.expectString)(output.instanceType),
1819
- maxSize: (0, smithy_client_1.expectInt32)(output.maxSize),
1820
- minSize: (0, smithy_client_1.expectInt32)(output.minSize),
1821
- };
1822
- };
1823
1384
  const de_AutoScalingGroupRecommendation = (output, context) => {
1824
- return {
1825
- accountId: (0, smithy_client_1.expectString)(output.accountId),
1826
- autoScalingGroupArn: (0, smithy_client_1.expectString)(output.autoScalingGroupArn),
1827
- autoScalingGroupName: (0, smithy_client_1.expectString)(output.autoScalingGroupName),
1828
- currentConfiguration: output.currentConfiguration != null
1829
- ? de_AutoScalingGroupConfiguration(output.currentConfiguration, context)
1830
- : undefined,
1831
- currentPerformanceRisk: (0, smithy_client_1.expectString)(output.currentPerformanceRisk),
1832
- effectiveRecommendationPreferences: output.effectiveRecommendationPreferences != null
1833
- ? de_EffectiveRecommendationPreferences(output.effectiveRecommendationPreferences, context)
1834
- : undefined,
1835
- finding: (0, smithy_client_1.expectString)(output.finding),
1836
- inferredWorkloadTypes: output.inferredWorkloadTypes != null
1837
- ? de_InferredWorkloadTypes(output.inferredWorkloadTypes, context)
1838
- : undefined,
1839
- lastRefreshTimestamp: output.lastRefreshTimestamp != null
1840
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastRefreshTimestamp)))
1841
- : undefined,
1842
- lookBackPeriodInDays: (0, smithy_client_1.limitedParseDouble)(output.lookBackPeriodInDays),
1843
- recommendationOptions: output.recommendationOptions != null
1844
- ? de_AutoScalingGroupRecommendationOptions(output.recommendationOptions, context)
1845
- : undefined,
1846
- utilizationMetrics: output.utilizationMetrics != null ? de_UtilizationMetrics(output.utilizationMetrics, context) : undefined,
1847
- };
1385
+ return (0, smithy_client_1.take)(output, {
1386
+ accountId: smithy_client_1.expectString,
1387
+ autoScalingGroupArn: smithy_client_1.expectString,
1388
+ autoScalingGroupName: smithy_client_1.expectString,
1389
+ currentConfiguration: smithy_client_1._json,
1390
+ currentPerformanceRisk: smithy_client_1.expectString,
1391
+ effectiveRecommendationPreferences: smithy_client_1._json,
1392
+ finding: smithy_client_1.expectString,
1393
+ inferredWorkloadTypes: smithy_client_1._json,
1394
+ lastRefreshTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1395
+ lookBackPeriodInDays: smithy_client_1.limitedParseDouble,
1396
+ recommendationOptions: (_) => de_AutoScalingGroupRecommendationOptions(_, context),
1397
+ utilizationMetrics: (_) => de_UtilizationMetrics(_, context),
1398
+ });
1848
1399
  };
1849
1400
  const de_AutoScalingGroupRecommendationOption = (output, context) => {
1850
- return {
1851
- configuration: output.configuration != null ? de_AutoScalingGroupConfiguration(output.configuration, context) : undefined,
1852
- migrationEffort: (0, smithy_client_1.expectString)(output.migrationEffort),
1853
- performanceRisk: (0, smithy_client_1.limitedParseDouble)(output.performanceRisk),
1854
- projectedUtilizationMetrics: output.projectedUtilizationMetrics != null
1855
- ? de_ProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context)
1856
- : undefined,
1857
- rank: (0, smithy_client_1.expectInt32)(output.rank),
1858
- savingsOpportunity: output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined,
1859
- };
1401
+ return (0, smithy_client_1.take)(output, {
1402
+ configuration: smithy_client_1._json,
1403
+ migrationEffort: smithy_client_1.expectString,
1404
+ performanceRisk: smithy_client_1.limitedParseDouble,
1405
+ projectedUtilizationMetrics: (_) => de_ProjectedUtilizationMetrics(_, context),
1406
+ rank: smithy_client_1.expectInt32,
1407
+ savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1408
+ });
1860
1409
  };
1861
1410
  const de_AutoScalingGroupRecommendationOptions = (output, context) => {
1862
1411
  const retVal = (output || [])
1863
1412
  .filter((e) => e != null)
1864
1413
  .map((entry) => {
1865
- if (entry === null) {
1866
- return null;
1867
- }
1868
1414
  return de_AutoScalingGroupRecommendationOption(entry, context);
1869
1415
  });
1870
1416
  return retVal;
@@ -1873,195 +1419,91 @@ const de_AutoScalingGroupRecommendations = (output, context) => {
1873
1419
  const retVal = (output || [])
1874
1420
  .filter((e) => e != null)
1875
1421
  .map((entry) => {
1876
- if (entry === null) {
1877
- return null;
1878
- }
1879
1422
  return de_AutoScalingGroupRecommendation(entry, context);
1880
1423
  });
1881
1424
  return retVal;
1882
1425
  };
1883
- const de_ContainerConfiguration = (output, context) => {
1884
- return {
1885
- containerName: (0, smithy_client_1.expectString)(output.containerName),
1886
- cpu: (0, smithy_client_1.expectInt32)(output.cpu),
1887
- memorySizeConfiguration: output.memorySizeConfiguration != null
1888
- ? de_MemorySizeConfiguration(output.memorySizeConfiguration, context)
1889
- : undefined,
1890
- };
1891
- };
1892
- const de_ContainerConfigurations = (output, context) => {
1893
- const retVal = (output || [])
1894
- .filter((e) => e != null)
1895
- .map((entry) => {
1896
- if (entry === null) {
1897
- return null;
1898
- }
1899
- return de_ContainerConfiguration(entry, context);
1900
- });
1901
- return retVal;
1902
- };
1903
- const de_ContainerRecommendation = (output, context) => {
1904
- return {
1905
- containerName: (0, smithy_client_1.expectString)(output.containerName),
1906
- cpu: (0, smithy_client_1.expectInt32)(output.cpu),
1907
- memorySizeConfiguration: output.memorySizeConfiguration != null
1908
- ? de_MemorySizeConfiguration(output.memorySizeConfiguration, context)
1909
- : undefined,
1910
- };
1911
- };
1912
- const de_ContainerRecommendations = (output, context) => {
1913
- const retVal = (output || [])
1914
- .filter((e) => e != null)
1915
- .map((entry) => {
1916
- if (entry === null) {
1917
- return null;
1918
- }
1919
- return de_ContainerRecommendation(entry, context);
1920
- });
1921
- return retVal;
1922
- };
1923
- const de_CpuVendorArchitectures = (output, context) => {
1924
- const retVal = (output || [])
1925
- .filter((e) => e != null)
1926
- .map((entry) => {
1927
- if (entry === null) {
1928
- return null;
1929
- }
1930
- return (0, smithy_client_1.expectString)(entry);
1931
- });
1932
- return retVal;
1933
- };
1934
- const de_CurrentPerformanceRiskRatings = (output, context) => {
1935
- return {
1936
- high: (0, smithy_client_1.expectLong)(output.high),
1937
- low: (0, smithy_client_1.expectLong)(output.low),
1938
- medium: (0, smithy_client_1.expectLong)(output.medium),
1939
- veryLow: (0, smithy_client_1.expectLong)(output.veryLow),
1940
- };
1941
- };
1942
- const de_DeleteRecommendationPreferencesResponse = (output, context) => {
1943
- return {};
1944
- };
1945
1426
  const de_DescribeRecommendationExportJobsResponse = (output, context) => {
1946
- return {
1947
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
1948
- recommendationExportJobs: output.recommendationExportJobs != null
1949
- ? de_RecommendationExportJobs(output.recommendationExportJobs, context)
1950
- : undefined,
1951
- };
1427
+ return (0, smithy_client_1.take)(output, {
1428
+ nextToken: smithy_client_1.expectString,
1429
+ recommendationExportJobs: (_) => de_RecommendationExportJobs(_, context),
1430
+ });
1952
1431
  };
1953
1432
  const de_EBSUtilizationMetric = (output, context) => {
1954
- return {
1955
- name: (0, smithy_client_1.expectString)(output.name),
1956
- statistic: (0, smithy_client_1.expectString)(output.statistic),
1957
- value: (0, smithy_client_1.limitedParseDouble)(output.value),
1958
- };
1433
+ return (0, smithy_client_1.take)(output, {
1434
+ name: smithy_client_1.expectString,
1435
+ statistic: smithy_client_1.expectString,
1436
+ value: smithy_client_1.limitedParseDouble,
1437
+ });
1959
1438
  };
1960
1439
  const de_EBSUtilizationMetrics = (output, context) => {
1961
1440
  const retVal = (output || [])
1962
1441
  .filter((e) => e != null)
1963
1442
  .map((entry) => {
1964
- if (entry === null) {
1965
- return null;
1966
- }
1967
1443
  return de_EBSUtilizationMetric(entry, context);
1968
1444
  });
1969
1445
  return retVal;
1970
1446
  };
1971
1447
  const de_ECSServiceProjectedMetric = (output, context) => {
1972
- return {
1973
- lowerBoundValues: output.lowerBoundValues != null ? de_MetricValues(output.lowerBoundValues, context) : undefined,
1974
- name: (0, smithy_client_1.expectString)(output.name),
1975
- timestamps: output.timestamps != null ? de_Timestamps(output.timestamps, context) : undefined,
1976
- upperBoundValues: output.upperBoundValues != null ? de_MetricValues(output.upperBoundValues, context) : undefined,
1977
- };
1448
+ return (0, smithy_client_1.take)(output, {
1449
+ lowerBoundValues: (_) => de_MetricValues(_, context),
1450
+ name: smithy_client_1.expectString,
1451
+ timestamps: (_) => de_Timestamps(_, context),
1452
+ upperBoundValues: (_) => de_MetricValues(_, context),
1453
+ });
1978
1454
  };
1979
1455
  const de_ECSServiceProjectedMetrics = (output, context) => {
1980
1456
  const retVal = (output || [])
1981
1457
  .filter((e) => e != null)
1982
1458
  .map((entry) => {
1983
- if (entry === null) {
1984
- return null;
1985
- }
1986
1459
  return de_ECSServiceProjectedMetric(entry, context);
1987
1460
  });
1988
1461
  return retVal;
1989
1462
  };
1990
1463
  const de_ECSServiceProjectedUtilizationMetric = (output, context) => {
1991
- return {
1992
- lowerBoundValue: (0, smithy_client_1.limitedParseDouble)(output.lowerBoundValue),
1993
- name: (0, smithy_client_1.expectString)(output.name),
1994
- statistic: (0, smithy_client_1.expectString)(output.statistic),
1995
- upperBoundValue: (0, smithy_client_1.limitedParseDouble)(output.upperBoundValue),
1996
- };
1464
+ return (0, smithy_client_1.take)(output, {
1465
+ lowerBoundValue: smithy_client_1.limitedParseDouble,
1466
+ name: smithy_client_1.expectString,
1467
+ statistic: smithy_client_1.expectString,
1468
+ upperBoundValue: smithy_client_1.limitedParseDouble,
1469
+ });
1997
1470
  };
1998
1471
  const de_ECSServiceProjectedUtilizationMetrics = (output, context) => {
1999
1472
  const retVal = (output || [])
2000
1473
  .filter((e) => e != null)
2001
1474
  .map((entry) => {
2002
- if (entry === null) {
2003
- return null;
2004
- }
2005
1475
  return de_ECSServiceProjectedUtilizationMetric(entry, context);
2006
1476
  });
2007
1477
  return retVal;
2008
1478
  };
2009
1479
  const de_ECSServiceRecommendation = (output, context) => {
2010
- return {
2011
- accountId: (0, smithy_client_1.expectString)(output.accountId),
2012
- currentPerformanceRisk: (0, smithy_client_1.expectString)(output.currentPerformanceRisk),
2013
- currentServiceConfiguration: output.currentServiceConfiguration != null
2014
- ? de_ServiceConfiguration(output.currentServiceConfiguration, context)
2015
- : undefined,
2016
- finding: (0, smithy_client_1.expectString)(output.finding),
2017
- findingReasonCodes: output.findingReasonCodes != null
2018
- ? de_ECSServiceRecommendationFindingReasonCodes(output.findingReasonCodes, context)
2019
- : undefined,
2020
- lastRefreshTimestamp: output.lastRefreshTimestamp != null
2021
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastRefreshTimestamp)))
2022
- : undefined,
2023
- launchType: (0, smithy_client_1.expectString)(output.launchType),
2024
- lookbackPeriodInDays: (0, smithy_client_1.limitedParseDouble)(output.lookbackPeriodInDays),
2025
- serviceArn: (0, smithy_client_1.expectString)(output.serviceArn),
2026
- serviceRecommendationOptions: output.serviceRecommendationOptions != null
2027
- ? de_ECSServiceRecommendationOptions(output.serviceRecommendationOptions, context)
2028
- : undefined,
2029
- utilizationMetrics: output.utilizationMetrics != null
2030
- ? de_ECSServiceUtilizationMetrics(output.utilizationMetrics, context)
2031
- : undefined,
2032
- };
2033
- };
2034
- const de_ECSServiceRecommendationFindingReasonCodes = (output, context) => {
2035
- const retVal = (output || [])
2036
- .filter((e) => e != null)
2037
- .map((entry) => {
2038
- if (entry === null) {
2039
- return null;
2040
- }
2041
- return (0, smithy_client_1.expectString)(entry);
1480
+ return (0, smithy_client_1.take)(output, {
1481
+ accountId: smithy_client_1.expectString,
1482
+ currentPerformanceRisk: smithy_client_1.expectString,
1483
+ currentServiceConfiguration: smithy_client_1._json,
1484
+ finding: smithy_client_1.expectString,
1485
+ findingReasonCodes: smithy_client_1._json,
1486
+ lastRefreshTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1487
+ launchType: smithy_client_1.expectString,
1488
+ lookbackPeriodInDays: smithy_client_1.limitedParseDouble,
1489
+ serviceArn: smithy_client_1.expectString,
1490
+ serviceRecommendationOptions: (_) => de_ECSServiceRecommendationOptions(_, context),
1491
+ utilizationMetrics: (_) => de_ECSServiceUtilizationMetrics(_, context),
2042
1492
  });
2043
- return retVal;
2044
1493
  };
2045
1494
  const de_ECSServiceRecommendationOption = (output, context) => {
2046
- return {
2047
- containerRecommendations: output.containerRecommendations != null
2048
- ? de_ContainerRecommendations(output.containerRecommendations, context)
2049
- : undefined,
2050
- cpu: (0, smithy_client_1.expectInt32)(output.cpu),
2051
- memory: (0, smithy_client_1.expectInt32)(output.memory),
2052
- projectedUtilizationMetrics: output.projectedUtilizationMetrics != null
2053
- ? de_ECSServiceProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context)
2054
- : undefined,
2055
- savingsOpportunity: output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined,
2056
- };
1495
+ return (0, smithy_client_1.take)(output, {
1496
+ containerRecommendations: smithy_client_1._json,
1497
+ cpu: smithy_client_1.expectInt32,
1498
+ memory: smithy_client_1.expectInt32,
1499
+ projectedUtilizationMetrics: (_) => de_ECSServiceProjectedUtilizationMetrics(_, context),
1500
+ savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1501
+ });
2057
1502
  };
2058
1503
  const de_ECSServiceRecommendationOptions = (output, context) => {
2059
1504
  const retVal = (output || [])
2060
1505
  .filter((e) => e != null)
2061
1506
  .map((entry) => {
2062
- if (entry === null) {
2063
- return null;
2064
- }
2065
1507
  return de_ECSServiceRecommendationOption(entry, context);
2066
1508
  });
2067
1509
  return retVal;
@@ -2070,473 +1512,238 @@ const de_ECSServiceRecommendations = (output, context) => {
2070
1512
  const retVal = (output || [])
2071
1513
  .filter((e) => e != null)
2072
1514
  .map((entry) => {
2073
- if (entry === null) {
2074
- return null;
2075
- }
2076
1515
  return de_ECSServiceRecommendation(entry, context);
2077
1516
  });
2078
1517
  return retVal;
2079
1518
  };
2080
1519
  const de_ECSServiceRecommendedOptionProjectedMetric = (output, context) => {
2081
- return {
2082
- projectedMetrics: output.projectedMetrics != null ? de_ECSServiceProjectedMetrics(output.projectedMetrics, context) : undefined,
2083
- recommendedCpuUnits: (0, smithy_client_1.expectInt32)(output.recommendedCpuUnits),
2084
- recommendedMemorySize: (0, smithy_client_1.expectInt32)(output.recommendedMemorySize),
2085
- };
1520
+ return (0, smithy_client_1.take)(output, {
1521
+ projectedMetrics: (_) => de_ECSServiceProjectedMetrics(_, context),
1522
+ recommendedCpuUnits: smithy_client_1.expectInt32,
1523
+ recommendedMemorySize: smithy_client_1.expectInt32,
1524
+ });
2086
1525
  };
2087
1526
  const de_ECSServiceRecommendedOptionProjectedMetrics = (output, context) => {
2088
1527
  const retVal = (output || [])
2089
1528
  .filter((e) => e != null)
2090
1529
  .map((entry) => {
2091
- if (entry === null) {
2092
- return null;
2093
- }
2094
1530
  return de_ECSServiceRecommendedOptionProjectedMetric(entry, context);
2095
1531
  });
2096
1532
  return retVal;
2097
1533
  };
2098
1534
  const de_ECSServiceUtilizationMetric = (output, context) => {
2099
- return {
2100
- name: (0, smithy_client_1.expectString)(output.name),
2101
- statistic: (0, smithy_client_1.expectString)(output.statistic),
2102
- value: (0, smithy_client_1.limitedParseDouble)(output.value),
2103
- };
1535
+ return (0, smithy_client_1.take)(output, {
1536
+ name: smithy_client_1.expectString,
1537
+ statistic: smithy_client_1.expectString,
1538
+ value: smithy_client_1.limitedParseDouble,
1539
+ });
2104
1540
  };
2105
1541
  const de_ECSServiceUtilizationMetrics = (output, context) => {
2106
1542
  const retVal = (output || [])
2107
1543
  .filter((e) => e != null)
2108
1544
  .map((entry) => {
2109
- if (entry === null) {
2110
- return null;
2111
- }
2112
1545
  return de_ECSServiceUtilizationMetric(entry, context);
2113
1546
  });
2114
1547
  return retVal;
2115
1548
  };
2116
- const de_EffectiveRecommendationPreferences = (output, context) => {
2117
- return {
2118
- cpuVendorArchitectures: output.cpuVendorArchitectures != null
2119
- ? de_CpuVendorArchitectures(output.cpuVendorArchitectures, context)
2120
- : undefined,
2121
- enhancedInfrastructureMetrics: (0, smithy_client_1.expectString)(output.enhancedInfrastructureMetrics),
2122
- externalMetricsPreference: output.externalMetricsPreference != null
2123
- ? de_ExternalMetricsPreference(output.externalMetricsPreference, context)
2124
- : undefined,
2125
- inferredWorkloadTypes: (0, smithy_client_1.expectString)(output.inferredWorkloadTypes),
2126
- };
2127
- };
2128
1549
  const de_EstimatedMonthlySavings = (output, context) => {
2129
- return {
2130
- currency: (0, smithy_client_1.expectString)(output.currency),
2131
- value: (0, smithy_client_1.limitedParseDouble)(output.value),
2132
- };
2133
- };
2134
- const de_ExportAutoScalingGroupRecommendationsResponse = (output, context) => {
2135
- return {
2136
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2137
- s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined,
2138
- };
2139
- };
2140
- const de_ExportDestination = (output, context) => {
2141
- return {
2142
- s3: output.s3 != null ? de_S3Destination(output.s3, context) : undefined,
2143
- };
2144
- };
2145
- const de_ExportEBSVolumeRecommendationsResponse = (output, context) => {
2146
- return {
2147
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2148
- s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined,
2149
- };
2150
- };
2151
- const de_ExportEC2InstanceRecommendationsResponse = (output, context) => {
2152
- return {
2153
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2154
- s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined,
2155
- };
2156
- };
2157
- const de_ExportECSServiceRecommendationsResponse = (output, context) => {
2158
- return {
2159
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2160
- s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined,
2161
- };
2162
- };
2163
- const de_ExportLambdaFunctionRecommendationsResponse = (output, context) => {
2164
- return {
2165
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2166
- s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined,
2167
- };
2168
- };
2169
- const de_ExternalMetricsPreference = (output, context) => {
2170
- return {
2171
- source: (0, smithy_client_1.expectString)(output.source),
2172
- };
1550
+ return (0, smithy_client_1.take)(output, {
1551
+ currency: smithy_client_1.expectString,
1552
+ value: smithy_client_1.limitedParseDouble,
1553
+ });
2173
1554
  };
2174
1555
  const de_GetAutoScalingGroupRecommendationsResponse = (output, context) => {
2175
- return {
2176
- autoScalingGroupRecommendations: output.autoScalingGroupRecommendations != null
2177
- ? de_AutoScalingGroupRecommendations(output.autoScalingGroupRecommendations, context)
2178
- : undefined,
2179
- errors: output.errors != null ? de_GetRecommendationErrors(output.errors, context) : undefined,
2180
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2181
- };
1556
+ return (0, smithy_client_1.take)(output, {
1557
+ autoScalingGroupRecommendations: (_) => de_AutoScalingGroupRecommendations(_, context),
1558
+ errors: smithy_client_1._json,
1559
+ nextToken: smithy_client_1.expectString,
1560
+ });
2182
1561
  };
2183
1562
  const de_GetEBSVolumeRecommendationsResponse = (output, context) => {
2184
- return {
2185
- errors: output.errors != null ? de_GetRecommendationErrors(output.errors, context) : undefined,
2186
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2187
- volumeRecommendations: output.volumeRecommendations != null
2188
- ? de_VolumeRecommendations(output.volumeRecommendations, context)
2189
- : undefined,
2190
- };
1563
+ return (0, smithy_client_1.take)(output, {
1564
+ errors: smithy_client_1._json,
1565
+ nextToken: smithy_client_1.expectString,
1566
+ volumeRecommendations: (_) => de_VolumeRecommendations(_, context),
1567
+ });
2191
1568
  };
2192
1569
  const de_GetEC2InstanceRecommendationsResponse = (output, context) => {
2193
- return {
2194
- errors: output.errors != null ? de_GetRecommendationErrors(output.errors, context) : undefined,
2195
- instanceRecommendations: output.instanceRecommendations != null
2196
- ? de_InstanceRecommendations(output.instanceRecommendations, context)
2197
- : undefined,
2198
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2199
- };
1570
+ return (0, smithy_client_1.take)(output, {
1571
+ errors: smithy_client_1._json,
1572
+ instanceRecommendations: (_) => de_InstanceRecommendations(_, context),
1573
+ nextToken: smithy_client_1.expectString,
1574
+ });
2200
1575
  };
2201
1576
  const de_GetEC2RecommendationProjectedMetricsResponse = (output, context) => {
2202
- return {
2203
- recommendedOptionProjectedMetrics: output.recommendedOptionProjectedMetrics != null
2204
- ? de_RecommendedOptionProjectedMetrics(output.recommendedOptionProjectedMetrics, context)
2205
- : undefined,
2206
- };
1577
+ return (0, smithy_client_1.take)(output, {
1578
+ recommendedOptionProjectedMetrics: (_) => de_RecommendedOptionProjectedMetrics(_, context),
1579
+ });
2207
1580
  };
2208
1581
  const de_GetECSServiceRecommendationProjectedMetricsResponse = (output, context) => {
2209
- return {
2210
- recommendedOptionProjectedMetrics: output.recommendedOptionProjectedMetrics != null
2211
- ? de_ECSServiceRecommendedOptionProjectedMetrics(output.recommendedOptionProjectedMetrics, context)
2212
- : undefined,
2213
- };
1582
+ return (0, smithy_client_1.take)(output, {
1583
+ recommendedOptionProjectedMetrics: (_) => de_ECSServiceRecommendedOptionProjectedMetrics(_, context),
1584
+ });
2214
1585
  };
2215
1586
  const de_GetECSServiceRecommendationsResponse = (output, context) => {
2216
- return {
2217
- ecsServiceRecommendations: output.ecsServiceRecommendations != null
2218
- ? de_ECSServiceRecommendations(output.ecsServiceRecommendations, context)
2219
- : undefined,
2220
- errors: output.errors != null ? de_GetRecommendationErrors(output.errors, context) : undefined,
2221
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2222
- };
2223
- };
2224
- const de_GetEffectiveRecommendationPreferencesResponse = (output, context) => {
2225
- return {
2226
- enhancedInfrastructureMetrics: (0, smithy_client_1.expectString)(output.enhancedInfrastructureMetrics),
2227
- externalMetricsPreference: output.externalMetricsPreference != null
2228
- ? de_ExternalMetricsPreference(output.externalMetricsPreference, context)
2229
- : undefined,
2230
- };
1587
+ return (0, smithy_client_1.take)(output, {
1588
+ ecsServiceRecommendations: (_) => de_ECSServiceRecommendations(_, context),
1589
+ errors: smithy_client_1._json,
1590
+ nextToken: smithy_client_1.expectString,
1591
+ });
2231
1592
  };
2232
1593
  const de_GetEnrollmentStatusesForOrganizationResponse = (output, context) => {
2233
- return {
2234
- accountEnrollmentStatuses: output.accountEnrollmentStatuses != null
2235
- ? de_AccountEnrollmentStatuses(output.accountEnrollmentStatuses, context)
2236
- : undefined,
2237
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2238
- };
1594
+ return (0, smithy_client_1.take)(output, {
1595
+ accountEnrollmentStatuses: (_) => de_AccountEnrollmentStatuses(_, context),
1596
+ nextToken: smithy_client_1.expectString,
1597
+ });
2239
1598
  };
2240
1599
  const de_GetEnrollmentStatusResponse = (output, context) => {
2241
- return {
2242
- lastUpdatedTimestamp: output.lastUpdatedTimestamp != null
2243
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTimestamp)))
2244
- : undefined,
2245
- memberAccountsEnrolled: (0, smithy_client_1.expectBoolean)(output.memberAccountsEnrolled),
2246
- numberOfMemberAccountsOptedIn: (0, smithy_client_1.expectInt32)(output.numberOfMemberAccountsOptedIn),
2247
- status: (0, smithy_client_1.expectString)(output.status),
2248
- statusReason: (0, smithy_client_1.expectString)(output.statusReason),
2249
- };
1600
+ return (0, smithy_client_1.take)(output, {
1601
+ lastUpdatedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1602
+ memberAccountsEnrolled: smithy_client_1.expectBoolean,
1603
+ numberOfMemberAccountsOptedIn: smithy_client_1.expectInt32,
1604
+ status: smithy_client_1.expectString,
1605
+ statusReason: smithy_client_1.expectString,
1606
+ });
2250
1607
  };
2251
1608
  const de_GetLambdaFunctionRecommendationsResponse = (output, context) => {
2252
- return {
2253
- lambdaFunctionRecommendations: output.lambdaFunctionRecommendations != null
2254
- ? de_LambdaFunctionRecommendations(output.lambdaFunctionRecommendations, context)
2255
- : undefined,
2256
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2257
- };
2258
- };
2259
- const de_GetRecommendationError = (output, context) => {
2260
- return {
2261
- code: (0, smithy_client_1.expectString)(output.code),
2262
- identifier: (0, smithy_client_1.expectString)(output.identifier),
2263
- message: (0, smithy_client_1.expectString)(output.message),
2264
- };
2265
- };
2266
- const de_GetRecommendationErrors = (output, context) => {
2267
- const retVal = (output || [])
2268
- .filter((e) => e != null)
2269
- .map((entry) => {
2270
- if (entry === null) {
2271
- return null;
2272
- }
2273
- return de_GetRecommendationError(entry, context);
1609
+ return (0, smithy_client_1.take)(output, {
1610
+ lambdaFunctionRecommendations: (_) => de_LambdaFunctionRecommendations(_, context),
1611
+ nextToken: smithy_client_1.expectString,
2274
1612
  });
2275
- return retVal;
2276
- };
2277
- const de_GetRecommendationPreferencesResponse = (output, context) => {
2278
- return {
2279
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2280
- recommendationPreferencesDetails: output.recommendationPreferencesDetails != null
2281
- ? de_RecommendationPreferencesDetails(output.recommendationPreferencesDetails, context)
2282
- : undefined,
2283
- };
2284
1613
  };
2285
1614
  const de_GetRecommendationSummariesResponse = (output, context) => {
2286
- return {
2287
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2288
- recommendationSummaries: output.recommendationSummaries != null
2289
- ? de_RecommendationSummaries(output.recommendationSummaries, context)
2290
- : undefined,
2291
- };
2292
- };
2293
- const de_InferredWorkloadTypes = (output, context) => {
2294
- const retVal = (output || [])
2295
- .filter((e) => e != null)
2296
- .map((entry) => {
2297
- if (entry === null) {
2298
- return null;
2299
- }
2300
- return (0, smithy_client_1.expectString)(entry);
1615
+ return (0, smithy_client_1.take)(output, {
1616
+ nextToken: smithy_client_1.expectString,
1617
+ recommendationSummaries: (_) => de_RecommendationSummaries(_, context),
2301
1618
  });
2302
- return retVal;
2303
1619
  };
2304
1620
  const de_InstanceRecommendation = (output, context) => {
2305
- return {
2306
- accountId: (0, smithy_client_1.expectString)(output.accountId),
2307
- currentInstanceType: (0, smithy_client_1.expectString)(output.currentInstanceType),
2308
- currentPerformanceRisk: (0, smithy_client_1.expectString)(output.currentPerformanceRisk),
2309
- effectiveRecommendationPreferences: output.effectiveRecommendationPreferences != null
2310
- ? de_EffectiveRecommendationPreferences(output.effectiveRecommendationPreferences, context)
2311
- : undefined,
2312
- finding: (0, smithy_client_1.expectString)(output.finding),
2313
- findingReasonCodes: output.findingReasonCodes != null
2314
- ? de_InstanceRecommendationFindingReasonCodes(output.findingReasonCodes, context)
2315
- : undefined,
2316
- inferredWorkloadTypes: output.inferredWorkloadTypes != null
2317
- ? de_InferredWorkloadTypes(output.inferredWorkloadTypes, context)
2318
- : undefined,
2319
- instanceArn: (0, smithy_client_1.expectString)(output.instanceArn),
2320
- instanceName: (0, smithy_client_1.expectString)(output.instanceName),
2321
- instanceState: (0, smithy_client_1.expectString)(output.instanceState),
2322
- lastRefreshTimestamp: output.lastRefreshTimestamp != null
2323
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastRefreshTimestamp)))
2324
- : undefined,
2325
- lookBackPeriodInDays: (0, smithy_client_1.limitedParseDouble)(output.lookBackPeriodInDays),
2326
- recommendationOptions: output.recommendationOptions != null
2327
- ? de_RecommendationOptions(output.recommendationOptions, context)
2328
- : undefined,
2329
- recommendationSources: output.recommendationSources != null
2330
- ? de_RecommendationSources(output.recommendationSources, context)
2331
- : undefined,
2332
- utilizationMetrics: output.utilizationMetrics != null ? de_UtilizationMetrics(output.utilizationMetrics, context) : undefined,
2333
- };
2334
- };
2335
- const de_InstanceRecommendationFindingReasonCodes = (output, context) => {
2336
- const retVal = (output || [])
2337
- .filter((e) => e != null)
2338
- .map((entry) => {
2339
- if (entry === null) {
2340
- return null;
2341
- }
2342
- return (0, smithy_client_1.expectString)(entry);
1621
+ return (0, smithy_client_1.take)(output, {
1622
+ accountId: smithy_client_1.expectString,
1623
+ currentInstanceType: smithy_client_1.expectString,
1624
+ currentPerformanceRisk: smithy_client_1.expectString,
1625
+ effectiveRecommendationPreferences: smithy_client_1._json,
1626
+ finding: smithy_client_1.expectString,
1627
+ findingReasonCodes: smithy_client_1._json,
1628
+ inferredWorkloadTypes: smithy_client_1._json,
1629
+ instanceArn: smithy_client_1.expectString,
1630
+ instanceName: smithy_client_1.expectString,
1631
+ instanceState: smithy_client_1.expectString,
1632
+ lastRefreshTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1633
+ lookBackPeriodInDays: smithy_client_1.limitedParseDouble,
1634
+ recommendationOptions: (_) => de_RecommendationOptions(_, context),
1635
+ recommendationSources: smithy_client_1._json,
1636
+ utilizationMetrics: (_) => de_UtilizationMetrics(_, context),
2343
1637
  });
2344
- return retVal;
2345
1638
  };
2346
1639
  const de_InstanceRecommendationOption = (output, context) => {
2347
- return {
2348
- instanceType: (0, smithy_client_1.expectString)(output.instanceType),
2349
- migrationEffort: (0, smithy_client_1.expectString)(output.migrationEffort),
2350
- performanceRisk: (0, smithy_client_1.limitedParseDouble)(output.performanceRisk),
2351
- platformDifferences: output.platformDifferences != null ? de_PlatformDifferences(output.platformDifferences, context) : undefined,
2352
- projectedUtilizationMetrics: output.projectedUtilizationMetrics != null
2353
- ? de_ProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context)
2354
- : undefined,
2355
- rank: (0, smithy_client_1.expectInt32)(output.rank),
2356
- savingsOpportunity: output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined,
2357
- };
1640
+ return (0, smithy_client_1.take)(output, {
1641
+ instanceType: smithy_client_1.expectString,
1642
+ migrationEffort: smithy_client_1.expectString,
1643
+ performanceRisk: smithy_client_1.limitedParseDouble,
1644
+ platformDifferences: smithy_client_1._json,
1645
+ projectedUtilizationMetrics: (_) => de_ProjectedUtilizationMetrics(_, context),
1646
+ rank: smithy_client_1.expectInt32,
1647
+ savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1648
+ });
2358
1649
  };
2359
1650
  const de_InstanceRecommendations = (output, context) => {
2360
1651
  const retVal = (output || [])
2361
1652
  .filter((e) => e != null)
2362
1653
  .map((entry) => {
2363
- if (entry === null) {
2364
- return null;
2365
- }
2366
1654
  return de_InstanceRecommendation(entry, context);
2367
1655
  });
2368
1656
  return retVal;
2369
1657
  };
2370
- const de_InternalServerException = (output, context) => {
2371
- return {
2372
- message: (0, smithy_client_1.expectString)(output.message),
2373
- };
2374
- };
2375
- const de_InvalidParameterValueException = (output, context) => {
2376
- return {
2377
- message: (0, smithy_client_1.expectString)(output.message),
2378
- };
2379
- };
2380
1658
  const de_LambdaFunctionMemoryProjectedMetric = (output, context) => {
2381
- return {
2382
- name: (0, smithy_client_1.expectString)(output.name),
2383
- statistic: (0, smithy_client_1.expectString)(output.statistic),
2384
- value: (0, smithy_client_1.limitedParseDouble)(output.value),
2385
- };
1659
+ return (0, smithy_client_1.take)(output, {
1660
+ name: smithy_client_1.expectString,
1661
+ statistic: smithy_client_1.expectString,
1662
+ value: smithy_client_1.limitedParseDouble,
1663
+ });
2386
1664
  };
2387
1665
  const de_LambdaFunctionMemoryProjectedMetrics = (output, context) => {
2388
1666
  const retVal = (output || [])
2389
1667
  .filter((e) => e != null)
2390
1668
  .map((entry) => {
2391
- if (entry === null) {
2392
- return null;
2393
- }
2394
1669
  return de_LambdaFunctionMemoryProjectedMetric(entry, context);
2395
1670
  });
2396
1671
  return retVal;
2397
1672
  };
2398
1673
  const de_LambdaFunctionMemoryRecommendationOption = (output, context) => {
2399
- return {
2400
- memorySize: (0, smithy_client_1.expectInt32)(output.memorySize),
2401
- projectedUtilizationMetrics: output.projectedUtilizationMetrics != null
2402
- ? de_LambdaFunctionMemoryProjectedMetrics(output.projectedUtilizationMetrics, context)
2403
- : undefined,
2404
- rank: (0, smithy_client_1.expectInt32)(output.rank),
2405
- savingsOpportunity: output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined,
2406
- };
1674
+ return (0, smithy_client_1.take)(output, {
1675
+ memorySize: smithy_client_1.expectInt32,
1676
+ projectedUtilizationMetrics: (_) => de_LambdaFunctionMemoryProjectedMetrics(_, context),
1677
+ rank: smithy_client_1.expectInt32,
1678
+ savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1679
+ });
2407
1680
  };
2408
1681
  const de_LambdaFunctionMemoryRecommendationOptions = (output, context) => {
2409
1682
  const retVal = (output || [])
2410
1683
  .filter((e) => e != null)
2411
1684
  .map((entry) => {
2412
- if (entry === null) {
2413
- return null;
2414
- }
2415
1685
  return de_LambdaFunctionMemoryRecommendationOption(entry, context);
2416
1686
  });
2417
1687
  return retVal;
2418
1688
  };
2419
1689
  const de_LambdaFunctionRecommendation = (output, context) => {
2420
- return {
2421
- accountId: (0, smithy_client_1.expectString)(output.accountId),
2422
- currentMemorySize: (0, smithy_client_1.expectInt32)(output.currentMemorySize),
2423
- currentPerformanceRisk: (0, smithy_client_1.expectString)(output.currentPerformanceRisk),
2424
- finding: (0, smithy_client_1.expectString)(output.finding),
2425
- findingReasonCodes: output.findingReasonCodes != null
2426
- ? de_LambdaFunctionRecommendationFindingReasonCodes(output.findingReasonCodes, context)
2427
- : undefined,
2428
- functionArn: (0, smithy_client_1.expectString)(output.functionArn),
2429
- functionVersion: (0, smithy_client_1.expectString)(output.functionVersion),
2430
- lastRefreshTimestamp: output.lastRefreshTimestamp != null
2431
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastRefreshTimestamp)))
2432
- : undefined,
2433
- lookbackPeriodInDays: (0, smithy_client_1.limitedParseDouble)(output.lookbackPeriodInDays),
2434
- memorySizeRecommendationOptions: output.memorySizeRecommendationOptions != null
2435
- ? de_LambdaFunctionMemoryRecommendationOptions(output.memorySizeRecommendationOptions, context)
2436
- : undefined,
2437
- numberOfInvocations: (0, smithy_client_1.expectLong)(output.numberOfInvocations),
2438
- utilizationMetrics: output.utilizationMetrics != null
2439
- ? de_LambdaFunctionUtilizationMetrics(output.utilizationMetrics, context)
2440
- : undefined,
2441
- };
2442
- };
2443
- const de_LambdaFunctionRecommendationFindingReasonCodes = (output, context) => {
2444
- const retVal = (output || [])
2445
- .filter((e) => e != null)
2446
- .map((entry) => {
2447
- if (entry === null) {
2448
- return null;
2449
- }
2450
- return (0, smithy_client_1.expectString)(entry);
1690
+ return (0, smithy_client_1.take)(output, {
1691
+ accountId: smithy_client_1.expectString,
1692
+ currentMemorySize: smithy_client_1.expectInt32,
1693
+ currentPerformanceRisk: smithy_client_1.expectString,
1694
+ finding: smithy_client_1.expectString,
1695
+ findingReasonCodes: smithy_client_1._json,
1696
+ functionArn: smithy_client_1.expectString,
1697
+ functionVersion: smithy_client_1.expectString,
1698
+ lastRefreshTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1699
+ lookbackPeriodInDays: smithy_client_1.limitedParseDouble,
1700
+ memorySizeRecommendationOptions: (_) => de_LambdaFunctionMemoryRecommendationOptions(_, context),
1701
+ numberOfInvocations: smithy_client_1.expectLong,
1702
+ utilizationMetrics: (_) => de_LambdaFunctionUtilizationMetrics(_, context),
2451
1703
  });
2452
- return retVal;
2453
1704
  };
2454
1705
  const de_LambdaFunctionRecommendations = (output, context) => {
2455
1706
  const retVal = (output || [])
2456
1707
  .filter((e) => e != null)
2457
1708
  .map((entry) => {
2458
- if (entry === null) {
2459
- return null;
2460
- }
2461
1709
  return de_LambdaFunctionRecommendation(entry, context);
2462
1710
  });
2463
1711
  return retVal;
2464
1712
  };
2465
1713
  const de_LambdaFunctionUtilizationMetric = (output, context) => {
2466
- return {
2467
- name: (0, smithy_client_1.expectString)(output.name),
2468
- statistic: (0, smithy_client_1.expectString)(output.statistic),
2469
- value: (0, smithy_client_1.limitedParseDouble)(output.value),
2470
- };
1714
+ return (0, smithy_client_1.take)(output, {
1715
+ name: smithy_client_1.expectString,
1716
+ statistic: smithy_client_1.expectString,
1717
+ value: smithy_client_1.limitedParseDouble,
1718
+ });
2471
1719
  };
2472
1720
  const de_LambdaFunctionUtilizationMetrics = (output, context) => {
2473
1721
  const retVal = (output || [])
2474
1722
  .filter((e) => e != null)
2475
1723
  .map((entry) => {
2476
- if (entry === null) {
2477
- return null;
2478
- }
2479
1724
  return de_LambdaFunctionUtilizationMetric(entry, context);
2480
1725
  });
2481
1726
  return retVal;
2482
1727
  };
2483
- const de_LimitExceededException = (output, context) => {
2484
- return {
2485
- message: (0, smithy_client_1.expectString)(output.message),
2486
- };
2487
- };
2488
- const de_MemorySizeConfiguration = (output, context) => {
2489
- return {
2490
- memory: (0, smithy_client_1.expectInt32)(output.memory),
2491
- memoryReservation: (0, smithy_client_1.expectInt32)(output.memoryReservation),
2492
- };
2493
- };
2494
1728
  const de_MetricValues = (output, context) => {
2495
1729
  const retVal = (output || [])
2496
1730
  .filter((e) => e != null)
2497
1731
  .map((entry) => {
2498
- if (entry === null) {
2499
- return null;
2500
- }
2501
1732
  return (0, smithy_client_1.limitedParseDouble)(entry);
2502
1733
  });
2503
1734
  return retVal;
2504
1735
  };
2505
- const de_MissingAuthenticationToken = (output, context) => {
2506
- return {
2507
- message: (0, smithy_client_1.expectString)(output.message),
2508
- };
2509
- };
2510
- const de_OptInRequiredException = (output, context) => {
2511
- return {
2512
- message: (0, smithy_client_1.expectString)(output.message),
2513
- };
2514
- };
2515
- const de_PlatformDifferences = (output, context) => {
2516
- const retVal = (output || [])
2517
- .filter((e) => e != null)
2518
- .map((entry) => {
2519
- if (entry === null) {
2520
- return null;
2521
- }
2522
- return (0, smithy_client_1.expectString)(entry);
2523
- });
2524
- return retVal;
2525
- };
2526
1736
  const de_ProjectedMetric = (output, context) => {
2527
- return {
2528
- name: (0, smithy_client_1.expectString)(output.name),
2529
- timestamps: output.timestamps != null ? de_Timestamps(output.timestamps, context) : undefined,
2530
- values: output.values != null ? de_MetricValues(output.values, context) : undefined,
2531
- };
1737
+ return (0, smithy_client_1.take)(output, {
1738
+ name: smithy_client_1.expectString,
1739
+ timestamps: (_) => de_Timestamps(_, context),
1740
+ values: (_) => de_MetricValues(_, context),
1741
+ });
2532
1742
  };
2533
1743
  const de_ProjectedMetrics = (output, context) => {
2534
1744
  const retVal = (output || [])
2535
1745
  .filter((e) => e != null)
2536
1746
  .map((entry) => {
2537
- if (entry === null) {
2538
- return null;
2539
- }
2540
1747
  return de_ProjectedMetric(entry, context);
2541
1748
  });
2542
1749
  return retVal;
@@ -2545,55 +1752,39 @@ const de_ProjectedUtilizationMetrics = (output, context) => {
2545
1752
  const retVal = (output || [])
2546
1753
  .filter((e) => e != null)
2547
1754
  .map((entry) => {
2548
- if (entry === null) {
2549
- return null;
2550
- }
2551
1755
  return de_UtilizationMetric(entry, context);
2552
1756
  });
2553
1757
  return retVal;
2554
1758
  };
2555
- const de_PutRecommendationPreferencesResponse = (output, context) => {
2556
- return {};
2557
- };
2558
1759
  const de_ReasonCodeSummaries = (output, context) => {
2559
1760
  const retVal = (output || [])
2560
1761
  .filter((e) => e != null)
2561
1762
  .map((entry) => {
2562
- if (entry === null) {
2563
- return null;
2564
- }
2565
1763
  return de_ReasonCodeSummary(entry, context);
2566
1764
  });
2567
1765
  return retVal;
2568
1766
  };
2569
1767
  const de_ReasonCodeSummary = (output, context) => {
2570
- return {
2571
- name: (0, smithy_client_1.expectString)(output.name),
2572
- value: (0, smithy_client_1.limitedParseDouble)(output.value),
2573
- };
1768
+ return (0, smithy_client_1.take)(output, {
1769
+ name: smithy_client_1.expectString,
1770
+ value: smithy_client_1.limitedParseDouble,
1771
+ });
2574
1772
  };
2575
1773
  const de_RecommendationExportJob = (output, context) => {
2576
- return {
2577
- creationTimestamp: output.creationTimestamp != null
2578
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTimestamp)))
2579
- : undefined,
2580
- destination: output.destination != null ? de_ExportDestination(output.destination, context) : undefined,
2581
- failureReason: (0, smithy_client_1.expectString)(output.failureReason),
2582
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2583
- lastUpdatedTimestamp: output.lastUpdatedTimestamp != null
2584
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTimestamp)))
2585
- : undefined,
2586
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2587
- status: (0, smithy_client_1.expectString)(output.status),
2588
- };
1774
+ return (0, smithy_client_1.take)(output, {
1775
+ creationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1776
+ destination: smithy_client_1._json,
1777
+ failureReason: smithy_client_1.expectString,
1778
+ jobId: smithy_client_1.expectString,
1779
+ lastUpdatedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1780
+ resourceType: smithy_client_1.expectString,
1781
+ status: smithy_client_1.expectString,
1782
+ });
2589
1783
  };
2590
1784
  const de_RecommendationExportJobs = (output, context) => {
2591
1785
  const retVal = (output || [])
2592
1786
  .filter((e) => e != null)
2593
1787
  .map((entry) => {
2594
- if (entry === null) {
2595
- return null;
2596
- }
2597
1788
  return de_RecommendationExportJob(entry, context);
2598
1789
  });
2599
1790
  return retVal;
@@ -2602,235 +1793,111 @@ const de_RecommendationOptions = (output, context) => {
2602
1793
  const retVal = (output || [])
2603
1794
  .filter((e) => e != null)
2604
1795
  .map((entry) => {
2605
- if (entry === null) {
2606
- return null;
2607
- }
2608
1796
  return de_InstanceRecommendationOption(entry, context);
2609
1797
  });
2610
1798
  return retVal;
2611
1799
  };
2612
- const de_RecommendationPreferencesDetail = (output, context) => {
2613
- return {
2614
- enhancedInfrastructureMetrics: (0, smithy_client_1.expectString)(output.enhancedInfrastructureMetrics),
2615
- externalMetricsPreference: output.externalMetricsPreference != null
2616
- ? de_ExternalMetricsPreference(output.externalMetricsPreference, context)
2617
- : undefined,
2618
- inferredWorkloadTypes: (0, smithy_client_1.expectString)(output.inferredWorkloadTypes),
2619
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2620
- scope: output.scope != null ? de_Scope(output.scope, context) : undefined,
2621
- };
2622
- };
2623
- const de_RecommendationPreferencesDetails = (output, context) => {
2624
- const retVal = (output || [])
2625
- .filter((e) => e != null)
2626
- .map((entry) => {
2627
- if (entry === null) {
2628
- return null;
2629
- }
2630
- return de_RecommendationPreferencesDetail(entry, context);
2631
- });
2632
- return retVal;
2633
- };
2634
- const de_RecommendationSource = (output, context) => {
2635
- return {
2636
- recommendationSourceArn: (0, smithy_client_1.expectString)(output.recommendationSourceArn),
2637
- recommendationSourceType: (0, smithy_client_1.expectString)(output.recommendationSourceType),
2638
- };
2639
- };
2640
- const de_RecommendationSources = (output, context) => {
2641
- const retVal = (output || [])
2642
- .filter((e) => e != null)
2643
- .map((entry) => {
2644
- if (entry === null) {
2645
- return null;
2646
- }
2647
- return de_RecommendationSource(entry, context);
2648
- });
2649
- return retVal;
2650
- };
2651
1800
  const de_RecommendationSummaries = (output, context) => {
2652
1801
  const retVal = (output || [])
2653
1802
  .filter((e) => e != null)
2654
1803
  .map((entry) => {
2655
- if (entry === null) {
2656
- return null;
2657
- }
2658
1804
  return de_RecommendationSummary(entry, context);
2659
1805
  });
2660
1806
  return retVal;
2661
1807
  };
2662
1808
  const de_RecommendationSummary = (output, context) => {
2663
- return {
2664
- accountId: (0, smithy_client_1.expectString)(output.accountId),
2665
- currentPerformanceRiskRatings: output.currentPerformanceRiskRatings != null
2666
- ? de_CurrentPerformanceRiskRatings(output.currentPerformanceRiskRatings, context)
2667
- : undefined,
2668
- recommendationResourceType: (0, smithy_client_1.expectString)(output.recommendationResourceType),
2669
- savingsOpportunity: output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined,
2670
- summaries: output.summaries != null ? de_Summaries(output.summaries, context) : undefined,
2671
- };
1809
+ return (0, smithy_client_1.take)(output, {
1810
+ accountId: smithy_client_1.expectString,
1811
+ currentPerformanceRiskRatings: smithy_client_1._json,
1812
+ recommendationResourceType: smithy_client_1.expectString,
1813
+ savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1814
+ summaries: (_) => de_Summaries(_, context),
1815
+ });
2672
1816
  };
2673
1817
  const de_RecommendedOptionProjectedMetric = (output, context) => {
2674
- return {
2675
- projectedMetrics: output.projectedMetrics != null ? de_ProjectedMetrics(output.projectedMetrics, context) : undefined,
2676
- rank: (0, smithy_client_1.expectInt32)(output.rank),
2677
- recommendedInstanceType: (0, smithy_client_1.expectString)(output.recommendedInstanceType),
2678
- };
1818
+ return (0, smithy_client_1.take)(output, {
1819
+ projectedMetrics: (_) => de_ProjectedMetrics(_, context),
1820
+ rank: smithy_client_1.expectInt32,
1821
+ recommendedInstanceType: smithy_client_1.expectString,
1822
+ });
2679
1823
  };
2680
1824
  const de_RecommendedOptionProjectedMetrics = (output, context) => {
2681
1825
  const retVal = (output || [])
2682
1826
  .filter((e) => e != null)
2683
1827
  .map((entry) => {
2684
- if (entry === null) {
2685
- return null;
2686
- }
2687
1828
  return de_RecommendedOptionProjectedMetric(entry, context);
2688
1829
  });
2689
1830
  return retVal;
2690
1831
  };
2691
- const de_ResourceNotFoundException = (output, context) => {
2692
- return {
2693
- message: (0, smithy_client_1.expectString)(output.message),
2694
- };
2695
- };
2696
- const de_S3Destination = (output, context) => {
2697
- return {
2698
- bucket: (0, smithy_client_1.expectString)(output.bucket),
2699
- key: (0, smithy_client_1.expectString)(output.key),
2700
- metadataKey: (0, smithy_client_1.expectString)(output.metadataKey),
2701
- };
2702
- };
2703
1832
  const de_SavingsOpportunity = (output, context) => {
2704
- return {
2705
- estimatedMonthlySavings: output.estimatedMonthlySavings != null
2706
- ? de_EstimatedMonthlySavings(output.estimatedMonthlySavings, context)
2707
- : undefined,
2708
- savingsOpportunityPercentage: (0, smithy_client_1.limitedParseDouble)(output.savingsOpportunityPercentage),
2709
- };
2710
- };
2711
- const de_Scope = (output, context) => {
2712
- return {
2713
- name: (0, smithy_client_1.expectString)(output.name),
2714
- value: (0, smithy_client_1.expectString)(output.value),
2715
- };
2716
- };
2717
- const de_ServiceConfiguration = (output, context) => {
2718
- return {
2719
- autoScalingConfiguration: (0, smithy_client_1.expectString)(output.autoScalingConfiguration),
2720
- containerConfigurations: output.containerConfigurations != null
2721
- ? de_ContainerConfigurations(output.containerConfigurations, context)
2722
- : undefined,
2723
- cpu: (0, smithy_client_1.expectInt32)(output.cpu),
2724
- memory: (0, smithy_client_1.expectInt32)(output.memory),
2725
- taskDefinitionArn: (0, smithy_client_1.expectString)(output.taskDefinitionArn),
2726
- };
2727
- };
2728
- const de_ServiceUnavailableException = (output, context) => {
2729
- return {
2730
- message: (0, smithy_client_1.expectString)(output.message),
2731
- };
1833
+ return (0, smithy_client_1.take)(output, {
1834
+ estimatedMonthlySavings: (_) => de_EstimatedMonthlySavings(_, context),
1835
+ savingsOpportunityPercentage: smithy_client_1.limitedParseDouble,
1836
+ });
2732
1837
  };
2733
1838
  const de_Summaries = (output, context) => {
2734
1839
  const retVal = (output || [])
2735
1840
  .filter((e) => e != null)
2736
1841
  .map((entry) => {
2737
- if (entry === null) {
2738
- return null;
2739
- }
2740
1842
  return de_Summary(entry, context);
2741
1843
  });
2742
1844
  return retVal;
2743
1845
  };
2744
1846
  const de_Summary = (output, context) => {
2745
- return {
2746
- name: (0, smithy_client_1.expectString)(output.name),
2747
- reasonCodeSummaries: output.reasonCodeSummaries != null ? de_ReasonCodeSummaries(output.reasonCodeSummaries, context) : undefined,
2748
- value: (0, smithy_client_1.limitedParseDouble)(output.value),
2749
- };
2750
- };
2751
- const de_ThrottlingException = (output, context) => {
2752
- return {
2753
- message: (0, smithy_client_1.expectString)(output.message),
2754
- };
1847
+ return (0, smithy_client_1.take)(output, {
1848
+ name: smithy_client_1.expectString,
1849
+ reasonCodeSummaries: (_) => de_ReasonCodeSummaries(_, context),
1850
+ value: smithy_client_1.limitedParseDouble,
1851
+ });
2755
1852
  };
2756
1853
  const de_Timestamps = (output, context) => {
2757
1854
  const retVal = (output || [])
2758
1855
  .filter((e) => e != null)
2759
1856
  .map((entry) => {
2760
- if (entry === null) {
2761
- return null;
2762
- }
2763
1857
  return (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(entry)));
2764
1858
  });
2765
1859
  return retVal;
2766
1860
  };
2767
- const de_UpdateEnrollmentStatusResponse = (output, context) => {
2768
- return {
2769
- status: (0, smithy_client_1.expectString)(output.status),
2770
- statusReason: (0, smithy_client_1.expectString)(output.statusReason),
2771
- };
2772
- };
2773
1861
  const de_UtilizationMetric = (output, context) => {
2774
- return {
2775
- name: (0, smithy_client_1.expectString)(output.name),
2776
- statistic: (0, smithy_client_1.expectString)(output.statistic),
2777
- value: (0, smithy_client_1.limitedParseDouble)(output.value),
2778
- };
1862
+ return (0, smithy_client_1.take)(output, {
1863
+ name: smithy_client_1.expectString,
1864
+ statistic: smithy_client_1.expectString,
1865
+ value: smithy_client_1.limitedParseDouble,
1866
+ });
2779
1867
  };
2780
1868
  const de_UtilizationMetrics = (output, context) => {
2781
1869
  const retVal = (output || [])
2782
1870
  .filter((e) => e != null)
2783
1871
  .map((entry) => {
2784
- if (entry === null) {
2785
- return null;
2786
- }
2787
1872
  return de_UtilizationMetric(entry, context);
2788
1873
  });
2789
1874
  return retVal;
2790
1875
  };
2791
- const de_VolumeConfiguration = (output, context) => {
2792
- return {
2793
- rootVolume: (0, smithy_client_1.expectBoolean)(output.rootVolume),
2794
- volumeBaselineIOPS: (0, smithy_client_1.expectInt32)(output.volumeBaselineIOPS),
2795
- volumeBaselineThroughput: (0, smithy_client_1.expectInt32)(output.volumeBaselineThroughput),
2796
- volumeBurstIOPS: (0, smithy_client_1.expectInt32)(output.volumeBurstIOPS),
2797
- volumeBurstThroughput: (0, smithy_client_1.expectInt32)(output.volumeBurstThroughput),
2798
- volumeSize: (0, smithy_client_1.expectInt32)(output.volumeSize),
2799
- volumeType: (0, smithy_client_1.expectString)(output.volumeType),
2800
- };
2801
- };
2802
1876
  const de_VolumeRecommendation = (output, context) => {
2803
- return {
2804
- accountId: (0, smithy_client_1.expectString)(output.accountId),
2805
- currentConfiguration: output.currentConfiguration != null ? de_VolumeConfiguration(output.currentConfiguration, context) : undefined,
2806
- currentPerformanceRisk: (0, smithy_client_1.expectString)(output.currentPerformanceRisk),
2807
- finding: (0, smithy_client_1.expectString)(output.finding),
2808
- lastRefreshTimestamp: output.lastRefreshTimestamp != null
2809
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastRefreshTimestamp)))
2810
- : undefined,
2811
- lookBackPeriodInDays: (0, smithy_client_1.limitedParseDouble)(output.lookBackPeriodInDays),
2812
- utilizationMetrics: output.utilizationMetrics != null ? de_EBSUtilizationMetrics(output.utilizationMetrics, context) : undefined,
2813
- volumeArn: (0, smithy_client_1.expectString)(output.volumeArn),
2814
- volumeRecommendationOptions: output.volumeRecommendationOptions != null
2815
- ? de_VolumeRecommendationOptions(output.volumeRecommendationOptions, context)
2816
- : undefined,
2817
- };
1877
+ return (0, smithy_client_1.take)(output, {
1878
+ accountId: smithy_client_1.expectString,
1879
+ currentConfiguration: smithy_client_1._json,
1880
+ currentPerformanceRisk: smithy_client_1.expectString,
1881
+ finding: smithy_client_1.expectString,
1882
+ lastRefreshTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1883
+ lookBackPeriodInDays: smithy_client_1.limitedParseDouble,
1884
+ utilizationMetrics: (_) => de_EBSUtilizationMetrics(_, context),
1885
+ volumeArn: smithy_client_1.expectString,
1886
+ volumeRecommendationOptions: (_) => de_VolumeRecommendationOptions(_, context),
1887
+ });
2818
1888
  };
2819
1889
  const de_VolumeRecommendationOption = (output, context) => {
2820
- return {
2821
- configuration: output.configuration != null ? de_VolumeConfiguration(output.configuration, context) : undefined,
2822
- performanceRisk: (0, smithy_client_1.limitedParseDouble)(output.performanceRisk),
2823
- rank: (0, smithy_client_1.expectInt32)(output.rank),
2824
- savingsOpportunity: output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined,
2825
- };
1890
+ return (0, smithy_client_1.take)(output, {
1891
+ configuration: smithy_client_1._json,
1892
+ performanceRisk: smithy_client_1.limitedParseDouble,
1893
+ rank: smithy_client_1.expectInt32,
1894
+ savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1895
+ });
2826
1896
  };
2827
1897
  const de_VolumeRecommendationOptions = (output, context) => {
2828
1898
  const retVal = (output || [])
2829
1899
  .filter((e) => e != null)
2830
1900
  .map((entry) => {
2831
- if (entry === null) {
2832
- return null;
2833
- }
2834
1901
  return de_VolumeRecommendationOption(entry, context);
2835
1902
  });
2836
1903
  return retVal;
@@ -2839,9 +1906,6 @@ const de_VolumeRecommendations = (output, context) => {
2839
1906
  const retVal = (output || [])
2840
1907
  .filter((e) => e != null)
2841
1908
  .map((entry) => {
2842
- if (entry === null) {
2843
- return null;
2844
- }
2845
1909
  return de_VolumeRecommendation(entry, context);
2846
1910
  });
2847
1911
  return retVal;
@@ -2859,6 +1923,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2859
1923
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2860
1924
  };
2861
1925
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1926
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ComputeOptimizerServiceException_1.ComputeOptimizerServiceException);
2862
1927
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2863
1928
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2864
1929
  const contents = {