@aws-sdk/client-efs 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,13 +14,13 @@ const se_CreateAccessPointCommand = async (input, context) => {
14
14
  };
15
15
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/access-points";
16
16
  let body;
17
- body = JSON.stringify({
18
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
19
- ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }),
20
- ...(input.PosixUser != null && { PosixUser: se_PosixUser(input.PosixUser, context) }),
21
- ...(input.RootDirectory != null && { RootDirectory: se_RootDirectory(input.RootDirectory, context) }),
22
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
23
- });
17
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
18
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
19
+ FileSystemId: [],
20
+ PosixUser: (_) => (0, smithy_client_1._json)(_),
21
+ RootDirectory: (_) => (0, smithy_client_1._json)(_),
22
+ Tags: (_) => (0, smithy_client_1._json)(_),
23
+ }));
24
24
  return new protocol_http_1.HttpRequest({
25
25
  protocol,
26
26
  hostname,
@@ -39,19 +39,17 @@ const se_CreateFileSystemCommand = async (input, context) => {
39
39
  };
40
40
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/file-systems";
41
41
  let body;
42
- body = JSON.stringify({
43
- ...(input.AvailabilityZoneName != null && { AvailabilityZoneName: input.AvailabilityZoneName }),
44
- ...(input.Backup != null && { Backup: input.Backup }),
45
- CreationToken: input.CreationToken ?? (0, uuid_1.v4)(),
46
- ...(input.Encrypted != null && { Encrypted: input.Encrypted }),
47
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
48
- ...(input.PerformanceMode != null && { PerformanceMode: input.PerformanceMode }),
49
- ...(input.ProvisionedThroughputInMibps != null && {
50
- ProvisionedThroughputInMibps: (0, smithy_client_1.serializeFloat)(input.ProvisionedThroughputInMibps),
51
- }),
52
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
53
- ...(input.ThroughputMode != null && { ThroughputMode: input.ThroughputMode }),
54
- });
42
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
43
+ AvailabilityZoneName: [],
44
+ Backup: [],
45
+ CreationToken: (_) => _ ?? (0, uuid_1.v4)(),
46
+ Encrypted: [],
47
+ KmsKeyId: [],
48
+ PerformanceMode: [],
49
+ ProvisionedThroughputInMibps: (_) => (0, smithy_client_1.serializeFloat)(_),
50
+ Tags: (_) => (0, smithy_client_1._json)(_),
51
+ ThroughputMode: [],
52
+ }));
55
53
  return new protocol_http_1.HttpRequest({
56
54
  protocol,
57
55
  hostname,
@@ -70,12 +68,12 @@ const se_CreateMountTargetCommand = async (input, context) => {
70
68
  };
71
69
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/mount-targets";
72
70
  let body;
73
- body = JSON.stringify({
74
- ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }),
75
- ...(input.IpAddress != null && { IpAddress: input.IpAddress }),
76
- ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroups(input.SecurityGroups, context) }),
77
- ...(input.SubnetId != null && { SubnetId: input.SubnetId }),
78
- });
71
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
72
+ FileSystemId: [],
73
+ IpAddress: [],
74
+ SecurityGroups: (_) => (0, smithy_client_1._json)(_),
75
+ SubnetId: [],
76
+ }));
79
77
  return new protocol_http_1.HttpRequest({
80
78
  protocol,
81
79
  hostname,
@@ -96,9 +94,9 @@ const se_CreateReplicationConfigurationCommand = async (input, context) => {
96
94
  "/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration";
97
95
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SourceFileSystemId", () => input.SourceFileSystemId, "{SourceFileSystemId}", false);
98
96
  let body;
99
- body = JSON.stringify({
100
- ...(input.Destinations != null && { Destinations: se_DestinationsToCreate(input.Destinations, context) }),
101
- });
97
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
98
+ Destinations: (_) => (0, smithy_client_1._json)(_),
99
+ }));
102
100
  return new protocol_http_1.HttpRequest({
103
101
  protocol,
104
102
  hostname,
@@ -118,9 +116,9 @@ const se_CreateTagsCommand = async (input, context) => {
118
116
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/create-tags/{FileSystemId}";
119
117
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
120
118
  let body;
121
- body = JSON.stringify({
122
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
123
- });
119
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
120
+ Tags: (_) => (0, smithy_client_1._json)(_),
121
+ }));
124
122
  return new protocol_http_1.HttpRequest({
125
123
  protocol,
126
124
  hostname,
@@ -227,9 +225,9 @@ const se_DeleteTagsCommand = async (input, context) => {
227
225
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/delete-tags/{FileSystemId}";
228
226
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
229
227
  let body;
230
- body = JSON.stringify({
231
- ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }),
232
- });
228
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
229
+ TagKeys: (_) => (0, smithy_client_1._json)(_),
230
+ }));
233
231
  return new protocol_http_1.HttpRequest({
234
232
  protocol,
235
233
  hostname,
@@ -245,7 +243,7 @@ const se_DescribeAccessPointsCommand = async (input, context) => {
245
243
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
246
244
  const headers = {};
247
245
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/access-points";
248
- const query = map({
246
+ const query = (0, smithy_client_1.map)({
249
247
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
250
248
  NextToken: [, input.NextToken],
251
249
  AccessPointId: [, input.AccessPointId],
@@ -271,10 +269,10 @@ const se_DescribeAccountPreferencesCommand = async (input, context) => {
271
269
  };
272
270
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/account-preferences";
273
271
  let body;
274
- body = JSON.stringify({
275
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
276
- ...(input.NextToken != null && { NextToken: input.NextToken }),
277
- });
272
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
273
+ MaxResults: [],
274
+ NextToken: [],
275
+ }));
278
276
  return new protocol_http_1.HttpRequest({
279
277
  protocol,
280
278
  hostname,
@@ -326,7 +324,7 @@ const se_DescribeFileSystemsCommand = async (input, context) => {
326
324
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
327
325
  const headers = {};
328
326
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/file-systems";
329
- const query = map({
327
+ const query = (0, smithy_client_1.map)({
330
328
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
331
329
  Marker: [, input.Marker],
332
330
  CreationToken: [, input.CreationToken],
@@ -367,7 +365,7 @@ const se_DescribeMountTargetsCommand = async (input, context) => {
367
365
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
368
366
  const headers = {};
369
367
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/mount-targets";
370
- const query = map({
368
+ const query = (0, smithy_client_1.map)({
371
369
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
372
370
  Marker: [, input.Marker],
373
371
  FileSystemId: [, input.FileSystemId],
@@ -410,7 +408,7 @@ const se_DescribeReplicationConfigurationsCommand = async (input, context) => {
410
408
  const headers = {};
411
409
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
412
410
  "/2015-02-01/file-systems/replication-configurations";
413
- const query = map({
411
+ const query = (0, smithy_client_1.map)({
414
412
  FileSystemId: [, input.FileSystemId],
415
413
  NextToken: [, input.NextToken],
416
414
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -433,7 +431,7 @@ const se_DescribeTagsCommand = async (input, context) => {
433
431
  const headers = {};
434
432
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/tags/{FileSystemId}";
435
433
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
436
- const query = map({
434
+ const query = (0, smithy_client_1.map)({
437
435
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
438
436
  Marker: [, input.Marker],
439
437
  });
@@ -455,7 +453,7 @@ const se_ListTagsForResourceCommand = async (input, context) => {
455
453
  const headers = {};
456
454
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/resource-tags/{ResourceId}";
457
455
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
458
- const query = map({
456
+ const query = (0, smithy_client_1.map)({
459
457
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
460
458
  NextToken: [, input.NextToken],
461
459
  });
@@ -481,9 +479,9 @@ const se_ModifyMountTargetSecurityGroupsCommand = async (input, context) => {
481
479
  "/2015-02-01/mount-targets/{MountTargetId}/security-groups";
482
480
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MountTargetId", () => input.MountTargetId, "{MountTargetId}", false);
483
481
  let body;
484
- body = JSON.stringify({
485
- ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroups(input.SecurityGroups, context) }),
486
- });
482
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
483
+ SecurityGroups: (_) => (0, smithy_client_1._json)(_),
484
+ }));
487
485
  return new protocol_http_1.HttpRequest({
488
486
  protocol,
489
487
  hostname,
@@ -502,9 +500,9 @@ const se_PutAccountPreferencesCommand = async (input, context) => {
502
500
  };
503
501
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/account-preferences";
504
502
  let body;
505
- body = JSON.stringify({
506
- ...(input.ResourceIdType != null && { ResourceIdType: input.ResourceIdType }),
507
- });
503
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
504
+ ResourceIdType: [],
505
+ }));
508
506
  return new protocol_http_1.HttpRequest({
509
507
  protocol,
510
508
  hostname,
@@ -525,9 +523,9 @@ const se_PutBackupPolicyCommand = async (input, context) => {
525
523
  "/2015-02-01/file-systems/{FileSystemId}/backup-policy";
526
524
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
527
525
  let body;
528
- body = JSON.stringify({
529
- ...(input.BackupPolicy != null && { BackupPolicy: se_BackupPolicy(input.BackupPolicy, context) }),
530
- });
526
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
527
+ BackupPolicy: (_) => (0, smithy_client_1._json)(_),
528
+ }));
531
529
  return new protocol_http_1.HttpRequest({
532
530
  protocol,
533
531
  hostname,
@@ -548,12 +546,10 @@ const se_PutFileSystemPolicyCommand = async (input, context) => {
548
546
  "/2015-02-01/file-systems/{FileSystemId}/policy";
549
547
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
550
548
  let body;
551
- body = JSON.stringify({
552
- ...(input.BypassPolicyLockoutSafetyCheck != null && {
553
- BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck,
554
- }),
555
- ...(input.Policy != null && { Policy: input.Policy }),
556
- });
549
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
550
+ BypassPolicyLockoutSafetyCheck: [],
551
+ Policy: [],
552
+ }));
557
553
  return new protocol_http_1.HttpRequest({
558
554
  protocol,
559
555
  hostname,
@@ -574,11 +570,9 @@ const se_PutLifecycleConfigurationCommand = async (input, context) => {
574
570
  "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration";
575
571
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
576
572
  let body;
577
- body = JSON.stringify({
578
- ...(input.LifecyclePolicies != null && {
579
- LifecyclePolicies: se_LifecyclePolicies(input.LifecyclePolicies, context),
580
- }),
581
- });
573
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
574
+ LifecyclePolicies: (_) => (0, smithy_client_1._json)(_),
575
+ }));
582
576
  return new protocol_http_1.HttpRequest({
583
577
  protocol,
584
578
  hostname,
@@ -598,9 +592,9 @@ const se_TagResourceCommand = async (input, context) => {
598
592
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/resource-tags/{ResourceId}";
599
593
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
600
594
  let body;
601
- body = JSON.stringify({
602
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
603
- });
595
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
596
+ Tags: (_) => (0, smithy_client_1._json)(_),
597
+ }));
604
598
  return new protocol_http_1.HttpRequest({
605
599
  protocol,
606
600
  hostname,
@@ -617,7 +611,7 @@ const se_UntagResourceCommand = async (input, context) => {
617
611
  const headers = {};
618
612
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/resource-tags/{ResourceId}";
619
613
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
620
- const query = map({
614
+ const query = (0, smithy_client_1.map)({
621
615
  tagKeys: [
622
616
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
623
617
  () => (input.TagKeys || []).map((_entry) => _entry),
@@ -644,12 +638,10 @@ const se_UpdateFileSystemCommand = async (input, context) => {
644
638
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/file-systems/{FileSystemId}";
645
639
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FileSystemId", () => input.FileSystemId, "{FileSystemId}", false);
646
640
  let body;
647
- body = JSON.stringify({
648
- ...(input.ProvisionedThroughputInMibps != null && {
649
- ProvisionedThroughputInMibps: (0, smithy_client_1.serializeFloat)(input.ProvisionedThroughputInMibps),
650
- }),
651
- ...(input.ThroughputMode != null && { ThroughputMode: input.ThroughputMode }),
652
- });
641
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
642
+ ProvisionedThroughputInMibps: (_) => (0, smithy_client_1.serializeFloat)(_),
643
+ ThroughputMode: [],
644
+ }));
653
645
  return new protocol_http_1.HttpRequest({
654
646
  protocol,
655
647
  hostname,
@@ -665,40 +657,23 @@ const de_CreateAccessPointCommand = async (output, context) => {
665
657
  if (output.statusCode !== 200 && output.statusCode >= 300) {
666
658
  return de_CreateAccessPointCommandError(output, context);
667
659
  }
668
- const contents = map({
660
+ const contents = (0, smithy_client_1.map)({
669
661
  $metadata: deserializeMetadata(output),
670
662
  });
671
663
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
672
- if (data.AccessPointArn != null) {
673
- contents.AccessPointArn = (0, smithy_client_1.expectString)(data.AccessPointArn);
674
- }
675
- if (data.AccessPointId != null) {
676
- contents.AccessPointId = (0, smithy_client_1.expectString)(data.AccessPointId);
677
- }
678
- if (data.ClientToken != null) {
679
- contents.ClientToken = (0, smithy_client_1.expectString)(data.ClientToken);
680
- }
681
- if (data.FileSystemId != null) {
682
- contents.FileSystemId = (0, smithy_client_1.expectString)(data.FileSystemId);
683
- }
684
- if (data.LifeCycleState != null) {
685
- contents.LifeCycleState = (0, smithy_client_1.expectString)(data.LifeCycleState);
686
- }
687
- if (data.Name != null) {
688
- contents.Name = (0, smithy_client_1.expectString)(data.Name);
689
- }
690
- if (data.OwnerId != null) {
691
- contents.OwnerId = (0, smithy_client_1.expectString)(data.OwnerId);
692
- }
693
- if (data.PosixUser != null) {
694
- contents.PosixUser = de_PosixUser(data.PosixUser, context);
695
- }
696
- if (data.RootDirectory != null) {
697
- contents.RootDirectory = de_RootDirectory(data.RootDirectory, context);
698
- }
699
- if (data.Tags != null) {
700
- contents.Tags = de_Tags(data.Tags, context);
701
- }
664
+ const doc = (0, smithy_client_1.take)(data, {
665
+ AccessPointArn: smithy_client_1.expectString,
666
+ AccessPointId: smithy_client_1.expectString,
667
+ ClientToken: smithy_client_1.expectString,
668
+ FileSystemId: smithy_client_1.expectString,
669
+ LifeCycleState: smithy_client_1.expectString,
670
+ Name: smithy_client_1.expectString,
671
+ OwnerId: smithy_client_1.expectString,
672
+ PosixUser: smithy_client_1._json,
673
+ RootDirectory: smithy_client_1._json,
674
+ Tags: smithy_client_1._json,
675
+ });
676
+ Object.assign(contents, doc);
702
677
  return contents;
703
678
  };
704
679
  exports.de_CreateAccessPointCommand = de_CreateAccessPointCommand;
@@ -732,10 +707,9 @@ const de_CreateAccessPointCommandError = async (output, context) => {
732
707
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
733
708
  default:
734
709
  const parsedBody = parsedOutput.body;
735
- (0, smithy_client_1.throwDefaultError)({
710
+ return throwDefaultError({
736
711
  output,
737
712
  parsedBody,
738
- exceptionCtor: EFSServiceException_1.EFSServiceException,
739
713
  errorCode,
740
714
  });
741
715
  }
@@ -744,61 +718,30 @@ const de_CreateFileSystemCommand = async (output, context) => {
744
718
  if (output.statusCode !== 201 && output.statusCode >= 300) {
745
719
  return de_CreateFileSystemCommandError(output, context);
746
720
  }
747
- const contents = map({
721
+ const contents = (0, smithy_client_1.map)({
748
722
  $metadata: deserializeMetadata(output),
749
723
  });
750
724
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
751
- if (data.AvailabilityZoneId != null) {
752
- contents.AvailabilityZoneId = (0, smithy_client_1.expectString)(data.AvailabilityZoneId);
753
- }
754
- if (data.AvailabilityZoneName != null) {
755
- contents.AvailabilityZoneName = (0, smithy_client_1.expectString)(data.AvailabilityZoneName);
756
- }
757
- if (data.CreationTime != null) {
758
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
759
- }
760
- if (data.CreationToken != null) {
761
- contents.CreationToken = (0, smithy_client_1.expectString)(data.CreationToken);
762
- }
763
- if (data.Encrypted != null) {
764
- contents.Encrypted = (0, smithy_client_1.expectBoolean)(data.Encrypted);
765
- }
766
- if (data.FileSystemArn != null) {
767
- contents.FileSystemArn = (0, smithy_client_1.expectString)(data.FileSystemArn);
768
- }
769
- if (data.FileSystemId != null) {
770
- contents.FileSystemId = (0, smithy_client_1.expectString)(data.FileSystemId);
771
- }
772
- if (data.KmsKeyId != null) {
773
- contents.KmsKeyId = (0, smithy_client_1.expectString)(data.KmsKeyId);
774
- }
775
- if (data.LifeCycleState != null) {
776
- contents.LifeCycleState = (0, smithy_client_1.expectString)(data.LifeCycleState);
777
- }
778
- if (data.Name != null) {
779
- contents.Name = (0, smithy_client_1.expectString)(data.Name);
780
- }
781
- if (data.NumberOfMountTargets != null) {
782
- contents.NumberOfMountTargets = (0, smithy_client_1.expectInt32)(data.NumberOfMountTargets);
783
- }
784
- if (data.OwnerId != null) {
785
- contents.OwnerId = (0, smithy_client_1.expectString)(data.OwnerId);
786
- }
787
- if (data.PerformanceMode != null) {
788
- contents.PerformanceMode = (0, smithy_client_1.expectString)(data.PerformanceMode);
789
- }
790
- if (data.ProvisionedThroughputInMibps != null) {
791
- contents.ProvisionedThroughputInMibps = (0, smithy_client_1.limitedParseDouble)(data.ProvisionedThroughputInMibps);
792
- }
793
- if (data.SizeInBytes != null) {
794
- contents.SizeInBytes = de_FileSystemSize(data.SizeInBytes, context);
795
- }
796
- if (data.Tags != null) {
797
- contents.Tags = de_Tags(data.Tags, context);
798
- }
799
- if (data.ThroughputMode != null) {
800
- contents.ThroughputMode = (0, smithy_client_1.expectString)(data.ThroughputMode);
801
- }
725
+ const doc = (0, smithy_client_1.take)(data, {
726
+ AvailabilityZoneId: smithy_client_1.expectString,
727
+ AvailabilityZoneName: smithy_client_1.expectString,
728
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
729
+ CreationToken: smithy_client_1.expectString,
730
+ Encrypted: smithy_client_1.expectBoolean,
731
+ FileSystemArn: smithy_client_1.expectString,
732
+ FileSystemId: smithy_client_1.expectString,
733
+ KmsKeyId: smithy_client_1.expectString,
734
+ LifeCycleState: smithy_client_1.expectString,
735
+ Name: smithy_client_1.expectString,
736
+ NumberOfMountTargets: smithy_client_1.expectInt32,
737
+ OwnerId: smithy_client_1.expectString,
738
+ PerformanceMode: smithy_client_1.expectString,
739
+ ProvisionedThroughputInMibps: smithy_client_1.limitedParseDouble,
740
+ SizeInBytes: (_) => de_FileSystemSize(_, context),
741
+ Tags: smithy_client_1._json,
742
+ ThroughputMode: smithy_client_1.expectString,
743
+ });
744
+ Object.assign(contents, doc);
802
745
  return contents;
803
746
  };
804
747
  exports.de_CreateFileSystemCommand = de_CreateFileSystemCommand;
@@ -832,10 +775,9 @@ const de_CreateFileSystemCommandError = async (output, context) => {
832
775
  throw await de_UnsupportedAvailabilityZoneRes(parsedOutput, context);
833
776
  default:
834
777
  const parsedBody = parsedOutput.body;
835
- (0, smithy_client_1.throwDefaultError)({
778
+ return throwDefaultError({
836
779
  output,
837
780
  parsedBody,
838
- exceptionCtor: EFSServiceException_1.EFSServiceException,
839
781
  errorCode,
840
782
  });
841
783
  }
@@ -844,40 +786,23 @@ const de_CreateMountTargetCommand = async (output, context) => {
844
786
  if (output.statusCode !== 200 && output.statusCode >= 300) {
845
787
  return de_CreateMountTargetCommandError(output, context);
846
788
  }
847
- const contents = map({
789
+ const contents = (0, smithy_client_1.map)({
848
790
  $metadata: deserializeMetadata(output),
849
791
  });
850
792
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
851
- if (data.AvailabilityZoneId != null) {
852
- contents.AvailabilityZoneId = (0, smithy_client_1.expectString)(data.AvailabilityZoneId);
853
- }
854
- if (data.AvailabilityZoneName != null) {
855
- contents.AvailabilityZoneName = (0, smithy_client_1.expectString)(data.AvailabilityZoneName);
856
- }
857
- if (data.FileSystemId != null) {
858
- contents.FileSystemId = (0, smithy_client_1.expectString)(data.FileSystemId);
859
- }
860
- if (data.IpAddress != null) {
861
- contents.IpAddress = (0, smithy_client_1.expectString)(data.IpAddress);
862
- }
863
- if (data.LifeCycleState != null) {
864
- contents.LifeCycleState = (0, smithy_client_1.expectString)(data.LifeCycleState);
865
- }
866
- if (data.MountTargetId != null) {
867
- contents.MountTargetId = (0, smithy_client_1.expectString)(data.MountTargetId);
868
- }
869
- if (data.NetworkInterfaceId != null) {
870
- contents.NetworkInterfaceId = (0, smithy_client_1.expectString)(data.NetworkInterfaceId);
871
- }
872
- if (data.OwnerId != null) {
873
- contents.OwnerId = (0, smithy_client_1.expectString)(data.OwnerId);
874
- }
875
- if (data.SubnetId != null) {
876
- contents.SubnetId = (0, smithy_client_1.expectString)(data.SubnetId);
877
- }
878
- if (data.VpcId != null) {
879
- contents.VpcId = (0, smithy_client_1.expectString)(data.VpcId);
880
- }
793
+ const doc = (0, smithy_client_1.take)(data, {
794
+ AvailabilityZoneId: smithy_client_1.expectString,
795
+ AvailabilityZoneName: smithy_client_1.expectString,
796
+ FileSystemId: smithy_client_1.expectString,
797
+ IpAddress: smithy_client_1.expectString,
798
+ LifeCycleState: smithy_client_1.expectString,
799
+ MountTargetId: smithy_client_1.expectString,
800
+ NetworkInterfaceId: smithy_client_1.expectString,
801
+ OwnerId: smithy_client_1.expectString,
802
+ SubnetId: smithy_client_1.expectString,
803
+ VpcId: smithy_client_1.expectString,
804
+ });
805
+ Object.assign(contents, doc);
881
806
  return contents;
882
807
  };
883
808
  exports.de_CreateMountTargetCommand = de_CreateMountTargetCommand;
@@ -929,10 +854,9 @@ const de_CreateMountTargetCommandError = async (output, context) => {
929
854
  throw await de_UnsupportedAvailabilityZoneRes(parsedOutput, context);
930
855
  default:
931
856
  const parsedBody = parsedOutput.body;
932
- (0, smithy_client_1.throwDefaultError)({
857
+ return throwDefaultError({
933
858
  output,
934
859
  parsedBody,
935
- exceptionCtor: EFSServiceException_1.EFSServiceException,
936
860
  errorCode,
937
861
  });
938
862
  }
@@ -941,28 +865,19 @@ const de_CreateReplicationConfigurationCommand = async (output, context) => {
941
865
  if (output.statusCode !== 200 && output.statusCode >= 300) {
942
866
  return de_CreateReplicationConfigurationCommandError(output, context);
943
867
  }
944
- const contents = map({
868
+ const contents = (0, smithy_client_1.map)({
945
869
  $metadata: deserializeMetadata(output),
946
870
  });
947
871
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
948
- if (data.CreationTime != null) {
949
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
950
- }
951
- if (data.Destinations != null) {
952
- contents.Destinations = de_Destinations(data.Destinations, context);
953
- }
954
- if (data.OriginalSourceFileSystemArn != null) {
955
- contents.OriginalSourceFileSystemArn = (0, smithy_client_1.expectString)(data.OriginalSourceFileSystemArn);
956
- }
957
- if (data.SourceFileSystemArn != null) {
958
- contents.SourceFileSystemArn = (0, smithy_client_1.expectString)(data.SourceFileSystemArn);
959
- }
960
- if (data.SourceFileSystemId != null) {
961
- contents.SourceFileSystemId = (0, smithy_client_1.expectString)(data.SourceFileSystemId);
962
- }
963
- if (data.SourceFileSystemRegion != null) {
964
- contents.SourceFileSystemRegion = (0, smithy_client_1.expectString)(data.SourceFileSystemRegion);
965
- }
872
+ const doc = (0, smithy_client_1.take)(data, {
873
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
874
+ Destinations: (_) => de_Destinations(_, context),
875
+ OriginalSourceFileSystemArn: smithy_client_1.expectString,
876
+ SourceFileSystemArn: smithy_client_1.expectString,
877
+ SourceFileSystemId: smithy_client_1.expectString,
878
+ SourceFileSystemRegion: smithy_client_1.expectString,
879
+ });
880
+ Object.assign(contents, doc);
966
881
  return contents;
967
882
  };
968
883
  exports.de_CreateReplicationConfigurationCommand = de_CreateReplicationConfigurationCommand;
@@ -1005,10 +920,9 @@ const de_CreateReplicationConfigurationCommandError = async (output, context) =>
1005
920
  throw await de_ValidationExceptionRes(parsedOutput, context);
1006
921
  default:
1007
922
  const parsedBody = parsedOutput.body;
1008
- (0, smithy_client_1.throwDefaultError)({
923
+ return throwDefaultError({
1009
924
  output,
1010
925
  parsedBody,
1011
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1012
926
  errorCode,
1013
927
  });
1014
928
  }
@@ -1017,7 +931,7 @@ const de_CreateTagsCommand = async (output, context) => {
1017
931
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1018
932
  return de_CreateTagsCommandError(output, context);
1019
933
  }
1020
- const contents = map({
934
+ const contents = (0, smithy_client_1.map)({
1021
935
  $metadata: deserializeMetadata(output),
1022
936
  });
1023
937
  await collectBody(output.body, context);
@@ -1042,10 +956,9 @@ const de_CreateTagsCommandError = async (output, context) => {
1042
956
  throw await de_InternalServerErrorRes(parsedOutput, context);
1043
957
  default:
1044
958
  const parsedBody = parsedOutput.body;
1045
- (0, smithy_client_1.throwDefaultError)({
959
+ return throwDefaultError({
1046
960
  output,
1047
961
  parsedBody,
1048
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1049
962
  errorCode,
1050
963
  });
1051
964
  }
@@ -1054,7 +967,7 @@ const de_DeleteAccessPointCommand = async (output, context) => {
1054
967
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1055
968
  return de_DeleteAccessPointCommandError(output, context);
1056
969
  }
1057
- const contents = map({
970
+ const contents = (0, smithy_client_1.map)({
1058
971
  $metadata: deserializeMetadata(output),
1059
972
  });
1060
973
  await collectBody(output.body, context);
@@ -1079,10 +992,9 @@ const de_DeleteAccessPointCommandError = async (output, context) => {
1079
992
  throw await de_InternalServerErrorRes(parsedOutput, context);
1080
993
  default:
1081
994
  const parsedBody = parsedOutput.body;
1082
- (0, smithy_client_1.throwDefaultError)({
995
+ return throwDefaultError({
1083
996
  output,
1084
997
  parsedBody,
1085
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1086
998
  errorCode,
1087
999
  });
1088
1000
  }
@@ -1091,7 +1003,7 @@ const de_DeleteFileSystemCommand = async (output, context) => {
1091
1003
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1092
1004
  return de_DeleteFileSystemCommandError(output, context);
1093
1005
  }
1094
- const contents = map({
1006
+ const contents = (0, smithy_client_1.map)({
1095
1007
  $metadata: deserializeMetadata(output),
1096
1008
  });
1097
1009
  await collectBody(output.body, context);
@@ -1119,10 +1031,9 @@ const de_DeleteFileSystemCommandError = async (output, context) => {
1119
1031
  throw await de_InternalServerErrorRes(parsedOutput, context);
1120
1032
  default:
1121
1033
  const parsedBody = parsedOutput.body;
1122
- (0, smithy_client_1.throwDefaultError)({
1034
+ return throwDefaultError({
1123
1035
  output,
1124
1036
  parsedBody,
1125
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1126
1037
  errorCode,
1127
1038
  });
1128
1039
  }
@@ -1131,7 +1042,7 @@ const de_DeleteFileSystemPolicyCommand = async (output, context) => {
1131
1042
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1132
1043
  return de_DeleteFileSystemPolicyCommandError(output, context);
1133
1044
  }
1134
- const contents = map({
1045
+ const contents = (0, smithy_client_1.map)({
1135
1046
  $metadata: deserializeMetadata(output),
1136
1047
  });
1137
1048
  await collectBody(output.body, context);
@@ -1159,10 +1070,9 @@ const de_DeleteFileSystemPolicyCommandError = async (output, context) => {
1159
1070
  throw await de_InternalServerErrorRes(parsedOutput, context);
1160
1071
  default:
1161
1072
  const parsedBody = parsedOutput.body;
1162
- (0, smithy_client_1.throwDefaultError)({
1073
+ return throwDefaultError({
1163
1074
  output,
1164
1075
  parsedBody,
1165
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1166
1076
  errorCode,
1167
1077
  });
1168
1078
  }
@@ -1171,7 +1081,7 @@ const de_DeleteMountTargetCommand = async (output, context) => {
1171
1081
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1172
1082
  return de_DeleteMountTargetCommandError(output, context);
1173
1083
  }
1174
- const contents = map({
1084
+ const contents = (0, smithy_client_1.map)({
1175
1085
  $metadata: deserializeMetadata(output),
1176
1086
  });
1177
1087
  await collectBody(output.body, context);
@@ -1199,10 +1109,9 @@ const de_DeleteMountTargetCommandError = async (output, context) => {
1199
1109
  throw await de_MountTargetNotFoundRes(parsedOutput, context);
1200
1110
  default:
1201
1111
  const parsedBody = parsedOutput.body;
1202
- (0, smithy_client_1.throwDefaultError)({
1112
+ return throwDefaultError({
1203
1113
  output,
1204
1114
  parsedBody,
1205
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1206
1115
  errorCode,
1207
1116
  });
1208
1117
  }
@@ -1211,7 +1120,7 @@ const de_DeleteReplicationConfigurationCommand = async (output, context) => {
1211
1120
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1212
1121
  return de_DeleteReplicationConfigurationCommandError(output, context);
1213
1122
  }
1214
- const contents = map({
1123
+ const contents = (0, smithy_client_1.map)({
1215
1124
  $metadata: deserializeMetadata(output),
1216
1125
  });
1217
1126
  await collectBody(output.body, context);
@@ -1239,10 +1148,9 @@ const de_DeleteReplicationConfigurationCommandError = async (output, context) =>
1239
1148
  throw await de_ReplicationNotFoundRes(parsedOutput, context);
1240
1149
  default:
1241
1150
  const parsedBody = parsedOutput.body;
1242
- (0, smithy_client_1.throwDefaultError)({
1151
+ return throwDefaultError({
1243
1152
  output,
1244
1153
  parsedBody,
1245
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1246
1154
  errorCode,
1247
1155
  });
1248
1156
  }
@@ -1251,7 +1159,7 @@ const de_DeleteTagsCommand = async (output, context) => {
1251
1159
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1252
1160
  return de_DeleteTagsCommandError(output, context);
1253
1161
  }
1254
- const contents = map({
1162
+ const contents = (0, smithy_client_1.map)({
1255
1163
  $metadata: deserializeMetadata(output),
1256
1164
  });
1257
1165
  await collectBody(output.body, context);
@@ -1276,10 +1184,9 @@ const de_DeleteTagsCommandError = async (output, context) => {
1276
1184
  throw await de_InternalServerErrorRes(parsedOutput, context);
1277
1185
  default:
1278
1186
  const parsedBody = parsedOutput.body;
1279
- (0, smithy_client_1.throwDefaultError)({
1187
+ return throwDefaultError({
1280
1188
  output,
1281
1189
  parsedBody,
1282
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1283
1190
  errorCode,
1284
1191
  });
1285
1192
  }
@@ -1288,16 +1195,15 @@ const de_DescribeAccessPointsCommand = async (output, context) => {
1288
1195
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1289
1196
  return de_DescribeAccessPointsCommandError(output, context);
1290
1197
  }
1291
- const contents = map({
1198
+ const contents = (0, smithy_client_1.map)({
1292
1199
  $metadata: deserializeMetadata(output),
1293
1200
  });
1294
1201
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1295
- if (data.AccessPoints != null) {
1296
- contents.AccessPoints = de_AccessPointDescriptions(data.AccessPoints, context);
1297
- }
1298
- if (data.NextToken != null) {
1299
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1300
- }
1202
+ const doc = (0, smithy_client_1.take)(data, {
1203
+ AccessPoints: smithy_client_1._json,
1204
+ NextToken: smithy_client_1.expectString,
1205
+ });
1206
+ Object.assign(contents, doc);
1301
1207
  return contents;
1302
1208
  };
1303
1209
  exports.de_DescribeAccessPointsCommand = de_DescribeAccessPointsCommand;
@@ -1322,10 +1228,9 @@ const de_DescribeAccessPointsCommandError = async (output, context) => {
1322
1228
  throw await de_InternalServerErrorRes(parsedOutput, context);
1323
1229
  default:
1324
1230
  const parsedBody = parsedOutput.body;
1325
- (0, smithy_client_1.throwDefaultError)({
1231
+ return throwDefaultError({
1326
1232
  output,
1327
1233
  parsedBody,
1328
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1329
1234
  errorCode,
1330
1235
  });
1331
1236
  }
@@ -1334,16 +1239,15 @@ const de_DescribeAccountPreferencesCommand = async (output, context) => {
1334
1239
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1335
1240
  return de_DescribeAccountPreferencesCommandError(output, context);
1336
1241
  }
1337
- const contents = map({
1242
+ const contents = (0, smithy_client_1.map)({
1338
1243
  $metadata: deserializeMetadata(output),
1339
1244
  });
1340
1245
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1341
- if (data.NextToken != null) {
1342
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1343
- }
1344
- if (data.ResourceIdPreference != null) {
1345
- contents.ResourceIdPreference = de_ResourceIdPreference(data.ResourceIdPreference, context);
1346
- }
1246
+ const doc = (0, smithy_client_1.take)(data, {
1247
+ NextToken: smithy_client_1.expectString,
1248
+ ResourceIdPreference: smithy_client_1._json,
1249
+ });
1250
+ Object.assign(contents, doc);
1347
1251
  return contents;
1348
1252
  };
1349
1253
  exports.de_DescribeAccountPreferencesCommand = de_DescribeAccountPreferencesCommand;
@@ -1359,10 +1263,9 @@ const de_DescribeAccountPreferencesCommandError = async (output, context) => {
1359
1263
  throw await de_InternalServerErrorRes(parsedOutput, context);
1360
1264
  default:
1361
1265
  const parsedBody = parsedOutput.body;
1362
- (0, smithy_client_1.throwDefaultError)({
1266
+ return throwDefaultError({
1363
1267
  output,
1364
1268
  parsedBody,
1365
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1366
1269
  errorCode,
1367
1270
  });
1368
1271
  }
@@ -1371,13 +1274,14 @@ const de_DescribeBackupPolicyCommand = async (output, context) => {
1371
1274
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1372
1275
  return de_DescribeBackupPolicyCommandError(output, context);
1373
1276
  }
1374
- const contents = map({
1277
+ const contents = (0, smithy_client_1.map)({
1375
1278
  $metadata: deserializeMetadata(output),
1376
1279
  });
1377
1280
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1378
- if (data.BackupPolicy != null) {
1379
- contents.BackupPolicy = de_BackupPolicy(data.BackupPolicy, context);
1380
- }
1281
+ const doc = (0, smithy_client_1.take)(data, {
1282
+ BackupPolicy: smithy_client_1._json,
1283
+ });
1284
+ Object.assign(contents, doc);
1381
1285
  return contents;
1382
1286
  };
1383
1287
  exports.de_DescribeBackupPolicyCommand = de_DescribeBackupPolicyCommand;
@@ -1405,10 +1309,9 @@ const de_DescribeBackupPolicyCommandError = async (output, context) => {
1405
1309
  throw await de_ValidationExceptionRes(parsedOutput, context);
1406
1310
  default:
1407
1311
  const parsedBody = parsedOutput.body;
1408
- (0, smithy_client_1.throwDefaultError)({
1312
+ return throwDefaultError({
1409
1313
  output,
1410
1314
  parsedBody,
1411
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1412
1315
  errorCode,
1413
1316
  });
1414
1317
  }
@@ -1417,16 +1320,15 @@ const de_DescribeFileSystemPolicyCommand = async (output, context) => {
1417
1320
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1418
1321
  return de_DescribeFileSystemPolicyCommandError(output, context);
1419
1322
  }
1420
- const contents = map({
1323
+ const contents = (0, smithy_client_1.map)({
1421
1324
  $metadata: deserializeMetadata(output),
1422
1325
  });
1423
1326
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1424
- if (data.FileSystemId != null) {
1425
- contents.FileSystemId = (0, smithy_client_1.expectString)(data.FileSystemId);
1426
- }
1427
- if (data.Policy != null) {
1428
- contents.Policy = (0, smithy_client_1.expectString)(data.Policy);
1429
- }
1327
+ const doc = (0, smithy_client_1.take)(data, {
1328
+ FileSystemId: smithy_client_1.expectString,
1329
+ Policy: smithy_client_1.expectString,
1330
+ });
1331
+ Object.assign(contents, doc);
1430
1332
  return contents;
1431
1333
  };
1432
1334
  exports.de_DescribeFileSystemPolicyCommand = de_DescribeFileSystemPolicyCommand;
@@ -1451,10 +1353,9 @@ const de_DescribeFileSystemPolicyCommandError = async (output, context) => {
1451
1353
  throw await de_PolicyNotFoundRes(parsedOutput, context);
1452
1354
  default:
1453
1355
  const parsedBody = parsedOutput.body;
1454
- (0, smithy_client_1.throwDefaultError)({
1356
+ return throwDefaultError({
1455
1357
  output,
1456
1358
  parsedBody,
1457
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1458
1359
  errorCode,
1459
1360
  });
1460
1361
  }
@@ -1463,19 +1364,16 @@ const de_DescribeFileSystemsCommand = async (output, context) => {
1463
1364
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1464
1365
  return de_DescribeFileSystemsCommandError(output, context);
1465
1366
  }
1466
- const contents = map({
1367
+ const contents = (0, smithy_client_1.map)({
1467
1368
  $metadata: deserializeMetadata(output),
1468
1369
  });
1469
1370
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1470
- if (data.FileSystems != null) {
1471
- contents.FileSystems = de_FileSystemDescriptions(data.FileSystems, context);
1472
- }
1473
- if (data.Marker != null) {
1474
- contents.Marker = (0, smithy_client_1.expectString)(data.Marker);
1475
- }
1476
- if (data.NextMarker != null) {
1477
- contents.NextMarker = (0, smithy_client_1.expectString)(data.NextMarker);
1478
- }
1371
+ const doc = (0, smithy_client_1.take)(data, {
1372
+ FileSystems: (_) => de_FileSystemDescriptions(_, context),
1373
+ Marker: smithy_client_1.expectString,
1374
+ NextMarker: smithy_client_1.expectString,
1375
+ });
1376
+ Object.assign(contents, doc);
1479
1377
  return contents;
1480
1378
  };
1481
1379
  exports.de_DescribeFileSystemsCommand = de_DescribeFileSystemsCommand;
@@ -1497,10 +1395,9 @@ const de_DescribeFileSystemsCommandError = async (output, context) => {
1497
1395
  throw await de_InternalServerErrorRes(parsedOutput, context);
1498
1396
  default:
1499
1397
  const parsedBody = parsedOutput.body;
1500
- (0, smithy_client_1.throwDefaultError)({
1398
+ return throwDefaultError({
1501
1399
  output,
1502
1400
  parsedBody,
1503
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1504
1401
  errorCode,
1505
1402
  });
1506
1403
  }
@@ -1509,13 +1406,14 @@ const de_DescribeLifecycleConfigurationCommand = async (output, context) => {
1509
1406
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1510
1407
  return de_DescribeLifecycleConfigurationCommandError(output, context);
1511
1408
  }
1512
- const contents = map({
1409
+ const contents = (0, smithy_client_1.map)({
1513
1410
  $metadata: deserializeMetadata(output),
1514
1411
  });
1515
1412
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1516
- if (data.LifecyclePolicies != null) {
1517
- contents.LifecyclePolicies = de_LifecyclePolicies(data.LifecyclePolicies, context);
1518
- }
1413
+ const doc = (0, smithy_client_1.take)(data, {
1414
+ LifecyclePolicies: smithy_client_1._json,
1415
+ });
1416
+ Object.assign(contents, doc);
1519
1417
  return contents;
1520
1418
  };
1521
1419
  exports.de_DescribeLifecycleConfigurationCommand = de_DescribeLifecycleConfigurationCommand;
@@ -1537,10 +1435,9 @@ const de_DescribeLifecycleConfigurationCommandError = async (output, context) =>
1537
1435
  throw await de_InternalServerErrorRes(parsedOutput, context);
1538
1436
  default:
1539
1437
  const parsedBody = parsedOutput.body;
1540
- (0, smithy_client_1.throwDefaultError)({
1438
+ return throwDefaultError({
1541
1439
  output,
1542
1440
  parsedBody,
1543
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1544
1441
  errorCode,
1545
1442
  });
1546
1443
  }
@@ -1549,19 +1446,16 @@ const de_DescribeMountTargetsCommand = async (output, context) => {
1549
1446
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1550
1447
  return de_DescribeMountTargetsCommandError(output, context);
1551
1448
  }
1552
- const contents = map({
1449
+ const contents = (0, smithy_client_1.map)({
1553
1450
  $metadata: deserializeMetadata(output),
1554
1451
  });
1555
1452
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1556
- if (data.Marker != null) {
1557
- contents.Marker = (0, smithy_client_1.expectString)(data.Marker);
1558
- }
1559
- if (data.MountTargets != null) {
1560
- contents.MountTargets = de_MountTargetDescriptions(data.MountTargets, context);
1561
- }
1562
- if (data.NextMarker != null) {
1563
- contents.NextMarker = (0, smithy_client_1.expectString)(data.NextMarker);
1564
- }
1453
+ const doc = (0, smithy_client_1.take)(data, {
1454
+ Marker: smithy_client_1.expectString,
1455
+ MountTargets: smithy_client_1._json,
1456
+ NextMarker: smithy_client_1.expectString,
1457
+ });
1458
+ Object.assign(contents, doc);
1565
1459
  return contents;
1566
1460
  };
1567
1461
  exports.de_DescribeMountTargetsCommand = de_DescribeMountTargetsCommand;
@@ -1589,10 +1483,9 @@ const de_DescribeMountTargetsCommandError = async (output, context) => {
1589
1483
  throw await de_MountTargetNotFoundRes(parsedOutput, context);
1590
1484
  default:
1591
1485
  const parsedBody = parsedOutput.body;
1592
- (0, smithy_client_1.throwDefaultError)({
1486
+ return throwDefaultError({
1593
1487
  output,
1594
1488
  parsedBody,
1595
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1596
1489
  errorCode,
1597
1490
  });
1598
1491
  }
@@ -1601,13 +1494,14 @@ const de_DescribeMountTargetSecurityGroupsCommand = async (output, context) => {
1601
1494
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1602
1495
  return de_DescribeMountTargetSecurityGroupsCommandError(output, context);
1603
1496
  }
1604
- const contents = map({
1497
+ const contents = (0, smithy_client_1.map)({
1605
1498
  $metadata: deserializeMetadata(output),
1606
1499
  });
1607
1500
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1608
- if (data.SecurityGroups != null) {
1609
- contents.SecurityGroups = de_SecurityGroups(data.SecurityGroups, context);
1610
- }
1501
+ const doc = (0, smithy_client_1.take)(data, {
1502
+ SecurityGroups: smithy_client_1._json,
1503
+ });
1504
+ Object.assign(contents, doc);
1611
1505
  return contents;
1612
1506
  };
1613
1507
  exports.de_DescribeMountTargetSecurityGroupsCommand = de_DescribeMountTargetSecurityGroupsCommand;
@@ -1632,10 +1526,9 @@ const de_DescribeMountTargetSecurityGroupsCommandError = async (output, context)
1632
1526
  throw await de_MountTargetNotFoundRes(parsedOutput, context);
1633
1527
  default:
1634
1528
  const parsedBody = parsedOutput.body;
1635
- (0, smithy_client_1.throwDefaultError)({
1529
+ return throwDefaultError({
1636
1530
  output,
1637
1531
  parsedBody,
1638
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1639
1532
  errorCode,
1640
1533
  });
1641
1534
  }
@@ -1644,16 +1537,15 @@ const de_DescribeReplicationConfigurationsCommand = async (output, context) => {
1644
1537
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1645
1538
  return de_DescribeReplicationConfigurationsCommandError(output, context);
1646
1539
  }
1647
- const contents = map({
1540
+ const contents = (0, smithy_client_1.map)({
1648
1541
  $metadata: deserializeMetadata(output),
1649
1542
  });
1650
1543
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1651
- if (data.NextToken != null) {
1652
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1653
- }
1654
- if (data.Replications != null) {
1655
- contents.Replications = de_ReplicationConfigurationDescriptions(data.Replications, context);
1656
- }
1544
+ const doc = (0, smithy_client_1.take)(data, {
1545
+ NextToken: smithy_client_1.expectString,
1546
+ Replications: (_) => de_ReplicationConfigurationDescriptions(_, context),
1547
+ });
1548
+ Object.assign(contents, doc);
1657
1549
  return contents;
1658
1550
  };
1659
1551
  exports.de_DescribeReplicationConfigurationsCommand = de_DescribeReplicationConfigurationsCommand;
@@ -1681,10 +1573,9 @@ const de_DescribeReplicationConfigurationsCommandError = async (output, context)
1681
1573
  throw await de_ValidationExceptionRes(parsedOutput, context);
1682
1574
  default:
1683
1575
  const parsedBody = parsedOutput.body;
1684
- (0, smithy_client_1.throwDefaultError)({
1576
+ return throwDefaultError({
1685
1577
  output,
1686
1578
  parsedBody,
1687
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1688
1579
  errorCode,
1689
1580
  });
1690
1581
  }
@@ -1693,19 +1584,16 @@ const de_DescribeTagsCommand = async (output, context) => {
1693
1584
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1694
1585
  return de_DescribeTagsCommandError(output, context);
1695
1586
  }
1696
- const contents = map({
1587
+ const contents = (0, smithy_client_1.map)({
1697
1588
  $metadata: deserializeMetadata(output),
1698
1589
  });
1699
1590
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1700
- if (data.Marker != null) {
1701
- contents.Marker = (0, smithy_client_1.expectString)(data.Marker);
1702
- }
1703
- if (data.NextMarker != null) {
1704
- contents.NextMarker = (0, smithy_client_1.expectString)(data.NextMarker);
1705
- }
1706
- if (data.Tags != null) {
1707
- contents.Tags = de_Tags(data.Tags, context);
1708
- }
1591
+ const doc = (0, smithy_client_1.take)(data, {
1592
+ Marker: smithy_client_1.expectString,
1593
+ NextMarker: smithy_client_1.expectString,
1594
+ Tags: smithy_client_1._json,
1595
+ });
1596
+ Object.assign(contents, doc);
1709
1597
  return contents;
1710
1598
  };
1711
1599
  exports.de_DescribeTagsCommand = de_DescribeTagsCommand;
@@ -1727,10 +1615,9 @@ const de_DescribeTagsCommandError = async (output, context) => {
1727
1615
  throw await de_InternalServerErrorRes(parsedOutput, context);
1728
1616
  default:
1729
1617
  const parsedBody = parsedOutput.body;
1730
- (0, smithy_client_1.throwDefaultError)({
1618
+ return throwDefaultError({
1731
1619
  output,
1732
1620
  parsedBody,
1733
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1734
1621
  errorCode,
1735
1622
  });
1736
1623
  }
@@ -1739,16 +1626,15 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1739
1626
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1740
1627
  return de_ListTagsForResourceCommandError(output, context);
1741
1628
  }
1742
- const contents = map({
1629
+ const contents = (0, smithy_client_1.map)({
1743
1630
  $metadata: deserializeMetadata(output),
1744
1631
  });
1745
1632
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1746
- if (data.NextToken != null) {
1747
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1748
- }
1749
- if (data.Tags != null) {
1750
- contents.Tags = de_Tags(data.Tags, context);
1751
- }
1633
+ const doc = (0, smithy_client_1.take)(data, {
1634
+ NextToken: smithy_client_1.expectString,
1635
+ Tags: smithy_client_1._json,
1636
+ });
1637
+ Object.assign(contents, doc);
1752
1638
  return contents;
1753
1639
  };
1754
1640
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1773,10 +1659,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1773
1659
  throw await de_InternalServerErrorRes(parsedOutput, context);
1774
1660
  default:
1775
1661
  const parsedBody = parsedOutput.body;
1776
- (0, smithy_client_1.throwDefaultError)({
1662
+ return throwDefaultError({
1777
1663
  output,
1778
1664
  parsedBody,
1779
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1780
1665
  errorCode,
1781
1666
  });
1782
1667
  }
@@ -1785,7 +1670,7 @@ const de_ModifyMountTargetSecurityGroupsCommand = async (output, context) => {
1785
1670
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1786
1671
  return de_ModifyMountTargetSecurityGroupsCommandError(output, context);
1787
1672
  }
1788
- const contents = map({
1673
+ const contents = (0, smithy_client_1.map)({
1789
1674
  $metadata: deserializeMetadata(output),
1790
1675
  });
1791
1676
  await collectBody(output.body, context);
@@ -1819,10 +1704,9 @@ const de_ModifyMountTargetSecurityGroupsCommandError = async (output, context) =
1819
1704
  throw await de_SecurityGroupNotFoundRes(parsedOutput, context);
1820
1705
  default:
1821
1706
  const parsedBody = parsedOutput.body;
1822
- (0, smithy_client_1.throwDefaultError)({
1707
+ return throwDefaultError({
1823
1708
  output,
1824
1709
  parsedBody,
1825
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1826
1710
  errorCode,
1827
1711
  });
1828
1712
  }
@@ -1831,13 +1715,14 @@ const de_PutAccountPreferencesCommand = async (output, context) => {
1831
1715
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1832
1716
  return de_PutAccountPreferencesCommandError(output, context);
1833
1717
  }
1834
- const contents = map({
1718
+ const contents = (0, smithy_client_1.map)({
1835
1719
  $metadata: deserializeMetadata(output),
1836
1720
  });
1837
1721
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1838
- if (data.ResourceIdPreference != null) {
1839
- contents.ResourceIdPreference = de_ResourceIdPreference(data.ResourceIdPreference, context);
1840
- }
1722
+ const doc = (0, smithy_client_1.take)(data, {
1723
+ ResourceIdPreference: smithy_client_1._json,
1724
+ });
1725
+ Object.assign(contents, doc);
1841
1726
  return contents;
1842
1727
  };
1843
1728
  exports.de_PutAccountPreferencesCommand = de_PutAccountPreferencesCommand;
@@ -1856,10 +1741,9 @@ const de_PutAccountPreferencesCommandError = async (output, context) => {
1856
1741
  throw await de_InternalServerErrorRes(parsedOutput, context);
1857
1742
  default:
1858
1743
  const parsedBody = parsedOutput.body;
1859
- (0, smithy_client_1.throwDefaultError)({
1744
+ return throwDefaultError({
1860
1745
  output,
1861
1746
  parsedBody,
1862
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1863
1747
  errorCode,
1864
1748
  });
1865
1749
  }
@@ -1868,13 +1752,14 @@ const de_PutBackupPolicyCommand = async (output, context) => {
1868
1752
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1869
1753
  return de_PutBackupPolicyCommandError(output, context);
1870
1754
  }
1871
- const contents = map({
1755
+ const contents = (0, smithy_client_1.map)({
1872
1756
  $metadata: deserializeMetadata(output),
1873
1757
  });
1874
1758
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1875
- if (data.BackupPolicy != null) {
1876
- contents.BackupPolicy = de_BackupPolicy(data.BackupPolicy, context);
1877
- }
1759
+ const doc = (0, smithy_client_1.take)(data, {
1760
+ BackupPolicy: smithy_client_1._json,
1761
+ });
1762
+ Object.assign(contents, doc);
1878
1763
  return contents;
1879
1764
  };
1880
1765
  exports.de_PutBackupPolicyCommand = de_PutBackupPolicyCommand;
@@ -1902,10 +1787,9 @@ const de_PutBackupPolicyCommandError = async (output, context) => {
1902
1787
  throw await de_ValidationExceptionRes(parsedOutput, context);
1903
1788
  default:
1904
1789
  const parsedBody = parsedOutput.body;
1905
- (0, smithy_client_1.throwDefaultError)({
1790
+ return throwDefaultError({
1906
1791
  output,
1907
1792
  parsedBody,
1908
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1909
1793
  errorCode,
1910
1794
  });
1911
1795
  }
@@ -1914,16 +1798,15 @@ const de_PutFileSystemPolicyCommand = async (output, context) => {
1914
1798
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1915
1799
  return de_PutFileSystemPolicyCommandError(output, context);
1916
1800
  }
1917
- const contents = map({
1801
+ const contents = (0, smithy_client_1.map)({
1918
1802
  $metadata: deserializeMetadata(output),
1919
1803
  });
1920
1804
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1921
- if (data.FileSystemId != null) {
1922
- contents.FileSystemId = (0, smithy_client_1.expectString)(data.FileSystemId);
1923
- }
1924
- if (data.Policy != null) {
1925
- contents.Policy = (0, smithy_client_1.expectString)(data.Policy);
1926
- }
1805
+ const doc = (0, smithy_client_1.take)(data, {
1806
+ FileSystemId: smithy_client_1.expectString,
1807
+ Policy: smithy_client_1.expectString,
1808
+ });
1809
+ Object.assign(contents, doc);
1927
1810
  return contents;
1928
1811
  };
1929
1812
  exports.de_PutFileSystemPolicyCommand = de_PutFileSystemPolicyCommand;
@@ -1951,10 +1834,9 @@ const de_PutFileSystemPolicyCommandError = async (output, context) => {
1951
1834
  throw await de_InvalidPolicyExceptionRes(parsedOutput, context);
1952
1835
  default:
1953
1836
  const parsedBody = parsedOutput.body;
1954
- (0, smithy_client_1.throwDefaultError)({
1837
+ return throwDefaultError({
1955
1838
  output,
1956
1839
  parsedBody,
1957
- exceptionCtor: EFSServiceException_1.EFSServiceException,
1958
1840
  errorCode,
1959
1841
  });
1960
1842
  }
@@ -1963,13 +1845,14 @@ const de_PutLifecycleConfigurationCommand = async (output, context) => {
1963
1845
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1964
1846
  return de_PutLifecycleConfigurationCommandError(output, context);
1965
1847
  }
1966
- const contents = map({
1848
+ const contents = (0, smithy_client_1.map)({
1967
1849
  $metadata: deserializeMetadata(output),
1968
1850
  });
1969
1851
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1970
- if (data.LifecyclePolicies != null) {
1971
- contents.LifecyclePolicies = de_LifecyclePolicies(data.LifecyclePolicies, context);
1972
- }
1852
+ const doc = (0, smithy_client_1.take)(data, {
1853
+ LifecyclePolicies: smithy_client_1._json,
1854
+ });
1855
+ Object.assign(contents, doc);
1973
1856
  return contents;
1974
1857
  };
1975
1858
  exports.de_PutLifecycleConfigurationCommand = de_PutLifecycleConfigurationCommand;
@@ -1994,10 +1877,9 @@ const de_PutLifecycleConfigurationCommandError = async (output, context) => {
1994
1877
  throw await de_InternalServerErrorRes(parsedOutput, context);
1995
1878
  default:
1996
1879
  const parsedBody = parsedOutput.body;
1997
- (0, smithy_client_1.throwDefaultError)({
1880
+ return throwDefaultError({
1998
1881
  output,
1999
1882
  parsedBody,
2000
- exceptionCtor: EFSServiceException_1.EFSServiceException,
2001
1883
  errorCode,
2002
1884
  });
2003
1885
  }
@@ -2006,7 +1888,7 @@ const de_TagResourceCommand = async (output, context) => {
2006
1888
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2007
1889
  return de_TagResourceCommandError(output, context);
2008
1890
  }
2009
- const contents = map({
1891
+ const contents = (0, smithy_client_1.map)({
2010
1892
  $metadata: deserializeMetadata(output),
2011
1893
  });
2012
1894
  await collectBody(output.body, context);
@@ -2034,10 +1916,9 @@ const de_TagResourceCommandError = async (output, context) => {
2034
1916
  throw await de_InternalServerErrorRes(parsedOutput, context);
2035
1917
  default:
2036
1918
  const parsedBody = parsedOutput.body;
2037
- (0, smithy_client_1.throwDefaultError)({
1919
+ return throwDefaultError({
2038
1920
  output,
2039
1921
  parsedBody,
2040
- exceptionCtor: EFSServiceException_1.EFSServiceException,
2041
1922
  errorCode,
2042
1923
  });
2043
1924
  }
@@ -2046,7 +1927,7 @@ const de_UntagResourceCommand = async (output, context) => {
2046
1927
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2047
1928
  return de_UntagResourceCommandError(output, context);
2048
1929
  }
2049
- const contents = map({
1930
+ const contents = (0, smithy_client_1.map)({
2050
1931
  $metadata: deserializeMetadata(output),
2051
1932
  });
2052
1933
  await collectBody(output.body, context);
@@ -2074,10 +1955,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2074
1955
  throw await de_InternalServerErrorRes(parsedOutput, context);
2075
1956
  default:
2076
1957
  const parsedBody = parsedOutput.body;
2077
- (0, smithy_client_1.throwDefaultError)({
1958
+ return throwDefaultError({
2078
1959
  output,
2079
1960
  parsedBody,
2080
- exceptionCtor: EFSServiceException_1.EFSServiceException,
2081
1961
  errorCode,
2082
1962
  });
2083
1963
  }
@@ -2086,61 +1966,30 @@ const de_UpdateFileSystemCommand = async (output, context) => {
2086
1966
  if (output.statusCode !== 202 && output.statusCode >= 300) {
2087
1967
  return de_UpdateFileSystemCommandError(output, context);
2088
1968
  }
2089
- const contents = map({
1969
+ const contents = (0, smithy_client_1.map)({
2090
1970
  $metadata: deserializeMetadata(output),
2091
1971
  });
2092
1972
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2093
- if (data.AvailabilityZoneId != null) {
2094
- contents.AvailabilityZoneId = (0, smithy_client_1.expectString)(data.AvailabilityZoneId);
2095
- }
2096
- if (data.AvailabilityZoneName != null) {
2097
- contents.AvailabilityZoneName = (0, smithy_client_1.expectString)(data.AvailabilityZoneName);
2098
- }
2099
- if (data.CreationTime != null) {
2100
- contents.CreationTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.CreationTime)));
2101
- }
2102
- if (data.CreationToken != null) {
2103
- contents.CreationToken = (0, smithy_client_1.expectString)(data.CreationToken);
2104
- }
2105
- if (data.Encrypted != null) {
2106
- contents.Encrypted = (0, smithy_client_1.expectBoolean)(data.Encrypted);
2107
- }
2108
- if (data.FileSystemArn != null) {
2109
- contents.FileSystemArn = (0, smithy_client_1.expectString)(data.FileSystemArn);
2110
- }
2111
- if (data.FileSystemId != null) {
2112
- contents.FileSystemId = (0, smithy_client_1.expectString)(data.FileSystemId);
2113
- }
2114
- if (data.KmsKeyId != null) {
2115
- contents.KmsKeyId = (0, smithy_client_1.expectString)(data.KmsKeyId);
2116
- }
2117
- if (data.LifeCycleState != null) {
2118
- contents.LifeCycleState = (0, smithy_client_1.expectString)(data.LifeCycleState);
2119
- }
2120
- if (data.Name != null) {
2121
- contents.Name = (0, smithy_client_1.expectString)(data.Name);
2122
- }
2123
- if (data.NumberOfMountTargets != null) {
2124
- contents.NumberOfMountTargets = (0, smithy_client_1.expectInt32)(data.NumberOfMountTargets);
2125
- }
2126
- if (data.OwnerId != null) {
2127
- contents.OwnerId = (0, smithy_client_1.expectString)(data.OwnerId);
2128
- }
2129
- if (data.PerformanceMode != null) {
2130
- contents.PerformanceMode = (0, smithy_client_1.expectString)(data.PerformanceMode);
2131
- }
2132
- if (data.ProvisionedThroughputInMibps != null) {
2133
- contents.ProvisionedThroughputInMibps = (0, smithy_client_1.limitedParseDouble)(data.ProvisionedThroughputInMibps);
2134
- }
2135
- if (data.SizeInBytes != null) {
2136
- contents.SizeInBytes = de_FileSystemSize(data.SizeInBytes, context);
2137
- }
2138
- if (data.Tags != null) {
2139
- contents.Tags = de_Tags(data.Tags, context);
2140
- }
2141
- if (data.ThroughputMode != null) {
2142
- contents.ThroughputMode = (0, smithy_client_1.expectString)(data.ThroughputMode);
2143
- }
1973
+ const doc = (0, smithy_client_1.take)(data, {
1974
+ AvailabilityZoneId: smithy_client_1.expectString,
1975
+ AvailabilityZoneName: smithy_client_1.expectString,
1976
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1977
+ CreationToken: smithy_client_1.expectString,
1978
+ Encrypted: smithy_client_1.expectBoolean,
1979
+ FileSystemArn: smithy_client_1.expectString,
1980
+ FileSystemId: smithy_client_1.expectString,
1981
+ KmsKeyId: smithy_client_1.expectString,
1982
+ LifeCycleState: smithy_client_1.expectString,
1983
+ Name: smithy_client_1.expectString,
1984
+ NumberOfMountTargets: smithy_client_1.expectInt32,
1985
+ OwnerId: smithy_client_1.expectString,
1986
+ PerformanceMode: smithy_client_1.expectString,
1987
+ ProvisionedThroughputInMibps: smithy_client_1.limitedParseDouble,
1988
+ SizeInBytes: (_) => de_FileSystemSize(_, context),
1989
+ Tags: smithy_client_1._json,
1990
+ ThroughputMode: smithy_client_1.expectString,
1991
+ });
1992
+ Object.assign(contents, doc);
2144
1993
  return contents;
2145
1994
  };
2146
1995
  exports.de_UpdateFileSystemCommand = de_UpdateFileSystemCommand;
@@ -2174,27 +2023,23 @@ const de_UpdateFileSystemCommandError = async (output, context) => {
2174
2023
  throw await de_TooManyRequestsRes(parsedOutput, context);
2175
2024
  default:
2176
2025
  const parsedBody = parsedOutput.body;
2177
- (0, smithy_client_1.throwDefaultError)({
2026
+ return throwDefaultError({
2178
2027
  output,
2179
2028
  parsedBody,
2180
- exceptionCtor: EFSServiceException_1.EFSServiceException,
2181
2029
  errorCode,
2182
2030
  });
2183
2031
  }
2184
2032
  };
2185
- const map = smithy_client_1.map;
2033
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(EFSServiceException_1.EFSServiceException);
2186
2034
  const de_AccessPointAlreadyExistsRes = async (parsedOutput, context) => {
2187
- const contents = map({});
2035
+ const contents = (0, smithy_client_1.map)({});
2188
2036
  const data = parsedOutput.body;
2189
- if (data.AccessPointId != null) {
2190
- contents.AccessPointId = (0, smithy_client_1.expectString)(data.AccessPointId);
2191
- }
2192
- if (data.ErrorCode != null) {
2193
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2194
- }
2195
- if (data.Message != null) {
2196
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2197
- }
2037
+ const doc = (0, smithy_client_1.take)(data, {
2038
+ AccessPointId: smithy_client_1.expectString,
2039
+ ErrorCode: smithy_client_1.expectString,
2040
+ Message: smithy_client_1.expectString,
2041
+ });
2042
+ Object.assign(contents, doc);
2198
2043
  const exception = new models_0_1.AccessPointAlreadyExists({
2199
2044
  $metadata: deserializeMetadata(parsedOutput),
2200
2045
  ...contents,
@@ -2202,14 +2047,13 @@ const de_AccessPointAlreadyExistsRes = async (parsedOutput, context) => {
2202
2047
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2203
2048
  };
2204
2049
  const de_AccessPointLimitExceededRes = async (parsedOutput, context) => {
2205
- const contents = map({});
2050
+ const contents = (0, smithy_client_1.map)({});
2206
2051
  const data = parsedOutput.body;
2207
- if (data.ErrorCode != null) {
2208
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2209
- }
2210
- if (data.Message != null) {
2211
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2212
- }
2052
+ const doc = (0, smithy_client_1.take)(data, {
2053
+ ErrorCode: smithy_client_1.expectString,
2054
+ Message: smithy_client_1.expectString,
2055
+ });
2056
+ Object.assign(contents, doc);
2213
2057
  const exception = new models_0_1.AccessPointLimitExceeded({
2214
2058
  $metadata: deserializeMetadata(parsedOutput),
2215
2059
  ...contents,
@@ -2217,14 +2061,13 @@ const de_AccessPointLimitExceededRes = async (parsedOutput, context) => {
2217
2061
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2218
2062
  };
2219
2063
  const de_AccessPointNotFoundRes = async (parsedOutput, context) => {
2220
- const contents = map({});
2064
+ const contents = (0, smithy_client_1.map)({});
2221
2065
  const data = parsedOutput.body;
2222
- if (data.ErrorCode != null) {
2223
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2224
- }
2225
- if (data.Message != null) {
2226
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2227
- }
2066
+ const doc = (0, smithy_client_1.take)(data, {
2067
+ ErrorCode: smithy_client_1.expectString,
2068
+ Message: smithy_client_1.expectString,
2069
+ });
2070
+ Object.assign(contents, doc);
2228
2071
  const exception = new models_0_1.AccessPointNotFound({
2229
2072
  $metadata: deserializeMetadata(parsedOutput),
2230
2073
  ...contents,
@@ -2232,14 +2075,13 @@ const de_AccessPointNotFoundRes = async (parsedOutput, context) => {
2232
2075
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2233
2076
  };
2234
2077
  const de_AvailabilityZonesMismatchRes = async (parsedOutput, context) => {
2235
- const contents = map({});
2078
+ const contents = (0, smithy_client_1.map)({});
2236
2079
  const data = parsedOutput.body;
2237
- if (data.ErrorCode != null) {
2238
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2239
- }
2240
- if (data.Message != null) {
2241
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2242
- }
2080
+ const doc = (0, smithy_client_1.take)(data, {
2081
+ ErrorCode: smithy_client_1.expectString,
2082
+ Message: smithy_client_1.expectString,
2083
+ });
2084
+ Object.assign(contents, doc);
2243
2085
  const exception = new models_0_1.AvailabilityZonesMismatch({
2244
2086
  $metadata: deserializeMetadata(parsedOutput),
2245
2087
  ...contents,
@@ -2247,14 +2089,13 @@ const de_AvailabilityZonesMismatchRes = async (parsedOutput, context) => {
2247
2089
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2248
2090
  };
2249
2091
  const de_BadRequestRes = async (parsedOutput, context) => {
2250
- const contents = map({});
2092
+ const contents = (0, smithy_client_1.map)({});
2251
2093
  const data = parsedOutput.body;
2252
- if (data.ErrorCode != null) {
2253
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2254
- }
2255
- if (data.Message != null) {
2256
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2257
- }
2094
+ const doc = (0, smithy_client_1.take)(data, {
2095
+ ErrorCode: smithy_client_1.expectString,
2096
+ Message: smithy_client_1.expectString,
2097
+ });
2098
+ Object.assign(contents, doc);
2258
2099
  const exception = new models_0_1.BadRequest({
2259
2100
  $metadata: deserializeMetadata(parsedOutput),
2260
2101
  ...contents,
@@ -2262,14 +2103,13 @@ const de_BadRequestRes = async (parsedOutput, context) => {
2262
2103
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2263
2104
  };
2264
2105
  const de_DependencyTimeoutRes = async (parsedOutput, context) => {
2265
- const contents = map({});
2106
+ const contents = (0, smithy_client_1.map)({});
2266
2107
  const data = parsedOutput.body;
2267
- if (data.ErrorCode != null) {
2268
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2269
- }
2270
- if (data.Message != null) {
2271
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2272
- }
2108
+ const doc = (0, smithy_client_1.take)(data, {
2109
+ ErrorCode: smithy_client_1.expectString,
2110
+ Message: smithy_client_1.expectString,
2111
+ });
2112
+ Object.assign(contents, doc);
2273
2113
  const exception = new models_0_1.DependencyTimeout({
2274
2114
  $metadata: deserializeMetadata(parsedOutput),
2275
2115
  ...contents,
@@ -2277,17 +2117,14 @@ const de_DependencyTimeoutRes = async (parsedOutput, context) => {
2277
2117
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2278
2118
  };
2279
2119
  const de_FileSystemAlreadyExistsRes = async (parsedOutput, context) => {
2280
- const contents = map({});
2120
+ const contents = (0, smithy_client_1.map)({});
2281
2121
  const data = parsedOutput.body;
2282
- if (data.ErrorCode != null) {
2283
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2284
- }
2285
- if (data.FileSystemId != null) {
2286
- contents.FileSystemId = (0, smithy_client_1.expectString)(data.FileSystemId);
2287
- }
2288
- if (data.Message != null) {
2289
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2290
- }
2122
+ const doc = (0, smithy_client_1.take)(data, {
2123
+ ErrorCode: smithy_client_1.expectString,
2124
+ FileSystemId: smithy_client_1.expectString,
2125
+ Message: smithy_client_1.expectString,
2126
+ });
2127
+ Object.assign(contents, doc);
2291
2128
  const exception = new models_0_1.FileSystemAlreadyExists({
2292
2129
  $metadata: deserializeMetadata(parsedOutput),
2293
2130
  ...contents,
@@ -2295,14 +2132,13 @@ const de_FileSystemAlreadyExistsRes = async (parsedOutput, context) => {
2295
2132
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2296
2133
  };
2297
2134
  const de_FileSystemInUseRes = async (parsedOutput, context) => {
2298
- const contents = map({});
2135
+ const contents = (0, smithy_client_1.map)({});
2299
2136
  const data = parsedOutput.body;
2300
- if (data.ErrorCode != null) {
2301
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2302
- }
2303
- if (data.Message != null) {
2304
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2305
- }
2137
+ const doc = (0, smithy_client_1.take)(data, {
2138
+ ErrorCode: smithy_client_1.expectString,
2139
+ Message: smithy_client_1.expectString,
2140
+ });
2141
+ Object.assign(contents, doc);
2306
2142
  const exception = new models_0_1.FileSystemInUse({
2307
2143
  $metadata: deserializeMetadata(parsedOutput),
2308
2144
  ...contents,
@@ -2310,14 +2146,13 @@ const de_FileSystemInUseRes = async (parsedOutput, context) => {
2310
2146
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2311
2147
  };
2312
2148
  const de_FileSystemLimitExceededRes = async (parsedOutput, context) => {
2313
- const contents = map({});
2149
+ const contents = (0, smithy_client_1.map)({});
2314
2150
  const data = parsedOutput.body;
2315
- if (data.ErrorCode != null) {
2316
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2317
- }
2318
- if (data.Message != null) {
2319
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2320
- }
2151
+ const doc = (0, smithy_client_1.take)(data, {
2152
+ ErrorCode: smithy_client_1.expectString,
2153
+ Message: smithy_client_1.expectString,
2154
+ });
2155
+ Object.assign(contents, doc);
2321
2156
  const exception = new models_0_1.FileSystemLimitExceeded({
2322
2157
  $metadata: deserializeMetadata(parsedOutput),
2323
2158
  ...contents,
@@ -2325,14 +2160,13 @@ const de_FileSystemLimitExceededRes = async (parsedOutput, context) => {
2325
2160
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2326
2161
  };
2327
2162
  const de_FileSystemNotFoundRes = async (parsedOutput, context) => {
2328
- const contents = map({});
2163
+ const contents = (0, smithy_client_1.map)({});
2329
2164
  const data = parsedOutput.body;
2330
- if (data.ErrorCode != null) {
2331
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2332
- }
2333
- if (data.Message != null) {
2334
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2335
- }
2165
+ const doc = (0, smithy_client_1.take)(data, {
2166
+ ErrorCode: smithy_client_1.expectString,
2167
+ Message: smithy_client_1.expectString,
2168
+ });
2169
+ Object.assign(contents, doc);
2336
2170
  const exception = new models_0_1.FileSystemNotFound({
2337
2171
  $metadata: deserializeMetadata(parsedOutput),
2338
2172
  ...contents,
@@ -2340,14 +2174,13 @@ const de_FileSystemNotFoundRes = async (parsedOutput, context) => {
2340
2174
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2341
2175
  };
2342
2176
  const de_IncorrectFileSystemLifeCycleStateRes = async (parsedOutput, context) => {
2343
- const contents = map({});
2177
+ const contents = (0, smithy_client_1.map)({});
2344
2178
  const data = parsedOutput.body;
2345
- if (data.ErrorCode != null) {
2346
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2347
- }
2348
- if (data.Message != null) {
2349
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2350
- }
2179
+ const doc = (0, smithy_client_1.take)(data, {
2180
+ ErrorCode: smithy_client_1.expectString,
2181
+ Message: smithy_client_1.expectString,
2182
+ });
2183
+ Object.assign(contents, doc);
2351
2184
  const exception = new models_0_1.IncorrectFileSystemLifeCycleState({
2352
2185
  $metadata: deserializeMetadata(parsedOutput),
2353
2186
  ...contents,
@@ -2355,14 +2188,13 @@ const de_IncorrectFileSystemLifeCycleStateRes = async (parsedOutput, context) =>
2355
2188
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2356
2189
  };
2357
2190
  const de_IncorrectMountTargetStateRes = async (parsedOutput, context) => {
2358
- const contents = map({});
2191
+ const contents = (0, smithy_client_1.map)({});
2359
2192
  const data = parsedOutput.body;
2360
- if (data.ErrorCode != null) {
2361
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2362
- }
2363
- if (data.Message != null) {
2364
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2365
- }
2193
+ const doc = (0, smithy_client_1.take)(data, {
2194
+ ErrorCode: smithy_client_1.expectString,
2195
+ Message: smithy_client_1.expectString,
2196
+ });
2197
+ Object.assign(contents, doc);
2366
2198
  const exception = new models_0_1.IncorrectMountTargetState({
2367
2199
  $metadata: deserializeMetadata(parsedOutput),
2368
2200
  ...contents,
@@ -2370,14 +2202,13 @@ const de_IncorrectMountTargetStateRes = async (parsedOutput, context) => {
2370
2202
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2371
2203
  };
2372
2204
  const de_InsufficientThroughputCapacityRes = async (parsedOutput, context) => {
2373
- const contents = map({});
2205
+ const contents = (0, smithy_client_1.map)({});
2374
2206
  const data = parsedOutput.body;
2375
- if (data.ErrorCode != null) {
2376
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2377
- }
2378
- if (data.Message != null) {
2379
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2380
- }
2207
+ const doc = (0, smithy_client_1.take)(data, {
2208
+ ErrorCode: smithy_client_1.expectString,
2209
+ Message: smithy_client_1.expectString,
2210
+ });
2211
+ Object.assign(contents, doc);
2381
2212
  const exception = new models_0_1.InsufficientThroughputCapacity({
2382
2213
  $metadata: deserializeMetadata(parsedOutput),
2383
2214
  ...contents,
@@ -2385,14 +2216,13 @@ const de_InsufficientThroughputCapacityRes = async (parsedOutput, context) => {
2385
2216
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2386
2217
  };
2387
2218
  const de_InternalServerErrorRes = async (parsedOutput, context) => {
2388
- const contents = map({});
2219
+ const contents = (0, smithy_client_1.map)({});
2389
2220
  const data = parsedOutput.body;
2390
- if (data.ErrorCode != null) {
2391
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2392
- }
2393
- if (data.Message != null) {
2394
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2395
- }
2221
+ const doc = (0, smithy_client_1.take)(data, {
2222
+ ErrorCode: smithy_client_1.expectString,
2223
+ Message: smithy_client_1.expectString,
2224
+ });
2225
+ Object.assign(contents, doc);
2396
2226
  const exception = new models_0_1.InternalServerError({
2397
2227
  $metadata: deserializeMetadata(parsedOutput),
2398
2228
  ...contents,
@@ -2400,14 +2230,13 @@ const de_InternalServerErrorRes = async (parsedOutput, context) => {
2400
2230
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2401
2231
  };
2402
2232
  const de_InvalidPolicyExceptionRes = async (parsedOutput, context) => {
2403
- const contents = map({});
2233
+ const contents = (0, smithy_client_1.map)({});
2404
2234
  const data = parsedOutput.body;
2405
- if (data.ErrorCode != null) {
2406
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2407
- }
2408
- if (data.Message != null) {
2409
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2410
- }
2235
+ const doc = (0, smithy_client_1.take)(data, {
2236
+ ErrorCode: smithy_client_1.expectString,
2237
+ Message: smithy_client_1.expectString,
2238
+ });
2239
+ Object.assign(contents, doc);
2411
2240
  const exception = new models_0_1.InvalidPolicyException({
2412
2241
  $metadata: deserializeMetadata(parsedOutput),
2413
2242
  ...contents,
@@ -2415,14 +2244,13 @@ const de_InvalidPolicyExceptionRes = async (parsedOutput, context) => {
2415
2244
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2416
2245
  };
2417
2246
  const de_IpAddressInUseRes = async (parsedOutput, context) => {
2418
- const contents = map({});
2247
+ const contents = (0, smithy_client_1.map)({});
2419
2248
  const data = parsedOutput.body;
2420
- if (data.ErrorCode != null) {
2421
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2422
- }
2423
- if (data.Message != null) {
2424
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2425
- }
2249
+ const doc = (0, smithy_client_1.take)(data, {
2250
+ ErrorCode: smithy_client_1.expectString,
2251
+ Message: smithy_client_1.expectString,
2252
+ });
2253
+ Object.assign(contents, doc);
2426
2254
  const exception = new models_0_1.IpAddressInUse({
2427
2255
  $metadata: deserializeMetadata(parsedOutput),
2428
2256
  ...contents,
@@ -2430,14 +2258,13 @@ const de_IpAddressInUseRes = async (parsedOutput, context) => {
2430
2258
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2431
2259
  };
2432
2260
  const de_MountTargetConflictRes = async (parsedOutput, context) => {
2433
- const contents = map({});
2261
+ const contents = (0, smithy_client_1.map)({});
2434
2262
  const data = parsedOutput.body;
2435
- if (data.ErrorCode != null) {
2436
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2437
- }
2438
- if (data.Message != null) {
2439
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2440
- }
2263
+ const doc = (0, smithy_client_1.take)(data, {
2264
+ ErrorCode: smithy_client_1.expectString,
2265
+ Message: smithy_client_1.expectString,
2266
+ });
2267
+ Object.assign(contents, doc);
2441
2268
  const exception = new models_0_1.MountTargetConflict({
2442
2269
  $metadata: deserializeMetadata(parsedOutput),
2443
2270
  ...contents,
@@ -2445,14 +2272,13 @@ const de_MountTargetConflictRes = async (parsedOutput, context) => {
2445
2272
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2446
2273
  };
2447
2274
  const de_MountTargetNotFoundRes = async (parsedOutput, context) => {
2448
- const contents = map({});
2275
+ const contents = (0, smithy_client_1.map)({});
2449
2276
  const data = parsedOutput.body;
2450
- if (data.ErrorCode != null) {
2451
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2452
- }
2453
- if (data.Message != null) {
2454
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2455
- }
2277
+ const doc = (0, smithy_client_1.take)(data, {
2278
+ ErrorCode: smithy_client_1.expectString,
2279
+ Message: smithy_client_1.expectString,
2280
+ });
2281
+ Object.assign(contents, doc);
2456
2282
  const exception = new models_0_1.MountTargetNotFound({
2457
2283
  $metadata: deserializeMetadata(parsedOutput),
2458
2284
  ...contents,
@@ -2460,14 +2286,13 @@ const de_MountTargetNotFoundRes = async (parsedOutput, context) => {
2460
2286
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2461
2287
  };
2462
2288
  const de_NetworkInterfaceLimitExceededRes = async (parsedOutput, context) => {
2463
- const contents = map({});
2289
+ const contents = (0, smithy_client_1.map)({});
2464
2290
  const data = parsedOutput.body;
2465
- if (data.ErrorCode != null) {
2466
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2467
- }
2468
- if (data.Message != null) {
2469
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2470
- }
2291
+ const doc = (0, smithy_client_1.take)(data, {
2292
+ ErrorCode: smithy_client_1.expectString,
2293
+ Message: smithy_client_1.expectString,
2294
+ });
2295
+ Object.assign(contents, doc);
2471
2296
  const exception = new models_0_1.NetworkInterfaceLimitExceeded({
2472
2297
  $metadata: deserializeMetadata(parsedOutput),
2473
2298
  ...contents,
@@ -2475,14 +2300,13 @@ const de_NetworkInterfaceLimitExceededRes = async (parsedOutput, context) => {
2475
2300
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2476
2301
  };
2477
2302
  const de_NoFreeAddressesInSubnetRes = async (parsedOutput, context) => {
2478
- const contents = map({});
2303
+ const contents = (0, smithy_client_1.map)({});
2479
2304
  const data = parsedOutput.body;
2480
- if (data.ErrorCode != null) {
2481
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2482
- }
2483
- if (data.Message != null) {
2484
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2485
- }
2305
+ const doc = (0, smithy_client_1.take)(data, {
2306
+ ErrorCode: smithy_client_1.expectString,
2307
+ Message: smithy_client_1.expectString,
2308
+ });
2309
+ Object.assign(contents, doc);
2486
2310
  const exception = new models_0_1.NoFreeAddressesInSubnet({
2487
2311
  $metadata: deserializeMetadata(parsedOutput),
2488
2312
  ...contents,
@@ -2490,14 +2314,13 @@ const de_NoFreeAddressesInSubnetRes = async (parsedOutput, context) => {
2490
2314
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2491
2315
  };
2492
2316
  const de_PolicyNotFoundRes = async (parsedOutput, context) => {
2493
- const contents = map({});
2317
+ const contents = (0, smithy_client_1.map)({});
2494
2318
  const data = parsedOutput.body;
2495
- if (data.ErrorCode != null) {
2496
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2497
- }
2498
- if (data.Message != null) {
2499
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2500
- }
2319
+ const doc = (0, smithy_client_1.take)(data, {
2320
+ ErrorCode: smithy_client_1.expectString,
2321
+ Message: smithy_client_1.expectString,
2322
+ });
2323
+ Object.assign(contents, doc);
2501
2324
  const exception = new models_0_1.PolicyNotFound({
2502
2325
  $metadata: deserializeMetadata(parsedOutput),
2503
2326
  ...contents,
@@ -2505,14 +2328,13 @@ const de_PolicyNotFoundRes = async (parsedOutput, context) => {
2505
2328
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2506
2329
  };
2507
2330
  const de_ReplicationNotFoundRes = async (parsedOutput, context) => {
2508
- const contents = map({});
2331
+ const contents = (0, smithy_client_1.map)({});
2509
2332
  const data = parsedOutput.body;
2510
- if (data.ErrorCode != null) {
2511
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2512
- }
2513
- if (data.Message != null) {
2514
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2515
- }
2333
+ const doc = (0, smithy_client_1.take)(data, {
2334
+ ErrorCode: smithy_client_1.expectString,
2335
+ Message: smithy_client_1.expectString,
2336
+ });
2337
+ Object.assign(contents, doc);
2516
2338
  const exception = new models_0_1.ReplicationNotFound({
2517
2339
  $metadata: deserializeMetadata(parsedOutput),
2518
2340
  ...contents,
@@ -2520,14 +2342,13 @@ const de_ReplicationNotFoundRes = async (parsedOutput, context) => {
2520
2342
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2521
2343
  };
2522
2344
  const de_SecurityGroupLimitExceededRes = async (parsedOutput, context) => {
2523
- const contents = map({});
2345
+ const contents = (0, smithy_client_1.map)({});
2524
2346
  const data = parsedOutput.body;
2525
- if (data.ErrorCode != null) {
2526
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2527
- }
2528
- if (data.Message != null) {
2529
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2530
- }
2347
+ const doc = (0, smithy_client_1.take)(data, {
2348
+ ErrorCode: smithy_client_1.expectString,
2349
+ Message: smithy_client_1.expectString,
2350
+ });
2351
+ Object.assign(contents, doc);
2531
2352
  const exception = new models_0_1.SecurityGroupLimitExceeded({
2532
2353
  $metadata: deserializeMetadata(parsedOutput),
2533
2354
  ...contents,
@@ -2535,14 +2356,13 @@ const de_SecurityGroupLimitExceededRes = async (parsedOutput, context) => {
2535
2356
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2536
2357
  };
2537
2358
  const de_SecurityGroupNotFoundRes = async (parsedOutput, context) => {
2538
- const contents = map({});
2359
+ const contents = (0, smithy_client_1.map)({});
2539
2360
  const data = parsedOutput.body;
2540
- if (data.ErrorCode != null) {
2541
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2542
- }
2543
- if (data.Message != null) {
2544
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2545
- }
2361
+ const doc = (0, smithy_client_1.take)(data, {
2362
+ ErrorCode: smithy_client_1.expectString,
2363
+ Message: smithy_client_1.expectString,
2364
+ });
2365
+ Object.assign(contents, doc);
2546
2366
  const exception = new models_0_1.SecurityGroupNotFound({
2547
2367
  $metadata: deserializeMetadata(parsedOutput),
2548
2368
  ...contents,
@@ -2550,14 +2370,13 @@ const de_SecurityGroupNotFoundRes = async (parsedOutput, context) => {
2550
2370
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2551
2371
  };
2552
2372
  const de_SubnetNotFoundRes = async (parsedOutput, context) => {
2553
- const contents = map({});
2373
+ const contents = (0, smithy_client_1.map)({});
2554
2374
  const data = parsedOutput.body;
2555
- if (data.ErrorCode != null) {
2556
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2557
- }
2558
- if (data.Message != null) {
2559
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2560
- }
2375
+ const doc = (0, smithy_client_1.take)(data, {
2376
+ ErrorCode: smithy_client_1.expectString,
2377
+ Message: smithy_client_1.expectString,
2378
+ });
2379
+ Object.assign(contents, doc);
2561
2380
  const exception = new models_0_1.SubnetNotFound({
2562
2381
  $metadata: deserializeMetadata(parsedOutput),
2563
2382
  ...contents,
@@ -2565,14 +2384,13 @@ const de_SubnetNotFoundRes = async (parsedOutput, context) => {
2565
2384
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2566
2385
  };
2567
2386
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2568
- const contents = map({});
2387
+ const contents = (0, smithy_client_1.map)({});
2569
2388
  const data = parsedOutput.body;
2570
- if (data.ErrorCode != null) {
2571
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2572
- }
2573
- if (data.Message != null) {
2574
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2575
- }
2389
+ const doc = (0, smithy_client_1.take)(data, {
2390
+ ErrorCode: smithy_client_1.expectString,
2391
+ Message: smithy_client_1.expectString,
2392
+ });
2393
+ Object.assign(contents, doc);
2576
2394
  const exception = new models_0_1.ThrottlingException({
2577
2395
  $metadata: deserializeMetadata(parsedOutput),
2578
2396
  ...contents,
@@ -2580,14 +2398,13 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2580
2398
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2581
2399
  };
2582
2400
  const de_ThroughputLimitExceededRes = async (parsedOutput, context) => {
2583
- const contents = map({});
2401
+ const contents = (0, smithy_client_1.map)({});
2584
2402
  const data = parsedOutput.body;
2585
- if (data.ErrorCode != null) {
2586
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2587
- }
2588
- if (data.Message != null) {
2589
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2590
- }
2403
+ const doc = (0, smithy_client_1.take)(data, {
2404
+ ErrorCode: smithy_client_1.expectString,
2405
+ Message: smithy_client_1.expectString,
2406
+ });
2407
+ Object.assign(contents, doc);
2591
2408
  const exception = new models_0_1.ThroughputLimitExceeded({
2592
2409
  $metadata: deserializeMetadata(parsedOutput),
2593
2410
  ...contents,
@@ -2595,14 +2412,13 @@ const de_ThroughputLimitExceededRes = async (parsedOutput, context) => {
2595
2412
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2596
2413
  };
2597
2414
  const de_TooManyRequestsRes = async (parsedOutput, context) => {
2598
- const contents = map({});
2415
+ const contents = (0, smithy_client_1.map)({});
2599
2416
  const data = parsedOutput.body;
2600
- if (data.ErrorCode != null) {
2601
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2602
- }
2603
- if (data.Message != null) {
2604
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2605
- }
2417
+ const doc = (0, smithy_client_1.take)(data, {
2418
+ ErrorCode: smithy_client_1.expectString,
2419
+ Message: smithy_client_1.expectString,
2420
+ });
2421
+ Object.assign(contents, doc);
2606
2422
  const exception = new models_0_1.TooManyRequests({
2607
2423
  $metadata: deserializeMetadata(parsedOutput),
2608
2424
  ...contents,
@@ -2610,14 +2426,13 @@ const de_TooManyRequestsRes = async (parsedOutput, context) => {
2610
2426
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2611
2427
  };
2612
2428
  const de_UnsupportedAvailabilityZoneRes = async (parsedOutput, context) => {
2613
- const contents = map({});
2429
+ const contents = (0, smithy_client_1.map)({});
2614
2430
  const data = parsedOutput.body;
2615
- if (data.ErrorCode != null) {
2616
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2617
- }
2618
- if (data.Message != null) {
2619
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2620
- }
2431
+ const doc = (0, smithy_client_1.take)(data, {
2432
+ ErrorCode: smithy_client_1.expectString,
2433
+ Message: smithy_client_1.expectString,
2434
+ });
2435
+ Object.assign(contents, doc);
2621
2436
  const exception = new models_0_1.UnsupportedAvailabilityZone({
2622
2437
  $metadata: deserializeMetadata(parsedOutput),
2623
2438
  ...contents,
@@ -2625,342 +2440,90 @@ const de_UnsupportedAvailabilityZoneRes = async (parsedOutput, context) => {
2625
2440
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2626
2441
  };
2627
2442
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2628
- const contents = map({});
2443
+ const contents = (0, smithy_client_1.map)({});
2629
2444
  const data = parsedOutput.body;
2630
- if (data.ErrorCode != null) {
2631
- contents.ErrorCode = (0, smithy_client_1.expectString)(data.ErrorCode);
2632
- }
2633
- if (data.Message != null) {
2634
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2635
- }
2445
+ const doc = (0, smithy_client_1.take)(data, {
2446
+ ErrorCode: smithy_client_1.expectString,
2447
+ Message: smithy_client_1.expectString,
2448
+ });
2449
+ Object.assign(contents, doc);
2636
2450
  const exception = new models_0_1.ValidationException({
2637
2451
  $metadata: deserializeMetadata(parsedOutput),
2638
2452
  ...contents,
2639
2453
  });
2640
2454
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2641
2455
  };
2642
- const se_BackupPolicy = (input, context) => {
2643
- return {
2644
- ...(input.Status != null && { Status: input.Status }),
2645
- };
2646
- };
2647
- const se_CreationInfo = (input, context) => {
2648
- return {
2649
- ...(input.OwnerGid != null && { OwnerGid: input.OwnerGid }),
2650
- ...(input.OwnerUid != null && { OwnerUid: input.OwnerUid }),
2651
- ...(input.Permissions != null && { Permissions: input.Permissions }),
2652
- };
2653
- };
2654
- const se_DestinationsToCreate = (input, context) => {
2655
- return input
2656
- .filter((e) => e != null)
2657
- .map((entry) => {
2658
- return se_DestinationToCreate(entry, context);
2659
- });
2660
- };
2661
- const se_DestinationToCreate = (input, context) => {
2662
- return {
2663
- ...(input.AvailabilityZoneName != null && { AvailabilityZoneName: input.AvailabilityZoneName }),
2664
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
2665
- ...(input.Region != null && { Region: input.Region }),
2666
- };
2667
- };
2668
- const se_LifecyclePolicies = (input, context) => {
2669
- return input
2670
- .filter((e) => e != null)
2671
- .map((entry) => {
2672
- return se_LifecyclePolicy(entry, context);
2673
- });
2674
- };
2675
- const se_LifecyclePolicy = (input, context) => {
2676
- return {
2677
- ...(input.TransitionToIA != null && { TransitionToIA: input.TransitionToIA }),
2678
- ...(input.TransitionToPrimaryStorageClass != null && {
2679
- TransitionToPrimaryStorageClass: input.TransitionToPrimaryStorageClass,
2680
- }),
2681
- };
2682
- };
2683
- const se_PosixUser = (input, context) => {
2684
- return {
2685
- ...(input.Gid != null && { Gid: input.Gid }),
2686
- ...(input.SecondaryGids != null && { SecondaryGids: se_SecondaryGids(input.SecondaryGids, context) }),
2687
- ...(input.Uid != null && { Uid: input.Uid }),
2688
- };
2689
- };
2690
- const se_RootDirectory = (input, context) => {
2691
- return {
2692
- ...(input.CreationInfo != null && { CreationInfo: se_CreationInfo(input.CreationInfo, context) }),
2693
- ...(input.Path != null && { Path: input.Path }),
2694
- };
2695
- };
2696
- const se_SecondaryGids = (input, context) => {
2697
- return input
2698
- .filter((e) => e != null)
2699
- .map((entry) => {
2700
- return entry;
2701
- });
2702
- };
2703
- const se_SecurityGroups = (input, context) => {
2704
- return input
2705
- .filter((e) => e != null)
2706
- .map((entry) => {
2707
- return entry;
2708
- });
2709
- };
2710
- const se_Tag = (input, context) => {
2711
- return {
2712
- ...(input.Key != null && { Key: input.Key }),
2713
- ...(input.Value != null && { Value: input.Value }),
2714
- };
2715
- };
2716
- const se_TagKeys = (input, context) => {
2717
- return input
2718
- .filter((e) => e != null)
2719
- .map((entry) => {
2720
- return entry;
2721
- });
2722
- };
2723
- const se_Tags = (input, context) => {
2724
- return input
2725
- .filter((e) => e != null)
2726
- .map((entry) => {
2727
- return se_Tag(entry, context);
2728
- });
2729
- };
2730
- const de_AccessPointDescription = (output, context) => {
2731
- return {
2732
- AccessPointArn: (0, smithy_client_1.expectString)(output.AccessPointArn),
2733
- AccessPointId: (0, smithy_client_1.expectString)(output.AccessPointId),
2734
- ClientToken: (0, smithy_client_1.expectString)(output.ClientToken),
2735
- FileSystemId: (0, smithy_client_1.expectString)(output.FileSystemId),
2736
- LifeCycleState: (0, smithy_client_1.expectString)(output.LifeCycleState),
2737
- Name: (0, smithy_client_1.expectString)(output.Name),
2738
- OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
2739
- PosixUser: output.PosixUser != null ? de_PosixUser(output.PosixUser, context) : undefined,
2740
- RootDirectory: output.RootDirectory != null ? de_RootDirectory(output.RootDirectory, context) : undefined,
2741
- Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined,
2742
- };
2743
- };
2744
- const de_AccessPointDescriptions = (output, context) => {
2745
- const retVal = (output || [])
2746
- .filter((e) => e != null)
2747
- .map((entry) => {
2748
- if (entry === null) {
2749
- return null;
2750
- }
2751
- return de_AccessPointDescription(entry, context);
2752
- });
2753
- return retVal;
2754
- };
2755
- const de_BackupPolicy = (output, context) => {
2756
- return {
2757
- Status: (0, smithy_client_1.expectString)(output.Status),
2758
- };
2759
- };
2760
- const de_CreationInfo = (output, context) => {
2761
- return {
2762
- OwnerGid: (0, smithy_client_1.expectLong)(output.OwnerGid),
2763
- OwnerUid: (0, smithy_client_1.expectLong)(output.OwnerUid),
2764
- Permissions: (0, smithy_client_1.expectString)(output.Permissions),
2765
- };
2766
- };
2767
2456
  const de_Destination = (output, context) => {
2768
- return {
2769
- FileSystemId: (0, smithy_client_1.expectString)(output.FileSystemId),
2770
- LastReplicatedTimestamp: output.LastReplicatedTimestamp != null
2771
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastReplicatedTimestamp)))
2772
- : undefined,
2773
- Region: (0, smithy_client_1.expectString)(output.Region),
2774
- Status: (0, smithy_client_1.expectString)(output.Status),
2775
- };
2457
+ return (0, smithy_client_1.take)(output, {
2458
+ FileSystemId: smithy_client_1.expectString,
2459
+ LastReplicatedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2460
+ Region: smithy_client_1.expectString,
2461
+ Status: smithy_client_1.expectString,
2462
+ });
2776
2463
  };
2777
2464
  const de_Destinations = (output, context) => {
2778
2465
  const retVal = (output || [])
2779
2466
  .filter((e) => e != null)
2780
2467
  .map((entry) => {
2781
- if (entry === null) {
2782
- return null;
2783
- }
2784
2468
  return de_Destination(entry, context);
2785
2469
  });
2786
2470
  return retVal;
2787
2471
  };
2788
2472
  const de_FileSystemDescription = (output, context) => {
2789
- return {
2790
- AvailabilityZoneId: (0, smithy_client_1.expectString)(output.AvailabilityZoneId),
2791
- AvailabilityZoneName: (0, smithy_client_1.expectString)(output.AvailabilityZoneName),
2792
- CreationTime: output.CreationTime != null
2793
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
2794
- : undefined,
2795
- CreationToken: (0, smithy_client_1.expectString)(output.CreationToken),
2796
- Encrypted: (0, smithy_client_1.expectBoolean)(output.Encrypted),
2797
- FileSystemArn: (0, smithy_client_1.expectString)(output.FileSystemArn),
2798
- FileSystemId: (0, smithy_client_1.expectString)(output.FileSystemId),
2799
- KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
2800
- LifeCycleState: (0, smithy_client_1.expectString)(output.LifeCycleState),
2801
- Name: (0, smithy_client_1.expectString)(output.Name),
2802
- NumberOfMountTargets: (0, smithy_client_1.expectInt32)(output.NumberOfMountTargets),
2803
- OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
2804
- PerformanceMode: (0, smithy_client_1.expectString)(output.PerformanceMode),
2805
- ProvisionedThroughputInMibps: (0, smithy_client_1.limitedParseDouble)(output.ProvisionedThroughputInMibps),
2806
- SizeInBytes: output.SizeInBytes != null ? de_FileSystemSize(output.SizeInBytes, context) : undefined,
2807
- Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined,
2808
- ThroughputMode: (0, smithy_client_1.expectString)(output.ThroughputMode),
2809
- };
2473
+ return (0, smithy_client_1.take)(output, {
2474
+ AvailabilityZoneId: smithy_client_1.expectString,
2475
+ AvailabilityZoneName: smithy_client_1.expectString,
2476
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2477
+ CreationToken: smithy_client_1.expectString,
2478
+ Encrypted: smithy_client_1.expectBoolean,
2479
+ FileSystemArn: smithy_client_1.expectString,
2480
+ FileSystemId: smithy_client_1.expectString,
2481
+ KmsKeyId: smithy_client_1.expectString,
2482
+ LifeCycleState: smithy_client_1.expectString,
2483
+ Name: smithy_client_1.expectString,
2484
+ NumberOfMountTargets: smithy_client_1.expectInt32,
2485
+ OwnerId: smithy_client_1.expectString,
2486
+ PerformanceMode: smithy_client_1.expectString,
2487
+ ProvisionedThroughputInMibps: smithy_client_1.limitedParseDouble,
2488
+ SizeInBytes: (_) => de_FileSystemSize(_, context),
2489
+ Tags: smithy_client_1._json,
2490
+ ThroughputMode: smithy_client_1.expectString,
2491
+ });
2810
2492
  };
2811
2493
  const de_FileSystemDescriptions = (output, context) => {
2812
2494
  const retVal = (output || [])
2813
2495
  .filter((e) => e != null)
2814
2496
  .map((entry) => {
2815
- if (entry === null) {
2816
- return null;
2817
- }
2818
2497
  return de_FileSystemDescription(entry, context);
2819
2498
  });
2820
2499
  return retVal;
2821
2500
  };
2822
2501
  const de_FileSystemSize = (output, context) => {
2823
- return {
2824
- Timestamp: output.Timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp))) : undefined,
2825
- Value: (0, smithy_client_1.expectLong)(output.Value),
2826
- ValueInIA: (0, smithy_client_1.expectLong)(output.ValueInIA),
2827
- ValueInStandard: (0, smithy_client_1.expectLong)(output.ValueInStandard),
2828
- };
2829
- };
2830
- const de_LifecyclePolicies = (output, context) => {
2831
- const retVal = (output || [])
2832
- .filter((e) => e != null)
2833
- .map((entry) => {
2834
- if (entry === null) {
2835
- return null;
2836
- }
2837
- return de_LifecyclePolicy(entry, context);
2838
- });
2839
- return retVal;
2840
- };
2841
- const de_LifecyclePolicy = (output, context) => {
2842
- return {
2843
- TransitionToIA: (0, smithy_client_1.expectString)(output.TransitionToIA),
2844
- TransitionToPrimaryStorageClass: (0, smithy_client_1.expectString)(output.TransitionToPrimaryStorageClass),
2845
- };
2846
- };
2847
- const de_MountTargetDescription = (output, context) => {
2848
- return {
2849
- AvailabilityZoneId: (0, smithy_client_1.expectString)(output.AvailabilityZoneId),
2850
- AvailabilityZoneName: (0, smithy_client_1.expectString)(output.AvailabilityZoneName),
2851
- FileSystemId: (0, smithy_client_1.expectString)(output.FileSystemId),
2852
- IpAddress: (0, smithy_client_1.expectString)(output.IpAddress),
2853
- LifeCycleState: (0, smithy_client_1.expectString)(output.LifeCycleState),
2854
- MountTargetId: (0, smithy_client_1.expectString)(output.MountTargetId),
2855
- NetworkInterfaceId: (0, smithy_client_1.expectString)(output.NetworkInterfaceId),
2856
- OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
2857
- SubnetId: (0, smithy_client_1.expectString)(output.SubnetId),
2858
- VpcId: (0, smithy_client_1.expectString)(output.VpcId),
2859
- };
2860
- };
2861
- const de_MountTargetDescriptions = (output, context) => {
2862
- const retVal = (output || [])
2863
- .filter((e) => e != null)
2864
- .map((entry) => {
2865
- if (entry === null) {
2866
- return null;
2867
- }
2868
- return de_MountTargetDescription(entry, context);
2502
+ return (0, smithy_client_1.take)(output, {
2503
+ Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2504
+ Value: smithy_client_1.expectLong,
2505
+ ValueInIA: smithy_client_1.expectLong,
2506
+ ValueInStandard: smithy_client_1.expectLong,
2869
2507
  });
2870
- return retVal;
2871
- };
2872
- const de_PosixUser = (output, context) => {
2873
- return {
2874
- Gid: (0, smithy_client_1.expectLong)(output.Gid),
2875
- SecondaryGids: output.SecondaryGids != null ? de_SecondaryGids(output.SecondaryGids, context) : undefined,
2876
- Uid: (0, smithy_client_1.expectLong)(output.Uid),
2877
- };
2878
2508
  };
2879
2509
  const de_ReplicationConfigurationDescription = (output, context) => {
2880
- return {
2881
- CreationTime: output.CreationTime != null
2882
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
2883
- : undefined,
2884
- Destinations: output.Destinations != null ? de_Destinations(output.Destinations, context) : undefined,
2885
- OriginalSourceFileSystemArn: (0, smithy_client_1.expectString)(output.OriginalSourceFileSystemArn),
2886
- SourceFileSystemArn: (0, smithy_client_1.expectString)(output.SourceFileSystemArn),
2887
- SourceFileSystemId: (0, smithy_client_1.expectString)(output.SourceFileSystemId),
2888
- SourceFileSystemRegion: (0, smithy_client_1.expectString)(output.SourceFileSystemRegion),
2889
- };
2510
+ return (0, smithy_client_1.take)(output, {
2511
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2512
+ Destinations: (_) => de_Destinations(_, context),
2513
+ OriginalSourceFileSystemArn: smithy_client_1.expectString,
2514
+ SourceFileSystemArn: smithy_client_1.expectString,
2515
+ SourceFileSystemId: smithy_client_1.expectString,
2516
+ SourceFileSystemRegion: smithy_client_1.expectString,
2517
+ });
2890
2518
  };
2891
2519
  const de_ReplicationConfigurationDescriptions = (output, context) => {
2892
2520
  const retVal = (output || [])
2893
2521
  .filter((e) => e != null)
2894
2522
  .map((entry) => {
2895
- if (entry === null) {
2896
- return null;
2897
- }
2898
2523
  return de_ReplicationConfigurationDescription(entry, context);
2899
2524
  });
2900
2525
  return retVal;
2901
2526
  };
2902
- const de_ResourceIdPreference = (output, context) => {
2903
- return {
2904
- ResourceIdType: (0, smithy_client_1.expectString)(output.ResourceIdType),
2905
- Resources: output.Resources != null ? de_Resources(output.Resources, context) : undefined,
2906
- };
2907
- };
2908
- const de_Resources = (output, context) => {
2909
- const retVal = (output || [])
2910
- .filter((e) => e != null)
2911
- .map((entry) => {
2912
- if (entry === null) {
2913
- return null;
2914
- }
2915
- return (0, smithy_client_1.expectString)(entry);
2916
- });
2917
- return retVal;
2918
- };
2919
- const de_RootDirectory = (output, context) => {
2920
- return {
2921
- CreationInfo: output.CreationInfo != null ? de_CreationInfo(output.CreationInfo, context) : undefined,
2922
- Path: (0, smithy_client_1.expectString)(output.Path),
2923
- };
2924
- };
2925
- const de_SecondaryGids = (output, context) => {
2926
- const retVal = (output || [])
2927
- .filter((e) => e != null)
2928
- .map((entry) => {
2929
- if (entry === null) {
2930
- return null;
2931
- }
2932
- return (0, smithy_client_1.expectLong)(entry);
2933
- });
2934
- return retVal;
2935
- };
2936
- const de_SecurityGroups = (output, context) => {
2937
- const retVal = (output || [])
2938
- .filter((e) => e != null)
2939
- .map((entry) => {
2940
- if (entry === null) {
2941
- return null;
2942
- }
2943
- return (0, smithy_client_1.expectString)(entry);
2944
- });
2945
- return retVal;
2946
- };
2947
- const de_Tag = (output, context) => {
2948
- return {
2949
- Key: (0, smithy_client_1.expectString)(output.Key),
2950
- Value: (0, smithy_client_1.expectString)(output.Value),
2951
- };
2952
- };
2953
- const de_Tags = (output, context) => {
2954
- const retVal = (output || [])
2955
- .filter((e) => e != null)
2956
- .map((entry) => {
2957
- if (entry === null) {
2958
- return null;
2959
- }
2960
- return de_Tag(entry, context);
2961
- });
2962
- return retVal;
2963
- };
2964
2527
  const deserializeMetadata = (output) => ({
2965
2528
  httpStatusCode: output.statusCode,
2966
2529
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],