@aws-sdk/client-application-auto-scaling 3.312.0 → 3.316.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,56 +8,56 @@ const models_0_1 = require("../models/models_0");
8
8
  const se_DeleteScalingPolicyCommand = async (input, context) => {
9
9
  const headers = sharedHeaders("DeleteScalingPolicy");
10
10
  let body;
11
- body = JSON.stringify(se_DeleteScalingPolicyRequest(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_DeleteScalingPolicyCommand = se_DeleteScalingPolicyCommand;
15
15
  const se_DeleteScheduledActionCommand = async (input, context) => {
16
16
  const headers = sharedHeaders("DeleteScheduledAction");
17
17
  let body;
18
- body = JSON.stringify(se_DeleteScheduledActionRequest(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_DeleteScheduledActionCommand = se_DeleteScheduledActionCommand;
22
22
  const se_DeregisterScalableTargetCommand = async (input, context) => {
23
23
  const headers = sharedHeaders("DeregisterScalableTarget");
24
24
  let body;
25
- body = JSON.stringify(se_DeregisterScalableTargetRequest(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_DeregisterScalableTargetCommand = se_DeregisterScalableTargetCommand;
29
29
  const se_DescribeScalableTargetsCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("DescribeScalableTargets");
31
31
  let body;
32
- body = JSON.stringify(se_DescribeScalableTargetsRequest(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_DescribeScalableTargetsCommand = se_DescribeScalableTargetsCommand;
36
36
  const se_DescribeScalingActivitiesCommand = async (input, context) => {
37
37
  const headers = sharedHeaders("DescribeScalingActivities");
38
38
  let body;
39
- body = JSON.stringify(se_DescribeScalingActivitiesRequest(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_DescribeScalingActivitiesCommand = se_DescribeScalingActivitiesCommand;
43
43
  const se_DescribeScalingPoliciesCommand = async (input, context) => {
44
44
  const headers = sharedHeaders("DescribeScalingPolicies");
45
45
  let body;
46
- body = JSON.stringify(se_DescribeScalingPoliciesRequest(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_DescribeScalingPoliciesCommand = se_DescribeScalingPoliciesCommand;
50
50
  const se_DescribeScheduledActionsCommand = async (input, context) => {
51
51
  const headers = sharedHeaders("DescribeScheduledActions");
52
52
  let body;
53
- body = JSON.stringify(se_DescribeScheduledActionsRequest(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_DescribeScheduledActionsCommand = se_DescribeScheduledActionsCommand;
57
57
  const se_ListTagsForResourceCommand = async (input, context) => {
58
58
  const headers = sharedHeaders("ListTagsForResource");
59
59
  let body;
60
- body = JSON.stringify(se_ListTagsForResourceRequest(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_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
@@ -78,21 +78,21 @@ exports.se_PutScheduledActionCommand = se_PutScheduledActionCommand;
78
78
  const se_RegisterScalableTargetCommand = async (input, context) => {
79
79
  const headers = sharedHeaders("RegisterScalableTarget");
80
80
  let body;
81
- body = JSON.stringify(se_RegisterScalableTargetRequest(input, context));
81
+ body = JSON.stringify((0, smithy_client_1._json)(input));
82
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
83
  };
84
84
  exports.se_RegisterScalableTargetCommand = se_RegisterScalableTargetCommand;
85
85
  const se_TagResourceCommand = async (input, context) => {
86
86
  const headers = sharedHeaders("TagResource");
87
87
  let body;
88
- body = JSON.stringify(se_TagResourceRequest(input, context));
88
+ body = JSON.stringify((0, smithy_client_1._json)(input));
89
89
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
90
90
  };
91
91
  exports.se_TagResourceCommand = se_TagResourceCommand;
92
92
  const se_UntagResourceCommand = async (input, context) => {
93
93
  const headers = sharedHeaders("UntagResource");
94
94
  let body;
95
- body = JSON.stringify(se_UntagResourceRequest(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_UntagResourceCommand = se_UntagResourceCommand;
@@ -102,12 +102,12 @@ const de_DeleteScalingPolicyCommand = async (output, context) => {
102
102
  }
103
103
  const data = await parseBody(output.body, context);
104
104
  let contents = {};
105
- contents = de_DeleteScalingPolicyResponse(data, context);
105
+ contents = (0, smithy_client_1._json)(data);
106
106
  const response = {
107
107
  $metadata: deserializeMetadata(output),
108
108
  ...contents,
109
109
  };
110
- return Promise.resolve(response);
110
+ return response;
111
111
  };
112
112
  exports.de_DeleteScalingPolicyCommand = de_DeleteScalingPolicyCommand;
113
113
  const de_DeleteScalingPolicyCommandError = async (output, context) => {
@@ -131,10 +131,9 @@ const de_DeleteScalingPolicyCommandError = async (output, context) => {
131
131
  throw await de_ValidationExceptionRes(parsedOutput, context);
132
132
  default:
133
133
  const parsedBody = parsedOutput.body;
134
- (0, smithy_client_1.throwDefaultError)({
134
+ return throwDefaultError({
135
135
  output,
136
136
  parsedBody,
137
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
138
137
  errorCode,
139
138
  });
140
139
  }
@@ -145,12 +144,12 @@ const de_DeleteScheduledActionCommand = async (output, context) => {
145
144
  }
146
145
  const data = await parseBody(output.body, context);
147
146
  let contents = {};
148
- contents = de_DeleteScheduledActionResponse(data, context);
147
+ contents = (0, smithy_client_1._json)(data);
149
148
  const response = {
150
149
  $metadata: deserializeMetadata(output),
151
150
  ...contents,
152
151
  };
153
- return Promise.resolve(response);
152
+ return response;
154
153
  };
155
154
  exports.de_DeleteScheduledActionCommand = de_DeleteScheduledActionCommand;
156
155
  const de_DeleteScheduledActionCommandError = async (output, context) => {
@@ -174,10 +173,9 @@ const de_DeleteScheduledActionCommandError = async (output, context) => {
174
173
  throw await de_ValidationExceptionRes(parsedOutput, context);
175
174
  default:
176
175
  const parsedBody = parsedOutput.body;
177
- (0, smithy_client_1.throwDefaultError)({
176
+ return throwDefaultError({
178
177
  output,
179
178
  parsedBody,
180
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
181
179
  errorCode,
182
180
  });
183
181
  }
@@ -188,12 +186,12 @@ const de_DeregisterScalableTargetCommand = async (output, context) => {
188
186
  }
189
187
  const data = await parseBody(output.body, context);
190
188
  let contents = {};
191
- contents = de_DeregisterScalableTargetResponse(data, context);
189
+ contents = (0, smithy_client_1._json)(data);
192
190
  const response = {
193
191
  $metadata: deserializeMetadata(output),
194
192
  ...contents,
195
193
  };
196
- return Promise.resolve(response);
194
+ return response;
197
195
  };
198
196
  exports.de_DeregisterScalableTargetCommand = de_DeregisterScalableTargetCommand;
199
197
  const de_DeregisterScalableTargetCommandError = async (output, context) => {
@@ -217,10 +215,9 @@ const de_DeregisterScalableTargetCommandError = async (output, context) => {
217
215
  throw await de_ValidationExceptionRes(parsedOutput, context);
218
216
  default:
219
217
  const parsedBody = parsedOutput.body;
220
- (0, smithy_client_1.throwDefaultError)({
218
+ return throwDefaultError({
221
219
  output,
222
220
  parsedBody,
223
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
224
221
  errorCode,
225
222
  });
226
223
  }
@@ -236,7 +233,7 @@ const de_DescribeScalableTargetsCommand = async (output, context) => {
236
233
  $metadata: deserializeMetadata(output),
237
234
  ...contents,
238
235
  };
239
- return Promise.resolve(response);
236
+ return response;
240
237
  };
241
238
  exports.de_DescribeScalableTargetsCommand = de_DescribeScalableTargetsCommand;
242
239
  const de_DescribeScalableTargetsCommandError = async (output, context) => {
@@ -260,10 +257,9 @@ const de_DescribeScalableTargetsCommandError = async (output, context) => {
260
257
  throw await de_ValidationExceptionRes(parsedOutput, context);
261
258
  default:
262
259
  const parsedBody = parsedOutput.body;
263
- (0, smithy_client_1.throwDefaultError)({
260
+ return throwDefaultError({
264
261
  output,
265
262
  parsedBody,
266
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
267
263
  errorCode,
268
264
  });
269
265
  }
@@ -279,7 +275,7 @@ const de_DescribeScalingActivitiesCommand = async (output, context) => {
279
275
  $metadata: deserializeMetadata(output),
280
276
  ...contents,
281
277
  };
282
- return Promise.resolve(response);
278
+ return response;
283
279
  };
284
280
  exports.de_DescribeScalingActivitiesCommand = de_DescribeScalingActivitiesCommand;
285
281
  const de_DescribeScalingActivitiesCommandError = async (output, context) => {
@@ -303,10 +299,9 @@ const de_DescribeScalingActivitiesCommandError = async (output, context) => {
303
299
  throw await de_ValidationExceptionRes(parsedOutput, context);
304
300
  default:
305
301
  const parsedBody = parsedOutput.body;
306
- (0, smithy_client_1.throwDefaultError)({
302
+ return throwDefaultError({
307
303
  output,
308
304
  parsedBody,
309
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
310
305
  errorCode,
311
306
  });
312
307
  }
@@ -322,7 +317,7 @@ const de_DescribeScalingPoliciesCommand = async (output, context) => {
322
317
  $metadata: deserializeMetadata(output),
323
318
  ...contents,
324
319
  };
325
- return Promise.resolve(response);
320
+ return response;
326
321
  };
327
322
  exports.de_DescribeScalingPoliciesCommand = de_DescribeScalingPoliciesCommand;
328
323
  const de_DescribeScalingPoliciesCommandError = async (output, context) => {
@@ -349,10 +344,9 @@ const de_DescribeScalingPoliciesCommandError = async (output, context) => {
349
344
  throw await de_ValidationExceptionRes(parsedOutput, context);
350
345
  default:
351
346
  const parsedBody = parsedOutput.body;
352
- (0, smithy_client_1.throwDefaultError)({
347
+ return throwDefaultError({
353
348
  output,
354
349
  parsedBody,
355
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
356
350
  errorCode,
357
351
  });
358
352
  }
@@ -368,7 +362,7 @@ const de_DescribeScheduledActionsCommand = async (output, context) => {
368
362
  $metadata: deserializeMetadata(output),
369
363
  ...contents,
370
364
  };
371
- return Promise.resolve(response);
365
+ return response;
372
366
  };
373
367
  exports.de_DescribeScheduledActionsCommand = de_DescribeScheduledActionsCommand;
374
368
  const de_DescribeScheduledActionsCommandError = async (output, context) => {
@@ -392,10 +386,9 @@ const de_DescribeScheduledActionsCommandError = async (output, context) => {
392
386
  throw await de_ValidationExceptionRes(parsedOutput, context);
393
387
  default:
394
388
  const parsedBody = parsedOutput.body;
395
- (0, smithy_client_1.throwDefaultError)({
389
+ return throwDefaultError({
396
390
  output,
397
391
  parsedBody,
398
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
399
392
  errorCode,
400
393
  });
401
394
  }
@@ -406,12 +399,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
406
399
  }
407
400
  const data = await parseBody(output.body, context);
408
401
  let contents = {};
409
- contents = de_ListTagsForResourceResponse(data, context);
402
+ contents = (0, smithy_client_1._json)(data);
410
403
  const response = {
411
404
  $metadata: deserializeMetadata(output),
412
405
  ...contents,
413
406
  };
414
- return Promise.resolve(response);
407
+ return response;
415
408
  };
416
409
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
417
410
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -426,10 +419,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
426
419
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
427
420
  default:
428
421
  const parsedBody = parsedOutput.body;
429
- (0, smithy_client_1.throwDefaultError)({
422
+ return throwDefaultError({
430
423
  output,
431
424
  parsedBody,
432
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
433
425
  errorCode,
434
426
  });
435
427
  }
@@ -440,12 +432,12 @@ const de_PutScalingPolicyCommand = async (output, context) => {
440
432
  }
441
433
  const data = await parseBody(output.body, context);
442
434
  let contents = {};
443
- contents = de_PutScalingPolicyResponse(data, context);
435
+ contents = (0, smithy_client_1._json)(data);
444
436
  const response = {
445
437
  $metadata: deserializeMetadata(output),
446
438
  ...contents,
447
439
  };
448
- return Promise.resolve(response);
440
+ return response;
449
441
  };
450
442
  exports.de_PutScalingPolicyCommand = de_PutScalingPolicyCommand;
451
443
  const de_PutScalingPolicyCommandError = async (output, context) => {
@@ -475,10 +467,9 @@ const de_PutScalingPolicyCommandError = async (output, context) => {
475
467
  throw await de_ValidationExceptionRes(parsedOutput, context);
476
468
  default:
477
469
  const parsedBody = parsedOutput.body;
478
- (0, smithy_client_1.throwDefaultError)({
470
+ return throwDefaultError({
479
471
  output,
480
472
  parsedBody,
481
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
482
473
  errorCode,
483
474
  });
484
475
  }
@@ -489,12 +480,12 @@ const de_PutScheduledActionCommand = async (output, context) => {
489
480
  }
490
481
  const data = await parseBody(output.body, context);
491
482
  let contents = {};
492
- contents = de_PutScheduledActionResponse(data, context);
483
+ contents = (0, smithy_client_1._json)(data);
493
484
  const response = {
494
485
  $metadata: deserializeMetadata(output),
495
486
  ...contents,
496
487
  };
497
- return Promise.resolve(response);
488
+ return response;
498
489
  };
499
490
  exports.de_PutScheduledActionCommand = de_PutScheduledActionCommand;
500
491
  const de_PutScheduledActionCommandError = async (output, context) => {
@@ -521,10 +512,9 @@ const de_PutScheduledActionCommandError = async (output, context) => {
521
512
  throw await de_ValidationExceptionRes(parsedOutput, context);
522
513
  default:
523
514
  const parsedBody = parsedOutput.body;
524
- (0, smithy_client_1.throwDefaultError)({
515
+ return throwDefaultError({
525
516
  output,
526
517
  parsedBody,
527
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
528
518
  errorCode,
529
519
  });
530
520
  }
@@ -535,12 +525,12 @@ const de_RegisterScalableTargetCommand = async (output, context) => {
535
525
  }
536
526
  const data = await parseBody(output.body, context);
537
527
  let contents = {};
538
- contents = de_RegisterScalableTargetResponse(data, context);
528
+ contents = (0, smithy_client_1._json)(data);
539
529
  const response = {
540
530
  $metadata: deserializeMetadata(output),
541
531
  ...contents,
542
532
  };
543
- return Promise.resolve(response);
533
+ return response;
544
534
  };
545
535
  exports.de_RegisterScalableTargetCommand = de_RegisterScalableTargetCommand;
546
536
  const de_RegisterScalableTargetCommandError = async (output, context) => {
@@ -564,10 +554,9 @@ const de_RegisterScalableTargetCommandError = async (output, context) => {
564
554
  throw await de_ValidationExceptionRes(parsedOutput, context);
565
555
  default:
566
556
  const parsedBody = parsedOutput.body;
567
- (0, smithy_client_1.throwDefaultError)({
557
+ return throwDefaultError({
568
558
  output,
569
559
  parsedBody,
570
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
571
560
  errorCode,
572
561
  });
573
562
  }
@@ -578,12 +567,12 @@ const de_TagResourceCommand = async (output, context) => {
578
567
  }
579
568
  const data = await parseBody(output.body, context);
580
569
  let contents = {};
581
- contents = de_TagResourceResponse(data, context);
570
+ contents = (0, smithy_client_1._json)(data);
582
571
  const response = {
583
572
  $metadata: deserializeMetadata(output),
584
573
  ...contents,
585
574
  };
586
- return Promise.resolve(response);
575
+ return response;
587
576
  };
588
577
  exports.de_TagResourceCommand = de_TagResourceCommand;
589
578
  const de_TagResourceCommandError = async (output, context) => {
@@ -604,10 +593,9 @@ const de_TagResourceCommandError = async (output, context) => {
604
593
  throw await de_ValidationExceptionRes(parsedOutput, context);
605
594
  default:
606
595
  const parsedBody = parsedOutput.body;
607
- (0, smithy_client_1.throwDefaultError)({
596
+ return throwDefaultError({
608
597
  output,
609
598
  parsedBody,
610
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
611
599
  errorCode,
612
600
  });
613
601
  }
@@ -618,12 +606,12 @@ const de_UntagResourceCommand = async (output, context) => {
618
606
  }
619
607
  const data = await parseBody(output.body, context);
620
608
  let contents = {};
621
- contents = de_UntagResourceResponse(data, context);
609
+ contents = (0, smithy_client_1._json)(data);
622
610
  const response = {
623
611
  $metadata: deserializeMetadata(output),
624
612
  ...contents,
625
613
  };
626
- return Promise.resolve(response);
614
+ return response;
627
615
  };
628
616
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
629
617
  const de_UntagResourceCommandError = async (output, context) => {
@@ -641,17 +629,16 @@ const de_UntagResourceCommandError = async (output, context) => {
641
629
  throw await de_ValidationExceptionRes(parsedOutput, context);
642
630
  default:
643
631
  const parsedBody = parsedOutput.body;
644
- (0, smithy_client_1.throwDefaultError)({
632
+ return throwDefaultError({
645
633
  output,
646
634
  parsedBody,
647
- exceptionCtor: ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException,
648
635
  errorCode,
649
636
  });
650
637
  }
651
638
  };
652
639
  const de_ConcurrentUpdateExceptionRes = async (parsedOutput, context) => {
653
640
  const body = parsedOutput.body;
654
- const deserialized = de_ConcurrentUpdateException(body, context);
641
+ const deserialized = (0, smithy_client_1._json)(body);
655
642
  const exception = new models_0_1.ConcurrentUpdateException({
656
643
  $metadata: deserializeMetadata(parsedOutput),
657
644
  ...deserialized,
@@ -660,7 +647,7 @@ const de_ConcurrentUpdateExceptionRes = async (parsedOutput, context) => {
660
647
  };
661
648
  const de_FailedResourceAccessExceptionRes = async (parsedOutput, context) => {
662
649
  const body = parsedOutput.body;
663
- const deserialized = de_FailedResourceAccessException(body, context);
650
+ const deserialized = (0, smithy_client_1._json)(body);
664
651
  const exception = new models_0_1.FailedResourceAccessException({
665
652
  $metadata: deserializeMetadata(parsedOutput),
666
653
  ...deserialized,
@@ -669,7 +656,7 @@ const de_FailedResourceAccessExceptionRes = async (parsedOutput, context) => {
669
656
  };
670
657
  const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
671
658
  const body = parsedOutput.body;
672
- const deserialized = de_InternalServiceException(body, context);
659
+ const deserialized = (0, smithy_client_1._json)(body);
673
660
  const exception = new models_0_1.InternalServiceException({
674
661
  $metadata: deserializeMetadata(parsedOutput),
675
662
  ...deserialized,
@@ -678,7 +665,7 @@ const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
678
665
  };
679
666
  const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
680
667
  const body = parsedOutput.body;
681
- const deserialized = de_InvalidNextTokenException(body, context);
668
+ const deserialized = (0, smithy_client_1._json)(body);
682
669
  const exception = new models_0_1.InvalidNextTokenException({
683
670
  $metadata: deserializeMetadata(parsedOutput),
684
671
  ...deserialized,
@@ -687,7 +674,7 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
687
674
  };
688
675
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
689
676
  const body = parsedOutput.body;
690
- const deserialized = de_LimitExceededException(body, context);
677
+ const deserialized = (0, smithy_client_1._json)(body);
691
678
  const exception = new models_0_1.LimitExceededException({
692
679
  $metadata: deserializeMetadata(parsedOutput),
693
680
  ...deserialized,
@@ -696,7 +683,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
696
683
  };
697
684
  const de_ObjectNotFoundExceptionRes = async (parsedOutput, context) => {
698
685
  const body = parsedOutput.body;
699
- const deserialized = de_ObjectNotFoundException(body, context);
686
+ const deserialized = (0, smithy_client_1._json)(body);
700
687
  const exception = new models_0_1.ObjectNotFoundException({
701
688
  $metadata: deserializeMetadata(parsedOutput),
702
689
  ...deserialized,
@@ -705,7 +692,7 @@ const de_ObjectNotFoundExceptionRes = async (parsedOutput, context) => {
705
692
  };
706
693
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
707
694
  const body = parsedOutput.body;
708
- const deserialized = de_ResourceNotFoundException(body, context);
695
+ const deserialized = (0, smithy_client_1._json)(body);
709
696
  const exception = new models_0_1.ResourceNotFoundException({
710
697
  $metadata: deserializeMetadata(parsedOutput),
711
698
  ...deserialized,
@@ -714,7 +701,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
714
701
  };
715
702
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
716
703
  const body = parsedOutput.body;
717
- const deserialized = de_TooManyTagsException(body, context);
704
+ const deserialized = (0, smithy_client_1._json)(body);
718
705
  const exception = new models_0_1.TooManyTagsException({
719
706
  $metadata: deserializeMetadata(parsedOutput),
720
707
  ...deserialized,
@@ -723,176 +710,43 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
723
710
  };
724
711
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
725
712
  const body = parsedOutput.body;
726
- const deserialized = de_ValidationException(body, context);
713
+ const deserialized = (0, smithy_client_1._json)(body);
727
714
  const exception = new models_0_1.ValidationException({
728
715
  $metadata: deserializeMetadata(parsedOutput),
729
716
  ...deserialized,
730
717
  });
731
718
  return (0, smithy_client_1.decorateServiceException)(exception, body);
732
719
  };
733
- const se_CustomizedMetricSpecification = (input, context) => {
734
- return {
735
- ...(input.Dimensions != null && { Dimensions: se_MetricDimensions(input.Dimensions, context) }),
736
- ...(input.MetricName != null && { MetricName: input.MetricName }),
737
- ...(input.Metrics != null && { Metrics: se_TargetTrackingMetricDataQueries(input.Metrics, context) }),
738
- ...(input.Namespace != null && { Namespace: input.Namespace }),
739
- ...(input.Statistic != null && { Statistic: input.Statistic }),
740
- ...(input.Unit != null && { Unit: input.Unit }),
741
- };
742
- };
743
- const se_DeleteScalingPolicyRequest = (input, context) => {
744
- return {
745
- ...(input.PolicyName != null && { PolicyName: input.PolicyName }),
746
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
747
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
748
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
749
- };
750
- };
751
- const se_DeleteScheduledActionRequest = (input, context) => {
752
- return {
753
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
754
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
755
- ...(input.ScheduledActionName != null && { ScheduledActionName: input.ScheduledActionName }),
756
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
757
- };
758
- };
759
- const se_DeregisterScalableTargetRequest = (input, context) => {
760
- return {
761
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
762
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
763
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
764
- };
765
- };
766
- const se_DescribeScalableTargetsRequest = (input, context) => {
767
- return {
768
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
769
- ...(input.NextToken != null && { NextToken: input.NextToken }),
770
- ...(input.ResourceIds != null && { ResourceIds: se_ResourceIdsMaxLen1600(input.ResourceIds, context) }),
771
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
772
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
773
- };
774
- };
775
- const se_DescribeScalingActivitiesRequest = (input, context) => {
776
- return {
777
- ...(input.IncludeNotScaledActivities != null && { IncludeNotScaledActivities: input.IncludeNotScaledActivities }),
778
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
779
- ...(input.NextToken != null && { NextToken: input.NextToken }),
780
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
781
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
782
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
783
- };
784
- };
785
- const se_DescribeScalingPoliciesRequest = (input, context) => {
786
- return {
787
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
788
- ...(input.NextToken != null && { NextToken: input.NextToken }),
789
- ...(input.PolicyNames != null && { PolicyNames: se_ResourceIdsMaxLen1600(input.PolicyNames, context) }),
790
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
791
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
792
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
793
- };
794
- };
795
- const se_DescribeScheduledActionsRequest = (input, context) => {
796
- return {
797
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
798
- ...(input.NextToken != null && { NextToken: input.NextToken }),
799
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
800
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
801
- ...(input.ScheduledActionNames != null && {
802
- ScheduledActionNames: se_ResourceIdsMaxLen1600(input.ScheduledActionNames, context),
803
- }),
804
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
805
- };
806
- };
807
- const se_ListTagsForResourceRequest = (input, context) => {
808
- return {
809
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
810
- };
811
- };
812
- const se_MetricDimension = (input, context) => {
813
- return {
814
- ...(input.Name != null && { Name: input.Name }),
815
- ...(input.Value != null && { Value: input.Value }),
816
- };
817
- };
818
- const se_MetricDimensions = (input, context) => {
819
- return input
820
- .filter((e) => e != null)
821
- .map((entry) => {
822
- return se_MetricDimension(entry, context);
823
- });
824
- };
825
- const se_PredefinedMetricSpecification = (input, context) => {
826
- return {
827
- ...(input.PredefinedMetricType != null && { PredefinedMetricType: input.PredefinedMetricType }),
828
- ...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }),
829
- };
830
- };
831
720
  const se_PutScalingPolicyRequest = (input, context) => {
832
- return {
833
- ...(input.PolicyName != null && { PolicyName: input.PolicyName }),
834
- ...(input.PolicyType != null && { PolicyType: input.PolicyType }),
835
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
836
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
837
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
838
- ...(input.StepScalingPolicyConfiguration != null && {
839
- StepScalingPolicyConfiguration: se_StepScalingPolicyConfiguration(input.StepScalingPolicyConfiguration, context),
840
- }),
841
- ...(input.TargetTrackingScalingPolicyConfiguration != null && {
842
- TargetTrackingScalingPolicyConfiguration: se_TargetTrackingScalingPolicyConfiguration(input.TargetTrackingScalingPolicyConfiguration, context),
843
- }),
844
- };
721
+ return (0, smithy_client_1.take)(input, {
722
+ PolicyName: [],
723
+ PolicyType: [],
724
+ ResourceId: [],
725
+ ScalableDimension: [],
726
+ ServiceNamespace: [],
727
+ StepScalingPolicyConfiguration: (_) => se_StepScalingPolicyConfiguration(_, context),
728
+ TargetTrackingScalingPolicyConfiguration: (_) => se_TargetTrackingScalingPolicyConfiguration(_, context),
729
+ });
845
730
  };
846
731
  const se_PutScheduledActionRequest = (input, context) => {
847
- return {
848
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
849
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
850
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
851
- ...(input.ScalableTargetAction != null && {
852
- ScalableTargetAction: se_ScalableTargetAction(input.ScalableTargetAction, context),
853
- }),
854
- ...(input.Schedule != null && { Schedule: input.Schedule }),
855
- ...(input.ScheduledActionName != null && { ScheduledActionName: input.ScheduledActionName }),
856
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
857
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
858
- ...(input.Timezone != null && { Timezone: input.Timezone }),
859
- };
860
- };
861
- const se_RegisterScalableTargetRequest = (input, context) => {
862
- return {
863
- ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }),
864
- ...(input.MinCapacity != null && { MinCapacity: input.MinCapacity }),
865
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
866
- ...(input.RoleARN != null && { RoleARN: input.RoleARN }),
867
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
868
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
869
- ...(input.SuspendedState != null && { SuspendedState: se_SuspendedState(input.SuspendedState, context) }),
870
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
871
- };
872
- };
873
- const se_ResourceIdsMaxLen1600 = (input, context) => {
874
- return input
875
- .filter((e) => e != null)
876
- .map((entry) => {
877
- return entry;
732
+ return (0, smithy_client_1.take)(input, {
733
+ EndTime: (_) => Math.round(_.getTime() / 1000),
734
+ ResourceId: [],
735
+ ScalableDimension: [],
736
+ ScalableTargetAction: smithy_client_1._json,
737
+ Schedule: [],
738
+ ScheduledActionName: [],
739
+ ServiceNamespace: [],
740
+ StartTime: (_) => Math.round(_.getTime() / 1000),
741
+ Timezone: [],
878
742
  });
879
743
  };
880
- const se_ScalableTargetAction = (input, context) => {
881
- return {
882
- ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }),
883
- ...(input.MinCapacity != null && { MinCapacity: input.MinCapacity }),
884
- };
885
- };
886
744
  const se_StepAdjustment = (input, context) => {
887
- return {
888
- ...(input.MetricIntervalLowerBound != null && {
889
- MetricIntervalLowerBound: (0, smithy_client_1.serializeFloat)(input.MetricIntervalLowerBound),
890
- }),
891
- ...(input.MetricIntervalUpperBound != null && {
892
- MetricIntervalUpperBound: (0, smithy_client_1.serializeFloat)(input.MetricIntervalUpperBound),
893
- }),
894
- ...(input.ScalingAdjustment != null && { ScalingAdjustment: input.ScalingAdjustment }),
895
- };
745
+ return (0, smithy_client_1.take)(input, {
746
+ MetricIntervalLowerBound: smithy_client_1.serializeFloat,
747
+ MetricIntervalUpperBound: smithy_client_1.serializeFloat,
748
+ ScalingAdjustment: [],
749
+ });
896
750
  };
897
751
  const se_StepAdjustments = (input, context) => {
898
752
  return input
@@ -902,291 +756,65 @@ const se_StepAdjustments = (input, context) => {
902
756
  });
903
757
  };
904
758
  const se_StepScalingPolicyConfiguration = (input, context) => {
905
- return {
906
- ...(input.AdjustmentType != null && { AdjustmentType: input.AdjustmentType }),
907
- ...(input.Cooldown != null && { Cooldown: input.Cooldown }),
908
- ...(input.MetricAggregationType != null && { MetricAggregationType: input.MetricAggregationType }),
909
- ...(input.MinAdjustmentMagnitude != null && { MinAdjustmentMagnitude: input.MinAdjustmentMagnitude }),
910
- ...(input.StepAdjustments != null && { StepAdjustments: se_StepAdjustments(input.StepAdjustments, context) }),
911
- };
912
- };
913
- const se_SuspendedState = (input, context) => {
914
- return {
915
- ...(input.DynamicScalingInSuspended != null && { DynamicScalingInSuspended: input.DynamicScalingInSuspended }),
916
- ...(input.DynamicScalingOutSuspended != null && { DynamicScalingOutSuspended: input.DynamicScalingOutSuspended }),
917
- ...(input.ScheduledScalingSuspended != null && { ScheduledScalingSuspended: input.ScheduledScalingSuspended }),
918
- };
919
- };
920
- const se_TagKeyList = (input, context) => {
921
- return input
922
- .filter((e) => e != null)
923
- .map((entry) => {
924
- return entry;
925
- });
926
- };
927
- const se_TagMap = (input, context) => {
928
- return Object.entries(input).reduce((acc, [key, value]) => {
929
- if (value === null) {
930
- return acc;
931
- }
932
- acc[key] = value;
933
- return acc;
934
- }, {});
935
- };
936
- const se_TagResourceRequest = (input, context) => {
937
- return {
938
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
939
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
940
- };
941
- };
942
- const se_TargetTrackingMetric = (input, context) => {
943
- return {
944
- ...(input.Dimensions != null && { Dimensions: se_TargetTrackingMetricDimensions(input.Dimensions, context) }),
945
- ...(input.MetricName != null && { MetricName: input.MetricName }),
946
- ...(input.Namespace != null && { Namespace: input.Namespace }),
947
- };
948
- };
949
- const se_TargetTrackingMetricDataQueries = (input, context) => {
950
- return input
951
- .filter((e) => e != null)
952
- .map((entry) => {
953
- return se_TargetTrackingMetricDataQuery(entry, context);
759
+ return (0, smithy_client_1.take)(input, {
760
+ AdjustmentType: [],
761
+ Cooldown: [],
762
+ MetricAggregationType: [],
763
+ MinAdjustmentMagnitude: [],
764
+ StepAdjustments: (_) => se_StepAdjustments(_, context),
954
765
  });
955
766
  };
956
- const se_TargetTrackingMetricDataQuery = (input, context) => {
957
- return {
958
- ...(input.Expression != null && { Expression: input.Expression }),
959
- ...(input.Id != null && { Id: input.Id }),
960
- ...(input.Label != null && { Label: input.Label }),
961
- ...(input.MetricStat != null && { MetricStat: se_TargetTrackingMetricStat(input.MetricStat, context) }),
962
- ...(input.ReturnData != null && { ReturnData: input.ReturnData }),
963
- };
964
- };
965
- const se_TargetTrackingMetricDimension = (input, context) => {
966
- return {
967
- ...(input.Name != null && { Name: input.Name }),
968
- ...(input.Value != null && { Value: input.Value }),
969
- };
970
- };
971
- const se_TargetTrackingMetricDimensions = (input, context) => {
972
- return input
973
- .filter((e) => e != null)
974
- .map((entry) => {
975
- return se_TargetTrackingMetricDimension(entry, context);
976
- });
977
- };
978
- const se_TargetTrackingMetricStat = (input, context) => {
979
- return {
980
- ...(input.Metric != null && { Metric: se_TargetTrackingMetric(input.Metric, context) }),
981
- ...(input.Stat != null && { Stat: input.Stat }),
982
- ...(input.Unit != null && { Unit: input.Unit }),
983
- };
984
- };
985
767
  const se_TargetTrackingScalingPolicyConfiguration = (input, context) => {
986
- return {
987
- ...(input.CustomizedMetricSpecification != null && {
988
- CustomizedMetricSpecification: se_CustomizedMetricSpecification(input.CustomizedMetricSpecification, context),
989
- }),
990
- ...(input.DisableScaleIn != null && { DisableScaleIn: input.DisableScaleIn }),
991
- ...(input.PredefinedMetricSpecification != null && {
992
- PredefinedMetricSpecification: se_PredefinedMetricSpecification(input.PredefinedMetricSpecification, context),
993
- }),
994
- ...(input.ScaleInCooldown != null && { ScaleInCooldown: input.ScaleInCooldown }),
995
- ...(input.ScaleOutCooldown != null && { ScaleOutCooldown: input.ScaleOutCooldown }),
996
- ...(input.TargetValue != null && { TargetValue: (0, smithy_client_1.serializeFloat)(input.TargetValue) }),
997
- };
998
- };
999
- const se_UntagResourceRequest = (input, context) => {
1000
- return {
1001
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1002
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1003
- };
1004
- };
1005
- const de_Alarm = (output, context) => {
1006
- return {
1007
- AlarmARN: (0, smithy_client_1.expectString)(output.AlarmARN),
1008
- AlarmName: (0, smithy_client_1.expectString)(output.AlarmName),
1009
- };
1010
- };
1011
- const de_Alarms = (output, context) => {
1012
- const retVal = (output || [])
1013
- .filter((e) => e != null)
1014
- .map((entry) => {
1015
- if (entry === null) {
1016
- return null;
1017
- }
1018
- return de_Alarm(entry, context);
768
+ return (0, smithy_client_1.take)(input, {
769
+ CustomizedMetricSpecification: smithy_client_1._json,
770
+ DisableScaleIn: [],
771
+ PredefinedMetricSpecification: smithy_client_1._json,
772
+ ScaleInCooldown: [],
773
+ ScaleOutCooldown: [],
774
+ TargetValue: smithy_client_1.serializeFloat,
1019
775
  });
1020
- return retVal;
1021
- };
1022
- const de_ConcurrentUpdateException = (output, context) => {
1023
- return {
1024
- Message: (0, smithy_client_1.expectString)(output.Message),
1025
- };
1026
- };
1027
- const de_CustomizedMetricSpecification = (output, context) => {
1028
- return {
1029
- Dimensions: output.Dimensions != null ? de_MetricDimensions(output.Dimensions, context) : undefined,
1030
- MetricName: (0, smithy_client_1.expectString)(output.MetricName),
1031
- Metrics: output.Metrics != null ? de_TargetTrackingMetricDataQueries(output.Metrics, context) : undefined,
1032
- Namespace: (0, smithy_client_1.expectString)(output.Namespace),
1033
- Statistic: (0, smithy_client_1.expectString)(output.Statistic),
1034
- Unit: (0, smithy_client_1.expectString)(output.Unit),
1035
- };
1036
- };
1037
- const de_DeleteScalingPolicyResponse = (output, context) => {
1038
- return {};
1039
- };
1040
- const de_DeleteScheduledActionResponse = (output, context) => {
1041
- return {};
1042
- };
1043
- const de_DeregisterScalableTargetResponse = (output, context) => {
1044
- return {};
1045
776
  };
1046
777
  const de_DescribeScalableTargetsResponse = (output, context) => {
1047
- return {
1048
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1049
- ScalableTargets: output.ScalableTargets != null ? de_ScalableTargets(output.ScalableTargets, context) : undefined,
1050
- };
778
+ return (0, smithy_client_1.take)(output, {
779
+ NextToken: smithy_client_1.expectString,
780
+ ScalableTargets: (_) => de_ScalableTargets(_, context),
781
+ });
1051
782
  };
1052
783
  const de_DescribeScalingActivitiesResponse = (output, context) => {
1053
- return {
1054
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1055
- ScalingActivities: output.ScalingActivities != null ? de_ScalingActivities(output.ScalingActivities, context) : undefined,
1056
- };
784
+ return (0, smithy_client_1.take)(output, {
785
+ NextToken: smithy_client_1.expectString,
786
+ ScalingActivities: (_) => de_ScalingActivities(_, context),
787
+ });
1057
788
  };
1058
789
  const de_DescribeScalingPoliciesResponse = (output, context) => {
1059
- return {
1060
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1061
- ScalingPolicies: output.ScalingPolicies != null ? de_ScalingPolicies(output.ScalingPolicies, context) : undefined,
1062
- };
1063
- };
1064
- const de_DescribeScheduledActionsResponse = (output, context) => {
1065
- return {
1066
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1067
- ScheduledActions: output.ScheduledActions != null ? de_ScheduledActions(output.ScheduledActions, context) : undefined,
1068
- };
1069
- };
1070
- const de_FailedResourceAccessException = (output, context) => {
1071
- return {
1072
- Message: (0, smithy_client_1.expectString)(output.Message),
1073
- };
1074
- };
1075
- const de_InternalServiceException = (output, context) => {
1076
- return {
1077
- Message: (0, smithy_client_1.expectString)(output.Message),
1078
- };
1079
- };
1080
- const de_InvalidNextTokenException = (output, context) => {
1081
- return {
1082
- Message: (0, smithy_client_1.expectString)(output.Message),
1083
- };
1084
- };
1085
- const de_LimitExceededException = (output, context) => {
1086
- return {
1087
- Message: (0, smithy_client_1.expectString)(output.Message),
1088
- };
1089
- };
1090
- const de_ListTagsForResourceResponse = (output, context) => {
1091
- return {
1092
- Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined,
1093
- };
1094
- };
1095
- const de_MetricDimension = (output, context) => {
1096
- return {
1097
- Name: (0, smithy_client_1.expectString)(output.Name),
1098
- Value: (0, smithy_client_1.expectString)(output.Value),
1099
- };
1100
- };
1101
- const de_MetricDimensions = (output, context) => {
1102
- const retVal = (output || [])
1103
- .filter((e) => e != null)
1104
- .map((entry) => {
1105
- if (entry === null) {
1106
- return null;
1107
- }
1108
- return de_MetricDimension(entry, context);
790
+ return (0, smithy_client_1.take)(output, {
791
+ NextToken: smithy_client_1.expectString,
792
+ ScalingPolicies: (_) => de_ScalingPolicies(_, context),
1109
793
  });
1110
- return retVal;
1111
- };
1112
- const de_NotScaledReason = (output, context) => {
1113
- return {
1114
- Code: (0, smithy_client_1.expectString)(output.Code),
1115
- CurrentCapacity: (0, smithy_client_1.expectInt32)(output.CurrentCapacity),
1116
- MaxCapacity: (0, smithy_client_1.expectInt32)(output.MaxCapacity),
1117
- MinCapacity: (0, smithy_client_1.expectInt32)(output.MinCapacity),
1118
- };
1119
794
  };
1120
- const de_NotScaledReasons = (output, context) => {
1121
- const retVal = (output || [])
1122
- .filter((e) => e != null)
1123
- .map((entry) => {
1124
- if (entry === null) {
1125
- return null;
1126
- }
1127
- return de_NotScaledReason(entry, context);
795
+ const de_DescribeScheduledActionsResponse = (output, context) => {
796
+ return (0, smithy_client_1.take)(output, {
797
+ NextToken: smithy_client_1.expectString,
798
+ ScheduledActions: (_) => de_ScheduledActions(_, context),
1128
799
  });
1129
- return retVal;
1130
- };
1131
- const de_ObjectNotFoundException = (output, context) => {
1132
- return {
1133
- Message: (0, smithy_client_1.expectString)(output.Message),
1134
- };
1135
- };
1136
- const de_PredefinedMetricSpecification = (output, context) => {
1137
- return {
1138
- PredefinedMetricType: (0, smithy_client_1.expectString)(output.PredefinedMetricType),
1139
- ResourceLabel: (0, smithy_client_1.expectString)(output.ResourceLabel),
1140
- };
1141
- };
1142
- const de_PutScalingPolicyResponse = (output, context) => {
1143
- return {
1144
- Alarms: output.Alarms != null ? de_Alarms(output.Alarms, context) : undefined,
1145
- PolicyARN: (0, smithy_client_1.expectString)(output.PolicyARN),
1146
- };
1147
- };
1148
- const de_PutScheduledActionResponse = (output, context) => {
1149
- return {};
1150
- };
1151
- const de_RegisterScalableTargetResponse = (output, context) => {
1152
- return {
1153
- ScalableTargetARN: (0, smithy_client_1.expectString)(output.ScalableTargetARN),
1154
- };
1155
- };
1156
- const de_ResourceNotFoundException = (output, context) => {
1157
- return {
1158
- Message: (0, smithy_client_1.expectString)(output.Message),
1159
- ResourceName: (0, smithy_client_1.expectString)(output.ResourceName),
1160
- };
1161
800
  };
1162
801
  const de_ScalableTarget = (output, context) => {
1163
- return {
1164
- CreationTime: output.CreationTime != null
1165
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1166
- : undefined,
1167
- MaxCapacity: (0, smithy_client_1.expectInt32)(output.MaxCapacity),
1168
- MinCapacity: (0, smithy_client_1.expectInt32)(output.MinCapacity),
1169
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
1170
- RoleARN: (0, smithy_client_1.expectString)(output.RoleARN),
1171
- ScalableDimension: (0, smithy_client_1.expectString)(output.ScalableDimension),
1172
- ScalableTargetARN: (0, smithy_client_1.expectString)(output.ScalableTargetARN),
1173
- ServiceNamespace: (0, smithy_client_1.expectString)(output.ServiceNamespace),
1174
- SuspendedState: output.SuspendedState != null ? de_SuspendedState(output.SuspendedState, context) : undefined,
1175
- };
1176
- };
1177
- const de_ScalableTargetAction = (output, context) => {
1178
- return {
1179
- MaxCapacity: (0, smithy_client_1.expectInt32)(output.MaxCapacity),
1180
- MinCapacity: (0, smithy_client_1.expectInt32)(output.MinCapacity),
1181
- };
802
+ return (0, smithy_client_1.take)(output, {
803
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
804
+ MaxCapacity: smithy_client_1.expectInt32,
805
+ MinCapacity: smithy_client_1.expectInt32,
806
+ ResourceId: smithy_client_1.expectString,
807
+ RoleARN: smithy_client_1.expectString,
808
+ ScalableDimension: smithy_client_1.expectString,
809
+ ScalableTargetARN: smithy_client_1.expectString,
810
+ ServiceNamespace: smithy_client_1.expectString,
811
+ SuspendedState: smithy_client_1._json,
812
+ });
1182
813
  };
1183
814
  const de_ScalableTargets = (output, context) => {
1184
815
  const retVal = (output || [])
1185
816
  .filter((e) => e != null)
1186
817
  .map((entry) => {
1187
- if (entry === null) {
1188
- return null;
1189
- }
1190
818
  return de_ScalableTarget(entry, context);
1191
819
  });
1192
820
  return retVal;
@@ -1195,212 +823,104 @@ const de_ScalingActivities = (output, context) => {
1195
823
  const retVal = (output || [])
1196
824
  .filter((e) => e != null)
1197
825
  .map((entry) => {
1198
- if (entry === null) {
1199
- return null;
1200
- }
1201
826
  return de_ScalingActivity(entry, context);
1202
827
  });
1203
828
  return retVal;
1204
829
  };
1205
830
  const de_ScalingActivity = (output, context) => {
1206
- return {
1207
- ActivityId: (0, smithy_client_1.expectString)(output.ActivityId),
1208
- Cause: (0, smithy_client_1.expectString)(output.Cause),
1209
- Description: (0, smithy_client_1.expectString)(output.Description),
1210
- Details: (0, smithy_client_1.expectString)(output.Details),
1211
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
1212
- NotScaledReasons: output.NotScaledReasons != null ? de_NotScaledReasons(output.NotScaledReasons, context) : undefined,
1213
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
1214
- ScalableDimension: (0, smithy_client_1.expectString)(output.ScalableDimension),
1215
- ServiceNamespace: (0, smithy_client_1.expectString)(output.ServiceNamespace),
1216
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
1217
- StatusCode: (0, smithy_client_1.expectString)(output.StatusCode),
1218
- StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
1219
- };
831
+ return (0, smithy_client_1.take)(output, {
832
+ ActivityId: smithy_client_1.expectString,
833
+ Cause: smithy_client_1.expectString,
834
+ Description: smithy_client_1.expectString,
835
+ Details: smithy_client_1.expectString,
836
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
837
+ NotScaledReasons: smithy_client_1._json,
838
+ ResourceId: smithy_client_1.expectString,
839
+ ScalableDimension: smithy_client_1.expectString,
840
+ ServiceNamespace: smithy_client_1.expectString,
841
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
842
+ StatusCode: smithy_client_1.expectString,
843
+ StatusMessage: smithy_client_1.expectString,
844
+ });
1220
845
  };
1221
846
  const de_ScalingPolicies = (output, context) => {
1222
847
  const retVal = (output || [])
1223
848
  .filter((e) => e != null)
1224
849
  .map((entry) => {
1225
- if (entry === null) {
1226
- return null;
1227
- }
1228
850
  return de_ScalingPolicy(entry, context);
1229
851
  });
1230
852
  return retVal;
1231
853
  };
1232
854
  const de_ScalingPolicy = (output, context) => {
1233
- return {
1234
- Alarms: output.Alarms != null ? de_Alarms(output.Alarms, context) : undefined,
1235
- CreationTime: output.CreationTime != null
1236
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1237
- : undefined,
1238
- PolicyARN: (0, smithy_client_1.expectString)(output.PolicyARN),
1239
- PolicyName: (0, smithy_client_1.expectString)(output.PolicyName),
1240
- PolicyType: (0, smithy_client_1.expectString)(output.PolicyType),
1241
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
1242
- ScalableDimension: (0, smithy_client_1.expectString)(output.ScalableDimension),
1243
- ServiceNamespace: (0, smithy_client_1.expectString)(output.ServiceNamespace),
1244
- StepScalingPolicyConfiguration: output.StepScalingPolicyConfiguration != null
1245
- ? de_StepScalingPolicyConfiguration(output.StepScalingPolicyConfiguration, context)
1246
- : undefined,
1247
- TargetTrackingScalingPolicyConfiguration: output.TargetTrackingScalingPolicyConfiguration != null
1248
- ? de_TargetTrackingScalingPolicyConfiguration(output.TargetTrackingScalingPolicyConfiguration, context)
1249
- : undefined,
1250
- };
855
+ return (0, smithy_client_1.take)(output, {
856
+ Alarms: smithy_client_1._json,
857
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
858
+ PolicyARN: smithy_client_1.expectString,
859
+ PolicyName: smithy_client_1.expectString,
860
+ PolicyType: smithy_client_1.expectString,
861
+ ResourceId: smithy_client_1.expectString,
862
+ ScalableDimension: smithy_client_1.expectString,
863
+ ServiceNamespace: smithy_client_1.expectString,
864
+ StepScalingPolicyConfiguration: (_) => de_StepScalingPolicyConfiguration(_, context),
865
+ TargetTrackingScalingPolicyConfiguration: (_) => de_TargetTrackingScalingPolicyConfiguration(_, context),
866
+ });
1251
867
  };
1252
868
  const de_ScheduledAction = (output, context) => {
1253
- return {
1254
- CreationTime: output.CreationTime != null
1255
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1256
- : undefined,
1257
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
1258
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
1259
- ScalableDimension: (0, smithy_client_1.expectString)(output.ScalableDimension),
1260
- ScalableTargetAction: output.ScalableTargetAction != null ? de_ScalableTargetAction(output.ScalableTargetAction, context) : undefined,
1261
- Schedule: (0, smithy_client_1.expectString)(output.Schedule),
1262
- ScheduledActionARN: (0, smithy_client_1.expectString)(output.ScheduledActionARN),
1263
- ScheduledActionName: (0, smithy_client_1.expectString)(output.ScheduledActionName),
1264
- ServiceNamespace: (0, smithy_client_1.expectString)(output.ServiceNamespace),
1265
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
1266
- Timezone: (0, smithy_client_1.expectString)(output.Timezone),
1267
- };
869
+ return (0, smithy_client_1.take)(output, {
870
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
871
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
872
+ ResourceId: smithy_client_1.expectString,
873
+ ScalableDimension: smithy_client_1.expectString,
874
+ ScalableTargetAction: smithy_client_1._json,
875
+ Schedule: smithy_client_1.expectString,
876
+ ScheduledActionARN: smithy_client_1.expectString,
877
+ ScheduledActionName: smithy_client_1.expectString,
878
+ ServiceNamespace: smithy_client_1.expectString,
879
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
880
+ Timezone: smithy_client_1.expectString,
881
+ });
1268
882
  };
1269
883
  const de_ScheduledActions = (output, context) => {
1270
884
  const retVal = (output || [])
1271
885
  .filter((e) => e != null)
1272
886
  .map((entry) => {
1273
- if (entry === null) {
1274
- return null;
1275
- }
1276
887
  return de_ScheduledAction(entry, context);
1277
888
  });
1278
889
  return retVal;
1279
890
  };
1280
891
  const de_StepAdjustment = (output, context) => {
1281
- return {
1282
- MetricIntervalLowerBound: (0, smithy_client_1.limitedParseDouble)(output.MetricIntervalLowerBound),
1283
- MetricIntervalUpperBound: (0, smithy_client_1.limitedParseDouble)(output.MetricIntervalUpperBound),
1284
- ScalingAdjustment: (0, smithy_client_1.expectInt32)(output.ScalingAdjustment),
1285
- };
892
+ return (0, smithy_client_1.take)(output, {
893
+ MetricIntervalLowerBound: smithy_client_1.limitedParseDouble,
894
+ MetricIntervalUpperBound: smithy_client_1.limitedParseDouble,
895
+ ScalingAdjustment: smithy_client_1.expectInt32,
896
+ });
1286
897
  };
1287
898
  const de_StepAdjustments = (output, context) => {
1288
899
  const retVal = (output || [])
1289
900
  .filter((e) => e != null)
1290
901
  .map((entry) => {
1291
- if (entry === null) {
1292
- return null;
1293
- }
1294
902
  return de_StepAdjustment(entry, context);
1295
903
  });
1296
904
  return retVal;
1297
905
  };
1298
906
  const de_StepScalingPolicyConfiguration = (output, context) => {
1299
- return {
1300
- AdjustmentType: (0, smithy_client_1.expectString)(output.AdjustmentType),
1301
- Cooldown: (0, smithy_client_1.expectInt32)(output.Cooldown),
1302
- MetricAggregationType: (0, smithy_client_1.expectString)(output.MetricAggregationType),
1303
- MinAdjustmentMagnitude: (0, smithy_client_1.expectInt32)(output.MinAdjustmentMagnitude),
1304
- StepAdjustments: output.StepAdjustments != null ? de_StepAdjustments(output.StepAdjustments, context) : undefined,
1305
- };
1306
- };
1307
- const de_SuspendedState = (output, context) => {
1308
- return {
1309
- DynamicScalingInSuspended: (0, smithy_client_1.expectBoolean)(output.DynamicScalingInSuspended),
1310
- DynamicScalingOutSuspended: (0, smithy_client_1.expectBoolean)(output.DynamicScalingOutSuspended),
1311
- ScheduledScalingSuspended: (0, smithy_client_1.expectBoolean)(output.ScheduledScalingSuspended),
1312
- };
1313
- };
1314
- const de_TagMap = (output, context) => {
1315
- return Object.entries(output).reduce((acc, [key, value]) => {
1316
- if (value === null) {
1317
- return acc;
1318
- }
1319
- acc[key] = (0, smithy_client_1.expectString)(value);
1320
- return acc;
1321
- }, {});
1322
- };
1323
- const de_TagResourceResponse = (output, context) => {
1324
- return {};
1325
- };
1326
- const de_TargetTrackingMetric = (output, context) => {
1327
- return {
1328
- Dimensions: output.Dimensions != null ? de_TargetTrackingMetricDimensions(output.Dimensions, context) : undefined,
1329
- MetricName: (0, smithy_client_1.expectString)(output.MetricName),
1330
- Namespace: (0, smithy_client_1.expectString)(output.Namespace),
1331
- };
1332
- };
1333
- const de_TargetTrackingMetricDataQueries = (output, context) => {
1334
- const retVal = (output || [])
1335
- .filter((e) => e != null)
1336
- .map((entry) => {
1337
- if (entry === null) {
1338
- return null;
1339
- }
1340
- return de_TargetTrackingMetricDataQuery(entry, context);
907
+ return (0, smithy_client_1.take)(output, {
908
+ AdjustmentType: smithy_client_1.expectString,
909
+ Cooldown: smithy_client_1.expectInt32,
910
+ MetricAggregationType: smithy_client_1.expectString,
911
+ MinAdjustmentMagnitude: smithy_client_1.expectInt32,
912
+ StepAdjustments: (_) => de_StepAdjustments(_, context),
1341
913
  });
1342
- return retVal;
1343
- };
1344
- const de_TargetTrackingMetricDataQuery = (output, context) => {
1345
- return {
1346
- Expression: (0, smithy_client_1.expectString)(output.Expression),
1347
- Id: (0, smithy_client_1.expectString)(output.Id),
1348
- Label: (0, smithy_client_1.expectString)(output.Label),
1349
- MetricStat: output.MetricStat != null ? de_TargetTrackingMetricStat(output.MetricStat, context) : undefined,
1350
- ReturnData: (0, smithy_client_1.expectBoolean)(output.ReturnData),
1351
- };
1352
- };
1353
- const de_TargetTrackingMetricDimension = (output, context) => {
1354
- return {
1355
- Name: (0, smithy_client_1.expectString)(output.Name),
1356
- Value: (0, smithy_client_1.expectString)(output.Value),
1357
- };
1358
- };
1359
- const de_TargetTrackingMetricDimensions = (output, context) => {
1360
- const retVal = (output || [])
1361
- .filter((e) => e != null)
1362
- .map((entry) => {
1363
- if (entry === null) {
1364
- return null;
1365
- }
1366
- return de_TargetTrackingMetricDimension(entry, context);
1367
- });
1368
- return retVal;
1369
- };
1370
- const de_TargetTrackingMetricStat = (output, context) => {
1371
- return {
1372
- Metric: output.Metric != null ? de_TargetTrackingMetric(output.Metric, context) : undefined,
1373
- Stat: (0, smithy_client_1.expectString)(output.Stat),
1374
- Unit: (0, smithy_client_1.expectString)(output.Unit),
1375
- };
1376
914
  };
1377
915
  const de_TargetTrackingScalingPolicyConfiguration = (output, context) => {
1378
- return {
1379
- CustomizedMetricSpecification: output.CustomizedMetricSpecification != null
1380
- ? de_CustomizedMetricSpecification(output.CustomizedMetricSpecification, context)
1381
- : undefined,
1382
- DisableScaleIn: (0, smithy_client_1.expectBoolean)(output.DisableScaleIn),
1383
- PredefinedMetricSpecification: output.PredefinedMetricSpecification != null
1384
- ? de_PredefinedMetricSpecification(output.PredefinedMetricSpecification, context)
1385
- : undefined,
1386
- ScaleInCooldown: (0, smithy_client_1.expectInt32)(output.ScaleInCooldown),
1387
- ScaleOutCooldown: (0, smithy_client_1.expectInt32)(output.ScaleOutCooldown),
1388
- TargetValue: (0, smithy_client_1.limitedParseDouble)(output.TargetValue),
1389
- };
1390
- };
1391
- const de_TooManyTagsException = (output, context) => {
1392
- return {
1393
- Message: (0, smithy_client_1.expectString)(output.Message),
1394
- ResourceName: (0, smithy_client_1.expectString)(output.ResourceName),
1395
- };
1396
- };
1397
- const de_UntagResourceResponse = (output, context) => {
1398
- return {};
1399
- };
1400
- const de_ValidationException = (output, context) => {
1401
- return {
1402
- Message: (0, smithy_client_1.expectString)(output.Message),
1403
- };
916
+ return (0, smithy_client_1.take)(output, {
917
+ CustomizedMetricSpecification: smithy_client_1._json,
918
+ DisableScaleIn: smithy_client_1.expectBoolean,
919
+ PredefinedMetricSpecification: smithy_client_1._json,
920
+ ScaleInCooldown: smithy_client_1.expectInt32,
921
+ ScaleOutCooldown: smithy_client_1.expectInt32,
922
+ TargetValue: smithy_client_1.limitedParseDouble,
923
+ });
1404
924
  };
1405
925
  const deserializeMetadata = (output) => ({
1406
926
  httpStatusCode: output.statusCode,
@@ -1415,6 +935,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1415
935
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1416
936
  };
1417
937
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
938
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ApplicationAutoScalingServiceException_1.ApplicationAutoScalingServiceException);
1418
939
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1419
940
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1420
941
  const contents = {