@aws-sdk/client-managedblockchain 3.312.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ManagedBlockchainServiceException as __BaseException } from "../models/ManagedBlockchainServiceException";
5
5
  import { AccessDeniedException, IllegalActionException, InternalServiceErrorException, InvalidRequestException, ResourceAlreadyExistsException, ResourceLimitExceededException, ResourceNotFoundException, ResourceNotReadyException, ThrottlingException, TooManyTagsException, } from "../models/models_0";
@@ -10,11 +10,11 @@ export const se_CreateAccessorCommand = async (input, context) => {
10
10
  };
11
11
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors";
12
12
  let body;
13
- body = JSON.stringify({
14
- ...(input.AccessorType != null && { AccessorType: input.AccessorType }),
15
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
16
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
17
- });
13
+ body = JSON.stringify(take(input, {
14
+ AccessorType: [],
15
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
16
+ Tags: (_) => _json(_),
17
+ }));
18
18
  return new __HttpRequest({
19
19
  protocol,
20
20
  hostname,
@@ -33,13 +33,11 @@ export const se_CreateMemberCommand = async (input, context) => {
33
33
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
34
34
  resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
35
35
  let body;
36
- body = JSON.stringify({
37
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
38
- ...(input.InvitationId != null && { InvitationId: input.InvitationId }),
39
- ...(input.MemberConfiguration != null && {
40
- MemberConfiguration: se_MemberConfiguration(input.MemberConfiguration, context),
41
- }),
42
- });
36
+ body = JSON.stringify(take(input, {
37
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
38
+ InvitationId: [],
39
+ MemberConfiguration: (_) => _json(_),
40
+ }));
43
41
  return new __HttpRequest({
44
42
  protocol,
45
43
  hostname,
@@ -57,21 +55,17 @@ export const se_CreateNetworkCommand = async (input, context) => {
57
55
  };
58
56
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
59
57
  let body;
60
- body = JSON.stringify({
61
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
62
- ...(input.Description != null && { Description: input.Description }),
63
- ...(input.Framework != null && { Framework: input.Framework }),
64
- ...(input.FrameworkConfiguration != null && {
65
- FrameworkConfiguration: se_NetworkFrameworkConfiguration(input.FrameworkConfiguration, context),
66
- }),
67
- ...(input.FrameworkVersion != null && { FrameworkVersion: input.FrameworkVersion }),
68
- ...(input.MemberConfiguration != null && {
69
- MemberConfiguration: se_MemberConfiguration(input.MemberConfiguration, context),
70
- }),
71
- ...(input.Name != null && { Name: input.Name }),
72
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
73
- ...(input.VotingPolicy != null && { VotingPolicy: se_VotingPolicy(input.VotingPolicy, context) }),
74
- });
58
+ body = JSON.stringify(take(input, {
59
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
60
+ Description: [],
61
+ Framework: [],
62
+ FrameworkConfiguration: (_) => _json(_),
63
+ FrameworkVersion: [],
64
+ MemberConfiguration: (_) => _json(_),
65
+ Name: [],
66
+ Tags: (_) => _json(_),
67
+ VotingPolicy: (_) => _json(_),
68
+ }));
75
69
  return new __HttpRequest({
76
70
  protocol,
77
71
  hostname,
@@ -90,14 +84,12 @@ export const se_CreateNodeCommand = async (input, context) => {
90
84
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
91
85
  resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
92
86
  let body;
93
- body = JSON.stringify({
94
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
95
- ...(input.MemberId != null && { MemberId: input.MemberId }),
96
- ...(input.NodeConfiguration != null && {
97
- NodeConfiguration: se_NodeConfiguration(input.NodeConfiguration, context),
98
- }),
99
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
100
- });
87
+ body = JSON.stringify(take(input, {
88
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
89
+ MemberId: [],
90
+ NodeConfiguration: (_) => _json(_),
91
+ Tags: (_) => _json(_),
92
+ }));
101
93
  return new __HttpRequest({
102
94
  protocol,
103
95
  hostname,
@@ -116,13 +108,13 @@ export const se_CreateProposalCommand = async (input, context) => {
116
108
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
117
109
  resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
118
110
  let body;
119
- body = JSON.stringify({
120
- ...(input.Actions != null && { Actions: se_ProposalActions(input.Actions, context) }),
121
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
122
- ...(input.Description != null && { Description: input.Description }),
123
- ...(input.MemberId != null && { MemberId: input.MemberId }),
124
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
125
- });
111
+ body = JSON.stringify(take(input, {
112
+ Actions: (_) => _json(_),
113
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
114
+ Description: [],
115
+ MemberId: [],
116
+ Tags: (_) => _json(_),
117
+ }));
126
118
  return new __HttpRequest({
127
119
  protocol,
128
120
  hostname,
@@ -469,9 +461,9 @@ export const se_TagResourceCommand = async (input, context) => {
469
461
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
470
462
  resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
471
463
  let body;
472
- body = JSON.stringify({
473
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
474
- });
464
+ body = JSON.stringify(take(input, {
465
+ Tags: (_) => _json(_),
466
+ }));
475
467
  return new __HttpRequest({
476
468
  protocol,
477
469
  hostname,
@@ -514,11 +506,9 @@ export const se_UpdateMemberCommand = async (input, context) => {
514
506
  resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
515
507
  resolvedPath = __resolvedPath(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
516
508
  let body;
517
- body = JSON.stringify({
518
- ...(input.LogPublishingConfiguration != null && {
519
- LogPublishingConfiguration: se_MemberLogPublishingConfiguration(input.LogPublishingConfiguration, context),
520
- }),
521
- });
509
+ body = JSON.stringify(take(input, {
510
+ LogPublishingConfiguration: (_) => _json(_),
511
+ }));
522
512
  return new __HttpRequest({
523
513
  protocol,
524
514
  hostname,
@@ -538,12 +528,10 @@ export const se_UpdateNodeCommand = async (input, context) => {
538
528
  resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
539
529
  resolvedPath = __resolvedPath(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
540
530
  let body;
541
- body = JSON.stringify({
542
- ...(input.LogPublishingConfiguration != null && {
543
- LogPublishingConfiguration: se_NodeLogPublishingConfiguration(input.LogPublishingConfiguration, context),
544
- }),
545
- ...(input.MemberId != null && { MemberId: input.MemberId }),
546
- });
531
+ body = JSON.stringify(take(input, {
532
+ LogPublishingConfiguration: (_) => _json(_),
533
+ MemberId: [],
534
+ }));
547
535
  return new __HttpRequest({
548
536
  protocol,
549
537
  hostname,
@@ -564,10 +552,10 @@ export const se_VoteOnProposalCommand = async (input, context) => {
564
552
  resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
565
553
  resolvedPath = __resolvedPath(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
566
554
  let body;
567
- body = JSON.stringify({
568
- ...(input.Vote != null && { Vote: input.Vote }),
569
- ...(input.VoterMemberId != null && { VoterMemberId: input.VoterMemberId }),
570
- });
555
+ body = JSON.stringify(take(input, {
556
+ Vote: [],
557
+ VoterMemberId: [],
558
+ }));
571
559
  return new __HttpRequest({
572
560
  protocol,
573
561
  hostname,
@@ -586,12 +574,11 @@ export const de_CreateAccessorCommand = async (output, context) => {
586
574
  $metadata: deserializeMetadata(output),
587
575
  });
588
576
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
589
- if (data.AccessorId != null) {
590
- contents.AccessorId = __expectString(data.AccessorId);
591
- }
592
- if (data.BillingToken != null) {
593
- contents.BillingToken = __expectString(data.BillingToken);
594
- }
577
+ const doc = take(data, {
578
+ AccessorId: __expectString,
579
+ BillingToken: __expectString,
580
+ });
581
+ Object.assign(contents, doc);
595
582
  return contents;
596
583
  };
597
584
  const de_CreateAccessorCommandError = async (output, context) => {
@@ -624,10 +611,9 @@ const de_CreateAccessorCommandError = async (output, context) => {
624
611
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
625
612
  default:
626
613
  const parsedBody = parsedOutput.body;
627
- throwDefaultError({
614
+ return throwDefaultError({
628
615
  output,
629
616
  parsedBody,
630
- exceptionCtor: __BaseException,
631
617
  errorCode,
632
618
  });
633
619
  }
@@ -640,9 +626,10 @@ export const de_CreateMemberCommand = async (output, context) => {
640
626
  $metadata: deserializeMetadata(output),
641
627
  });
642
628
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
643
- if (data.MemberId != null) {
644
- contents.MemberId = __expectString(data.MemberId);
645
- }
629
+ const doc = take(data, {
630
+ MemberId: __expectString,
631
+ });
632
+ Object.assign(contents, doc);
646
633
  return contents;
647
634
  };
648
635
  const de_CreateMemberCommandError = async (output, context) => {
@@ -681,10 +668,9 @@ const de_CreateMemberCommandError = async (output, context) => {
681
668
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
682
669
  default:
683
670
  const parsedBody = parsedOutput.body;
684
- throwDefaultError({
671
+ return throwDefaultError({
685
672
  output,
686
673
  parsedBody,
687
- exceptionCtor: __BaseException,
688
674
  errorCode,
689
675
  });
690
676
  }
@@ -697,12 +683,11 @@ export const de_CreateNetworkCommand = async (output, context) => {
697
683
  $metadata: deserializeMetadata(output),
698
684
  });
699
685
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
700
- if (data.MemberId != null) {
701
- contents.MemberId = __expectString(data.MemberId);
702
- }
703
- if (data.NetworkId != null) {
704
- contents.NetworkId = __expectString(data.NetworkId);
705
- }
686
+ const doc = take(data, {
687
+ MemberId: __expectString,
688
+ NetworkId: __expectString,
689
+ });
690
+ Object.assign(contents, doc);
706
691
  return contents;
707
692
  };
708
693
  const de_CreateNetworkCommandError = async (output, context) => {
@@ -735,10 +720,9 @@ const de_CreateNetworkCommandError = async (output, context) => {
735
720
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
736
721
  default:
737
722
  const parsedBody = parsedOutput.body;
738
- throwDefaultError({
723
+ return throwDefaultError({
739
724
  output,
740
725
  parsedBody,
741
- exceptionCtor: __BaseException,
742
726
  errorCode,
743
727
  });
744
728
  }
@@ -751,9 +735,10 @@ export const de_CreateNodeCommand = async (output, context) => {
751
735
  $metadata: deserializeMetadata(output),
752
736
  });
753
737
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
754
- if (data.NodeId != null) {
755
- contents.NodeId = __expectString(data.NodeId);
756
- }
738
+ const doc = take(data, {
739
+ NodeId: __expectString,
740
+ });
741
+ Object.assign(contents, doc);
757
742
  return contents;
758
743
  };
759
744
  const de_CreateNodeCommandError = async (output, context) => {
@@ -792,10 +777,9 @@ const de_CreateNodeCommandError = async (output, context) => {
792
777
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
793
778
  default:
794
779
  const parsedBody = parsedOutput.body;
795
- throwDefaultError({
780
+ return throwDefaultError({
796
781
  output,
797
782
  parsedBody,
798
- exceptionCtor: __BaseException,
799
783
  errorCode,
800
784
  });
801
785
  }
@@ -808,9 +792,10 @@ export const de_CreateProposalCommand = async (output, context) => {
808
792
  $metadata: deserializeMetadata(output),
809
793
  });
810
794
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
811
- if (data.ProposalId != null) {
812
- contents.ProposalId = __expectString(data.ProposalId);
813
- }
795
+ const doc = take(data, {
796
+ ProposalId: __expectString,
797
+ });
798
+ Object.assign(contents, doc);
814
799
  return contents;
815
800
  };
816
801
  const de_CreateProposalCommandError = async (output, context) => {
@@ -843,10 +828,9 @@ const de_CreateProposalCommandError = async (output, context) => {
843
828
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
844
829
  default:
845
830
  const parsedBody = parsedOutput.body;
846
- throwDefaultError({
831
+ return throwDefaultError({
847
832
  output,
848
833
  parsedBody,
849
- exceptionCtor: __BaseException,
850
834
  errorCode,
851
835
  });
852
836
  }
@@ -885,10 +869,9 @@ const de_DeleteAccessorCommandError = async (output, context) => {
885
869
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
886
870
  default:
887
871
  const parsedBody = parsedOutput.body;
888
- throwDefaultError({
872
+ return throwDefaultError({
889
873
  output,
890
874
  parsedBody,
891
- exceptionCtor: __BaseException,
892
875
  errorCode,
893
876
  });
894
877
  }
@@ -930,10 +913,9 @@ const de_DeleteMemberCommandError = async (output, context) => {
930
913
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
931
914
  default:
932
915
  const parsedBody = parsedOutput.body;
933
- throwDefaultError({
916
+ return throwDefaultError({
934
917
  output,
935
918
  parsedBody,
936
- exceptionCtor: __BaseException,
937
919
  errorCode,
938
920
  });
939
921
  }
@@ -975,10 +957,9 @@ const de_DeleteNodeCommandError = async (output, context) => {
975
957
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
976
958
  default:
977
959
  const parsedBody = parsedOutput.body;
978
- throwDefaultError({
960
+ return throwDefaultError({
979
961
  output,
980
962
  parsedBody,
981
- exceptionCtor: __BaseException,
982
963
  errorCode,
983
964
  });
984
965
  }
@@ -991,9 +972,10 @@ export const de_GetAccessorCommand = async (output, context) => {
991
972
  $metadata: deserializeMetadata(output),
992
973
  });
993
974
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
994
- if (data.Accessor != null) {
995
- contents.Accessor = de_Accessor(data.Accessor, context);
996
- }
975
+ const doc = take(data, {
976
+ Accessor: (_) => de_Accessor(_, context),
977
+ });
978
+ Object.assign(contents, doc);
997
979
  return contents;
998
980
  };
999
981
  const de_GetAccessorCommandError = async (output, context) => {
@@ -1020,10 +1002,9 @@ const de_GetAccessorCommandError = async (output, context) => {
1020
1002
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1021
1003
  default:
1022
1004
  const parsedBody = parsedOutput.body;
1023
- throwDefaultError({
1005
+ return throwDefaultError({
1024
1006
  output,
1025
1007
  parsedBody,
1026
- exceptionCtor: __BaseException,
1027
1008
  errorCode,
1028
1009
  });
1029
1010
  }
@@ -1036,9 +1017,10 @@ export const de_GetMemberCommand = async (output, context) => {
1036
1017
  $metadata: deserializeMetadata(output),
1037
1018
  });
1038
1019
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1039
- if (data.Member != null) {
1040
- contents.Member = de_Member(data.Member, context);
1041
- }
1020
+ const doc = take(data, {
1021
+ Member: (_) => de_Member(_, context),
1022
+ });
1023
+ Object.assign(contents, doc);
1042
1024
  return contents;
1043
1025
  };
1044
1026
  const de_GetMemberCommandError = async (output, context) => {
@@ -1065,10 +1047,9 @@ const de_GetMemberCommandError = async (output, context) => {
1065
1047
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1066
1048
  default:
1067
1049
  const parsedBody = parsedOutput.body;
1068
- throwDefaultError({
1050
+ return throwDefaultError({
1069
1051
  output,
1070
1052
  parsedBody,
1071
- exceptionCtor: __BaseException,
1072
1053
  errorCode,
1073
1054
  });
1074
1055
  }
@@ -1081,9 +1062,10 @@ export const de_GetNetworkCommand = async (output, context) => {
1081
1062
  $metadata: deserializeMetadata(output),
1082
1063
  });
1083
1064
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1084
- if (data.Network != null) {
1085
- contents.Network = de_Network(data.Network, context);
1086
- }
1065
+ const doc = take(data, {
1066
+ Network: (_) => de_Network(_, context),
1067
+ });
1068
+ Object.assign(contents, doc);
1087
1069
  return contents;
1088
1070
  };
1089
1071
  const de_GetNetworkCommandError = async (output, context) => {
@@ -1110,10 +1092,9 @@ const de_GetNetworkCommandError = async (output, context) => {
1110
1092
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1111
1093
  default:
1112
1094
  const parsedBody = parsedOutput.body;
1113
- throwDefaultError({
1095
+ return throwDefaultError({
1114
1096
  output,
1115
1097
  parsedBody,
1116
- exceptionCtor: __BaseException,
1117
1098
  errorCode,
1118
1099
  });
1119
1100
  }
@@ -1126,9 +1107,10 @@ export const de_GetNodeCommand = async (output, context) => {
1126
1107
  $metadata: deserializeMetadata(output),
1127
1108
  });
1128
1109
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1129
- if (data.Node != null) {
1130
- contents.Node = de_Node(data.Node, context);
1131
- }
1110
+ const doc = take(data, {
1111
+ Node: (_) => de_Node(_, context),
1112
+ });
1113
+ Object.assign(contents, doc);
1132
1114
  return contents;
1133
1115
  };
1134
1116
  const de_GetNodeCommandError = async (output, context) => {
@@ -1155,10 +1137,9 @@ const de_GetNodeCommandError = async (output, context) => {
1155
1137
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1156
1138
  default:
1157
1139
  const parsedBody = parsedOutput.body;
1158
- throwDefaultError({
1140
+ return throwDefaultError({
1159
1141
  output,
1160
1142
  parsedBody,
1161
- exceptionCtor: __BaseException,
1162
1143
  errorCode,
1163
1144
  });
1164
1145
  }
@@ -1171,9 +1152,10 @@ export const de_GetProposalCommand = async (output, context) => {
1171
1152
  $metadata: deserializeMetadata(output),
1172
1153
  });
1173
1154
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1174
- if (data.Proposal != null) {
1175
- contents.Proposal = de_Proposal(data.Proposal, context);
1176
- }
1155
+ const doc = take(data, {
1156
+ Proposal: (_) => de_Proposal(_, context),
1157
+ });
1158
+ Object.assign(contents, doc);
1177
1159
  return contents;
1178
1160
  };
1179
1161
  const de_GetProposalCommandError = async (output, context) => {
@@ -1200,10 +1182,9 @@ const de_GetProposalCommandError = async (output, context) => {
1200
1182
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1201
1183
  default:
1202
1184
  const parsedBody = parsedOutput.body;
1203
- throwDefaultError({
1185
+ return throwDefaultError({
1204
1186
  output,
1205
1187
  parsedBody,
1206
- exceptionCtor: __BaseException,
1207
1188
  errorCode,
1208
1189
  });
1209
1190
  }
@@ -1216,12 +1197,11 @@ export const de_ListAccessorsCommand = async (output, context) => {
1216
1197
  $metadata: deserializeMetadata(output),
1217
1198
  });
1218
1199
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1219
- if (data.Accessors != null) {
1220
- contents.Accessors = de_AccessorSummaryList(data.Accessors, context);
1221
- }
1222
- if (data.NextToken != null) {
1223
- contents.NextToken = __expectString(data.NextToken);
1224
- }
1200
+ const doc = take(data, {
1201
+ Accessors: (_) => de_AccessorSummaryList(_, context),
1202
+ NextToken: __expectString,
1203
+ });
1204
+ Object.assign(contents, doc);
1225
1205
  return contents;
1226
1206
  };
1227
1207
  const de_ListAccessorsCommandError = async (output, context) => {
@@ -1245,10 +1225,9 @@ const de_ListAccessorsCommandError = async (output, context) => {
1245
1225
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1246
1226
  default:
1247
1227
  const parsedBody = parsedOutput.body;
1248
- throwDefaultError({
1228
+ return throwDefaultError({
1249
1229
  output,
1250
1230
  parsedBody,
1251
- exceptionCtor: __BaseException,
1252
1231
  errorCode,
1253
1232
  });
1254
1233
  }
@@ -1261,12 +1240,11 @@ export const de_ListInvitationsCommand = async (output, context) => {
1261
1240
  $metadata: deserializeMetadata(output),
1262
1241
  });
1263
1242
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1264
- if (data.Invitations != null) {
1265
- contents.Invitations = de_InvitationList(data.Invitations, context);
1266
- }
1267
- if (data.NextToken != null) {
1268
- contents.NextToken = __expectString(data.NextToken);
1269
- }
1243
+ const doc = take(data, {
1244
+ Invitations: (_) => de_InvitationList(_, context),
1245
+ NextToken: __expectString,
1246
+ });
1247
+ Object.assign(contents, doc);
1270
1248
  return contents;
1271
1249
  };
1272
1250
  const de_ListInvitationsCommandError = async (output, context) => {
@@ -1296,10 +1274,9 @@ const de_ListInvitationsCommandError = async (output, context) => {
1296
1274
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1297
1275
  default:
1298
1276
  const parsedBody = parsedOutput.body;
1299
- throwDefaultError({
1277
+ return throwDefaultError({
1300
1278
  output,
1301
1279
  parsedBody,
1302
- exceptionCtor: __BaseException,
1303
1280
  errorCode,
1304
1281
  });
1305
1282
  }
@@ -1312,12 +1289,11 @@ export const de_ListMembersCommand = async (output, context) => {
1312
1289
  $metadata: deserializeMetadata(output),
1313
1290
  });
1314
1291
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1315
- if (data.Members != null) {
1316
- contents.Members = de_MemberSummaryList(data.Members, context);
1317
- }
1318
- if (data.NextToken != null) {
1319
- contents.NextToken = __expectString(data.NextToken);
1320
- }
1292
+ const doc = take(data, {
1293
+ Members: (_) => de_MemberSummaryList(_, context),
1294
+ NextToken: __expectString,
1295
+ });
1296
+ Object.assign(contents, doc);
1321
1297
  return contents;
1322
1298
  };
1323
1299
  const de_ListMembersCommandError = async (output, context) => {
@@ -1341,10 +1317,9 @@ const de_ListMembersCommandError = async (output, context) => {
1341
1317
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1342
1318
  default:
1343
1319
  const parsedBody = parsedOutput.body;
1344
- throwDefaultError({
1320
+ return throwDefaultError({
1345
1321
  output,
1346
1322
  parsedBody,
1347
- exceptionCtor: __BaseException,
1348
1323
  errorCode,
1349
1324
  });
1350
1325
  }
@@ -1357,12 +1332,11 @@ export const de_ListNetworksCommand = async (output, context) => {
1357
1332
  $metadata: deserializeMetadata(output),
1358
1333
  });
1359
1334
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1360
- if (data.Networks != null) {
1361
- contents.Networks = de_NetworkSummaryList(data.Networks, context);
1362
- }
1363
- if (data.NextToken != null) {
1364
- contents.NextToken = __expectString(data.NextToken);
1365
- }
1335
+ const doc = take(data, {
1336
+ Networks: (_) => de_NetworkSummaryList(_, context),
1337
+ NextToken: __expectString,
1338
+ });
1339
+ Object.assign(contents, doc);
1366
1340
  return contents;
1367
1341
  };
1368
1342
  const de_ListNetworksCommandError = async (output, context) => {
@@ -1386,10 +1360,9 @@ const de_ListNetworksCommandError = async (output, context) => {
1386
1360
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1387
1361
  default:
1388
1362
  const parsedBody = parsedOutput.body;
1389
- throwDefaultError({
1363
+ return throwDefaultError({
1390
1364
  output,
1391
1365
  parsedBody,
1392
- exceptionCtor: __BaseException,
1393
1366
  errorCode,
1394
1367
  });
1395
1368
  }
@@ -1402,12 +1375,11 @@ export const de_ListNodesCommand = async (output, context) => {
1402
1375
  $metadata: deserializeMetadata(output),
1403
1376
  });
1404
1377
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1405
- if (data.NextToken != null) {
1406
- contents.NextToken = __expectString(data.NextToken);
1407
- }
1408
- if (data.Nodes != null) {
1409
- contents.Nodes = de_NodeSummaryList(data.Nodes, context);
1410
- }
1378
+ const doc = take(data, {
1379
+ NextToken: __expectString,
1380
+ Nodes: (_) => de_NodeSummaryList(_, context),
1381
+ });
1382
+ Object.assign(contents, doc);
1411
1383
  return contents;
1412
1384
  };
1413
1385
  const de_ListNodesCommandError = async (output, context) => {
@@ -1431,10 +1403,9 @@ const de_ListNodesCommandError = async (output, context) => {
1431
1403
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1432
1404
  default:
1433
1405
  const parsedBody = parsedOutput.body;
1434
- throwDefaultError({
1406
+ return throwDefaultError({
1435
1407
  output,
1436
1408
  parsedBody,
1437
- exceptionCtor: __BaseException,
1438
1409
  errorCode,
1439
1410
  });
1440
1411
  }
@@ -1447,12 +1418,11 @@ export const de_ListProposalsCommand = async (output, context) => {
1447
1418
  $metadata: deserializeMetadata(output),
1448
1419
  });
1449
1420
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1450
- if (data.NextToken != null) {
1451
- contents.NextToken = __expectString(data.NextToken);
1452
- }
1453
- if (data.Proposals != null) {
1454
- contents.Proposals = de_ProposalSummaryList(data.Proposals, context);
1455
- }
1421
+ const doc = take(data, {
1422
+ NextToken: __expectString,
1423
+ Proposals: (_) => de_ProposalSummaryList(_, context),
1424
+ });
1425
+ Object.assign(contents, doc);
1456
1426
  return contents;
1457
1427
  };
1458
1428
  const de_ListProposalsCommandError = async (output, context) => {
@@ -1479,10 +1449,9 @@ const de_ListProposalsCommandError = async (output, context) => {
1479
1449
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1480
1450
  default:
1481
1451
  const parsedBody = parsedOutput.body;
1482
- throwDefaultError({
1452
+ return throwDefaultError({
1483
1453
  output,
1484
1454
  parsedBody,
1485
- exceptionCtor: __BaseException,
1486
1455
  errorCode,
1487
1456
  });
1488
1457
  }
@@ -1495,12 +1464,11 @@ export const de_ListProposalVotesCommand = async (output, context) => {
1495
1464
  $metadata: deserializeMetadata(output),
1496
1465
  });
1497
1466
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1498
- if (data.NextToken != null) {
1499
- contents.NextToken = __expectString(data.NextToken);
1500
- }
1501
- if (data.ProposalVotes != null) {
1502
- contents.ProposalVotes = de_ProposalVoteList(data.ProposalVotes, context);
1503
- }
1467
+ const doc = take(data, {
1468
+ NextToken: __expectString,
1469
+ ProposalVotes: _json,
1470
+ });
1471
+ Object.assign(contents, doc);
1504
1472
  return contents;
1505
1473
  };
1506
1474
  const de_ListProposalVotesCommandError = async (output, context) => {
@@ -1524,10 +1492,9 @@ const de_ListProposalVotesCommandError = async (output, context) => {
1524
1492
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1525
1493
  default:
1526
1494
  const parsedBody = parsedOutput.body;
1527
- throwDefaultError({
1495
+ return throwDefaultError({
1528
1496
  output,
1529
1497
  parsedBody,
1530
- exceptionCtor: __BaseException,
1531
1498
  errorCode,
1532
1499
  });
1533
1500
  }
@@ -1540,9 +1507,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1540
1507
  $metadata: deserializeMetadata(output),
1541
1508
  });
1542
1509
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1543
- if (data.Tags != null) {
1544
- contents.Tags = de_OutputTagMap(data.Tags, context);
1545
- }
1510
+ const doc = take(data, {
1511
+ Tags: _json,
1512
+ });
1513
+ Object.assign(contents, doc);
1546
1514
  return contents;
1547
1515
  };
1548
1516
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1566,10 +1534,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1566
1534
  throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
1567
1535
  default:
1568
1536
  const parsedBody = parsedOutput.body;
1569
- throwDefaultError({
1537
+ return throwDefaultError({
1570
1538
  output,
1571
1539
  parsedBody,
1572
- exceptionCtor: __BaseException,
1573
1540
  errorCode,
1574
1541
  });
1575
1542
  }
@@ -1611,10 +1578,9 @@ const de_RejectInvitationCommandError = async (output, context) => {
1611
1578
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1612
1579
  default:
1613
1580
  const parsedBody = parsedOutput.body;
1614
- throwDefaultError({
1581
+ return throwDefaultError({
1615
1582
  output,
1616
1583
  parsedBody,
1617
- exceptionCtor: __BaseException,
1618
1584
  errorCode,
1619
1585
  });
1620
1586
  }
@@ -1653,10 +1619,9 @@ const de_TagResourceCommandError = async (output, context) => {
1653
1619
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1654
1620
  default:
1655
1621
  const parsedBody = parsedOutput.body;
1656
- throwDefaultError({
1622
+ return throwDefaultError({
1657
1623
  output,
1658
1624
  parsedBody,
1659
- exceptionCtor: __BaseException,
1660
1625
  errorCode,
1661
1626
  });
1662
1627
  }
@@ -1692,10 +1657,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1692
1657
  throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
1693
1658
  default:
1694
1659
  const parsedBody = parsedOutput.body;
1695
- throwDefaultError({
1660
+ return throwDefaultError({
1696
1661
  output,
1697
1662
  parsedBody,
1698
- exceptionCtor: __BaseException,
1699
1663
  errorCode,
1700
1664
  });
1701
1665
  }
@@ -1734,10 +1698,9 @@ const de_UpdateMemberCommandError = async (output, context) => {
1734
1698
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1735
1699
  default:
1736
1700
  const parsedBody = parsedOutput.body;
1737
- throwDefaultError({
1701
+ return throwDefaultError({
1738
1702
  output,
1739
1703
  parsedBody,
1740
- exceptionCtor: __BaseException,
1741
1704
  errorCode,
1742
1705
  });
1743
1706
  }
@@ -1776,10 +1739,9 @@ const de_UpdateNodeCommandError = async (output, context) => {
1776
1739
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1777
1740
  default:
1778
1741
  const parsedBody = parsedOutput.body;
1779
- throwDefaultError({
1742
+ return throwDefaultError({
1780
1743
  output,
1781
1744
  parsedBody,
1782
- exceptionCtor: __BaseException,
1783
1745
  errorCode,
1784
1746
  });
1785
1747
  }
@@ -1821,21 +1783,21 @@ const de_VoteOnProposalCommandError = async (output, context) => {
1821
1783
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1822
1784
  default:
1823
1785
  const parsedBody = parsedOutput.body;
1824
- throwDefaultError({
1786
+ return throwDefaultError({
1825
1787
  output,
1826
1788
  parsedBody,
1827
- exceptionCtor: __BaseException,
1828
1789
  errorCode,
1829
1790
  });
1830
1791
  }
1831
1792
  };
1832
- const map = __map;
1793
+ const throwDefaultError = withBaseException(__BaseException);
1833
1794
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1834
1795
  const contents = map({});
1835
1796
  const data = parsedOutput.body;
1836
- if (data.Message != null) {
1837
- contents.Message = __expectString(data.Message);
1838
- }
1797
+ const doc = take(data, {
1798
+ Message: __expectString,
1799
+ });
1800
+ Object.assign(contents, doc);
1839
1801
  const exception = new AccessDeniedException({
1840
1802
  $metadata: deserializeMetadata(parsedOutput),
1841
1803
  ...contents,
@@ -1845,9 +1807,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1845
1807
  const de_IllegalActionExceptionRes = async (parsedOutput, context) => {
1846
1808
  const contents = map({});
1847
1809
  const data = parsedOutput.body;
1848
- if (data.Message != null) {
1849
- contents.Message = __expectString(data.Message);
1850
- }
1810
+ const doc = take(data, {
1811
+ Message: __expectString,
1812
+ });
1813
+ Object.assign(contents, doc);
1851
1814
  const exception = new IllegalActionException({
1852
1815
  $metadata: deserializeMetadata(parsedOutput),
1853
1816
  ...contents,
@@ -1857,6 +1820,8 @@ const de_IllegalActionExceptionRes = async (parsedOutput, context) => {
1857
1820
  const de_InternalServiceErrorExceptionRes = async (parsedOutput, context) => {
1858
1821
  const contents = map({});
1859
1822
  const data = parsedOutput.body;
1823
+ const doc = take(data, {});
1824
+ Object.assign(contents, doc);
1860
1825
  const exception = new InternalServiceErrorException({
1861
1826
  $metadata: deserializeMetadata(parsedOutput),
1862
1827
  ...contents,
@@ -1866,9 +1831,10 @@ const de_InternalServiceErrorExceptionRes = async (parsedOutput, context) => {
1866
1831
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1867
1832
  const contents = map({});
1868
1833
  const data = parsedOutput.body;
1869
- if (data.Message != null) {
1870
- contents.Message = __expectString(data.Message);
1871
- }
1834
+ const doc = take(data, {
1835
+ Message: __expectString,
1836
+ });
1837
+ Object.assign(contents, doc);
1872
1838
  const exception = new InvalidRequestException({
1873
1839
  $metadata: deserializeMetadata(parsedOutput),
1874
1840
  ...contents,
@@ -1878,9 +1844,10 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1878
1844
  const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1879
1845
  const contents = map({});
1880
1846
  const data = parsedOutput.body;
1881
- if (data.Message != null) {
1882
- contents.Message = __expectString(data.Message);
1883
- }
1847
+ const doc = take(data, {
1848
+ Message: __expectString,
1849
+ });
1850
+ Object.assign(contents, doc);
1884
1851
  const exception = new ResourceAlreadyExistsException({
1885
1852
  $metadata: deserializeMetadata(parsedOutput),
1886
1853
  ...contents,
@@ -1890,9 +1857,10 @@ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1890
1857
  const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
1891
1858
  const contents = map({});
1892
1859
  const data = parsedOutput.body;
1893
- if (data.Message != null) {
1894
- contents.Message = __expectString(data.Message);
1895
- }
1860
+ const doc = take(data, {
1861
+ Message: __expectString,
1862
+ });
1863
+ Object.assign(contents, doc);
1896
1864
  const exception = new ResourceLimitExceededException({
1897
1865
  $metadata: deserializeMetadata(parsedOutput),
1898
1866
  ...contents,
@@ -1902,12 +1870,11 @@ const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
1902
1870
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1903
1871
  const contents = map({});
1904
1872
  const data = parsedOutput.body;
1905
- if (data.Message != null) {
1906
- contents.Message = __expectString(data.Message);
1907
- }
1908
- if (data.ResourceName != null) {
1909
- contents.ResourceName = __expectString(data.ResourceName);
1910
- }
1873
+ const doc = take(data, {
1874
+ Message: __expectString,
1875
+ ResourceName: __expectString,
1876
+ });
1877
+ Object.assign(contents, doc);
1911
1878
  const exception = new ResourceNotFoundException({
1912
1879
  $metadata: deserializeMetadata(parsedOutput),
1913
1880
  ...contents,
@@ -1917,9 +1884,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1917
1884
  const de_ResourceNotReadyExceptionRes = async (parsedOutput, context) => {
1918
1885
  const contents = map({});
1919
1886
  const data = parsedOutput.body;
1920
- if (data.Message != null) {
1921
- contents.Message = __expectString(data.Message);
1922
- }
1887
+ const doc = take(data, {
1888
+ Message: __expectString,
1889
+ });
1890
+ Object.assign(contents, doc);
1923
1891
  const exception = new ResourceNotReadyException({
1924
1892
  $metadata: deserializeMetadata(parsedOutput),
1925
1893
  ...contents,
@@ -1929,6 +1897,8 @@ const de_ResourceNotReadyExceptionRes = async (parsedOutput, context) => {
1929
1897
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1930
1898
  const contents = map({});
1931
1899
  const data = parsedOutput.body;
1900
+ const doc = take(data, {});
1901
+ Object.assign(contents, doc);
1932
1902
  const exception = new ThrottlingException({
1933
1903
  $metadata: deserializeMetadata(parsedOutput),
1934
1904
  ...contents,
@@ -1938,524 +1908,206 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1938
1908
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1939
1909
  const contents = map({});
1940
1910
  const data = parsedOutput.body;
1941
- if (data.Message != null) {
1942
- contents.Message = __expectString(data.Message);
1943
- }
1944
- if (data.ResourceName != null) {
1945
- contents.ResourceName = __expectString(data.ResourceName);
1946
- }
1911
+ const doc = take(data, {
1912
+ Message: __expectString,
1913
+ ResourceName: __expectString,
1914
+ });
1915
+ Object.assign(contents, doc);
1947
1916
  const exception = new TooManyTagsException({
1948
1917
  $metadata: deserializeMetadata(parsedOutput),
1949
1918
  ...contents,
1950
1919
  });
1951
1920
  return __decorateServiceException(exception, parsedOutput.body);
1952
1921
  };
1953
- const se_ApprovalThresholdPolicy = (input, context) => {
1954
- return {
1955
- ...(input.ProposalDurationInHours != null && { ProposalDurationInHours: input.ProposalDurationInHours }),
1956
- ...(input.ThresholdComparator != null && { ThresholdComparator: input.ThresholdComparator }),
1957
- ...(input.ThresholdPercentage != null && { ThresholdPercentage: input.ThresholdPercentage }),
1958
- };
1959
- };
1960
- const se_InputTagMap = (input, context) => {
1961
- return Object.entries(input).reduce((acc, [key, value]) => {
1962
- if (value === null) {
1963
- return acc;
1964
- }
1965
- acc[key] = value;
1966
- return acc;
1967
- }, {});
1968
- };
1969
- const se_InviteAction = (input, context) => {
1970
- return {
1971
- ...(input.Principal != null && { Principal: input.Principal }),
1972
- };
1973
- };
1974
- const se_InviteActionList = (input, context) => {
1975
- return input
1976
- .filter((e) => e != null)
1977
- .map((entry) => {
1978
- return se_InviteAction(entry, context);
1979
- });
1980
- };
1981
- const se_LogConfiguration = (input, context) => {
1982
- return {
1983
- ...(input.Enabled != null && { Enabled: input.Enabled }),
1984
- };
1985
- };
1986
- const se_LogConfigurations = (input, context) => {
1987
- return {
1988
- ...(input.Cloudwatch != null && { Cloudwatch: se_LogConfiguration(input.Cloudwatch, context) }),
1989
- };
1990
- };
1991
- const se_MemberConfiguration = (input, context) => {
1992
- return {
1993
- ...(input.Description != null && { Description: input.Description }),
1994
- ...(input.FrameworkConfiguration != null && {
1995
- FrameworkConfiguration: se_MemberFrameworkConfiguration(input.FrameworkConfiguration, context),
1996
- }),
1997
- ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
1998
- ...(input.LogPublishingConfiguration != null && {
1999
- LogPublishingConfiguration: se_MemberLogPublishingConfiguration(input.LogPublishingConfiguration, context),
2000
- }),
2001
- ...(input.Name != null && { Name: input.Name }),
2002
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
2003
- };
2004
- };
2005
- const se_MemberFabricConfiguration = (input, context) => {
2006
- return {
2007
- ...(input.AdminPassword != null && { AdminPassword: input.AdminPassword }),
2008
- ...(input.AdminUsername != null && { AdminUsername: input.AdminUsername }),
2009
- };
2010
- };
2011
- const se_MemberFabricLogPublishingConfiguration = (input, context) => {
2012
- return {
2013
- ...(input.CaLogs != null && { CaLogs: se_LogConfigurations(input.CaLogs, context) }),
2014
- };
2015
- };
2016
- const se_MemberFrameworkConfiguration = (input, context) => {
2017
- return {
2018
- ...(input.Fabric != null && { Fabric: se_MemberFabricConfiguration(input.Fabric, context) }),
2019
- };
2020
- };
2021
- const se_MemberLogPublishingConfiguration = (input, context) => {
2022
- return {
2023
- ...(input.Fabric != null && { Fabric: se_MemberFabricLogPublishingConfiguration(input.Fabric, context) }),
2024
- };
2025
- };
2026
- const se_NetworkFabricConfiguration = (input, context) => {
2027
- return {
2028
- ...(input.Edition != null && { Edition: input.Edition }),
2029
- };
2030
- };
2031
- const se_NetworkFrameworkConfiguration = (input, context) => {
2032
- return {
2033
- ...(input.Fabric != null && { Fabric: se_NetworkFabricConfiguration(input.Fabric, context) }),
2034
- };
2035
- };
2036
- const se_NodeConfiguration = (input, context) => {
2037
- return {
2038
- ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }),
2039
- ...(input.InstanceType != null && { InstanceType: input.InstanceType }),
2040
- ...(input.LogPublishingConfiguration != null && {
2041
- LogPublishingConfiguration: se_NodeLogPublishingConfiguration(input.LogPublishingConfiguration, context),
2042
- }),
2043
- ...(input.StateDB != null && { StateDB: input.StateDB }),
2044
- };
2045
- };
2046
- const se_NodeFabricLogPublishingConfiguration = (input, context) => {
2047
- return {
2048
- ...(input.ChaincodeLogs != null && { ChaincodeLogs: se_LogConfigurations(input.ChaincodeLogs, context) }),
2049
- ...(input.PeerLogs != null && { PeerLogs: se_LogConfigurations(input.PeerLogs, context) }),
2050
- };
2051
- };
2052
- const se_NodeLogPublishingConfiguration = (input, context) => {
2053
- return {
2054
- ...(input.Fabric != null && { Fabric: se_NodeFabricLogPublishingConfiguration(input.Fabric, context) }),
2055
- };
2056
- };
2057
- const se_ProposalActions = (input, context) => {
2058
- return {
2059
- ...(input.Invitations != null && { Invitations: se_InviteActionList(input.Invitations, context) }),
2060
- ...(input.Removals != null && { Removals: se_RemoveActionList(input.Removals, context) }),
2061
- };
2062
- };
2063
- const se_RemoveAction = (input, context) => {
2064
- return {
2065
- ...(input.MemberId != null && { MemberId: input.MemberId }),
2066
- };
2067
- };
2068
- const se_RemoveActionList = (input, context) => {
2069
- return input
2070
- .filter((e) => e != null)
2071
- .map((entry) => {
2072
- return se_RemoveAction(entry, context);
2073
- });
2074
- };
2075
- const se_VotingPolicy = (input, context) => {
2076
- return {
2077
- ...(input.ApprovalThresholdPolicy != null && {
2078
- ApprovalThresholdPolicy: se_ApprovalThresholdPolicy(input.ApprovalThresholdPolicy, context),
2079
- }),
2080
- };
2081
- };
2082
1922
  const de_Accessor = (output, context) => {
2083
- return {
2084
- Arn: __expectString(output.Arn),
2085
- BillingToken: __expectString(output.BillingToken),
2086
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2087
- Id: __expectString(output.Id),
2088
- Status: __expectString(output.Status),
2089
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2090
- Type: __expectString(output.Type),
2091
- };
1923
+ return take(output, {
1924
+ Arn: __expectString,
1925
+ BillingToken: __expectString,
1926
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1927
+ Id: __expectString,
1928
+ Status: __expectString,
1929
+ Tags: _json,
1930
+ Type: __expectString,
1931
+ });
2092
1932
  };
2093
1933
  const de_AccessorSummary = (output, context) => {
2094
- return {
2095
- Arn: __expectString(output.Arn),
2096
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2097
- Id: __expectString(output.Id),
2098
- Status: __expectString(output.Status),
2099
- Type: __expectString(output.Type),
2100
- };
1934
+ return take(output, {
1935
+ Arn: __expectString,
1936
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1937
+ Id: __expectString,
1938
+ Status: __expectString,
1939
+ Type: __expectString,
1940
+ });
2101
1941
  };
2102
1942
  const de_AccessorSummaryList = (output, context) => {
2103
1943
  const retVal = (output || [])
2104
1944
  .filter((e) => e != null)
2105
1945
  .map((entry) => {
2106
- if (entry === null) {
2107
- return null;
2108
- }
2109
1946
  return de_AccessorSummary(entry, context);
2110
1947
  });
2111
1948
  return retVal;
2112
1949
  };
2113
- const de_ApprovalThresholdPolicy = (output, context) => {
2114
- return {
2115
- ProposalDurationInHours: __expectInt32(output.ProposalDurationInHours),
2116
- ThresholdComparator: __expectString(output.ThresholdComparator),
2117
- ThresholdPercentage: __expectInt32(output.ThresholdPercentage),
2118
- };
2119
- };
2120
1950
  const de_Invitation = (output, context) => {
2121
- return {
2122
- Arn: __expectString(output.Arn),
2123
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2124
- ExpirationDate: output.ExpirationDate != null
2125
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationDate))
2126
- : undefined,
2127
- InvitationId: __expectString(output.InvitationId),
2128
- NetworkSummary: output.NetworkSummary != null ? de_NetworkSummary(output.NetworkSummary, context) : undefined,
2129
- Status: __expectString(output.Status),
2130
- };
1951
+ return take(output, {
1952
+ Arn: __expectString,
1953
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1954
+ ExpirationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1955
+ InvitationId: __expectString,
1956
+ NetworkSummary: (_) => de_NetworkSummary(_, context),
1957
+ Status: __expectString,
1958
+ });
2131
1959
  };
2132
1960
  const de_InvitationList = (output, context) => {
2133
1961
  const retVal = (output || [])
2134
1962
  .filter((e) => e != null)
2135
1963
  .map((entry) => {
2136
- if (entry === null) {
2137
- return null;
2138
- }
2139
1964
  return de_Invitation(entry, context);
2140
1965
  });
2141
1966
  return retVal;
2142
1967
  };
2143
- const de_InviteAction = (output, context) => {
2144
- return {
2145
- Principal: __expectString(output.Principal),
2146
- };
2147
- };
2148
- const de_InviteActionList = (output, context) => {
2149
- const retVal = (output || [])
2150
- .filter((e) => e != null)
2151
- .map((entry) => {
2152
- if (entry === null) {
2153
- return null;
2154
- }
2155
- return de_InviteAction(entry, context);
2156
- });
2157
- return retVal;
2158
- };
2159
- const de_LogConfiguration = (output, context) => {
2160
- return {
2161
- Enabled: __expectBoolean(output.Enabled),
2162
- };
2163
- };
2164
- const de_LogConfigurations = (output, context) => {
2165
- return {
2166
- Cloudwatch: output.Cloudwatch != null ? de_LogConfiguration(output.Cloudwatch, context) : undefined,
2167
- };
2168
- };
2169
1968
  const de_Member = (output, context) => {
2170
- return {
2171
- Arn: __expectString(output.Arn),
2172
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2173
- Description: __expectString(output.Description),
2174
- FrameworkAttributes: output.FrameworkAttributes != null
2175
- ? de_MemberFrameworkAttributes(output.FrameworkAttributes, context)
2176
- : undefined,
2177
- Id: __expectString(output.Id),
2178
- KmsKeyArn: __expectString(output.KmsKeyArn),
2179
- LogPublishingConfiguration: output.LogPublishingConfiguration != null
2180
- ? de_MemberLogPublishingConfiguration(output.LogPublishingConfiguration, context)
2181
- : undefined,
2182
- Name: __expectString(output.Name),
2183
- NetworkId: __expectString(output.NetworkId),
2184
- Status: __expectString(output.Status),
2185
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2186
- };
2187
- };
2188
- const de_MemberFabricAttributes = (output, context) => {
2189
- return {
2190
- AdminUsername: __expectString(output.AdminUsername),
2191
- CaEndpoint: __expectString(output.CaEndpoint),
2192
- };
2193
- };
2194
- const de_MemberFabricLogPublishingConfiguration = (output, context) => {
2195
- return {
2196
- CaLogs: output.CaLogs != null ? de_LogConfigurations(output.CaLogs, context) : undefined,
2197
- };
2198
- };
2199
- const de_MemberFrameworkAttributes = (output, context) => {
2200
- return {
2201
- Fabric: output.Fabric != null ? de_MemberFabricAttributes(output.Fabric, context) : undefined,
2202
- };
2203
- };
2204
- const de_MemberLogPublishingConfiguration = (output, context) => {
2205
- return {
2206
- Fabric: output.Fabric != null ? de_MemberFabricLogPublishingConfiguration(output.Fabric, context) : undefined,
2207
- };
1969
+ return take(output, {
1970
+ Arn: __expectString,
1971
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1972
+ Description: __expectString,
1973
+ FrameworkAttributes: _json,
1974
+ Id: __expectString,
1975
+ KmsKeyArn: __expectString,
1976
+ LogPublishingConfiguration: _json,
1977
+ Name: __expectString,
1978
+ NetworkId: __expectString,
1979
+ Status: __expectString,
1980
+ Tags: _json,
1981
+ });
2208
1982
  };
2209
1983
  const de_MemberSummary = (output, context) => {
2210
- return {
2211
- Arn: __expectString(output.Arn),
2212
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2213
- Description: __expectString(output.Description),
2214
- Id: __expectString(output.Id),
2215
- IsOwned: __expectBoolean(output.IsOwned),
2216
- Name: __expectString(output.Name),
2217
- Status: __expectString(output.Status),
2218
- };
1984
+ return take(output, {
1985
+ Arn: __expectString,
1986
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1987
+ Description: __expectString,
1988
+ Id: __expectString,
1989
+ IsOwned: __expectBoolean,
1990
+ Name: __expectString,
1991
+ Status: __expectString,
1992
+ });
2219
1993
  };
2220
1994
  const de_MemberSummaryList = (output, context) => {
2221
1995
  const retVal = (output || [])
2222
1996
  .filter((e) => e != null)
2223
1997
  .map((entry) => {
2224
- if (entry === null) {
2225
- return null;
2226
- }
2227
1998
  return de_MemberSummary(entry, context);
2228
1999
  });
2229
2000
  return retVal;
2230
2001
  };
2231
2002
  const de_Network = (output, context) => {
2232
- return {
2233
- Arn: __expectString(output.Arn),
2234
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2235
- Description: __expectString(output.Description),
2236
- Framework: __expectString(output.Framework),
2237
- FrameworkAttributes: output.FrameworkAttributes != null
2238
- ? de_NetworkFrameworkAttributes(output.FrameworkAttributes, context)
2239
- : undefined,
2240
- FrameworkVersion: __expectString(output.FrameworkVersion),
2241
- Id: __expectString(output.Id),
2242
- Name: __expectString(output.Name),
2243
- Status: __expectString(output.Status),
2244
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2245
- VotingPolicy: output.VotingPolicy != null ? de_VotingPolicy(output.VotingPolicy, context) : undefined,
2246
- VpcEndpointServiceName: __expectString(output.VpcEndpointServiceName),
2247
- };
2248
- };
2249
- const de_NetworkEthereumAttributes = (output, context) => {
2250
- return {
2251
- ChainId: __expectString(output.ChainId),
2252
- };
2253
- };
2254
- const de_NetworkFabricAttributes = (output, context) => {
2255
- return {
2256
- Edition: __expectString(output.Edition),
2257
- OrderingServiceEndpoint: __expectString(output.OrderingServiceEndpoint),
2258
- };
2259
- };
2260
- const de_NetworkFrameworkAttributes = (output, context) => {
2261
- return {
2262
- Ethereum: output.Ethereum != null ? de_NetworkEthereumAttributes(output.Ethereum, context) : undefined,
2263
- Fabric: output.Fabric != null ? de_NetworkFabricAttributes(output.Fabric, context) : undefined,
2264
- };
2003
+ return take(output, {
2004
+ Arn: __expectString,
2005
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2006
+ Description: __expectString,
2007
+ Framework: __expectString,
2008
+ FrameworkAttributes: _json,
2009
+ FrameworkVersion: __expectString,
2010
+ Id: __expectString,
2011
+ Name: __expectString,
2012
+ Status: __expectString,
2013
+ Tags: _json,
2014
+ VotingPolicy: _json,
2015
+ VpcEndpointServiceName: __expectString,
2016
+ });
2265
2017
  };
2266
2018
  const de_NetworkSummary = (output, context) => {
2267
- return {
2268
- Arn: __expectString(output.Arn),
2269
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2270
- Description: __expectString(output.Description),
2271
- Framework: __expectString(output.Framework),
2272
- FrameworkVersion: __expectString(output.FrameworkVersion),
2273
- Id: __expectString(output.Id),
2274
- Name: __expectString(output.Name),
2275
- Status: __expectString(output.Status),
2276
- };
2019
+ return take(output, {
2020
+ Arn: __expectString,
2021
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2022
+ Description: __expectString,
2023
+ Framework: __expectString,
2024
+ FrameworkVersion: __expectString,
2025
+ Id: __expectString,
2026
+ Name: __expectString,
2027
+ Status: __expectString,
2028
+ });
2277
2029
  };
2278
2030
  const de_NetworkSummaryList = (output, context) => {
2279
2031
  const retVal = (output || [])
2280
2032
  .filter((e) => e != null)
2281
2033
  .map((entry) => {
2282
- if (entry === null) {
2283
- return null;
2284
- }
2285
2034
  return de_NetworkSummary(entry, context);
2286
2035
  });
2287
2036
  return retVal;
2288
2037
  };
2289
2038
  const de_Node = (output, context) => {
2290
- return {
2291
- Arn: __expectString(output.Arn),
2292
- AvailabilityZone: __expectString(output.AvailabilityZone),
2293
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2294
- FrameworkAttributes: output.FrameworkAttributes != null ? de_NodeFrameworkAttributes(output.FrameworkAttributes, context) : undefined,
2295
- Id: __expectString(output.Id),
2296
- InstanceType: __expectString(output.InstanceType),
2297
- KmsKeyArn: __expectString(output.KmsKeyArn),
2298
- LogPublishingConfiguration: output.LogPublishingConfiguration != null
2299
- ? de_NodeLogPublishingConfiguration(output.LogPublishingConfiguration, context)
2300
- : undefined,
2301
- MemberId: __expectString(output.MemberId),
2302
- NetworkId: __expectString(output.NetworkId),
2303
- StateDB: __expectString(output.StateDB),
2304
- Status: __expectString(output.Status),
2305
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2306
- };
2307
- };
2308
- const de_NodeEthereumAttributes = (output, context) => {
2309
- return {
2310
- HttpEndpoint: __expectString(output.HttpEndpoint),
2311
- WebSocketEndpoint: __expectString(output.WebSocketEndpoint),
2312
- };
2313
- };
2314
- const de_NodeFabricAttributes = (output, context) => {
2315
- return {
2316
- PeerEndpoint: __expectString(output.PeerEndpoint),
2317
- PeerEventEndpoint: __expectString(output.PeerEventEndpoint),
2318
- };
2319
- };
2320
- const de_NodeFabricLogPublishingConfiguration = (output, context) => {
2321
- return {
2322
- ChaincodeLogs: output.ChaincodeLogs != null ? de_LogConfigurations(output.ChaincodeLogs, context) : undefined,
2323
- PeerLogs: output.PeerLogs != null ? de_LogConfigurations(output.PeerLogs, context) : undefined,
2324
- };
2325
- };
2326
- const de_NodeFrameworkAttributes = (output, context) => {
2327
- return {
2328
- Ethereum: output.Ethereum != null ? de_NodeEthereumAttributes(output.Ethereum, context) : undefined,
2329
- Fabric: output.Fabric != null ? de_NodeFabricAttributes(output.Fabric, context) : undefined,
2330
- };
2331
- };
2332
- const de_NodeLogPublishingConfiguration = (output, context) => {
2333
- return {
2334
- Fabric: output.Fabric != null ? de_NodeFabricLogPublishingConfiguration(output.Fabric, context) : undefined,
2335
- };
2039
+ return take(output, {
2040
+ Arn: __expectString,
2041
+ AvailabilityZone: __expectString,
2042
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2043
+ FrameworkAttributes: _json,
2044
+ Id: __expectString,
2045
+ InstanceType: __expectString,
2046
+ KmsKeyArn: __expectString,
2047
+ LogPublishingConfiguration: _json,
2048
+ MemberId: __expectString,
2049
+ NetworkId: __expectString,
2050
+ StateDB: __expectString,
2051
+ Status: __expectString,
2052
+ Tags: _json,
2053
+ });
2336
2054
  };
2337
2055
  const de_NodeSummary = (output, context) => {
2338
- return {
2339
- Arn: __expectString(output.Arn),
2340
- AvailabilityZone: __expectString(output.AvailabilityZone),
2341
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2342
- Id: __expectString(output.Id),
2343
- InstanceType: __expectString(output.InstanceType),
2344
- Status: __expectString(output.Status),
2345
- };
2056
+ return take(output, {
2057
+ Arn: __expectString,
2058
+ AvailabilityZone: __expectString,
2059
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2060
+ Id: __expectString,
2061
+ InstanceType: __expectString,
2062
+ Status: __expectString,
2063
+ });
2346
2064
  };
2347
2065
  const de_NodeSummaryList = (output, context) => {
2348
2066
  const retVal = (output || [])
2349
2067
  .filter((e) => e != null)
2350
2068
  .map((entry) => {
2351
- if (entry === null) {
2352
- return null;
2353
- }
2354
2069
  return de_NodeSummary(entry, context);
2355
2070
  });
2356
2071
  return retVal;
2357
2072
  };
2358
- const de_OutputTagMap = (output, context) => {
2359
- return Object.entries(output).reduce((acc, [key, value]) => {
2360
- if (value === null) {
2361
- return acc;
2362
- }
2363
- acc[key] = __expectString(value);
2364
- return acc;
2365
- }, {});
2366
- };
2367
2073
  const de_Proposal = (output, context) => {
2368
- return {
2369
- Actions: output.Actions != null ? de_ProposalActions(output.Actions, context) : undefined,
2370
- Arn: __expectString(output.Arn),
2371
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2372
- Description: __expectString(output.Description),
2373
- ExpirationDate: output.ExpirationDate != null
2374
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationDate))
2375
- : undefined,
2376
- NetworkId: __expectString(output.NetworkId),
2377
- NoVoteCount: __expectInt32(output.NoVoteCount),
2378
- OutstandingVoteCount: __expectInt32(output.OutstandingVoteCount),
2379
- ProposalId: __expectString(output.ProposalId),
2380
- ProposedByMemberId: __expectString(output.ProposedByMemberId),
2381
- ProposedByMemberName: __expectString(output.ProposedByMemberName),
2382
- Status: __expectString(output.Status),
2383
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2384
- YesVoteCount: __expectInt32(output.YesVoteCount),
2385
- };
2386
- };
2387
- const de_ProposalActions = (output, context) => {
2388
- return {
2389
- Invitations: output.Invitations != null ? de_InviteActionList(output.Invitations, context) : undefined,
2390
- Removals: output.Removals != null ? de_RemoveActionList(output.Removals, context) : undefined,
2391
- };
2074
+ return take(output, {
2075
+ Actions: _json,
2076
+ Arn: __expectString,
2077
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2078
+ Description: __expectString,
2079
+ ExpirationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2080
+ NetworkId: __expectString,
2081
+ NoVoteCount: __expectInt32,
2082
+ OutstandingVoteCount: __expectInt32,
2083
+ ProposalId: __expectString,
2084
+ ProposedByMemberId: __expectString,
2085
+ ProposedByMemberName: __expectString,
2086
+ Status: __expectString,
2087
+ Tags: _json,
2088
+ YesVoteCount: __expectInt32,
2089
+ });
2392
2090
  };
2393
2091
  const de_ProposalSummary = (output, context) => {
2394
- return {
2395
- Arn: __expectString(output.Arn),
2396
- CreationDate: output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined,
2397
- Description: __expectString(output.Description),
2398
- ExpirationDate: output.ExpirationDate != null
2399
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationDate))
2400
- : undefined,
2401
- ProposalId: __expectString(output.ProposalId),
2402
- ProposedByMemberId: __expectString(output.ProposedByMemberId),
2403
- ProposedByMemberName: __expectString(output.ProposedByMemberName),
2404
- Status: __expectString(output.Status),
2405
- };
2092
+ return take(output, {
2093
+ Arn: __expectString,
2094
+ CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2095
+ Description: __expectString,
2096
+ ExpirationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2097
+ ProposalId: __expectString,
2098
+ ProposedByMemberId: __expectString,
2099
+ ProposedByMemberName: __expectString,
2100
+ Status: __expectString,
2101
+ });
2406
2102
  };
2407
2103
  const de_ProposalSummaryList = (output, context) => {
2408
2104
  const retVal = (output || [])
2409
2105
  .filter((e) => e != null)
2410
2106
  .map((entry) => {
2411
- if (entry === null) {
2412
- return null;
2413
- }
2414
2107
  return de_ProposalSummary(entry, context);
2415
2108
  });
2416
2109
  return retVal;
2417
2110
  };
2418
- const de_ProposalVoteList = (output, context) => {
2419
- const retVal = (output || [])
2420
- .filter((e) => e != null)
2421
- .map((entry) => {
2422
- if (entry === null) {
2423
- return null;
2424
- }
2425
- return de_VoteSummary(entry, context);
2426
- });
2427
- return retVal;
2428
- };
2429
- const de_RemoveAction = (output, context) => {
2430
- return {
2431
- MemberId: __expectString(output.MemberId),
2432
- };
2433
- };
2434
- const de_RemoveActionList = (output, context) => {
2435
- const retVal = (output || [])
2436
- .filter((e) => e != null)
2437
- .map((entry) => {
2438
- if (entry === null) {
2439
- return null;
2440
- }
2441
- return de_RemoveAction(entry, context);
2442
- });
2443
- return retVal;
2444
- };
2445
- const de_VoteSummary = (output, context) => {
2446
- return {
2447
- MemberId: __expectString(output.MemberId),
2448
- MemberName: __expectString(output.MemberName),
2449
- Vote: __expectString(output.Vote),
2450
- };
2451
- };
2452
- const de_VotingPolicy = (output, context) => {
2453
- return {
2454
- ApprovalThresholdPolicy: output.ApprovalThresholdPolicy != null
2455
- ? de_ApprovalThresholdPolicy(output.ApprovalThresholdPolicy, context)
2456
- : undefined,
2457
- };
2458
- };
2459
2111
  const deserializeMetadata = (output) => ({
2460
2112
  httpStatusCode: output.statusCode,
2461
2113
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],