@aws-sdk/client-migrationhuborchestrator 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.
@@ -1,7 +1,7 @@
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, expectUnion as __expectUnion, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, 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 { MigrationHubOrchestratorServiceException as __BaseException } from "../models/MigrationHubOrchestratorServiceException";
4
- import { AccessDeniedException, InternalServerException, ResourceNotFoundException, StepInput, ThrottlingException, ValidationException, WorkflowStepOutputUnion, } from "../models/models_0";
4
+ import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_CreateWorkflowCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = {
@@ -9,15 +9,15 @@ export const se_CreateWorkflowCommand = async (input, context) => {
9
9
  };
10
10
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow";
11
11
  let body;
12
- body = JSON.stringify({
13
- ...(input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId }),
14
- ...(input.description != null && { description: input.description }),
15
- ...(input.inputParameters != null && { inputParameters: se_StepInputParameters(input.inputParameters, context) }),
16
- ...(input.name != null && { name: input.name }),
17
- ...(input.stepTargets != null && { stepTargets: se_StringList(input.stepTargets, context) }),
18
- ...(input.tags != null && { tags: se_StringMap(input.tags, context) }),
19
- ...(input.templateId != null && { templateId: input.templateId }),
20
- });
12
+ body = JSON.stringify(take(input, {
13
+ applicationConfigurationId: [],
14
+ description: [],
15
+ inputParameters: (_) => _json(_),
16
+ name: [],
17
+ stepTargets: (_) => _json(_),
18
+ tags: (_) => _json(_),
19
+ templateId: [],
20
+ }));
21
21
  return new __HttpRequest({
22
22
  protocol,
23
23
  hostname,
@@ -35,20 +35,18 @@ export const se_CreateWorkflowStepCommand = async (input, context) => {
35
35
  };
36
36
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep";
37
37
  let body;
38
- body = JSON.stringify({
39
- ...(input.description != null && { description: input.description }),
40
- ...(input.name != null && { name: input.name }),
41
- ...(input.next != null && { next: se_StringList(input.next, context) }),
42
- ...(input.outputs != null && { outputs: se_WorkflowStepOutputList(input.outputs, context) }),
43
- ...(input.previous != null && { previous: se_StringList(input.previous, context) }),
44
- ...(input.stepActionType != null && { stepActionType: input.stepActionType }),
45
- ...(input.stepGroupId != null && { stepGroupId: input.stepGroupId }),
46
- ...(input.stepTarget != null && { stepTarget: se_StringList(input.stepTarget, context) }),
47
- ...(input.workflowId != null && { workflowId: input.workflowId }),
48
- ...(input.workflowStepAutomationConfiguration != null && {
49
- workflowStepAutomationConfiguration: se_WorkflowStepAutomationConfiguration(input.workflowStepAutomationConfiguration, context),
50
- }),
51
- });
38
+ body = JSON.stringify(take(input, {
39
+ description: [],
40
+ name: [],
41
+ next: (_) => _json(_),
42
+ outputs: (_) => _json(_),
43
+ previous: (_) => _json(_),
44
+ stepActionType: [],
45
+ stepGroupId: [],
46
+ stepTarget: (_) => _json(_),
47
+ workflowId: [],
48
+ workflowStepAutomationConfiguration: (_) => _json(_),
49
+ }));
52
50
  return new __HttpRequest({
53
51
  protocol,
54
52
  hostname,
@@ -66,13 +64,13 @@ export const se_CreateWorkflowStepGroupCommand = async (input, context) => {
66
64
  };
67
65
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroups";
68
66
  let body;
69
- body = JSON.stringify({
70
- ...(input.description != null && { description: input.description }),
71
- ...(input.name != null && { name: input.name }),
72
- ...(input.next != null && { next: se_StringList(input.next, context) }),
73
- ...(input.previous != null && { previous: se_StringList(input.previous, context) }),
74
- ...(input.workflowId != null && { workflowId: input.workflowId }),
75
- });
67
+ body = JSON.stringify(take(input, {
68
+ description: [],
69
+ name: [],
70
+ next: (_) => _json(_),
71
+ previous: (_) => _json(_),
72
+ workflowId: [],
73
+ }));
76
74
  return new __HttpRequest({
77
75
  protocol,
78
76
  hostname,
@@ -480,9 +478,9 @@ export const se_TagResourceCommand = async (input, context) => {
480
478
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
481
479
  resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
482
480
  let body;
483
- body = JSON.stringify({
484
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
485
- });
481
+ body = JSON.stringify(take(input, {
482
+ tags: (_) => _json(_),
483
+ }));
486
484
  return new __HttpRequest({
487
485
  protocol,
488
486
  hostname,
@@ -524,12 +522,12 @@ export const se_UpdateWorkflowCommand = async (input, context) => {
524
522
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow/{id}";
525
523
  resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
526
524
  let body;
527
- body = JSON.stringify({
528
- ...(input.description != null && { description: input.description }),
529
- ...(input.inputParameters != null && { inputParameters: se_StepInputParameters(input.inputParameters, context) }),
530
- ...(input.name != null && { name: input.name }),
531
- ...(input.stepTargets != null && { stepTargets: se_StringList(input.stepTargets, context) }),
532
- });
525
+ body = JSON.stringify(take(input, {
526
+ description: [],
527
+ inputParameters: (_) => _json(_),
528
+ name: [],
529
+ stepTargets: (_) => _json(_),
530
+ }));
533
531
  return new __HttpRequest({
534
532
  protocol,
535
533
  hostname,
@@ -548,21 +546,19 @@ export const se_UpdateWorkflowStepCommand = async (input, context) => {
548
546
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep/{id}";
549
547
  resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
550
548
  let body;
551
- body = JSON.stringify({
552
- ...(input.description != null && { description: input.description }),
553
- ...(input.name != null && { name: input.name }),
554
- ...(input.next != null && { next: se_StringList(input.next, context) }),
555
- ...(input.outputs != null && { outputs: se_WorkflowStepOutputList(input.outputs, context) }),
556
- ...(input.previous != null && { previous: se_StringList(input.previous, context) }),
557
- ...(input.status != null && { status: input.status }),
558
- ...(input.stepActionType != null && { stepActionType: input.stepActionType }),
559
- ...(input.stepGroupId != null && { stepGroupId: input.stepGroupId }),
560
- ...(input.stepTarget != null && { stepTarget: se_StringList(input.stepTarget, context) }),
561
- ...(input.workflowId != null && { workflowId: input.workflowId }),
562
- ...(input.workflowStepAutomationConfiguration != null && {
563
- workflowStepAutomationConfiguration: se_WorkflowStepAutomationConfiguration(input.workflowStepAutomationConfiguration, context),
564
- }),
565
- });
549
+ body = JSON.stringify(take(input, {
550
+ description: [],
551
+ name: [],
552
+ next: (_) => _json(_),
553
+ outputs: (_) => _json(_),
554
+ previous: (_) => _json(_),
555
+ status: [],
556
+ stepActionType: [],
557
+ stepGroupId: [],
558
+ stepTarget: (_) => _json(_),
559
+ workflowId: [],
560
+ workflowStepAutomationConfiguration: (_) => _json(_),
561
+ }));
566
562
  return new __HttpRequest({
567
563
  protocol,
568
564
  hostname,
@@ -584,12 +580,12 @@ export const se_UpdateWorkflowStepGroupCommand = async (input, context) => {
584
580
  workflowId: [, __expectNonNull(input.workflowId, `workflowId`)],
585
581
  });
586
582
  let body;
587
- body = JSON.stringify({
588
- ...(input.description != null && { description: input.description }),
589
- ...(input.name != null && { name: input.name }),
590
- ...(input.next != null && { next: se_StringList(input.next, context) }),
591
- ...(input.previous != null && { previous: se_StringList(input.previous, context) }),
592
- });
583
+ body = JSON.stringify(take(input, {
584
+ description: [],
585
+ name: [],
586
+ next: (_) => _json(_),
587
+ previous: (_) => _json(_),
588
+ }));
593
589
  return new __HttpRequest({
594
590
  protocol,
595
591
  hostname,
@@ -609,39 +605,20 @@ export const de_CreateWorkflowCommand = async (output, context) => {
609
605
  $metadata: deserializeMetadata(output),
610
606
  });
611
607
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
612
- if (data.adsApplicationConfigurationId != null) {
613
- contents.adsApplicationConfigurationId = __expectString(data.adsApplicationConfigurationId);
614
- }
615
- if (data.arn != null) {
616
- contents.arn = __expectString(data.arn);
617
- }
618
- if (data.creationTime != null) {
619
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
620
- }
621
- if (data.description != null) {
622
- contents.description = __expectString(data.description);
623
- }
624
- if (data.id != null) {
625
- contents.id = __expectString(data.id);
626
- }
627
- if (data.name != null) {
628
- contents.name = __expectString(data.name);
629
- }
630
- if (data.status != null) {
631
- contents.status = __expectString(data.status);
632
- }
633
- if (data.stepTargets != null) {
634
- contents.stepTargets = de_StringList(data.stepTargets, context);
635
- }
636
- if (data.tags != null) {
637
- contents.tags = de_StringMap(data.tags, context);
638
- }
639
- if (data.templateId != null) {
640
- contents.templateId = __expectString(data.templateId);
641
- }
642
- if (data.workflowInputs != null) {
643
- contents.workflowInputs = de_StepInputParameters(data.workflowInputs, context);
644
- }
608
+ const doc = take(data, {
609
+ adsApplicationConfigurationId: __expectString,
610
+ arn: __expectString,
611
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
612
+ description: __expectString,
613
+ id: __expectString,
614
+ name: __expectString,
615
+ status: __expectString,
616
+ stepTargets: _json,
617
+ tags: _json,
618
+ templateId: __expectString,
619
+ workflowInputs: _json,
620
+ });
621
+ Object.assign(contents, doc);
645
622
  return contents;
646
623
  };
647
624
  const de_CreateWorkflowCommandError = async (output, context) => {
@@ -665,10 +642,9 @@ const de_CreateWorkflowCommandError = async (output, context) => {
665
642
  throw await de_ValidationExceptionRes(parsedOutput, context);
666
643
  default:
667
644
  const parsedBody = parsedOutput.body;
668
- throwDefaultError({
645
+ return throwDefaultError({
669
646
  output,
670
647
  parsedBody,
671
- exceptionCtor: __BaseException,
672
648
  errorCode,
673
649
  });
674
650
  }
@@ -681,18 +657,13 @@ export const de_CreateWorkflowStepCommand = async (output, context) => {
681
657
  $metadata: deserializeMetadata(output),
682
658
  });
683
659
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
684
- if (data.id != null) {
685
- contents.id = __expectString(data.id);
686
- }
687
- if (data.name != null) {
688
- contents.name = __expectString(data.name);
689
- }
690
- if (data.stepGroupId != null) {
691
- contents.stepGroupId = __expectString(data.stepGroupId);
692
- }
693
- if (data.workflowId != null) {
694
- contents.workflowId = __expectString(data.workflowId);
695
- }
660
+ const doc = take(data, {
661
+ id: __expectString,
662
+ name: __expectString,
663
+ stepGroupId: __expectString,
664
+ workflowId: __expectString,
665
+ });
666
+ Object.assign(contents, doc);
696
667
  return contents;
697
668
  };
698
669
  const de_CreateWorkflowStepCommandError = async (output, context) => {
@@ -716,10 +687,9 @@ const de_CreateWorkflowStepCommandError = async (output, context) => {
716
687
  throw await de_ValidationExceptionRes(parsedOutput, context);
717
688
  default:
718
689
  const parsedBody = parsedOutput.body;
719
- throwDefaultError({
690
+ return throwDefaultError({
720
691
  output,
721
692
  parsedBody,
722
- exceptionCtor: __BaseException,
723
693
  errorCode,
724
694
  });
725
695
  }
@@ -732,30 +702,17 @@ export const de_CreateWorkflowStepGroupCommand = async (output, context) => {
732
702
  $metadata: deserializeMetadata(output),
733
703
  });
734
704
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
735
- if (data.creationTime != null) {
736
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
737
- }
738
- if (data.description != null) {
739
- contents.description = __expectString(data.description);
740
- }
741
- if (data.id != null) {
742
- contents.id = __expectString(data.id);
743
- }
744
- if (data.name != null) {
745
- contents.name = __expectString(data.name);
746
- }
747
- if (data.next != null) {
748
- contents.next = de_StringList(data.next, context);
749
- }
750
- if (data.previous != null) {
751
- contents.previous = de_StringList(data.previous, context);
752
- }
753
- if (data.tools != null) {
754
- contents.tools = de_ToolsList(data.tools, context);
755
- }
756
- if (data.workflowId != null) {
757
- contents.workflowId = __expectString(data.workflowId);
758
- }
705
+ const doc = take(data, {
706
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
707
+ description: __expectString,
708
+ id: __expectString,
709
+ name: __expectString,
710
+ next: _json,
711
+ previous: _json,
712
+ tools: _json,
713
+ workflowId: __expectString,
714
+ });
715
+ Object.assign(contents, doc);
759
716
  return contents;
760
717
  };
761
718
  const de_CreateWorkflowStepGroupCommandError = async (output, context) => {
@@ -779,10 +736,9 @@ const de_CreateWorkflowStepGroupCommandError = async (output, context) => {
779
736
  throw await de_ValidationExceptionRes(parsedOutput, context);
780
737
  default:
781
738
  const parsedBody = parsedOutput.body;
782
- throwDefaultError({
739
+ return throwDefaultError({
783
740
  output,
784
741
  parsedBody,
785
- exceptionCtor: __BaseException,
786
742
  errorCode,
787
743
  });
788
744
  }
@@ -795,15 +751,12 @@ export const de_DeleteWorkflowCommand = async (output, context) => {
795
751
  $metadata: deserializeMetadata(output),
796
752
  });
797
753
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
798
- if (data.arn != null) {
799
- contents.arn = __expectString(data.arn);
800
- }
801
- if (data.id != null) {
802
- contents.id = __expectString(data.id);
803
- }
804
- if (data.status != null) {
805
- contents.status = __expectString(data.status);
806
- }
754
+ const doc = take(data, {
755
+ arn: __expectString,
756
+ id: __expectString,
757
+ status: __expectString,
758
+ });
759
+ Object.assign(contents, doc);
807
760
  return contents;
808
761
  };
809
762
  const de_DeleteWorkflowCommandError = async (output, context) => {
@@ -830,10 +783,9 @@ const de_DeleteWorkflowCommandError = async (output, context) => {
830
783
  throw await de_ValidationExceptionRes(parsedOutput, context);
831
784
  default:
832
785
  const parsedBody = parsedOutput.body;
833
- throwDefaultError({
786
+ return throwDefaultError({
834
787
  output,
835
788
  parsedBody,
836
- exceptionCtor: __BaseException,
837
789
  errorCode,
838
790
  });
839
791
  }
@@ -872,10 +824,9 @@ const de_DeleteWorkflowStepCommandError = async (output, context) => {
872
824
  throw await de_ValidationExceptionRes(parsedOutput, context);
873
825
  default:
874
826
  const parsedBody = parsedOutput.body;
875
- throwDefaultError({
827
+ return throwDefaultError({
876
828
  output,
877
829
  parsedBody,
878
- exceptionCtor: __BaseException,
879
830
  errorCode,
880
831
  });
881
832
  }
@@ -914,10 +865,9 @@ const de_DeleteWorkflowStepGroupCommandError = async (output, context) => {
914
865
  throw await de_ValidationExceptionRes(parsedOutput, context);
915
866
  default:
916
867
  const parsedBody = parsedOutput.body;
917
- throwDefaultError({
868
+ return throwDefaultError({
918
869
  output,
919
870
  parsedBody,
920
- exceptionCtor: __BaseException,
921
871
  errorCode,
922
872
  });
923
873
  }
@@ -930,27 +880,16 @@ export const de_GetTemplateCommand = async (output, context) => {
930
880
  $metadata: deserializeMetadata(output),
931
881
  });
932
882
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
933
- if (data.creationTime != null) {
934
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
935
- }
936
- if (data.description != null) {
937
- contents.description = __expectString(data.description);
938
- }
939
- if (data.id != null) {
940
- contents.id = __expectString(data.id);
941
- }
942
- if (data.inputs != null) {
943
- contents.inputs = de_TemplateInputList(data.inputs, context);
944
- }
945
- if (data.name != null) {
946
- contents.name = __expectString(data.name);
947
- }
948
- if (data.status != null) {
949
- contents.status = __expectString(data.status);
950
- }
951
- if (data.tools != null) {
952
- contents.tools = de_ToolsList(data.tools, context);
953
- }
883
+ const doc = take(data, {
884
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
885
+ description: __expectString,
886
+ id: __expectString,
887
+ inputs: _json,
888
+ name: __expectString,
889
+ status: __expectString,
890
+ tools: _json,
891
+ });
892
+ Object.assign(contents, doc);
954
893
  return contents;
955
894
  };
956
895
  const de_GetTemplateCommandError = async (output, context) => {
@@ -974,10 +913,9 @@ const de_GetTemplateCommandError = async (output, context) => {
974
913
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
975
914
  default:
976
915
  const parsedBody = parsedOutput.body;
977
- throwDefaultError({
916
+ return throwDefaultError({
978
917
  output,
979
918
  parsedBody,
980
- exceptionCtor: __BaseException,
981
919
  errorCode,
982
920
  });
983
921
  }
@@ -990,39 +928,20 @@ export const de_GetTemplateStepCommand = async (output, context) => {
990
928
  $metadata: deserializeMetadata(output),
991
929
  });
992
930
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
993
- if (data.creationTime != null) {
994
- contents.creationTime = __expectString(data.creationTime);
995
- }
996
- if (data.description != null) {
997
- contents.description = __expectString(data.description);
998
- }
999
- if (data.id != null) {
1000
- contents.id = __expectString(data.id);
1001
- }
1002
- if (data.name != null) {
1003
- contents.name = __expectString(data.name);
1004
- }
1005
- if (data.next != null) {
1006
- contents.next = de_StringList(data.next, context);
1007
- }
1008
- if (data.outputs != null) {
1009
- contents.outputs = de_StepOutputList(data.outputs, context);
1010
- }
1011
- if (data.previous != null) {
1012
- contents.previous = de_StringList(data.previous, context);
1013
- }
1014
- if (data.stepActionType != null) {
1015
- contents.stepActionType = __expectString(data.stepActionType);
1016
- }
1017
- if (data.stepAutomationConfiguration != null) {
1018
- contents.stepAutomationConfiguration = de_StepAutomationConfiguration(data.stepAutomationConfiguration, context);
1019
- }
1020
- if (data.stepGroupId != null) {
1021
- contents.stepGroupId = __expectString(data.stepGroupId);
1022
- }
1023
- if (data.templateId != null) {
1024
- contents.templateId = __expectString(data.templateId);
1025
- }
931
+ const doc = take(data, {
932
+ creationTime: __expectString,
933
+ description: __expectString,
934
+ id: __expectString,
935
+ name: __expectString,
936
+ next: _json,
937
+ outputs: _json,
938
+ previous: _json,
939
+ stepActionType: __expectString,
940
+ stepAutomationConfiguration: _json,
941
+ stepGroupId: __expectString,
942
+ templateId: __expectString,
943
+ });
944
+ Object.assign(contents, doc);
1026
945
  return contents;
1027
946
  };
1028
947
  const de_GetTemplateStepCommandError = async (output, context) => {
@@ -1049,10 +968,9 @@ const de_GetTemplateStepCommandError = async (output, context) => {
1049
968
  throw await de_ValidationExceptionRes(parsedOutput, context);
1050
969
  default:
1051
970
  const parsedBody = parsedOutput.body;
1052
- throwDefaultError({
971
+ return throwDefaultError({
1053
972
  output,
1054
973
  parsedBody,
1055
- exceptionCtor: __BaseException,
1056
974
  errorCode,
1057
975
  });
1058
976
  }
@@ -1065,36 +983,19 @@ export const de_GetTemplateStepGroupCommand = async (output, context) => {
1065
983
  $metadata: deserializeMetadata(output),
1066
984
  });
1067
985
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1068
- if (data.creationTime != null) {
1069
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1070
- }
1071
- if (data.description != null) {
1072
- contents.description = __expectString(data.description);
1073
- }
1074
- if (data.id != null) {
1075
- contents.id = __expectString(data.id);
1076
- }
1077
- if (data.lastModifiedTime != null) {
1078
- contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
1079
- }
1080
- if (data.name != null) {
1081
- contents.name = __expectString(data.name);
1082
- }
1083
- if (data.next != null) {
1084
- contents.next = de_StringList(data.next, context);
1085
- }
1086
- if (data.previous != null) {
1087
- contents.previous = de_StringList(data.previous, context);
1088
- }
1089
- if (data.status != null) {
1090
- contents.status = __expectString(data.status);
1091
- }
1092
- if (data.templateId != null) {
1093
- contents.templateId = __expectString(data.templateId);
1094
- }
1095
- if (data.tools != null) {
1096
- contents.tools = de_ToolsList(data.tools, context);
1097
- }
986
+ const doc = take(data, {
987
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
988
+ description: __expectString,
989
+ id: __expectString,
990
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
991
+ name: __expectString,
992
+ next: _json,
993
+ previous: _json,
994
+ status: __expectString,
995
+ templateId: __expectString,
996
+ tools: _json,
997
+ });
998
+ Object.assign(contents, doc);
1098
999
  return contents;
1099
1000
  };
1100
1001
  const de_GetTemplateStepGroupCommandError = async (output, context) => {
@@ -1121,10 +1022,9 @@ const de_GetTemplateStepGroupCommandError = async (output, context) => {
1121
1022
  throw await de_ValidationExceptionRes(parsedOutput, context);
1122
1023
  default:
1123
1024
  const parsedBody = parsedOutput.body;
1124
- throwDefaultError({
1025
+ return throwDefaultError({
1125
1026
  output,
1126
1027
  parsedBody,
1127
- exceptionCtor: __BaseException,
1128
1028
  errorCode,
1129
1029
  });
1130
1030
  }
@@ -1137,66 +1037,29 @@ export const de_GetWorkflowCommand = async (output, context) => {
1137
1037
  $metadata: deserializeMetadata(output),
1138
1038
  });
1139
1039
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1140
- if (data.adsApplicationConfigurationId != null) {
1141
- contents.adsApplicationConfigurationId = __expectString(data.adsApplicationConfigurationId);
1142
- }
1143
- if (data.adsApplicationName != null) {
1144
- contents.adsApplicationName = __expectString(data.adsApplicationName);
1145
- }
1146
- if (data.arn != null) {
1147
- contents.arn = __expectString(data.arn);
1148
- }
1149
- if (data.completedSteps != null) {
1150
- contents.completedSteps = __expectInt32(data.completedSteps);
1151
- }
1152
- if (data.creationTime != null) {
1153
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1154
- }
1155
- if (data.description != null) {
1156
- contents.description = __expectString(data.description);
1157
- }
1158
- if (data.endTime != null) {
1159
- contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
1160
- }
1161
- if (data.id != null) {
1162
- contents.id = __expectString(data.id);
1163
- }
1164
- if (data.lastModifiedTime != null) {
1165
- contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
1166
- }
1167
- if (data.lastStartTime != null) {
1168
- contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime)));
1169
- }
1170
- if (data.lastStopTime != null) {
1171
- contents.lastStopTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStopTime)));
1172
- }
1173
- if (data.name != null) {
1174
- contents.name = __expectString(data.name);
1175
- }
1176
- if (data.status != null) {
1177
- contents.status = __expectString(data.status);
1178
- }
1179
- if (data.statusMessage != null) {
1180
- contents.statusMessage = __expectString(data.statusMessage);
1181
- }
1182
- if (data.tags != null) {
1183
- contents.tags = de_StringMap(data.tags, context);
1184
- }
1185
- if (data.templateId != null) {
1186
- contents.templateId = __expectString(data.templateId);
1187
- }
1188
- if (data.tools != null) {
1189
- contents.tools = de_ToolsList(data.tools, context);
1190
- }
1191
- if (data.totalSteps != null) {
1192
- contents.totalSteps = __expectInt32(data.totalSteps);
1193
- }
1194
- if (data.workflowBucket != null) {
1195
- contents.workflowBucket = __expectString(data.workflowBucket);
1196
- }
1197
- if (data.workflowInputs != null) {
1198
- contents.workflowInputs = de_StepInputParameters(data.workflowInputs, context);
1199
- }
1040
+ const doc = take(data, {
1041
+ adsApplicationConfigurationId: __expectString,
1042
+ adsApplicationName: __expectString,
1043
+ arn: __expectString,
1044
+ completedSteps: __expectInt32,
1045
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1046
+ description: __expectString,
1047
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1048
+ id: __expectString,
1049
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1050
+ lastStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1051
+ lastStopTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1052
+ name: __expectString,
1053
+ status: __expectString,
1054
+ statusMessage: __expectString,
1055
+ tags: _json,
1056
+ templateId: __expectString,
1057
+ tools: _json,
1058
+ totalSteps: __expectInt32,
1059
+ workflowBucket: __expectString,
1060
+ workflowInputs: _json,
1061
+ });
1062
+ Object.assign(contents, doc);
1200
1063
  return contents;
1201
1064
  };
1202
1065
  const de_GetWorkflowCommandError = async (output, context) => {
@@ -1223,10 +1086,9 @@ const de_GetWorkflowCommandError = async (output, context) => {
1223
1086
  throw await de_ValidationExceptionRes(parsedOutput, context);
1224
1087
  default:
1225
1088
  const parsedBody = parsedOutput.body;
1226
- throwDefaultError({
1089
+ return throwDefaultError({
1227
1090
  output,
1228
1091
  parsedBody,
1229
- exceptionCtor: __BaseException,
1230
1092
  errorCode,
1231
1093
  });
1232
1094
  }
@@ -1239,69 +1101,30 @@ export const de_GetWorkflowStepCommand = async (output, context) => {
1239
1101
  $metadata: deserializeMetadata(output),
1240
1102
  });
1241
1103
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1242
- if (data.creationTime != null) {
1243
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1244
- }
1245
- if (data.description != null) {
1246
- contents.description = __expectString(data.description);
1247
- }
1248
- if (data.endTime != null) {
1249
- contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
1250
- }
1251
- if (data.lastStartTime != null) {
1252
- contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime)));
1253
- }
1254
- if (data.name != null) {
1255
- contents.name = __expectString(data.name);
1256
- }
1257
- if (data.next != null) {
1258
- contents.next = de_StringList(data.next, context);
1259
- }
1260
- if (data.noOfSrvCompleted != null) {
1261
- contents.noOfSrvCompleted = __expectInt32(data.noOfSrvCompleted);
1262
- }
1263
- if (data.noOfSrvFailed != null) {
1264
- contents.noOfSrvFailed = __expectInt32(data.noOfSrvFailed);
1265
- }
1266
- if (data.outputs != null) {
1267
- contents.outputs = de_WorkflowStepOutputList(data.outputs, context);
1268
- }
1269
- if (data.owner != null) {
1270
- contents.owner = __expectString(data.owner);
1271
- }
1272
- if (data.previous != null) {
1273
- contents.previous = de_StringList(data.previous, context);
1274
- }
1275
- if (data.scriptOutputLocation != null) {
1276
- contents.scriptOutputLocation = __expectString(data.scriptOutputLocation);
1277
- }
1278
- if (data.status != null) {
1279
- contents.status = __expectString(data.status);
1280
- }
1281
- if (data.statusMessage != null) {
1282
- contents.statusMessage = __expectString(data.statusMessage);
1283
- }
1284
- if (data.stepActionType != null) {
1285
- contents.stepActionType = __expectString(data.stepActionType);
1286
- }
1287
- if (data.stepGroupId != null) {
1288
- contents.stepGroupId = __expectString(data.stepGroupId);
1289
- }
1290
- if (data.stepId != null) {
1291
- contents.stepId = __expectString(data.stepId);
1292
- }
1293
- if (data.stepTarget != null) {
1294
- contents.stepTarget = de_StringList(data.stepTarget, context);
1295
- }
1296
- if (data.totalNoOfSrv != null) {
1297
- contents.totalNoOfSrv = __expectInt32(data.totalNoOfSrv);
1298
- }
1299
- if (data.workflowId != null) {
1300
- contents.workflowId = __expectString(data.workflowId);
1301
- }
1302
- if (data.workflowStepAutomationConfiguration != null) {
1303
- contents.workflowStepAutomationConfiguration = de_WorkflowStepAutomationConfiguration(data.workflowStepAutomationConfiguration, context);
1304
- }
1104
+ const doc = take(data, {
1105
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1106
+ description: __expectString,
1107
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1108
+ lastStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1109
+ name: __expectString,
1110
+ next: _json,
1111
+ noOfSrvCompleted: __expectInt32,
1112
+ noOfSrvFailed: __expectInt32,
1113
+ outputs: _json,
1114
+ owner: __expectString,
1115
+ previous: _json,
1116
+ scriptOutputLocation: __expectString,
1117
+ status: __expectString,
1118
+ statusMessage: __expectString,
1119
+ stepActionType: __expectString,
1120
+ stepGroupId: __expectString,
1121
+ stepId: __expectString,
1122
+ stepTarget: _json,
1123
+ totalNoOfSrv: __expectInt32,
1124
+ workflowId: __expectString,
1125
+ workflowStepAutomationConfiguration: _json,
1126
+ });
1127
+ Object.assign(contents, doc);
1305
1128
  return contents;
1306
1129
  };
1307
1130
  const de_GetWorkflowStepCommandError = async (output, context) => {
@@ -1325,10 +1148,9 @@ const de_GetWorkflowStepCommandError = async (output, context) => {
1325
1148
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1326
1149
  default:
1327
1150
  const parsedBody = parsedOutput.body;
1328
- throwDefaultError({
1151
+ return throwDefaultError({
1329
1152
  output,
1330
1153
  parsedBody,
1331
- exceptionCtor: __BaseException,
1332
1154
  errorCode,
1333
1155
  });
1334
1156
  }
@@ -1341,42 +1163,21 @@ export const de_GetWorkflowStepGroupCommand = async (output, context) => {
1341
1163
  $metadata: deserializeMetadata(output),
1342
1164
  });
1343
1165
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1344
- if (data.creationTime != null) {
1345
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1346
- }
1347
- if (data.description != null) {
1348
- contents.description = __expectString(data.description);
1349
- }
1350
- if (data.endTime != null) {
1351
- contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
1352
- }
1353
- if (data.id != null) {
1354
- contents.id = __expectString(data.id);
1355
- }
1356
- if (data.lastModifiedTime != null) {
1357
- contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
1358
- }
1359
- if (data.name != null) {
1360
- contents.name = __expectString(data.name);
1361
- }
1362
- if (data.next != null) {
1363
- contents.next = de_StringList(data.next, context);
1364
- }
1365
- if (data.owner != null) {
1366
- contents.owner = __expectString(data.owner);
1367
- }
1368
- if (data.previous != null) {
1369
- contents.previous = de_StringList(data.previous, context);
1370
- }
1371
- if (data.status != null) {
1372
- contents.status = __expectString(data.status);
1373
- }
1374
- if (data.tools != null) {
1375
- contents.tools = de_ToolsList(data.tools, context);
1376
- }
1377
- if (data.workflowId != null) {
1378
- contents.workflowId = __expectString(data.workflowId);
1379
- }
1166
+ const doc = take(data, {
1167
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1168
+ description: __expectString,
1169
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1170
+ id: __expectString,
1171
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1172
+ name: __expectString,
1173
+ next: _json,
1174
+ owner: __expectString,
1175
+ previous: _json,
1176
+ status: __expectString,
1177
+ tools: _json,
1178
+ workflowId: __expectString,
1179
+ });
1180
+ Object.assign(contents, doc);
1380
1181
  return contents;
1381
1182
  };
1382
1183
  const de_GetWorkflowStepGroupCommandError = async (output, context) => {
@@ -1403,10 +1204,9 @@ const de_GetWorkflowStepGroupCommandError = async (output, context) => {
1403
1204
  throw await de_ValidationExceptionRes(parsedOutput, context);
1404
1205
  default:
1405
1206
  const parsedBody = parsedOutput.body;
1406
- throwDefaultError({
1207
+ return throwDefaultError({
1407
1208
  output,
1408
1209
  parsedBody,
1409
- exceptionCtor: __BaseException,
1410
1210
  errorCode,
1411
1211
  });
1412
1212
  }
@@ -1419,12 +1219,11 @@ export const de_ListPluginsCommand = async (output, context) => {
1419
1219
  $metadata: deserializeMetadata(output),
1420
1220
  });
1421
1221
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1422
- if (data.nextToken != null) {
1423
- contents.nextToken = __expectString(data.nextToken);
1424
- }
1425
- if (data.plugins != null) {
1426
- contents.plugins = de_PluginSummaries(data.plugins, context);
1427
- }
1222
+ const doc = take(data, {
1223
+ nextToken: __expectString,
1224
+ plugins: _json,
1225
+ });
1226
+ Object.assign(contents, doc);
1428
1227
  return contents;
1429
1228
  };
1430
1229
  const de_ListPluginsCommandError = async (output, context) => {
@@ -1445,10 +1244,9 @@ const de_ListPluginsCommandError = async (output, context) => {
1445
1244
  throw await de_ValidationExceptionRes(parsedOutput, context);
1446
1245
  default:
1447
1246
  const parsedBody = parsedOutput.body;
1448
- throwDefaultError({
1247
+ return throwDefaultError({
1449
1248
  output,
1450
1249
  parsedBody,
1451
- exceptionCtor: __BaseException,
1452
1250
  errorCode,
1453
1251
  });
1454
1252
  }
@@ -1461,9 +1259,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1461
1259
  $metadata: deserializeMetadata(output),
1462
1260
  });
1463
1261
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1464
- if (data.tags != null) {
1465
- contents.tags = de_TagMap(data.tags, context);
1466
- }
1262
+ const doc = take(data, {
1263
+ tags: _json,
1264
+ });
1265
+ Object.assign(contents, doc);
1467
1266
  return contents;
1468
1267
  };
1469
1268
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1481,10 +1280,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1481
1280
  throw await de_ValidationExceptionRes(parsedOutput, context);
1482
1281
  default:
1483
1282
  const parsedBody = parsedOutput.body;
1484
- throwDefaultError({
1283
+ return throwDefaultError({
1485
1284
  output,
1486
1285
  parsedBody,
1487
- exceptionCtor: __BaseException,
1488
1286
  errorCode,
1489
1287
  });
1490
1288
  }
@@ -1497,12 +1295,11 @@ export const de_ListTemplatesCommand = async (output, context) => {
1497
1295
  $metadata: deserializeMetadata(output),
1498
1296
  });
1499
1297
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1500
- if (data.nextToken != null) {
1501
- contents.nextToken = __expectString(data.nextToken);
1502
- }
1503
- if (data.templateSummary != null) {
1504
- contents.templateSummary = de_TemplateSummaryList(data.templateSummary, context);
1505
- }
1298
+ const doc = take(data, {
1299
+ nextToken: __expectString,
1300
+ templateSummary: _json,
1301
+ });
1302
+ Object.assign(contents, doc);
1506
1303
  return contents;
1507
1304
  };
1508
1305
  const de_ListTemplatesCommandError = async (output, context) => {
@@ -1523,10 +1320,9 @@ const de_ListTemplatesCommandError = async (output, context) => {
1523
1320
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1524
1321
  default:
1525
1322
  const parsedBody = parsedOutput.body;
1526
- throwDefaultError({
1323
+ return throwDefaultError({
1527
1324
  output,
1528
1325
  parsedBody,
1529
- exceptionCtor: __BaseException,
1530
1326
  errorCode,
1531
1327
  });
1532
1328
  }
@@ -1539,12 +1335,11 @@ export const de_ListTemplateStepGroupsCommand = async (output, context) => {
1539
1335
  $metadata: deserializeMetadata(output),
1540
1336
  });
1541
1337
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1542
- if (data.nextToken != null) {
1543
- contents.nextToken = __expectString(data.nextToken);
1544
- }
1545
- if (data.templateStepGroupSummary != null) {
1546
- contents.templateStepGroupSummary = de_TemplateStepGroupSummaryList(data.templateStepGroupSummary, context);
1547
- }
1338
+ const doc = take(data, {
1339
+ nextToken: __expectString,
1340
+ templateStepGroupSummary: _json,
1341
+ });
1342
+ Object.assign(contents, doc);
1548
1343
  return contents;
1549
1344
  };
1550
1345
  const de_ListTemplateStepGroupsCommandError = async (output, context) => {
@@ -1568,10 +1363,9 @@ const de_ListTemplateStepGroupsCommandError = async (output, context) => {
1568
1363
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1569
1364
  default:
1570
1365
  const parsedBody = parsedOutput.body;
1571
- throwDefaultError({
1366
+ return throwDefaultError({
1572
1367
  output,
1573
1368
  parsedBody,
1574
- exceptionCtor: __BaseException,
1575
1369
  errorCode,
1576
1370
  });
1577
1371
  }
@@ -1584,12 +1378,11 @@ export const de_ListTemplateStepsCommand = async (output, context) => {
1584
1378
  $metadata: deserializeMetadata(output),
1585
1379
  });
1586
1380
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1587
- if (data.nextToken != null) {
1588
- contents.nextToken = __expectString(data.nextToken);
1589
- }
1590
- if (data.templateStepSummaryList != null) {
1591
- contents.templateStepSummaryList = de_TemplateStepSummaryList(data.templateStepSummaryList, context);
1592
- }
1381
+ const doc = take(data, {
1382
+ nextToken: __expectString,
1383
+ templateStepSummaryList: _json,
1384
+ });
1385
+ Object.assign(contents, doc);
1593
1386
  return contents;
1594
1387
  };
1595
1388
  const de_ListTemplateStepsCommandError = async (output, context) => {
@@ -1616,10 +1409,9 @@ const de_ListTemplateStepsCommandError = async (output, context) => {
1616
1409
  throw await de_ValidationExceptionRes(parsedOutput, context);
1617
1410
  default:
1618
1411
  const parsedBody = parsedOutput.body;
1619
- throwDefaultError({
1412
+ return throwDefaultError({
1620
1413
  output,
1621
1414
  parsedBody,
1622
- exceptionCtor: __BaseException,
1623
1415
  errorCode,
1624
1416
  });
1625
1417
  }
@@ -1632,12 +1424,11 @@ export const de_ListWorkflowsCommand = async (output, context) => {
1632
1424
  $metadata: deserializeMetadata(output),
1633
1425
  });
1634
1426
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1635
- if (data.migrationWorkflowSummary != null) {
1636
- contents.migrationWorkflowSummary = de_MigrationWorkflowSummaryList(data.migrationWorkflowSummary, context);
1637
- }
1638
- if (data.nextToken != null) {
1639
- contents.nextToken = __expectString(data.nextToken);
1640
- }
1427
+ const doc = take(data, {
1428
+ migrationWorkflowSummary: (_) => de_MigrationWorkflowSummaryList(_, context),
1429
+ nextToken: __expectString,
1430
+ });
1431
+ Object.assign(contents, doc);
1641
1432
  return contents;
1642
1433
  };
1643
1434
  const de_ListWorkflowsCommandError = async (output, context) => {
@@ -1664,10 +1455,9 @@ const de_ListWorkflowsCommandError = async (output, context) => {
1664
1455
  throw await de_ValidationExceptionRes(parsedOutput, context);
1665
1456
  default:
1666
1457
  const parsedBody = parsedOutput.body;
1667
- throwDefaultError({
1458
+ return throwDefaultError({
1668
1459
  output,
1669
1460
  parsedBody,
1670
- exceptionCtor: __BaseException,
1671
1461
  errorCode,
1672
1462
  });
1673
1463
  }
@@ -1680,12 +1470,11 @@ export const de_ListWorkflowStepGroupsCommand = async (output, context) => {
1680
1470
  $metadata: deserializeMetadata(output),
1681
1471
  });
1682
1472
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1683
- if (data.nextToken != null) {
1684
- contents.nextToken = __expectString(data.nextToken);
1685
- }
1686
- if (data.workflowStepGroupsSummary != null) {
1687
- contents.workflowStepGroupsSummary = de_WorkflowStepGroupsSummaryList(data.workflowStepGroupsSummary, context);
1688
- }
1473
+ const doc = take(data, {
1474
+ nextToken: __expectString,
1475
+ workflowStepGroupsSummary: _json,
1476
+ });
1477
+ Object.assign(contents, doc);
1689
1478
  return contents;
1690
1479
  };
1691
1480
  const de_ListWorkflowStepGroupsCommandError = async (output, context) => {
@@ -1712,10 +1501,9 @@ const de_ListWorkflowStepGroupsCommandError = async (output, context) => {
1712
1501
  throw await de_ValidationExceptionRes(parsedOutput, context);
1713
1502
  default:
1714
1503
  const parsedBody = parsedOutput.body;
1715
- throwDefaultError({
1504
+ return throwDefaultError({
1716
1505
  output,
1717
1506
  parsedBody,
1718
- exceptionCtor: __BaseException,
1719
1507
  errorCode,
1720
1508
  });
1721
1509
  }
@@ -1728,12 +1516,11 @@ export const de_ListWorkflowStepsCommand = async (output, context) => {
1728
1516
  $metadata: deserializeMetadata(output),
1729
1517
  });
1730
1518
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1731
- if (data.nextToken != null) {
1732
- contents.nextToken = __expectString(data.nextToken);
1733
- }
1734
- if (data.workflowStepsSummary != null) {
1735
- contents.workflowStepsSummary = de_WorkflowStepsSummaryList(data.workflowStepsSummary, context);
1736
- }
1519
+ const doc = take(data, {
1520
+ nextToken: __expectString,
1521
+ workflowStepsSummary: _json,
1522
+ });
1523
+ Object.assign(contents, doc);
1737
1524
  return contents;
1738
1525
  };
1739
1526
  const de_ListWorkflowStepsCommandError = async (output, context) => {
@@ -1757,10 +1544,9 @@ const de_ListWorkflowStepsCommandError = async (output, context) => {
1757
1544
  throw await de_ValidationExceptionRes(parsedOutput, context);
1758
1545
  default:
1759
1546
  const parsedBody = parsedOutput.body;
1760
- throwDefaultError({
1547
+ return throwDefaultError({
1761
1548
  output,
1762
1549
  parsedBody,
1763
- exceptionCtor: __BaseException,
1764
1550
  errorCode,
1765
1551
  });
1766
1552
  }
@@ -1773,18 +1559,13 @@ export const de_RetryWorkflowStepCommand = async (output, context) => {
1773
1559
  $metadata: deserializeMetadata(output),
1774
1560
  });
1775
1561
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1776
- if (data.id != null) {
1777
- contents.id = __expectString(data.id);
1778
- }
1779
- if (data.status != null) {
1780
- contents.status = __expectString(data.status);
1781
- }
1782
- if (data.stepGroupId != null) {
1783
- contents.stepGroupId = __expectString(data.stepGroupId);
1784
- }
1785
- if (data.workflowId != null) {
1786
- contents.workflowId = __expectString(data.workflowId);
1787
- }
1562
+ const doc = take(data, {
1563
+ id: __expectString,
1564
+ status: __expectString,
1565
+ stepGroupId: __expectString,
1566
+ workflowId: __expectString,
1567
+ });
1568
+ Object.assign(contents, doc);
1788
1569
  return contents;
1789
1570
  };
1790
1571
  const de_RetryWorkflowStepCommandError = async (output, context) => {
@@ -1808,10 +1589,9 @@ const de_RetryWorkflowStepCommandError = async (output, context) => {
1808
1589
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1809
1590
  default:
1810
1591
  const parsedBody = parsedOutput.body;
1811
- throwDefaultError({
1592
+ return throwDefaultError({
1812
1593
  output,
1813
1594
  parsedBody,
1814
- exceptionCtor: __BaseException,
1815
1595
  errorCode,
1816
1596
  });
1817
1597
  }
@@ -1824,21 +1604,14 @@ export const de_StartWorkflowCommand = async (output, context) => {
1824
1604
  $metadata: deserializeMetadata(output),
1825
1605
  });
1826
1606
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1827
- if (data.arn != null) {
1828
- contents.arn = __expectString(data.arn);
1829
- }
1830
- if (data.id != null) {
1831
- contents.id = __expectString(data.id);
1832
- }
1833
- if (data.lastStartTime != null) {
1834
- contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime)));
1835
- }
1836
- if (data.status != null) {
1837
- contents.status = __expectString(data.status);
1838
- }
1839
- if (data.statusMessage != null) {
1840
- contents.statusMessage = __expectString(data.statusMessage);
1841
- }
1607
+ const doc = take(data, {
1608
+ arn: __expectString,
1609
+ id: __expectString,
1610
+ lastStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1611
+ status: __expectString,
1612
+ statusMessage: __expectString,
1613
+ });
1614
+ Object.assign(contents, doc);
1842
1615
  return contents;
1843
1616
  };
1844
1617
  const de_StartWorkflowCommandError = async (output, context) => {
@@ -1865,10 +1638,9 @@ const de_StartWorkflowCommandError = async (output, context) => {
1865
1638
  throw await de_ValidationExceptionRes(parsedOutput, context);
1866
1639
  default:
1867
1640
  const parsedBody = parsedOutput.body;
1868
- throwDefaultError({
1641
+ return throwDefaultError({
1869
1642
  output,
1870
1643
  parsedBody,
1871
- exceptionCtor: __BaseException,
1872
1644
  errorCode,
1873
1645
  });
1874
1646
  }
@@ -1881,21 +1653,14 @@ export const de_StopWorkflowCommand = async (output, context) => {
1881
1653
  $metadata: deserializeMetadata(output),
1882
1654
  });
1883
1655
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1884
- if (data.arn != null) {
1885
- contents.arn = __expectString(data.arn);
1886
- }
1887
- if (data.id != null) {
1888
- contents.id = __expectString(data.id);
1889
- }
1890
- if (data.lastStopTime != null) {
1891
- contents.lastStopTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStopTime)));
1892
- }
1893
- if (data.status != null) {
1894
- contents.status = __expectString(data.status);
1895
- }
1896
- if (data.statusMessage != null) {
1897
- contents.statusMessage = __expectString(data.statusMessage);
1898
- }
1656
+ const doc = take(data, {
1657
+ arn: __expectString,
1658
+ id: __expectString,
1659
+ lastStopTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1660
+ status: __expectString,
1661
+ statusMessage: __expectString,
1662
+ });
1663
+ Object.assign(contents, doc);
1899
1664
  return contents;
1900
1665
  };
1901
1666
  const de_StopWorkflowCommandError = async (output, context) => {
@@ -1922,10 +1687,9 @@ const de_StopWorkflowCommandError = async (output, context) => {
1922
1687
  throw await de_ValidationExceptionRes(parsedOutput, context);
1923
1688
  default:
1924
1689
  const parsedBody = parsedOutput.body;
1925
- throwDefaultError({
1690
+ return throwDefaultError({
1926
1691
  output,
1927
1692
  parsedBody,
1928
- exceptionCtor: __BaseException,
1929
1693
  errorCode,
1930
1694
  });
1931
1695
  }
@@ -1955,10 +1719,9 @@ const de_TagResourceCommandError = async (output, context) => {
1955
1719
  throw await de_ValidationExceptionRes(parsedOutput, context);
1956
1720
  default:
1957
1721
  const parsedBody = parsedOutput.body;
1958
- throwDefaultError({
1722
+ return throwDefaultError({
1959
1723
  output,
1960
1724
  parsedBody,
1961
- exceptionCtor: __BaseException,
1962
1725
  errorCode,
1963
1726
  });
1964
1727
  }
@@ -1988,10 +1751,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1988
1751
  throw await de_ValidationExceptionRes(parsedOutput, context);
1989
1752
  default:
1990
1753
  const parsedBody = parsedOutput.body;
1991
- throwDefaultError({
1754
+ return throwDefaultError({
1992
1755
  output,
1993
1756
  parsedBody,
1994
- exceptionCtor: __BaseException,
1995
1757
  errorCode,
1996
1758
  });
1997
1759
  }
@@ -2004,42 +1766,21 @@ export const de_UpdateWorkflowCommand = async (output, context) => {
2004
1766
  $metadata: deserializeMetadata(output),
2005
1767
  });
2006
1768
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2007
- if (data.adsApplicationConfigurationId != null) {
2008
- contents.adsApplicationConfigurationId = __expectString(data.adsApplicationConfigurationId);
2009
- }
2010
- if (data.arn != null) {
2011
- contents.arn = __expectString(data.arn);
2012
- }
2013
- if (data.creationTime != null) {
2014
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
2015
- }
2016
- if (data.description != null) {
2017
- contents.description = __expectString(data.description);
2018
- }
2019
- if (data.id != null) {
2020
- contents.id = __expectString(data.id);
2021
- }
2022
- if (data.lastModifiedTime != null) {
2023
- contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
2024
- }
2025
- if (data.name != null) {
2026
- contents.name = __expectString(data.name);
2027
- }
2028
- if (data.status != null) {
2029
- contents.status = __expectString(data.status);
2030
- }
2031
- if (data.stepTargets != null) {
2032
- contents.stepTargets = de_StringList(data.stepTargets, context);
2033
- }
2034
- if (data.tags != null) {
2035
- contents.tags = de_StringMap(data.tags, context);
2036
- }
2037
- if (data.templateId != null) {
2038
- contents.templateId = __expectString(data.templateId);
2039
- }
2040
- if (data.workflowInputs != null) {
2041
- contents.workflowInputs = de_StepInputParameters(data.workflowInputs, context);
2042
- }
1769
+ const doc = take(data, {
1770
+ adsApplicationConfigurationId: __expectString,
1771
+ arn: __expectString,
1772
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1773
+ description: __expectString,
1774
+ id: __expectString,
1775
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1776
+ name: __expectString,
1777
+ status: __expectString,
1778
+ stepTargets: _json,
1779
+ tags: _json,
1780
+ templateId: __expectString,
1781
+ workflowInputs: _json,
1782
+ });
1783
+ Object.assign(contents, doc);
2043
1784
  return contents;
2044
1785
  };
2045
1786
  const de_UpdateWorkflowCommandError = async (output, context) => {
@@ -2066,10 +1807,9 @@ const de_UpdateWorkflowCommandError = async (output, context) => {
2066
1807
  throw await de_ValidationExceptionRes(parsedOutput, context);
2067
1808
  default:
2068
1809
  const parsedBody = parsedOutput.body;
2069
- throwDefaultError({
1810
+ return throwDefaultError({
2070
1811
  output,
2071
1812
  parsedBody,
2072
- exceptionCtor: __BaseException,
2073
1813
  errorCode,
2074
1814
  });
2075
1815
  }
@@ -2082,18 +1822,13 @@ export const de_UpdateWorkflowStepCommand = async (output, context) => {
2082
1822
  $metadata: deserializeMetadata(output),
2083
1823
  });
2084
1824
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2085
- if (data.id != null) {
2086
- contents.id = __expectString(data.id);
2087
- }
2088
- if (data.name != null) {
2089
- contents.name = __expectString(data.name);
2090
- }
2091
- if (data.stepGroupId != null) {
2092
- contents.stepGroupId = __expectString(data.stepGroupId);
2093
- }
2094
- if (data.workflowId != null) {
2095
- contents.workflowId = __expectString(data.workflowId);
2096
- }
1825
+ const doc = take(data, {
1826
+ id: __expectString,
1827
+ name: __expectString,
1828
+ stepGroupId: __expectString,
1829
+ workflowId: __expectString,
1830
+ });
1831
+ Object.assign(contents, doc);
2097
1832
  return contents;
2098
1833
  };
2099
1834
  const de_UpdateWorkflowStepCommandError = async (output, context) => {
@@ -2117,10 +1852,9 @@ const de_UpdateWorkflowStepCommandError = async (output, context) => {
2117
1852
  throw await de_ValidationExceptionRes(parsedOutput, context);
2118
1853
  default:
2119
1854
  const parsedBody = parsedOutput.body;
2120
- throwDefaultError({
1855
+ return throwDefaultError({
2121
1856
  output,
2122
1857
  parsedBody,
2123
- exceptionCtor: __BaseException,
2124
1858
  errorCode,
2125
1859
  });
2126
1860
  }
@@ -2133,30 +1867,17 @@ export const de_UpdateWorkflowStepGroupCommand = async (output, context) => {
2133
1867
  $metadata: deserializeMetadata(output),
2134
1868
  });
2135
1869
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2136
- if (data.description != null) {
2137
- contents.description = __expectString(data.description);
2138
- }
2139
- if (data.id != null) {
2140
- contents.id = __expectString(data.id);
2141
- }
2142
- if (data.lastModifiedTime != null) {
2143
- contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime)));
2144
- }
2145
- if (data.name != null) {
2146
- contents.name = __expectString(data.name);
2147
- }
2148
- if (data.next != null) {
2149
- contents.next = de_StringList(data.next, context);
2150
- }
2151
- if (data.previous != null) {
2152
- contents.previous = de_StringList(data.previous, context);
2153
- }
2154
- if (data.tools != null) {
2155
- contents.tools = de_ToolsList(data.tools, context);
2156
- }
2157
- if (data.workflowId != null) {
2158
- contents.workflowId = __expectString(data.workflowId);
2159
- }
1870
+ const doc = take(data, {
1871
+ description: __expectString,
1872
+ id: __expectString,
1873
+ lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1874
+ name: __expectString,
1875
+ next: _json,
1876
+ previous: _json,
1877
+ tools: _json,
1878
+ workflowId: __expectString,
1879
+ });
1880
+ Object.assign(contents, doc);
2160
1881
  return contents;
2161
1882
  };
2162
1883
  const de_UpdateWorkflowStepGroupCommandError = async (output, context) => {
@@ -2183,21 +1904,21 @@ const de_UpdateWorkflowStepGroupCommandError = async (output, context) => {
2183
1904
  throw await de_ValidationExceptionRes(parsedOutput, context);
2184
1905
  default:
2185
1906
  const parsedBody = parsedOutput.body;
2186
- throwDefaultError({
1907
+ return throwDefaultError({
2187
1908
  output,
2188
1909
  parsedBody,
2189
- exceptionCtor: __BaseException,
2190
1910
  errorCode,
2191
1911
  });
2192
1912
  }
2193
1913
  };
2194
- const map = __map;
1914
+ const throwDefaultError = withBaseException(__BaseException);
2195
1915
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2196
1916
  const contents = map({});
2197
1917
  const data = parsedOutput.body;
2198
- if (data.message != null) {
2199
- contents.message = __expectString(data.message);
2200
- }
1918
+ const doc = take(data, {
1919
+ message: __expectString,
1920
+ });
1921
+ Object.assign(contents, doc);
2201
1922
  const exception = new AccessDeniedException({
2202
1923
  $metadata: deserializeMetadata(parsedOutput),
2203
1924
  ...contents,
@@ -2207,9 +1928,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2207
1928
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2208
1929
  const contents = map({});
2209
1930
  const data = parsedOutput.body;
2210
- if (data.message != null) {
2211
- contents.message = __expectString(data.message);
2212
- }
1931
+ const doc = take(data, {
1932
+ message: __expectString,
1933
+ });
1934
+ Object.assign(contents, doc);
2213
1935
  const exception = new InternalServerException({
2214
1936
  $metadata: deserializeMetadata(parsedOutput),
2215
1937
  ...contents,
@@ -2219,9 +1941,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2219
1941
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2220
1942
  const contents = map({});
2221
1943
  const data = parsedOutput.body;
2222
- if (data.message != null) {
2223
- contents.message = __expectString(data.message);
2224
- }
1944
+ const doc = take(data, {
1945
+ message: __expectString,
1946
+ });
1947
+ Object.assign(contents, doc);
2225
1948
  const exception = new ResourceNotFoundException({
2226
1949
  $metadata: deserializeMetadata(parsedOutput),
2227
1950
  ...contents,
@@ -2231,9 +1954,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2231
1954
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2232
1955
  const contents = map({});
2233
1956
  const data = parsedOutput.body;
2234
- if (data.message != null) {
2235
- contents.message = __expectString(data.message);
2236
- }
1957
+ const doc = take(data, {
1958
+ message: __expectString,
1959
+ });
1960
+ Object.assign(contents, doc);
2237
1961
  const exception = new ThrottlingException({
2238
1962
  $metadata: deserializeMetadata(parsedOutput),
2239
1963
  ...contents,
@@ -2243,436 +1967,38 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2243
1967
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2244
1968
  const contents = map({});
2245
1969
  const data = parsedOutput.body;
2246
- if (data.message != null) {
2247
- contents.message = __expectString(data.message);
2248
- }
1970
+ const doc = take(data, {
1971
+ message: __expectString,
1972
+ });
1973
+ Object.assign(contents, doc);
2249
1974
  const exception = new ValidationException({
2250
1975
  $metadata: deserializeMetadata(parsedOutput),
2251
1976
  ...contents,
2252
1977
  });
2253
1978
  return __decorateServiceException(exception, parsedOutput.body);
2254
1979
  };
2255
- const se_PlatformCommand = (input, context) => {
2256
- return {
2257
- ...(input.linux != null && { linux: input.linux }),
2258
- ...(input.windows != null && { windows: input.windows }),
2259
- };
2260
- };
2261
- const se_PlatformScriptKey = (input, context) => {
2262
- return {
2263
- ...(input.linux != null && { linux: input.linux }),
2264
- ...(input.windows != null && { windows: input.windows }),
2265
- };
2266
- };
2267
- const se_StepInput = (input, context) => {
2268
- return StepInput.visit(input, {
2269
- integerValue: (value) => ({ integerValue: value }),
2270
- listOfStringsValue: (value) => ({ listOfStringsValue: se_StringList(value, context) }),
2271
- mapOfStringValue: (value) => ({ mapOfStringValue: se_StringMap(value, context) }),
2272
- stringValue: (value) => ({ stringValue: value }),
2273
- _: (name, value) => ({ name: value }),
2274
- });
2275
- };
2276
- const se_StepInputParameters = (input, context) => {
2277
- return Object.entries(input).reduce((acc, [key, value]) => {
2278
- if (value === null) {
2279
- return acc;
2280
- }
2281
- acc[key] = se_StepInput(value, context);
2282
- return acc;
2283
- }, {});
2284
- };
2285
- const se_StringList = (input, context) => {
2286
- return input
2287
- .filter((e) => e != null)
2288
- .map((entry) => {
2289
- return entry;
2290
- });
2291
- };
2292
- const se_StringMap = (input, context) => {
2293
- return Object.entries(input).reduce((acc, [key, value]) => {
2294
- if (value === null) {
2295
- return acc;
2296
- }
2297
- acc[key] = value;
2298
- return acc;
2299
- }, {});
2300
- };
2301
- const se_TagMap = (input, context) => {
2302
- return Object.entries(input).reduce((acc, [key, value]) => {
2303
- if (value === null) {
2304
- return acc;
2305
- }
2306
- acc[key] = value;
2307
- return acc;
2308
- }, {});
2309
- };
2310
- const se_WorkflowStepAutomationConfiguration = (input, context) => {
2311
- return {
2312
- ...(input.command != null && { command: se_PlatformCommand(input.command, context) }),
2313
- ...(input.runEnvironment != null && { runEnvironment: input.runEnvironment }),
2314
- ...(input.scriptLocationS3Bucket != null && { scriptLocationS3Bucket: input.scriptLocationS3Bucket }),
2315
- ...(input.scriptLocationS3Key != null && {
2316
- scriptLocationS3Key: se_PlatformScriptKey(input.scriptLocationS3Key, context),
2317
- }),
2318
- ...(input.targetType != null && { targetType: input.targetType }),
2319
- };
2320
- };
2321
- const se_WorkflowStepOutput = (input, context) => {
2322
- return {
2323
- ...(input.dataType != null && { dataType: input.dataType }),
2324
- ...(input.name != null && { name: input.name }),
2325
- ...(input.required != null && { required: input.required }),
2326
- ...(input.value != null && { value: se_WorkflowStepOutputUnion(input.value, context) }),
2327
- };
2328
- };
2329
- const se_WorkflowStepOutputList = (input, context) => {
2330
- return input
2331
- .filter((e) => e != null)
2332
- .map((entry) => {
2333
- return se_WorkflowStepOutput(entry, context);
2334
- });
2335
- };
2336
- const se_WorkflowStepOutputUnion = (input, context) => {
2337
- return WorkflowStepOutputUnion.visit(input, {
2338
- integerValue: (value) => ({ integerValue: value }),
2339
- listOfStringValue: (value) => ({ listOfStringValue: se_StringList(value, context) }),
2340
- stringValue: (value) => ({ stringValue: value }),
2341
- _: (name, value) => ({ name: value }),
2342
- });
2343
- };
2344
1980
  const de_MigrationWorkflowSummary = (output, context) => {
2345
- return {
2346
- adsApplicationConfigurationName: __expectString(output.adsApplicationConfigurationName),
2347
- completedSteps: __expectInt32(output.completedSteps),
2348
- creationTime: output.creationTime != null
2349
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2350
- : undefined,
2351
- endTime: output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined,
2352
- id: __expectString(output.id),
2353
- name: __expectString(output.name),
2354
- status: __expectString(output.status),
2355
- statusMessage: __expectString(output.statusMessage),
2356
- templateId: __expectString(output.templateId),
2357
- totalSteps: __expectInt32(output.totalSteps),
2358
- };
1981
+ return take(output, {
1982
+ adsApplicationConfigurationName: __expectString,
1983
+ completedSteps: __expectInt32,
1984
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1985
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1986
+ id: __expectString,
1987
+ name: __expectString,
1988
+ status: __expectString,
1989
+ statusMessage: __expectString,
1990
+ templateId: __expectString,
1991
+ totalSteps: __expectInt32,
1992
+ });
2359
1993
  };
2360
1994
  const de_MigrationWorkflowSummaryList = (output, context) => {
2361
1995
  const retVal = (output || [])
2362
1996
  .filter((e) => e != null)
2363
1997
  .map((entry) => {
2364
- if (entry === null) {
2365
- return null;
2366
- }
2367
1998
  return de_MigrationWorkflowSummary(entry, context);
2368
1999
  });
2369
2000
  return retVal;
2370
2001
  };
2371
- const de_PlatformCommand = (output, context) => {
2372
- return {
2373
- linux: __expectString(output.linux),
2374
- windows: __expectString(output.windows),
2375
- };
2376
- };
2377
- const de_PlatformScriptKey = (output, context) => {
2378
- return {
2379
- linux: __expectString(output.linux),
2380
- windows: __expectString(output.windows),
2381
- };
2382
- };
2383
- const de_PluginSummaries = (output, context) => {
2384
- const retVal = (output || [])
2385
- .filter((e) => e != null)
2386
- .map((entry) => {
2387
- if (entry === null) {
2388
- return null;
2389
- }
2390
- return de_PluginSummary(entry, context);
2391
- });
2392
- return retVal;
2393
- };
2394
- const de_PluginSummary = (output, context) => {
2395
- return {
2396
- hostname: __expectString(output.hostname),
2397
- ipAddress: __expectString(output.ipAddress),
2398
- pluginId: __expectString(output.pluginId),
2399
- registeredTime: __expectString(output.registeredTime),
2400
- status: __expectString(output.status),
2401
- version: __expectString(output.version),
2402
- };
2403
- };
2404
- const de_StepAutomationConfiguration = (output, context) => {
2405
- return {
2406
- command: output.command != null ? de_PlatformCommand(output.command, context) : undefined,
2407
- runEnvironment: __expectString(output.runEnvironment),
2408
- scriptLocationS3Bucket: __expectString(output.scriptLocationS3Bucket),
2409
- scriptLocationS3Key: output.scriptLocationS3Key != null ? de_PlatformScriptKey(output.scriptLocationS3Key, context) : undefined,
2410
- targetType: __expectString(output.targetType),
2411
- };
2412
- };
2413
- const de_StepInput = (output, context) => {
2414
- if (__expectInt32(output.integerValue) !== undefined) {
2415
- return { integerValue: __expectInt32(output.integerValue) };
2416
- }
2417
- if (output.listOfStringsValue != null) {
2418
- return {
2419
- listOfStringsValue: de_StringList(output.listOfStringsValue, context),
2420
- };
2421
- }
2422
- if (output.mapOfStringValue != null) {
2423
- return {
2424
- mapOfStringValue: de_StringMap(output.mapOfStringValue, context),
2425
- };
2426
- }
2427
- if (__expectString(output.stringValue) !== undefined) {
2428
- return { stringValue: __expectString(output.stringValue) };
2429
- }
2430
- return { $unknown: Object.entries(output)[0] };
2431
- };
2432
- const de_StepInputParameters = (output, context) => {
2433
- return Object.entries(output).reduce((acc, [key, value]) => {
2434
- if (value === null) {
2435
- return acc;
2436
- }
2437
- acc[key] = de_StepInput(__expectUnion(value), context);
2438
- return acc;
2439
- }, {});
2440
- };
2441
- const de_StepOutput = (output, context) => {
2442
- return {
2443
- dataType: __expectString(output.dataType),
2444
- name: __expectString(output.name),
2445
- required: __expectBoolean(output.required),
2446
- };
2447
- };
2448
- const de_StepOutputList = (output, context) => {
2449
- const retVal = (output || [])
2450
- .filter((e) => e != null)
2451
- .map((entry) => {
2452
- if (entry === null) {
2453
- return null;
2454
- }
2455
- return de_StepOutput(entry, context);
2456
- });
2457
- return retVal;
2458
- };
2459
- const de_StringList = (output, context) => {
2460
- const retVal = (output || [])
2461
- .filter((e) => e != null)
2462
- .map((entry) => {
2463
- if (entry === null) {
2464
- return null;
2465
- }
2466
- return __expectString(entry);
2467
- });
2468
- return retVal;
2469
- };
2470
- const de_StringMap = (output, context) => {
2471
- return Object.entries(output).reduce((acc, [key, value]) => {
2472
- if (value === null) {
2473
- return acc;
2474
- }
2475
- acc[key] = __expectString(value);
2476
- return acc;
2477
- }, {});
2478
- };
2479
- const de_TagMap = (output, context) => {
2480
- return Object.entries(output).reduce((acc, [key, value]) => {
2481
- if (value === null) {
2482
- return acc;
2483
- }
2484
- acc[key] = __expectString(value);
2485
- return acc;
2486
- }, {});
2487
- };
2488
- const de_TemplateInput = (output, context) => {
2489
- return {
2490
- dataType: __expectString(output.dataType),
2491
- inputName: __expectString(output.inputName),
2492
- required: __expectBoolean(output.required),
2493
- };
2494
- };
2495
- const de_TemplateInputList = (output, context) => {
2496
- const retVal = (output || [])
2497
- .filter((e) => e != null)
2498
- .map((entry) => {
2499
- if (entry === null) {
2500
- return null;
2501
- }
2502
- return de_TemplateInput(entry, context);
2503
- });
2504
- return retVal;
2505
- };
2506
- const de_TemplateStepGroupSummary = (output, context) => {
2507
- return {
2508
- id: __expectString(output.id),
2509
- name: __expectString(output.name),
2510
- next: output.next != null ? de_StringList(output.next, context) : undefined,
2511
- previous: output.previous != null ? de_StringList(output.previous, context) : undefined,
2512
- };
2513
- };
2514
- const de_TemplateStepGroupSummaryList = (output, context) => {
2515
- const retVal = (output || [])
2516
- .filter((e) => e != null)
2517
- .map((entry) => {
2518
- if (entry === null) {
2519
- return null;
2520
- }
2521
- return de_TemplateStepGroupSummary(entry, context);
2522
- });
2523
- return retVal;
2524
- };
2525
- const de_TemplateStepSummary = (output, context) => {
2526
- return {
2527
- id: __expectString(output.id),
2528
- name: __expectString(output.name),
2529
- next: output.next != null ? de_StringList(output.next, context) : undefined,
2530
- owner: __expectString(output.owner),
2531
- previous: output.previous != null ? de_StringList(output.previous, context) : undefined,
2532
- stepActionType: __expectString(output.stepActionType),
2533
- stepGroupId: __expectString(output.stepGroupId),
2534
- targetType: __expectString(output.targetType),
2535
- templateId: __expectString(output.templateId),
2536
- };
2537
- };
2538
- const de_TemplateStepSummaryList = (output, context) => {
2539
- const retVal = (output || [])
2540
- .filter((e) => e != null)
2541
- .map((entry) => {
2542
- if (entry === null) {
2543
- return null;
2544
- }
2545
- return de_TemplateStepSummary(entry, context);
2546
- });
2547
- return retVal;
2548
- };
2549
- const de_TemplateSummary = (output, context) => {
2550
- return {
2551
- arn: __expectString(output.arn),
2552
- description: __expectString(output.description),
2553
- id: __expectString(output.id),
2554
- name: __expectString(output.name),
2555
- };
2556
- };
2557
- const de_TemplateSummaryList = (output, context) => {
2558
- const retVal = (output || [])
2559
- .filter((e) => e != null)
2560
- .map((entry) => {
2561
- if (entry === null) {
2562
- return null;
2563
- }
2564
- return de_TemplateSummary(entry, context);
2565
- });
2566
- return retVal;
2567
- };
2568
- const de_Tool = (output, context) => {
2569
- return {
2570
- name: __expectString(output.name),
2571
- url: __expectString(output.url),
2572
- };
2573
- };
2574
- const de_ToolsList = (output, context) => {
2575
- const retVal = (output || [])
2576
- .filter((e) => e != null)
2577
- .map((entry) => {
2578
- if (entry === null) {
2579
- return null;
2580
- }
2581
- return de_Tool(entry, context);
2582
- });
2583
- return retVal;
2584
- };
2585
- const de_WorkflowStepAutomationConfiguration = (output, context) => {
2586
- return {
2587
- command: output.command != null ? de_PlatformCommand(output.command, context) : undefined,
2588
- runEnvironment: __expectString(output.runEnvironment),
2589
- scriptLocationS3Bucket: __expectString(output.scriptLocationS3Bucket),
2590
- scriptLocationS3Key: output.scriptLocationS3Key != null ? de_PlatformScriptKey(output.scriptLocationS3Key, context) : undefined,
2591
- targetType: __expectString(output.targetType),
2592
- };
2593
- };
2594
- const de_WorkflowStepGroupsSummaryList = (output, context) => {
2595
- const retVal = (output || [])
2596
- .filter((e) => e != null)
2597
- .map((entry) => {
2598
- if (entry === null) {
2599
- return null;
2600
- }
2601
- return de_WorkflowStepGroupSummary(entry, context);
2602
- });
2603
- return retVal;
2604
- };
2605
- const de_WorkflowStepGroupSummary = (output, context) => {
2606
- return {
2607
- id: __expectString(output.id),
2608
- name: __expectString(output.name),
2609
- next: output.next != null ? de_StringList(output.next, context) : undefined,
2610
- owner: __expectString(output.owner),
2611
- previous: output.previous != null ? de_StringList(output.previous, context) : undefined,
2612
- status: __expectString(output.status),
2613
- };
2614
- };
2615
- const de_WorkflowStepOutput = (output, context) => {
2616
- return {
2617
- dataType: __expectString(output.dataType),
2618
- name: __expectString(output.name),
2619
- required: __expectBoolean(output.required),
2620
- value: output.value != null ? de_WorkflowStepOutputUnion(__expectUnion(output.value), context) : undefined,
2621
- };
2622
- };
2623
- const de_WorkflowStepOutputList = (output, context) => {
2624
- const retVal = (output || [])
2625
- .filter((e) => e != null)
2626
- .map((entry) => {
2627
- if (entry === null) {
2628
- return null;
2629
- }
2630
- return de_WorkflowStepOutput(entry, context);
2631
- });
2632
- return retVal;
2633
- };
2634
- const de_WorkflowStepOutputUnion = (output, context) => {
2635
- if (__expectInt32(output.integerValue) !== undefined) {
2636
- return { integerValue: __expectInt32(output.integerValue) };
2637
- }
2638
- if (output.listOfStringValue != null) {
2639
- return {
2640
- listOfStringValue: de_StringList(output.listOfStringValue, context),
2641
- };
2642
- }
2643
- if (__expectString(output.stringValue) !== undefined) {
2644
- return { stringValue: __expectString(output.stringValue) };
2645
- }
2646
- return { $unknown: Object.entries(output)[0] };
2647
- };
2648
- const de_WorkflowStepsSummaryList = (output, context) => {
2649
- const retVal = (output || [])
2650
- .filter((e) => e != null)
2651
- .map((entry) => {
2652
- if (entry === null) {
2653
- return null;
2654
- }
2655
- return de_WorkflowStepSummary(entry, context);
2656
- });
2657
- return retVal;
2658
- };
2659
- const de_WorkflowStepSummary = (output, context) => {
2660
- return {
2661
- description: __expectString(output.description),
2662
- name: __expectString(output.name),
2663
- next: output.next != null ? de_StringList(output.next, context) : undefined,
2664
- noOfSrvCompleted: __expectInt32(output.noOfSrvCompleted),
2665
- noOfSrvFailed: __expectInt32(output.noOfSrvFailed),
2666
- owner: __expectString(output.owner),
2667
- previous: output.previous != null ? de_StringList(output.previous, context) : undefined,
2668
- scriptLocation: __expectString(output.scriptLocation),
2669
- status: __expectString(output.status),
2670
- statusMessage: __expectString(output.statusMessage),
2671
- stepActionType: __expectString(output.stepActionType),
2672
- stepId: __expectString(output.stepId),
2673
- totalNoOfSrv: __expectInt32(output.totalNoOfSrv),
2674
- };
2675
- };
2676
2002
  const deserializeMetadata = (output) => ({
2677
2003
  httpStatusCode: output.statusCode,
2678
2004
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],