@aws-sdk/client-m2 3.312.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.
@@ -33,15 +33,15 @@ const se_CreateApplicationCommand = async (input, context) => {
33
33
  };
34
34
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
35
35
  let body;
36
- body = JSON.stringify({
37
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
38
- ...(input.definition != null && { definition: se_Definition(input.definition, context) }),
39
- ...(input.description != null && { description: input.description }),
40
- ...(input.engineType != null && { engineType: input.engineType }),
41
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
42
- ...(input.name != null && { name: input.name }),
43
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
44
- });
36
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
37
+ clientToken: (_) => _ ?? (0, uuid_1.v4)(),
38
+ definition: (_) => (0, smithy_client_1._json)(_),
39
+ description: [],
40
+ engineType: [],
41
+ kmsKeyId: [],
42
+ name: [],
43
+ tags: (_) => (0, smithy_client_1._json)(_),
44
+ }));
45
45
  return new protocol_http_1.HttpRequest({
46
46
  protocol,
47
47
  hostname,
@@ -62,10 +62,10 @@ const se_CreateDataSetImportTaskCommand = async (input, context) => {
62
62
  "/applications/{applicationId}/dataset-import-task";
63
63
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
64
64
  let body;
65
- body = JSON.stringify({
66
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
67
- ...(input.importConfig != null && { importConfig: se_DataSetImportConfig(input.importConfig, context) }),
68
- });
65
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
66
+ clientToken: (_) => _ ?? (0, uuid_1.v4)(),
67
+ importConfig: (_) => (0, smithy_client_1._json)(_),
68
+ }));
69
69
  return new protocol_http_1.HttpRequest({
70
70
  protocol,
71
71
  hostname,
@@ -85,11 +85,11 @@ const se_CreateDeploymentCommand = async (input, context) => {
85
85
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/deployments";
86
86
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
87
87
  let body;
88
- body = JSON.stringify({
89
- ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }),
90
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
91
- ...(input.environmentId != null && { environmentId: input.environmentId }),
92
- });
88
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
89
+ applicationVersion: [],
90
+ clientToken: (_) => _ ?? (0, uuid_1.v4)(),
91
+ environmentId: [],
92
+ }));
93
93
  return new protocol_http_1.HttpRequest({
94
94
  protocol,
95
95
  hostname,
@@ -108,26 +108,22 @@ const se_CreateEnvironmentCommand = async (input, context) => {
108
108
  };
109
109
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
110
110
  let body;
111
- body = JSON.stringify({
112
- clientToken: input.clientToken ?? (0, uuid_1.v4)(),
113
- ...(input.description != null && { description: input.description }),
114
- ...(input.engineType != null && { engineType: input.engineType }),
115
- ...(input.engineVersion != null && { engineVersion: input.engineVersion }),
116
- ...(input.highAvailabilityConfig != null && {
117
- highAvailabilityConfig: se_HighAvailabilityConfig(input.highAvailabilityConfig, context),
118
- }),
119
- ...(input.instanceType != null && { instanceType: input.instanceType }),
120
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
121
- ...(input.name != null && { name: input.name }),
122
- ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }),
123
- ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }),
124
- ...(input.securityGroupIds != null && { securityGroupIds: se_String50List(input.securityGroupIds, context) }),
125
- ...(input.storageConfigurations != null && {
126
- storageConfigurations: se_StorageConfigurationList(input.storageConfigurations, context),
127
- }),
128
- ...(input.subnetIds != null && { subnetIds: se_String50List(input.subnetIds, context) }),
129
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
130
- });
111
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
112
+ clientToken: (_) => _ ?? (0, uuid_1.v4)(),
113
+ description: [],
114
+ engineType: [],
115
+ engineVersion: [],
116
+ highAvailabilityConfig: (_) => (0, smithy_client_1._json)(_),
117
+ instanceType: [],
118
+ kmsKeyId: [],
119
+ name: [],
120
+ preferredMaintenanceWindow: [],
121
+ publiclyAccessible: [],
122
+ securityGroupIds: (_) => (0, smithy_client_1._json)(_),
123
+ storageConfigurations: (_) => se_StorageConfigurationList(_, context),
124
+ subnetIds: (_) => (0, smithy_client_1._json)(_),
125
+ tags: (_) => (0, smithy_client_1._json)(_),
126
+ }));
131
127
  return new protocol_http_1.HttpRequest({
132
128
  protocol,
133
129
  hostname,
@@ -325,7 +321,7 @@ const se_ListApplicationsCommand = async (input, context) => {
325
321
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
326
322
  const headers = {};
327
323
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
328
- const query = map({
324
+ const query = (0, smithy_client_1.map)({
329
325
  nextToken: [, input.nextToken],
330
326
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
331
327
  names: [() => input.names !== void 0, () => (input.names || []).map((_entry) => _entry)],
@@ -349,7 +345,7 @@ const se_ListApplicationVersionsCommand = async (input, context) => {
349
345
  const headers = {};
350
346
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/versions";
351
347
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
352
- const query = map({
348
+ const query = (0, smithy_client_1.map)({
353
349
  nextToken: [, input.nextToken],
354
350
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
355
351
  });
@@ -372,7 +368,7 @@ const se_ListBatchJobDefinitionsCommand = async (input, context) => {
372
368
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
373
369
  "/applications/{applicationId}/batch-job-definitions";
374
370
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
375
- const query = map({
371
+ const query = (0, smithy_client_1.map)({
376
372
  nextToken: [, input.nextToken],
377
373
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
378
374
  prefix: [, input.prefix],
@@ -396,7 +392,7 @@ const se_ListBatchJobExecutionsCommand = async (input, context) => {
396
392
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
397
393
  "/applications/{applicationId}/batch-job-executions";
398
394
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
399
- const query = map({
395
+ const query = (0, smithy_client_1.map)({
400
396
  nextToken: [, input.nextToken],
401
397
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
402
398
  executionIds: [
@@ -433,7 +429,7 @@ const se_ListDataSetImportHistoryCommand = async (input, context) => {
433
429
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
434
430
  "/applications/{applicationId}/dataset-import-tasks";
435
431
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
436
- const query = map({
432
+ const query = (0, smithy_client_1.map)({
437
433
  nextToken: [, input.nextToken],
438
434
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
439
435
  });
@@ -455,7 +451,7 @@ const se_ListDataSetsCommand = async (input, context) => {
455
451
  const headers = {};
456
452
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/datasets";
457
453
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
458
- const query = map({
454
+ const query = (0, smithy_client_1.map)({
459
455
  nextToken: [, input.nextToken],
460
456
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
461
457
  prefix: [, input.prefix],
@@ -478,7 +474,7 @@ const se_ListDeploymentsCommand = async (input, context) => {
478
474
  const headers = {};
479
475
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/deployments";
480
476
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
481
- const query = map({
477
+ const query = (0, smithy_client_1.map)({
482
478
  nextToken: [, input.nextToken],
483
479
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
484
480
  });
@@ -499,7 +495,7 @@ const se_ListEngineVersionsCommand = async (input, context) => {
499
495
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
500
496
  const headers = {};
501
497
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/engine-versions";
502
- const query = map({
498
+ const query = (0, smithy_client_1.map)({
503
499
  engineType: [, input.engineType],
504
500
  nextToken: [, input.nextToken],
505
501
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
@@ -521,7 +517,7 @@ const se_ListEnvironmentsCommand = async (input, context) => {
521
517
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
522
518
  const headers = {};
523
519
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
524
- const query = map({
520
+ const query = (0, smithy_client_1.map)({
525
521
  nextToken: [, input.nextToken],
526
522
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
527
523
  names: [() => input.names !== void 0, () => (input.names || []).map((_entry) => _entry)],
@@ -582,12 +578,10 @@ const se_StartBatchJobCommand = async (input, context) => {
582
578
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/batch-job";
583
579
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
584
580
  let body;
585
- body = JSON.stringify({
586
- ...(input.batchJobIdentifier != null && {
587
- batchJobIdentifier: se_BatchJobIdentifier(input.batchJobIdentifier, context),
588
- }),
589
- ...(input.jobParams != null && { jobParams: se_BatchJobParametersMap(input.jobParams, context) }),
590
- });
581
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
582
+ batchJobIdentifier: (_) => (0, smithy_client_1._json)(_),
583
+ jobParams: (_) => (0, smithy_client_1._json)(_),
584
+ }));
591
585
  return new protocol_http_1.HttpRequest({
592
586
  protocol,
593
587
  hostname,
@@ -607,9 +601,9 @@ const se_StopApplicationCommand = async (input, context) => {
607
601
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/stop";
608
602
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
609
603
  let body;
610
- body = JSON.stringify({
611
- ...(input.forceStop != null && { forceStop: input.forceStop }),
612
- });
604
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
605
+ forceStop: [],
606
+ }));
613
607
  return new protocol_http_1.HttpRequest({
614
608
  protocol,
615
609
  hostname,
@@ -629,9 +623,9 @@ const se_TagResourceCommand = async (input, context) => {
629
623
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
630
624
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
631
625
  let body;
632
- body = JSON.stringify({
633
- ...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
634
- });
626
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
627
+ tags: (_) => (0, smithy_client_1._json)(_),
628
+ }));
635
629
  return new protocol_http_1.HttpRequest({
636
630
  protocol,
637
631
  hostname,
@@ -648,7 +642,7 @@ const se_UntagResourceCommand = async (input, context) => {
648
642
  const headers = {};
649
643
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
650
644
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
651
- const query = map({
645
+ const query = (0, smithy_client_1.map)({
652
646
  tagKeys: [
653
647
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
654
648
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -675,11 +669,11 @@ const se_UpdateApplicationCommand = async (input, context) => {
675
669
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
676
670
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
677
671
  let body;
678
- body = JSON.stringify({
679
- ...(input.currentApplicationVersion != null && { currentApplicationVersion: input.currentApplicationVersion }),
680
- ...(input.definition != null && { definition: se_Definition(input.definition, context) }),
681
- ...(input.description != null && { description: input.description }),
682
- });
672
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
673
+ currentApplicationVersion: [],
674
+ definition: (_) => (0, smithy_client_1._json)(_),
675
+ description: [],
676
+ }));
683
677
  return new protocol_http_1.HttpRequest({
684
678
  protocol,
685
679
  hostname,
@@ -699,15 +693,13 @@ const se_UpdateEnvironmentCommand = async (input, context) => {
699
693
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{environmentId}";
700
694
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "environmentId", () => input.environmentId, "{environmentId}", false);
701
695
  let body;
702
- body = JSON.stringify({
703
- ...(input.applyDuringMaintenanceWindow != null && {
704
- applyDuringMaintenanceWindow: input.applyDuringMaintenanceWindow,
705
- }),
706
- ...(input.desiredCapacity != null && { desiredCapacity: input.desiredCapacity }),
707
- ...(input.engineVersion != null && { engineVersion: input.engineVersion }),
708
- ...(input.instanceType != null && { instanceType: input.instanceType }),
709
- ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }),
710
- });
696
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
697
+ applyDuringMaintenanceWindow: [],
698
+ desiredCapacity: [],
699
+ engineVersion: [],
700
+ instanceType: [],
701
+ preferredMaintenanceWindow: [],
702
+ }));
711
703
  return new protocol_http_1.HttpRequest({
712
704
  protocol,
713
705
  hostname,
@@ -723,7 +715,7 @@ const de_CancelBatchJobExecutionCommand = async (output, context) => {
723
715
  if (output.statusCode !== 200 && output.statusCode >= 300) {
724
716
  return de_CancelBatchJobExecutionCommandError(output, context);
725
717
  }
726
- const contents = map({
718
+ const contents = (0, smithy_client_1.map)({
727
719
  $metadata: deserializeMetadata(output),
728
720
  });
729
721
  await collectBody(output.body, context);
@@ -757,10 +749,9 @@ const de_CancelBatchJobExecutionCommandError = async (output, context) => {
757
749
  throw await de_ValidationExceptionRes(parsedOutput, context);
758
750
  default:
759
751
  const parsedBody = parsedOutput.body;
760
- (0, smithy_client_1.throwDefaultError)({
752
+ return throwDefaultError({
761
753
  output,
762
754
  parsedBody,
763
- exceptionCtor: M2ServiceException_1.M2ServiceException,
764
755
  errorCode,
765
756
  });
766
757
  }
@@ -769,19 +760,16 @@ const de_CreateApplicationCommand = async (output, context) => {
769
760
  if (output.statusCode !== 200 && output.statusCode >= 300) {
770
761
  return de_CreateApplicationCommandError(output, context);
771
762
  }
772
- const contents = map({
763
+ const contents = (0, smithy_client_1.map)({
773
764
  $metadata: deserializeMetadata(output),
774
765
  });
775
766
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
776
- if (data.applicationArn != null) {
777
- contents.applicationArn = (0, smithy_client_1.expectString)(data.applicationArn);
778
- }
779
- if (data.applicationId != null) {
780
- contents.applicationId = (0, smithy_client_1.expectString)(data.applicationId);
781
- }
782
- if (data.applicationVersion != null) {
783
- contents.applicationVersion = (0, smithy_client_1.expectInt32)(data.applicationVersion);
784
- }
767
+ const doc = (0, smithy_client_1.take)(data, {
768
+ applicationArn: smithy_client_1.expectString,
769
+ applicationId: smithy_client_1.expectString,
770
+ applicationVersion: smithy_client_1.expectInt32,
771
+ });
772
+ Object.assign(contents, doc);
785
773
  return contents;
786
774
  };
787
775
  exports.de_CreateApplicationCommand = de_CreateApplicationCommand;
@@ -812,10 +800,9 @@ const de_CreateApplicationCommandError = async (output, context) => {
812
800
  throw await de_ValidationExceptionRes(parsedOutput, context);
813
801
  default:
814
802
  const parsedBody = parsedOutput.body;
815
- (0, smithy_client_1.throwDefaultError)({
803
+ return throwDefaultError({
816
804
  output,
817
805
  parsedBody,
818
- exceptionCtor: M2ServiceException_1.M2ServiceException,
819
806
  errorCode,
820
807
  });
821
808
  }
@@ -824,13 +811,14 @@ const de_CreateDataSetImportTaskCommand = async (output, context) => {
824
811
  if (output.statusCode !== 200 && output.statusCode >= 300) {
825
812
  return de_CreateDataSetImportTaskCommandError(output, context);
826
813
  }
827
- const contents = map({
814
+ const contents = (0, smithy_client_1.map)({
828
815
  $metadata: deserializeMetadata(output),
829
816
  });
830
817
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
831
- if (data.taskId != null) {
832
- contents.taskId = (0, smithy_client_1.expectString)(data.taskId);
833
- }
818
+ const doc = (0, smithy_client_1.take)(data, {
819
+ taskId: smithy_client_1.expectString,
820
+ });
821
+ Object.assign(contents, doc);
834
822
  return contents;
835
823
  };
836
824
  exports.de_CreateDataSetImportTaskCommand = de_CreateDataSetImportTaskCommand;
@@ -864,10 +852,9 @@ const de_CreateDataSetImportTaskCommandError = async (output, context) => {
864
852
  throw await de_ValidationExceptionRes(parsedOutput, context);
865
853
  default:
866
854
  const parsedBody = parsedOutput.body;
867
- (0, smithy_client_1.throwDefaultError)({
855
+ return throwDefaultError({
868
856
  output,
869
857
  parsedBody,
870
- exceptionCtor: M2ServiceException_1.M2ServiceException,
871
858
  errorCode,
872
859
  });
873
860
  }
@@ -876,13 +863,14 @@ const de_CreateDeploymentCommand = async (output, context) => {
876
863
  if (output.statusCode !== 200 && output.statusCode >= 300) {
877
864
  return de_CreateDeploymentCommandError(output, context);
878
865
  }
879
- const contents = map({
866
+ const contents = (0, smithy_client_1.map)({
880
867
  $metadata: deserializeMetadata(output),
881
868
  });
882
869
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
883
- if (data.deploymentId != null) {
884
- contents.deploymentId = (0, smithy_client_1.expectString)(data.deploymentId);
885
- }
870
+ const doc = (0, smithy_client_1.take)(data, {
871
+ deploymentId: smithy_client_1.expectString,
872
+ });
873
+ Object.assign(contents, doc);
886
874
  return contents;
887
875
  };
888
876
  exports.de_CreateDeploymentCommand = de_CreateDeploymentCommand;
@@ -916,10 +904,9 @@ const de_CreateDeploymentCommandError = async (output, context) => {
916
904
  throw await de_ValidationExceptionRes(parsedOutput, context);
917
905
  default:
918
906
  const parsedBody = parsedOutput.body;
919
- (0, smithy_client_1.throwDefaultError)({
907
+ return throwDefaultError({
920
908
  output,
921
909
  parsedBody,
922
- exceptionCtor: M2ServiceException_1.M2ServiceException,
923
910
  errorCode,
924
911
  });
925
912
  }
@@ -928,13 +915,14 @@ const de_CreateEnvironmentCommand = async (output, context) => {
928
915
  if (output.statusCode !== 200 && output.statusCode >= 300) {
929
916
  return de_CreateEnvironmentCommandError(output, context);
930
917
  }
931
- const contents = map({
918
+ const contents = (0, smithy_client_1.map)({
932
919
  $metadata: deserializeMetadata(output),
933
920
  });
934
921
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
935
- if (data.environmentId != null) {
936
- contents.environmentId = (0, smithy_client_1.expectString)(data.environmentId);
937
- }
922
+ const doc = (0, smithy_client_1.take)(data, {
923
+ environmentId: smithy_client_1.expectString,
924
+ });
925
+ Object.assign(contents, doc);
938
926
  return contents;
939
927
  };
940
928
  exports.de_CreateEnvironmentCommand = de_CreateEnvironmentCommand;
@@ -965,10 +953,9 @@ const de_CreateEnvironmentCommandError = async (output, context) => {
965
953
  throw await de_ValidationExceptionRes(parsedOutput, context);
966
954
  default:
967
955
  const parsedBody = parsedOutput.body;
968
- (0, smithy_client_1.throwDefaultError)({
956
+ return throwDefaultError({
969
957
  output,
970
958
  parsedBody,
971
- exceptionCtor: M2ServiceException_1.M2ServiceException,
972
959
  errorCode,
973
960
  });
974
961
  }
@@ -977,7 +964,7 @@ const de_DeleteApplicationCommand = async (output, context) => {
977
964
  if (output.statusCode !== 200 && output.statusCode >= 300) {
978
965
  return de_DeleteApplicationCommandError(output, context);
979
966
  }
980
- const contents = map({
967
+ const contents = (0, smithy_client_1.map)({
981
968
  $metadata: deserializeMetadata(output),
982
969
  });
983
970
  await collectBody(output.body, context);
@@ -1008,10 +995,9 @@ const de_DeleteApplicationCommandError = async (output, context) => {
1008
995
  throw await de_ValidationExceptionRes(parsedOutput, context);
1009
996
  default:
1010
997
  const parsedBody = parsedOutput.body;
1011
- (0, smithy_client_1.throwDefaultError)({
998
+ return throwDefaultError({
1012
999
  output,
1013
1000
  parsedBody,
1014
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1015
1001
  errorCode,
1016
1002
  });
1017
1003
  }
@@ -1020,7 +1006,7 @@ const de_DeleteApplicationFromEnvironmentCommand = async (output, context) => {
1020
1006
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1021
1007
  return de_DeleteApplicationFromEnvironmentCommandError(output, context);
1022
1008
  }
1023
- const contents = map({
1009
+ const contents = (0, smithy_client_1.map)({
1024
1010
  $metadata: deserializeMetadata(output),
1025
1011
  });
1026
1012
  await collectBody(output.body, context);
@@ -1054,10 +1040,9 @@ const de_DeleteApplicationFromEnvironmentCommandError = async (output, context)
1054
1040
  throw await de_ValidationExceptionRes(parsedOutput, context);
1055
1041
  default:
1056
1042
  const parsedBody = parsedOutput.body;
1057
- (0, smithy_client_1.throwDefaultError)({
1043
+ return throwDefaultError({
1058
1044
  output,
1059
1045
  parsedBody,
1060
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1061
1046
  errorCode,
1062
1047
  });
1063
1048
  }
@@ -1066,7 +1051,7 @@ const de_DeleteEnvironmentCommand = async (output, context) => {
1066
1051
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1067
1052
  return de_DeleteEnvironmentCommandError(output, context);
1068
1053
  }
1069
- const contents = map({
1054
+ const contents = (0, smithy_client_1.map)({
1070
1055
  $metadata: deserializeMetadata(output),
1071
1056
  });
1072
1057
  await collectBody(output.body, context);
@@ -1097,10 +1082,9 @@ const de_DeleteEnvironmentCommandError = async (output, context) => {
1097
1082
  throw await de_ValidationExceptionRes(parsedOutput, context);
1098
1083
  default:
1099
1084
  const parsedBody = parsedOutput.body;
1100
- (0, smithy_client_1.throwDefaultError)({
1085
+ return throwDefaultError({
1101
1086
  output,
1102
1087
  parsedBody,
1103
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1104
1088
  errorCode,
1105
1089
  });
1106
1090
  }
@@ -1109,67 +1093,32 @@ const de_GetApplicationCommand = async (output, context) => {
1109
1093
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1110
1094
  return de_GetApplicationCommandError(output, context);
1111
1095
  }
1112
- const contents = map({
1096
+ const contents = (0, smithy_client_1.map)({
1113
1097
  $metadata: deserializeMetadata(output),
1114
1098
  });
1115
1099
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1116
- if (data.applicationArn != null) {
1117
- contents.applicationArn = (0, smithy_client_1.expectString)(data.applicationArn);
1118
- }
1119
- if (data.applicationId != null) {
1120
- contents.applicationId = (0, smithy_client_1.expectString)(data.applicationId);
1121
- }
1122
- if (data.creationTime != null) {
1123
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1124
- }
1125
- if (data.deployedVersion != null) {
1126
- contents.deployedVersion = de_DeployedVersionSummary(data.deployedVersion, context);
1127
- }
1128
- if (data.description != null) {
1129
- contents.description = (0, smithy_client_1.expectString)(data.description);
1130
- }
1131
- if (data.engineType != null) {
1132
- contents.engineType = (0, smithy_client_1.expectString)(data.engineType);
1133
- }
1134
- if (data.environmentId != null) {
1135
- contents.environmentId = (0, smithy_client_1.expectString)(data.environmentId);
1136
- }
1137
- if (data.kmsKeyId != null) {
1138
- contents.kmsKeyId = (0, smithy_client_1.expectString)(data.kmsKeyId);
1139
- }
1140
- if (data.lastStartTime != null) {
1141
- contents.lastStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastStartTime)));
1142
- }
1143
- if (data.latestVersion != null) {
1144
- contents.latestVersion = de_ApplicationVersionSummary(data.latestVersion, context);
1145
- }
1146
- if (data.listenerArns != null) {
1147
- contents.listenerArns = de_ArnList(data.listenerArns, context);
1148
- }
1149
- if (data.listenerPorts != null) {
1150
- contents.listenerPorts = de_PortList(data.listenerPorts, context);
1151
- }
1152
- if (data.loadBalancerDnsName != null) {
1153
- contents.loadBalancerDnsName = (0, smithy_client_1.expectString)(data.loadBalancerDnsName);
1154
- }
1155
- if (data.logGroups != null) {
1156
- contents.logGroups = de_LogGroupSummaries(data.logGroups, context);
1157
- }
1158
- if (data.name != null) {
1159
- contents.name = (0, smithy_client_1.expectString)(data.name);
1160
- }
1161
- if (data.status != null) {
1162
- contents.status = (0, smithy_client_1.expectString)(data.status);
1163
- }
1164
- if (data.statusReason != null) {
1165
- contents.statusReason = (0, smithy_client_1.expectString)(data.statusReason);
1166
- }
1167
- if (data.tags != null) {
1168
- contents.tags = de_TagMap(data.tags, context);
1169
- }
1170
- if (data.targetGroupArns != null) {
1171
- contents.targetGroupArns = de_ArnList(data.targetGroupArns, context);
1172
- }
1100
+ const doc = (0, smithy_client_1.take)(data, {
1101
+ applicationArn: smithy_client_1.expectString,
1102
+ applicationId: smithy_client_1.expectString,
1103
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1104
+ deployedVersion: smithy_client_1._json,
1105
+ description: smithy_client_1.expectString,
1106
+ engineType: smithy_client_1.expectString,
1107
+ environmentId: smithy_client_1.expectString,
1108
+ kmsKeyId: smithy_client_1.expectString,
1109
+ lastStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1110
+ latestVersion: (_) => de_ApplicationVersionSummary(_, context),
1111
+ listenerArns: smithy_client_1._json,
1112
+ listenerPorts: smithy_client_1._json,
1113
+ loadBalancerDnsName: smithy_client_1.expectString,
1114
+ logGroups: smithy_client_1._json,
1115
+ name: smithy_client_1.expectString,
1116
+ status: smithy_client_1.expectString,
1117
+ statusReason: smithy_client_1.expectString,
1118
+ tags: smithy_client_1._json,
1119
+ targetGroupArns: smithy_client_1._json,
1120
+ });
1121
+ Object.assign(contents, doc);
1173
1122
  return contents;
1174
1123
  };
1175
1124
  exports.de_GetApplicationCommand = de_GetApplicationCommand;
@@ -1197,10 +1146,9 @@ const de_GetApplicationCommandError = async (output, context) => {
1197
1146
  throw await de_ValidationExceptionRes(parsedOutput, context);
1198
1147
  default:
1199
1148
  const parsedBody = parsedOutput.body;
1200
- (0, smithy_client_1.throwDefaultError)({
1149
+ return throwDefaultError({
1201
1150
  output,
1202
1151
  parsedBody,
1203
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1204
1152
  errorCode,
1205
1153
  });
1206
1154
  }
@@ -1209,31 +1157,20 @@ const de_GetApplicationVersionCommand = async (output, context) => {
1209
1157
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1210
1158
  return de_GetApplicationVersionCommandError(output, context);
1211
1159
  }
1212
- const contents = map({
1160
+ const contents = (0, smithy_client_1.map)({
1213
1161
  $metadata: deserializeMetadata(output),
1214
1162
  });
1215
1163
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1216
- if (data.applicationVersion != null) {
1217
- contents.applicationVersion = (0, smithy_client_1.expectInt32)(data.applicationVersion);
1218
- }
1219
- if (data.creationTime != null) {
1220
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1221
- }
1222
- if (data.definitionContent != null) {
1223
- contents.definitionContent = (0, smithy_client_1.expectString)(data.definitionContent);
1224
- }
1225
- if (data.description != null) {
1226
- contents.description = (0, smithy_client_1.expectString)(data.description);
1227
- }
1228
- if (data.name != null) {
1229
- contents.name = (0, smithy_client_1.expectString)(data.name);
1230
- }
1231
- if (data.status != null) {
1232
- contents.status = (0, smithy_client_1.expectString)(data.status);
1233
- }
1234
- if (data.statusReason != null) {
1235
- contents.statusReason = (0, smithy_client_1.expectString)(data.statusReason);
1236
- }
1164
+ const doc = (0, smithy_client_1.take)(data, {
1165
+ applicationVersion: smithy_client_1.expectInt32,
1166
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1167
+ definitionContent: smithy_client_1.expectString,
1168
+ description: smithy_client_1.expectString,
1169
+ name: smithy_client_1.expectString,
1170
+ status: smithy_client_1.expectString,
1171
+ statusReason: smithy_client_1.expectString,
1172
+ });
1173
+ Object.assign(contents, doc);
1237
1174
  return contents;
1238
1175
  };
1239
1176
  exports.de_GetApplicationVersionCommand = de_GetApplicationVersionCommand;
@@ -1261,10 +1198,9 @@ const de_GetApplicationVersionCommandError = async (output, context) => {
1261
1198
  throw await de_ValidationExceptionRes(parsedOutput, context);
1262
1199
  default:
1263
1200
  const parsedBody = parsedOutput.body;
1264
- (0, smithy_client_1.throwDefaultError)({
1201
+ return throwDefaultError({
1265
1202
  output,
1266
1203
  parsedBody,
1267
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1268
1204
  errorCode,
1269
1205
  });
1270
1206
  }
@@ -1273,46 +1209,25 @@ const de_GetBatchJobExecutionCommand = async (output, context) => {
1273
1209
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1274
1210
  return de_GetBatchJobExecutionCommandError(output, context);
1275
1211
  }
1276
- const contents = map({
1212
+ const contents = (0, smithy_client_1.map)({
1277
1213
  $metadata: deserializeMetadata(output),
1278
1214
  });
1279
1215
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1280
- if (data.applicationId != null) {
1281
- contents.applicationId = (0, smithy_client_1.expectString)(data.applicationId);
1282
- }
1283
- if (data.batchJobIdentifier != null) {
1284
- contents.batchJobIdentifier = de_BatchJobIdentifier((0, smithy_client_1.expectUnion)(data.batchJobIdentifier), context);
1285
- }
1286
- if (data.endTime != null) {
1287
- contents.endTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.endTime)));
1288
- }
1289
- if (data.executionId != null) {
1290
- contents.executionId = (0, smithy_client_1.expectString)(data.executionId);
1291
- }
1292
- if (data.jobId != null) {
1293
- contents.jobId = (0, smithy_client_1.expectString)(data.jobId);
1294
- }
1295
- if (data.jobName != null) {
1296
- contents.jobName = (0, smithy_client_1.expectString)(data.jobName);
1297
- }
1298
- if (data.jobType != null) {
1299
- contents.jobType = (0, smithy_client_1.expectString)(data.jobType);
1300
- }
1301
- if (data.jobUser != null) {
1302
- contents.jobUser = (0, smithy_client_1.expectString)(data.jobUser);
1303
- }
1304
- if (data.returnCode != null) {
1305
- contents.returnCode = (0, smithy_client_1.expectString)(data.returnCode);
1306
- }
1307
- if (data.startTime != null) {
1308
- contents.startTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.startTime)));
1309
- }
1310
- if (data.status != null) {
1311
- contents.status = (0, smithy_client_1.expectString)(data.status);
1312
- }
1313
- if (data.statusReason != null) {
1314
- contents.statusReason = (0, smithy_client_1.expectString)(data.statusReason);
1315
- }
1216
+ const doc = (0, smithy_client_1.take)(data, {
1217
+ applicationId: smithy_client_1.expectString,
1218
+ batchJobIdentifier: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
1219
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1220
+ executionId: smithy_client_1.expectString,
1221
+ jobId: smithy_client_1.expectString,
1222
+ jobName: smithy_client_1.expectString,
1223
+ jobType: smithy_client_1.expectString,
1224
+ jobUser: smithy_client_1.expectString,
1225
+ returnCode: smithy_client_1.expectString,
1226
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1227
+ status: smithy_client_1.expectString,
1228
+ statusReason: smithy_client_1.expectString,
1229
+ });
1230
+ Object.assign(contents, doc);
1316
1231
  return contents;
1317
1232
  };
1318
1233
  exports.de_GetBatchJobExecutionCommand = de_GetBatchJobExecutionCommand;
@@ -1340,10 +1255,9 @@ const de_GetBatchJobExecutionCommandError = async (output, context) => {
1340
1255
  throw await de_ValidationExceptionRes(parsedOutput, context);
1341
1256
  default:
1342
1257
  const parsedBody = parsedOutput.body;
1343
- (0, smithy_client_1.throwDefaultError)({
1258
+ return throwDefaultError({
1344
1259
  output,
1345
1260
  parsedBody,
1346
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1347
1261
  errorCode,
1348
1262
  });
1349
1263
  }
@@ -1352,34 +1266,21 @@ const de_GetDataSetDetailsCommand = async (output, context) => {
1352
1266
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1353
1267
  return de_GetDataSetDetailsCommandError(output, context);
1354
1268
  }
1355
- const contents = map({
1269
+ const contents = (0, smithy_client_1.map)({
1356
1270
  $metadata: deserializeMetadata(output),
1357
1271
  });
1358
1272
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1359
- if (data.blocksize != null) {
1360
- contents.blocksize = (0, smithy_client_1.expectInt32)(data.blocksize);
1361
- }
1362
- if (data.creationTime != null) {
1363
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1364
- }
1365
- if (data.dataSetName != null) {
1366
- contents.dataSetName = (0, smithy_client_1.expectString)(data.dataSetName);
1367
- }
1368
- if (data.dataSetOrg != null) {
1369
- contents.dataSetOrg = de_DatasetDetailOrgAttributes((0, smithy_client_1.expectUnion)(data.dataSetOrg), context);
1370
- }
1371
- if (data.lastReferencedTime != null) {
1372
- contents.lastReferencedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastReferencedTime)));
1373
- }
1374
- if (data.lastUpdatedTime != null) {
1375
- contents.lastUpdatedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastUpdatedTime)));
1376
- }
1377
- if (data.location != null) {
1378
- contents.location = (0, smithy_client_1.expectString)(data.location);
1379
- }
1380
- if (data.recordLength != null) {
1381
- contents.recordLength = (0, smithy_client_1.expectInt32)(data.recordLength);
1382
- }
1273
+ const doc = (0, smithy_client_1.take)(data, {
1274
+ blocksize: smithy_client_1.expectInt32,
1275
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1276
+ dataSetName: smithy_client_1.expectString,
1277
+ dataSetOrg: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
1278
+ lastReferencedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1279
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1280
+ location: smithy_client_1.expectString,
1281
+ recordLength: smithy_client_1.expectInt32,
1282
+ });
1283
+ Object.assign(contents, doc);
1383
1284
  return contents;
1384
1285
  };
1385
1286
  exports.de_GetDataSetDetailsCommand = de_GetDataSetDetailsCommand;
@@ -1407,10 +1308,9 @@ const de_GetDataSetDetailsCommandError = async (output, context) => {
1407
1308
  throw await de_ValidationExceptionRes(parsedOutput, context);
1408
1309
  default:
1409
1310
  const parsedBody = parsedOutput.body;
1410
- (0, smithy_client_1.throwDefaultError)({
1311
+ return throwDefaultError({
1411
1312
  output,
1412
1313
  parsedBody,
1413
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1414
1314
  errorCode,
1415
1315
  });
1416
1316
  }
@@ -1419,19 +1319,16 @@ const de_GetDataSetImportTaskCommand = async (output, context) => {
1419
1319
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1420
1320
  return de_GetDataSetImportTaskCommandError(output, context);
1421
1321
  }
1422
- const contents = map({
1322
+ const contents = (0, smithy_client_1.map)({
1423
1323
  $metadata: deserializeMetadata(output),
1424
1324
  });
1425
1325
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1426
- if (data.status != null) {
1427
- contents.status = (0, smithy_client_1.expectString)(data.status);
1428
- }
1429
- if (data.summary != null) {
1430
- contents.summary = de_DataSetImportSummary(data.summary, context);
1431
- }
1432
- if (data.taskId != null) {
1433
- contents.taskId = (0, smithy_client_1.expectString)(data.taskId);
1434
- }
1326
+ const doc = (0, smithy_client_1.take)(data, {
1327
+ status: smithy_client_1.expectString,
1328
+ summary: smithy_client_1._json,
1329
+ taskId: smithy_client_1.expectString,
1330
+ });
1331
+ Object.assign(contents, doc);
1435
1332
  return contents;
1436
1333
  };
1437
1334
  exports.de_GetDataSetImportTaskCommand = de_GetDataSetImportTaskCommand;
@@ -1459,10 +1356,9 @@ const de_GetDataSetImportTaskCommandError = async (output, context) => {
1459
1356
  throw await de_ValidationExceptionRes(parsedOutput, context);
1460
1357
  default:
1461
1358
  const parsedBody = parsedOutput.body;
1462
- (0, smithy_client_1.throwDefaultError)({
1359
+ return throwDefaultError({
1463
1360
  output,
1464
1361
  parsedBody,
1465
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1466
1362
  errorCode,
1467
1363
  });
1468
1364
  }
@@ -1471,31 +1367,20 @@ const de_GetDeploymentCommand = async (output, context) => {
1471
1367
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1472
1368
  return de_GetDeploymentCommandError(output, context);
1473
1369
  }
1474
- const contents = map({
1370
+ const contents = (0, smithy_client_1.map)({
1475
1371
  $metadata: deserializeMetadata(output),
1476
1372
  });
1477
1373
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1478
- if (data.applicationId != null) {
1479
- contents.applicationId = (0, smithy_client_1.expectString)(data.applicationId);
1480
- }
1481
- if (data.applicationVersion != null) {
1482
- contents.applicationVersion = (0, smithy_client_1.expectInt32)(data.applicationVersion);
1483
- }
1484
- if (data.creationTime != null) {
1485
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1486
- }
1487
- if (data.deploymentId != null) {
1488
- contents.deploymentId = (0, smithy_client_1.expectString)(data.deploymentId);
1489
- }
1490
- if (data.environmentId != null) {
1491
- contents.environmentId = (0, smithy_client_1.expectString)(data.environmentId);
1492
- }
1493
- if (data.status != null) {
1494
- contents.status = (0, smithy_client_1.expectString)(data.status);
1495
- }
1496
- if (data.statusReason != null) {
1497
- contents.statusReason = (0, smithy_client_1.expectString)(data.statusReason);
1498
- }
1374
+ const doc = (0, smithy_client_1.take)(data, {
1375
+ applicationId: smithy_client_1.expectString,
1376
+ applicationVersion: smithy_client_1.expectInt32,
1377
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1378
+ deploymentId: smithy_client_1.expectString,
1379
+ environmentId: smithy_client_1.expectString,
1380
+ status: smithy_client_1.expectString,
1381
+ statusReason: smithy_client_1.expectString,
1382
+ });
1383
+ Object.assign(contents, doc);
1499
1384
  return contents;
1500
1385
  };
1501
1386
  exports.de_GetDeploymentCommand = de_GetDeploymentCommand;
@@ -1523,10 +1408,9 @@ const de_GetDeploymentCommandError = async (output, context) => {
1523
1408
  throw await de_ValidationExceptionRes(parsedOutput, context);
1524
1409
  default:
1525
1410
  const parsedBody = parsedOutput.body;
1526
- (0, smithy_client_1.throwDefaultError)({
1411
+ return throwDefaultError({
1527
1412
  output,
1528
1413
  parsedBody,
1529
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1530
1414
  errorCode,
1531
1415
  });
1532
1416
  }
@@ -1535,76 +1419,35 @@ const de_GetEnvironmentCommand = async (output, context) => {
1535
1419
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1536
1420
  return de_GetEnvironmentCommandError(output, context);
1537
1421
  }
1538
- const contents = map({
1422
+ const contents = (0, smithy_client_1.map)({
1539
1423
  $metadata: deserializeMetadata(output),
1540
1424
  });
1541
1425
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1542
- if (data.actualCapacity != null) {
1543
- contents.actualCapacity = (0, smithy_client_1.expectInt32)(data.actualCapacity);
1544
- }
1545
- if (data.creationTime != null) {
1546
- contents.creationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.creationTime)));
1547
- }
1548
- if (data.description != null) {
1549
- contents.description = (0, smithy_client_1.expectString)(data.description);
1550
- }
1551
- if (data.engineType != null) {
1552
- contents.engineType = (0, smithy_client_1.expectString)(data.engineType);
1553
- }
1554
- if (data.engineVersion != null) {
1555
- contents.engineVersion = (0, smithy_client_1.expectString)(data.engineVersion);
1556
- }
1557
- if (data.environmentArn != null) {
1558
- contents.environmentArn = (0, smithy_client_1.expectString)(data.environmentArn);
1559
- }
1560
- if (data.environmentId != null) {
1561
- contents.environmentId = (0, smithy_client_1.expectString)(data.environmentId);
1562
- }
1563
- if (data.highAvailabilityConfig != null) {
1564
- contents.highAvailabilityConfig = de_HighAvailabilityConfig(data.highAvailabilityConfig, context);
1565
- }
1566
- if (data.instanceType != null) {
1567
- contents.instanceType = (0, smithy_client_1.expectString)(data.instanceType);
1568
- }
1569
- if (data.kmsKeyId != null) {
1570
- contents.kmsKeyId = (0, smithy_client_1.expectString)(data.kmsKeyId);
1571
- }
1572
- if (data.loadBalancerArn != null) {
1573
- contents.loadBalancerArn = (0, smithy_client_1.expectString)(data.loadBalancerArn);
1574
- }
1575
- if (data.name != null) {
1576
- contents.name = (0, smithy_client_1.expectString)(data.name);
1577
- }
1578
- if (data.pendingMaintenance != null) {
1579
- contents.pendingMaintenance = de_PendingMaintenance(data.pendingMaintenance, context);
1580
- }
1581
- if (data.preferredMaintenanceWindow != null) {
1582
- contents.preferredMaintenanceWindow = (0, smithy_client_1.expectString)(data.preferredMaintenanceWindow);
1583
- }
1584
- if (data.publiclyAccessible != null) {
1585
- contents.publiclyAccessible = (0, smithy_client_1.expectBoolean)(data.publiclyAccessible);
1586
- }
1587
- if (data.securityGroupIds != null) {
1588
- contents.securityGroupIds = de_String50List(data.securityGroupIds, context);
1589
- }
1590
- if (data.status != null) {
1591
- contents.status = (0, smithy_client_1.expectString)(data.status);
1592
- }
1593
- if (data.statusReason != null) {
1594
- contents.statusReason = (0, smithy_client_1.expectString)(data.statusReason);
1595
- }
1596
- if (data.storageConfigurations != null) {
1597
- contents.storageConfigurations = de_StorageConfigurationList(data.storageConfigurations, context);
1598
- }
1599
- if (data.subnetIds != null) {
1600
- contents.subnetIds = de_String50List(data.subnetIds, context);
1601
- }
1602
- if (data.tags != null) {
1603
- contents.tags = de_TagMap(data.tags, context);
1604
- }
1605
- if (data.vpcId != null) {
1606
- contents.vpcId = (0, smithy_client_1.expectString)(data.vpcId);
1607
- }
1426
+ const doc = (0, smithy_client_1.take)(data, {
1427
+ actualCapacity: smithy_client_1.expectInt32,
1428
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1429
+ description: smithy_client_1.expectString,
1430
+ engineType: smithy_client_1.expectString,
1431
+ engineVersion: smithy_client_1.expectString,
1432
+ environmentArn: smithy_client_1.expectString,
1433
+ environmentId: smithy_client_1.expectString,
1434
+ highAvailabilityConfig: smithy_client_1._json,
1435
+ instanceType: smithy_client_1.expectString,
1436
+ kmsKeyId: smithy_client_1.expectString,
1437
+ loadBalancerArn: smithy_client_1.expectString,
1438
+ name: smithy_client_1.expectString,
1439
+ pendingMaintenance: (_) => de_PendingMaintenance(_, context),
1440
+ preferredMaintenanceWindow: smithy_client_1.expectString,
1441
+ publiclyAccessible: smithy_client_1.expectBoolean,
1442
+ securityGroupIds: smithy_client_1._json,
1443
+ status: smithy_client_1.expectString,
1444
+ statusReason: smithy_client_1.expectString,
1445
+ storageConfigurations: (_) => de_StorageConfigurationList(_, context),
1446
+ subnetIds: smithy_client_1._json,
1447
+ tags: smithy_client_1._json,
1448
+ vpcId: smithy_client_1.expectString,
1449
+ });
1450
+ Object.assign(contents, doc);
1608
1451
  return contents;
1609
1452
  };
1610
1453
  exports.de_GetEnvironmentCommand = de_GetEnvironmentCommand;
@@ -1632,10 +1475,9 @@ const de_GetEnvironmentCommandError = async (output, context) => {
1632
1475
  throw await de_ValidationExceptionRes(parsedOutput, context);
1633
1476
  default:
1634
1477
  const parsedBody = parsedOutput.body;
1635
- (0, smithy_client_1.throwDefaultError)({
1478
+ return throwDefaultError({
1636
1479
  output,
1637
1480
  parsedBody,
1638
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1639
1481
  errorCode,
1640
1482
  });
1641
1483
  }
@@ -1644,16 +1486,15 @@ const de_ListApplicationsCommand = async (output, context) => {
1644
1486
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1645
1487
  return de_ListApplicationsCommandError(output, context);
1646
1488
  }
1647
- const contents = map({
1489
+ const contents = (0, smithy_client_1.map)({
1648
1490
  $metadata: deserializeMetadata(output),
1649
1491
  });
1650
1492
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1651
- if (data.applications != null) {
1652
- contents.applications = de_ApplicationSummaryList(data.applications, context);
1653
- }
1654
- if (data.nextToken != null) {
1655
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1656
- }
1493
+ const doc = (0, smithy_client_1.take)(data, {
1494
+ applications: (_) => de_ApplicationSummaryList(_, context),
1495
+ nextToken: smithy_client_1.expectString,
1496
+ });
1497
+ Object.assign(contents, doc);
1657
1498
  return contents;
1658
1499
  };
1659
1500
  exports.de_ListApplicationsCommand = de_ListApplicationsCommand;
@@ -1678,10 +1519,9 @@ const de_ListApplicationsCommandError = async (output, context) => {
1678
1519
  throw await de_ValidationExceptionRes(parsedOutput, context);
1679
1520
  default:
1680
1521
  const parsedBody = parsedOutput.body;
1681
- (0, smithy_client_1.throwDefaultError)({
1522
+ return throwDefaultError({
1682
1523
  output,
1683
1524
  parsedBody,
1684
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1685
1525
  errorCode,
1686
1526
  });
1687
1527
  }
@@ -1690,16 +1530,15 @@ const de_ListApplicationVersionsCommand = async (output, context) => {
1690
1530
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1691
1531
  return de_ListApplicationVersionsCommandError(output, context);
1692
1532
  }
1693
- const contents = map({
1533
+ const contents = (0, smithy_client_1.map)({
1694
1534
  $metadata: deserializeMetadata(output),
1695
1535
  });
1696
1536
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1697
- if (data.applicationVersions != null) {
1698
- contents.applicationVersions = de_ApplicationVersionSummaryList(data.applicationVersions, context);
1699
- }
1700
- if (data.nextToken != null) {
1701
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1702
- }
1537
+ const doc = (0, smithy_client_1.take)(data, {
1538
+ applicationVersions: (_) => de_ApplicationVersionSummaryList(_, context),
1539
+ nextToken: smithy_client_1.expectString,
1540
+ });
1541
+ Object.assign(contents, doc);
1703
1542
  return contents;
1704
1543
  };
1705
1544
  exports.de_ListApplicationVersionsCommand = de_ListApplicationVersionsCommand;
@@ -1727,10 +1566,9 @@ const de_ListApplicationVersionsCommandError = async (output, context) => {
1727
1566
  throw await de_ValidationExceptionRes(parsedOutput, context);
1728
1567
  default:
1729
1568
  const parsedBody = parsedOutput.body;
1730
- (0, smithy_client_1.throwDefaultError)({
1569
+ return throwDefaultError({
1731
1570
  output,
1732
1571
  parsedBody,
1733
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1734
1572
  errorCode,
1735
1573
  });
1736
1574
  }
@@ -1739,16 +1577,15 @@ const de_ListBatchJobDefinitionsCommand = async (output, context) => {
1739
1577
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1740
1578
  return de_ListBatchJobDefinitionsCommandError(output, context);
1741
1579
  }
1742
- const contents = map({
1580
+ const contents = (0, smithy_client_1.map)({
1743
1581
  $metadata: deserializeMetadata(output),
1744
1582
  });
1745
1583
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1746
- if (data.batchJobDefinitions != null) {
1747
- contents.batchJobDefinitions = de_BatchJobDefinitions(data.batchJobDefinitions, context);
1748
- }
1749
- if (data.nextToken != null) {
1750
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1751
- }
1584
+ const doc = (0, smithy_client_1.take)(data, {
1585
+ batchJobDefinitions: smithy_client_1._json,
1586
+ nextToken: smithy_client_1.expectString,
1587
+ });
1588
+ Object.assign(contents, doc);
1752
1589
  return contents;
1753
1590
  };
1754
1591
  exports.de_ListBatchJobDefinitionsCommand = de_ListBatchJobDefinitionsCommand;
@@ -1776,10 +1613,9 @@ const de_ListBatchJobDefinitionsCommandError = async (output, context) => {
1776
1613
  throw await de_ValidationExceptionRes(parsedOutput, context);
1777
1614
  default:
1778
1615
  const parsedBody = parsedOutput.body;
1779
- (0, smithy_client_1.throwDefaultError)({
1616
+ return throwDefaultError({
1780
1617
  output,
1781
1618
  parsedBody,
1782
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1783
1619
  errorCode,
1784
1620
  });
1785
1621
  }
@@ -1788,16 +1624,15 @@ const de_ListBatchJobExecutionsCommand = async (output, context) => {
1788
1624
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1789
1625
  return de_ListBatchJobExecutionsCommandError(output, context);
1790
1626
  }
1791
- const contents = map({
1627
+ const contents = (0, smithy_client_1.map)({
1792
1628
  $metadata: deserializeMetadata(output),
1793
1629
  });
1794
1630
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1795
- if (data.batchJobExecutions != null) {
1796
- contents.batchJobExecutions = de_BatchJobExecutionSummaryList(data.batchJobExecutions, context);
1797
- }
1798
- if (data.nextToken != null) {
1799
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1800
- }
1631
+ const doc = (0, smithy_client_1.take)(data, {
1632
+ batchJobExecutions: (_) => de_BatchJobExecutionSummaryList(_, context),
1633
+ nextToken: smithy_client_1.expectString,
1634
+ });
1635
+ Object.assign(contents, doc);
1801
1636
  return contents;
1802
1637
  };
1803
1638
  exports.de_ListBatchJobExecutionsCommand = de_ListBatchJobExecutionsCommand;
@@ -1825,10 +1660,9 @@ const de_ListBatchJobExecutionsCommandError = async (output, context) => {
1825
1660
  throw await de_ValidationExceptionRes(parsedOutput, context);
1826
1661
  default:
1827
1662
  const parsedBody = parsedOutput.body;
1828
- (0, smithy_client_1.throwDefaultError)({
1663
+ return throwDefaultError({
1829
1664
  output,
1830
1665
  parsedBody,
1831
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1832
1666
  errorCode,
1833
1667
  });
1834
1668
  }
@@ -1837,16 +1671,15 @@ const de_ListDataSetImportHistoryCommand = async (output, context) => {
1837
1671
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1838
1672
  return de_ListDataSetImportHistoryCommandError(output, context);
1839
1673
  }
1840
- const contents = map({
1674
+ const contents = (0, smithy_client_1.map)({
1841
1675
  $metadata: deserializeMetadata(output),
1842
1676
  });
1843
1677
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1844
- if (data.dataSetImportTasks != null) {
1845
- contents.dataSetImportTasks = de_DataSetImportTaskList(data.dataSetImportTasks, context);
1846
- }
1847
- if (data.nextToken != null) {
1848
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1849
- }
1678
+ const doc = (0, smithy_client_1.take)(data, {
1679
+ dataSetImportTasks: smithy_client_1._json,
1680
+ nextToken: smithy_client_1.expectString,
1681
+ });
1682
+ Object.assign(contents, doc);
1850
1683
  return contents;
1851
1684
  };
1852
1685
  exports.de_ListDataSetImportHistoryCommand = de_ListDataSetImportHistoryCommand;
@@ -1874,10 +1707,9 @@ const de_ListDataSetImportHistoryCommandError = async (output, context) => {
1874
1707
  throw await de_ValidationExceptionRes(parsedOutput, context);
1875
1708
  default:
1876
1709
  const parsedBody = parsedOutput.body;
1877
- (0, smithy_client_1.throwDefaultError)({
1710
+ return throwDefaultError({
1878
1711
  output,
1879
1712
  parsedBody,
1880
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1881
1713
  errorCode,
1882
1714
  });
1883
1715
  }
@@ -1886,16 +1718,15 @@ const de_ListDataSetsCommand = async (output, context) => {
1886
1718
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1887
1719
  return de_ListDataSetsCommandError(output, context);
1888
1720
  }
1889
- const contents = map({
1721
+ const contents = (0, smithy_client_1.map)({
1890
1722
  $metadata: deserializeMetadata(output),
1891
1723
  });
1892
1724
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1893
- if (data.dataSets != null) {
1894
- contents.dataSets = de_DataSetsSummaryList(data.dataSets, context);
1895
- }
1896
- if (data.nextToken != null) {
1897
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1898
- }
1725
+ const doc = (0, smithy_client_1.take)(data, {
1726
+ dataSets: (_) => de_DataSetsSummaryList(_, context),
1727
+ nextToken: smithy_client_1.expectString,
1728
+ });
1729
+ Object.assign(contents, doc);
1899
1730
  return contents;
1900
1731
  };
1901
1732
  exports.de_ListDataSetsCommand = de_ListDataSetsCommand;
@@ -1923,10 +1754,9 @@ const de_ListDataSetsCommandError = async (output, context) => {
1923
1754
  throw await de_ValidationExceptionRes(parsedOutput, context);
1924
1755
  default:
1925
1756
  const parsedBody = parsedOutput.body;
1926
- (0, smithy_client_1.throwDefaultError)({
1757
+ return throwDefaultError({
1927
1758
  output,
1928
1759
  parsedBody,
1929
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1930
1760
  errorCode,
1931
1761
  });
1932
1762
  }
@@ -1935,16 +1765,15 @@ const de_ListDeploymentsCommand = async (output, context) => {
1935
1765
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1936
1766
  return de_ListDeploymentsCommandError(output, context);
1937
1767
  }
1938
- const contents = map({
1768
+ const contents = (0, smithy_client_1.map)({
1939
1769
  $metadata: deserializeMetadata(output),
1940
1770
  });
1941
1771
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1942
- if (data.deployments != null) {
1943
- contents.deployments = de_DeploymentList(data.deployments, context);
1944
- }
1945
- if (data.nextToken != null) {
1946
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1947
- }
1772
+ const doc = (0, smithy_client_1.take)(data, {
1773
+ deployments: (_) => de_DeploymentList(_, context),
1774
+ nextToken: smithy_client_1.expectString,
1775
+ });
1776
+ Object.assign(contents, doc);
1948
1777
  return contents;
1949
1778
  };
1950
1779
  exports.de_ListDeploymentsCommand = de_ListDeploymentsCommand;
@@ -1972,10 +1801,9 @@ const de_ListDeploymentsCommandError = async (output, context) => {
1972
1801
  throw await de_ValidationExceptionRes(parsedOutput, context);
1973
1802
  default:
1974
1803
  const parsedBody = parsedOutput.body;
1975
- (0, smithy_client_1.throwDefaultError)({
1804
+ return throwDefaultError({
1976
1805
  output,
1977
1806
  parsedBody,
1978
- exceptionCtor: M2ServiceException_1.M2ServiceException,
1979
1807
  errorCode,
1980
1808
  });
1981
1809
  }
@@ -1984,16 +1812,15 @@ const de_ListEngineVersionsCommand = async (output, context) => {
1984
1812
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1985
1813
  return de_ListEngineVersionsCommandError(output, context);
1986
1814
  }
1987
- const contents = map({
1815
+ const contents = (0, smithy_client_1.map)({
1988
1816
  $metadata: deserializeMetadata(output),
1989
1817
  });
1990
1818
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1991
- if (data.engineVersions != null) {
1992
- contents.engineVersions = de_EngineVersionsSummaryList(data.engineVersions, context);
1993
- }
1994
- if (data.nextToken != null) {
1995
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1996
- }
1819
+ const doc = (0, smithy_client_1.take)(data, {
1820
+ engineVersions: smithy_client_1._json,
1821
+ nextToken: smithy_client_1.expectString,
1822
+ });
1823
+ Object.assign(contents, doc);
1997
1824
  return contents;
1998
1825
  };
1999
1826
  exports.de_ListEngineVersionsCommand = de_ListEngineVersionsCommand;
@@ -2018,10 +1845,9 @@ const de_ListEngineVersionsCommandError = async (output, context) => {
2018
1845
  throw await de_ValidationExceptionRes(parsedOutput, context);
2019
1846
  default:
2020
1847
  const parsedBody = parsedOutput.body;
2021
- (0, smithy_client_1.throwDefaultError)({
1848
+ return throwDefaultError({
2022
1849
  output,
2023
1850
  parsedBody,
2024
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2025
1851
  errorCode,
2026
1852
  });
2027
1853
  }
@@ -2030,16 +1856,15 @@ const de_ListEnvironmentsCommand = async (output, context) => {
2030
1856
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2031
1857
  return de_ListEnvironmentsCommandError(output, context);
2032
1858
  }
2033
- const contents = map({
1859
+ const contents = (0, smithy_client_1.map)({
2034
1860
  $metadata: deserializeMetadata(output),
2035
1861
  });
2036
1862
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2037
- if (data.environments != null) {
2038
- contents.environments = de_EnvironmentSummaryList(data.environments, context);
2039
- }
2040
- if (data.nextToken != null) {
2041
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2042
- }
1863
+ const doc = (0, smithy_client_1.take)(data, {
1864
+ environments: (_) => de_EnvironmentSummaryList(_, context),
1865
+ nextToken: smithy_client_1.expectString,
1866
+ });
1867
+ Object.assign(contents, doc);
2043
1868
  return contents;
2044
1869
  };
2045
1870
  exports.de_ListEnvironmentsCommand = de_ListEnvironmentsCommand;
@@ -2064,10 +1889,9 @@ const de_ListEnvironmentsCommandError = async (output, context) => {
2064
1889
  throw await de_ValidationExceptionRes(parsedOutput, context);
2065
1890
  default:
2066
1891
  const parsedBody = parsedOutput.body;
2067
- (0, smithy_client_1.throwDefaultError)({
1892
+ return throwDefaultError({
2068
1893
  output,
2069
1894
  parsedBody,
2070
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2071
1895
  errorCode,
2072
1896
  });
2073
1897
  }
@@ -2076,13 +1900,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
2076
1900
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2077
1901
  return de_ListTagsForResourceCommandError(output, context);
2078
1902
  }
2079
- const contents = map({
1903
+ const contents = (0, smithy_client_1.map)({
2080
1904
  $metadata: deserializeMetadata(output),
2081
1905
  });
2082
1906
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2083
- if (data.tags != null) {
2084
- contents.tags = de_TagMap(data.tags, context);
2085
- }
1907
+ const doc = (0, smithy_client_1.take)(data, {
1908
+ tags: smithy_client_1._json,
1909
+ });
1910
+ Object.assign(contents, doc);
2086
1911
  return contents;
2087
1912
  };
2088
1913
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -2110,10 +1935,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2110
1935
  throw await de_ValidationExceptionRes(parsedOutput, context);
2111
1936
  default:
2112
1937
  const parsedBody = parsedOutput.body;
2113
- (0, smithy_client_1.throwDefaultError)({
1938
+ return throwDefaultError({
2114
1939
  output,
2115
1940
  parsedBody,
2116
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2117
1941
  errorCode,
2118
1942
  });
2119
1943
  }
@@ -2122,7 +1946,7 @@ const de_StartApplicationCommand = async (output, context) => {
2122
1946
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2123
1947
  return de_StartApplicationCommandError(output, context);
2124
1948
  }
2125
- const contents = map({
1949
+ const contents = (0, smithy_client_1.map)({
2126
1950
  $metadata: deserializeMetadata(output),
2127
1951
  });
2128
1952
  await collectBody(output.body, context);
@@ -2156,10 +1980,9 @@ const de_StartApplicationCommandError = async (output, context) => {
2156
1980
  throw await de_ValidationExceptionRes(parsedOutput, context);
2157
1981
  default:
2158
1982
  const parsedBody = parsedOutput.body;
2159
- (0, smithy_client_1.throwDefaultError)({
1983
+ return throwDefaultError({
2160
1984
  output,
2161
1985
  parsedBody,
2162
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2163
1986
  errorCode,
2164
1987
  });
2165
1988
  }
@@ -2168,13 +1991,14 @@ const de_StartBatchJobCommand = async (output, context) => {
2168
1991
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2169
1992
  return de_StartBatchJobCommandError(output, context);
2170
1993
  }
2171
- const contents = map({
1994
+ const contents = (0, smithy_client_1.map)({
2172
1995
  $metadata: deserializeMetadata(output),
2173
1996
  });
2174
1997
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2175
- if (data.executionId != null) {
2176
- contents.executionId = (0, smithy_client_1.expectString)(data.executionId);
2177
- }
1998
+ const doc = (0, smithy_client_1.take)(data, {
1999
+ executionId: smithy_client_1.expectString,
2000
+ });
2001
+ Object.assign(contents, doc);
2178
2002
  return contents;
2179
2003
  };
2180
2004
  exports.de_StartBatchJobCommand = de_StartBatchJobCommand;
@@ -2205,10 +2029,9 @@ const de_StartBatchJobCommandError = async (output, context) => {
2205
2029
  throw await de_ValidationExceptionRes(parsedOutput, context);
2206
2030
  default:
2207
2031
  const parsedBody = parsedOutput.body;
2208
- (0, smithy_client_1.throwDefaultError)({
2032
+ return throwDefaultError({
2209
2033
  output,
2210
2034
  parsedBody,
2211
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2212
2035
  errorCode,
2213
2036
  });
2214
2037
  }
@@ -2217,7 +2040,7 @@ const de_StopApplicationCommand = async (output, context) => {
2217
2040
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2218
2041
  return de_StopApplicationCommandError(output, context);
2219
2042
  }
2220
- const contents = map({
2043
+ const contents = (0, smithy_client_1.map)({
2221
2044
  $metadata: deserializeMetadata(output),
2222
2045
  });
2223
2046
  await collectBody(output.body, context);
@@ -2251,10 +2074,9 @@ const de_StopApplicationCommandError = async (output, context) => {
2251
2074
  throw await de_ValidationExceptionRes(parsedOutput, context);
2252
2075
  default:
2253
2076
  const parsedBody = parsedOutput.body;
2254
- (0, smithy_client_1.throwDefaultError)({
2077
+ return throwDefaultError({
2255
2078
  output,
2256
2079
  parsedBody,
2257
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2258
2080
  errorCode,
2259
2081
  });
2260
2082
  }
@@ -2263,7 +2085,7 @@ const de_TagResourceCommand = async (output, context) => {
2263
2085
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2264
2086
  return de_TagResourceCommandError(output, context);
2265
2087
  }
2266
- const contents = map({
2088
+ const contents = (0, smithy_client_1.map)({
2267
2089
  $metadata: deserializeMetadata(output),
2268
2090
  });
2269
2091
  await collectBody(output.body, context);
@@ -2297,10 +2119,9 @@ const de_TagResourceCommandError = async (output, context) => {
2297
2119
  throw await de_ValidationExceptionRes(parsedOutput, context);
2298
2120
  default:
2299
2121
  const parsedBody = parsedOutput.body;
2300
- (0, smithy_client_1.throwDefaultError)({
2122
+ return throwDefaultError({
2301
2123
  output,
2302
2124
  parsedBody,
2303
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2304
2125
  errorCode,
2305
2126
  });
2306
2127
  }
@@ -2309,7 +2130,7 @@ const de_UntagResourceCommand = async (output, context) => {
2309
2130
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2310
2131
  return de_UntagResourceCommandError(output, context);
2311
2132
  }
2312
- const contents = map({
2133
+ const contents = (0, smithy_client_1.map)({
2313
2134
  $metadata: deserializeMetadata(output),
2314
2135
  });
2315
2136
  await collectBody(output.body, context);
@@ -2340,10 +2161,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2340
2161
  throw await de_ValidationExceptionRes(parsedOutput, context);
2341
2162
  default:
2342
2163
  const parsedBody = parsedOutput.body;
2343
- (0, smithy_client_1.throwDefaultError)({
2164
+ return throwDefaultError({
2344
2165
  output,
2345
2166
  parsedBody,
2346
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2347
2167
  errorCode,
2348
2168
  });
2349
2169
  }
@@ -2352,13 +2172,14 @@ const de_UpdateApplicationCommand = async (output, context) => {
2352
2172
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2353
2173
  return de_UpdateApplicationCommandError(output, context);
2354
2174
  }
2355
- const contents = map({
2175
+ const contents = (0, smithy_client_1.map)({
2356
2176
  $metadata: deserializeMetadata(output),
2357
2177
  });
2358
2178
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2359
- if (data.applicationVersion != null) {
2360
- contents.applicationVersion = (0, smithy_client_1.expectInt32)(data.applicationVersion);
2361
- }
2179
+ const doc = (0, smithy_client_1.take)(data, {
2180
+ applicationVersion: smithy_client_1.expectInt32,
2181
+ });
2182
+ Object.assign(contents, doc);
2362
2183
  return contents;
2363
2184
  };
2364
2185
  exports.de_UpdateApplicationCommand = de_UpdateApplicationCommand;
@@ -2389,10 +2210,9 @@ const de_UpdateApplicationCommandError = async (output, context) => {
2389
2210
  throw await de_ValidationExceptionRes(parsedOutput, context);
2390
2211
  default:
2391
2212
  const parsedBody = parsedOutput.body;
2392
- (0, smithy_client_1.throwDefaultError)({
2213
+ return throwDefaultError({
2393
2214
  output,
2394
2215
  parsedBody,
2395
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2396
2216
  errorCode,
2397
2217
  });
2398
2218
  }
@@ -2401,13 +2221,14 @@ const de_UpdateEnvironmentCommand = async (output, context) => {
2401
2221
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2402
2222
  return de_UpdateEnvironmentCommandError(output, context);
2403
2223
  }
2404
- const contents = map({
2224
+ const contents = (0, smithy_client_1.map)({
2405
2225
  $metadata: deserializeMetadata(output),
2406
2226
  });
2407
2227
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2408
- if (data.environmentId != null) {
2409
- contents.environmentId = (0, smithy_client_1.expectString)(data.environmentId);
2410
- }
2228
+ const doc = (0, smithy_client_1.take)(data, {
2229
+ environmentId: smithy_client_1.expectString,
2230
+ });
2231
+ Object.assign(contents, doc);
2411
2232
  return contents;
2412
2233
  };
2413
2234
  exports.de_UpdateEnvironmentCommand = de_UpdateEnvironmentCommand;
@@ -2441,21 +2262,21 @@ const de_UpdateEnvironmentCommandError = async (output, context) => {
2441
2262
  throw await de_ValidationExceptionRes(parsedOutput, context);
2442
2263
  default:
2443
2264
  const parsedBody = parsedOutput.body;
2444
- (0, smithy_client_1.throwDefaultError)({
2265
+ return throwDefaultError({
2445
2266
  output,
2446
2267
  parsedBody,
2447
- exceptionCtor: M2ServiceException_1.M2ServiceException,
2448
2268
  errorCode,
2449
2269
  });
2450
2270
  }
2451
2271
  };
2452
- const map = smithy_client_1.map;
2272
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(M2ServiceException_1.M2ServiceException);
2453
2273
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2454
- const contents = map({});
2274
+ const contents = (0, smithy_client_1.map)({});
2455
2275
  const data = parsedOutput.body;
2456
- if (data.message != null) {
2457
- contents.message = (0, smithy_client_1.expectString)(data.message);
2458
- }
2276
+ const doc = (0, smithy_client_1.take)(data, {
2277
+ message: smithy_client_1.expectString,
2278
+ });
2279
+ Object.assign(contents, doc);
2459
2280
  const exception = new models_0_1.AccessDeniedException({
2460
2281
  $metadata: deserializeMetadata(parsedOutput),
2461
2282
  ...contents,
@@ -2463,17 +2284,14 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2463
2284
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2464
2285
  };
2465
2286
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2466
- const contents = map({});
2287
+ const contents = (0, smithy_client_1.map)({});
2467
2288
  const data = parsedOutput.body;
2468
- if (data.message != null) {
2469
- contents.message = (0, smithy_client_1.expectString)(data.message);
2470
- }
2471
- if (data.resourceId != null) {
2472
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
2473
- }
2474
- if (data.resourceType != null) {
2475
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
2476
- }
2289
+ const doc = (0, smithy_client_1.take)(data, {
2290
+ message: smithy_client_1.expectString,
2291
+ resourceId: smithy_client_1.expectString,
2292
+ resourceType: smithy_client_1.expectString,
2293
+ });
2294
+ Object.assign(contents, doc);
2477
2295
  const exception = new models_0_1.ConflictException({
2478
2296
  $metadata: deserializeMetadata(parsedOutput),
2479
2297
  ...contents,
@@ -2481,16 +2299,17 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2481
2299
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2482
2300
  };
2483
2301
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2484
- const contents = map({
2302
+ const contents = (0, smithy_client_1.map)({
2485
2303
  retryAfterSeconds: [
2486
2304
  () => void 0 !== parsedOutput.headers["retry-after"],
2487
2305
  () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
2488
2306
  ],
2489
2307
  });
2490
2308
  const data = parsedOutput.body;
2491
- if (data.message != null) {
2492
- contents.message = (0, smithy_client_1.expectString)(data.message);
2493
- }
2309
+ const doc = (0, smithy_client_1.take)(data, {
2310
+ message: smithy_client_1.expectString,
2311
+ });
2312
+ Object.assign(contents, doc);
2494
2313
  const exception = new models_0_1.InternalServerException({
2495
2314
  $metadata: deserializeMetadata(parsedOutput),
2496
2315
  ...contents,
@@ -2498,17 +2317,14 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2498
2317
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2499
2318
  };
2500
2319
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2501
- const contents = map({});
2320
+ const contents = (0, smithy_client_1.map)({});
2502
2321
  const data = parsedOutput.body;
2503
- if (data.message != null) {
2504
- contents.message = (0, smithy_client_1.expectString)(data.message);
2505
- }
2506
- if (data.resourceId != null) {
2507
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
2508
- }
2509
- if (data.resourceType != null) {
2510
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
2511
- }
2322
+ const doc = (0, smithy_client_1.take)(data, {
2323
+ message: smithy_client_1.expectString,
2324
+ resourceId: smithy_client_1.expectString,
2325
+ resourceType: smithy_client_1.expectString,
2326
+ });
2327
+ Object.assign(contents, doc);
2512
2328
  const exception = new models_0_1.ResourceNotFoundException({
2513
2329
  $metadata: deserializeMetadata(parsedOutput),
2514
2330
  ...contents,
@@ -2516,23 +2332,16 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2516
2332
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2517
2333
  };
2518
2334
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2519
- const contents = map({});
2335
+ const contents = (0, smithy_client_1.map)({});
2520
2336
  const data = parsedOutput.body;
2521
- if (data.message != null) {
2522
- contents.message = (0, smithy_client_1.expectString)(data.message);
2523
- }
2524
- if (data.quotaCode != null) {
2525
- contents.quotaCode = (0, smithy_client_1.expectString)(data.quotaCode);
2526
- }
2527
- if (data.resourceId != null) {
2528
- contents.resourceId = (0, smithy_client_1.expectString)(data.resourceId);
2529
- }
2530
- if (data.resourceType != null) {
2531
- contents.resourceType = (0, smithy_client_1.expectString)(data.resourceType);
2532
- }
2533
- if (data.serviceCode != null) {
2534
- contents.serviceCode = (0, smithy_client_1.expectString)(data.serviceCode);
2535
- }
2337
+ const doc = (0, smithy_client_1.take)(data, {
2338
+ message: smithy_client_1.expectString,
2339
+ quotaCode: smithy_client_1.expectString,
2340
+ resourceId: smithy_client_1.expectString,
2341
+ resourceType: smithy_client_1.expectString,
2342
+ serviceCode: smithy_client_1.expectString,
2343
+ });
2344
+ Object.assign(contents, doc);
2536
2345
  const exception = new models_0_1.ServiceQuotaExceededException({
2537
2346
  $metadata: deserializeMetadata(parsedOutput),
2538
2347
  ...contents,
@@ -2540,22 +2349,19 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2540
2349
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2541
2350
  };
2542
2351
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2543
- const contents = map({
2352
+ const contents = (0, smithy_client_1.map)({
2544
2353
  retryAfterSeconds: [
2545
2354
  () => void 0 !== parsedOutput.headers["retry-after"],
2546
2355
  () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
2547
2356
  ],
2548
2357
  });
2549
2358
  const data = parsedOutput.body;
2550
- if (data.message != null) {
2551
- contents.message = (0, smithy_client_1.expectString)(data.message);
2552
- }
2553
- if (data.quotaCode != null) {
2554
- contents.quotaCode = (0, smithy_client_1.expectString)(data.quotaCode);
2555
- }
2556
- if (data.serviceCode != null) {
2557
- contents.serviceCode = (0, smithy_client_1.expectString)(data.serviceCode);
2558
- }
2359
+ const doc = (0, smithy_client_1.take)(data, {
2360
+ message: smithy_client_1.expectString,
2361
+ quotaCode: smithy_client_1.expectString,
2362
+ serviceCode: smithy_client_1.expectString,
2363
+ });
2364
+ Object.assign(contents, doc);
2559
2365
  const exception = new models_0_1.ThrottlingException({
2560
2366
  $metadata: deserializeMetadata(parsedOutput),
2561
2367
  ...contents,
@@ -2563,149 +2369,31 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2563
2369
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2564
2370
  };
2565
2371
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2566
- const contents = map({});
2372
+ const contents = (0, smithy_client_1.map)({});
2567
2373
  const data = parsedOutput.body;
2568
- if (data.fieldList != null) {
2569
- contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context);
2570
- }
2571
- if (data.message != null) {
2572
- contents.message = (0, smithy_client_1.expectString)(data.message);
2573
- }
2574
- if (data.reason != null) {
2575
- contents.reason = (0, smithy_client_1.expectString)(data.reason);
2576
- }
2374
+ const doc = (0, smithy_client_1.take)(data, {
2375
+ fieldList: smithy_client_1._json,
2376
+ message: smithy_client_1.expectString,
2377
+ reason: smithy_client_1.expectString,
2378
+ });
2379
+ Object.assign(contents, doc);
2577
2380
  const exception = new models_0_1.ValidationException({
2578
2381
  $metadata: deserializeMetadata(parsedOutput),
2579
2382
  ...contents,
2580
2383
  });
2581
2384
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2582
2385
  };
2583
- const se_AlternateKey = (input, context) => {
2584
- return {
2585
- ...(input.allowDuplicates != null && { allowDuplicates: input.allowDuplicates }),
2586
- ...(input.length != null && { length: input.length }),
2587
- ...(input.name != null && { name: input.name }),
2588
- ...(input.offset != null && { offset: input.offset }),
2589
- };
2590
- };
2591
- const se_AlternateKeyList = (input, context) => {
2592
- return input
2593
- .filter((e) => e != null)
2594
- .map((entry) => {
2595
- return se_AlternateKey(entry, context);
2596
- });
2597
- };
2598
- const se_BatchJobIdentifier = (input, context) => {
2599
- return models_0_1.BatchJobIdentifier.visit(input, {
2600
- fileBatchJobIdentifier: (value) => ({ fileBatchJobIdentifier: se_FileBatchJobIdentifier(value, context) }),
2601
- scriptBatchJobIdentifier: (value) => ({ scriptBatchJobIdentifier: se_ScriptBatchJobIdentifier(value, context) }),
2602
- _: (name, value) => ({ name: value }),
2603
- });
2604
- };
2605
- const se_BatchJobParametersMap = (input, context) => {
2606
- return Object.entries(input).reduce((acc, [key, value]) => {
2607
- if (value === null) {
2608
- return acc;
2609
- }
2610
- acc[key] = value;
2611
- return acc;
2612
- }, {});
2613
- };
2614
- const se_DataSet = (input, context) => {
2615
- return {
2616
- ...(input.datasetName != null && { datasetName: input.datasetName }),
2617
- ...(input.datasetOrg != null && { datasetOrg: se_DatasetOrgAttributes(input.datasetOrg, context) }),
2618
- ...(input.recordLength != null && { recordLength: se_RecordLength(input.recordLength, context) }),
2619
- ...(input.relativePath != null && { relativePath: input.relativePath }),
2620
- ...(input.storageType != null && { storageType: input.storageType }),
2621
- };
2622
- };
2623
- const se_DataSetImportConfig = (input, context) => {
2624
- return models_0_1.DataSetImportConfig.visit(input, {
2625
- dataSets: (value) => ({ dataSets: se_DataSetImportList(value, context) }),
2626
- s3Location: (value) => ({ s3Location: value }),
2627
- _: (name, value) => ({ name: value }),
2628
- });
2629
- };
2630
- const se_DataSetImportItem = (input, context) => {
2631
- return {
2632
- ...(input.dataSet != null && { dataSet: se_DataSet(input.dataSet, context) }),
2633
- ...(input.externalLocation != null && { externalLocation: se_ExternalLocation(input.externalLocation, context) }),
2634
- };
2635
- };
2636
- const se_DataSetImportList = (input, context) => {
2637
- return input
2638
- .filter((e) => e != null)
2639
- .map((entry) => {
2640
- return se_DataSetImportItem(entry, context);
2641
- });
2642
- };
2643
- const se_DatasetOrgAttributes = (input, context) => {
2644
- return models_0_1.DatasetOrgAttributes.visit(input, {
2645
- gdg: (value) => ({ gdg: se_GdgAttributes(value, context) }),
2646
- vsam: (value) => ({ vsam: se_VsamAttributes(value, context) }),
2647
- _: (name, value) => ({ name: value }),
2648
- });
2649
- };
2650
- const se_Definition = (input, context) => {
2651
- return models_0_1.Definition.visit(input, {
2652
- content: (value) => ({ content: value }),
2653
- s3Location: (value) => ({ s3Location: value }),
2654
- _: (name, value) => ({ name: value }),
2655
- });
2656
- };
2657
2386
  const se_EfsStorageConfiguration = (input, context) => {
2658
- return {
2659
- ...(input.fileSystemId != null && { "file-system-id": input.fileSystemId }),
2660
- ...(input.mountPoint != null && { "mount-point": input.mountPoint }),
2661
- };
2662
- };
2663
- const se_ExternalLocation = (input, context) => {
2664
- return models_0_1.ExternalLocation.visit(input, {
2665
- s3Location: (value) => ({ s3Location: value }),
2666
- _: (name, value) => ({ name: value }),
2387
+ return (0, smithy_client_1.take)(input, {
2388
+ "file-system-id": [, , `fileSystemId`],
2389
+ "mount-point": [, , `mountPoint`],
2667
2390
  });
2668
2391
  };
2669
- const se_FileBatchJobIdentifier = (input, context) => {
2670
- return {
2671
- ...(input.fileName != null && { fileName: input.fileName }),
2672
- ...(input.folderPath != null && { folderPath: input.folderPath }),
2673
- };
2674
- };
2675
2392
  const se_FsxStorageConfiguration = (input, context) => {
2676
- return {
2677
- ...(input.fileSystemId != null && { "file-system-id": input.fileSystemId }),
2678
- ...(input.mountPoint != null && { "mount-point": input.mountPoint }),
2679
- };
2680
- };
2681
- const se_GdgAttributes = (input, context) => {
2682
- return {
2683
- ...(input.limit != null && { limit: input.limit }),
2684
- ...(input.rollDisposition != null && { rollDisposition: input.rollDisposition }),
2685
- };
2686
- };
2687
- const se_HighAvailabilityConfig = (input, context) => {
2688
- return {
2689
- ...(input.desiredCapacity != null && { desiredCapacity: input.desiredCapacity }),
2690
- };
2691
- };
2692
- const se_PrimaryKey = (input, context) => {
2693
- return {
2694
- ...(input.length != null && { length: input.length }),
2695
- ...(input.name != null && { name: input.name }),
2696
- ...(input.offset != null && { offset: input.offset }),
2697
- };
2698
- };
2699
- const se_RecordLength = (input, context) => {
2700
- return {
2701
- ...(input.max != null && { max: input.max }),
2702
- ...(input.min != null && { min: input.min }),
2703
- };
2704
- };
2705
- const se_ScriptBatchJobIdentifier = (input, context) => {
2706
- return {
2707
- ...(input.scriptName != null && { scriptName: input.scriptName }),
2708
- };
2393
+ return (0, smithy_client_1.take)(input, {
2394
+ "file-system-id": [, , `fileSystemId`],
2395
+ "mount-point": [, , `mountPoint`],
2396
+ });
2709
2397
  };
2710
2398
  const se_StorageConfiguration = (input, context) => {
2711
2399
  return models_0_1.StorageConfiguration.visit(input, {
@@ -2721,408 +2409,148 @@ const se_StorageConfigurationList = (input, context) => {
2721
2409
  return se_StorageConfiguration(entry, context);
2722
2410
  });
2723
2411
  };
2724
- const se_String50List = (input, context) => {
2725
- return input
2726
- .filter((e) => e != null)
2727
- .map((entry) => {
2728
- return entry;
2729
- });
2730
- };
2731
- const se_TagMap = (input, context) => {
2732
- return Object.entries(input).reduce((acc, [key, value]) => {
2733
- if (value === null) {
2734
- return acc;
2735
- }
2736
- acc[key] = value;
2737
- return acc;
2738
- }, {});
2739
- };
2740
- const se_VsamAttributes = (input, context) => {
2741
- return {
2742
- ...(input.alternateKeys != null && { alternateKeys: se_AlternateKeyList(input.alternateKeys, context) }),
2743
- ...(input.compressed != null && { compressed: input.compressed }),
2744
- ...(input.encoding != null && { encoding: input.encoding }),
2745
- ...(input.format != null && { format: input.format }),
2746
- ...(input.primaryKey != null && { primaryKey: se_PrimaryKey(input.primaryKey, context) }),
2747
- };
2748
- };
2749
- const de_AlternateKey = (output, context) => {
2750
- return {
2751
- allowDuplicates: (0, smithy_client_1.expectBoolean)(output.allowDuplicates),
2752
- length: (0, smithy_client_1.expectInt32)(output.length),
2753
- name: (0, smithy_client_1.expectString)(output.name),
2754
- offset: (0, smithy_client_1.expectInt32)(output.offset),
2755
- };
2756
- };
2757
- const de_AlternateKeyList = (output, context) => {
2758
- const retVal = (output || [])
2759
- .filter((e) => e != null)
2760
- .map((entry) => {
2761
- if (entry === null) {
2762
- return null;
2763
- }
2764
- return de_AlternateKey(entry, context);
2765
- });
2766
- return retVal;
2767
- };
2768
2412
  const de_ApplicationSummary = (output, context) => {
2769
- return {
2770
- applicationArn: (0, smithy_client_1.expectString)(output.applicationArn),
2771
- applicationId: (0, smithy_client_1.expectString)(output.applicationId),
2772
- applicationVersion: (0, smithy_client_1.expectInt32)(output.applicationVersion),
2773
- creationTime: output.creationTime != null
2774
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2775
- : undefined,
2776
- deploymentStatus: (0, smithy_client_1.expectString)(output.deploymentStatus),
2777
- description: (0, smithy_client_1.expectString)(output.description),
2778
- engineType: (0, smithy_client_1.expectString)(output.engineType),
2779
- environmentId: (0, smithy_client_1.expectString)(output.environmentId),
2780
- lastStartTime: output.lastStartTime != null
2781
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastStartTime)))
2782
- : undefined,
2783
- name: (0, smithy_client_1.expectString)(output.name),
2784
- status: (0, smithy_client_1.expectString)(output.status),
2785
- versionStatus: (0, smithy_client_1.expectString)(output.versionStatus),
2786
- };
2413
+ return (0, smithy_client_1.take)(output, {
2414
+ applicationArn: smithy_client_1.expectString,
2415
+ applicationId: smithy_client_1.expectString,
2416
+ applicationVersion: smithy_client_1.expectInt32,
2417
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2418
+ deploymentStatus: smithy_client_1.expectString,
2419
+ description: smithy_client_1.expectString,
2420
+ engineType: smithy_client_1.expectString,
2421
+ environmentId: smithy_client_1.expectString,
2422
+ lastStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2423
+ name: smithy_client_1.expectString,
2424
+ status: smithy_client_1.expectString,
2425
+ versionStatus: smithy_client_1.expectString,
2426
+ });
2787
2427
  };
2788
2428
  const de_ApplicationSummaryList = (output, context) => {
2789
2429
  const retVal = (output || [])
2790
2430
  .filter((e) => e != null)
2791
2431
  .map((entry) => {
2792
- if (entry === null) {
2793
- return null;
2794
- }
2795
2432
  return de_ApplicationSummary(entry, context);
2796
2433
  });
2797
2434
  return retVal;
2798
2435
  };
2799
2436
  const de_ApplicationVersionSummary = (output, context) => {
2800
- return {
2801
- applicationVersion: (0, smithy_client_1.expectInt32)(output.applicationVersion),
2802
- creationTime: output.creationTime != null
2803
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2804
- : undefined,
2805
- status: (0, smithy_client_1.expectString)(output.status),
2806
- statusReason: (0, smithy_client_1.expectString)(output.statusReason),
2807
- };
2437
+ return (0, smithy_client_1.take)(output, {
2438
+ applicationVersion: smithy_client_1.expectInt32,
2439
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2440
+ status: smithy_client_1.expectString,
2441
+ statusReason: smithy_client_1.expectString,
2442
+ });
2808
2443
  };
2809
2444
  const de_ApplicationVersionSummaryList = (output, context) => {
2810
2445
  const retVal = (output || [])
2811
2446
  .filter((e) => e != null)
2812
2447
  .map((entry) => {
2813
- if (entry === null) {
2814
- return null;
2815
- }
2816
2448
  return de_ApplicationVersionSummary(entry, context);
2817
2449
  });
2818
2450
  return retVal;
2819
2451
  };
2820
- const de_ArnList = (output, context) => {
2821
- const retVal = (output || [])
2822
- .filter((e) => e != null)
2823
- .map((entry) => {
2824
- if (entry === null) {
2825
- return null;
2826
- }
2827
- return (0, smithy_client_1.expectString)(entry);
2828
- });
2829
- return retVal;
2830
- };
2831
- const de_BatchJobDefinition = (output, context) => {
2832
- if (output.fileBatchJobDefinition != null) {
2833
- return {
2834
- fileBatchJobDefinition: de_FileBatchJobDefinition(output.fileBatchJobDefinition, context),
2835
- };
2836
- }
2837
- if (output.scriptBatchJobDefinition != null) {
2838
- return {
2839
- scriptBatchJobDefinition: de_ScriptBatchJobDefinition(output.scriptBatchJobDefinition, context),
2840
- };
2841
- }
2842
- return { $unknown: Object.entries(output)[0] };
2843
- };
2844
- const de_BatchJobDefinitions = (output, context) => {
2845
- const retVal = (output || [])
2846
- .filter((e) => e != null)
2847
- .map((entry) => {
2848
- if (entry === null) {
2849
- return null;
2850
- }
2851
- return de_BatchJobDefinition((0, smithy_client_1.expectUnion)(entry), context);
2852
- });
2853
- return retVal;
2854
- };
2855
2452
  const de_BatchJobExecutionSummary = (output, context) => {
2856
- return {
2857
- applicationId: (0, smithy_client_1.expectString)(output.applicationId),
2858
- batchJobIdentifier: output.batchJobIdentifier != null
2859
- ? de_BatchJobIdentifier((0, smithy_client_1.expectUnion)(output.batchJobIdentifier), context)
2860
- : undefined,
2861
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
2862
- executionId: (0, smithy_client_1.expectString)(output.executionId),
2863
- jobId: (0, smithy_client_1.expectString)(output.jobId),
2864
- jobName: (0, smithy_client_1.expectString)(output.jobName),
2865
- jobType: (0, smithy_client_1.expectString)(output.jobType),
2866
- returnCode: (0, smithy_client_1.expectString)(output.returnCode),
2867
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
2868
- status: (0, smithy_client_1.expectString)(output.status),
2869
- };
2453
+ return (0, smithy_client_1.take)(output, {
2454
+ applicationId: smithy_client_1.expectString,
2455
+ batchJobIdentifier: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
2456
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2457
+ executionId: smithy_client_1.expectString,
2458
+ jobId: smithy_client_1.expectString,
2459
+ jobName: smithy_client_1.expectString,
2460
+ jobType: smithy_client_1.expectString,
2461
+ returnCode: smithy_client_1.expectString,
2462
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2463
+ status: smithy_client_1.expectString,
2464
+ });
2870
2465
  };
2871
2466
  const de_BatchJobExecutionSummaryList = (output, context) => {
2872
2467
  const retVal = (output || [])
2873
2468
  .filter((e) => e != null)
2874
2469
  .map((entry) => {
2875
- if (entry === null) {
2876
- return null;
2877
- }
2878
2470
  return de_BatchJobExecutionSummary(entry, context);
2879
2471
  });
2880
2472
  return retVal;
2881
2473
  };
2882
- const de_BatchJobIdentifier = (output, context) => {
2883
- if (output.fileBatchJobIdentifier != null) {
2884
- return {
2885
- fileBatchJobIdentifier: de_FileBatchJobIdentifier(output.fileBatchJobIdentifier, context),
2886
- };
2887
- }
2888
- if (output.scriptBatchJobIdentifier != null) {
2889
- return {
2890
- scriptBatchJobIdentifier: de_ScriptBatchJobIdentifier(output.scriptBatchJobIdentifier, context),
2891
- };
2892
- }
2893
- return { $unknown: Object.entries(output)[0] };
2894
- };
2895
- const de_DatasetDetailOrgAttributes = (output, context) => {
2896
- if (output.gdg != null) {
2897
- return {
2898
- gdg: de_GdgDetailAttributes(output.gdg, context),
2899
- };
2900
- }
2901
- if (output.vsam != null) {
2902
- return {
2903
- vsam: de_VsamDetailAttributes(output.vsam, context),
2904
- };
2905
- }
2906
- return { $unknown: Object.entries(output)[0] };
2907
- };
2908
- const de_DataSetImportSummary = (output, context) => {
2909
- return {
2910
- failed: (0, smithy_client_1.expectInt32)(output.failed),
2911
- inProgress: (0, smithy_client_1.expectInt32)(output.inProgress),
2912
- pending: (0, smithy_client_1.expectInt32)(output.pending),
2913
- succeeded: (0, smithy_client_1.expectInt32)(output.succeeded),
2914
- total: (0, smithy_client_1.expectInt32)(output.total),
2915
- };
2916
- };
2917
- const de_DataSetImportTask = (output, context) => {
2918
- return {
2919
- status: (0, smithy_client_1.expectString)(output.status),
2920
- summary: output.summary != null ? de_DataSetImportSummary(output.summary, context) : undefined,
2921
- taskId: (0, smithy_client_1.expectString)(output.taskId),
2922
- };
2923
- };
2924
- const de_DataSetImportTaskList = (output, context) => {
2925
- const retVal = (output || [])
2926
- .filter((e) => e != null)
2927
- .map((entry) => {
2928
- if (entry === null) {
2929
- return null;
2930
- }
2931
- return de_DataSetImportTask(entry, context);
2932
- });
2933
- return retVal;
2934
- };
2935
2474
  const de_DataSetsSummaryList = (output, context) => {
2936
2475
  const retVal = (output || [])
2937
2476
  .filter((e) => e != null)
2938
2477
  .map((entry) => {
2939
- if (entry === null) {
2940
- return null;
2941
- }
2942
2478
  return de_DataSetSummary(entry, context);
2943
2479
  });
2944
2480
  return retVal;
2945
2481
  };
2946
2482
  const de_DataSetSummary = (output, context) => {
2947
- return {
2948
- creationTime: output.creationTime != null
2949
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2950
- : undefined,
2951
- dataSetName: (0, smithy_client_1.expectString)(output.dataSetName),
2952
- dataSetOrg: (0, smithy_client_1.expectString)(output.dataSetOrg),
2953
- format: (0, smithy_client_1.expectString)(output.format),
2954
- lastReferencedTime: output.lastReferencedTime != null
2955
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastReferencedTime)))
2956
- : undefined,
2957
- lastUpdatedTime: output.lastUpdatedTime != null
2958
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2959
- : undefined,
2960
- };
2961
- };
2962
- const de_DeployedVersionSummary = (output, context) => {
2963
- return {
2964
- applicationVersion: (0, smithy_client_1.expectInt32)(output.applicationVersion),
2965
- status: (0, smithy_client_1.expectString)(output.status),
2966
- statusReason: (0, smithy_client_1.expectString)(output.statusReason),
2967
- };
2483
+ return (0, smithy_client_1.take)(output, {
2484
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2485
+ dataSetName: smithy_client_1.expectString,
2486
+ dataSetOrg: smithy_client_1.expectString,
2487
+ format: smithy_client_1.expectString,
2488
+ lastReferencedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2489
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2490
+ });
2968
2491
  };
2969
2492
  const de_DeploymentList = (output, context) => {
2970
2493
  const retVal = (output || [])
2971
2494
  .filter((e) => e != null)
2972
2495
  .map((entry) => {
2973
- if (entry === null) {
2974
- return null;
2975
- }
2976
2496
  return de_DeploymentSummary(entry, context);
2977
2497
  });
2978
2498
  return retVal;
2979
2499
  };
2980
2500
  const de_DeploymentSummary = (output, context) => {
2981
- return {
2982
- applicationId: (0, smithy_client_1.expectString)(output.applicationId),
2983
- applicationVersion: (0, smithy_client_1.expectInt32)(output.applicationVersion),
2984
- creationTime: output.creationTime != null
2985
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2986
- : undefined,
2987
- deploymentId: (0, smithy_client_1.expectString)(output.deploymentId),
2988
- environmentId: (0, smithy_client_1.expectString)(output.environmentId),
2989
- status: (0, smithy_client_1.expectString)(output.status),
2990
- statusReason: (0, smithy_client_1.expectString)(output.statusReason),
2991
- };
2501
+ return (0, smithy_client_1.take)(output, {
2502
+ applicationId: smithy_client_1.expectString,
2503
+ applicationVersion: smithy_client_1.expectInt32,
2504
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2505
+ deploymentId: smithy_client_1.expectString,
2506
+ environmentId: smithy_client_1.expectString,
2507
+ status: smithy_client_1.expectString,
2508
+ statusReason: smithy_client_1.expectString,
2509
+ });
2992
2510
  };
2993
2511
  const de_EfsStorageConfiguration = (output, context) => {
2994
- return {
2995
- fileSystemId: (0, smithy_client_1.expectString)(output["file-system-id"]),
2996
- mountPoint: (0, smithy_client_1.expectString)(output["mount-point"]),
2997
- };
2998
- };
2999
- const de_EngineVersionsSummary = (output, context) => {
3000
- return {
3001
- engineType: (0, smithy_client_1.expectString)(output.engineType),
3002
- engineVersion: (0, smithy_client_1.expectString)(output.engineVersion),
3003
- };
3004
- };
3005
- const de_EngineVersionsSummaryList = (output, context) => {
3006
- const retVal = (output || [])
3007
- .filter((e) => e != null)
3008
- .map((entry) => {
3009
- if (entry === null) {
3010
- return null;
3011
- }
3012
- return de_EngineVersionsSummary(entry, context);
2512
+ return (0, smithy_client_1.take)(output, {
2513
+ fileSystemId: [, smithy_client_1.expectString, `file-system-id`],
2514
+ mountPoint: [, smithy_client_1.expectString, `mount-point`],
3013
2515
  });
3014
- return retVal;
3015
2516
  };
3016
2517
  const de_EnvironmentSummary = (output, context) => {
3017
- return {
3018
- creationTime: output.creationTime != null
3019
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
3020
- : undefined,
3021
- engineType: (0, smithy_client_1.expectString)(output.engineType),
3022
- engineVersion: (0, smithy_client_1.expectString)(output.engineVersion),
3023
- environmentArn: (0, smithy_client_1.expectString)(output.environmentArn),
3024
- environmentId: (0, smithy_client_1.expectString)(output.environmentId),
3025
- instanceType: (0, smithy_client_1.expectString)(output.instanceType),
3026
- name: (0, smithy_client_1.expectString)(output.name),
3027
- status: (0, smithy_client_1.expectString)(output.status),
3028
- };
2518
+ return (0, smithy_client_1.take)(output, {
2519
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2520
+ engineType: smithy_client_1.expectString,
2521
+ engineVersion: smithy_client_1.expectString,
2522
+ environmentArn: smithy_client_1.expectString,
2523
+ environmentId: smithy_client_1.expectString,
2524
+ instanceType: smithy_client_1.expectString,
2525
+ name: smithy_client_1.expectString,
2526
+ status: smithy_client_1.expectString,
2527
+ });
3029
2528
  };
3030
2529
  const de_EnvironmentSummaryList = (output, context) => {
3031
2530
  const retVal = (output || [])
3032
2531
  .filter((e) => e != null)
3033
2532
  .map((entry) => {
3034
- if (entry === null) {
3035
- return null;
3036
- }
3037
2533
  return de_EnvironmentSummary(entry, context);
3038
2534
  });
3039
2535
  return retVal;
3040
2536
  };
3041
- const de_FileBatchJobDefinition = (output, context) => {
3042
- return {
3043
- fileName: (0, smithy_client_1.expectString)(output.fileName),
3044
- folderPath: (0, smithy_client_1.expectString)(output.folderPath),
3045
- };
3046
- };
3047
- const de_FileBatchJobIdentifier = (output, context) => {
3048
- return {
3049
- fileName: (0, smithy_client_1.expectString)(output.fileName),
3050
- folderPath: (0, smithy_client_1.expectString)(output.folderPath),
3051
- };
3052
- };
3053
2537
  const de_FsxStorageConfiguration = (output, context) => {
3054
- return {
3055
- fileSystemId: (0, smithy_client_1.expectString)(output["file-system-id"]),
3056
- mountPoint: (0, smithy_client_1.expectString)(output["mount-point"]),
3057
- };
3058
- };
3059
- const de_GdgDetailAttributes = (output, context) => {
3060
- return {
3061
- limit: (0, smithy_client_1.expectInt32)(output.limit),
3062
- rollDisposition: (0, smithy_client_1.expectString)(output.rollDisposition),
3063
- };
3064
- };
3065
- const de_HighAvailabilityConfig = (output, context) => {
3066
- return {
3067
- desiredCapacity: (0, smithy_client_1.expectInt32)(output.desiredCapacity),
3068
- };
3069
- };
3070
- const de_LogGroupSummaries = (output, context) => {
3071
- const retVal = (output || [])
3072
- .filter((e) => e != null)
3073
- .map((entry) => {
3074
- if (entry === null) {
3075
- return null;
3076
- }
3077
- return de_LogGroupSummary(entry, context);
2538
+ return (0, smithy_client_1.take)(output, {
2539
+ fileSystemId: [, smithy_client_1.expectString, `file-system-id`],
2540
+ mountPoint: [, smithy_client_1.expectString, `mount-point`],
3078
2541
  });
3079
- return retVal;
3080
- };
3081
- const de_LogGroupSummary = (output, context) => {
3082
- return {
3083
- logGroupName: (0, smithy_client_1.expectString)(output.logGroupName),
3084
- logType: (0, smithy_client_1.expectString)(output.logType),
3085
- };
3086
2542
  };
3087
2543
  const de_MaintenanceSchedule = (output, context) => {
3088
- return {
3089
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
3090
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
3091
- };
2544
+ return (0, smithy_client_1.take)(output, {
2545
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2546
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2547
+ });
3092
2548
  };
3093
2549
  const de_PendingMaintenance = (output, context) => {
3094
- return {
3095
- engineVersion: (0, smithy_client_1.expectString)(output.engineVersion),
3096
- schedule: output.schedule != null ? de_MaintenanceSchedule(output.schedule, context) : undefined,
3097
- };
3098
- };
3099
- const de_PortList = (output, context) => {
3100
- const retVal = (output || [])
3101
- .filter((e) => e != null)
3102
- .map((entry) => {
3103
- if (entry === null) {
3104
- return null;
3105
- }
3106
- return (0, smithy_client_1.expectInt32)(entry);
2550
+ return (0, smithy_client_1.take)(output, {
2551
+ engineVersion: smithy_client_1.expectString,
2552
+ schedule: (_) => de_MaintenanceSchedule(_, context),
3107
2553
  });
3108
- return retVal;
3109
- };
3110
- const de_PrimaryKey = (output, context) => {
3111
- return {
3112
- length: (0, smithy_client_1.expectInt32)(output.length),
3113
- name: (0, smithy_client_1.expectString)(output.name),
3114
- offset: (0, smithy_client_1.expectInt32)(output.offset),
3115
- };
3116
- };
3117
- const de_ScriptBatchJobDefinition = (output, context) => {
3118
- return {
3119
- scriptName: (0, smithy_client_1.expectString)(output.scriptName),
3120
- };
3121
- };
3122
- const de_ScriptBatchJobIdentifier = (output, context) => {
3123
- return {
3124
- scriptName: (0, smithy_client_1.expectString)(output.scriptName),
3125
- };
3126
2554
  };
3127
2555
  const de_StorageConfiguration = (output, context) => {
3128
2556
  if (output.efs != null) {
@@ -3141,60 +2569,10 @@ const de_StorageConfigurationList = (output, context) => {
3141
2569
  const retVal = (output || [])
3142
2570
  .filter((e) => e != null)
3143
2571
  .map((entry) => {
3144
- if (entry === null) {
3145
- return null;
3146
- }
3147
2572
  return de_StorageConfiguration((0, smithy_client_1.expectUnion)(entry), context);
3148
2573
  });
3149
2574
  return retVal;
3150
2575
  };
3151
- const de_String50List = (output, context) => {
3152
- const retVal = (output || [])
3153
- .filter((e) => e != null)
3154
- .map((entry) => {
3155
- if (entry === null) {
3156
- return null;
3157
- }
3158
- return (0, smithy_client_1.expectString)(entry);
3159
- });
3160
- return retVal;
3161
- };
3162
- const de_TagMap = (output, context) => {
3163
- return Object.entries(output).reduce((acc, [key, value]) => {
3164
- if (value === null) {
3165
- return acc;
3166
- }
3167
- acc[key] = (0, smithy_client_1.expectString)(value);
3168
- return acc;
3169
- }, {});
3170
- };
3171
- const de_ValidationExceptionField = (output, context) => {
3172
- return {
3173
- message: (0, smithy_client_1.expectString)(output.message),
3174
- name: (0, smithy_client_1.expectString)(output.name),
3175
- };
3176
- };
3177
- const de_ValidationExceptionFieldList = (output, context) => {
3178
- const retVal = (output || [])
3179
- .filter((e) => e != null)
3180
- .map((entry) => {
3181
- if (entry === null) {
3182
- return null;
3183
- }
3184
- return de_ValidationExceptionField(entry, context);
3185
- });
3186
- return retVal;
3187
- };
3188
- const de_VsamDetailAttributes = (output, context) => {
3189
- return {
3190
- alternateKeys: output.alternateKeys != null ? de_AlternateKeyList(output.alternateKeys, context) : undefined,
3191
- cacheAtStartup: (0, smithy_client_1.expectBoolean)(output.cacheAtStartup),
3192
- compressed: (0, smithy_client_1.expectBoolean)(output.compressed),
3193
- encoding: (0, smithy_client_1.expectString)(output.encoding),
3194
- primaryKey: output.primaryKey != null ? de_PrimaryKey(output.primaryKey, context) : undefined,
3195
- recordFormat: (0, smithy_client_1.expectString)(output.recordFormat),
3196
- };
3197
- };
3198
2576
  const deserializeMetadata = (output) => ({
3199
2577
  httpStatusCode: output.statusCode,
3200
2578
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],