@aws-sdk/client-m2 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,8 +1,8 @@
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, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, 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, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { M2ServiceException as __BaseException } from "../models/M2ServiceException";
5
- import { AccessDeniedException, BatchJobIdentifier, ConflictException, DataSetImportConfig, DatasetOrgAttributes, Definition, ExternalLocation, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, StorageConfiguration, ThrottlingException, ValidationException, } from "../models/models_0";
5
+ import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, StorageConfiguration, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_CancelBatchJobExecutionCommand = async (input, context) => {
7
7
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
8
  const headers = {};
@@ -28,15 +28,15 @@ export const se_CreateApplicationCommand = async (input, context) => {
28
28
  };
29
29
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
30
30
  let body;
31
- body = JSON.stringify({
32
- clientToken: input.clientToken ?? generateIdempotencyToken(),
33
- ...(input.definition != null && { definition: se_Definition(input.definition, context) }),
34
- ...(input.description != null && { description: input.description }),
35
- ...(input.engineType != null && { engineType: input.engineType }),
36
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
37
- ...(input.name != null && { name: input.name }),
38
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
39
- });
31
+ body = JSON.stringify(take(input, {
32
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
33
+ definition: (_) => _json(_),
34
+ description: [],
35
+ engineType: [],
36
+ kmsKeyId: [],
37
+ name: [],
38
+ tags: (_) => _json(_),
39
+ }));
40
40
  return new __HttpRequest({
41
41
  protocol,
42
42
  hostname,
@@ -56,10 +56,10 @@ export const se_CreateDataSetImportTaskCommand = async (input, context) => {
56
56
  "/applications/{applicationId}/dataset-import-task";
57
57
  resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
58
58
  let body;
59
- body = JSON.stringify({
60
- clientToken: input.clientToken ?? generateIdempotencyToken(),
61
- ...(input.importConfig != null && { importConfig: se_DataSetImportConfig(input.importConfig, context) }),
62
- });
59
+ body = JSON.stringify(take(input, {
60
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
61
+ importConfig: (_) => _json(_),
62
+ }));
63
63
  return new __HttpRequest({
64
64
  protocol,
65
65
  hostname,
@@ -78,11 +78,11 @@ export const se_CreateDeploymentCommand = async (input, context) => {
78
78
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/deployments";
79
79
  resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
80
80
  let body;
81
- body = JSON.stringify({
82
- ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }),
83
- clientToken: input.clientToken ?? generateIdempotencyToken(),
84
- ...(input.environmentId != null && { environmentId: input.environmentId }),
85
- });
81
+ body = JSON.stringify(take(input, {
82
+ applicationVersion: [],
83
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
84
+ environmentId: [],
85
+ }));
86
86
  return new __HttpRequest({
87
87
  protocol,
88
88
  hostname,
@@ -100,26 +100,22 @@ export const se_CreateEnvironmentCommand = async (input, context) => {
100
100
  };
101
101
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
102
102
  let body;
103
- body = JSON.stringify({
104
- clientToken: input.clientToken ?? generateIdempotencyToken(),
105
- ...(input.description != null && { description: input.description }),
106
- ...(input.engineType != null && { engineType: input.engineType }),
107
- ...(input.engineVersion != null && { engineVersion: input.engineVersion }),
108
- ...(input.highAvailabilityConfig != null && {
109
- highAvailabilityConfig: se_HighAvailabilityConfig(input.highAvailabilityConfig, context),
110
- }),
111
- ...(input.instanceType != null && { instanceType: input.instanceType }),
112
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
113
- ...(input.name != null && { name: input.name }),
114
- ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }),
115
- ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }),
116
- ...(input.securityGroupIds != null && { securityGroupIds: se_String50List(input.securityGroupIds, context) }),
117
- ...(input.storageConfigurations != null && {
118
- storageConfigurations: se_StorageConfigurationList(input.storageConfigurations, context),
119
- }),
120
- ...(input.subnetIds != null && { subnetIds: se_String50List(input.subnetIds, context) }),
121
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
122
- });
103
+ body = JSON.stringify(take(input, {
104
+ clientToken: (_) => _ ?? generateIdempotencyToken(),
105
+ description: [],
106
+ engineType: [],
107
+ engineVersion: [],
108
+ highAvailabilityConfig: (_) => _json(_),
109
+ instanceType: [],
110
+ kmsKeyId: [],
111
+ name: [],
112
+ preferredMaintenanceWindow: [],
113
+ publiclyAccessible: [],
114
+ securityGroupIds: (_) => _json(_),
115
+ storageConfigurations: (_) => se_StorageConfigurationList(_, context),
116
+ subnetIds: (_) => _json(_),
117
+ tags: (_) => _json(_),
118
+ }));
123
119
  return new __HttpRequest({
124
120
  protocol,
125
121
  hostname,
@@ -552,12 +548,10 @@ export const se_StartBatchJobCommand = async (input, context) => {
552
548
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/batch-job";
553
549
  resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
554
550
  let body;
555
- body = JSON.stringify({
556
- ...(input.batchJobIdentifier != null && {
557
- batchJobIdentifier: se_BatchJobIdentifier(input.batchJobIdentifier, context),
558
- }),
559
- ...(input.jobParams != null && { jobParams: se_BatchJobParametersMap(input.jobParams, context) }),
560
- });
551
+ body = JSON.stringify(take(input, {
552
+ batchJobIdentifier: (_) => _json(_),
553
+ jobParams: (_) => _json(_),
554
+ }));
561
555
  return new __HttpRequest({
562
556
  protocol,
563
557
  hostname,
@@ -576,9 +570,9 @@ export const se_StopApplicationCommand = async (input, context) => {
576
570
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/stop";
577
571
  resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
578
572
  let body;
579
- body = JSON.stringify({
580
- ...(input.forceStop != null && { forceStop: input.forceStop }),
581
- });
573
+ body = JSON.stringify(take(input, {
574
+ forceStop: [],
575
+ }));
582
576
  return new __HttpRequest({
583
577
  protocol,
584
578
  hostname,
@@ -597,9 +591,9 @@ export const se_TagResourceCommand = async (input, context) => {
597
591
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
598
592
  resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
599
593
  let body;
600
- body = JSON.stringify({
601
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
602
- });
594
+ body = JSON.stringify(take(input, {
595
+ tags: (_) => _json(_),
596
+ }));
603
597
  return new __HttpRequest({
604
598
  protocol,
605
599
  hostname,
@@ -641,11 +635,11 @@ export const se_UpdateApplicationCommand = async (input, context) => {
641
635
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
642
636
  resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
643
637
  let body;
644
- body = JSON.stringify({
645
- ...(input.currentApplicationVersion != null && { currentApplicationVersion: input.currentApplicationVersion }),
646
- ...(input.definition != null && { definition: se_Definition(input.definition, context) }),
647
- ...(input.description != null && { description: input.description }),
648
- });
638
+ body = JSON.stringify(take(input, {
639
+ currentApplicationVersion: [],
640
+ definition: (_) => _json(_),
641
+ description: [],
642
+ }));
649
643
  return new __HttpRequest({
650
644
  protocol,
651
645
  hostname,
@@ -664,15 +658,13 @@ export const se_UpdateEnvironmentCommand = async (input, context) => {
664
658
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{environmentId}";
665
659
  resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", () => input.environmentId, "{environmentId}", false);
666
660
  let body;
667
- body = JSON.stringify({
668
- ...(input.applyDuringMaintenanceWindow != null && {
669
- applyDuringMaintenanceWindow: input.applyDuringMaintenanceWindow,
670
- }),
671
- ...(input.desiredCapacity != null && { desiredCapacity: input.desiredCapacity }),
672
- ...(input.engineVersion != null && { engineVersion: input.engineVersion }),
673
- ...(input.instanceType != null && { instanceType: input.instanceType }),
674
- ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }),
675
- });
661
+ body = JSON.stringify(take(input, {
662
+ applyDuringMaintenanceWindow: [],
663
+ desiredCapacity: [],
664
+ engineVersion: [],
665
+ instanceType: [],
666
+ preferredMaintenanceWindow: [],
667
+ }));
676
668
  return new __HttpRequest({
677
669
  protocol,
678
670
  hostname,
@@ -720,10 +712,9 @@ const de_CancelBatchJobExecutionCommandError = async (output, context) => {
720
712
  throw await de_ValidationExceptionRes(parsedOutput, context);
721
713
  default:
722
714
  const parsedBody = parsedOutput.body;
723
- throwDefaultError({
715
+ return throwDefaultError({
724
716
  output,
725
717
  parsedBody,
726
- exceptionCtor: __BaseException,
727
718
  errorCode,
728
719
  });
729
720
  }
@@ -736,15 +727,12 @@ export const de_CreateApplicationCommand = async (output, context) => {
736
727
  $metadata: deserializeMetadata(output),
737
728
  });
738
729
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
739
- if (data.applicationArn != null) {
740
- contents.applicationArn = __expectString(data.applicationArn);
741
- }
742
- if (data.applicationId != null) {
743
- contents.applicationId = __expectString(data.applicationId);
744
- }
745
- if (data.applicationVersion != null) {
746
- contents.applicationVersion = __expectInt32(data.applicationVersion);
747
- }
730
+ const doc = take(data, {
731
+ applicationArn: __expectString,
732
+ applicationId: __expectString,
733
+ applicationVersion: __expectInt32,
734
+ });
735
+ Object.assign(contents, doc);
748
736
  return contents;
749
737
  };
750
738
  const de_CreateApplicationCommandError = async (output, context) => {
@@ -774,10 +762,9 @@ const de_CreateApplicationCommandError = async (output, context) => {
774
762
  throw await de_ValidationExceptionRes(parsedOutput, context);
775
763
  default:
776
764
  const parsedBody = parsedOutput.body;
777
- throwDefaultError({
765
+ return throwDefaultError({
778
766
  output,
779
767
  parsedBody,
780
- exceptionCtor: __BaseException,
781
768
  errorCode,
782
769
  });
783
770
  }
@@ -790,9 +777,10 @@ export const de_CreateDataSetImportTaskCommand = async (output, context) => {
790
777
  $metadata: deserializeMetadata(output),
791
778
  });
792
779
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
793
- if (data.taskId != null) {
794
- contents.taskId = __expectString(data.taskId);
795
- }
780
+ const doc = take(data, {
781
+ taskId: __expectString,
782
+ });
783
+ Object.assign(contents, doc);
796
784
  return contents;
797
785
  };
798
786
  const de_CreateDataSetImportTaskCommandError = async (output, context) => {
@@ -825,10 +813,9 @@ const de_CreateDataSetImportTaskCommandError = async (output, context) => {
825
813
  throw await de_ValidationExceptionRes(parsedOutput, context);
826
814
  default:
827
815
  const parsedBody = parsedOutput.body;
828
- throwDefaultError({
816
+ return throwDefaultError({
829
817
  output,
830
818
  parsedBody,
831
- exceptionCtor: __BaseException,
832
819
  errorCode,
833
820
  });
834
821
  }
@@ -841,9 +828,10 @@ export const de_CreateDeploymentCommand = async (output, context) => {
841
828
  $metadata: deserializeMetadata(output),
842
829
  });
843
830
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
844
- if (data.deploymentId != null) {
845
- contents.deploymentId = __expectString(data.deploymentId);
846
- }
831
+ const doc = take(data, {
832
+ deploymentId: __expectString,
833
+ });
834
+ Object.assign(contents, doc);
847
835
  return contents;
848
836
  };
849
837
  const de_CreateDeploymentCommandError = async (output, context) => {
@@ -876,10 +864,9 @@ const de_CreateDeploymentCommandError = async (output, context) => {
876
864
  throw await de_ValidationExceptionRes(parsedOutput, context);
877
865
  default:
878
866
  const parsedBody = parsedOutput.body;
879
- throwDefaultError({
867
+ return throwDefaultError({
880
868
  output,
881
869
  parsedBody,
882
- exceptionCtor: __BaseException,
883
870
  errorCode,
884
871
  });
885
872
  }
@@ -892,9 +879,10 @@ export const de_CreateEnvironmentCommand = async (output, context) => {
892
879
  $metadata: deserializeMetadata(output),
893
880
  });
894
881
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
895
- if (data.environmentId != null) {
896
- contents.environmentId = __expectString(data.environmentId);
897
- }
882
+ const doc = take(data, {
883
+ environmentId: __expectString,
884
+ });
885
+ Object.assign(contents, doc);
898
886
  return contents;
899
887
  };
900
888
  const de_CreateEnvironmentCommandError = async (output, context) => {
@@ -924,10 +912,9 @@ const de_CreateEnvironmentCommandError = async (output, context) => {
924
912
  throw await de_ValidationExceptionRes(parsedOutput, context);
925
913
  default:
926
914
  const parsedBody = parsedOutput.body;
927
- throwDefaultError({
915
+ return throwDefaultError({
928
916
  output,
929
917
  parsedBody,
930
- exceptionCtor: __BaseException,
931
918
  errorCode,
932
919
  });
933
920
  }
@@ -966,10 +953,9 @@ const de_DeleteApplicationCommandError = async (output, context) => {
966
953
  throw await de_ValidationExceptionRes(parsedOutput, context);
967
954
  default:
968
955
  const parsedBody = parsedOutput.body;
969
- throwDefaultError({
956
+ return throwDefaultError({
970
957
  output,
971
958
  parsedBody,
972
- exceptionCtor: __BaseException,
973
959
  errorCode,
974
960
  });
975
961
  }
@@ -1011,10 +997,9 @@ const de_DeleteApplicationFromEnvironmentCommandError = async (output, context)
1011
997
  throw await de_ValidationExceptionRes(parsedOutput, context);
1012
998
  default:
1013
999
  const parsedBody = parsedOutput.body;
1014
- throwDefaultError({
1000
+ return throwDefaultError({
1015
1001
  output,
1016
1002
  parsedBody,
1017
- exceptionCtor: __BaseException,
1018
1003
  errorCode,
1019
1004
  });
1020
1005
  }
@@ -1053,10 +1038,9 @@ const de_DeleteEnvironmentCommandError = async (output, context) => {
1053
1038
  throw await de_ValidationExceptionRes(parsedOutput, context);
1054
1039
  default:
1055
1040
  const parsedBody = parsedOutput.body;
1056
- throwDefaultError({
1041
+ return throwDefaultError({
1057
1042
  output,
1058
1043
  parsedBody,
1059
- exceptionCtor: __BaseException,
1060
1044
  errorCode,
1061
1045
  });
1062
1046
  }
@@ -1069,63 +1053,28 @@ export const de_GetApplicationCommand = async (output, context) => {
1069
1053
  $metadata: deserializeMetadata(output),
1070
1054
  });
1071
1055
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1072
- if (data.applicationArn != null) {
1073
- contents.applicationArn = __expectString(data.applicationArn);
1074
- }
1075
- if (data.applicationId != null) {
1076
- contents.applicationId = __expectString(data.applicationId);
1077
- }
1078
- if (data.creationTime != null) {
1079
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1080
- }
1081
- if (data.deployedVersion != null) {
1082
- contents.deployedVersion = de_DeployedVersionSummary(data.deployedVersion, context);
1083
- }
1084
- if (data.description != null) {
1085
- contents.description = __expectString(data.description);
1086
- }
1087
- if (data.engineType != null) {
1088
- contents.engineType = __expectString(data.engineType);
1089
- }
1090
- if (data.environmentId != null) {
1091
- contents.environmentId = __expectString(data.environmentId);
1092
- }
1093
- if (data.kmsKeyId != null) {
1094
- contents.kmsKeyId = __expectString(data.kmsKeyId);
1095
- }
1096
- if (data.lastStartTime != null) {
1097
- contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime)));
1098
- }
1099
- if (data.latestVersion != null) {
1100
- contents.latestVersion = de_ApplicationVersionSummary(data.latestVersion, context);
1101
- }
1102
- if (data.listenerArns != null) {
1103
- contents.listenerArns = de_ArnList(data.listenerArns, context);
1104
- }
1105
- if (data.listenerPorts != null) {
1106
- contents.listenerPorts = de_PortList(data.listenerPorts, context);
1107
- }
1108
- if (data.loadBalancerDnsName != null) {
1109
- contents.loadBalancerDnsName = __expectString(data.loadBalancerDnsName);
1110
- }
1111
- if (data.logGroups != null) {
1112
- contents.logGroups = de_LogGroupSummaries(data.logGroups, context);
1113
- }
1114
- if (data.name != null) {
1115
- contents.name = __expectString(data.name);
1116
- }
1117
- if (data.status != null) {
1118
- contents.status = __expectString(data.status);
1119
- }
1120
- if (data.statusReason != null) {
1121
- contents.statusReason = __expectString(data.statusReason);
1122
- }
1123
- if (data.tags != null) {
1124
- contents.tags = de_TagMap(data.tags, context);
1125
- }
1126
- if (data.targetGroupArns != null) {
1127
- contents.targetGroupArns = de_ArnList(data.targetGroupArns, context);
1128
- }
1056
+ const doc = take(data, {
1057
+ applicationArn: __expectString,
1058
+ applicationId: __expectString,
1059
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1060
+ deployedVersion: _json,
1061
+ description: __expectString,
1062
+ engineType: __expectString,
1063
+ environmentId: __expectString,
1064
+ kmsKeyId: __expectString,
1065
+ lastStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1066
+ latestVersion: (_) => de_ApplicationVersionSummary(_, context),
1067
+ listenerArns: _json,
1068
+ listenerPorts: _json,
1069
+ loadBalancerDnsName: __expectString,
1070
+ logGroups: _json,
1071
+ name: __expectString,
1072
+ status: __expectString,
1073
+ statusReason: __expectString,
1074
+ tags: _json,
1075
+ targetGroupArns: _json,
1076
+ });
1077
+ Object.assign(contents, doc);
1129
1078
  return contents;
1130
1079
  };
1131
1080
  const de_GetApplicationCommandError = async (output, context) => {
@@ -1152,10 +1101,9 @@ const de_GetApplicationCommandError = async (output, context) => {
1152
1101
  throw await de_ValidationExceptionRes(parsedOutput, context);
1153
1102
  default:
1154
1103
  const parsedBody = parsedOutput.body;
1155
- throwDefaultError({
1104
+ return throwDefaultError({
1156
1105
  output,
1157
1106
  parsedBody,
1158
- exceptionCtor: __BaseException,
1159
1107
  errorCode,
1160
1108
  });
1161
1109
  }
@@ -1168,27 +1116,16 @@ export const de_GetApplicationVersionCommand = async (output, context) => {
1168
1116
  $metadata: deserializeMetadata(output),
1169
1117
  });
1170
1118
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1171
- if (data.applicationVersion != null) {
1172
- contents.applicationVersion = __expectInt32(data.applicationVersion);
1173
- }
1174
- if (data.creationTime != null) {
1175
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1176
- }
1177
- if (data.definitionContent != null) {
1178
- contents.definitionContent = __expectString(data.definitionContent);
1179
- }
1180
- if (data.description != null) {
1181
- contents.description = __expectString(data.description);
1182
- }
1183
- if (data.name != null) {
1184
- contents.name = __expectString(data.name);
1185
- }
1186
- if (data.status != null) {
1187
- contents.status = __expectString(data.status);
1188
- }
1189
- if (data.statusReason != null) {
1190
- contents.statusReason = __expectString(data.statusReason);
1191
- }
1119
+ const doc = take(data, {
1120
+ applicationVersion: __expectInt32,
1121
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1122
+ definitionContent: __expectString,
1123
+ description: __expectString,
1124
+ name: __expectString,
1125
+ status: __expectString,
1126
+ statusReason: __expectString,
1127
+ });
1128
+ Object.assign(contents, doc);
1192
1129
  return contents;
1193
1130
  };
1194
1131
  const de_GetApplicationVersionCommandError = async (output, context) => {
@@ -1215,10 +1152,9 @@ const de_GetApplicationVersionCommandError = async (output, context) => {
1215
1152
  throw await de_ValidationExceptionRes(parsedOutput, context);
1216
1153
  default:
1217
1154
  const parsedBody = parsedOutput.body;
1218
- throwDefaultError({
1155
+ return throwDefaultError({
1219
1156
  output,
1220
1157
  parsedBody,
1221
- exceptionCtor: __BaseException,
1222
1158
  errorCode,
1223
1159
  });
1224
1160
  }
@@ -1231,42 +1167,21 @@ export const de_GetBatchJobExecutionCommand = async (output, context) => {
1231
1167
  $metadata: deserializeMetadata(output),
1232
1168
  });
1233
1169
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1234
- if (data.applicationId != null) {
1235
- contents.applicationId = __expectString(data.applicationId);
1236
- }
1237
- if (data.batchJobIdentifier != null) {
1238
- contents.batchJobIdentifier = de_BatchJobIdentifier(__expectUnion(data.batchJobIdentifier), context);
1239
- }
1240
- if (data.endTime != null) {
1241
- contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
1242
- }
1243
- if (data.executionId != null) {
1244
- contents.executionId = __expectString(data.executionId);
1245
- }
1246
- if (data.jobId != null) {
1247
- contents.jobId = __expectString(data.jobId);
1248
- }
1249
- if (data.jobName != null) {
1250
- contents.jobName = __expectString(data.jobName);
1251
- }
1252
- if (data.jobType != null) {
1253
- contents.jobType = __expectString(data.jobType);
1254
- }
1255
- if (data.jobUser != null) {
1256
- contents.jobUser = __expectString(data.jobUser);
1257
- }
1258
- if (data.returnCode != null) {
1259
- contents.returnCode = __expectString(data.returnCode);
1260
- }
1261
- if (data.startTime != null) {
1262
- contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
1263
- }
1264
- if (data.status != null) {
1265
- contents.status = __expectString(data.status);
1266
- }
1267
- if (data.statusReason != null) {
1268
- contents.statusReason = __expectString(data.statusReason);
1269
- }
1170
+ const doc = take(data, {
1171
+ applicationId: __expectString,
1172
+ batchJobIdentifier: (_) => _json(__expectUnion(_)),
1173
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1174
+ executionId: __expectString,
1175
+ jobId: __expectString,
1176
+ jobName: __expectString,
1177
+ jobType: __expectString,
1178
+ jobUser: __expectString,
1179
+ returnCode: __expectString,
1180
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1181
+ status: __expectString,
1182
+ statusReason: __expectString,
1183
+ });
1184
+ Object.assign(contents, doc);
1270
1185
  return contents;
1271
1186
  };
1272
1187
  const de_GetBatchJobExecutionCommandError = async (output, context) => {
@@ -1293,10 +1208,9 @@ const de_GetBatchJobExecutionCommandError = async (output, context) => {
1293
1208
  throw await de_ValidationExceptionRes(parsedOutput, context);
1294
1209
  default:
1295
1210
  const parsedBody = parsedOutput.body;
1296
- throwDefaultError({
1211
+ return throwDefaultError({
1297
1212
  output,
1298
1213
  parsedBody,
1299
- exceptionCtor: __BaseException,
1300
1214
  errorCode,
1301
1215
  });
1302
1216
  }
@@ -1309,30 +1223,17 @@ export const de_GetDataSetDetailsCommand = async (output, context) => {
1309
1223
  $metadata: deserializeMetadata(output),
1310
1224
  });
1311
1225
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1312
- if (data.blocksize != null) {
1313
- contents.blocksize = __expectInt32(data.blocksize);
1314
- }
1315
- if (data.creationTime != null) {
1316
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1317
- }
1318
- if (data.dataSetName != null) {
1319
- contents.dataSetName = __expectString(data.dataSetName);
1320
- }
1321
- if (data.dataSetOrg != null) {
1322
- contents.dataSetOrg = de_DatasetDetailOrgAttributes(__expectUnion(data.dataSetOrg), context);
1323
- }
1324
- if (data.lastReferencedTime != null) {
1325
- contents.lastReferencedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastReferencedTime)));
1326
- }
1327
- if (data.lastUpdatedTime != null) {
1328
- contents.lastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedTime)));
1329
- }
1330
- if (data.location != null) {
1331
- contents.location = __expectString(data.location);
1332
- }
1333
- if (data.recordLength != null) {
1334
- contents.recordLength = __expectInt32(data.recordLength);
1335
- }
1226
+ const doc = take(data, {
1227
+ blocksize: __expectInt32,
1228
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1229
+ dataSetName: __expectString,
1230
+ dataSetOrg: (_) => _json(__expectUnion(_)),
1231
+ lastReferencedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1232
+ lastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1233
+ location: __expectString,
1234
+ recordLength: __expectInt32,
1235
+ });
1236
+ Object.assign(contents, doc);
1336
1237
  return contents;
1337
1238
  };
1338
1239
  const de_GetDataSetDetailsCommandError = async (output, context) => {
@@ -1359,10 +1260,9 @@ const de_GetDataSetDetailsCommandError = async (output, context) => {
1359
1260
  throw await de_ValidationExceptionRes(parsedOutput, context);
1360
1261
  default:
1361
1262
  const parsedBody = parsedOutput.body;
1362
- throwDefaultError({
1263
+ return throwDefaultError({
1363
1264
  output,
1364
1265
  parsedBody,
1365
- exceptionCtor: __BaseException,
1366
1266
  errorCode,
1367
1267
  });
1368
1268
  }
@@ -1375,15 +1275,12 @@ export const de_GetDataSetImportTaskCommand = async (output, context) => {
1375
1275
  $metadata: deserializeMetadata(output),
1376
1276
  });
1377
1277
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1378
- if (data.status != null) {
1379
- contents.status = __expectString(data.status);
1380
- }
1381
- if (data.summary != null) {
1382
- contents.summary = de_DataSetImportSummary(data.summary, context);
1383
- }
1384
- if (data.taskId != null) {
1385
- contents.taskId = __expectString(data.taskId);
1386
- }
1278
+ const doc = take(data, {
1279
+ status: __expectString,
1280
+ summary: _json,
1281
+ taskId: __expectString,
1282
+ });
1283
+ Object.assign(contents, doc);
1387
1284
  return contents;
1388
1285
  };
1389
1286
  const de_GetDataSetImportTaskCommandError = async (output, context) => {
@@ -1410,10 +1307,9 @@ const de_GetDataSetImportTaskCommandError = async (output, context) => {
1410
1307
  throw await de_ValidationExceptionRes(parsedOutput, context);
1411
1308
  default:
1412
1309
  const parsedBody = parsedOutput.body;
1413
- throwDefaultError({
1310
+ return throwDefaultError({
1414
1311
  output,
1415
1312
  parsedBody,
1416
- exceptionCtor: __BaseException,
1417
1313
  errorCode,
1418
1314
  });
1419
1315
  }
@@ -1426,27 +1322,16 @@ export const de_GetDeploymentCommand = async (output, context) => {
1426
1322
  $metadata: deserializeMetadata(output),
1427
1323
  });
1428
1324
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1429
- if (data.applicationId != null) {
1430
- contents.applicationId = __expectString(data.applicationId);
1431
- }
1432
- if (data.applicationVersion != null) {
1433
- contents.applicationVersion = __expectInt32(data.applicationVersion);
1434
- }
1435
- if (data.creationTime != null) {
1436
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1437
- }
1438
- if (data.deploymentId != null) {
1439
- contents.deploymentId = __expectString(data.deploymentId);
1440
- }
1441
- if (data.environmentId != null) {
1442
- contents.environmentId = __expectString(data.environmentId);
1443
- }
1444
- if (data.status != null) {
1445
- contents.status = __expectString(data.status);
1446
- }
1447
- if (data.statusReason != null) {
1448
- contents.statusReason = __expectString(data.statusReason);
1449
- }
1325
+ const doc = take(data, {
1326
+ applicationId: __expectString,
1327
+ applicationVersion: __expectInt32,
1328
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1329
+ deploymentId: __expectString,
1330
+ environmentId: __expectString,
1331
+ status: __expectString,
1332
+ statusReason: __expectString,
1333
+ });
1334
+ Object.assign(contents, doc);
1450
1335
  return contents;
1451
1336
  };
1452
1337
  const de_GetDeploymentCommandError = async (output, context) => {
@@ -1473,10 +1358,9 @@ const de_GetDeploymentCommandError = async (output, context) => {
1473
1358
  throw await de_ValidationExceptionRes(parsedOutput, context);
1474
1359
  default:
1475
1360
  const parsedBody = parsedOutput.body;
1476
- throwDefaultError({
1361
+ return throwDefaultError({
1477
1362
  output,
1478
1363
  parsedBody,
1479
- exceptionCtor: __BaseException,
1480
1364
  errorCode,
1481
1365
  });
1482
1366
  }
@@ -1489,72 +1373,31 @@ export const de_GetEnvironmentCommand = async (output, context) => {
1489
1373
  $metadata: deserializeMetadata(output),
1490
1374
  });
1491
1375
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1492
- if (data.actualCapacity != null) {
1493
- contents.actualCapacity = __expectInt32(data.actualCapacity);
1494
- }
1495
- if (data.creationTime != null) {
1496
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1497
- }
1498
- if (data.description != null) {
1499
- contents.description = __expectString(data.description);
1500
- }
1501
- if (data.engineType != null) {
1502
- contents.engineType = __expectString(data.engineType);
1503
- }
1504
- if (data.engineVersion != null) {
1505
- contents.engineVersion = __expectString(data.engineVersion);
1506
- }
1507
- if (data.environmentArn != null) {
1508
- contents.environmentArn = __expectString(data.environmentArn);
1509
- }
1510
- if (data.environmentId != null) {
1511
- contents.environmentId = __expectString(data.environmentId);
1512
- }
1513
- if (data.highAvailabilityConfig != null) {
1514
- contents.highAvailabilityConfig = de_HighAvailabilityConfig(data.highAvailabilityConfig, context);
1515
- }
1516
- if (data.instanceType != null) {
1517
- contents.instanceType = __expectString(data.instanceType);
1518
- }
1519
- if (data.kmsKeyId != null) {
1520
- contents.kmsKeyId = __expectString(data.kmsKeyId);
1521
- }
1522
- if (data.loadBalancerArn != null) {
1523
- contents.loadBalancerArn = __expectString(data.loadBalancerArn);
1524
- }
1525
- if (data.name != null) {
1526
- contents.name = __expectString(data.name);
1527
- }
1528
- if (data.pendingMaintenance != null) {
1529
- contents.pendingMaintenance = de_PendingMaintenance(data.pendingMaintenance, context);
1530
- }
1531
- if (data.preferredMaintenanceWindow != null) {
1532
- contents.preferredMaintenanceWindow = __expectString(data.preferredMaintenanceWindow);
1533
- }
1534
- if (data.publiclyAccessible != null) {
1535
- contents.publiclyAccessible = __expectBoolean(data.publiclyAccessible);
1536
- }
1537
- if (data.securityGroupIds != null) {
1538
- contents.securityGroupIds = de_String50List(data.securityGroupIds, context);
1539
- }
1540
- if (data.status != null) {
1541
- contents.status = __expectString(data.status);
1542
- }
1543
- if (data.statusReason != null) {
1544
- contents.statusReason = __expectString(data.statusReason);
1545
- }
1546
- if (data.storageConfigurations != null) {
1547
- contents.storageConfigurations = de_StorageConfigurationList(data.storageConfigurations, context);
1548
- }
1549
- if (data.subnetIds != null) {
1550
- contents.subnetIds = de_String50List(data.subnetIds, context);
1551
- }
1552
- if (data.tags != null) {
1553
- contents.tags = de_TagMap(data.tags, context);
1554
- }
1555
- if (data.vpcId != null) {
1556
- contents.vpcId = __expectString(data.vpcId);
1557
- }
1376
+ const doc = take(data, {
1377
+ actualCapacity: __expectInt32,
1378
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1379
+ description: __expectString,
1380
+ engineType: __expectString,
1381
+ engineVersion: __expectString,
1382
+ environmentArn: __expectString,
1383
+ environmentId: __expectString,
1384
+ highAvailabilityConfig: _json,
1385
+ instanceType: __expectString,
1386
+ kmsKeyId: __expectString,
1387
+ loadBalancerArn: __expectString,
1388
+ name: __expectString,
1389
+ pendingMaintenance: (_) => de_PendingMaintenance(_, context),
1390
+ preferredMaintenanceWindow: __expectString,
1391
+ publiclyAccessible: __expectBoolean,
1392
+ securityGroupIds: _json,
1393
+ status: __expectString,
1394
+ statusReason: __expectString,
1395
+ storageConfigurations: (_) => de_StorageConfigurationList(_, context),
1396
+ subnetIds: _json,
1397
+ tags: _json,
1398
+ vpcId: __expectString,
1399
+ });
1400
+ Object.assign(contents, doc);
1558
1401
  return contents;
1559
1402
  };
1560
1403
  const de_GetEnvironmentCommandError = async (output, context) => {
@@ -1581,10 +1424,9 @@ const de_GetEnvironmentCommandError = async (output, context) => {
1581
1424
  throw await de_ValidationExceptionRes(parsedOutput, context);
1582
1425
  default:
1583
1426
  const parsedBody = parsedOutput.body;
1584
- throwDefaultError({
1427
+ return throwDefaultError({
1585
1428
  output,
1586
1429
  parsedBody,
1587
- exceptionCtor: __BaseException,
1588
1430
  errorCode,
1589
1431
  });
1590
1432
  }
@@ -1597,12 +1439,11 @@ export const de_ListApplicationsCommand = async (output, context) => {
1597
1439
  $metadata: deserializeMetadata(output),
1598
1440
  });
1599
1441
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1600
- if (data.applications != null) {
1601
- contents.applications = de_ApplicationSummaryList(data.applications, context);
1602
- }
1603
- if (data.nextToken != null) {
1604
- contents.nextToken = __expectString(data.nextToken);
1605
- }
1442
+ const doc = take(data, {
1443
+ applications: (_) => de_ApplicationSummaryList(_, context),
1444
+ nextToken: __expectString,
1445
+ });
1446
+ Object.assign(contents, doc);
1606
1447
  return contents;
1607
1448
  };
1608
1449
  const de_ListApplicationsCommandError = async (output, context) => {
@@ -1626,10 +1467,9 @@ const de_ListApplicationsCommandError = async (output, context) => {
1626
1467
  throw await de_ValidationExceptionRes(parsedOutput, context);
1627
1468
  default:
1628
1469
  const parsedBody = parsedOutput.body;
1629
- throwDefaultError({
1470
+ return throwDefaultError({
1630
1471
  output,
1631
1472
  parsedBody,
1632
- exceptionCtor: __BaseException,
1633
1473
  errorCode,
1634
1474
  });
1635
1475
  }
@@ -1642,12 +1482,11 @@ export const de_ListApplicationVersionsCommand = async (output, context) => {
1642
1482
  $metadata: deserializeMetadata(output),
1643
1483
  });
1644
1484
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1645
- if (data.applicationVersions != null) {
1646
- contents.applicationVersions = de_ApplicationVersionSummaryList(data.applicationVersions, context);
1647
- }
1648
- if (data.nextToken != null) {
1649
- contents.nextToken = __expectString(data.nextToken);
1650
- }
1485
+ const doc = take(data, {
1486
+ applicationVersions: (_) => de_ApplicationVersionSummaryList(_, context),
1487
+ nextToken: __expectString,
1488
+ });
1489
+ Object.assign(contents, doc);
1651
1490
  return contents;
1652
1491
  };
1653
1492
  const de_ListApplicationVersionsCommandError = async (output, context) => {
@@ -1674,10 +1513,9 @@ const de_ListApplicationVersionsCommandError = async (output, context) => {
1674
1513
  throw await de_ValidationExceptionRes(parsedOutput, context);
1675
1514
  default:
1676
1515
  const parsedBody = parsedOutput.body;
1677
- throwDefaultError({
1516
+ return throwDefaultError({
1678
1517
  output,
1679
1518
  parsedBody,
1680
- exceptionCtor: __BaseException,
1681
1519
  errorCode,
1682
1520
  });
1683
1521
  }
@@ -1690,12 +1528,11 @@ export const de_ListBatchJobDefinitionsCommand = async (output, context) => {
1690
1528
  $metadata: deserializeMetadata(output),
1691
1529
  });
1692
1530
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1693
- if (data.batchJobDefinitions != null) {
1694
- contents.batchJobDefinitions = de_BatchJobDefinitions(data.batchJobDefinitions, context);
1695
- }
1696
- if (data.nextToken != null) {
1697
- contents.nextToken = __expectString(data.nextToken);
1698
- }
1531
+ const doc = take(data, {
1532
+ batchJobDefinitions: _json,
1533
+ nextToken: __expectString,
1534
+ });
1535
+ Object.assign(contents, doc);
1699
1536
  return contents;
1700
1537
  };
1701
1538
  const de_ListBatchJobDefinitionsCommandError = async (output, context) => {
@@ -1722,10 +1559,9 @@ const de_ListBatchJobDefinitionsCommandError = async (output, context) => {
1722
1559
  throw await de_ValidationExceptionRes(parsedOutput, context);
1723
1560
  default:
1724
1561
  const parsedBody = parsedOutput.body;
1725
- throwDefaultError({
1562
+ return throwDefaultError({
1726
1563
  output,
1727
1564
  parsedBody,
1728
- exceptionCtor: __BaseException,
1729
1565
  errorCode,
1730
1566
  });
1731
1567
  }
@@ -1738,12 +1574,11 @@ export const de_ListBatchJobExecutionsCommand = async (output, context) => {
1738
1574
  $metadata: deserializeMetadata(output),
1739
1575
  });
1740
1576
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1741
- if (data.batchJobExecutions != null) {
1742
- contents.batchJobExecutions = de_BatchJobExecutionSummaryList(data.batchJobExecutions, context);
1743
- }
1744
- if (data.nextToken != null) {
1745
- contents.nextToken = __expectString(data.nextToken);
1746
- }
1577
+ const doc = take(data, {
1578
+ batchJobExecutions: (_) => de_BatchJobExecutionSummaryList(_, context),
1579
+ nextToken: __expectString,
1580
+ });
1581
+ Object.assign(contents, doc);
1747
1582
  return contents;
1748
1583
  };
1749
1584
  const de_ListBatchJobExecutionsCommandError = async (output, context) => {
@@ -1770,10 +1605,9 @@ const de_ListBatchJobExecutionsCommandError = async (output, context) => {
1770
1605
  throw await de_ValidationExceptionRes(parsedOutput, context);
1771
1606
  default:
1772
1607
  const parsedBody = parsedOutput.body;
1773
- throwDefaultError({
1608
+ return throwDefaultError({
1774
1609
  output,
1775
1610
  parsedBody,
1776
- exceptionCtor: __BaseException,
1777
1611
  errorCode,
1778
1612
  });
1779
1613
  }
@@ -1786,12 +1620,11 @@ export const de_ListDataSetImportHistoryCommand = async (output, context) => {
1786
1620
  $metadata: deserializeMetadata(output),
1787
1621
  });
1788
1622
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1789
- if (data.dataSetImportTasks != null) {
1790
- contents.dataSetImportTasks = de_DataSetImportTaskList(data.dataSetImportTasks, context);
1791
- }
1792
- if (data.nextToken != null) {
1793
- contents.nextToken = __expectString(data.nextToken);
1794
- }
1623
+ const doc = take(data, {
1624
+ dataSetImportTasks: _json,
1625
+ nextToken: __expectString,
1626
+ });
1627
+ Object.assign(contents, doc);
1795
1628
  return contents;
1796
1629
  };
1797
1630
  const de_ListDataSetImportHistoryCommandError = async (output, context) => {
@@ -1818,10 +1651,9 @@ const de_ListDataSetImportHistoryCommandError = async (output, context) => {
1818
1651
  throw await de_ValidationExceptionRes(parsedOutput, context);
1819
1652
  default:
1820
1653
  const parsedBody = parsedOutput.body;
1821
- throwDefaultError({
1654
+ return throwDefaultError({
1822
1655
  output,
1823
1656
  parsedBody,
1824
- exceptionCtor: __BaseException,
1825
1657
  errorCode,
1826
1658
  });
1827
1659
  }
@@ -1834,12 +1666,11 @@ export const de_ListDataSetsCommand = async (output, context) => {
1834
1666
  $metadata: deserializeMetadata(output),
1835
1667
  });
1836
1668
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1837
- if (data.dataSets != null) {
1838
- contents.dataSets = de_DataSetsSummaryList(data.dataSets, context);
1839
- }
1840
- if (data.nextToken != null) {
1841
- contents.nextToken = __expectString(data.nextToken);
1842
- }
1669
+ const doc = take(data, {
1670
+ dataSets: (_) => de_DataSetsSummaryList(_, context),
1671
+ nextToken: __expectString,
1672
+ });
1673
+ Object.assign(contents, doc);
1843
1674
  return contents;
1844
1675
  };
1845
1676
  const de_ListDataSetsCommandError = async (output, context) => {
@@ -1866,10 +1697,9 @@ const de_ListDataSetsCommandError = async (output, context) => {
1866
1697
  throw await de_ValidationExceptionRes(parsedOutput, context);
1867
1698
  default:
1868
1699
  const parsedBody = parsedOutput.body;
1869
- throwDefaultError({
1700
+ return throwDefaultError({
1870
1701
  output,
1871
1702
  parsedBody,
1872
- exceptionCtor: __BaseException,
1873
1703
  errorCode,
1874
1704
  });
1875
1705
  }
@@ -1882,12 +1712,11 @@ export const de_ListDeploymentsCommand = async (output, context) => {
1882
1712
  $metadata: deserializeMetadata(output),
1883
1713
  });
1884
1714
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1885
- if (data.deployments != null) {
1886
- contents.deployments = de_DeploymentList(data.deployments, context);
1887
- }
1888
- if (data.nextToken != null) {
1889
- contents.nextToken = __expectString(data.nextToken);
1890
- }
1715
+ const doc = take(data, {
1716
+ deployments: (_) => de_DeploymentList(_, context),
1717
+ nextToken: __expectString,
1718
+ });
1719
+ Object.assign(contents, doc);
1891
1720
  return contents;
1892
1721
  };
1893
1722
  const de_ListDeploymentsCommandError = async (output, context) => {
@@ -1914,10 +1743,9 @@ const de_ListDeploymentsCommandError = async (output, context) => {
1914
1743
  throw await de_ValidationExceptionRes(parsedOutput, context);
1915
1744
  default:
1916
1745
  const parsedBody = parsedOutput.body;
1917
- throwDefaultError({
1746
+ return throwDefaultError({
1918
1747
  output,
1919
1748
  parsedBody,
1920
- exceptionCtor: __BaseException,
1921
1749
  errorCode,
1922
1750
  });
1923
1751
  }
@@ -1930,12 +1758,11 @@ export const de_ListEngineVersionsCommand = async (output, context) => {
1930
1758
  $metadata: deserializeMetadata(output),
1931
1759
  });
1932
1760
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1933
- if (data.engineVersions != null) {
1934
- contents.engineVersions = de_EngineVersionsSummaryList(data.engineVersions, context);
1935
- }
1936
- if (data.nextToken != null) {
1937
- contents.nextToken = __expectString(data.nextToken);
1938
- }
1761
+ const doc = take(data, {
1762
+ engineVersions: _json,
1763
+ nextToken: __expectString,
1764
+ });
1765
+ Object.assign(contents, doc);
1939
1766
  return contents;
1940
1767
  };
1941
1768
  const de_ListEngineVersionsCommandError = async (output, context) => {
@@ -1959,10 +1786,9 @@ const de_ListEngineVersionsCommandError = async (output, context) => {
1959
1786
  throw await de_ValidationExceptionRes(parsedOutput, context);
1960
1787
  default:
1961
1788
  const parsedBody = parsedOutput.body;
1962
- throwDefaultError({
1789
+ return throwDefaultError({
1963
1790
  output,
1964
1791
  parsedBody,
1965
- exceptionCtor: __BaseException,
1966
1792
  errorCode,
1967
1793
  });
1968
1794
  }
@@ -1975,12 +1801,11 @@ export const de_ListEnvironmentsCommand = async (output, context) => {
1975
1801
  $metadata: deserializeMetadata(output),
1976
1802
  });
1977
1803
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1978
- if (data.environments != null) {
1979
- contents.environments = de_EnvironmentSummaryList(data.environments, context);
1980
- }
1981
- if (data.nextToken != null) {
1982
- contents.nextToken = __expectString(data.nextToken);
1983
- }
1804
+ const doc = take(data, {
1805
+ environments: (_) => de_EnvironmentSummaryList(_, context),
1806
+ nextToken: __expectString,
1807
+ });
1808
+ Object.assign(contents, doc);
1984
1809
  return contents;
1985
1810
  };
1986
1811
  const de_ListEnvironmentsCommandError = async (output, context) => {
@@ -2004,10 +1829,9 @@ const de_ListEnvironmentsCommandError = async (output, context) => {
2004
1829
  throw await de_ValidationExceptionRes(parsedOutput, context);
2005
1830
  default:
2006
1831
  const parsedBody = parsedOutput.body;
2007
- throwDefaultError({
1832
+ return throwDefaultError({
2008
1833
  output,
2009
1834
  parsedBody,
2010
- exceptionCtor: __BaseException,
2011
1835
  errorCode,
2012
1836
  });
2013
1837
  }
@@ -2020,9 +1844,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2020
1844
  $metadata: deserializeMetadata(output),
2021
1845
  });
2022
1846
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2023
- if (data.tags != null) {
2024
- contents.tags = de_TagMap(data.tags, context);
2025
- }
1847
+ const doc = take(data, {
1848
+ tags: _json,
1849
+ });
1850
+ Object.assign(contents, doc);
2026
1851
  return contents;
2027
1852
  };
2028
1853
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -2049,10 +1874,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2049
1874
  throw await de_ValidationExceptionRes(parsedOutput, context);
2050
1875
  default:
2051
1876
  const parsedBody = parsedOutput.body;
2052
- throwDefaultError({
1877
+ return throwDefaultError({
2053
1878
  output,
2054
1879
  parsedBody,
2055
- exceptionCtor: __BaseException,
2056
1880
  errorCode,
2057
1881
  });
2058
1882
  }
@@ -2094,10 +1918,9 @@ const de_StartApplicationCommandError = async (output, context) => {
2094
1918
  throw await de_ValidationExceptionRes(parsedOutput, context);
2095
1919
  default:
2096
1920
  const parsedBody = parsedOutput.body;
2097
- throwDefaultError({
1921
+ return throwDefaultError({
2098
1922
  output,
2099
1923
  parsedBody,
2100
- exceptionCtor: __BaseException,
2101
1924
  errorCode,
2102
1925
  });
2103
1926
  }
@@ -2110,9 +1933,10 @@ export const de_StartBatchJobCommand = async (output, context) => {
2110
1933
  $metadata: deserializeMetadata(output),
2111
1934
  });
2112
1935
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2113
- if (data.executionId != null) {
2114
- contents.executionId = __expectString(data.executionId);
2115
- }
1936
+ const doc = take(data, {
1937
+ executionId: __expectString,
1938
+ });
1939
+ Object.assign(contents, doc);
2116
1940
  return contents;
2117
1941
  };
2118
1942
  const de_StartBatchJobCommandError = async (output, context) => {
@@ -2142,10 +1966,9 @@ const de_StartBatchJobCommandError = async (output, context) => {
2142
1966
  throw await de_ValidationExceptionRes(parsedOutput, context);
2143
1967
  default:
2144
1968
  const parsedBody = parsedOutput.body;
2145
- throwDefaultError({
1969
+ return throwDefaultError({
2146
1970
  output,
2147
1971
  parsedBody,
2148
- exceptionCtor: __BaseException,
2149
1972
  errorCode,
2150
1973
  });
2151
1974
  }
@@ -2187,10 +2010,9 @@ const de_StopApplicationCommandError = async (output, context) => {
2187
2010
  throw await de_ValidationExceptionRes(parsedOutput, context);
2188
2011
  default:
2189
2012
  const parsedBody = parsedOutput.body;
2190
- throwDefaultError({
2013
+ return throwDefaultError({
2191
2014
  output,
2192
2015
  parsedBody,
2193
- exceptionCtor: __BaseException,
2194
2016
  errorCode,
2195
2017
  });
2196
2018
  }
@@ -2232,10 +2054,9 @@ const de_TagResourceCommandError = async (output, context) => {
2232
2054
  throw await de_ValidationExceptionRes(parsedOutput, context);
2233
2055
  default:
2234
2056
  const parsedBody = parsedOutput.body;
2235
- throwDefaultError({
2057
+ return throwDefaultError({
2236
2058
  output,
2237
2059
  parsedBody,
2238
- exceptionCtor: __BaseException,
2239
2060
  errorCode,
2240
2061
  });
2241
2062
  }
@@ -2274,10 +2095,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2274
2095
  throw await de_ValidationExceptionRes(parsedOutput, context);
2275
2096
  default:
2276
2097
  const parsedBody = parsedOutput.body;
2277
- throwDefaultError({
2098
+ return throwDefaultError({
2278
2099
  output,
2279
2100
  parsedBody,
2280
- exceptionCtor: __BaseException,
2281
2101
  errorCode,
2282
2102
  });
2283
2103
  }
@@ -2290,9 +2110,10 @@ export const de_UpdateApplicationCommand = async (output, context) => {
2290
2110
  $metadata: deserializeMetadata(output),
2291
2111
  });
2292
2112
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2293
- if (data.applicationVersion != null) {
2294
- contents.applicationVersion = __expectInt32(data.applicationVersion);
2295
- }
2113
+ const doc = take(data, {
2114
+ applicationVersion: __expectInt32,
2115
+ });
2116
+ Object.assign(contents, doc);
2296
2117
  return contents;
2297
2118
  };
2298
2119
  const de_UpdateApplicationCommandError = async (output, context) => {
@@ -2322,10 +2143,9 @@ const de_UpdateApplicationCommandError = async (output, context) => {
2322
2143
  throw await de_ValidationExceptionRes(parsedOutput, context);
2323
2144
  default:
2324
2145
  const parsedBody = parsedOutput.body;
2325
- throwDefaultError({
2146
+ return throwDefaultError({
2326
2147
  output,
2327
2148
  parsedBody,
2328
- exceptionCtor: __BaseException,
2329
2149
  errorCode,
2330
2150
  });
2331
2151
  }
@@ -2338,9 +2158,10 @@ export const de_UpdateEnvironmentCommand = async (output, context) => {
2338
2158
  $metadata: deserializeMetadata(output),
2339
2159
  });
2340
2160
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2341
- if (data.environmentId != null) {
2342
- contents.environmentId = __expectString(data.environmentId);
2343
- }
2161
+ const doc = take(data, {
2162
+ environmentId: __expectString,
2163
+ });
2164
+ Object.assign(contents, doc);
2344
2165
  return contents;
2345
2166
  };
2346
2167
  const de_UpdateEnvironmentCommandError = async (output, context) => {
@@ -2373,21 +2194,21 @@ const de_UpdateEnvironmentCommandError = async (output, context) => {
2373
2194
  throw await de_ValidationExceptionRes(parsedOutput, context);
2374
2195
  default:
2375
2196
  const parsedBody = parsedOutput.body;
2376
- throwDefaultError({
2197
+ return throwDefaultError({
2377
2198
  output,
2378
2199
  parsedBody,
2379
- exceptionCtor: __BaseException,
2380
2200
  errorCode,
2381
2201
  });
2382
2202
  }
2383
2203
  };
2384
- const map = __map;
2204
+ const throwDefaultError = withBaseException(__BaseException);
2385
2205
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2386
2206
  const contents = map({});
2387
2207
  const data = parsedOutput.body;
2388
- if (data.message != null) {
2389
- contents.message = __expectString(data.message);
2390
- }
2208
+ const doc = take(data, {
2209
+ message: __expectString,
2210
+ });
2211
+ Object.assign(contents, doc);
2391
2212
  const exception = new AccessDeniedException({
2392
2213
  $metadata: deserializeMetadata(parsedOutput),
2393
2214
  ...contents,
@@ -2397,15 +2218,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2397
2218
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2398
2219
  const contents = map({});
2399
2220
  const data = parsedOutput.body;
2400
- if (data.message != null) {
2401
- contents.message = __expectString(data.message);
2402
- }
2403
- if (data.resourceId != null) {
2404
- contents.resourceId = __expectString(data.resourceId);
2405
- }
2406
- if (data.resourceType != null) {
2407
- contents.resourceType = __expectString(data.resourceType);
2408
- }
2221
+ const doc = take(data, {
2222
+ message: __expectString,
2223
+ resourceId: __expectString,
2224
+ resourceType: __expectString,
2225
+ });
2226
+ Object.assign(contents, doc);
2409
2227
  const exception = new ConflictException({
2410
2228
  $metadata: deserializeMetadata(parsedOutput),
2411
2229
  ...contents,
@@ -2420,9 +2238,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2420
2238
  ],
2421
2239
  });
2422
2240
  const data = parsedOutput.body;
2423
- if (data.message != null) {
2424
- contents.message = __expectString(data.message);
2425
- }
2241
+ const doc = take(data, {
2242
+ message: __expectString,
2243
+ });
2244
+ Object.assign(contents, doc);
2426
2245
  const exception = new InternalServerException({
2427
2246
  $metadata: deserializeMetadata(parsedOutput),
2428
2247
  ...contents,
@@ -2432,15 +2251,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2432
2251
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2433
2252
  const contents = map({});
2434
2253
  const data = parsedOutput.body;
2435
- if (data.message != null) {
2436
- contents.message = __expectString(data.message);
2437
- }
2438
- if (data.resourceId != null) {
2439
- contents.resourceId = __expectString(data.resourceId);
2440
- }
2441
- if (data.resourceType != null) {
2442
- contents.resourceType = __expectString(data.resourceType);
2443
- }
2254
+ const doc = take(data, {
2255
+ message: __expectString,
2256
+ resourceId: __expectString,
2257
+ resourceType: __expectString,
2258
+ });
2259
+ Object.assign(contents, doc);
2444
2260
  const exception = new ResourceNotFoundException({
2445
2261
  $metadata: deserializeMetadata(parsedOutput),
2446
2262
  ...contents,
@@ -2450,21 +2266,14 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2450
2266
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2451
2267
  const contents = map({});
2452
2268
  const data = parsedOutput.body;
2453
- if (data.message != null) {
2454
- contents.message = __expectString(data.message);
2455
- }
2456
- if (data.quotaCode != null) {
2457
- contents.quotaCode = __expectString(data.quotaCode);
2458
- }
2459
- if (data.resourceId != null) {
2460
- contents.resourceId = __expectString(data.resourceId);
2461
- }
2462
- if (data.resourceType != null) {
2463
- contents.resourceType = __expectString(data.resourceType);
2464
- }
2465
- if (data.serviceCode != null) {
2466
- contents.serviceCode = __expectString(data.serviceCode);
2467
- }
2269
+ const doc = take(data, {
2270
+ message: __expectString,
2271
+ quotaCode: __expectString,
2272
+ resourceId: __expectString,
2273
+ resourceType: __expectString,
2274
+ serviceCode: __expectString,
2275
+ });
2276
+ Object.assign(contents, doc);
2468
2277
  const exception = new ServiceQuotaExceededException({
2469
2278
  $metadata: deserializeMetadata(parsedOutput),
2470
2279
  ...contents,
@@ -2479,15 +2288,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2479
2288
  ],
2480
2289
  });
2481
2290
  const data = parsedOutput.body;
2482
- if (data.message != null) {
2483
- contents.message = __expectString(data.message);
2484
- }
2485
- if (data.quotaCode != null) {
2486
- contents.quotaCode = __expectString(data.quotaCode);
2487
- }
2488
- if (data.serviceCode != null) {
2489
- contents.serviceCode = __expectString(data.serviceCode);
2490
- }
2291
+ const doc = take(data, {
2292
+ message: __expectString,
2293
+ quotaCode: __expectString,
2294
+ serviceCode: __expectString,
2295
+ });
2296
+ Object.assign(contents, doc);
2491
2297
  const exception = new ThrottlingException({
2492
2298
  $metadata: deserializeMetadata(parsedOutput),
2493
2299
  ...contents,
@@ -2497,147 +2303,29 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2497
2303
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2498
2304
  const contents = map({});
2499
2305
  const data = parsedOutput.body;
2500
- if (data.fieldList != null) {
2501
- contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context);
2502
- }
2503
- if (data.message != null) {
2504
- contents.message = __expectString(data.message);
2505
- }
2506
- if (data.reason != null) {
2507
- contents.reason = __expectString(data.reason);
2508
- }
2306
+ const doc = take(data, {
2307
+ fieldList: _json,
2308
+ message: __expectString,
2309
+ reason: __expectString,
2310
+ });
2311
+ Object.assign(contents, doc);
2509
2312
  const exception = new ValidationException({
2510
2313
  $metadata: deserializeMetadata(parsedOutput),
2511
2314
  ...contents,
2512
2315
  });
2513
2316
  return __decorateServiceException(exception, parsedOutput.body);
2514
2317
  };
2515
- const se_AlternateKey = (input, context) => {
2516
- return {
2517
- ...(input.allowDuplicates != null && { allowDuplicates: input.allowDuplicates }),
2518
- ...(input.length != null && { length: input.length }),
2519
- ...(input.name != null && { name: input.name }),
2520
- ...(input.offset != null && { offset: input.offset }),
2521
- };
2522
- };
2523
- const se_AlternateKeyList = (input, context) => {
2524
- return input
2525
- .filter((e) => e != null)
2526
- .map((entry) => {
2527
- return se_AlternateKey(entry, context);
2528
- });
2529
- };
2530
- const se_BatchJobIdentifier = (input, context) => {
2531
- return BatchJobIdentifier.visit(input, {
2532
- fileBatchJobIdentifier: (value) => ({ fileBatchJobIdentifier: se_FileBatchJobIdentifier(value, context) }),
2533
- scriptBatchJobIdentifier: (value) => ({ scriptBatchJobIdentifier: se_ScriptBatchJobIdentifier(value, context) }),
2534
- _: (name, value) => ({ name: value }),
2535
- });
2536
- };
2537
- const se_BatchJobParametersMap = (input, context) => {
2538
- return Object.entries(input).reduce((acc, [key, value]) => {
2539
- if (value === null) {
2540
- return acc;
2541
- }
2542
- acc[key] = value;
2543
- return acc;
2544
- }, {});
2545
- };
2546
- const se_DataSet = (input, context) => {
2547
- return {
2548
- ...(input.datasetName != null && { datasetName: input.datasetName }),
2549
- ...(input.datasetOrg != null && { datasetOrg: se_DatasetOrgAttributes(input.datasetOrg, context) }),
2550
- ...(input.recordLength != null && { recordLength: se_RecordLength(input.recordLength, context) }),
2551
- ...(input.relativePath != null && { relativePath: input.relativePath }),
2552
- ...(input.storageType != null && { storageType: input.storageType }),
2553
- };
2554
- };
2555
- const se_DataSetImportConfig = (input, context) => {
2556
- return DataSetImportConfig.visit(input, {
2557
- dataSets: (value) => ({ dataSets: se_DataSetImportList(value, context) }),
2558
- s3Location: (value) => ({ s3Location: value }),
2559
- _: (name, value) => ({ name: value }),
2560
- });
2561
- };
2562
- const se_DataSetImportItem = (input, context) => {
2563
- return {
2564
- ...(input.dataSet != null && { dataSet: se_DataSet(input.dataSet, context) }),
2565
- ...(input.externalLocation != null && { externalLocation: se_ExternalLocation(input.externalLocation, context) }),
2566
- };
2567
- };
2568
- const se_DataSetImportList = (input, context) => {
2569
- return input
2570
- .filter((e) => e != null)
2571
- .map((entry) => {
2572
- return se_DataSetImportItem(entry, context);
2573
- });
2574
- };
2575
- const se_DatasetOrgAttributes = (input, context) => {
2576
- return DatasetOrgAttributes.visit(input, {
2577
- gdg: (value) => ({ gdg: se_GdgAttributes(value, context) }),
2578
- vsam: (value) => ({ vsam: se_VsamAttributes(value, context) }),
2579
- _: (name, value) => ({ name: value }),
2580
- });
2581
- };
2582
- const se_Definition = (input, context) => {
2583
- return Definition.visit(input, {
2584
- content: (value) => ({ content: value }),
2585
- s3Location: (value) => ({ s3Location: value }),
2586
- _: (name, value) => ({ name: value }),
2587
- });
2588
- };
2589
2318
  const se_EfsStorageConfiguration = (input, context) => {
2590
- return {
2591
- ...(input.fileSystemId != null && { "file-system-id": input.fileSystemId }),
2592
- ...(input.mountPoint != null && { "mount-point": input.mountPoint }),
2593
- };
2594
- };
2595
- const se_ExternalLocation = (input, context) => {
2596
- return ExternalLocation.visit(input, {
2597
- s3Location: (value) => ({ s3Location: value }),
2598
- _: (name, value) => ({ name: value }),
2319
+ return take(input, {
2320
+ "file-system-id": [, , `fileSystemId`],
2321
+ "mount-point": [, , `mountPoint`],
2599
2322
  });
2600
2323
  };
2601
- const se_FileBatchJobIdentifier = (input, context) => {
2602
- return {
2603
- ...(input.fileName != null && { fileName: input.fileName }),
2604
- ...(input.folderPath != null && { folderPath: input.folderPath }),
2605
- };
2606
- };
2607
2324
  const se_FsxStorageConfiguration = (input, context) => {
2608
- return {
2609
- ...(input.fileSystemId != null && { "file-system-id": input.fileSystemId }),
2610
- ...(input.mountPoint != null && { "mount-point": input.mountPoint }),
2611
- };
2612
- };
2613
- const se_GdgAttributes = (input, context) => {
2614
- return {
2615
- ...(input.limit != null && { limit: input.limit }),
2616
- ...(input.rollDisposition != null && { rollDisposition: input.rollDisposition }),
2617
- };
2618
- };
2619
- const se_HighAvailabilityConfig = (input, context) => {
2620
- return {
2621
- ...(input.desiredCapacity != null && { desiredCapacity: input.desiredCapacity }),
2622
- };
2623
- };
2624
- const se_PrimaryKey = (input, context) => {
2625
- return {
2626
- ...(input.length != null && { length: input.length }),
2627
- ...(input.name != null && { name: input.name }),
2628
- ...(input.offset != null && { offset: input.offset }),
2629
- };
2630
- };
2631
- const se_RecordLength = (input, context) => {
2632
- return {
2633
- ...(input.max != null && { max: input.max }),
2634
- ...(input.min != null && { min: input.min }),
2635
- };
2636
- };
2637
- const se_ScriptBatchJobIdentifier = (input, context) => {
2638
- return {
2639
- ...(input.scriptName != null && { scriptName: input.scriptName }),
2640
- };
2325
+ return take(input, {
2326
+ "file-system-id": [, , `fileSystemId`],
2327
+ "mount-point": [, , `mountPoint`],
2328
+ });
2641
2329
  };
2642
2330
  const se_StorageConfiguration = (input, context) => {
2643
2331
  return StorageConfiguration.visit(input, {
@@ -2653,408 +2341,148 @@ const se_StorageConfigurationList = (input, context) => {
2653
2341
  return se_StorageConfiguration(entry, context);
2654
2342
  });
2655
2343
  };
2656
- const se_String50List = (input, context) => {
2657
- return input
2658
- .filter((e) => e != null)
2659
- .map((entry) => {
2660
- return entry;
2661
- });
2662
- };
2663
- const se_TagMap = (input, context) => {
2664
- return Object.entries(input).reduce((acc, [key, value]) => {
2665
- if (value === null) {
2666
- return acc;
2667
- }
2668
- acc[key] = value;
2669
- return acc;
2670
- }, {});
2671
- };
2672
- const se_VsamAttributes = (input, context) => {
2673
- return {
2674
- ...(input.alternateKeys != null && { alternateKeys: se_AlternateKeyList(input.alternateKeys, context) }),
2675
- ...(input.compressed != null && { compressed: input.compressed }),
2676
- ...(input.encoding != null && { encoding: input.encoding }),
2677
- ...(input.format != null && { format: input.format }),
2678
- ...(input.primaryKey != null && { primaryKey: se_PrimaryKey(input.primaryKey, context) }),
2679
- };
2680
- };
2681
- const de_AlternateKey = (output, context) => {
2682
- return {
2683
- allowDuplicates: __expectBoolean(output.allowDuplicates),
2684
- length: __expectInt32(output.length),
2685
- name: __expectString(output.name),
2686
- offset: __expectInt32(output.offset),
2687
- };
2688
- };
2689
- const de_AlternateKeyList = (output, context) => {
2690
- const retVal = (output || [])
2691
- .filter((e) => e != null)
2692
- .map((entry) => {
2693
- if (entry === null) {
2694
- return null;
2695
- }
2696
- return de_AlternateKey(entry, context);
2697
- });
2698
- return retVal;
2699
- };
2700
2344
  const de_ApplicationSummary = (output, context) => {
2701
- return {
2702
- applicationArn: __expectString(output.applicationArn),
2703
- applicationId: __expectString(output.applicationId),
2704
- applicationVersion: __expectInt32(output.applicationVersion),
2705
- creationTime: output.creationTime != null
2706
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2707
- : undefined,
2708
- deploymentStatus: __expectString(output.deploymentStatus),
2709
- description: __expectString(output.description),
2710
- engineType: __expectString(output.engineType),
2711
- environmentId: __expectString(output.environmentId),
2712
- lastStartTime: output.lastStartTime != null
2713
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStartTime)))
2714
- : undefined,
2715
- name: __expectString(output.name),
2716
- status: __expectString(output.status),
2717
- versionStatus: __expectString(output.versionStatus),
2718
- };
2345
+ return take(output, {
2346
+ applicationArn: __expectString,
2347
+ applicationId: __expectString,
2348
+ applicationVersion: __expectInt32,
2349
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2350
+ deploymentStatus: __expectString,
2351
+ description: __expectString,
2352
+ engineType: __expectString,
2353
+ environmentId: __expectString,
2354
+ lastStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2355
+ name: __expectString,
2356
+ status: __expectString,
2357
+ versionStatus: __expectString,
2358
+ });
2719
2359
  };
2720
2360
  const de_ApplicationSummaryList = (output, context) => {
2721
2361
  const retVal = (output || [])
2722
2362
  .filter((e) => e != null)
2723
2363
  .map((entry) => {
2724
- if (entry === null) {
2725
- return null;
2726
- }
2727
2364
  return de_ApplicationSummary(entry, context);
2728
2365
  });
2729
2366
  return retVal;
2730
2367
  };
2731
2368
  const de_ApplicationVersionSummary = (output, context) => {
2732
- return {
2733
- applicationVersion: __expectInt32(output.applicationVersion),
2734
- creationTime: output.creationTime != null
2735
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2736
- : undefined,
2737
- status: __expectString(output.status),
2738
- statusReason: __expectString(output.statusReason),
2739
- };
2369
+ return take(output, {
2370
+ applicationVersion: __expectInt32,
2371
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2372
+ status: __expectString,
2373
+ statusReason: __expectString,
2374
+ });
2740
2375
  };
2741
2376
  const de_ApplicationVersionSummaryList = (output, context) => {
2742
2377
  const retVal = (output || [])
2743
2378
  .filter((e) => e != null)
2744
2379
  .map((entry) => {
2745
- if (entry === null) {
2746
- return null;
2747
- }
2748
2380
  return de_ApplicationVersionSummary(entry, context);
2749
2381
  });
2750
2382
  return retVal;
2751
2383
  };
2752
- const de_ArnList = (output, context) => {
2753
- const retVal = (output || [])
2754
- .filter((e) => e != null)
2755
- .map((entry) => {
2756
- if (entry === null) {
2757
- return null;
2758
- }
2759
- return __expectString(entry);
2760
- });
2761
- return retVal;
2762
- };
2763
- const de_BatchJobDefinition = (output, context) => {
2764
- if (output.fileBatchJobDefinition != null) {
2765
- return {
2766
- fileBatchJobDefinition: de_FileBatchJobDefinition(output.fileBatchJobDefinition, context),
2767
- };
2768
- }
2769
- if (output.scriptBatchJobDefinition != null) {
2770
- return {
2771
- scriptBatchJobDefinition: de_ScriptBatchJobDefinition(output.scriptBatchJobDefinition, context),
2772
- };
2773
- }
2774
- return { $unknown: Object.entries(output)[0] };
2775
- };
2776
- const de_BatchJobDefinitions = (output, context) => {
2777
- const retVal = (output || [])
2778
- .filter((e) => e != null)
2779
- .map((entry) => {
2780
- if (entry === null) {
2781
- return null;
2782
- }
2783
- return de_BatchJobDefinition(__expectUnion(entry), context);
2784
- });
2785
- return retVal;
2786
- };
2787
2384
  const de_BatchJobExecutionSummary = (output, context) => {
2788
- return {
2789
- applicationId: __expectString(output.applicationId),
2790
- batchJobIdentifier: output.batchJobIdentifier != null
2791
- ? de_BatchJobIdentifier(__expectUnion(output.batchJobIdentifier), context)
2792
- : undefined,
2793
- endTime: output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined,
2794
- executionId: __expectString(output.executionId),
2795
- jobId: __expectString(output.jobId),
2796
- jobName: __expectString(output.jobName),
2797
- jobType: __expectString(output.jobType),
2798
- returnCode: __expectString(output.returnCode),
2799
- startTime: output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
2800
- status: __expectString(output.status),
2801
- };
2385
+ return take(output, {
2386
+ applicationId: __expectString,
2387
+ batchJobIdentifier: (_) => _json(__expectUnion(_)),
2388
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2389
+ executionId: __expectString,
2390
+ jobId: __expectString,
2391
+ jobName: __expectString,
2392
+ jobType: __expectString,
2393
+ returnCode: __expectString,
2394
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2395
+ status: __expectString,
2396
+ });
2802
2397
  };
2803
2398
  const de_BatchJobExecutionSummaryList = (output, context) => {
2804
2399
  const retVal = (output || [])
2805
2400
  .filter((e) => e != null)
2806
2401
  .map((entry) => {
2807
- if (entry === null) {
2808
- return null;
2809
- }
2810
2402
  return de_BatchJobExecutionSummary(entry, context);
2811
2403
  });
2812
2404
  return retVal;
2813
2405
  };
2814
- const de_BatchJobIdentifier = (output, context) => {
2815
- if (output.fileBatchJobIdentifier != null) {
2816
- return {
2817
- fileBatchJobIdentifier: de_FileBatchJobIdentifier(output.fileBatchJobIdentifier, context),
2818
- };
2819
- }
2820
- if (output.scriptBatchJobIdentifier != null) {
2821
- return {
2822
- scriptBatchJobIdentifier: de_ScriptBatchJobIdentifier(output.scriptBatchJobIdentifier, context),
2823
- };
2824
- }
2825
- return { $unknown: Object.entries(output)[0] };
2826
- };
2827
- const de_DatasetDetailOrgAttributes = (output, context) => {
2828
- if (output.gdg != null) {
2829
- return {
2830
- gdg: de_GdgDetailAttributes(output.gdg, context),
2831
- };
2832
- }
2833
- if (output.vsam != null) {
2834
- return {
2835
- vsam: de_VsamDetailAttributes(output.vsam, context),
2836
- };
2837
- }
2838
- return { $unknown: Object.entries(output)[0] };
2839
- };
2840
- const de_DataSetImportSummary = (output, context) => {
2841
- return {
2842
- failed: __expectInt32(output.failed),
2843
- inProgress: __expectInt32(output.inProgress),
2844
- pending: __expectInt32(output.pending),
2845
- succeeded: __expectInt32(output.succeeded),
2846
- total: __expectInt32(output.total),
2847
- };
2848
- };
2849
- const de_DataSetImportTask = (output, context) => {
2850
- return {
2851
- status: __expectString(output.status),
2852
- summary: output.summary != null ? de_DataSetImportSummary(output.summary, context) : undefined,
2853
- taskId: __expectString(output.taskId),
2854
- };
2855
- };
2856
- const de_DataSetImportTaskList = (output, context) => {
2857
- const retVal = (output || [])
2858
- .filter((e) => e != null)
2859
- .map((entry) => {
2860
- if (entry === null) {
2861
- return null;
2862
- }
2863
- return de_DataSetImportTask(entry, context);
2864
- });
2865
- return retVal;
2866
- };
2867
2406
  const de_DataSetsSummaryList = (output, context) => {
2868
2407
  const retVal = (output || [])
2869
2408
  .filter((e) => e != null)
2870
2409
  .map((entry) => {
2871
- if (entry === null) {
2872
- return null;
2873
- }
2874
2410
  return de_DataSetSummary(entry, context);
2875
2411
  });
2876
2412
  return retVal;
2877
2413
  };
2878
2414
  const de_DataSetSummary = (output, context) => {
2879
- return {
2880
- creationTime: output.creationTime != null
2881
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2882
- : undefined,
2883
- dataSetName: __expectString(output.dataSetName),
2884
- dataSetOrg: __expectString(output.dataSetOrg),
2885
- format: __expectString(output.format),
2886
- lastReferencedTime: output.lastReferencedTime != null
2887
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastReferencedTime)))
2888
- : undefined,
2889
- lastUpdatedTime: output.lastUpdatedTime != null
2890
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime)))
2891
- : undefined,
2892
- };
2893
- };
2894
- const de_DeployedVersionSummary = (output, context) => {
2895
- return {
2896
- applicationVersion: __expectInt32(output.applicationVersion),
2897
- status: __expectString(output.status),
2898
- statusReason: __expectString(output.statusReason),
2899
- };
2415
+ return take(output, {
2416
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2417
+ dataSetName: __expectString,
2418
+ dataSetOrg: __expectString,
2419
+ format: __expectString,
2420
+ lastReferencedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2421
+ lastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2422
+ });
2900
2423
  };
2901
2424
  const de_DeploymentList = (output, context) => {
2902
2425
  const retVal = (output || [])
2903
2426
  .filter((e) => e != null)
2904
2427
  .map((entry) => {
2905
- if (entry === null) {
2906
- return null;
2907
- }
2908
2428
  return de_DeploymentSummary(entry, context);
2909
2429
  });
2910
2430
  return retVal;
2911
2431
  };
2912
2432
  const de_DeploymentSummary = (output, context) => {
2913
- return {
2914
- applicationId: __expectString(output.applicationId),
2915
- applicationVersion: __expectInt32(output.applicationVersion),
2916
- creationTime: output.creationTime != null
2917
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2918
- : undefined,
2919
- deploymentId: __expectString(output.deploymentId),
2920
- environmentId: __expectString(output.environmentId),
2921
- status: __expectString(output.status),
2922
- statusReason: __expectString(output.statusReason),
2923
- };
2433
+ return take(output, {
2434
+ applicationId: __expectString,
2435
+ applicationVersion: __expectInt32,
2436
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2437
+ deploymentId: __expectString,
2438
+ environmentId: __expectString,
2439
+ status: __expectString,
2440
+ statusReason: __expectString,
2441
+ });
2924
2442
  };
2925
2443
  const de_EfsStorageConfiguration = (output, context) => {
2926
- return {
2927
- fileSystemId: __expectString(output["file-system-id"]),
2928
- mountPoint: __expectString(output["mount-point"]),
2929
- };
2930
- };
2931
- const de_EngineVersionsSummary = (output, context) => {
2932
- return {
2933
- engineType: __expectString(output.engineType),
2934
- engineVersion: __expectString(output.engineVersion),
2935
- };
2936
- };
2937
- const de_EngineVersionsSummaryList = (output, context) => {
2938
- const retVal = (output || [])
2939
- .filter((e) => e != null)
2940
- .map((entry) => {
2941
- if (entry === null) {
2942
- return null;
2943
- }
2944
- return de_EngineVersionsSummary(entry, context);
2444
+ return take(output, {
2445
+ fileSystemId: [, __expectString, `file-system-id`],
2446
+ mountPoint: [, __expectString, `mount-point`],
2945
2447
  });
2946
- return retVal;
2947
2448
  };
2948
2449
  const de_EnvironmentSummary = (output, context) => {
2949
- return {
2950
- creationTime: output.creationTime != null
2951
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2952
- : undefined,
2953
- engineType: __expectString(output.engineType),
2954
- engineVersion: __expectString(output.engineVersion),
2955
- environmentArn: __expectString(output.environmentArn),
2956
- environmentId: __expectString(output.environmentId),
2957
- instanceType: __expectString(output.instanceType),
2958
- name: __expectString(output.name),
2959
- status: __expectString(output.status),
2960
- };
2450
+ return take(output, {
2451
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2452
+ engineType: __expectString,
2453
+ engineVersion: __expectString,
2454
+ environmentArn: __expectString,
2455
+ environmentId: __expectString,
2456
+ instanceType: __expectString,
2457
+ name: __expectString,
2458
+ status: __expectString,
2459
+ });
2961
2460
  };
2962
2461
  const de_EnvironmentSummaryList = (output, context) => {
2963
2462
  const retVal = (output || [])
2964
2463
  .filter((e) => e != null)
2965
2464
  .map((entry) => {
2966
- if (entry === null) {
2967
- return null;
2968
- }
2969
2465
  return de_EnvironmentSummary(entry, context);
2970
2466
  });
2971
2467
  return retVal;
2972
2468
  };
2973
- const de_FileBatchJobDefinition = (output, context) => {
2974
- return {
2975
- fileName: __expectString(output.fileName),
2976
- folderPath: __expectString(output.folderPath),
2977
- };
2978
- };
2979
- const de_FileBatchJobIdentifier = (output, context) => {
2980
- return {
2981
- fileName: __expectString(output.fileName),
2982
- folderPath: __expectString(output.folderPath),
2983
- };
2984
- };
2985
2469
  const de_FsxStorageConfiguration = (output, context) => {
2986
- return {
2987
- fileSystemId: __expectString(output["file-system-id"]),
2988
- mountPoint: __expectString(output["mount-point"]),
2989
- };
2990
- };
2991
- const de_GdgDetailAttributes = (output, context) => {
2992
- return {
2993
- limit: __expectInt32(output.limit),
2994
- rollDisposition: __expectString(output.rollDisposition),
2995
- };
2996
- };
2997
- const de_HighAvailabilityConfig = (output, context) => {
2998
- return {
2999
- desiredCapacity: __expectInt32(output.desiredCapacity),
3000
- };
3001
- };
3002
- const de_LogGroupSummaries = (output, context) => {
3003
- const retVal = (output || [])
3004
- .filter((e) => e != null)
3005
- .map((entry) => {
3006
- if (entry === null) {
3007
- return null;
3008
- }
3009
- return de_LogGroupSummary(entry, context);
2470
+ return take(output, {
2471
+ fileSystemId: [, __expectString, `file-system-id`],
2472
+ mountPoint: [, __expectString, `mount-point`],
3010
2473
  });
3011
- return retVal;
3012
- };
3013
- const de_LogGroupSummary = (output, context) => {
3014
- return {
3015
- logGroupName: __expectString(output.logGroupName),
3016
- logType: __expectString(output.logType),
3017
- };
3018
2474
  };
3019
2475
  const de_MaintenanceSchedule = (output, context) => {
3020
- return {
3021
- endTime: output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined,
3022
- startTime: output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
3023
- };
2476
+ return take(output, {
2477
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2478
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2479
+ });
3024
2480
  };
3025
2481
  const de_PendingMaintenance = (output, context) => {
3026
- return {
3027
- engineVersion: __expectString(output.engineVersion),
3028
- schedule: output.schedule != null ? de_MaintenanceSchedule(output.schedule, context) : undefined,
3029
- };
3030
- };
3031
- const de_PortList = (output, context) => {
3032
- const retVal = (output || [])
3033
- .filter((e) => e != null)
3034
- .map((entry) => {
3035
- if (entry === null) {
3036
- return null;
3037
- }
3038
- return __expectInt32(entry);
2482
+ return take(output, {
2483
+ engineVersion: __expectString,
2484
+ schedule: (_) => de_MaintenanceSchedule(_, context),
3039
2485
  });
3040
- return retVal;
3041
- };
3042
- const de_PrimaryKey = (output, context) => {
3043
- return {
3044
- length: __expectInt32(output.length),
3045
- name: __expectString(output.name),
3046
- offset: __expectInt32(output.offset),
3047
- };
3048
- };
3049
- const de_ScriptBatchJobDefinition = (output, context) => {
3050
- return {
3051
- scriptName: __expectString(output.scriptName),
3052
- };
3053
- };
3054
- const de_ScriptBatchJobIdentifier = (output, context) => {
3055
- return {
3056
- scriptName: __expectString(output.scriptName),
3057
- };
3058
2486
  };
3059
2487
  const de_StorageConfiguration = (output, context) => {
3060
2488
  if (output.efs != null) {
@@ -3073,60 +2501,10 @@ const de_StorageConfigurationList = (output, context) => {
3073
2501
  const retVal = (output || [])
3074
2502
  .filter((e) => e != null)
3075
2503
  .map((entry) => {
3076
- if (entry === null) {
3077
- return null;
3078
- }
3079
2504
  return de_StorageConfiguration(__expectUnion(entry), context);
3080
2505
  });
3081
2506
  return retVal;
3082
2507
  };
3083
- const de_String50List = (output, context) => {
3084
- const retVal = (output || [])
3085
- .filter((e) => e != null)
3086
- .map((entry) => {
3087
- if (entry === null) {
3088
- return null;
3089
- }
3090
- return __expectString(entry);
3091
- });
3092
- return retVal;
3093
- };
3094
- const de_TagMap = (output, context) => {
3095
- return Object.entries(output).reduce((acc, [key, value]) => {
3096
- if (value === null) {
3097
- return acc;
3098
- }
3099
- acc[key] = __expectString(value);
3100
- return acc;
3101
- }, {});
3102
- };
3103
- const de_ValidationExceptionField = (output, context) => {
3104
- return {
3105
- message: __expectString(output.message),
3106
- name: __expectString(output.name),
3107
- };
3108
- };
3109
- const de_ValidationExceptionFieldList = (output, context) => {
3110
- const retVal = (output || [])
3111
- .filter((e) => e != null)
3112
- .map((entry) => {
3113
- if (entry === null) {
3114
- return null;
3115
- }
3116
- return de_ValidationExceptionField(entry, context);
3117
- });
3118
- return retVal;
3119
- };
3120
- const de_VsamDetailAttributes = (output, context) => {
3121
- return {
3122
- alternateKeys: output.alternateKeys != null ? de_AlternateKeyList(output.alternateKeys, context) : undefined,
3123
- cacheAtStartup: __expectBoolean(output.cacheAtStartup),
3124
- compressed: __expectBoolean(output.compressed),
3125
- encoding: __expectString(output.encoding),
3126
- primaryKey: output.primaryKey != null ? de_PrimaryKey(output.primaryKey, context) : undefined,
3127
- recordFormat: __expectString(output.recordFormat),
3128
- };
3129
- };
3130
2508
  const deserializeMetadata = (output) => ({
3131
2509
  httpStatusCode: output.statusCode,
3132
2510
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],