@aws-sdk/client-dataexchange 3.312.0 → 3.316.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http";
2
- import { convertMap, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, convertMap, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { DataExchangeServiceException as __BaseException } from "../models/DataExchangeServiceException";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_CancelJobCommand = async (input, context) => {
@@ -25,12 +25,12 @@ export const se_CreateDataSetCommand = async (input, context) => {
25
25
  };
26
26
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets";
27
27
  let body;
28
- body = JSON.stringify({
29
- ...(input.AssetType != null && { AssetType: input.AssetType }),
30
- ...(input.Description != null && { Description: input.Description }),
31
- ...(input.Name != null && { Name: input.Name }),
32
- ...(input.Tags != null && { Tags: se_MapOf__string(input.Tags, context) }),
33
- });
28
+ body = JSON.stringify(take(input, {
29
+ AssetType: [],
30
+ Description: [],
31
+ Name: [],
32
+ Tags: (_) => _json(_),
33
+ }));
34
34
  return new __HttpRequest({
35
35
  protocol,
36
36
  hostname,
@@ -48,10 +48,10 @@ export const se_CreateEventActionCommand = async (input, context) => {
48
48
  };
49
49
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions";
50
50
  let body;
51
- body = JSON.stringify({
52
- ...(input.Action != null && { Action: se_Action(input.Action, context) }),
53
- ...(input.Event != null && { Event: se_Event(input.Event, context) }),
54
- });
51
+ body = JSON.stringify(take(input, {
52
+ Action: (_) => _json(_),
53
+ Event: (_) => _json(_),
54
+ }));
55
55
  return new __HttpRequest({
56
56
  protocol,
57
57
  hostname,
@@ -69,10 +69,10 @@ export const se_CreateJobCommand = async (input, context) => {
69
69
  };
70
70
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs";
71
71
  let body;
72
- body = JSON.stringify({
73
- ...(input.Details != null && { Details: se_RequestDetails(input.Details, context) }),
74
- ...(input.Type != null && { Type: input.Type }),
75
- });
72
+ body = JSON.stringify(take(input, {
73
+ Details: (_) => _json(_),
74
+ Type: [],
75
+ }));
76
76
  return new __HttpRequest({
77
77
  protocol,
78
78
  hostname,
@@ -91,10 +91,10 @@ export const se_CreateRevisionCommand = async (input, context) => {
91
91
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}/revisions";
92
92
  resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
93
93
  let body;
94
- body = JSON.stringify({
95
- ...(input.Comment != null && { Comment: input.Comment }),
96
- ...(input.Tags != null && { Tags: se_MapOf__string(input.Tags, context) }),
97
- });
94
+ body = JSON.stringify(take(input, {
95
+ Comment: [],
96
+ Tags: (_) => _json(_),
97
+ }));
98
98
  return new __HttpRequest({
99
99
  protocol,
100
100
  hostname,
@@ -393,9 +393,9 @@ export const se_RevokeRevisionCommand = async (input, context) => {
393
393
  resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
394
394
  resolvedPath = __resolvedPath(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
395
395
  let body;
396
- body = JSON.stringify({
397
- ...(input.RevocationComment != null && { RevocationComment: input.RevocationComment }),
398
- });
396
+ body = JSON.stringify(take(input, {
397
+ RevocationComment: [],
398
+ }));
399
399
  return new __HttpRequest({
400
400
  protocol,
401
401
  hostname,
@@ -471,9 +471,9 @@ export const se_TagResourceCommand = async (input, context) => {
471
471
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
472
472
  resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
473
473
  let body;
474
- body = JSON.stringify({
475
- ...(input.Tags != null && { tags: se_MapOf__string(input.Tags, context) }),
476
- });
474
+ body = JSON.stringify(take(input, {
475
+ tags: [, (_) => _json(_), `Tags`],
476
+ }));
477
477
  return new __HttpRequest({
478
478
  protocol,
479
479
  hostname,
@@ -518,9 +518,9 @@ export const se_UpdateAssetCommand = async (input, context) => {
518
518
  resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
519
519
  resolvedPath = __resolvedPath(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
520
520
  let body;
521
- body = JSON.stringify({
522
- ...(input.Name != null && { Name: input.Name }),
523
- });
521
+ body = JSON.stringify(take(input, {
522
+ Name: [],
523
+ }));
524
524
  return new __HttpRequest({
525
525
  protocol,
526
526
  hostname,
@@ -539,10 +539,10 @@ export const se_UpdateDataSetCommand = async (input, context) => {
539
539
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}";
540
540
  resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
541
541
  let body;
542
- body = JSON.stringify({
543
- ...(input.Description != null && { Description: input.Description }),
544
- ...(input.Name != null && { Name: input.Name }),
545
- });
542
+ body = JSON.stringify(take(input, {
543
+ Description: [],
544
+ Name: [],
545
+ }));
546
546
  return new __HttpRequest({
547
547
  protocol,
548
548
  hostname,
@@ -561,9 +561,9 @@ export const se_UpdateEventActionCommand = async (input, context) => {
561
561
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}";
562
562
  resolvedPath = __resolvedPath(resolvedPath, input, "EventActionId", () => input.EventActionId, "{EventActionId}", false);
563
563
  let body;
564
- body = JSON.stringify({
565
- ...(input.Action != null && { Action: se_Action(input.Action, context) }),
566
- });
564
+ body = JSON.stringify(take(input, {
565
+ Action: (_) => _json(_),
566
+ }));
567
567
  return new __HttpRequest({
568
568
  protocol,
569
569
  hostname,
@@ -584,10 +584,10 @@ export const se_UpdateRevisionCommand = async (input, context) => {
584
584
  resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
585
585
  resolvedPath = __resolvedPath(resolvedPath, input, "RevisionId", () => input.RevisionId, "{RevisionId}", false);
586
586
  let body;
587
- body = JSON.stringify({
588
- ...(input.Comment != null && { Comment: input.Comment }),
589
- ...(input.Finalized != null && { Finalized: input.Finalized }),
590
- });
587
+ body = JSON.stringify(take(input, {
588
+ Comment: [],
589
+ Finalized: [],
590
+ }));
591
591
  return new __HttpRequest({
592
592
  protocol,
593
593
  hostname,
@@ -632,10 +632,9 @@ const de_CancelJobCommandError = async (output, context) => {
632
632
  throw await de_ValidationExceptionRes(parsedOutput, context);
633
633
  default:
634
634
  const parsedBody = parsedOutput.body;
635
- throwDefaultError({
635
+ return throwDefaultError({
636
636
  output,
637
637
  parsedBody,
638
- exceptionCtor: __BaseException,
639
638
  errorCode,
640
639
  });
641
640
  }
@@ -648,39 +647,20 @@ export const de_CreateDataSetCommand = async (output, context) => {
648
647
  $metadata: deserializeMetadata(output),
649
648
  });
650
649
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
651
- if (data.Arn != null) {
652
- contents.Arn = __expectString(data.Arn);
653
- }
654
- if (data.AssetType != null) {
655
- contents.AssetType = __expectString(data.AssetType);
656
- }
657
- if (data.CreatedAt != null) {
658
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
659
- }
660
- if (data.Description != null) {
661
- contents.Description = __expectString(data.Description);
662
- }
663
- if (data.Id != null) {
664
- contents.Id = __expectString(data.Id);
665
- }
666
- if (data.Name != null) {
667
- contents.Name = __expectString(data.Name);
668
- }
669
- if (data.Origin != null) {
670
- contents.Origin = __expectString(data.Origin);
671
- }
672
- if (data.OriginDetails != null) {
673
- contents.OriginDetails = de_OriginDetails(data.OriginDetails, context);
674
- }
675
- if (data.SourceId != null) {
676
- contents.SourceId = __expectString(data.SourceId);
677
- }
678
- if (data.Tags != null) {
679
- contents.Tags = de_MapOf__string(data.Tags, context);
680
- }
681
- if (data.UpdatedAt != null) {
682
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
683
- }
650
+ const doc = take(data, {
651
+ Arn: __expectString,
652
+ AssetType: __expectString,
653
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
654
+ Description: __expectString,
655
+ Id: __expectString,
656
+ Name: __expectString,
657
+ Origin: __expectString,
658
+ OriginDetails: _json,
659
+ SourceId: __expectString,
660
+ Tags: _json,
661
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
662
+ });
663
+ Object.assign(contents, doc);
684
664
  return contents;
685
665
  };
686
666
  const de_CreateDataSetCommandError = async (output, context) => {
@@ -707,10 +687,9 @@ const de_CreateDataSetCommandError = async (output, context) => {
707
687
  throw await de_ValidationExceptionRes(parsedOutput, context);
708
688
  default:
709
689
  const parsedBody = parsedOutput.body;
710
- throwDefaultError({
690
+ return throwDefaultError({
711
691
  output,
712
692
  parsedBody,
713
- exceptionCtor: __BaseException,
714
693
  errorCode,
715
694
  });
716
695
  }
@@ -723,24 +702,15 @@ export const de_CreateEventActionCommand = async (output, context) => {
723
702
  $metadata: deserializeMetadata(output),
724
703
  });
725
704
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
726
- if (data.Action != null) {
727
- contents.Action = de_Action(data.Action, context);
728
- }
729
- if (data.Arn != null) {
730
- contents.Arn = __expectString(data.Arn);
731
- }
732
- if (data.CreatedAt != null) {
733
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
734
- }
735
- if (data.Event != null) {
736
- contents.Event = de_Event(data.Event, context);
737
- }
738
- if (data.Id != null) {
739
- contents.Id = __expectString(data.Id);
740
- }
741
- if (data.UpdatedAt != null) {
742
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
743
- }
705
+ const doc = take(data, {
706
+ Action: _json,
707
+ Arn: __expectString,
708
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
709
+ Event: _json,
710
+ Id: __expectString,
711
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
712
+ });
713
+ Object.assign(contents, doc);
744
714
  return contents;
745
715
  };
746
716
  const de_CreateEventActionCommandError = async (output, context) => {
@@ -767,10 +737,9 @@ const de_CreateEventActionCommandError = async (output, context) => {
767
737
  throw await de_ValidationExceptionRes(parsedOutput, context);
768
738
  default:
769
739
  const parsedBody = parsedOutput.body;
770
- throwDefaultError({
740
+ return throwDefaultError({
771
741
  output,
772
742
  parsedBody,
773
- exceptionCtor: __BaseException,
774
743
  errorCode,
775
744
  });
776
745
  }
@@ -783,30 +752,17 @@ export const de_CreateJobCommand = async (output, context) => {
783
752
  $metadata: deserializeMetadata(output),
784
753
  });
785
754
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
786
- if (data.Arn != null) {
787
- contents.Arn = __expectString(data.Arn);
788
- }
789
- if (data.CreatedAt != null) {
790
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
791
- }
792
- if (data.Details != null) {
793
- contents.Details = de_ResponseDetails(data.Details, context);
794
- }
795
- if (data.Errors != null) {
796
- contents.Errors = de_ListOfJobError(data.Errors, context);
797
- }
798
- if (data.Id != null) {
799
- contents.Id = __expectString(data.Id);
800
- }
801
- if (data.State != null) {
802
- contents.State = __expectString(data.State);
803
- }
804
- if (data.Type != null) {
805
- contents.Type = __expectString(data.Type);
806
- }
807
- if (data.UpdatedAt != null) {
808
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
809
- }
755
+ const doc = take(data, {
756
+ Arn: __expectString,
757
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
758
+ Details: (_) => de_ResponseDetails(_, context),
759
+ Errors: (_) => de_ListOfJobError(_, context),
760
+ Id: __expectString,
761
+ State: __expectString,
762
+ Type: __expectString,
763
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
764
+ });
765
+ Object.assign(contents, doc);
810
766
  return contents;
811
767
  };
812
768
  const de_CreateJobCommandError = async (output, context) => {
@@ -836,10 +792,9 @@ const de_CreateJobCommandError = async (output, context) => {
836
792
  throw await de_ValidationExceptionRes(parsedOutput, context);
837
793
  default:
838
794
  const parsedBody = parsedOutput.body;
839
- throwDefaultError({
795
+ return throwDefaultError({
840
796
  output,
841
797
  parsedBody,
842
- exceptionCtor: __BaseException,
843
798
  errorCode,
844
799
  });
845
800
  }
@@ -852,42 +807,21 @@ export const de_CreateRevisionCommand = async (output, context) => {
852
807
  $metadata: deserializeMetadata(output),
853
808
  });
854
809
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
855
- if (data.Arn != null) {
856
- contents.Arn = __expectString(data.Arn);
857
- }
858
- if (data.Comment != null) {
859
- contents.Comment = __expectString(data.Comment);
860
- }
861
- if (data.CreatedAt != null) {
862
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
863
- }
864
- if (data.DataSetId != null) {
865
- contents.DataSetId = __expectString(data.DataSetId);
866
- }
867
- if (data.Finalized != null) {
868
- contents.Finalized = __expectBoolean(data.Finalized);
869
- }
870
- if (data.Id != null) {
871
- contents.Id = __expectString(data.Id);
872
- }
873
- if (data.RevocationComment != null) {
874
- contents.RevocationComment = __expectString(data.RevocationComment);
875
- }
876
- if (data.Revoked != null) {
877
- contents.Revoked = __expectBoolean(data.Revoked);
878
- }
879
- if (data.RevokedAt != null) {
880
- contents.RevokedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.RevokedAt));
881
- }
882
- if (data.SourceId != null) {
883
- contents.SourceId = __expectString(data.SourceId);
884
- }
885
- if (data.Tags != null) {
886
- contents.Tags = de_MapOf__string(data.Tags, context);
887
- }
888
- if (data.UpdatedAt != null) {
889
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
890
- }
810
+ const doc = take(data, {
811
+ Arn: __expectString,
812
+ Comment: __expectString,
813
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
814
+ DataSetId: __expectString,
815
+ Finalized: __expectBoolean,
816
+ Id: __expectString,
817
+ RevocationComment: __expectString,
818
+ Revoked: __expectBoolean,
819
+ RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
820
+ SourceId: __expectString,
821
+ Tags: _json,
822
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
823
+ });
824
+ Object.assign(contents, doc);
891
825
  return contents;
892
826
  };
893
827
  const de_CreateRevisionCommandError = async (output, context) => {
@@ -914,10 +848,9 @@ const de_CreateRevisionCommandError = async (output, context) => {
914
848
  throw await de_ValidationExceptionRes(parsedOutput, context);
915
849
  default:
916
850
  const parsedBody = parsedOutput.body;
917
- throwDefaultError({
851
+ return throwDefaultError({
918
852
  output,
919
853
  parsedBody,
920
- exceptionCtor: __BaseException,
921
854
  errorCode,
922
855
  });
923
856
  }
@@ -959,10 +892,9 @@ const de_DeleteAssetCommandError = async (output, context) => {
959
892
  throw await de_ValidationExceptionRes(parsedOutput, context);
960
893
  default:
961
894
  const parsedBody = parsedOutput.body;
962
- throwDefaultError({
895
+ return throwDefaultError({
963
896
  output,
964
897
  parsedBody,
965
- exceptionCtor: __BaseException,
966
898
  errorCode,
967
899
  });
968
900
  }
@@ -1004,10 +936,9 @@ const de_DeleteDataSetCommandError = async (output, context) => {
1004
936
  throw await de_ValidationExceptionRes(parsedOutput, context);
1005
937
  default:
1006
938
  const parsedBody = parsedOutput.body;
1007
- throwDefaultError({
939
+ return throwDefaultError({
1008
940
  output,
1009
941
  parsedBody,
1010
- exceptionCtor: __BaseException,
1011
942
  errorCode,
1012
943
  });
1013
944
  }
@@ -1043,10 +974,9 @@ const de_DeleteEventActionCommandError = async (output, context) => {
1043
974
  throw await de_ValidationExceptionRes(parsedOutput, context);
1044
975
  default:
1045
976
  const parsedBody = parsedOutput.body;
1046
- throwDefaultError({
977
+ return throwDefaultError({
1047
978
  output,
1048
979
  parsedBody,
1049
- exceptionCtor: __BaseException,
1050
980
  errorCode,
1051
981
  });
1052
982
  }
@@ -1088,10 +1018,9 @@ const de_DeleteRevisionCommandError = async (output, context) => {
1088
1018
  throw await de_ValidationExceptionRes(parsedOutput, context);
1089
1019
  default:
1090
1020
  const parsedBody = parsedOutput.body;
1091
- throwDefaultError({
1021
+ return throwDefaultError({
1092
1022
  output,
1093
1023
  parsedBody,
1094
- exceptionCtor: __BaseException,
1095
1024
  errorCode,
1096
1025
  });
1097
1026
  }
@@ -1104,36 +1033,19 @@ export const de_GetAssetCommand = async (output, context) => {
1104
1033
  $metadata: deserializeMetadata(output),
1105
1034
  });
1106
1035
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1107
- if (data.Arn != null) {
1108
- contents.Arn = __expectString(data.Arn);
1109
- }
1110
- if (data.AssetDetails != null) {
1111
- contents.AssetDetails = de_AssetDetails(data.AssetDetails, context);
1112
- }
1113
- if (data.AssetType != null) {
1114
- contents.AssetType = __expectString(data.AssetType);
1115
- }
1116
- if (data.CreatedAt != null) {
1117
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
1118
- }
1119
- if (data.DataSetId != null) {
1120
- contents.DataSetId = __expectString(data.DataSetId);
1121
- }
1122
- if (data.Id != null) {
1123
- contents.Id = __expectString(data.Id);
1124
- }
1125
- if (data.Name != null) {
1126
- contents.Name = __expectString(data.Name);
1127
- }
1128
- if (data.RevisionId != null) {
1129
- contents.RevisionId = __expectString(data.RevisionId);
1130
- }
1131
- if (data.SourceId != null) {
1132
- contents.SourceId = __expectString(data.SourceId);
1133
- }
1134
- if (data.UpdatedAt != null) {
1135
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
1136
- }
1036
+ const doc = take(data, {
1037
+ Arn: __expectString,
1038
+ AssetDetails: (_) => de_AssetDetails(_, context),
1039
+ AssetType: __expectString,
1040
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1041
+ DataSetId: __expectString,
1042
+ Id: __expectString,
1043
+ Name: __expectString,
1044
+ RevisionId: __expectString,
1045
+ SourceId: __expectString,
1046
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1047
+ });
1048
+ Object.assign(contents, doc);
1137
1049
  return contents;
1138
1050
  };
1139
1051
  const de_GetAssetCommandError = async (output, context) => {
@@ -1157,10 +1069,9 @@ const de_GetAssetCommandError = async (output, context) => {
1157
1069
  throw await de_ValidationExceptionRes(parsedOutput, context);
1158
1070
  default:
1159
1071
  const parsedBody = parsedOutput.body;
1160
- throwDefaultError({
1072
+ return throwDefaultError({
1161
1073
  output,
1162
1074
  parsedBody,
1163
- exceptionCtor: __BaseException,
1164
1075
  errorCode,
1165
1076
  });
1166
1077
  }
@@ -1173,39 +1084,20 @@ export const de_GetDataSetCommand = async (output, context) => {
1173
1084
  $metadata: deserializeMetadata(output),
1174
1085
  });
1175
1086
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1176
- if (data.Arn != null) {
1177
- contents.Arn = __expectString(data.Arn);
1178
- }
1179
- if (data.AssetType != null) {
1180
- contents.AssetType = __expectString(data.AssetType);
1181
- }
1182
- if (data.CreatedAt != null) {
1183
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
1184
- }
1185
- if (data.Description != null) {
1186
- contents.Description = __expectString(data.Description);
1187
- }
1188
- if (data.Id != null) {
1189
- contents.Id = __expectString(data.Id);
1190
- }
1191
- if (data.Name != null) {
1192
- contents.Name = __expectString(data.Name);
1193
- }
1194
- if (data.Origin != null) {
1195
- contents.Origin = __expectString(data.Origin);
1196
- }
1197
- if (data.OriginDetails != null) {
1198
- contents.OriginDetails = de_OriginDetails(data.OriginDetails, context);
1199
- }
1200
- if (data.SourceId != null) {
1201
- contents.SourceId = __expectString(data.SourceId);
1202
- }
1203
- if (data.Tags != null) {
1204
- contents.Tags = de_MapOf__string(data.Tags, context);
1205
- }
1206
- if (data.UpdatedAt != null) {
1207
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
1208
- }
1087
+ const doc = take(data, {
1088
+ Arn: __expectString,
1089
+ AssetType: __expectString,
1090
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1091
+ Description: __expectString,
1092
+ Id: __expectString,
1093
+ Name: __expectString,
1094
+ Origin: __expectString,
1095
+ OriginDetails: _json,
1096
+ SourceId: __expectString,
1097
+ Tags: _json,
1098
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1099
+ });
1100
+ Object.assign(contents, doc);
1209
1101
  return contents;
1210
1102
  };
1211
1103
  const de_GetDataSetCommandError = async (output, context) => {
@@ -1229,10 +1121,9 @@ const de_GetDataSetCommandError = async (output, context) => {
1229
1121
  throw await de_ValidationExceptionRes(parsedOutput, context);
1230
1122
  default:
1231
1123
  const parsedBody = parsedOutput.body;
1232
- throwDefaultError({
1124
+ return throwDefaultError({
1233
1125
  output,
1234
1126
  parsedBody,
1235
- exceptionCtor: __BaseException,
1236
1127
  errorCode,
1237
1128
  });
1238
1129
  }
@@ -1245,24 +1136,15 @@ export const de_GetEventActionCommand = async (output, context) => {
1245
1136
  $metadata: deserializeMetadata(output),
1246
1137
  });
1247
1138
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1248
- if (data.Action != null) {
1249
- contents.Action = de_Action(data.Action, context);
1250
- }
1251
- if (data.Arn != null) {
1252
- contents.Arn = __expectString(data.Arn);
1253
- }
1254
- if (data.CreatedAt != null) {
1255
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
1256
- }
1257
- if (data.Event != null) {
1258
- contents.Event = de_Event(data.Event, context);
1259
- }
1260
- if (data.Id != null) {
1261
- contents.Id = __expectString(data.Id);
1262
- }
1263
- if (data.UpdatedAt != null) {
1264
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
1265
- }
1139
+ const doc = take(data, {
1140
+ Action: _json,
1141
+ Arn: __expectString,
1142
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1143
+ Event: _json,
1144
+ Id: __expectString,
1145
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1146
+ });
1147
+ Object.assign(contents, doc);
1266
1148
  return contents;
1267
1149
  };
1268
1150
  const de_GetEventActionCommandError = async (output, context) => {
@@ -1286,10 +1168,9 @@ const de_GetEventActionCommandError = async (output, context) => {
1286
1168
  throw await de_ValidationExceptionRes(parsedOutput, context);
1287
1169
  default:
1288
1170
  const parsedBody = parsedOutput.body;
1289
- throwDefaultError({
1171
+ return throwDefaultError({
1290
1172
  output,
1291
1173
  parsedBody,
1292
- exceptionCtor: __BaseException,
1293
1174
  errorCode,
1294
1175
  });
1295
1176
  }
@@ -1302,30 +1183,17 @@ export const de_GetJobCommand = async (output, context) => {
1302
1183
  $metadata: deserializeMetadata(output),
1303
1184
  });
1304
1185
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1305
- if (data.Arn != null) {
1306
- contents.Arn = __expectString(data.Arn);
1307
- }
1308
- if (data.CreatedAt != null) {
1309
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
1310
- }
1311
- if (data.Details != null) {
1312
- contents.Details = de_ResponseDetails(data.Details, context);
1313
- }
1314
- if (data.Errors != null) {
1315
- contents.Errors = de_ListOfJobError(data.Errors, context);
1316
- }
1317
- if (data.Id != null) {
1318
- contents.Id = __expectString(data.Id);
1319
- }
1320
- if (data.State != null) {
1321
- contents.State = __expectString(data.State);
1322
- }
1323
- if (data.Type != null) {
1324
- contents.Type = __expectString(data.Type);
1325
- }
1326
- if (data.UpdatedAt != null) {
1327
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
1328
- }
1186
+ const doc = take(data, {
1187
+ Arn: __expectString,
1188
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1189
+ Details: (_) => de_ResponseDetails(_, context),
1190
+ Errors: (_) => de_ListOfJobError(_, context),
1191
+ Id: __expectString,
1192
+ State: __expectString,
1193
+ Type: __expectString,
1194
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1195
+ });
1196
+ Object.assign(contents, doc);
1329
1197
  return contents;
1330
1198
  };
1331
1199
  const de_GetJobCommandError = async (output, context) => {
@@ -1349,10 +1217,9 @@ const de_GetJobCommandError = async (output, context) => {
1349
1217
  throw await de_ValidationExceptionRes(parsedOutput, context);
1350
1218
  default:
1351
1219
  const parsedBody = parsedOutput.body;
1352
- throwDefaultError({
1220
+ return throwDefaultError({
1353
1221
  output,
1354
1222
  parsedBody,
1355
- exceptionCtor: __BaseException,
1356
1223
  errorCode,
1357
1224
  });
1358
1225
  }
@@ -1365,42 +1232,21 @@ export const de_GetRevisionCommand = async (output, context) => {
1365
1232
  $metadata: deserializeMetadata(output),
1366
1233
  });
1367
1234
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1368
- if (data.Arn != null) {
1369
- contents.Arn = __expectString(data.Arn);
1370
- }
1371
- if (data.Comment != null) {
1372
- contents.Comment = __expectString(data.Comment);
1373
- }
1374
- if (data.CreatedAt != null) {
1375
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
1376
- }
1377
- if (data.DataSetId != null) {
1378
- contents.DataSetId = __expectString(data.DataSetId);
1379
- }
1380
- if (data.Finalized != null) {
1381
- contents.Finalized = __expectBoolean(data.Finalized);
1382
- }
1383
- if (data.Id != null) {
1384
- contents.Id = __expectString(data.Id);
1385
- }
1386
- if (data.RevocationComment != null) {
1387
- contents.RevocationComment = __expectString(data.RevocationComment);
1388
- }
1389
- if (data.Revoked != null) {
1390
- contents.Revoked = __expectBoolean(data.Revoked);
1391
- }
1392
- if (data.RevokedAt != null) {
1393
- contents.RevokedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.RevokedAt));
1394
- }
1395
- if (data.SourceId != null) {
1396
- contents.SourceId = __expectString(data.SourceId);
1397
- }
1398
- if (data.Tags != null) {
1399
- contents.Tags = de_MapOf__string(data.Tags, context);
1400
- }
1401
- if (data.UpdatedAt != null) {
1402
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
1403
- }
1235
+ const doc = take(data, {
1236
+ Arn: __expectString,
1237
+ Comment: __expectString,
1238
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1239
+ DataSetId: __expectString,
1240
+ Finalized: __expectBoolean,
1241
+ Id: __expectString,
1242
+ RevocationComment: __expectString,
1243
+ Revoked: __expectBoolean,
1244
+ RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1245
+ SourceId: __expectString,
1246
+ Tags: _json,
1247
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1248
+ });
1249
+ Object.assign(contents, doc);
1404
1250
  return contents;
1405
1251
  };
1406
1252
  const de_GetRevisionCommandError = async (output, context) => {
@@ -1424,10 +1270,9 @@ const de_GetRevisionCommandError = async (output, context) => {
1424
1270
  throw await de_ValidationExceptionRes(parsedOutput, context);
1425
1271
  default:
1426
1272
  const parsedBody = parsedOutput.body;
1427
- throwDefaultError({
1273
+ return throwDefaultError({
1428
1274
  output,
1429
1275
  parsedBody,
1430
- exceptionCtor: __BaseException,
1431
1276
  errorCode,
1432
1277
  });
1433
1278
  }
@@ -1440,12 +1285,11 @@ export const de_ListDataSetRevisionsCommand = async (output, context) => {
1440
1285
  $metadata: deserializeMetadata(output),
1441
1286
  });
1442
1287
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1443
- if (data.NextToken != null) {
1444
- contents.NextToken = __expectString(data.NextToken);
1445
- }
1446
- if (data.Revisions != null) {
1447
- contents.Revisions = de_ListOfRevisionEntry(data.Revisions, context);
1448
- }
1288
+ const doc = take(data, {
1289
+ NextToken: __expectString,
1290
+ Revisions: (_) => de_ListOfRevisionEntry(_, context),
1291
+ });
1292
+ Object.assign(contents, doc);
1449
1293
  return contents;
1450
1294
  };
1451
1295
  const de_ListDataSetRevisionsCommandError = async (output, context) => {
@@ -1469,10 +1313,9 @@ const de_ListDataSetRevisionsCommandError = async (output, context) => {
1469
1313
  throw await de_ValidationExceptionRes(parsedOutput, context);
1470
1314
  default:
1471
1315
  const parsedBody = parsedOutput.body;
1472
- throwDefaultError({
1316
+ return throwDefaultError({
1473
1317
  output,
1474
1318
  parsedBody,
1475
- exceptionCtor: __BaseException,
1476
1319
  errorCode,
1477
1320
  });
1478
1321
  }
@@ -1485,12 +1328,11 @@ export const de_ListDataSetsCommand = async (output, context) => {
1485
1328
  $metadata: deserializeMetadata(output),
1486
1329
  });
1487
1330
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1488
- if (data.DataSets != null) {
1489
- contents.DataSets = de_ListOfDataSetEntry(data.DataSets, context);
1490
- }
1491
- if (data.NextToken != null) {
1492
- contents.NextToken = __expectString(data.NextToken);
1493
- }
1331
+ const doc = take(data, {
1332
+ DataSets: (_) => de_ListOfDataSetEntry(_, context),
1333
+ NextToken: __expectString,
1334
+ });
1335
+ Object.assign(contents, doc);
1494
1336
  return contents;
1495
1337
  };
1496
1338
  const de_ListDataSetsCommandError = async (output, context) => {
@@ -1514,10 +1356,9 @@ const de_ListDataSetsCommandError = async (output, context) => {
1514
1356
  throw await de_ValidationExceptionRes(parsedOutput, context);
1515
1357
  default:
1516
1358
  const parsedBody = parsedOutput.body;
1517
- throwDefaultError({
1359
+ return throwDefaultError({
1518
1360
  output,
1519
1361
  parsedBody,
1520
- exceptionCtor: __BaseException,
1521
1362
  errorCode,
1522
1363
  });
1523
1364
  }
@@ -1530,12 +1371,11 @@ export const de_ListEventActionsCommand = async (output, context) => {
1530
1371
  $metadata: deserializeMetadata(output),
1531
1372
  });
1532
1373
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1533
- if (data.EventActions != null) {
1534
- contents.EventActions = de_ListOfEventActionEntry(data.EventActions, context);
1535
- }
1536
- if (data.NextToken != null) {
1537
- contents.NextToken = __expectString(data.NextToken);
1538
- }
1374
+ const doc = take(data, {
1375
+ EventActions: (_) => de_ListOfEventActionEntry(_, context),
1376
+ NextToken: __expectString,
1377
+ });
1378
+ Object.assign(contents, doc);
1539
1379
  return contents;
1540
1380
  };
1541
1381
  const de_ListEventActionsCommandError = async (output, context) => {
@@ -1559,10 +1399,9 @@ const de_ListEventActionsCommandError = async (output, context) => {
1559
1399
  throw await de_ValidationExceptionRes(parsedOutput, context);
1560
1400
  default:
1561
1401
  const parsedBody = parsedOutput.body;
1562
- throwDefaultError({
1402
+ return throwDefaultError({
1563
1403
  output,
1564
1404
  parsedBody,
1565
- exceptionCtor: __BaseException,
1566
1405
  errorCode,
1567
1406
  });
1568
1407
  }
@@ -1575,12 +1414,11 @@ export const de_ListJobsCommand = async (output, context) => {
1575
1414
  $metadata: deserializeMetadata(output),
1576
1415
  });
1577
1416
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1578
- if (data.Jobs != null) {
1579
- contents.Jobs = de_ListOfJobEntry(data.Jobs, context);
1580
- }
1581
- if (data.NextToken != null) {
1582
- contents.NextToken = __expectString(data.NextToken);
1583
- }
1417
+ const doc = take(data, {
1418
+ Jobs: (_) => de_ListOfJobEntry(_, context),
1419
+ NextToken: __expectString,
1420
+ });
1421
+ Object.assign(contents, doc);
1584
1422
  return contents;
1585
1423
  };
1586
1424
  const de_ListJobsCommandError = async (output, context) => {
@@ -1604,10 +1442,9 @@ const de_ListJobsCommandError = async (output, context) => {
1604
1442
  throw await de_ValidationExceptionRes(parsedOutput, context);
1605
1443
  default:
1606
1444
  const parsedBody = parsedOutput.body;
1607
- throwDefaultError({
1445
+ return throwDefaultError({
1608
1446
  output,
1609
1447
  parsedBody,
1610
- exceptionCtor: __BaseException,
1611
1448
  errorCode,
1612
1449
  });
1613
1450
  }
@@ -1620,12 +1457,11 @@ export const de_ListRevisionAssetsCommand = async (output, context) => {
1620
1457
  $metadata: deserializeMetadata(output),
1621
1458
  });
1622
1459
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1623
- if (data.Assets != null) {
1624
- contents.Assets = de_ListOfAssetEntry(data.Assets, context);
1625
- }
1626
- if (data.NextToken != null) {
1627
- contents.NextToken = __expectString(data.NextToken);
1628
- }
1460
+ const doc = take(data, {
1461
+ Assets: (_) => de_ListOfAssetEntry(_, context),
1462
+ NextToken: __expectString,
1463
+ });
1464
+ Object.assign(contents, doc);
1629
1465
  return contents;
1630
1466
  };
1631
1467
  const de_ListRevisionAssetsCommandError = async (output, context) => {
@@ -1649,10 +1485,9 @@ const de_ListRevisionAssetsCommandError = async (output, context) => {
1649
1485
  throw await de_ValidationExceptionRes(parsedOutput, context);
1650
1486
  default:
1651
1487
  const parsedBody = parsedOutput.body;
1652
- throwDefaultError({
1488
+ return throwDefaultError({
1653
1489
  output,
1654
1490
  parsedBody,
1655
- exceptionCtor: __BaseException,
1656
1491
  errorCode,
1657
1492
  });
1658
1493
  }
@@ -1665,9 +1500,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1665
1500
  $metadata: deserializeMetadata(output),
1666
1501
  });
1667
1502
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1668
- if (data.tags != null) {
1669
- contents.Tags = de_MapOf__string(data.tags, context);
1670
- }
1503
+ const doc = take(data, {
1504
+ Tags: [, _json, `tags`],
1505
+ });
1506
+ Object.assign(contents, doc);
1671
1507
  return contents;
1672
1508
  };
1673
1509
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1677,10 +1513,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1677
1513
  };
1678
1514
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1679
1515
  const parsedBody = parsedOutput.body;
1680
- throwDefaultError({
1516
+ return throwDefaultError({
1681
1517
  output,
1682
1518
  parsedBody,
1683
- exceptionCtor: __BaseException,
1684
1519
  errorCode,
1685
1520
  });
1686
1521
  };
@@ -1692,39 +1527,20 @@ export const de_RevokeRevisionCommand = async (output, context) => {
1692
1527
  $metadata: deserializeMetadata(output),
1693
1528
  });
1694
1529
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1695
- if (data.Arn != null) {
1696
- contents.Arn = __expectString(data.Arn);
1697
- }
1698
- if (data.Comment != null) {
1699
- contents.Comment = __expectString(data.Comment);
1700
- }
1701
- if (data.CreatedAt != null) {
1702
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
1703
- }
1704
- if (data.DataSetId != null) {
1705
- contents.DataSetId = __expectString(data.DataSetId);
1706
- }
1707
- if (data.Finalized != null) {
1708
- contents.Finalized = __expectBoolean(data.Finalized);
1709
- }
1710
- if (data.Id != null) {
1711
- contents.Id = __expectString(data.Id);
1712
- }
1713
- if (data.RevocationComment != null) {
1714
- contents.RevocationComment = __expectString(data.RevocationComment);
1715
- }
1716
- if (data.Revoked != null) {
1717
- contents.Revoked = __expectBoolean(data.Revoked);
1718
- }
1719
- if (data.RevokedAt != null) {
1720
- contents.RevokedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.RevokedAt));
1721
- }
1722
- if (data.SourceId != null) {
1723
- contents.SourceId = __expectString(data.SourceId);
1724
- }
1725
- if (data.UpdatedAt != null) {
1726
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
1727
- }
1530
+ const doc = take(data, {
1531
+ Arn: __expectString,
1532
+ Comment: __expectString,
1533
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1534
+ DataSetId: __expectString,
1535
+ Finalized: __expectBoolean,
1536
+ Id: __expectString,
1537
+ RevocationComment: __expectString,
1538
+ Revoked: __expectBoolean,
1539
+ RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1540
+ SourceId: __expectString,
1541
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1542
+ });
1543
+ Object.assign(contents, doc);
1728
1544
  return contents;
1729
1545
  };
1730
1546
  const de_RevokeRevisionCommandError = async (output, context) => {
@@ -1754,10 +1570,9 @@ const de_RevokeRevisionCommandError = async (output, context) => {
1754
1570
  throw await de_ValidationExceptionRes(parsedOutput, context);
1755
1571
  default:
1756
1572
  const parsedBody = parsedOutput.body;
1757
- throwDefaultError({
1573
+ return throwDefaultError({
1758
1574
  output,
1759
1575
  parsedBody,
1760
- exceptionCtor: __BaseException,
1761
1576
  errorCode,
1762
1577
  });
1763
1578
  }
@@ -1806,10 +1621,9 @@ const de_SendApiAssetCommandError = async (output, context) => {
1806
1621
  throw await de_ValidationExceptionRes(parsedOutput, context);
1807
1622
  default:
1808
1623
  const parsedBody = parsedOutput.body;
1809
- throwDefaultError({
1624
+ return throwDefaultError({
1810
1625
  output,
1811
1626
  parsedBody,
1812
- exceptionCtor: __BaseException,
1813
1627
  errorCode,
1814
1628
  });
1815
1629
  }
@@ -1851,10 +1665,9 @@ const de_StartJobCommandError = async (output, context) => {
1851
1665
  throw await de_ValidationExceptionRes(parsedOutput, context);
1852
1666
  default:
1853
1667
  const parsedBody = parsedOutput.body;
1854
- throwDefaultError({
1668
+ return throwDefaultError({
1855
1669
  output,
1856
1670
  parsedBody,
1857
- exceptionCtor: __BaseException,
1858
1671
  errorCode,
1859
1672
  });
1860
1673
  }
@@ -1876,10 +1689,9 @@ const de_TagResourceCommandError = async (output, context) => {
1876
1689
  };
1877
1690
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1878
1691
  const parsedBody = parsedOutput.body;
1879
- throwDefaultError({
1692
+ return throwDefaultError({
1880
1693
  output,
1881
1694
  parsedBody,
1882
- exceptionCtor: __BaseException,
1883
1695
  errorCode,
1884
1696
  });
1885
1697
  };
@@ -1900,10 +1712,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1900
1712
  };
1901
1713
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1902
1714
  const parsedBody = parsedOutput.body;
1903
- throwDefaultError({
1715
+ return throwDefaultError({
1904
1716
  output,
1905
1717
  parsedBody,
1906
- exceptionCtor: __BaseException,
1907
1718
  errorCode,
1908
1719
  });
1909
1720
  };
@@ -1915,36 +1726,19 @@ export const de_UpdateAssetCommand = async (output, context) => {
1915
1726
  $metadata: deserializeMetadata(output),
1916
1727
  });
1917
1728
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1918
- if (data.Arn != null) {
1919
- contents.Arn = __expectString(data.Arn);
1920
- }
1921
- if (data.AssetDetails != null) {
1922
- contents.AssetDetails = de_AssetDetails(data.AssetDetails, context);
1923
- }
1924
- if (data.AssetType != null) {
1925
- contents.AssetType = __expectString(data.AssetType);
1926
- }
1927
- if (data.CreatedAt != null) {
1928
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
1929
- }
1930
- if (data.DataSetId != null) {
1931
- contents.DataSetId = __expectString(data.DataSetId);
1932
- }
1933
- if (data.Id != null) {
1934
- contents.Id = __expectString(data.Id);
1935
- }
1936
- if (data.Name != null) {
1937
- contents.Name = __expectString(data.Name);
1938
- }
1939
- if (data.RevisionId != null) {
1940
- contents.RevisionId = __expectString(data.RevisionId);
1941
- }
1942
- if (data.SourceId != null) {
1943
- contents.SourceId = __expectString(data.SourceId);
1944
- }
1945
- if (data.UpdatedAt != null) {
1946
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
1947
- }
1729
+ const doc = take(data, {
1730
+ Arn: __expectString,
1731
+ AssetDetails: (_) => de_AssetDetails(_, context),
1732
+ AssetType: __expectString,
1733
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1734
+ DataSetId: __expectString,
1735
+ Id: __expectString,
1736
+ Name: __expectString,
1737
+ RevisionId: __expectString,
1738
+ SourceId: __expectString,
1739
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1740
+ });
1741
+ Object.assign(contents, doc);
1948
1742
  return contents;
1949
1743
  };
1950
1744
  const de_UpdateAssetCommandError = async (output, context) => {
@@ -1974,10 +1768,9 @@ const de_UpdateAssetCommandError = async (output, context) => {
1974
1768
  throw await de_ValidationExceptionRes(parsedOutput, context);
1975
1769
  default:
1976
1770
  const parsedBody = parsedOutput.body;
1977
- throwDefaultError({
1771
+ return throwDefaultError({
1978
1772
  output,
1979
1773
  parsedBody,
1980
- exceptionCtor: __BaseException,
1981
1774
  errorCode,
1982
1775
  });
1983
1776
  }
@@ -1990,36 +1783,19 @@ export const de_UpdateDataSetCommand = async (output, context) => {
1990
1783
  $metadata: deserializeMetadata(output),
1991
1784
  });
1992
1785
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1993
- if (data.Arn != null) {
1994
- contents.Arn = __expectString(data.Arn);
1995
- }
1996
- if (data.AssetType != null) {
1997
- contents.AssetType = __expectString(data.AssetType);
1998
- }
1999
- if (data.CreatedAt != null) {
2000
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
2001
- }
2002
- if (data.Description != null) {
2003
- contents.Description = __expectString(data.Description);
2004
- }
2005
- if (data.Id != null) {
2006
- contents.Id = __expectString(data.Id);
2007
- }
2008
- if (data.Name != null) {
2009
- contents.Name = __expectString(data.Name);
2010
- }
2011
- if (data.Origin != null) {
2012
- contents.Origin = __expectString(data.Origin);
2013
- }
2014
- if (data.OriginDetails != null) {
2015
- contents.OriginDetails = de_OriginDetails(data.OriginDetails, context);
2016
- }
2017
- if (data.SourceId != null) {
2018
- contents.SourceId = __expectString(data.SourceId);
2019
- }
2020
- if (data.UpdatedAt != null) {
2021
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
2022
- }
1786
+ const doc = take(data, {
1787
+ Arn: __expectString,
1788
+ AssetType: __expectString,
1789
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1790
+ Description: __expectString,
1791
+ Id: __expectString,
1792
+ Name: __expectString,
1793
+ Origin: __expectString,
1794
+ OriginDetails: _json,
1795
+ SourceId: __expectString,
1796
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1797
+ });
1798
+ Object.assign(contents, doc);
2023
1799
  return contents;
2024
1800
  };
2025
1801
  const de_UpdateDataSetCommandError = async (output, context) => {
@@ -2046,10 +1822,9 @@ const de_UpdateDataSetCommandError = async (output, context) => {
2046
1822
  throw await de_ValidationExceptionRes(parsedOutput, context);
2047
1823
  default:
2048
1824
  const parsedBody = parsedOutput.body;
2049
- throwDefaultError({
1825
+ return throwDefaultError({
2050
1826
  output,
2051
1827
  parsedBody,
2052
- exceptionCtor: __BaseException,
2053
1828
  errorCode,
2054
1829
  });
2055
1830
  }
@@ -2062,24 +1837,15 @@ export const de_UpdateEventActionCommand = async (output, context) => {
2062
1837
  $metadata: deserializeMetadata(output),
2063
1838
  });
2064
1839
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2065
- if (data.Action != null) {
2066
- contents.Action = de_Action(data.Action, context);
2067
- }
2068
- if (data.Arn != null) {
2069
- contents.Arn = __expectString(data.Arn);
2070
- }
2071
- if (data.CreatedAt != null) {
2072
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
2073
- }
2074
- if (data.Event != null) {
2075
- contents.Event = de_Event(data.Event, context);
2076
- }
2077
- if (data.Id != null) {
2078
- contents.Id = __expectString(data.Id);
2079
- }
2080
- if (data.UpdatedAt != null) {
2081
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
2082
- }
1840
+ const doc = take(data, {
1841
+ Action: _json,
1842
+ Arn: __expectString,
1843
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1844
+ Event: _json,
1845
+ Id: __expectString,
1846
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1847
+ });
1848
+ Object.assign(contents, doc);
2083
1849
  return contents;
2084
1850
  };
2085
1851
  const de_UpdateEventActionCommandError = async (output, context) => {
@@ -2106,10 +1872,9 @@ const de_UpdateEventActionCommandError = async (output, context) => {
2106
1872
  throw await de_ValidationExceptionRes(parsedOutput, context);
2107
1873
  default:
2108
1874
  const parsedBody = parsedOutput.body;
2109
- throwDefaultError({
1875
+ return throwDefaultError({
2110
1876
  output,
2111
1877
  parsedBody,
2112
- exceptionCtor: __BaseException,
2113
1878
  errorCode,
2114
1879
  });
2115
1880
  }
@@ -2122,39 +1887,20 @@ export const de_UpdateRevisionCommand = async (output, context) => {
2122
1887
  $metadata: deserializeMetadata(output),
2123
1888
  });
2124
1889
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2125
- if (data.Arn != null) {
2126
- contents.Arn = __expectString(data.Arn);
2127
- }
2128
- if (data.Comment != null) {
2129
- contents.Comment = __expectString(data.Comment);
2130
- }
2131
- if (data.CreatedAt != null) {
2132
- contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt));
2133
- }
2134
- if (data.DataSetId != null) {
2135
- contents.DataSetId = __expectString(data.DataSetId);
2136
- }
2137
- if (data.Finalized != null) {
2138
- contents.Finalized = __expectBoolean(data.Finalized);
2139
- }
2140
- if (data.Id != null) {
2141
- contents.Id = __expectString(data.Id);
2142
- }
2143
- if (data.RevocationComment != null) {
2144
- contents.RevocationComment = __expectString(data.RevocationComment);
2145
- }
2146
- if (data.Revoked != null) {
2147
- contents.Revoked = __expectBoolean(data.Revoked);
2148
- }
2149
- if (data.RevokedAt != null) {
2150
- contents.RevokedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.RevokedAt));
2151
- }
2152
- if (data.SourceId != null) {
2153
- contents.SourceId = __expectString(data.SourceId);
2154
- }
2155
- if (data.UpdatedAt != null) {
2156
- contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt));
2157
- }
1890
+ const doc = take(data, {
1891
+ Arn: __expectString,
1892
+ Comment: __expectString,
1893
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1894
+ DataSetId: __expectString,
1895
+ Finalized: __expectBoolean,
1896
+ Id: __expectString,
1897
+ RevocationComment: __expectString,
1898
+ Revoked: __expectBoolean,
1899
+ RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1900
+ SourceId: __expectString,
1901
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1902
+ });
1903
+ Object.assign(contents, doc);
2158
1904
  return contents;
2159
1905
  };
2160
1906
  const de_UpdateRevisionCommandError = async (output, context) => {
@@ -2184,21 +1930,21 @@ const de_UpdateRevisionCommandError = async (output, context) => {
2184
1930
  throw await de_ValidationExceptionRes(parsedOutput, context);
2185
1931
  default:
2186
1932
  const parsedBody = parsedOutput.body;
2187
- throwDefaultError({
1933
+ return throwDefaultError({
2188
1934
  output,
2189
1935
  parsedBody,
2190
- exceptionCtor: __BaseException,
2191
1936
  errorCode,
2192
1937
  });
2193
1938
  }
2194
1939
  };
2195
- const map = __map;
1940
+ const throwDefaultError = withBaseException(__BaseException);
2196
1941
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2197
1942
  const contents = map({});
2198
1943
  const data = parsedOutput.body;
2199
- if (data.Message != null) {
2200
- contents.Message = __expectString(data.Message);
2201
- }
1944
+ const doc = take(data, {
1945
+ Message: __expectString,
1946
+ });
1947
+ Object.assign(contents, doc);
2202
1948
  const exception = new AccessDeniedException({
2203
1949
  $metadata: deserializeMetadata(parsedOutput),
2204
1950
  ...contents,
@@ -2208,15 +1954,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2208
1954
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2209
1955
  const contents = map({});
2210
1956
  const data = parsedOutput.body;
2211
- if (data.Message != null) {
2212
- contents.Message = __expectString(data.Message);
2213
- }
2214
- if (data.ResourceId != null) {
2215
- contents.ResourceId = __expectString(data.ResourceId);
2216
- }
2217
- if (data.ResourceType != null) {
2218
- contents.ResourceType = __expectString(data.ResourceType);
2219
- }
1957
+ const doc = take(data, {
1958
+ Message: __expectString,
1959
+ ResourceId: __expectString,
1960
+ ResourceType: __expectString,
1961
+ });
1962
+ Object.assign(contents, doc);
2220
1963
  const exception = new ConflictException({
2221
1964
  $metadata: deserializeMetadata(parsedOutput),
2222
1965
  ...contents,
@@ -2226,9 +1969,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2226
1969
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2227
1970
  const contents = map({});
2228
1971
  const data = parsedOutput.body;
2229
- if (data.Message != null) {
2230
- contents.Message = __expectString(data.Message);
2231
- }
1972
+ const doc = take(data, {
1973
+ Message: __expectString,
1974
+ });
1975
+ Object.assign(contents, doc);
2232
1976
  const exception = new InternalServerException({
2233
1977
  $metadata: deserializeMetadata(parsedOutput),
2234
1978
  ...contents,
@@ -2238,15 +1982,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2238
1982
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2239
1983
  const contents = map({});
2240
1984
  const data = parsedOutput.body;
2241
- if (data.Message != null) {
2242
- contents.Message = __expectString(data.Message);
2243
- }
2244
- if (data.ResourceId != null) {
2245
- contents.ResourceId = __expectString(data.ResourceId);
2246
- }
2247
- if (data.ResourceType != null) {
2248
- contents.ResourceType = __expectString(data.ResourceType);
2249
- }
1985
+ const doc = take(data, {
1986
+ Message: __expectString,
1987
+ ResourceId: __expectString,
1988
+ ResourceType: __expectString,
1989
+ });
1990
+ Object.assign(contents, doc);
2250
1991
  const exception = new ResourceNotFoundException({
2251
1992
  $metadata: deserializeMetadata(parsedOutput),
2252
1993
  ...contents,
@@ -2256,15 +1997,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2256
1997
  const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
2257
1998
  const contents = map({});
2258
1999
  const data = parsedOutput.body;
2259
- if (data.LimitName != null) {
2260
- contents.LimitName = __expectString(data.LimitName);
2261
- }
2262
- if (data.LimitValue != null) {
2263
- contents.LimitValue = __limitedParseDouble(data.LimitValue);
2264
- }
2265
- if (data.Message != null) {
2266
- contents.Message = __expectString(data.Message);
2267
- }
2000
+ const doc = take(data, {
2001
+ LimitName: __expectString,
2002
+ LimitValue: __limitedParseDouble,
2003
+ Message: __expectString,
2004
+ });
2005
+ Object.assign(contents, doc);
2268
2006
  const exception = new ServiceLimitExceededException({
2269
2007
  $metadata: deserializeMetadata(parsedOutput),
2270
2008
  ...contents,
@@ -2274,9 +2012,10 @@ const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
2274
2012
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2275
2013
  const contents = map({});
2276
2014
  const data = parsedOutput.body;
2277
- if (data.Message != null) {
2278
- contents.Message = __expectString(data.Message);
2279
- }
2015
+ const doc = take(data, {
2016
+ Message: __expectString,
2017
+ });
2018
+ Object.assign(contents, doc);
2280
2019
  const exception = new ThrottlingException({
2281
2020
  $metadata: deserializeMetadata(parsedOutput),
2282
2021
  ...contents,
@@ -2286,657 +2025,146 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2286
2025
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2287
2026
  const contents = map({});
2288
2027
  const data = parsedOutput.body;
2289
- if (data.ExceptionCause != null) {
2290
- contents.ExceptionCause = __expectString(data.ExceptionCause);
2291
- }
2292
- if (data.Message != null) {
2293
- contents.Message = __expectString(data.Message);
2294
- }
2028
+ const doc = take(data, {
2029
+ ExceptionCause: __expectString,
2030
+ Message: __expectString,
2031
+ });
2032
+ Object.assign(contents, doc);
2295
2033
  const exception = new ValidationException({
2296
2034
  $metadata: deserializeMetadata(parsedOutput),
2297
2035
  ...contents,
2298
2036
  });
2299
2037
  return __decorateServiceException(exception, parsedOutput.body);
2300
2038
  };
2301
- const se_Action = (input, context) => {
2302
- return {
2303
- ...(input.ExportRevisionToS3 != null && {
2304
- ExportRevisionToS3: se_AutoExportRevisionToS3RequestDetails(input.ExportRevisionToS3, context),
2305
- }),
2306
- };
2307
- };
2308
- const se_AssetDestinationEntry = (input, context) => {
2309
- return {
2310
- ...(input.AssetId != null && { AssetId: input.AssetId }),
2311
- ...(input.Bucket != null && { Bucket: input.Bucket }),
2312
- ...(input.Key != null && { Key: input.Key }),
2313
- };
2314
- };
2315
- const se_AssetSourceEntry = (input, context) => {
2316
- return {
2317
- ...(input.Bucket != null && { Bucket: input.Bucket }),
2318
- ...(input.Key != null && { Key: input.Key }),
2319
- };
2320
- };
2321
- const se_AutoExportRevisionDestinationEntry = (input, context) => {
2322
- return {
2323
- ...(input.Bucket != null && { Bucket: input.Bucket }),
2324
- ...(input.KeyPattern != null && { KeyPattern: input.KeyPattern }),
2325
- };
2326
- };
2327
- const se_AutoExportRevisionToS3RequestDetails = (input, context) => {
2328
- return {
2329
- ...(input.Encryption != null && { Encryption: se_ExportServerSideEncryption(input.Encryption, context) }),
2330
- ...(input.RevisionDestination != null && {
2331
- RevisionDestination: se_AutoExportRevisionDestinationEntry(input.RevisionDestination, context),
2332
- }),
2333
- };
2334
- };
2335
- const se_CreateS3DataAccessFromS3BucketRequestDetails = (input, context) => {
2336
- return {
2337
- ...(input.AssetSource != null && { AssetSource: se_S3DataAccessAssetSourceEntry(input.AssetSource, context) }),
2338
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2339
- ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2340
- };
2341
- };
2342
- const se_DatabaseLFTagPolicyAndPermissions = (input, context) => {
2343
- return {
2344
- ...(input.Expression != null && { Expression: se_ListOfLFTags(input.Expression, context) }),
2345
- ...(input.Permissions != null && {
2346
- Permissions: se_ListOfDatabaseLFTagPolicyPermissions(input.Permissions, context),
2347
- }),
2348
- };
2349
- };
2350
- const se_Event = (input, context) => {
2351
- return {
2352
- ...(input.RevisionPublished != null && {
2353
- RevisionPublished: se_RevisionPublished(input.RevisionPublished, context),
2354
- }),
2355
- };
2356
- };
2357
- const se_ExportAssetsToS3RequestDetails = (input, context) => {
2358
- return {
2359
- ...(input.AssetDestinations != null && {
2360
- AssetDestinations: se_ListOfAssetDestinationEntry(input.AssetDestinations, context),
2361
- }),
2362
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2363
- ...(input.Encryption != null && { Encryption: se_ExportServerSideEncryption(input.Encryption, context) }),
2364
- ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2365
- };
2366
- };
2367
- const se_ExportAssetToSignedUrlRequestDetails = (input, context) => {
2368
- return {
2369
- ...(input.AssetId != null && { AssetId: input.AssetId }),
2370
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2371
- ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2372
- };
2373
- };
2374
- const se_ExportRevisionsToS3RequestDetails = (input, context) => {
2375
- return {
2376
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2377
- ...(input.Encryption != null && { Encryption: se_ExportServerSideEncryption(input.Encryption, context) }),
2378
- ...(input.RevisionDestinations != null && {
2379
- RevisionDestinations: se_ListOfRevisionDestinationEntry(input.RevisionDestinations, context),
2380
- }),
2381
- };
2382
- };
2383
- const se_ExportServerSideEncryption = (input, context) => {
2384
- return {
2385
- ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
2386
- ...(input.Type != null && { Type: input.Type }),
2387
- };
2388
- };
2389
- const se_ImportAssetFromApiGatewayApiRequestDetails = (input, context) => {
2390
- return {
2391
- ...(input.ApiDescription != null && { ApiDescription: input.ApiDescription }),
2392
- ...(input.ApiId != null && { ApiId: input.ApiId }),
2393
- ...(input.ApiKey != null && { ApiKey: input.ApiKey }),
2394
- ...(input.ApiName != null && { ApiName: input.ApiName }),
2395
- ...(input.ApiSpecificationMd5Hash != null && { ApiSpecificationMd5Hash: input.ApiSpecificationMd5Hash }),
2396
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2397
- ...(input.ProtocolType != null && { ProtocolType: input.ProtocolType }),
2398
- ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2399
- ...(input.Stage != null && { Stage: input.Stage }),
2400
- };
2401
- };
2402
- const se_ImportAssetFromSignedUrlRequestDetails = (input, context) => {
2403
- return {
2404
- ...(input.AssetName != null && { AssetName: input.AssetName }),
2405
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2406
- ...(input.Md5Hash != null && { Md5Hash: input.Md5Hash }),
2407
- ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2408
- };
2409
- };
2410
- const se_ImportAssetsFromLakeFormationTagPolicyRequestDetails = (input, context) => {
2411
- return {
2412
- ...(input.CatalogId != null && { CatalogId: input.CatalogId }),
2413
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2414
- ...(input.Database != null && { Database: se_DatabaseLFTagPolicyAndPermissions(input.Database, context) }),
2415
- ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2416
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
2417
- ...(input.Table != null && { Table: se_TableLFTagPolicyAndPermissions(input.Table, context) }),
2418
- };
2419
- };
2420
- const se_ImportAssetsFromRedshiftDataSharesRequestDetails = (input, context) => {
2421
- return {
2422
- ...(input.AssetSources != null && {
2423
- AssetSources: se_ListOfRedshiftDataShareAssetSourceEntry(input.AssetSources, context),
2424
- }),
2425
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2426
- ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2427
- };
2428
- };
2429
- const se_ImportAssetsFromS3RequestDetails = (input, context) => {
2430
- return {
2431
- ...(input.AssetSources != null && { AssetSources: se_ListOfAssetSourceEntry(input.AssetSources, context) }),
2432
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2433
- ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2434
- };
2435
- };
2436
- const se_KmsKeyToGrant = (input, context) => {
2437
- return {
2438
- ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
2439
- };
2440
- };
2441
- const se_LFTag = (input, context) => {
2442
- return {
2443
- ...(input.TagKey != null && { TagKey: input.TagKey }),
2444
- ...(input.TagValues != null && { TagValues: se_ListOfLFTagValues(input.TagValues, context) }),
2445
- };
2446
- };
2447
- const se_ListOf__string = (input, context) => {
2448
- return input
2449
- .filter((e) => e != null)
2450
- .map((entry) => {
2451
- return entry;
2452
- });
2453
- };
2454
- const se_ListOfAssetDestinationEntry = (input, context) => {
2455
- return input
2456
- .filter((e) => e != null)
2457
- .map((entry) => {
2458
- return se_AssetDestinationEntry(entry, context);
2459
- });
2460
- };
2461
- const se_ListOfAssetSourceEntry = (input, context) => {
2462
- return input
2463
- .filter((e) => e != null)
2464
- .map((entry) => {
2465
- return se_AssetSourceEntry(entry, context);
2466
- });
2467
- };
2468
- const se_ListOfDatabaseLFTagPolicyPermissions = (input, context) => {
2469
- return input
2470
- .filter((e) => e != null)
2471
- .map((entry) => {
2472
- return entry;
2473
- });
2474
- };
2475
- const se_ListOfKmsKeysToGrant = (input, context) => {
2476
- return input
2477
- .filter((e) => e != null)
2478
- .map((entry) => {
2479
- return se_KmsKeyToGrant(entry, context);
2480
- });
2481
- };
2482
- const se_ListOfLFTags = (input, context) => {
2483
- return input
2484
- .filter((e) => e != null)
2485
- .map((entry) => {
2486
- return se_LFTag(entry, context);
2487
- });
2488
- };
2489
- const se_ListOfLFTagValues = (input, context) => {
2490
- return input
2491
- .filter((e) => e != null)
2492
- .map((entry) => {
2493
- return entry;
2494
- });
2495
- };
2496
- const se_ListOfRedshiftDataShareAssetSourceEntry = (input, context) => {
2497
- return input
2498
- .filter((e) => e != null)
2499
- .map((entry) => {
2500
- return se_RedshiftDataShareAssetSourceEntry(entry, context);
2501
- });
2502
- };
2503
- const se_ListOfRevisionDestinationEntry = (input, context) => {
2504
- return input
2505
- .filter((e) => e != null)
2506
- .map((entry) => {
2507
- return se_RevisionDestinationEntry(entry, context);
2508
- });
2509
- };
2510
- const se_ListOfTableTagPolicyLFPermissions = (input, context) => {
2511
- return input
2512
- .filter((e) => e != null)
2513
- .map((entry) => {
2514
- return entry;
2515
- });
2516
- };
2517
- const se_MapOf__string = (input, context) => {
2518
- return Object.entries(input).reduce((acc, [key, value]) => {
2519
- if (value === null) {
2520
- return acc;
2521
- }
2522
- acc[key] = value;
2523
- return acc;
2524
- }, {});
2525
- };
2526
- const se_RedshiftDataShareAssetSourceEntry = (input, context) => {
2527
- return {
2528
- ...(input.DataShareArn != null && { DataShareArn: input.DataShareArn }),
2529
- };
2530
- };
2531
- const se_RequestDetails = (input, context) => {
2532
- return {
2533
- ...(input.CreateS3DataAccessFromS3Bucket != null && {
2534
- CreateS3DataAccessFromS3Bucket: se_CreateS3DataAccessFromS3BucketRequestDetails(input.CreateS3DataAccessFromS3Bucket, context),
2535
- }),
2536
- ...(input.ExportAssetToSignedUrl != null && {
2537
- ExportAssetToSignedUrl: se_ExportAssetToSignedUrlRequestDetails(input.ExportAssetToSignedUrl, context),
2538
- }),
2539
- ...(input.ExportAssetsToS3 != null && {
2540
- ExportAssetsToS3: se_ExportAssetsToS3RequestDetails(input.ExportAssetsToS3, context),
2541
- }),
2542
- ...(input.ExportRevisionsToS3 != null && {
2543
- ExportRevisionsToS3: se_ExportRevisionsToS3RequestDetails(input.ExportRevisionsToS3, context),
2544
- }),
2545
- ...(input.ImportAssetFromApiGatewayApi != null && {
2546
- ImportAssetFromApiGatewayApi: se_ImportAssetFromApiGatewayApiRequestDetails(input.ImportAssetFromApiGatewayApi, context),
2547
- }),
2548
- ...(input.ImportAssetFromSignedUrl != null && {
2549
- ImportAssetFromSignedUrl: se_ImportAssetFromSignedUrlRequestDetails(input.ImportAssetFromSignedUrl, context),
2550
- }),
2551
- ...(input.ImportAssetsFromLakeFormationTagPolicy != null && {
2552
- ImportAssetsFromLakeFormationTagPolicy: se_ImportAssetsFromLakeFormationTagPolicyRequestDetails(input.ImportAssetsFromLakeFormationTagPolicy, context),
2553
- }),
2554
- ...(input.ImportAssetsFromRedshiftDataShares != null && {
2555
- ImportAssetsFromRedshiftDataShares: se_ImportAssetsFromRedshiftDataSharesRequestDetails(input.ImportAssetsFromRedshiftDataShares, context),
2556
- }),
2557
- ...(input.ImportAssetsFromS3 != null && {
2558
- ImportAssetsFromS3: se_ImportAssetsFromS3RequestDetails(input.ImportAssetsFromS3, context),
2559
- }),
2560
- };
2561
- };
2562
- const se_RevisionDestinationEntry = (input, context) => {
2563
- return {
2564
- ...(input.Bucket != null && { Bucket: input.Bucket }),
2565
- ...(input.KeyPattern != null && { KeyPattern: input.KeyPattern }),
2566
- ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2567
- };
2568
- };
2569
- const se_RevisionPublished = (input, context) => {
2570
- return {
2571
- ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2572
- };
2573
- };
2574
- const se_S3DataAccessAssetSourceEntry = (input, context) => {
2575
- return {
2576
- ...(input.Bucket != null && { Bucket: input.Bucket }),
2577
- ...(input.KeyPrefixes != null && { KeyPrefixes: se_ListOf__string(input.KeyPrefixes, context) }),
2578
- ...(input.Keys != null && { Keys: se_ListOf__string(input.Keys, context) }),
2579
- ...(input.KmsKeysToGrant != null && { KmsKeysToGrant: se_ListOfKmsKeysToGrant(input.KmsKeysToGrant, context) }),
2580
- };
2581
- };
2582
- const se_TableLFTagPolicyAndPermissions = (input, context) => {
2583
- return {
2584
- ...(input.Expression != null && { Expression: se_ListOfLFTags(input.Expression, context) }),
2585
- ...(input.Permissions != null && { Permissions: se_ListOfTableTagPolicyLFPermissions(input.Permissions, context) }),
2586
- };
2587
- };
2588
- const de_Action = (output, context) => {
2589
- return {
2590
- ExportRevisionToS3: output.ExportRevisionToS3 != null
2591
- ? de_AutoExportRevisionToS3RequestDetails(output.ExportRevisionToS3, context)
2592
- : undefined,
2593
- };
2594
- };
2595
2039
  const de_ApiGatewayApiAsset = (output, context) => {
2596
- return {
2597
- ApiDescription: __expectString(output.ApiDescription),
2598
- ApiEndpoint: __expectString(output.ApiEndpoint),
2599
- ApiId: __expectString(output.ApiId),
2600
- ApiKey: __expectString(output.ApiKey),
2601
- ApiName: __expectString(output.ApiName),
2602
- ApiSpecificationDownloadUrl: __expectString(output.ApiSpecificationDownloadUrl),
2603
- ApiSpecificationDownloadUrlExpiresAt: output.ApiSpecificationDownloadUrlExpiresAt != null
2604
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ApiSpecificationDownloadUrlExpiresAt))
2605
- : undefined,
2606
- ProtocolType: __expectString(output.ProtocolType),
2607
- Stage: __expectString(output.Stage),
2608
- };
2609
- };
2610
- const de_AssetDestinationEntry = (output, context) => {
2611
- return {
2612
- AssetId: __expectString(output.AssetId),
2613
- Bucket: __expectString(output.Bucket),
2614
- Key: __expectString(output.Key),
2615
- };
2040
+ return take(output, {
2041
+ ApiDescription: __expectString,
2042
+ ApiEndpoint: __expectString,
2043
+ ApiId: __expectString,
2044
+ ApiKey: __expectString,
2045
+ ApiName: __expectString,
2046
+ ApiSpecificationDownloadUrl: __expectString,
2047
+ ApiSpecificationDownloadUrlExpiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2048
+ ProtocolType: __expectString,
2049
+ Stage: __expectString,
2050
+ });
2616
2051
  };
2617
2052
  const de_AssetDetails = (output, context) => {
2618
- return {
2619
- ApiGatewayApiAsset: output.ApiGatewayApiAsset != null ? de_ApiGatewayApiAsset(output.ApiGatewayApiAsset, context) : undefined,
2620
- LakeFormationDataPermissionAsset: output.LakeFormationDataPermissionAsset != null
2621
- ? de_LakeFormationDataPermissionAsset(output.LakeFormationDataPermissionAsset, context)
2622
- : undefined,
2623
- RedshiftDataShareAsset: output.RedshiftDataShareAsset != null
2624
- ? de_RedshiftDataShareAsset(output.RedshiftDataShareAsset, context)
2625
- : undefined,
2626
- S3DataAccessAsset: output.S3DataAccessAsset != null ? de_S3DataAccessAsset(output.S3DataAccessAsset, context) : undefined,
2627
- S3SnapshotAsset: output.S3SnapshotAsset != null ? de_S3SnapshotAsset(output.S3SnapshotAsset, context) : undefined,
2628
- };
2053
+ return take(output, {
2054
+ ApiGatewayApiAsset: (_) => de_ApiGatewayApiAsset(_, context),
2055
+ LakeFormationDataPermissionAsset: _json,
2056
+ RedshiftDataShareAsset: _json,
2057
+ S3DataAccessAsset: _json,
2058
+ S3SnapshotAsset: (_) => de_S3SnapshotAsset(_, context),
2059
+ });
2629
2060
  };
2630
2061
  const de_AssetEntry = (output, context) => {
2631
- return {
2632
- Arn: __expectString(output.Arn),
2633
- AssetDetails: output.AssetDetails != null ? de_AssetDetails(output.AssetDetails, context) : undefined,
2634
- AssetType: __expectString(output.AssetType),
2635
- CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined,
2636
- DataSetId: __expectString(output.DataSetId),
2637
- Id: __expectString(output.Id),
2638
- Name: __expectString(output.Name),
2639
- RevisionId: __expectString(output.RevisionId),
2640
- SourceId: __expectString(output.SourceId),
2641
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined,
2642
- };
2643
- };
2644
- const de_AssetSourceEntry = (output, context) => {
2645
- return {
2646
- Bucket: __expectString(output.Bucket),
2647
- Key: __expectString(output.Key),
2648
- };
2649
- };
2650
- const de_AutoExportRevisionDestinationEntry = (output, context) => {
2651
- return {
2652
- Bucket: __expectString(output.Bucket),
2653
- KeyPattern: __expectString(output.KeyPattern),
2654
- };
2655
- };
2656
- const de_AutoExportRevisionToS3RequestDetails = (output, context) => {
2657
- return {
2658
- Encryption: output.Encryption != null ? de_ExportServerSideEncryption(output.Encryption, context) : undefined,
2659
- RevisionDestination: output.RevisionDestination != null
2660
- ? de_AutoExportRevisionDestinationEntry(output.RevisionDestination, context)
2661
- : undefined,
2662
- };
2663
- };
2664
- const de_CreateS3DataAccessFromS3BucketResponseDetails = (output, context) => {
2665
- return {
2666
- AssetSource: output.AssetSource != null ? de_S3DataAccessAssetSourceEntry(output.AssetSource, context) : undefined,
2667
- DataSetId: __expectString(output.DataSetId),
2668
- RevisionId: __expectString(output.RevisionId),
2669
- };
2670
- };
2671
- const de_DatabaseLFTagPolicy = (output, context) => {
2672
- return {
2673
- Expression: output.Expression != null ? de_ListOfLFTags(output.Expression, context) : undefined,
2674
- };
2675
- };
2676
- const de_DatabaseLFTagPolicyAndPermissions = (output, context) => {
2677
- return {
2678
- Expression: output.Expression != null ? de_ListOfLFTags(output.Expression, context) : undefined,
2679
- Permissions: output.Permissions != null ? de_ListOfDatabaseLFTagPolicyPermissions(output.Permissions, context) : undefined,
2680
- };
2062
+ return take(output, {
2063
+ Arn: __expectString,
2064
+ AssetDetails: (_) => de_AssetDetails(_, context),
2065
+ AssetType: __expectString,
2066
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2067
+ DataSetId: __expectString,
2068
+ Id: __expectString,
2069
+ Name: __expectString,
2070
+ RevisionId: __expectString,
2071
+ SourceId: __expectString,
2072
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2073
+ });
2681
2074
  };
2682
2075
  const de_DataSetEntry = (output, context) => {
2683
- return {
2684
- Arn: __expectString(output.Arn),
2685
- AssetType: __expectString(output.AssetType),
2686
- CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined,
2687
- Description: __expectString(output.Description),
2688
- Id: __expectString(output.Id),
2689
- Name: __expectString(output.Name),
2690
- Origin: __expectString(output.Origin),
2691
- OriginDetails: output.OriginDetails != null ? de_OriginDetails(output.OriginDetails, context) : undefined,
2692
- SourceId: __expectString(output.SourceId),
2693
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined,
2694
- };
2695
- };
2696
- const de_Details = (output, context) => {
2697
- return {
2698
- ImportAssetFromSignedUrlJobErrorDetails: output.ImportAssetFromSignedUrlJobErrorDetails != null
2699
- ? de_ImportAssetFromSignedUrlJobErrorDetails(output.ImportAssetFromSignedUrlJobErrorDetails, context)
2700
- : undefined,
2701
- ImportAssetsFromS3JobErrorDetails: output.ImportAssetsFromS3JobErrorDetails != null
2702
- ? de_ListOfAssetSourceEntry(output.ImportAssetsFromS3JobErrorDetails, context)
2703
- : undefined,
2704
- };
2705
- };
2706
- const de_Event = (output, context) => {
2707
- return {
2708
- RevisionPublished: output.RevisionPublished != null ? de_RevisionPublished(output.RevisionPublished, context) : undefined,
2709
- };
2076
+ return take(output, {
2077
+ Arn: __expectString,
2078
+ AssetType: __expectString,
2079
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2080
+ Description: __expectString,
2081
+ Id: __expectString,
2082
+ Name: __expectString,
2083
+ Origin: __expectString,
2084
+ OriginDetails: _json,
2085
+ SourceId: __expectString,
2086
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2087
+ });
2710
2088
  };
2711
2089
  const de_EventActionEntry = (output, context) => {
2712
- return {
2713
- Action: output.Action != null ? de_Action(output.Action, context) : undefined,
2714
- Arn: __expectString(output.Arn),
2715
- CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined,
2716
- Event: output.Event != null ? de_Event(output.Event, context) : undefined,
2717
- Id: __expectString(output.Id),
2718
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined,
2719
- };
2720
- };
2721
- const de_ExportAssetsToS3ResponseDetails = (output, context) => {
2722
- return {
2723
- AssetDestinations: output.AssetDestinations != null ? de_ListOfAssetDestinationEntry(output.AssetDestinations, context) : undefined,
2724
- DataSetId: __expectString(output.DataSetId),
2725
- Encryption: output.Encryption != null ? de_ExportServerSideEncryption(output.Encryption, context) : undefined,
2726
- RevisionId: __expectString(output.RevisionId),
2727
- };
2090
+ return take(output, {
2091
+ Action: _json,
2092
+ Arn: __expectString,
2093
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2094
+ Event: _json,
2095
+ Id: __expectString,
2096
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2097
+ });
2728
2098
  };
2729
2099
  const de_ExportAssetToSignedUrlResponseDetails = (output, context) => {
2730
- return {
2731
- AssetId: __expectString(output.AssetId),
2732
- DataSetId: __expectString(output.DataSetId),
2733
- RevisionId: __expectString(output.RevisionId),
2734
- SignedUrl: __expectString(output.SignedUrl),
2735
- SignedUrlExpiresAt: output.SignedUrlExpiresAt != null
2736
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.SignedUrlExpiresAt))
2737
- : undefined,
2738
- };
2739
- };
2740
- const de_ExportRevisionsToS3ResponseDetails = (output, context) => {
2741
- return {
2742
- DataSetId: __expectString(output.DataSetId),
2743
- Encryption: output.Encryption != null ? de_ExportServerSideEncryption(output.Encryption, context) : undefined,
2744
- EventActionArn: __expectString(output.EventActionArn),
2745
- RevisionDestinations: output.RevisionDestinations != null
2746
- ? de_ListOfRevisionDestinationEntry(output.RevisionDestinations, context)
2747
- : undefined,
2748
- };
2749
- };
2750
- const de_ExportServerSideEncryption = (output, context) => {
2751
- return {
2752
- KmsKeyArn: __expectString(output.KmsKeyArn),
2753
- Type: __expectString(output.Type),
2754
- };
2100
+ return take(output, {
2101
+ AssetId: __expectString,
2102
+ DataSetId: __expectString,
2103
+ RevisionId: __expectString,
2104
+ SignedUrl: __expectString,
2105
+ SignedUrlExpiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2106
+ });
2755
2107
  };
2756
2108
  const de_ImportAssetFromApiGatewayApiResponseDetails = (output, context) => {
2757
- return {
2758
- ApiDescription: __expectString(output.ApiDescription),
2759
- ApiId: __expectString(output.ApiId),
2760
- ApiKey: __expectString(output.ApiKey),
2761
- ApiName: __expectString(output.ApiName),
2762
- ApiSpecificationMd5Hash: __expectString(output.ApiSpecificationMd5Hash),
2763
- ApiSpecificationUploadUrl: __expectString(output.ApiSpecificationUploadUrl),
2764
- ApiSpecificationUploadUrlExpiresAt: output.ApiSpecificationUploadUrlExpiresAt != null
2765
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ApiSpecificationUploadUrlExpiresAt))
2766
- : undefined,
2767
- DataSetId: __expectString(output.DataSetId),
2768
- ProtocolType: __expectString(output.ProtocolType),
2769
- RevisionId: __expectString(output.RevisionId),
2770
- Stage: __expectString(output.Stage),
2771
- };
2772
- };
2773
- const de_ImportAssetFromSignedUrlJobErrorDetails = (output, context) => {
2774
- return {
2775
- AssetName: __expectString(output.AssetName),
2776
- };
2109
+ return take(output, {
2110
+ ApiDescription: __expectString,
2111
+ ApiId: __expectString,
2112
+ ApiKey: __expectString,
2113
+ ApiName: __expectString,
2114
+ ApiSpecificationMd5Hash: __expectString,
2115
+ ApiSpecificationUploadUrl: __expectString,
2116
+ ApiSpecificationUploadUrlExpiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2117
+ DataSetId: __expectString,
2118
+ ProtocolType: __expectString,
2119
+ RevisionId: __expectString,
2120
+ Stage: __expectString,
2121
+ });
2777
2122
  };
2778
2123
  const de_ImportAssetFromSignedUrlResponseDetails = (output, context) => {
2779
- return {
2780
- AssetName: __expectString(output.AssetName),
2781
- DataSetId: __expectString(output.DataSetId),
2782
- Md5Hash: __expectString(output.Md5Hash),
2783
- RevisionId: __expectString(output.RevisionId),
2784
- SignedUrl: __expectString(output.SignedUrl),
2785
- SignedUrlExpiresAt: output.SignedUrlExpiresAt != null
2786
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.SignedUrlExpiresAt))
2787
- : undefined,
2788
- };
2789
- };
2790
- const de_ImportAssetsFromLakeFormationTagPolicyResponseDetails = (output, context) => {
2791
- return {
2792
- CatalogId: __expectString(output.CatalogId),
2793
- DataSetId: __expectString(output.DataSetId),
2794
- Database: output.Database != null ? de_DatabaseLFTagPolicyAndPermissions(output.Database, context) : undefined,
2795
- RevisionId: __expectString(output.RevisionId),
2796
- RoleArn: __expectString(output.RoleArn),
2797
- Table: output.Table != null ? de_TableLFTagPolicyAndPermissions(output.Table, context) : undefined,
2798
- };
2799
- };
2800
- const de_ImportAssetsFromRedshiftDataSharesResponseDetails = (output, context) => {
2801
- return {
2802
- AssetSources: output.AssetSources != null
2803
- ? de_ListOfRedshiftDataShareAssetSourceEntry(output.AssetSources, context)
2804
- : undefined,
2805
- DataSetId: __expectString(output.DataSetId),
2806
- RevisionId: __expectString(output.RevisionId),
2807
- };
2808
- };
2809
- const de_ImportAssetsFromS3ResponseDetails = (output, context) => {
2810
- return {
2811
- AssetSources: output.AssetSources != null ? de_ListOfAssetSourceEntry(output.AssetSources, context) : undefined,
2812
- DataSetId: __expectString(output.DataSetId),
2813
- RevisionId: __expectString(output.RevisionId),
2814
- };
2124
+ return take(output, {
2125
+ AssetName: __expectString,
2126
+ DataSetId: __expectString,
2127
+ Md5Hash: __expectString,
2128
+ RevisionId: __expectString,
2129
+ SignedUrl: __expectString,
2130
+ SignedUrlExpiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2131
+ });
2815
2132
  };
2816
2133
  const de_JobEntry = (output, context) => {
2817
- return {
2818
- Arn: __expectString(output.Arn),
2819
- CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined,
2820
- Details: output.Details != null ? de_ResponseDetails(output.Details, context) : undefined,
2821
- Errors: output.Errors != null ? de_ListOfJobError(output.Errors, context) : undefined,
2822
- Id: __expectString(output.Id),
2823
- State: __expectString(output.State),
2824
- Type: __expectString(output.Type),
2825
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined,
2826
- };
2827
- };
2828
- const de_JobError = (output, context) => {
2829
- return {
2830
- Code: __expectString(output.Code),
2831
- Details: output.Details != null ? de_Details(output.Details, context) : undefined,
2832
- LimitName: __expectString(output.LimitName),
2833
- LimitValue: __limitedParseDouble(output.LimitValue),
2834
- Message: __expectString(output.Message),
2835
- ResourceId: __expectString(output.ResourceId),
2836
- ResourceType: __expectString(output.ResourceType),
2837
- };
2838
- };
2839
- const de_KmsKeyToGrant = (output, context) => {
2840
- return {
2841
- KmsKeyArn: __expectString(output.KmsKeyArn),
2842
- };
2843
- };
2844
- const de_LakeFormationDataPermissionAsset = (output, context) => {
2845
- return {
2846
- LakeFormationDataPermissionDetails: output.LakeFormationDataPermissionDetails != null
2847
- ? de_LakeFormationDataPermissionDetails(output.LakeFormationDataPermissionDetails, context)
2848
- : undefined,
2849
- LakeFormationDataPermissionType: __expectString(output.LakeFormationDataPermissionType),
2850
- Permissions: output.Permissions != null ? de_ListOfLFPermissions(output.Permissions, context) : undefined,
2851
- RoleArn: __expectString(output.RoleArn),
2852
- };
2853
- };
2854
- const de_LakeFormationDataPermissionDetails = (output, context) => {
2855
- return {
2856
- LFTagPolicy: output.LFTagPolicy != null ? de_LFTagPolicyDetails(output.LFTagPolicy, context) : undefined,
2857
- };
2858
- };
2859
- const de_LFResourceDetails = (output, context) => {
2860
- return {
2861
- Database: output.Database != null ? de_DatabaseLFTagPolicy(output.Database, context) : undefined,
2862
- Table: output.Table != null ? de_TableLFTagPolicy(output.Table, context) : undefined,
2863
- };
2864
- };
2865
- const de_LFTag = (output, context) => {
2866
- return {
2867
- TagKey: __expectString(output.TagKey),
2868
- TagValues: output.TagValues != null ? de_ListOfLFTagValues(output.TagValues, context) : undefined,
2869
- };
2870
- };
2871
- const de_LFTagPolicyDetails = (output, context) => {
2872
- return {
2873
- CatalogId: __expectString(output.CatalogId),
2874
- ResourceDetails: output.ResourceDetails != null ? de_LFResourceDetails(output.ResourceDetails, context) : undefined,
2875
- ResourceType: __expectString(output.ResourceType),
2876
- };
2877
- };
2878
- const de_ListOf__string = (output, context) => {
2879
- const retVal = (output || [])
2880
- .filter((e) => e != null)
2881
- .map((entry) => {
2882
- if (entry === null) {
2883
- return null;
2884
- }
2885
- return __expectString(entry);
2134
+ return take(output, {
2135
+ Arn: __expectString,
2136
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2137
+ Details: (_) => de_ResponseDetails(_, context),
2138
+ Errors: (_) => de_ListOfJobError(_, context),
2139
+ Id: __expectString,
2140
+ State: __expectString,
2141
+ Type: __expectString,
2142
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2886
2143
  });
2887
- return retVal;
2888
2144
  };
2889
- const de_ListOfAssetDestinationEntry = (output, context) => {
2890
- const retVal = (output || [])
2891
- .filter((e) => e != null)
2892
- .map((entry) => {
2893
- if (entry === null) {
2894
- return null;
2895
- }
2896
- return de_AssetDestinationEntry(entry, context);
2145
+ const de_JobError = (output, context) => {
2146
+ return take(output, {
2147
+ Code: __expectString,
2148
+ Details: _json,
2149
+ LimitName: __expectString,
2150
+ LimitValue: __limitedParseDouble,
2151
+ Message: __expectString,
2152
+ ResourceId: __expectString,
2153
+ ResourceType: __expectString,
2897
2154
  });
2898
- return retVal;
2899
2155
  };
2900
2156
  const de_ListOfAssetEntry = (output, context) => {
2901
2157
  const retVal = (output || [])
2902
2158
  .filter((e) => e != null)
2903
2159
  .map((entry) => {
2904
- if (entry === null) {
2905
- return null;
2906
- }
2907
2160
  return de_AssetEntry(entry, context);
2908
2161
  });
2909
2162
  return retVal;
2910
2163
  };
2911
- const de_ListOfAssetSourceEntry = (output, context) => {
2912
- const retVal = (output || [])
2913
- .filter((e) => e != null)
2914
- .map((entry) => {
2915
- if (entry === null) {
2916
- return null;
2917
- }
2918
- return de_AssetSourceEntry(entry, context);
2919
- });
2920
- return retVal;
2921
- };
2922
- const de_ListOfDatabaseLFTagPolicyPermissions = (output, context) => {
2923
- const retVal = (output || [])
2924
- .filter((e) => e != null)
2925
- .map((entry) => {
2926
- if (entry === null) {
2927
- return null;
2928
- }
2929
- return __expectString(entry);
2930
- });
2931
- return retVal;
2932
- };
2933
2164
  const de_ListOfDataSetEntry = (output, context) => {
2934
2165
  const retVal = (output || [])
2935
2166
  .filter((e) => e != null)
2936
2167
  .map((entry) => {
2937
- if (entry === null) {
2938
- return null;
2939
- }
2940
2168
  return de_DataSetEntry(entry, context);
2941
2169
  });
2942
2170
  return retVal;
@@ -2945,9 +2173,6 @@ const de_ListOfEventActionEntry = (output, context) => {
2945
2173
  const retVal = (output || [])
2946
2174
  .filter((e) => e != null)
2947
2175
  .map((entry) => {
2948
- if (entry === null) {
2949
- return null;
2950
- }
2951
2176
  return de_EventActionEntry(entry, context);
2952
2177
  });
2953
2178
  return retVal;
@@ -2956,9 +2181,6 @@ const de_ListOfJobEntry = (output, context) => {
2956
2181
  const retVal = (output || [])
2957
2182
  .filter((e) => e != null)
2958
2183
  .map((entry) => {
2959
- if (entry === null) {
2960
- return null;
2961
- }
2962
2184
  return de_JobEntry(entry, context);
2963
2185
  });
2964
2186
  return retVal;
@@ -2967,216 +2189,50 @@ const de_ListOfJobError = (output, context) => {
2967
2189
  const retVal = (output || [])
2968
2190
  .filter((e) => e != null)
2969
2191
  .map((entry) => {
2970
- if (entry === null) {
2971
- return null;
2972
- }
2973
2192
  return de_JobError(entry, context);
2974
2193
  });
2975
2194
  return retVal;
2976
2195
  };
2977
- const de_ListOfKmsKeysToGrant = (output, context) => {
2978
- const retVal = (output || [])
2979
- .filter((e) => e != null)
2980
- .map((entry) => {
2981
- if (entry === null) {
2982
- return null;
2983
- }
2984
- return de_KmsKeyToGrant(entry, context);
2985
- });
2986
- return retVal;
2987
- };
2988
- const de_ListOfLFPermissions = (output, context) => {
2989
- const retVal = (output || [])
2990
- .filter((e) => e != null)
2991
- .map((entry) => {
2992
- if (entry === null) {
2993
- return null;
2994
- }
2995
- return __expectString(entry);
2996
- });
2997
- return retVal;
2998
- };
2999
- const de_ListOfLFTags = (output, context) => {
3000
- const retVal = (output || [])
3001
- .filter((e) => e != null)
3002
- .map((entry) => {
3003
- if (entry === null) {
3004
- return null;
3005
- }
3006
- return de_LFTag(entry, context);
3007
- });
3008
- return retVal;
3009
- };
3010
- const de_ListOfLFTagValues = (output, context) => {
3011
- const retVal = (output || [])
3012
- .filter((e) => e != null)
3013
- .map((entry) => {
3014
- if (entry === null) {
3015
- return null;
3016
- }
3017
- return __expectString(entry);
3018
- });
3019
- return retVal;
3020
- };
3021
- const de_ListOfRedshiftDataShareAssetSourceEntry = (output, context) => {
3022
- const retVal = (output || [])
3023
- .filter((e) => e != null)
3024
- .map((entry) => {
3025
- if (entry === null) {
3026
- return null;
3027
- }
3028
- return de_RedshiftDataShareAssetSourceEntry(entry, context);
3029
- });
3030
- return retVal;
3031
- };
3032
- const de_ListOfRevisionDestinationEntry = (output, context) => {
3033
- const retVal = (output || [])
3034
- .filter((e) => e != null)
3035
- .map((entry) => {
3036
- if (entry === null) {
3037
- return null;
3038
- }
3039
- return de_RevisionDestinationEntry(entry, context);
3040
- });
3041
- return retVal;
3042
- };
3043
2196
  const de_ListOfRevisionEntry = (output, context) => {
3044
2197
  const retVal = (output || [])
3045
2198
  .filter((e) => e != null)
3046
2199
  .map((entry) => {
3047
- if (entry === null) {
3048
- return null;
3049
- }
3050
2200
  return de_RevisionEntry(entry, context);
3051
2201
  });
3052
2202
  return retVal;
3053
2203
  };
3054
- const de_ListOfTableTagPolicyLFPermissions = (output, context) => {
3055
- const retVal = (output || [])
3056
- .filter((e) => e != null)
3057
- .map((entry) => {
3058
- if (entry === null) {
3059
- return null;
3060
- }
3061
- return __expectString(entry);
3062
- });
3063
- return retVal;
3064
- };
3065
- const de_MapOf__string = (output, context) => {
3066
- return Object.entries(output).reduce((acc, [key, value]) => {
3067
- if (value === null) {
3068
- return acc;
3069
- }
3070
- acc[key] = __expectString(value);
3071
- return acc;
3072
- }, {});
3073
- };
3074
- const de_OriginDetails = (output, context) => {
3075
- return {
3076
- ProductId: __expectString(output.ProductId),
3077
- };
3078
- };
3079
- const de_RedshiftDataShareAsset = (output, context) => {
3080
- return {
3081
- Arn: __expectString(output.Arn),
3082
- };
3083
- };
3084
- const de_RedshiftDataShareAssetSourceEntry = (output, context) => {
3085
- return {
3086
- DataShareArn: __expectString(output.DataShareArn),
3087
- };
3088
- };
3089
2204
  const de_ResponseDetails = (output, context) => {
3090
- return {
3091
- CreateS3DataAccessFromS3Bucket: output.CreateS3DataAccessFromS3Bucket != null
3092
- ? de_CreateS3DataAccessFromS3BucketResponseDetails(output.CreateS3DataAccessFromS3Bucket, context)
3093
- : undefined,
3094
- ExportAssetToSignedUrl: output.ExportAssetToSignedUrl != null
3095
- ? de_ExportAssetToSignedUrlResponseDetails(output.ExportAssetToSignedUrl, context)
3096
- : undefined,
3097
- ExportAssetsToS3: output.ExportAssetsToS3 != null
3098
- ? de_ExportAssetsToS3ResponseDetails(output.ExportAssetsToS3, context)
3099
- : undefined,
3100
- ExportRevisionsToS3: output.ExportRevisionsToS3 != null
3101
- ? de_ExportRevisionsToS3ResponseDetails(output.ExportRevisionsToS3, context)
3102
- : undefined,
3103
- ImportAssetFromApiGatewayApi: output.ImportAssetFromApiGatewayApi != null
3104
- ? de_ImportAssetFromApiGatewayApiResponseDetails(output.ImportAssetFromApiGatewayApi, context)
3105
- : undefined,
3106
- ImportAssetFromSignedUrl: output.ImportAssetFromSignedUrl != null
3107
- ? de_ImportAssetFromSignedUrlResponseDetails(output.ImportAssetFromSignedUrl, context)
3108
- : undefined,
3109
- ImportAssetsFromLakeFormationTagPolicy: output.ImportAssetsFromLakeFormationTagPolicy != null
3110
- ? de_ImportAssetsFromLakeFormationTagPolicyResponseDetails(output.ImportAssetsFromLakeFormationTagPolicy, context)
3111
- : undefined,
3112
- ImportAssetsFromRedshiftDataShares: output.ImportAssetsFromRedshiftDataShares != null
3113
- ? de_ImportAssetsFromRedshiftDataSharesResponseDetails(output.ImportAssetsFromRedshiftDataShares, context)
3114
- : undefined,
3115
- ImportAssetsFromS3: output.ImportAssetsFromS3 != null
3116
- ? de_ImportAssetsFromS3ResponseDetails(output.ImportAssetsFromS3, context)
3117
- : undefined,
3118
- };
3119
- };
3120
- const de_RevisionDestinationEntry = (output, context) => {
3121
- return {
3122
- Bucket: __expectString(output.Bucket),
3123
- KeyPattern: __expectString(output.KeyPattern),
3124
- RevisionId: __expectString(output.RevisionId),
3125
- };
2205
+ return take(output, {
2206
+ CreateS3DataAccessFromS3Bucket: _json,
2207
+ ExportAssetToSignedUrl: (_) => de_ExportAssetToSignedUrlResponseDetails(_, context),
2208
+ ExportAssetsToS3: _json,
2209
+ ExportRevisionsToS3: _json,
2210
+ ImportAssetFromApiGatewayApi: (_) => de_ImportAssetFromApiGatewayApiResponseDetails(_, context),
2211
+ ImportAssetFromSignedUrl: (_) => de_ImportAssetFromSignedUrlResponseDetails(_, context),
2212
+ ImportAssetsFromLakeFormationTagPolicy: _json,
2213
+ ImportAssetsFromRedshiftDataShares: _json,
2214
+ ImportAssetsFromS3: _json,
2215
+ });
3126
2216
  };
3127
2217
  const de_RevisionEntry = (output, context) => {
3128
- return {
3129
- Arn: __expectString(output.Arn),
3130
- Comment: __expectString(output.Comment),
3131
- CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined,
3132
- DataSetId: __expectString(output.DataSetId),
3133
- Finalized: __expectBoolean(output.Finalized),
3134
- Id: __expectString(output.Id),
3135
- RevocationComment: __expectString(output.RevocationComment),
3136
- Revoked: __expectBoolean(output.Revoked),
3137
- RevokedAt: output.RevokedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.RevokedAt)) : undefined,
3138
- SourceId: __expectString(output.SourceId),
3139
- UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined,
3140
- };
3141
- };
3142
- const de_RevisionPublished = (output, context) => {
3143
- return {
3144
- DataSetId: __expectString(output.DataSetId),
3145
- };
3146
- };
3147
- const de_S3DataAccessAsset = (output, context) => {
3148
- return {
3149
- Bucket: __expectString(output.Bucket),
3150
- KeyPrefixes: output.KeyPrefixes != null ? de_ListOf__string(output.KeyPrefixes, context) : undefined,
3151
- Keys: output.Keys != null ? de_ListOf__string(output.Keys, context) : undefined,
3152
- KmsKeysToGrant: output.KmsKeysToGrant != null ? de_ListOfKmsKeysToGrant(output.KmsKeysToGrant, context) : undefined,
3153
- S3AccessPointAlias: __expectString(output.S3AccessPointAlias),
3154
- S3AccessPointArn: __expectString(output.S3AccessPointArn),
3155
- };
3156
- };
3157
- const de_S3DataAccessAssetSourceEntry = (output, context) => {
3158
- return {
3159
- Bucket: __expectString(output.Bucket),
3160
- KeyPrefixes: output.KeyPrefixes != null ? de_ListOf__string(output.KeyPrefixes, context) : undefined,
3161
- Keys: output.Keys != null ? de_ListOf__string(output.Keys, context) : undefined,
3162
- KmsKeysToGrant: output.KmsKeysToGrant != null ? de_ListOfKmsKeysToGrant(output.KmsKeysToGrant, context) : undefined,
3163
- };
2218
+ return take(output, {
2219
+ Arn: __expectString,
2220
+ Comment: __expectString,
2221
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2222
+ DataSetId: __expectString,
2223
+ Finalized: __expectBoolean,
2224
+ Id: __expectString,
2225
+ RevocationComment: __expectString,
2226
+ Revoked: __expectBoolean,
2227
+ RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2228
+ SourceId: __expectString,
2229
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2230
+ });
3164
2231
  };
3165
2232
  const de_S3SnapshotAsset = (output, context) => {
3166
- return {
3167
- Size: __limitedParseDouble(output.Size),
3168
- };
3169
- };
3170
- const de_TableLFTagPolicy = (output, context) => {
3171
- return {
3172
- Expression: output.Expression != null ? de_ListOfLFTags(output.Expression, context) : undefined,
3173
- };
3174
- };
3175
- const de_TableLFTagPolicyAndPermissions = (output, context) => {
3176
- return {
3177
- Expression: output.Expression != null ? de_ListOfLFTags(output.Expression, context) : undefined,
3178
- Permissions: output.Permissions != null ? de_ListOfTableTagPolicyLFPermissions(output.Permissions, context) : undefined,
3179
- };
2233
+ return take(output, {
2234
+ Size: __limitedParseDouble,
2235
+ });
3180
2236
  };
3181
2237
  const deserializeMetadata = (output) => ({
3182
2238
  httpStatusCode: output.statusCode,