@aws-sdk/client-fis 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { FisServiceException as __BaseException } from "../models/FisServiceException";
5
5
  import { ConflictException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
@@ -10,20 +10,16 @@ export const se_CreateExperimentTemplateCommand = async (input, context) => {
10
10
  };
11
11
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates";
12
12
  let body;
13
- body = JSON.stringify({
14
- ...(input.actions != null && { actions: se_CreateExperimentTemplateActionInputMap(input.actions, context) }),
15
- clientToken: input.clientToken ?? generateIdempotencyToken(),
16
- ...(input.description != null && { description: input.description }),
17
- ...(input.logConfiguration != null && {
18
- logConfiguration: se_CreateExperimentTemplateLogConfigurationInput(input.logConfiguration, context),
19
- }),
20
- ...(input.roleArn != null && { roleArn: input.roleArn }),
21
- ...(input.stopConditions != null && {
22
- stopConditions: se_CreateExperimentTemplateStopConditionInputList(input.stopConditions, context),
23
- }),
24
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
25
- ...(input.targets != null && { targets: se_CreateExperimentTemplateTargetInputMap(input.targets, context) }),
26
- });
13
+ body = JSON.stringify(take(input, {
14
+ actions: (_) => _json(_),
15
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
16
+ description: [],
17
+ logConfiguration: (_) => _json(_),
18
+ roleArn: [],
19
+ stopConditions: (_) => _json(_),
20
+ tags: (_) => _json(_),
21
+ targets: (_) => _json(_),
22
+ }));
27
23
  return new __HttpRequest({
28
24
  protocol,
29
25
  hostname,
@@ -217,11 +213,11 @@ export const se_StartExperimentCommand = async (input, context) => {
217
213
  };
218
214
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments";
219
215
  let body;
220
- body = JSON.stringify({
221
- clientToken: input.clientToken ?? generateIdempotencyToken(),
222
- ...(input.experimentTemplateId != null && { experimentTemplateId: input.experimentTemplateId }),
223
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
224
- });
216
+ body = JSON.stringify(take(input, {
217
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
218
+ experimentTemplateId: [],
219
+ tags: (_) => _json(_),
220
+ }));
225
221
  return new __HttpRequest({
226
222
  protocol,
227
223
  hostname,
@@ -256,9 +252,9 @@ export const se_TagResourceCommand = async (input, context) => {
256
252
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
257
253
  resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
258
254
  let body;
259
- body = JSON.stringify({
260
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
261
- });
255
+ body = JSON.stringify(take(input, {
256
+ tags: (_) => _json(_),
257
+ }));
262
258
  return new __HttpRequest({
263
259
  protocol,
264
260
  hostname,
@@ -297,18 +293,14 @@ export const se_UpdateExperimentTemplateCommand = async (input, context) => {
297
293
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates/{id}";
298
294
  resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
299
295
  let body;
300
- body = JSON.stringify({
301
- ...(input.actions != null && { actions: se_UpdateExperimentTemplateActionInputMap(input.actions, context) }),
302
- ...(input.description != null && { description: input.description }),
303
- ...(input.logConfiguration != null && {
304
- logConfiguration: se_UpdateExperimentTemplateLogConfigurationInput(input.logConfiguration, context),
305
- }),
306
- ...(input.roleArn != null && { roleArn: input.roleArn }),
307
- ...(input.stopConditions != null && {
308
- stopConditions: se_UpdateExperimentTemplateStopConditionInputList(input.stopConditions, context),
309
- }),
310
- ...(input.targets != null && { targets: se_UpdateExperimentTemplateTargetInputMap(input.targets, context) }),
311
- });
296
+ body = JSON.stringify(take(input, {
297
+ actions: (_) => _json(_),
298
+ description: [],
299
+ logConfiguration: (_) => _json(_),
300
+ roleArn: [],
301
+ stopConditions: (_) => _json(_),
302
+ targets: (_) => _json(_),
303
+ }));
312
304
  return new __HttpRequest({
313
305
  protocol,
314
306
  hostname,
@@ -327,9 +319,10 @@ export const de_CreateExperimentTemplateCommand = async (output, context) => {
327
319
  $metadata: deserializeMetadata(output),
328
320
  });
329
321
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
330
- if (data.experimentTemplate != null) {
331
- contents.experimentTemplate = de_ExperimentTemplate(data.experimentTemplate, context);
332
- }
322
+ const doc = take(data, {
323
+ experimentTemplate: (_) => de_ExperimentTemplate(_, context),
324
+ });
325
+ Object.assign(contents, doc);
333
326
  return contents;
334
327
  };
335
328
  const de_CreateExperimentTemplateCommandError = async (output, context) => {
@@ -353,10 +346,9 @@ const de_CreateExperimentTemplateCommandError = async (output, context) => {
353
346
  throw await de_ValidationExceptionRes(parsedOutput, context);
354
347
  default:
355
348
  const parsedBody = parsedOutput.body;
356
- throwDefaultError({
349
+ return throwDefaultError({
357
350
  output,
358
351
  parsedBody,
359
- exceptionCtor: __BaseException,
360
352
  errorCode,
361
353
  });
362
354
  }
@@ -369,9 +361,10 @@ export const de_DeleteExperimentTemplateCommand = async (output, context) => {
369
361
  $metadata: deserializeMetadata(output),
370
362
  });
371
363
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
372
- if (data.experimentTemplate != null) {
373
- contents.experimentTemplate = de_ExperimentTemplate(data.experimentTemplate, context);
374
- }
364
+ const doc = take(data, {
365
+ experimentTemplate: (_) => de_ExperimentTemplate(_, context),
366
+ });
367
+ Object.assign(contents, doc);
375
368
  return contents;
376
369
  };
377
370
  const de_DeleteExperimentTemplateCommandError = async (output, context) => {
@@ -389,10 +382,9 @@ const de_DeleteExperimentTemplateCommandError = async (output, context) => {
389
382
  throw await de_ValidationExceptionRes(parsedOutput, context);
390
383
  default:
391
384
  const parsedBody = parsedOutput.body;
392
- throwDefaultError({
385
+ return throwDefaultError({
393
386
  output,
394
387
  parsedBody,
395
- exceptionCtor: __BaseException,
396
388
  errorCode,
397
389
  });
398
390
  }
@@ -405,9 +397,10 @@ export const de_GetActionCommand = async (output, context) => {
405
397
  $metadata: deserializeMetadata(output),
406
398
  });
407
399
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
408
- if (data.action != null) {
409
- contents.action = de_Action(data.action, context);
410
- }
400
+ const doc = take(data, {
401
+ action: _json,
402
+ });
403
+ Object.assign(contents, doc);
411
404
  return contents;
412
405
  };
413
406
  const de_GetActionCommandError = async (output, context) => {
@@ -425,10 +418,9 @@ const de_GetActionCommandError = async (output, context) => {
425
418
  throw await de_ValidationExceptionRes(parsedOutput, context);
426
419
  default:
427
420
  const parsedBody = parsedOutput.body;
428
- throwDefaultError({
421
+ return throwDefaultError({
429
422
  output,
430
423
  parsedBody,
431
- exceptionCtor: __BaseException,
432
424
  errorCode,
433
425
  });
434
426
  }
@@ -441,9 +433,10 @@ export const de_GetExperimentCommand = async (output, context) => {
441
433
  $metadata: deserializeMetadata(output),
442
434
  });
443
435
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
444
- if (data.experiment != null) {
445
- contents.experiment = de_Experiment(data.experiment, context);
446
- }
436
+ const doc = take(data, {
437
+ experiment: (_) => de_Experiment(_, context),
438
+ });
439
+ Object.assign(contents, doc);
447
440
  return contents;
448
441
  };
449
442
  const de_GetExperimentCommandError = async (output, context) => {
@@ -461,10 +454,9 @@ const de_GetExperimentCommandError = async (output, context) => {
461
454
  throw await de_ValidationExceptionRes(parsedOutput, context);
462
455
  default:
463
456
  const parsedBody = parsedOutput.body;
464
- throwDefaultError({
457
+ return throwDefaultError({
465
458
  output,
466
459
  parsedBody,
467
- exceptionCtor: __BaseException,
468
460
  errorCode,
469
461
  });
470
462
  }
@@ -477,9 +469,10 @@ export const de_GetExperimentTemplateCommand = async (output, context) => {
477
469
  $metadata: deserializeMetadata(output),
478
470
  });
479
471
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
480
- if (data.experimentTemplate != null) {
481
- contents.experimentTemplate = de_ExperimentTemplate(data.experimentTemplate, context);
482
- }
472
+ const doc = take(data, {
473
+ experimentTemplate: (_) => de_ExperimentTemplate(_, context),
474
+ });
475
+ Object.assign(contents, doc);
483
476
  return contents;
484
477
  };
485
478
  const de_GetExperimentTemplateCommandError = async (output, context) => {
@@ -497,10 +490,9 @@ const de_GetExperimentTemplateCommandError = async (output, context) => {
497
490
  throw await de_ValidationExceptionRes(parsedOutput, context);
498
491
  default:
499
492
  const parsedBody = parsedOutput.body;
500
- throwDefaultError({
493
+ return throwDefaultError({
501
494
  output,
502
495
  parsedBody,
503
- exceptionCtor: __BaseException,
504
496
  errorCode,
505
497
  });
506
498
  }
@@ -513,9 +505,10 @@ export const de_GetTargetResourceTypeCommand = async (output, context) => {
513
505
  $metadata: deserializeMetadata(output),
514
506
  });
515
507
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
516
- if (data.targetResourceType != null) {
517
- contents.targetResourceType = de_TargetResourceType(data.targetResourceType, context);
518
- }
508
+ const doc = take(data, {
509
+ targetResourceType: _json,
510
+ });
511
+ Object.assign(contents, doc);
519
512
  return contents;
520
513
  };
521
514
  const de_GetTargetResourceTypeCommandError = async (output, context) => {
@@ -533,10 +526,9 @@ const de_GetTargetResourceTypeCommandError = async (output, context) => {
533
526
  throw await de_ValidationExceptionRes(parsedOutput, context);
534
527
  default:
535
528
  const parsedBody = parsedOutput.body;
536
- throwDefaultError({
529
+ return throwDefaultError({
537
530
  output,
538
531
  parsedBody,
539
- exceptionCtor: __BaseException,
540
532
  errorCode,
541
533
  });
542
534
  }
@@ -549,12 +541,11 @@ export const de_ListActionsCommand = async (output, context) => {
549
541
  $metadata: deserializeMetadata(output),
550
542
  });
551
543
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
552
- if (data.actions != null) {
553
- contents.actions = de_ActionSummaryList(data.actions, context);
554
- }
555
- if (data.nextToken != null) {
556
- contents.nextToken = __expectString(data.nextToken);
557
- }
544
+ const doc = take(data, {
545
+ actions: _json,
546
+ nextToken: __expectString,
547
+ });
548
+ Object.assign(contents, doc);
558
549
  return contents;
559
550
  };
560
551
  const de_ListActionsCommandError = async (output, context) => {
@@ -569,10 +560,9 @@ const de_ListActionsCommandError = async (output, context) => {
569
560
  throw await de_ValidationExceptionRes(parsedOutput, context);
570
561
  default:
571
562
  const parsedBody = parsedOutput.body;
572
- throwDefaultError({
563
+ return throwDefaultError({
573
564
  output,
574
565
  parsedBody,
575
- exceptionCtor: __BaseException,
576
566
  errorCode,
577
567
  });
578
568
  }
@@ -585,12 +575,11 @@ export const de_ListExperimentsCommand = async (output, context) => {
585
575
  $metadata: deserializeMetadata(output),
586
576
  });
587
577
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
588
- if (data.experiments != null) {
589
- contents.experiments = de_ExperimentSummaryList(data.experiments, context);
590
- }
591
- if (data.nextToken != null) {
592
- contents.nextToken = __expectString(data.nextToken);
593
- }
578
+ const doc = take(data, {
579
+ experiments: (_) => de_ExperimentSummaryList(_, context),
580
+ nextToken: __expectString,
581
+ });
582
+ Object.assign(contents, doc);
594
583
  return contents;
595
584
  };
596
585
  const de_ListExperimentsCommandError = async (output, context) => {
@@ -605,10 +594,9 @@ const de_ListExperimentsCommandError = async (output, context) => {
605
594
  throw await de_ValidationExceptionRes(parsedOutput, context);
606
595
  default:
607
596
  const parsedBody = parsedOutput.body;
608
- throwDefaultError({
597
+ return throwDefaultError({
609
598
  output,
610
599
  parsedBody,
611
- exceptionCtor: __BaseException,
612
600
  errorCode,
613
601
  });
614
602
  }
@@ -621,12 +609,11 @@ export const de_ListExperimentTemplatesCommand = async (output, context) => {
621
609
  $metadata: deserializeMetadata(output),
622
610
  });
623
611
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
624
- if (data.experimentTemplates != null) {
625
- contents.experimentTemplates = de_ExperimentTemplateSummaryList(data.experimentTemplates, context);
626
- }
627
- if (data.nextToken != null) {
628
- contents.nextToken = __expectString(data.nextToken);
629
- }
612
+ const doc = take(data, {
613
+ experimentTemplates: (_) => de_ExperimentTemplateSummaryList(_, context),
614
+ nextToken: __expectString,
615
+ });
616
+ Object.assign(contents, doc);
630
617
  return contents;
631
618
  };
632
619
  const de_ListExperimentTemplatesCommandError = async (output, context) => {
@@ -641,10 +628,9 @@ const de_ListExperimentTemplatesCommandError = async (output, context) => {
641
628
  throw await de_ValidationExceptionRes(parsedOutput, context);
642
629
  default:
643
630
  const parsedBody = parsedOutput.body;
644
- throwDefaultError({
631
+ return throwDefaultError({
645
632
  output,
646
633
  parsedBody,
647
- exceptionCtor: __BaseException,
648
634
  errorCode,
649
635
  });
650
636
  }
@@ -657,9 +643,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
657
643
  $metadata: deserializeMetadata(output),
658
644
  });
659
645
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
660
- if (data.tags != null) {
661
- contents.tags = de_TagMap(data.tags, context);
662
- }
646
+ const doc = take(data, {
647
+ tags: _json,
648
+ });
649
+ Object.assign(contents, doc);
663
650
  return contents;
664
651
  };
665
652
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -669,10 +656,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
669
656
  };
670
657
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
671
658
  const parsedBody = parsedOutput.body;
672
- throwDefaultError({
659
+ return throwDefaultError({
673
660
  output,
674
661
  parsedBody,
675
- exceptionCtor: __BaseException,
676
662
  errorCode,
677
663
  });
678
664
  };
@@ -684,12 +670,11 @@ export const de_ListTargetResourceTypesCommand = async (output, context) => {
684
670
  $metadata: deserializeMetadata(output),
685
671
  });
686
672
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
687
- if (data.nextToken != null) {
688
- contents.nextToken = __expectString(data.nextToken);
689
- }
690
- if (data.targetResourceTypes != null) {
691
- contents.targetResourceTypes = de_TargetResourceTypeSummaryList(data.targetResourceTypes, context);
692
- }
673
+ const doc = take(data, {
674
+ nextToken: __expectString,
675
+ targetResourceTypes: _json,
676
+ });
677
+ Object.assign(contents, doc);
693
678
  return contents;
694
679
  };
695
680
  const de_ListTargetResourceTypesCommandError = async (output, context) => {
@@ -704,10 +689,9 @@ const de_ListTargetResourceTypesCommandError = async (output, context) => {
704
689
  throw await de_ValidationExceptionRes(parsedOutput, context);
705
690
  default:
706
691
  const parsedBody = parsedOutput.body;
707
- throwDefaultError({
692
+ return throwDefaultError({
708
693
  output,
709
694
  parsedBody,
710
- exceptionCtor: __BaseException,
711
695
  errorCode,
712
696
  });
713
697
  }
@@ -720,9 +704,10 @@ export const de_StartExperimentCommand = async (output, context) => {
720
704
  $metadata: deserializeMetadata(output),
721
705
  });
722
706
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
723
- if (data.experiment != null) {
724
- contents.experiment = de_Experiment(data.experiment, context);
725
- }
707
+ const doc = take(data, {
708
+ experiment: (_) => de_Experiment(_, context),
709
+ });
710
+ Object.assign(contents, doc);
726
711
  return contents;
727
712
  };
728
713
  const de_StartExperimentCommandError = async (output, context) => {
@@ -746,10 +731,9 @@ const de_StartExperimentCommandError = async (output, context) => {
746
731
  throw await de_ValidationExceptionRes(parsedOutput, context);
747
732
  default:
748
733
  const parsedBody = parsedOutput.body;
749
- throwDefaultError({
734
+ return throwDefaultError({
750
735
  output,
751
736
  parsedBody,
752
- exceptionCtor: __BaseException,
753
737
  errorCode,
754
738
  });
755
739
  }
@@ -762,9 +746,10 @@ export const de_StopExperimentCommand = async (output, context) => {
762
746
  $metadata: deserializeMetadata(output),
763
747
  });
764
748
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
765
- if (data.experiment != null) {
766
- contents.experiment = de_Experiment(data.experiment, context);
767
- }
749
+ const doc = take(data, {
750
+ experiment: (_) => de_Experiment(_, context),
751
+ });
752
+ Object.assign(contents, doc);
768
753
  return contents;
769
754
  };
770
755
  const de_StopExperimentCommandError = async (output, context) => {
@@ -782,10 +767,9 @@ const de_StopExperimentCommandError = async (output, context) => {
782
767
  throw await de_ValidationExceptionRes(parsedOutput, context);
783
768
  default:
784
769
  const parsedBody = parsedOutput.body;
785
- throwDefaultError({
770
+ return throwDefaultError({
786
771
  output,
787
772
  parsedBody,
788
- exceptionCtor: __BaseException,
789
773
  errorCode,
790
774
  });
791
775
  }
@@ -807,10 +791,9 @@ const de_TagResourceCommandError = async (output, context) => {
807
791
  };
808
792
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
809
793
  const parsedBody = parsedOutput.body;
810
- throwDefaultError({
794
+ return throwDefaultError({
811
795
  output,
812
796
  parsedBody,
813
- exceptionCtor: __BaseException,
814
797
  errorCode,
815
798
  });
816
799
  };
@@ -831,10 +814,9 @@ const de_UntagResourceCommandError = async (output, context) => {
831
814
  };
832
815
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
833
816
  const parsedBody = parsedOutput.body;
834
- throwDefaultError({
817
+ return throwDefaultError({
835
818
  output,
836
819
  parsedBody,
837
- exceptionCtor: __BaseException,
838
820
  errorCode,
839
821
  });
840
822
  };
@@ -846,9 +828,10 @@ export const de_UpdateExperimentTemplateCommand = async (output, context) => {
846
828
  $metadata: deserializeMetadata(output),
847
829
  });
848
830
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
849
- if (data.experimentTemplate != null) {
850
- contents.experimentTemplate = de_ExperimentTemplate(data.experimentTemplate, context);
851
- }
831
+ const doc = take(data, {
832
+ experimentTemplate: (_) => de_ExperimentTemplate(_, context),
833
+ });
834
+ Object.assign(contents, doc);
852
835
  return contents;
853
836
  };
854
837
  const de_UpdateExperimentTemplateCommandError = async (output, context) => {
@@ -869,21 +852,21 @@ const de_UpdateExperimentTemplateCommandError = async (output, context) => {
869
852
  throw await de_ValidationExceptionRes(parsedOutput, context);
870
853
  default:
871
854
  const parsedBody = parsedOutput.body;
872
- throwDefaultError({
855
+ return throwDefaultError({
873
856
  output,
874
857
  parsedBody,
875
- exceptionCtor: __BaseException,
876
858
  errorCode,
877
859
  });
878
860
  }
879
861
  };
880
- const map = __map;
862
+ const throwDefaultError = withBaseException(__BaseException);
881
863
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
882
864
  const contents = map({});
883
865
  const data = parsedOutput.body;
884
- if (data.message != null) {
885
- contents.message = __expectString(data.message);
886
- }
866
+ const doc = take(data, {
867
+ message: __expectString,
868
+ });
869
+ Object.assign(contents, doc);
887
870
  const exception = new ConflictException({
888
871
  $metadata: deserializeMetadata(parsedOutput),
889
872
  ...contents,
@@ -893,9 +876,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
893
876
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
894
877
  const contents = map({});
895
878
  const data = parsedOutput.body;
896
- if (data.message != null) {
897
- contents.message = __expectString(data.message);
898
- }
879
+ const doc = take(data, {
880
+ message: __expectString,
881
+ });
882
+ Object.assign(contents, doc);
899
883
  const exception = new ResourceNotFoundException({
900
884
  $metadata: deserializeMetadata(parsedOutput),
901
885
  ...contents,
@@ -905,9 +889,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
905
889
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
906
890
  const contents = map({});
907
891
  const data = parsedOutput.body;
908
- if (data.message != null) {
909
- contents.message = __expectString(data.message);
910
- }
892
+ const doc = take(data, {
893
+ message: __expectString,
894
+ });
895
+ Object.assign(contents, doc);
911
896
  const exception = new ServiceQuotaExceededException({
912
897
  $metadata: deserializeMetadata(parsedOutput),
913
898
  ...contents,
@@ -917,308 +902,43 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
917
902
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
918
903
  const contents = map({});
919
904
  const data = parsedOutput.body;
920
- if (data.message != null) {
921
- contents.message = __expectString(data.message);
922
- }
905
+ const doc = take(data, {
906
+ message: __expectString,
907
+ });
908
+ Object.assign(contents, doc);
923
909
  const exception = new ValidationException({
924
910
  $metadata: deserializeMetadata(parsedOutput),
925
911
  ...contents,
926
912
  });
927
913
  return __decorateServiceException(exception, parsedOutput.body);
928
914
  };
929
- const se_CreateExperimentTemplateActionInput = (input, context) => {
930
- return {
931
- ...(input.actionId != null && { actionId: input.actionId }),
932
- ...(input.description != null && { description: input.description }),
933
- ...(input.parameters != null && { parameters: se_ExperimentTemplateActionParameterMap(input.parameters, context) }),
934
- ...(input.startAfter != null && {
935
- startAfter: se_ExperimentTemplateActionStartAfterList(input.startAfter, context),
936
- }),
937
- ...(input.targets != null && { targets: se_ExperimentTemplateActionTargetMap(input.targets, context) }),
938
- };
939
- };
940
- const se_CreateExperimentTemplateActionInputMap = (input, context) => {
941
- return Object.entries(input).reduce((acc, [key, value]) => {
942
- if (value === null) {
943
- return acc;
944
- }
945
- acc[key] = se_CreateExperimentTemplateActionInput(value, context);
946
- return acc;
947
- }, {});
948
- };
949
- const se_CreateExperimentTemplateLogConfigurationInput = (input, context) => {
950
- return {
951
- ...(input.cloudWatchLogsConfiguration != null && {
952
- cloudWatchLogsConfiguration: se_ExperimentTemplateCloudWatchLogsLogConfigurationInput(input.cloudWatchLogsConfiguration, context),
953
- }),
954
- ...(input.logSchemaVersion != null && { logSchemaVersion: input.logSchemaVersion }),
955
- ...(input.s3Configuration != null && {
956
- s3Configuration: se_ExperimentTemplateS3LogConfigurationInput(input.s3Configuration, context),
957
- }),
958
- };
959
- };
960
- const se_CreateExperimentTemplateStopConditionInput = (input, context) => {
961
- return {
962
- ...(input.source != null && { source: input.source }),
963
- ...(input.value != null && { value: input.value }),
964
- };
965
- };
966
- const se_CreateExperimentTemplateStopConditionInputList = (input, context) => {
967
- return input
968
- .filter((e) => e != null)
969
- .map((entry) => {
970
- return se_CreateExperimentTemplateStopConditionInput(entry, context);
971
- });
972
- };
973
- const se_CreateExperimentTemplateTargetInput = (input, context) => {
974
- return {
975
- ...(input.filters != null && { filters: se_ExperimentTemplateTargetFilterInputList(input.filters, context) }),
976
- ...(input.parameters != null && { parameters: se_ExperimentTemplateTargetParameterMap(input.parameters, context) }),
977
- ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }),
978
- ...(input.resourceTags != null && { resourceTags: se_TagMap(input.resourceTags, context) }),
979
- ...(input.resourceType != null && { resourceType: input.resourceType }),
980
- ...(input.selectionMode != null && { selectionMode: input.selectionMode }),
981
- };
982
- };
983
- const se_CreateExperimentTemplateTargetInputMap = (input, context) => {
984
- return Object.entries(input).reduce((acc, [key, value]) => {
985
- if (value === null) {
986
- return acc;
987
- }
988
- acc[key] = se_CreateExperimentTemplateTargetInput(value, context);
989
- return acc;
990
- }, {});
991
- };
992
- const se_ExperimentTemplateActionParameterMap = (input, context) => {
993
- return Object.entries(input).reduce((acc, [key, value]) => {
994
- if (value === null) {
995
- return acc;
996
- }
997
- acc[key] = value;
998
- return acc;
999
- }, {});
1000
- };
1001
- const se_ExperimentTemplateActionStartAfterList = (input, context) => {
1002
- return input
1003
- .filter((e) => e != null)
1004
- .map((entry) => {
1005
- return entry;
1006
- });
1007
- };
1008
- const se_ExperimentTemplateActionTargetMap = (input, context) => {
1009
- return Object.entries(input).reduce((acc, [key, value]) => {
1010
- if (value === null) {
1011
- return acc;
1012
- }
1013
- acc[key] = value;
1014
- return acc;
1015
- }, {});
1016
- };
1017
- const se_ExperimentTemplateCloudWatchLogsLogConfigurationInput = (input, context) => {
1018
- return {
1019
- ...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }),
1020
- };
1021
- };
1022
- const se_ExperimentTemplateS3LogConfigurationInput = (input, context) => {
1023
- return {
1024
- ...(input.bucketName != null && { bucketName: input.bucketName }),
1025
- ...(input.prefix != null && { prefix: input.prefix }),
1026
- };
1027
- };
1028
- const se_ExperimentTemplateTargetFilterInputList = (input, context) => {
1029
- return input
1030
- .filter((e) => e != null)
1031
- .map((entry) => {
1032
- return se_ExperimentTemplateTargetInputFilter(entry, context);
1033
- });
1034
- };
1035
- const se_ExperimentTemplateTargetFilterValues = (input, context) => {
1036
- return input
1037
- .filter((e) => e != null)
1038
- .map((entry) => {
1039
- return entry;
1040
- });
1041
- };
1042
- const se_ExperimentTemplateTargetInputFilter = (input, context) => {
1043
- return {
1044
- ...(input.path != null && { path: input.path }),
1045
- ...(input.values != null && { values: se_ExperimentTemplateTargetFilterValues(input.values, context) }),
1046
- };
1047
- };
1048
- const se_ExperimentTemplateTargetParameterMap = (input, context) => {
1049
- return Object.entries(input).reduce((acc, [key, value]) => {
1050
- if (value === null) {
1051
- return acc;
1052
- }
1053
- acc[key] = value;
1054
- return acc;
1055
- }, {});
1056
- };
1057
- const se_ResourceArnList = (input, context) => {
1058
- return input
1059
- .filter((e) => e != null)
1060
- .map((entry) => {
1061
- return entry;
1062
- });
1063
- };
1064
- const se_TagMap = (input, context) => {
1065
- return Object.entries(input).reduce((acc, [key, value]) => {
1066
- if (value === null) {
1067
- return acc;
1068
- }
1069
- acc[key] = value;
1070
- return acc;
1071
- }, {});
1072
- };
1073
- const se_UpdateExperimentTemplateActionInputItem = (input, context) => {
1074
- return {
1075
- ...(input.actionId != null && { actionId: input.actionId }),
1076
- ...(input.description != null && { description: input.description }),
1077
- ...(input.parameters != null && { parameters: se_ExperimentTemplateActionParameterMap(input.parameters, context) }),
1078
- ...(input.startAfter != null && {
1079
- startAfter: se_ExperimentTemplateActionStartAfterList(input.startAfter, context),
1080
- }),
1081
- ...(input.targets != null && { targets: se_ExperimentTemplateActionTargetMap(input.targets, context) }),
1082
- };
1083
- };
1084
- const se_UpdateExperimentTemplateActionInputMap = (input, context) => {
1085
- return Object.entries(input).reduce((acc, [key, value]) => {
1086
- if (value === null) {
1087
- return acc;
1088
- }
1089
- acc[key] = se_UpdateExperimentTemplateActionInputItem(value, context);
1090
- return acc;
1091
- }, {});
1092
- };
1093
- const se_UpdateExperimentTemplateLogConfigurationInput = (input, context) => {
1094
- return {
1095
- ...(input.cloudWatchLogsConfiguration != null && {
1096
- cloudWatchLogsConfiguration: se_ExperimentTemplateCloudWatchLogsLogConfigurationInput(input.cloudWatchLogsConfiguration, context),
1097
- }),
1098
- ...(input.logSchemaVersion != null && { logSchemaVersion: input.logSchemaVersion }),
1099
- ...(input.s3Configuration != null && {
1100
- s3Configuration: se_ExperimentTemplateS3LogConfigurationInput(input.s3Configuration, context),
1101
- }),
1102
- };
1103
- };
1104
- const se_UpdateExperimentTemplateStopConditionInput = (input, context) => {
1105
- return {
1106
- ...(input.source != null && { source: input.source }),
1107
- ...(input.value != null && { value: input.value }),
1108
- };
1109
- };
1110
- const se_UpdateExperimentTemplateStopConditionInputList = (input, context) => {
1111
- return input
1112
- .filter((e) => e != null)
1113
- .map((entry) => {
1114
- return se_UpdateExperimentTemplateStopConditionInput(entry, context);
1115
- });
1116
- };
1117
- const se_UpdateExperimentTemplateTargetInput = (input, context) => {
1118
- return {
1119
- ...(input.filters != null && { filters: se_ExperimentTemplateTargetFilterInputList(input.filters, context) }),
1120
- ...(input.parameters != null && { parameters: se_ExperimentTemplateTargetParameterMap(input.parameters, context) }),
1121
- ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }),
1122
- ...(input.resourceTags != null && { resourceTags: se_TagMap(input.resourceTags, context) }),
1123
- ...(input.resourceType != null && { resourceType: input.resourceType }),
1124
- ...(input.selectionMode != null && { selectionMode: input.selectionMode }),
1125
- };
1126
- };
1127
- const se_UpdateExperimentTemplateTargetInputMap = (input, context) => {
1128
- return Object.entries(input).reduce((acc, [key, value]) => {
1129
- if (value === null) {
1130
- return acc;
1131
- }
1132
- acc[key] = se_UpdateExperimentTemplateTargetInput(value, context);
1133
- return acc;
1134
- }, {});
1135
- };
1136
- const de_Action = (output, context) => {
1137
- return {
1138
- description: __expectString(output.description),
1139
- id: __expectString(output.id),
1140
- parameters: output.parameters != null ? de_ActionParameterMap(output.parameters, context) : undefined,
1141
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1142
- targets: output.targets != null ? de_ActionTargetMap(output.targets, context) : undefined,
1143
- };
1144
- };
1145
- const de_ActionParameter = (output, context) => {
1146
- return {
1147
- description: __expectString(output.description),
1148
- required: __expectBoolean(output.required),
1149
- };
1150
- };
1151
- const de_ActionParameterMap = (output, context) => {
1152
- return Object.entries(output).reduce((acc, [key, value]) => {
1153
- if (value === null) {
1154
- return acc;
1155
- }
1156
- acc[key] = de_ActionParameter(value, context);
1157
- return acc;
1158
- }, {});
1159
- };
1160
- const de_ActionSummary = (output, context) => {
1161
- return {
1162
- description: __expectString(output.description),
1163
- id: __expectString(output.id),
1164
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1165
- targets: output.targets != null ? de_ActionTargetMap(output.targets, context) : undefined,
1166
- };
1167
- };
1168
- const de_ActionSummaryList = (output, context) => {
1169
- const retVal = (output || [])
1170
- .filter((e) => e != null)
1171
- .map((entry) => {
1172
- if (entry === null) {
1173
- return null;
1174
- }
1175
- return de_ActionSummary(entry, context);
1176
- });
1177
- return retVal;
1178
- };
1179
- const de_ActionTarget = (output, context) => {
1180
- return {
1181
- resourceType: __expectString(output.resourceType),
1182
- };
1183
- };
1184
- const de_ActionTargetMap = (output, context) => {
1185
- return Object.entries(output).reduce((acc, [key, value]) => {
1186
- if (value === null) {
1187
- return acc;
1188
- }
1189
- acc[key] = de_ActionTarget(value, context);
1190
- return acc;
1191
- }, {});
1192
- };
1193
915
  const de_Experiment = (output, context) => {
1194
- return {
1195
- actions: output.actions != null ? de_ExperimentActionMap(output.actions, context) : undefined,
1196
- creationTime: output.creationTime != null
1197
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
1198
- : undefined,
1199
- endTime: output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined,
1200
- experimentTemplateId: __expectString(output.experimentTemplateId),
1201
- id: __expectString(output.id),
1202
- logConfiguration: output.logConfiguration != null ? de_ExperimentLogConfiguration(output.logConfiguration, context) : undefined,
1203
- roleArn: __expectString(output.roleArn),
1204
- startTime: output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
1205
- state: output.state != null ? de_ExperimentState(output.state, context) : undefined,
1206
- stopConditions: output.stopConditions != null ? de_ExperimentStopConditionList(output.stopConditions, context) : undefined,
1207
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1208
- targets: output.targets != null ? de_ExperimentTargetMap(output.targets, context) : undefined,
1209
- };
916
+ return take(output, {
917
+ actions: (_) => de_ExperimentActionMap(_, context),
918
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
919
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
920
+ experimentTemplateId: __expectString,
921
+ id: __expectString,
922
+ logConfiguration: _json,
923
+ roleArn: __expectString,
924
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
925
+ state: _json,
926
+ stopConditions: _json,
927
+ tags: _json,
928
+ targets: _json,
929
+ });
1210
930
  };
1211
931
  const de_ExperimentAction = (output, context) => {
1212
- return {
1213
- actionId: __expectString(output.actionId),
1214
- description: __expectString(output.description),
1215
- endTime: output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined,
1216
- parameters: output.parameters != null ? de_ExperimentActionParameterMap(output.parameters, context) : undefined,
1217
- startAfter: output.startAfter != null ? de_ExperimentActionStartAfterList(output.startAfter, context) : undefined,
1218
- startTime: output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
1219
- state: output.state != null ? de_ExperimentActionState(output.state, context) : undefined,
1220
- targets: output.targets != null ? de_ExperimentActionTargetMap(output.targets, context) : undefined,
1221
- };
932
+ return take(output, {
933
+ actionId: __expectString,
934
+ description: __expectString,
935
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
936
+ parameters: _json,
937
+ startAfter: _json,
938
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
939
+ state: _json,
940
+ targets: _json,
941
+ });
1222
942
  };
1223
943
  const de_ExperimentActionMap = (output, context) => {
1224
944
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -1229,409 +949,54 @@ const de_ExperimentActionMap = (output, context) => {
1229
949
  return acc;
1230
950
  }, {});
1231
951
  };
1232
- const de_ExperimentActionParameterMap = (output, context) => {
1233
- return Object.entries(output).reduce((acc, [key, value]) => {
1234
- if (value === null) {
1235
- return acc;
1236
- }
1237
- acc[key] = __expectString(value);
1238
- return acc;
1239
- }, {});
1240
- };
1241
- const de_ExperimentActionStartAfterList = (output, context) => {
1242
- const retVal = (output || [])
1243
- .filter((e) => e != null)
1244
- .map((entry) => {
1245
- if (entry === null) {
1246
- return null;
1247
- }
1248
- return __expectString(entry);
1249
- });
1250
- return retVal;
1251
- };
1252
- const de_ExperimentActionState = (output, context) => {
1253
- return {
1254
- reason: __expectString(output.reason),
1255
- status: __expectString(output.status),
1256
- };
1257
- };
1258
- const de_ExperimentActionTargetMap = (output, context) => {
1259
- return Object.entries(output).reduce((acc, [key, value]) => {
1260
- if (value === null) {
1261
- return acc;
1262
- }
1263
- acc[key] = __expectString(value);
1264
- return acc;
1265
- }, {});
1266
- };
1267
- const de_ExperimentCloudWatchLogsLogConfiguration = (output, context) => {
1268
- return {
1269
- logGroupArn: __expectString(output.logGroupArn),
1270
- };
1271
- };
1272
- const de_ExperimentLogConfiguration = (output, context) => {
1273
- return {
1274
- cloudWatchLogsConfiguration: output.cloudWatchLogsConfiguration != null
1275
- ? de_ExperimentCloudWatchLogsLogConfiguration(output.cloudWatchLogsConfiguration, context)
1276
- : undefined,
1277
- logSchemaVersion: __expectInt32(output.logSchemaVersion),
1278
- s3Configuration: output.s3Configuration != null ? de_ExperimentS3LogConfiguration(output.s3Configuration, context) : undefined,
1279
- };
1280
- };
1281
- const de_ExperimentS3LogConfiguration = (output, context) => {
1282
- return {
1283
- bucketName: __expectString(output.bucketName),
1284
- prefix: __expectString(output.prefix),
1285
- };
1286
- };
1287
- const de_ExperimentState = (output, context) => {
1288
- return {
1289
- reason: __expectString(output.reason),
1290
- status: __expectString(output.status),
1291
- };
1292
- };
1293
- const de_ExperimentStopCondition = (output, context) => {
1294
- return {
1295
- source: __expectString(output.source),
1296
- value: __expectString(output.value),
1297
- };
1298
- };
1299
- const de_ExperimentStopConditionList = (output, context) => {
1300
- const retVal = (output || [])
1301
- .filter((e) => e != null)
1302
- .map((entry) => {
1303
- if (entry === null) {
1304
- return null;
1305
- }
1306
- return de_ExperimentStopCondition(entry, context);
1307
- });
1308
- return retVal;
1309
- };
1310
952
  const de_ExperimentSummary = (output, context) => {
1311
- return {
1312
- creationTime: output.creationTime != null
1313
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
1314
- : undefined,
1315
- experimentTemplateId: __expectString(output.experimentTemplateId),
1316
- id: __expectString(output.id),
1317
- state: output.state != null ? de_ExperimentState(output.state, context) : undefined,
1318
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1319
- };
953
+ return take(output, {
954
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
955
+ experimentTemplateId: __expectString,
956
+ id: __expectString,
957
+ state: _json,
958
+ tags: _json,
959
+ });
1320
960
  };
1321
961
  const de_ExperimentSummaryList = (output, context) => {
1322
962
  const retVal = (output || [])
1323
963
  .filter((e) => e != null)
1324
964
  .map((entry) => {
1325
- if (entry === null) {
1326
- return null;
1327
- }
1328
965
  return de_ExperimentSummary(entry, context);
1329
966
  });
1330
967
  return retVal;
1331
968
  };
1332
- const de_ExperimentTarget = (output, context) => {
1333
- return {
1334
- filters: output.filters != null ? de_ExperimentTargetFilterList(output.filters, context) : undefined,
1335
- parameters: output.parameters != null ? de_ExperimentTargetParameterMap(output.parameters, context) : undefined,
1336
- resourceArns: output.resourceArns != null ? de_ResourceArnList(output.resourceArns, context) : undefined,
1337
- resourceTags: output.resourceTags != null ? de_TagMap(output.resourceTags, context) : undefined,
1338
- resourceType: __expectString(output.resourceType),
1339
- selectionMode: __expectString(output.selectionMode),
1340
- };
1341
- };
1342
- const de_ExperimentTargetFilter = (output, context) => {
1343
- return {
1344
- path: __expectString(output.path),
1345
- values: output.values != null ? de_ExperimentTargetFilterValues(output.values, context) : undefined,
1346
- };
1347
- };
1348
- const de_ExperimentTargetFilterList = (output, context) => {
1349
- const retVal = (output || [])
1350
- .filter((e) => e != null)
1351
- .map((entry) => {
1352
- if (entry === null) {
1353
- return null;
1354
- }
1355
- return de_ExperimentTargetFilter(entry, context);
1356
- });
1357
- return retVal;
1358
- };
1359
- const de_ExperimentTargetFilterValues = (output, context) => {
1360
- const retVal = (output || [])
1361
- .filter((e) => e != null)
1362
- .map((entry) => {
1363
- if (entry === null) {
1364
- return null;
1365
- }
1366
- return __expectString(entry);
1367
- });
1368
- return retVal;
1369
- };
1370
- const de_ExperimentTargetMap = (output, context) => {
1371
- return Object.entries(output).reduce((acc, [key, value]) => {
1372
- if (value === null) {
1373
- return acc;
1374
- }
1375
- acc[key] = de_ExperimentTarget(value, context);
1376
- return acc;
1377
- }, {});
1378
- };
1379
- const de_ExperimentTargetParameterMap = (output, context) => {
1380
- return Object.entries(output).reduce((acc, [key, value]) => {
1381
- if (value === null) {
1382
- return acc;
1383
- }
1384
- acc[key] = __expectString(value);
1385
- return acc;
1386
- }, {});
1387
- };
1388
969
  const de_ExperimentTemplate = (output, context) => {
1389
- return {
1390
- actions: output.actions != null ? de_ExperimentTemplateActionMap(output.actions, context) : undefined,
1391
- creationTime: output.creationTime != null
1392
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
1393
- : undefined,
1394
- description: __expectString(output.description),
1395
- id: __expectString(output.id),
1396
- lastUpdateTime: output.lastUpdateTime != null
1397
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime)))
1398
- : undefined,
1399
- logConfiguration: output.logConfiguration != null
1400
- ? de_ExperimentTemplateLogConfiguration(output.logConfiguration, context)
1401
- : undefined,
1402
- roleArn: __expectString(output.roleArn),
1403
- stopConditions: output.stopConditions != null
1404
- ? de_ExperimentTemplateStopConditionList(output.stopConditions, context)
1405
- : undefined,
1406
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1407
- targets: output.targets != null ? de_ExperimentTemplateTargetMap(output.targets, context) : undefined,
1408
- };
1409
- };
1410
- const de_ExperimentTemplateAction = (output, context) => {
1411
- return {
1412
- actionId: __expectString(output.actionId),
1413
- description: __expectString(output.description),
1414
- parameters: output.parameters != null ? de_ExperimentTemplateActionParameterMap(output.parameters, context) : undefined,
1415
- startAfter: output.startAfter != null ? de_ExperimentTemplateActionStartAfterList(output.startAfter, context) : undefined,
1416
- targets: output.targets != null ? de_ExperimentTemplateActionTargetMap(output.targets, context) : undefined,
1417
- };
1418
- };
1419
- const de_ExperimentTemplateActionMap = (output, context) => {
1420
- return Object.entries(output).reduce((acc, [key, value]) => {
1421
- if (value === null) {
1422
- return acc;
1423
- }
1424
- acc[key] = de_ExperimentTemplateAction(value, context);
1425
- return acc;
1426
- }, {});
1427
- };
1428
- const de_ExperimentTemplateActionParameterMap = (output, context) => {
1429
- return Object.entries(output).reduce((acc, [key, value]) => {
1430
- if (value === null) {
1431
- return acc;
1432
- }
1433
- acc[key] = __expectString(value);
1434
- return acc;
1435
- }, {});
1436
- };
1437
- const de_ExperimentTemplateActionStartAfterList = (output, context) => {
1438
- const retVal = (output || [])
1439
- .filter((e) => e != null)
1440
- .map((entry) => {
1441
- if (entry === null) {
1442
- return null;
1443
- }
1444
- return __expectString(entry);
1445
- });
1446
- return retVal;
1447
- };
1448
- const de_ExperimentTemplateActionTargetMap = (output, context) => {
1449
- return Object.entries(output).reduce((acc, [key, value]) => {
1450
- if (value === null) {
1451
- return acc;
1452
- }
1453
- acc[key] = __expectString(value);
1454
- return acc;
1455
- }, {});
1456
- };
1457
- const de_ExperimentTemplateCloudWatchLogsLogConfiguration = (output, context) => {
1458
- return {
1459
- logGroupArn: __expectString(output.logGroupArn),
1460
- };
1461
- };
1462
- const de_ExperimentTemplateLogConfiguration = (output, context) => {
1463
- return {
1464
- cloudWatchLogsConfiguration: output.cloudWatchLogsConfiguration != null
1465
- ? de_ExperimentTemplateCloudWatchLogsLogConfiguration(output.cloudWatchLogsConfiguration, context)
1466
- : undefined,
1467
- logSchemaVersion: __expectInt32(output.logSchemaVersion),
1468
- s3Configuration: output.s3Configuration != null
1469
- ? de_ExperimentTemplateS3LogConfiguration(output.s3Configuration, context)
1470
- : undefined,
1471
- };
1472
- };
1473
- const de_ExperimentTemplateS3LogConfiguration = (output, context) => {
1474
- return {
1475
- bucketName: __expectString(output.bucketName),
1476
- prefix: __expectString(output.prefix),
1477
- };
1478
- };
1479
- const de_ExperimentTemplateStopCondition = (output, context) => {
1480
- return {
1481
- source: __expectString(output.source),
1482
- value: __expectString(output.value),
1483
- };
1484
- };
1485
- const de_ExperimentTemplateStopConditionList = (output, context) => {
1486
- const retVal = (output || [])
1487
- .filter((e) => e != null)
1488
- .map((entry) => {
1489
- if (entry === null) {
1490
- return null;
1491
- }
1492
- return de_ExperimentTemplateStopCondition(entry, context);
970
+ return take(output, {
971
+ actions: _json,
972
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
973
+ description: __expectString,
974
+ id: __expectString,
975
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
976
+ logConfiguration: _json,
977
+ roleArn: __expectString,
978
+ stopConditions: _json,
979
+ tags: _json,
980
+ targets: _json,
1493
981
  });
1494
- return retVal;
1495
982
  };
1496
983
  const de_ExperimentTemplateSummary = (output, context) => {
1497
- return {
1498
- creationTime: output.creationTime != null
1499
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
1500
- : undefined,
1501
- description: __expectString(output.description),
1502
- id: __expectString(output.id),
1503
- lastUpdateTime: output.lastUpdateTime != null
1504
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime)))
1505
- : undefined,
1506
- tags: output.tags != null ? de_TagMap(output.tags, context) : undefined,
1507
- };
984
+ return take(output, {
985
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
986
+ description: __expectString,
987
+ id: __expectString,
988
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
989
+ tags: _json,
990
+ });
1508
991
  };
1509
992
  const de_ExperimentTemplateSummaryList = (output, context) => {
1510
993
  const retVal = (output || [])
1511
994
  .filter((e) => e != null)
1512
995
  .map((entry) => {
1513
- if (entry === null) {
1514
- return null;
1515
- }
1516
996
  return de_ExperimentTemplateSummary(entry, context);
1517
997
  });
1518
998
  return retVal;
1519
999
  };
1520
- const de_ExperimentTemplateTarget = (output, context) => {
1521
- return {
1522
- filters: output.filters != null ? de_ExperimentTemplateTargetFilterList(output.filters, context) : undefined,
1523
- parameters: output.parameters != null ? de_ExperimentTemplateTargetParameterMap(output.parameters, context) : undefined,
1524
- resourceArns: output.resourceArns != null ? de_ResourceArnList(output.resourceArns, context) : undefined,
1525
- resourceTags: output.resourceTags != null ? de_TagMap(output.resourceTags, context) : undefined,
1526
- resourceType: __expectString(output.resourceType),
1527
- selectionMode: __expectString(output.selectionMode),
1528
- };
1529
- };
1530
- const de_ExperimentTemplateTargetFilter = (output, context) => {
1531
- return {
1532
- path: __expectString(output.path),
1533
- values: output.values != null ? de_ExperimentTemplateTargetFilterValues(output.values, context) : undefined,
1534
- };
1535
- };
1536
- const de_ExperimentTemplateTargetFilterList = (output, context) => {
1537
- const retVal = (output || [])
1538
- .filter((e) => e != null)
1539
- .map((entry) => {
1540
- if (entry === null) {
1541
- return null;
1542
- }
1543
- return de_ExperimentTemplateTargetFilter(entry, context);
1544
- });
1545
- return retVal;
1546
- };
1547
- const de_ExperimentTemplateTargetFilterValues = (output, context) => {
1548
- const retVal = (output || [])
1549
- .filter((e) => e != null)
1550
- .map((entry) => {
1551
- if (entry === null) {
1552
- return null;
1553
- }
1554
- return __expectString(entry);
1555
- });
1556
- return retVal;
1557
- };
1558
- const de_ExperimentTemplateTargetMap = (output, context) => {
1559
- return Object.entries(output).reduce((acc, [key, value]) => {
1560
- if (value === null) {
1561
- return acc;
1562
- }
1563
- acc[key] = de_ExperimentTemplateTarget(value, context);
1564
- return acc;
1565
- }, {});
1566
- };
1567
- const de_ExperimentTemplateTargetParameterMap = (output, context) => {
1568
- return Object.entries(output).reduce((acc, [key, value]) => {
1569
- if (value === null) {
1570
- return acc;
1571
- }
1572
- acc[key] = __expectString(value);
1573
- return acc;
1574
- }, {});
1575
- };
1576
- const de_ResourceArnList = (output, context) => {
1577
- const retVal = (output || [])
1578
- .filter((e) => e != null)
1579
- .map((entry) => {
1580
- if (entry === null) {
1581
- return null;
1582
- }
1583
- return __expectString(entry);
1584
- });
1585
- return retVal;
1586
- };
1587
- const de_TagMap = (output, context) => {
1588
- return Object.entries(output).reduce((acc, [key, value]) => {
1589
- if (value === null) {
1590
- return acc;
1591
- }
1592
- acc[key] = __expectString(value);
1593
- return acc;
1594
- }, {});
1595
- };
1596
- const de_TargetResourceType = (output, context) => {
1597
- return {
1598
- description: __expectString(output.description),
1599
- parameters: output.parameters != null ? de_TargetResourceTypeParameterMap(output.parameters, context) : undefined,
1600
- resourceType: __expectString(output.resourceType),
1601
- };
1602
- };
1603
- const de_TargetResourceTypeParameter = (output, context) => {
1604
- return {
1605
- description: __expectString(output.description),
1606
- required: __expectBoolean(output.required),
1607
- };
1608
- };
1609
- const de_TargetResourceTypeParameterMap = (output, context) => {
1610
- return Object.entries(output).reduce((acc, [key, value]) => {
1611
- if (value === null) {
1612
- return acc;
1613
- }
1614
- acc[key] = de_TargetResourceTypeParameter(value, context);
1615
- return acc;
1616
- }, {});
1617
- };
1618
- const de_TargetResourceTypeSummary = (output, context) => {
1619
- return {
1620
- description: __expectString(output.description),
1621
- resourceType: __expectString(output.resourceType),
1622
- };
1623
- };
1624
- const de_TargetResourceTypeSummaryList = (output, context) => {
1625
- const retVal = (output || [])
1626
- .filter((e) => e != null)
1627
- .map((entry) => {
1628
- if (entry === null) {
1629
- return null;
1630
- }
1631
- return de_TargetResourceTypeSummary(entry, context);
1632
- });
1633
- return retVal;
1634
- };
1635
1000
  const deserializeMetadata = (output) => ({
1636
1001
  httpStatusCode: output.statusCode,
1637
1002
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],