@aws-sdk/client-auto-scaling-plans 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.
@@ -15,21 +15,21 @@ exports.se_CreateScalingPlanCommand = se_CreateScalingPlanCommand;
15
15
  const se_DeleteScalingPlanCommand = async (input, context) => {
16
16
  const headers = sharedHeaders("DeleteScalingPlan");
17
17
  let body;
18
- body = JSON.stringify(se_DeleteScalingPlanRequest(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_DeleteScalingPlanCommand = se_DeleteScalingPlanCommand;
22
22
  const se_DescribeScalingPlanResourcesCommand = async (input, context) => {
23
23
  const headers = sharedHeaders("DescribeScalingPlanResources");
24
24
  let body;
25
- body = JSON.stringify(se_DescribeScalingPlanResourcesRequest(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_DescribeScalingPlanResourcesCommand = se_DescribeScalingPlanResourcesCommand;
29
29
  const se_DescribeScalingPlansCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("DescribeScalingPlans");
31
31
  let body;
32
- body = JSON.stringify(se_DescribeScalingPlansRequest(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_DescribeScalingPlansCommand = se_DescribeScalingPlansCommand;
@@ -53,12 +53,12 @@ const de_CreateScalingPlanCommand = async (output, context) => {
53
53
  }
54
54
  const data = await parseBody(output.body, context);
55
55
  let contents = {};
56
- contents = de_CreateScalingPlanResponse(data, context);
56
+ contents = (0, smithy_client_1._json)(data);
57
57
  const response = {
58
58
  $metadata: deserializeMetadata(output),
59
59
  ...contents,
60
60
  };
61
- return Promise.resolve(response);
61
+ return response;
62
62
  };
63
63
  exports.de_CreateScalingPlanCommand = de_CreateScalingPlanCommand;
64
64
  const de_CreateScalingPlanCommandError = async (output, context) => {
@@ -82,10 +82,9 @@ const de_CreateScalingPlanCommandError = async (output, context) => {
82
82
  throw await de_ValidationExceptionRes(parsedOutput, context);
83
83
  default:
84
84
  const parsedBody = parsedOutput.body;
85
- (0, smithy_client_1.throwDefaultError)({
85
+ return throwDefaultError({
86
86
  output,
87
87
  parsedBody,
88
- exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
89
88
  errorCode,
90
89
  });
91
90
  }
@@ -96,12 +95,12 @@ const de_DeleteScalingPlanCommand = async (output, context) => {
96
95
  }
97
96
  const data = await parseBody(output.body, context);
98
97
  let contents = {};
99
- contents = de_DeleteScalingPlanResponse(data, context);
98
+ contents = (0, smithy_client_1._json)(data);
100
99
  const response = {
101
100
  $metadata: deserializeMetadata(output),
102
101
  ...contents,
103
102
  };
104
- return Promise.resolve(response);
103
+ return response;
105
104
  };
106
105
  exports.de_DeleteScalingPlanCommand = de_DeleteScalingPlanCommand;
107
106
  const de_DeleteScalingPlanCommandError = async (output, context) => {
@@ -125,10 +124,9 @@ const de_DeleteScalingPlanCommandError = async (output, context) => {
125
124
  throw await de_ValidationExceptionRes(parsedOutput, context);
126
125
  default:
127
126
  const parsedBody = parsedOutput.body;
128
- (0, smithy_client_1.throwDefaultError)({
127
+ return throwDefaultError({
129
128
  output,
130
129
  parsedBody,
131
- exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
132
130
  errorCode,
133
131
  });
134
132
  }
@@ -144,7 +142,7 @@ const de_DescribeScalingPlanResourcesCommand = async (output, context) => {
144
142
  $metadata: deserializeMetadata(output),
145
143
  ...contents,
146
144
  };
147
- return Promise.resolve(response);
145
+ return response;
148
146
  };
149
147
  exports.de_DescribeScalingPlanResourcesCommand = de_DescribeScalingPlanResourcesCommand;
150
148
  const de_DescribeScalingPlanResourcesCommandError = async (output, context) => {
@@ -168,10 +166,9 @@ const de_DescribeScalingPlanResourcesCommandError = async (output, context) => {
168
166
  throw await de_ValidationExceptionRes(parsedOutput, context);
169
167
  default:
170
168
  const parsedBody = parsedOutput.body;
171
- (0, smithy_client_1.throwDefaultError)({
169
+ return throwDefaultError({
172
170
  output,
173
171
  parsedBody,
174
- exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
175
172
  errorCode,
176
173
  });
177
174
  }
@@ -187,7 +184,7 @@ const de_DescribeScalingPlansCommand = async (output, context) => {
187
184
  $metadata: deserializeMetadata(output),
188
185
  ...contents,
189
186
  };
190
- return Promise.resolve(response);
187
+ return response;
191
188
  };
192
189
  exports.de_DescribeScalingPlansCommand = de_DescribeScalingPlansCommand;
193
190
  const de_DescribeScalingPlansCommandError = async (output, context) => {
@@ -211,10 +208,9 @@ const de_DescribeScalingPlansCommandError = async (output, context) => {
211
208
  throw await de_ValidationExceptionRes(parsedOutput, context);
212
209
  default:
213
210
  const parsedBody = parsedOutput.body;
214
- (0, smithy_client_1.throwDefaultError)({
211
+ return throwDefaultError({
215
212
  output,
216
213
  parsedBody,
217
- exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
218
214
  errorCode,
219
215
  });
220
216
  }
@@ -230,7 +226,7 @@ const de_GetScalingPlanResourceForecastDataCommand = async (output, context) =>
230
226
  $metadata: deserializeMetadata(output),
231
227
  ...contents,
232
228
  };
233
- return Promise.resolve(response);
229
+ return response;
234
230
  };
235
231
  exports.de_GetScalingPlanResourceForecastDataCommand = de_GetScalingPlanResourceForecastDataCommand;
236
232
  const de_GetScalingPlanResourceForecastDataCommandError = async (output, context) => {
@@ -248,10 +244,9 @@ const de_GetScalingPlanResourceForecastDataCommandError = async (output, context
248
244
  throw await de_ValidationExceptionRes(parsedOutput, context);
249
245
  default:
250
246
  const parsedBody = parsedOutput.body;
251
- (0, smithy_client_1.throwDefaultError)({
247
+ return throwDefaultError({
252
248
  output,
253
249
  parsedBody,
254
- exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
255
250
  errorCode,
256
251
  });
257
252
  }
@@ -262,12 +257,12 @@ const de_UpdateScalingPlanCommand = async (output, context) => {
262
257
  }
263
258
  const data = await parseBody(output.body, context);
264
259
  let contents = {};
265
- contents = de_UpdateScalingPlanResponse(data, context);
260
+ contents = (0, smithy_client_1._json)(data);
266
261
  const response = {
267
262
  $metadata: deserializeMetadata(output),
268
263
  ...contents,
269
264
  };
270
- return Promise.resolve(response);
265
+ return response;
271
266
  };
272
267
  exports.de_UpdateScalingPlanCommand = de_UpdateScalingPlanCommand;
273
268
  const de_UpdateScalingPlanCommandError = async (output, context) => {
@@ -291,17 +286,16 @@ const de_UpdateScalingPlanCommandError = async (output, context) => {
291
286
  throw await de_ValidationExceptionRes(parsedOutput, context);
292
287
  default:
293
288
  const parsedBody = parsedOutput.body;
294
- (0, smithy_client_1.throwDefaultError)({
289
+ return throwDefaultError({
295
290
  output,
296
291
  parsedBody,
297
- exceptionCtor: AutoScalingPlansServiceException_1.AutoScalingPlansServiceException,
298
292
  errorCode,
299
293
  });
300
294
  }
301
295
  };
302
296
  const de_ConcurrentUpdateExceptionRes = async (parsedOutput, context) => {
303
297
  const body = parsedOutput.body;
304
- const deserialized = de_ConcurrentUpdateException(body, context);
298
+ const deserialized = (0, smithy_client_1._json)(body);
305
299
  const exception = new models_0_1.ConcurrentUpdateException({
306
300
  $metadata: deserializeMetadata(parsedOutput),
307
301
  ...deserialized,
@@ -310,7 +304,7 @@ const de_ConcurrentUpdateExceptionRes = async (parsedOutput, context) => {
310
304
  };
311
305
  const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
312
306
  const body = parsedOutput.body;
313
- const deserialized = de_InternalServiceException(body, context);
307
+ const deserialized = (0, smithy_client_1._json)(body);
314
308
  const exception = new models_0_1.InternalServiceException({
315
309
  $metadata: deserializeMetadata(parsedOutput),
316
310
  ...deserialized,
@@ -319,7 +313,7 @@ const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
319
313
  };
320
314
  const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
321
315
  const body = parsedOutput.body;
322
- const deserialized = de_InvalidNextTokenException(body, context);
316
+ const deserialized = (0, smithy_client_1._json)(body);
323
317
  const exception = new models_0_1.InvalidNextTokenException({
324
318
  $metadata: deserializeMetadata(parsedOutput),
325
319
  ...deserialized,
@@ -328,7 +322,7 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
328
322
  };
329
323
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
330
324
  const body = parsedOutput.body;
331
- const deserialized = de_LimitExceededException(body, context);
325
+ const deserialized = (0, smithy_client_1._json)(body);
332
326
  const exception = new models_0_1.LimitExceededException({
333
327
  $metadata: deserializeMetadata(parsedOutput),
334
328
  ...deserialized,
@@ -337,7 +331,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
337
331
  };
338
332
  const de_ObjectNotFoundExceptionRes = async (parsedOutput, context) => {
339
333
  const body = parsedOutput.body;
340
- const deserialized = de_ObjectNotFoundException(body, context);
334
+ const deserialized = (0, smithy_client_1._json)(body);
341
335
  const exception = new models_0_1.ObjectNotFoundException({
342
336
  $metadata: deserializeMetadata(parsedOutput),
343
337
  ...deserialized,
@@ -346,148 +340,49 @@ const de_ObjectNotFoundExceptionRes = async (parsedOutput, context) => {
346
340
  };
347
341
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
348
342
  const body = parsedOutput.body;
349
- const deserialized = de_ValidationException(body, context);
343
+ const deserialized = (0, smithy_client_1._json)(body);
350
344
  const exception = new models_0_1.ValidationException({
351
345
  $metadata: deserializeMetadata(parsedOutput),
352
346
  ...deserialized,
353
347
  });
354
348
  return (0, smithy_client_1.decorateServiceException)(exception, body);
355
349
  };
356
- const se_ApplicationSource = (input, context) => {
357
- return {
358
- ...(input.CloudFormationStackARN != null && { CloudFormationStackARN: input.CloudFormationStackARN }),
359
- ...(input.TagFilters != null && { TagFilters: se_TagFilters(input.TagFilters, context) }),
360
- };
361
- };
362
- const se_ApplicationSources = (input, context) => {
363
- return input
364
- .filter((e) => e != null)
365
- .map((entry) => {
366
- return se_ApplicationSource(entry, context);
367
- });
368
- };
369
350
  const se_CreateScalingPlanRequest = (input, context) => {
370
- return {
371
- ...(input.ApplicationSource != null && {
372
- ApplicationSource: se_ApplicationSource(input.ApplicationSource, context),
373
- }),
374
- ...(input.ScalingInstructions != null && {
375
- ScalingInstructions: se_ScalingInstructions(input.ScalingInstructions, context),
376
- }),
377
- ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
378
- };
379
- };
380
- const se_CustomizedLoadMetricSpecification = (input, context) => {
381
- return {
382
- ...(input.Dimensions != null && { Dimensions: se_MetricDimensions(input.Dimensions, context) }),
383
- ...(input.MetricName != null && { MetricName: input.MetricName }),
384
- ...(input.Namespace != null && { Namespace: input.Namespace }),
385
- ...(input.Statistic != null && { Statistic: input.Statistic }),
386
- ...(input.Unit != null && { Unit: input.Unit }),
387
- };
388
- };
389
- const se_CustomizedScalingMetricSpecification = (input, context) => {
390
- return {
391
- ...(input.Dimensions != null && { Dimensions: se_MetricDimensions(input.Dimensions, context) }),
392
- ...(input.MetricName != null && { MetricName: input.MetricName }),
393
- ...(input.Namespace != null && { Namespace: input.Namespace }),
394
- ...(input.Statistic != null && { Statistic: input.Statistic }),
395
- ...(input.Unit != null && { Unit: input.Unit }),
396
- };
397
- };
398
- const se_DeleteScalingPlanRequest = (input, context) => {
399
- return {
400
- ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
401
- ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
402
- };
403
- };
404
- const se_DescribeScalingPlanResourcesRequest = (input, context) => {
405
- return {
406
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
407
- ...(input.NextToken != null && { NextToken: input.NextToken }),
408
- ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
409
- ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
410
- };
411
- };
412
- const se_DescribeScalingPlansRequest = (input, context) => {
413
- return {
414
- ...(input.ApplicationSources != null && {
415
- ApplicationSources: se_ApplicationSources(input.ApplicationSources, context),
416
- }),
417
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
418
- ...(input.NextToken != null && { NextToken: input.NextToken }),
419
- ...(input.ScalingPlanNames != null && { ScalingPlanNames: se_ScalingPlanNames(input.ScalingPlanNames, context) }),
420
- ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
421
- };
351
+ return (0, smithy_client_1.take)(input, {
352
+ ApplicationSource: smithy_client_1._json,
353
+ ScalingInstructions: (_) => se_ScalingInstructions(_, context),
354
+ ScalingPlanName: [],
355
+ });
422
356
  };
423
357
  const se_GetScalingPlanResourceForecastDataRequest = (input, context) => {
424
- return {
425
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
426
- ...(input.ForecastDataType != null && { ForecastDataType: input.ForecastDataType }),
427
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
428
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
429
- ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
430
- ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
431
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
432
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
433
- };
434
- };
435
- const se_MetricDimension = (input, context) => {
436
- return {
437
- ...(input.Name != null && { Name: input.Name }),
438
- ...(input.Value != null && { Value: input.Value }),
439
- };
440
- };
441
- const se_MetricDimensions = (input, context) => {
442
- return input
443
- .filter((e) => e != null)
444
- .map((entry) => {
445
- return se_MetricDimension(entry, context);
358
+ return (0, smithy_client_1.take)(input, {
359
+ EndTime: (_) => Math.round(_.getTime() / 1000),
360
+ ForecastDataType: [],
361
+ ResourceId: [],
362
+ ScalableDimension: [],
363
+ ScalingPlanName: [],
364
+ ScalingPlanVersion: [],
365
+ ServiceNamespace: [],
366
+ StartTime: (_) => Math.round(_.getTime() / 1000),
446
367
  });
447
368
  };
448
- const se_PredefinedLoadMetricSpecification = (input, context) => {
449
- return {
450
- ...(input.PredefinedLoadMetricType != null && { PredefinedLoadMetricType: input.PredefinedLoadMetricType }),
451
- ...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }),
452
- };
453
- };
454
- const se_PredefinedScalingMetricSpecification = (input, context) => {
455
- return {
456
- ...(input.PredefinedScalingMetricType != null && {
457
- PredefinedScalingMetricType: input.PredefinedScalingMetricType,
458
- }),
459
- ...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }),
460
- };
461
- };
462
369
  const se_ScalingInstruction = (input, context) => {
463
- return {
464
- ...(input.CustomizedLoadMetricSpecification != null && {
465
- CustomizedLoadMetricSpecification: se_CustomizedLoadMetricSpecification(input.CustomizedLoadMetricSpecification, context),
466
- }),
467
- ...(input.DisableDynamicScaling != null && { DisableDynamicScaling: input.DisableDynamicScaling }),
468
- ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }),
469
- ...(input.MinCapacity != null && { MinCapacity: input.MinCapacity }),
470
- ...(input.PredefinedLoadMetricSpecification != null && {
471
- PredefinedLoadMetricSpecification: se_PredefinedLoadMetricSpecification(input.PredefinedLoadMetricSpecification, context),
472
- }),
473
- ...(input.PredictiveScalingMaxCapacityBehavior != null && {
474
- PredictiveScalingMaxCapacityBehavior: input.PredictiveScalingMaxCapacityBehavior,
475
- }),
476
- ...(input.PredictiveScalingMaxCapacityBuffer != null && {
477
- PredictiveScalingMaxCapacityBuffer: input.PredictiveScalingMaxCapacityBuffer,
478
- }),
479
- ...(input.PredictiveScalingMode != null && { PredictiveScalingMode: input.PredictiveScalingMode }),
480
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
481
- ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }),
482
- ...(input.ScalingPolicyUpdateBehavior != null && {
483
- ScalingPolicyUpdateBehavior: input.ScalingPolicyUpdateBehavior,
484
- }),
485
- ...(input.ScheduledActionBufferTime != null && { ScheduledActionBufferTime: input.ScheduledActionBufferTime }),
486
- ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }),
487
- ...(input.TargetTrackingConfigurations != null && {
488
- TargetTrackingConfigurations: se_TargetTrackingConfigurations(input.TargetTrackingConfigurations, context),
489
- }),
490
- };
370
+ return (0, smithy_client_1.take)(input, {
371
+ CustomizedLoadMetricSpecification: smithy_client_1._json,
372
+ DisableDynamicScaling: [],
373
+ MaxCapacity: [],
374
+ MinCapacity: [],
375
+ PredefinedLoadMetricSpecification: smithy_client_1._json,
376
+ PredictiveScalingMaxCapacityBehavior: [],
377
+ PredictiveScalingMaxCapacityBuffer: [],
378
+ PredictiveScalingMode: [],
379
+ ResourceId: [],
380
+ ScalableDimension: [],
381
+ ScalingPolicyUpdateBehavior: [],
382
+ ScheduledActionBufferTime: [],
383
+ ServiceNamespace: [],
384
+ TargetTrackingConfigurations: (_) => se_TargetTrackingConfigurations(_, context),
385
+ });
491
386
  };
492
387
  const se_ScalingInstructions = (input, context) => {
493
388
  return input
@@ -496,47 +391,16 @@ const se_ScalingInstructions = (input, context) => {
496
391
  return se_ScalingInstruction(entry, context);
497
392
  });
498
393
  };
499
- const se_ScalingPlanNames = (input, context) => {
500
- return input
501
- .filter((e) => e != null)
502
- .map((entry) => {
503
- return entry;
504
- });
505
- };
506
- const se_TagFilter = (input, context) => {
507
- return {
508
- ...(input.Key != null && { Key: input.Key }),
509
- ...(input.Values != null && { Values: se_TagValues(input.Values, context) }),
510
- };
511
- };
512
- const se_TagFilters = (input, context) => {
513
- return input
514
- .filter((e) => e != null)
515
- .map((entry) => {
516
- return se_TagFilter(entry, context);
517
- });
518
- };
519
- const se_TagValues = (input, context) => {
520
- return input
521
- .filter((e) => e != null)
522
- .map((entry) => {
523
- return entry;
524
- });
525
- };
526
394
  const se_TargetTrackingConfiguration = (input, context) => {
527
- return {
528
- ...(input.CustomizedScalingMetricSpecification != null && {
529
- CustomizedScalingMetricSpecification: se_CustomizedScalingMetricSpecification(input.CustomizedScalingMetricSpecification, context),
530
- }),
531
- ...(input.DisableScaleIn != null && { DisableScaleIn: input.DisableScaleIn }),
532
- ...(input.EstimatedInstanceWarmup != null && { EstimatedInstanceWarmup: input.EstimatedInstanceWarmup }),
533
- ...(input.PredefinedScalingMetricSpecification != null && {
534
- PredefinedScalingMetricSpecification: se_PredefinedScalingMetricSpecification(input.PredefinedScalingMetricSpecification, context),
535
- }),
536
- ...(input.ScaleInCooldown != null && { ScaleInCooldown: input.ScaleInCooldown }),
537
- ...(input.ScaleOutCooldown != null && { ScaleOutCooldown: input.ScaleOutCooldown }),
538
- ...(input.TargetValue != null && { TargetValue: (0, smithy_client_1.serializeFloat)(input.TargetValue) }),
539
- };
395
+ return (0, smithy_client_1.take)(input, {
396
+ CustomizedScalingMetricSpecification: smithy_client_1._json,
397
+ DisableScaleIn: [],
398
+ EstimatedInstanceWarmup: [],
399
+ PredefinedScalingMetricSpecification: smithy_client_1._json,
400
+ ScaleInCooldown: [],
401
+ ScaleOutCooldown: [],
402
+ TargetValue: smithy_client_1.serializeFloat,
403
+ });
540
404
  };
541
405
  const se_TargetTrackingConfigurations = (input, context) => {
542
406
  return input
@@ -546,207 +410,98 @@ const se_TargetTrackingConfigurations = (input, context) => {
546
410
  });
547
411
  };
548
412
  const se_UpdateScalingPlanRequest = (input, context) => {
549
- return {
550
- ...(input.ApplicationSource != null && {
551
- ApplicationSource: se_ApplicationSource(input.ApplicationSource, context),
552
- }),
553
- ...(input.ScalingInstructions != null && {
554
- ScalingInstructions: se_ScalingInstructions(input.ScalingInstructions, context),
555
- }),
556
- ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }),
557
- ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }),
558
- };
559
- };
560
- const de_ApplicationSource = (output, context) => {
561
- return {
562
- CloudFormationStackARN: (0, smithy_client_1.expectString)(output.CloudFormationStackARN),
563
- TagFilters: output.TagFilters != null ? de_TagFilters(output.TagFilters, context) : undefined,
564
- };
565
- };
566
- const de_ConcurrentUpdateException = (output, context) => {
567
- return {
568
- Message: (0, smithy_client_1.expectString)(output.Message),
569
- };
570
- };
571
- const de_CreateScalingPlanResponse = (output, context) => {
572
- return {
573
- ScalingPlanVersion: (0, smithy_client_1.expectLong)(output.ScalingPlanVersion),
574
- };
575
- };
576
- const de_CustomizedLoadMetricSpecification = (output, context) => {
577
- return {
578
- Dimensions: output.Dimensions != null ? de_MetricDimensions(output.Dimensions, context) : undefined,
579
- MetricName: (0, smithy_client_1.expectString)(output.MetricName),
580
- Namespace: (0, smithy_client_1.expectString)(output.Namespace),
581
- Statistic: (0, smithy_client_1.expectString)(output.Statistic),
582
- Unit: (0, smithy_client_1.expectString)(output.Unit),
583
- };
584
- };
585
- const de_CustomizedScalingMetricSpecification = (output, context) => {
586
- return {
587
- Dimensions: output.Dimensions != null ? de_MetricDimensions(output.Dimensions, context) : undefined,
588
- MetricName: (0, smithy_client_1.expectString)(output.MetricName),
589
- Namespace: (0, smithy_client_1.expectString)(output.Namespace),
590
- Statistic: (0, smithy_client_1.expectString)(output.Statistic),
591
- Unit: (0, smithy_client_1.expectString)(output.Unit),
592
- };
413
+ return (0, smithy_client_1.take)(input, {
414
+ ApplicationSource: smithy_client_1._json,
415
+ ScalingInstructions: (_) => se_ScalingInstructions(_, context),
416
+ ScalingPlanName: [],
417
+ ScalingPlanVersion: [],
418
+ });
593
419
  };
594
420
  const de_Datapoint = (output, context) => {
595
- return {
596
- Timestamp: output.Timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp))) : undefined,
597
- Value: (0, smithy_client_1.limitedParseDouble)(output.Value),
598
- };
421
+ return (0, smithy_client_1.take)(output, {
422
+ Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
423
+ Value: smithy_client_1.limitedParseDouble,
424
+ });
599
425
  };
600
426
  const de_Datapoints = (output, context) => {
601
427
  const retVal = (output || [])
602
428
  .filter((e) => e != null)
603
429
  .map((entry) => {
604
- if (entry === null) {
605
- return null;
606
- }
607
430
  return de_Datapoint(entry, context);
608
431
  });
609
432
  return retVal;
610
433
  };
611
- const de_DeleteScalingPlanResponse = (output, context) => {
612
- return {};
613
- };
614
434
  const de_DescribeScalingPlanResourcesResponse = (output, context) => {
615
- return {
616
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
617
- ScalingPlanResources: output.ScalingPlanResources != null ? de_ScalingPlanResources(output.ScalingPlanResources, context) : undefined,
618
- };
435
+ return (0, smithy_client_1.take)(output, {
436
+ NextToken: smithy_client_1.expectString,
437
+ ScalingPlanResources: (_) => de_ScalingPlanResources(_, context),
438
+ });
619
439
  };
620
440
  const de_DescribeScalingPlansResponse = (output, context) => {
621
- return {
622
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
623
- ScalingPlans: output.ScalingPlans != null ? de_ScalingPlans(output.ScalingPlans, context) : undefined,
624
- };
441
+ return (0, smithy_client_1.take)(output, {
442
+ NextToken: smithy_client_1.expectString,
443
+ ScalingPlans: (_) => de_ScalingPlans(_, context),
444
+ });
625
445
  };
626
446
  const de_GetScalingPlanResourceForecastDataResponse = (output, context) => {
627
- return {
628
- Datapoints: output.Datapoints != null ? de_Datapoints(output.Datapoints, context) : undefined,
629
- };
630
- };
631
- const de_InternalServiceException = (output, context) => {
632
- return {
633
- Message: (0, smithy_client_1.expectString)(output.Message),
634
- };
635
- };
636
- const de_InvalidNextTokenException = (output, context) => {
637
- return {
638
- Message: (0, smithy_client_1.expectString)(output.Message),
639
- };
640
- };
641
- const de_LimitExceededException = (output, context) => {
642
- return {
643
- Message: (0, smithy_client_1.expectString)(output.Message),
644
- };
645
- };
646
- const de_MetricDimension = (output, context) => {
647
- return {
648
- Name: (0, smithy_client_1.expectString)(output.Name),
649
- Value: (0, smithy_client_1.expectString)(output.Value),
650
- };
651
- };
652
- const de_MetricDimensions = (output, context) => {
653
- const retVal = (output || [])
654
- .filter((e) => e != null)
655
- .map((entry) => {
656
- if (entry === null) {
657
- return null;
658
- }
659
- return de_MetricDimension(entry, context);
447
+ return (0, smithy_client_1.take)(output, {
448
+ Datapoints: (_) => de_Datapoints(_, context),
660
449
  });
661
- return retVal;
662
- };
663
- const de_ObjectNotFoundException = (output, context) => {
664
- return {
665
- Message: (0, smithy_client_1.expectString)(output.Message),
666
- };
667
- };
668
- const de_PredefinedLoadMetricSpecification = (output, context) => {
669
- return {
670
- PredefinedLoadMetricType: (0, smithy_client_1.expectString)(output.PredefinedLoadMetricType),
671
- ResourceLabel: (0, smithy_client_1.expectString)(output.ResourceLabel),
672
- };
673
- };
674
- const de_PredefinedScalingMetricSpecification = (output, context) => {
675
- return {
676
- PredefinedScalingMetricType: (0, smithy_client_1.expectString)(output.PredefinedScalingMetricType),
677
- ResourceLabel: (0, smithy_client_1.expectString)(output.ResourceLabel),
678
- };
679
450
  };
680
451
  const de_ScalingInstruction = (output, context) => {
681
- return {
682
- CustomizedLoadMetricSpecification: output.CustomizedLoadMetricSpecification != null
683
- ? de_CustomizedLoadMetricSpecification(output.CustomizedLoadMetricSpecification, context)
684
- : undefined,
685
- DisableDynamicScaling: (0, smithy_client_1.expectBoolean)(output.DisableDynamicScaling),
686
- MaxCapacity: (0, smithy_client_1.expectInt32)(output.MaxCapacity),
687
- MinCapacity: (0, smithy_client_1.expectInt32)(output.MinCapacity),
688
- PredefinedLoadMetricSpecification: output.PredefinedLoadMetricSpecification != null
689
- ? de_PredefinedLoadMetricSpecification(output.PredefinedLoadMetricSpecification, context)
690
- : undefined,
691
- PredictiveScalingMaxCapacityBehavior: (0, smithy_client_1.expectString)(output.PredictiveScalingMaxCapacityBehavior),
692
- PredictiveScalingMaxCapacityBuffer: (0, smithy_client_1.expectInt32)(output.PredictiveScalingMaxCapacityBuffer),
693
- PredictiveScalingMode: (0, smithy_client_1.expectString)(output.PredictiveScalingMode),
694
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
695
- ScalableDimension: (0, smithy_client_1.expectString)(output.ScalableDimension),
696
- ScalingPolicyUpdateBehavior: (0, smithy_client_1.expectString)(output.ScalingPolicyUpdateBehavior),
697
- ScheduledActionBufferTime: (0, smithy_client_1.expectInt32)(output.ScheduledActionBufferTime),
698
- ServiceNamespace: (0, smithy_client_1.expectString)(output.ServiceNamespace),
699
- TargetTrackingConfigurations: output.TargetTrackingConfigurations != null
700
- ? de_TargetTrackingConfigurations(output.TargetTrackingConfigurations, context)
701
- : undefined,
702
- };
452
+ return (0, smithy_client_1.take)(output, {
453
+ CustomizedLoadMetricSpecification: smithy_client_1._json,
454
+ DisableDynamicScaling: smithy_client_1.expectBoolean,
455
+ MaxCapacity: smithy_client_1.expectInt32,
456
+ MinCapacity: smithy_client_1.expectInt32,
457
+ PredefinedLoadMetricSpecification: smithy_client_1._json,
458
+ PredictiveScalingMaxCapacityBehavior: smithy_client_1.expectString,
459
+ PredictiveScalingMaxCapacityBuffer: smithy_client_1.expectInt32,
460
+ PredictiveScalingMode: smithy_client_1.expectString,
461
+ ResourceId: smithy_client_1.expectString,
462
+ ScalableDimension: smithy_client_1.expectString,
463
+ ScalingPolicyUpdateBehavior: smithy_client_1.expectString,
464
+ ScheduledActionBufferTime: smithy_client_1.expectInt32,
465
+ ServiceNamespace: smithy_client_1.expectString,
466
+ TargetTrackingConfigurations: (_) => de_TargetTrackingConfigurations(_, context),
467
+ });
703
468
  };
704
469
  const de_ScalingInstructions = (output, context) => {
705
470
  const retVal = (output || [])
706
471
  .filter((e) => e != null)
707
472
  .map((entry) => {
708
- if (entry === null) {
709
- return null;
710
- }
711
473
  return de_ScalingInstruction(entry, context);
712
474
  });
713
475
  return retVal;
714
476
  };
715
477
  const de_ScalingPlan = (output, context) => {
716
- return {
717
- ApplicationSource: output.ApplicationSource != null ? de_ApplicationSource(output.ApplicationSource, context) : undefined,
718
- CreationTime: output.CreationTime != null
719
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
720
- : undefined,
721
- ScalingInstructions: output.ScalingInstructions != null ? de_ScalingInstructions(output.ScalingInstructions, context) : undefined,
722
- ScalingPlanName: (0, smithy_client_1.expectString)(output.ScalingPlanName),
723
- ScalingPlanVersion: (0, smithy_client_1.expectLong)(output.ScalingPlanVersion),
724
- StatusCode: (0, smithy_client_1.expectString)(output.StatusCode),
725
- StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
726
- StatusStartTime: output.StatusStartTime != null
727
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StatusStartTime)))
728
- : undefined,
729
- };
478
+ return (0, smithy_client_1.take)(output, {
479
+ ApplicationSource: smithy_client_1._json,
480
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
481
+ ScalingInstructions: (_) => de_ScalingInstructions(_, context),
482
+ ScalingPlanName: smithy_client_1.expectString,
483
+ ScalingPlanVersion: smithy_client_1.expectLong,
484
+ StatusCode: smithy_client_1.expectString,
485
+ StatusMessage: smithy_client_1.expectString,
486
+ StatusStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
487
+ });
730
488
  };
731
489
  const de_ScalingPlanResource = (output, context) => {
732
- return {
733
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
734
- ScalableDimension: (0, smithy_client_1.expectString)(output.ScalableDimension),
735
- ScalingPlanName: (0, smithy_client_1.expectString)(output.ScalingPlanName),
736
- ScalingPlanVersion: (0, smithy_client_1.expectLong)(output.ScalingPlanVersion),
737
- ScalingPolicies: output.ScalingPolicies != null ? de_ScalingPolicies(output.ScalingPolicies, context) : undefined,
738
- ScalingStatusCode: (0, smithy_client_1.expectString)(output.ScalingStatusCode),
739
- ScalingStatusMessage: (0, smithy_client_1.expectString)(output.ScalingStatusMessage),
740
- ServiceNamespace: (0, smithy_client_1.expectString)(output.ServiceNamespace),
741
- };
490
+ return (0, smithy_client_1.take)(output, {
491
+ ResourceId: smithy_client_1.expectString,
492
+ ScalableDimension: smithy_client_1.expectString,
493
+ ScalingPlanName: smithy_client_1.expectString,
494
+ ScalingPlanVersion: smithy_client_1.expectLong,
495
+ ScalingPolicies: (_) => de_ScalingPolicies(_, context),
496
+ ScalingStatusCode: smithy_client_1.expectString,
497
+ ScalingStatusMessage: smithy_client_1.expectString,
498
+ ServiceNamespace: smithy_client_1.expectString,
499
+ });
742
500
  };
743
501
  const de_ScalingPlanResources = (output, context) => {
744
502
  const retVal = (output || [])
745
503
  .filter((e) => e != null)
746
504
  .map((entry) => {
747
- if (entry === null) {
748
- return null;
749
- }
750
505
  return de_ScalingPlanResource(entry, context);
751
506
  });
752
507
  return retVal;
@@ -755,9 +510,6 @@ const de_ScalingPlans = (output, context) => {
755
510
  const retVal = (output || [])
756
511
  .filter((e) => e != null)
757
512
  .map((entry) => {
758
- if (entry === null) {
759
- return null;
760
- }
761
513
  return de_ScalingPlan(entry, context);
762
514
  });
763
515
  return retVal;
@@ -766,84 +518,36 @@ const de_ScalingPolicies = (output, context) => {
766
518
  const retVal = (output || [])
767
519
  .filter((e) => e != null)
768
520
  .map((entry) => {
769
- if (entry === null) {
770
- return null;
771
- }
772
521
  return de_ScalingPolicy(entry, context);
773
522
  });
774
523
  return retVal;
775
524
  };
776
525
  const de_ScalingPolicy = (output, context) => {
777
- return {
778
- PolicyName: (0, smithy_client_1.expectString)(output.PolicyName),
779
- PolicyType: (0, smithy_client_1.expectString)(output.PolicyType),
780
- TargetTrackingConfiguration: output.TargetTrackingConfiguration != null
781
- ? de_TargetTrackingConfiguration(output.TargetTrackingConfiguration, context)
782
- : undefined,
783
- };
784
- };
785
- const de_TagFilter = (output, context) => {
786
- return {
787
- Key: (0, smithy_client_1.expectString)(output.Key),
788
- Values: output.Values != null ? de_TagValues(output.Values, context) : undefined,
789
- };
790
- };
791
- const de_TagFilters = (output, context) => {
792
- const retVal = (output || [])
793
- .filter((e) => e != null)
794
- .map((entry) => {
795
- if (entry === null) {
796
- return null;
797
- }
798
- return de_TagFilter(entry, context);
799
- });
800
- return retVal;
801
- };
802
- const de_TagValues = (output, context) => {
803
- const retVal = (output || [])
804
- .filter((e) => e != null)
805
- .map((entry) => {
806
- if (entry === null) {
807
- return null;
808
- }
809
- return (0, smithy_client_1.expectString)(entry);
526
+ return (0, smithy_client_1.take)(output, {
527
+ PolicyName: smithy_client_1.expectString,
528
+ PolicyType: smithy_client_1.expectString,
529
+ TargetTrackingConfiguration: (_) => de_TargetTrackingConfiguration(_, context),
810
530
  });
811
- return retVal;
812
531
  };
813
532
  const de_TargetTrackingConfiguration = (output, context) => {
814
- return {
815
- CustomizedScalingMetricSpecification: output.CustomizedScalingMetricSpecification != null
816
- ? de_CustomizedScalingMetricSpecification(output.CustomizedScalingMetricSpecification, context)
817
- : undefined,
818
- DisableScaleIn: (0, smithy_client_1.expectBoolean)(output.DisableScaleIn),
819
- EstimatedInstanceWarmup: (0, smithy_client_1.expectInt32)(output.EstimatedInstanceWarmup),
820
- PredefinedScalingMetricSpecification: output.PredefinedScalingMetricSpecification != null
821
- ? de_PredefinedScalingMetricSpecification(output.PredefinedScalingMetricSpecification, context)
822
- : undefined,
823
- ScaleInCooldown: (0, smithy_client_1.expectInt32)(output.ScaleInCooldown),
824
- ScaleOutCooldown: (0, smithy_client_1.expectInt32)(output.ScaleOutCooldown),
825
- TargetValue: (0, smithy_client_1.limitedParseDouble)(output.TargetValue),
826
- };
533
+ return (0, smithy_client_1.take)(output, {
534
+ CustomizedScalingMetricSpecification: smithy_client_1._json,
535
+ DisableScaleIn: smithy_client_1.expectBoolean,
536
+ EstimatedInstanceWarmup: smithy_client_1.expectInt32,
537
+ PredefinedScalingMetricSpecification: smithy_client_1._json,
538
+ ScaleInCooldown: smithy_client_1.expectInt32,
539
+ ScaleOutCooldown: smithy_client_1.expectInt32,
540
+ TargetValue: smithy_client_1.limitedParseDouble,
541
+ });
827
542
  };
828
543
  const de_TargetTrackingConfigurations = (output, context) => {
829
544
  const retVal = (output || [])
830
545
  .filter((e) => e != null)
831
546
  .map((entry) => {
832
- if (entry === null) {
833
- return null;
834
- }
835
547
  return de_TargetTrackingConfiguration(entry, context);
836
548
  });
837
549
  return retVal;
838
550
  };
839
- const de_UpdateScalingPlanResponse = (output, context) => {
840
- return {};
841
- };
842
- const de_ValidationException = (output, context) => {
843
- return {
844
- Message: (0, smithy_client_1.expectString)(output.Message),
845
- };
846
- };
847
551
  const deserializeMetadata = (output) => ({
848
552
  httpStatusCode: output.statusCode,
849
553
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -857,6 +561,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
857
561
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
858
562
  };
859
563
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
564
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(AutoScalingPlansServiceException_1.AutoScalingPlansServiceException);
860
565
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
861
566
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
862
567
  const contents = {