@aws-sdk/client-managedblockchain 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,11 +14,11 @@ const se_CreateAccessorCommand = async (input, context) => {
14
14
  };
15
15
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors";
16
16
  let body;
17
- body = JSON.stringify({
18
- ...(input.AccessorType != null && { AccessorType: input.AccessorType }),
19
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
20
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
21
- });
17
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
18
+ AccessorType: [],
19
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
20
+ Tags: (_) => (0, smithy_client_1._json)(_),
21
+ }));
22
22
  return new protocol_http_1.HttpRequest({
23
23
  protocol,
24
24
  hostname,
@@ -38,13 +38,11 @@ const se_CreateMemberCommand = async (input, context) => {
38
38
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
39
39
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
40
40
  let body;
41
- body = JSON.stringify({
42
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
43
- ...(input.InvitationId != null && { InvitationId: input.InvitationId }),
44
- ...(input.MemberConfiguration != null && {
45
- MemberConfiguration: se_MemberConfiguration(input.MemberConfiguration, context),
46
- }),
47
- });
41
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
42
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
43
+ InvitationId: [],
44
+ MemberConfiguration: (_) => (0, smithy_client_1._json)(_),
45
+ }));
48
46
  return new protocol_http_1.HttpRequest({
49
47
  protocol,
50
48
  hostname,
@@ -63,21 +61,17 @@ const se_CreateNetworkCommand = async (input, context) => {
63
61
  };
64
62
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
65
63
  let body;
66
- body = JSON.stringify({
67
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
68
- ...(input.Description != null && { Description: input.Description }),
69
- ...(input.Framework != null && { Framework: input.Framework }),
70
- ...(input.FrameworkConfiguration != null && {
71
- FrameworkConfiguration: se_NetworkFrameworkConfiguration(input.FrameworkConfiguration, context),
72
- }),
73
- ...(input.FrameworkVersion != null && { FrameworkVersion: input.FrameworkVersion }),
74
- ...(input.MemberConfiguration != null && {
75
- MemberConfiguration: se_MemberConfiguration(input.MemberConfiguration, context),
76
- }),
77
- ...(input.Name != null && { Name: input.Name }),
78
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
79
- ...(input.VotingPolicy != null && { VotingPolicy: se_VotingPolicy(input.VotingPolicy, context) }),
80
- });
64
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
65
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
66
+ Description: [],
67
+ Framework: [],
68
+ FrameworkConfiguration: (_) => (0, smithy_client_1._json)(_),
69
+ FrameworkVersion: [],
70
+ MemberConfiguration: (_) => (0, smithy_client_1._json)(_),
71
+ Name: [],
72
+ Tags: (_) => (0, smithy_client_1._json)(_),
73
+ VotingPolicy: (_) => (0, smithy_client_1._json)(_),
74
+ }));
81
75
  return new protocol_http_1.HttpRequest({
82
76
  protocol,
83
77
  hostname,
@@ -97,14 +91,12 @@ const se_CreateNodeCommand = async (input, context) => {
97
91
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
98
92
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
99
93
  let body;
100
- body = JSON.stringify({
101
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
102
- ...(input.MemberId != null && { MemberId: input.MemberId }),
103
- ...(input.NodeConfiguration != null && {
104
- NodeConfiguration: se_NodeConfiguration(input.NodeConfiguration, context),
105
- }),
106
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
107
- });
94
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
95
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
96
+ MemberId: [],
97
+ NodeConfiguration: (_) => (0, smithy_client_1._json)(_),
98
+ Tags: (_) => (0, smithy_client_1._json)(_),
99
+ }));
108
100
  return new protocol_http_1.HttpRequest({
109
101
  protocol,
110
102
  hostname,
@@ -124,13 +116,13 @@ const se_CreateProposalCommand = async (input, context) => {
124
116
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
125
117
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
126
118
  let body;
127
- body = JSON.stringify({
128
- ...(input.Actions != null && { Actions: se_ProposalActions(input.Actions, context) }),
129
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
130
- ...(input.Description != null && { Description: input.Description }),
131
- ...(input.MemberId != null && { MemberId: input.MemberId }),
132
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
133
- });
119
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
120
+ Actions: (_) => (0, smithy_client_1._json)(_),
121
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
122
+ Description: [],
123
+ MemberId: [],
124
+ Tags: (_) => (0, smithy_client_1._json)(_),
125
+ }));
134
126
  return new protocol_http_1.HttpRequest({
135
127
  protocol,
136
128
  hostname,
@@ -183,7 +175,7 @@ const se_DeleteNodeCommand = async (input, context) => {
183
175
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
184
176
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
185
177
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
186
- const query = map({
178
+ const query = (0, smithy_client_1.map)({
187
179
  memberId: [, input.MemberId],
188
180
  });
189
181
  let body;
@@ -257,7 +249,7 @@ const se_GetNodeCommand = async (input, context) => {
257
249
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
258
250
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
259
251
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
260
- const query = map({
252
+ const query = (0, smithy_client_1.map)({
261
253
  memberId: [, input.MemberId],
262
254
  });
263
255
  let body;
@@ -296,7 +288,7 @@ const se_ListAccessorsCommand = async (input, context) => {
296
288
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
297
289
  const headers = {};
298
290
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors";
299
- const query = map({
291
+ const query = (0, smithy_client_1.map)({
300
292
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
301
293
  nextToken: [, input.NextToken],
302
294
  });
@@ -317,7 +309,7 @@ const se_ListInvitationsCommand = async (input, context) => {
317
309
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
318
310
  const headers = {};
319
311
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations";
320
- const query = map({
312
+ const query = (0, smithy_client_1.map)({
321
313
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
322
314
  nextToken: [, input.NextToken],
323
315
  });
@@ -339,7 +331,7 @@ const se_ListMembersCommand = async (input, context) => {
339
331
  const headers = {};
340
332
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
341
333
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
342
- const query = map({
334
+ const query = (0, smithy_client_1.map)({
343
335
  name: [, input.Name],
344
336
  status: [, input.Status],
345
337
  isOwned: [() => input.IsOwned !== void 0, () => input.IsOwned.toString()],
@@ -363,7 +355,7 @@ const se_ListNetworksCommand = async (input, context) => {
363
355
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
364
356
  const headers = {};
365
357
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
366
- const query = map({
358
+ const query = (0, smithy_client_1.map)({
367
359
  name: [, input.Name],
368
360
  framework: [, input.Framework],
369
361
  status: [, input.Status],
@@ -388,7 +380,7 @@ const se_ListNodesCommand = async (input, context) => {
388
380
  const headers = {};
389
381
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
390
382
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
391
- const query = map({
383
+ const query = (0, smithy_client_1.map)({
392
384
  memberId: [, input.MemberId],
393
385
  status: [, input.Status],
394
386
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -412,7 +404,7 @@ const se_ListProposalsCommand = async (input, context) => {
412
404
  const headers = {};
413
405
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
414
406
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
415
- const query = map({
407
+ const query = (0, smithy_client_1.map)({
416
408
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
417
409
  nextToken: [, input.NextToken],
418
410
  });
@@ -436,7 +428,7 @@ const se_ListProposalVotesCommand = async (input, context) => {
436
428
  "/networks/{NetworkId}/proposals/{ProposalId}/votes";
437
429
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
438
430
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
439
- const query = map({
431
+ const query = (0, smithy_client_1.map)({
440
432
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
441
433
  nextToken: [, input.NextToken],
442
434
  });
@@ -495,9 +487,9 @@ const se_TagResourceCommand = async (input, context) => {
495
487
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
496
488
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
497
489
  let body;
498
- body = JSON.stringify({
499
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
500
- });
490
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
491
+ Tags: (_) => (0, smithy_client_1._json)(_),
492
+ }));
501
493
  return new protocol_http_1.HttpRequest({
502
494
  protocol,
503
495
  hostname,
@@ -514,7 +506,7 @@ const se_UntagResourceCommand = async (input, context) => {
514
506
  const headers = {};
515
507
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
516
508
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
517
- const query = map({
509
+ const query = (0, smithy_client_1.map)({
518
510
  tagKeys: [
519
511
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
520
512
  () => (input.TagKeys || []).map((_entry) => _entry),
@@ -542,11 +534,9 @@ const se_UpdateMemberCommand = async (input, context) => {
542
534
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
543
535
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
544
536
  let body;
545
- body = JSON.stringify({
546
- ...(input.LogPublishingConfiguration != null && {
547
- LogPublishingConfiguration: se_MemberLogPublishingConfiguration(input.LogPublishingConfiguration, context),
548
- }),
549
- });
537
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
538
+ LogPublishingConfiguration: (_) => (0, smithy_client_1._json)(_),
539
+ }));
550
540
  return new protocol_http_1.HttpRequest({
551
541
  protocol,
552
542
  hostname,
@@ -567,12 +557,10 @@ const se_UpdateNodeCommand = async (input, context) => {
567
557
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
568
558
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
569
559
  let body;
570
- body = JSON.stringify({
571
- ...(input.LogPublishingConfiguration != null && {
572
- LogPublishingConfiguration: se_NodeLogPublishingConfiguration(input.LogPublishingConfiguration, context),
573
- }),
574
- ...(input.MemberId != null && { MemberId: input.MemberId }),
575
- });
560
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
561
+ LogPublishingConfiguration: (_) => (0, smithy_client_1._json)(_),
562
+ MemberId: [],
563
+ }));
576
564
  return new protocol_http_1.HttpRequest({
577
565
  protocol,
578
566
  hostname,
@@ -594,10 +582,10 @@ const se_VoteOnProposalCommand = async (input, context) => {
594
582
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
595
583
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
596
584
  let body;
597
- body = JSON.stringify({
598
- ...(input.Vote != null && { Vote: input.Vote }),
599
- ...(input.VoterMemberId != null && { VoterMemberId: input.VoterMemberId }),
600
- });
585
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
586
+ Vote: [],
587
+ VoterMemberId: [],
588
+ }));
601
589
  return new protocol_http_1.HttpRequest({
602
590
  protocol,
603
591
  hostname,
@@ -613,16 +601,15 @@ const de_CreateAccessorCommand = async (output, context) => {
613
601
  if (output.statusCode !== 200 && output.statusCode >= 300) {
614
602
  return de_CreateAccessorCommandError(output, context);
615
603
  }
616
- const contents = map({
604
+ const contents = (0, smithy_client_1.map)({
617
605
  $metadata: deserializeMetadata(output),
618
606
  });
619
607
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
620
- if (data.AccessorId != null) {
621
- contents.AccessorId = (0, smithy_client_1.expectString)(data.AccessorId);
622
- }
623
- if (data.BillingToken != null) {
624
- contents.BillingToken = (0, smithy_client_1.expectString)(data.BillingToken);
625
- }
608
+ const doc = (0, smithy_client_1.take)(data, {
609
+ AccessorId: smithy_client_1.expectString,
610
+ BillingToken: smithy_client_1.expectString,
611
+ });
612
+ Object.assign(contents, doc);
626
613
  return contents;
627
614
  };
628
615
  exports.de_CreateAccessorCommand = de_CreateAccessorCommand;
@@ -656,10 +643,9 @@ const de_CreateAccessorCommandError = async (output, context) => {
656
643
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
657
644
  default:
658
645
  const parsedBody = parsedOutput.body;
659
- (0, smithy_client_1.throwDefaultError)({
646
+ return throwDefaultError({
660
647
  output,
661
648
  parsedBody,
662
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
663
649
  errorCode,
664
650
  });
665
651
  }
@@ -668,13 +654,14 @@ const de_CreateMemberCommand = async (output, context) => {
668
654
  if (output.statusCode !== 200 && output.statusCode >= 300) {
669
655
  return de_CreateMemberCommandError(output, context);
670
656
  }
671
- const contents = map({
657
+ const contents = (0, smithy_client_1.map)({
672
658
  $metadata: deserializeMetadata(output),
673
659
  });
674
660
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
675
- if (data.MemberId != null) {
676
- contents.MemberId = (0, smithy_client_1.expectString)(data.MemberId);
677
- }
661
+ const doc = (0, smithy_client_1.take)(data, {
662
+ MemberId: smithy_client_1.expectString,
663
+ });
664
+ Object.assign(contents, doc);
678
665
  return contents;
679
666
  };
680
667
  exports.de_CreateMemberCommand = de_CreateMemberCommand;
@@ -714,10 +701,9 @@ const de_CreateMemberCommandError = async (output, context) => {
714
701
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
715
702
  default:
716
703
  const parsedBody = parsedOutput.body;
717
- (0, smithy_client_1.throwDefaultError)({
704
+ return throwDefaultError({
718
705
  output,
719
706
  parsedBody,
720
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
721
707
  errorCode,
722
708
  });
723
709
  }
@@ -726,16 +712,15 @@ const de_CreateNetworkCommand = async (output, context) => {
726
712
  if (output.statusCode !== 200 && output.statusCode >= 300) {
727
713
  return de_CreateNetworkCommandError(output, context);
728
714
  }
729
- const contents = map({
715
+ const contents = (0, smithy_client_1.map)({
730
716
  $metadata: deserializeMetadata(output),
731
717
  });
732
718
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
733
- if (data.MemberId != null) {
734
- contents.MemberId = (0, smithy_client_1.expectString)(data.MemberId);
735
- }
736
- if (data.NetworkId != null) {
737
- contents.NetworkId = (0, smithy_client_1.expectString)(data.NetworkId);
738
- }
719
+ const doc = (0, smithy_client_1.take)(data, {
720
+ MemberId: smithy_client_1.expectString,
721
+ NetworkId: smithy_client_1.expectString,
722
+ });
723
+ Object.assign(contents, doc);
739
724
  return contents;
740
725
  };
741
726
  exports.de_CreateNetworkCommand = de_CreateNetworkCommand;
@@ -769,10 +754,9 @@ const de_CreateNetworkCommandError = async (output, context) => {
769
754
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
770
755
  default:
771
756
  const parsedBody = parsedOutput.body;
772
- (0, smithy_client_1.throwDefaultError)({
757
+ return throwDefaultError({
773
758
  output,
774
759
  parsedBody,
775
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
776
760
  errorCode,
777
761
  });
778
762
  }
@@ -781,13 +765,14 @@ const de_CreateNodeCommand = async (output, context) => {
781
765
  if (output.statusCode !== 200 && output.statusCode >= 300) {
782
766
  return de_CreateNodeCommandError(output, context);
783
767
  }
784
- const contents = map({
768
+ const contents = (0, smithy_client_1.map)({
785
769
  $metadata: deserializeMetadata(output),
786
770
  });
787
771
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
788
- if (data.NodeId != null) {
789
- contents.NodeId = (0, smithy_client_1.expectString)(data.NodeId);
790
- }
772
+ const doc = (0, smithy_client_1.take)(data, {
773
+ NodeId: smithy_client_1.expectString,
774
+ });
775
+ Object.assign(contents, doc);
791
776
  return contents;
792
777
  };
793
778
  exports.de_CreateNodeCommand = de_CreateNodeCommand;
@@ -827,10 +812,9 @@ const de_CreateNodeCommandError = async (output, context) => {
827
812
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
828
813
  default:
829
814
  const parsedBody = parsedOutput.body;
830
- (0, smithy_client_1.throwDefaultError)({
815
+ return throwDefaultError({
831
816
  output,
832
817
  parsedBody,
833
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
834
818
  errorCode,
835
819
  });
836
820
  }
@@ -839,13 +823,14 @@ const de_CreateProposalCommand = async (output, context) => {
839
823
  if (output.statusCode !== 200 && output.statusCode >= 300) {
840
824
  return de_CreateProposalCommandError(output, context);
841
825
  }
842
- const contents = map({
826
+ const contents = (0, smithy_client_1.map)({
843
827
  $metadata: deserializeMetadata(output),
844
828
  });
845
829
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
846
- if (data.ProposalId != null) {
847
- contents.ProposalId = (0, smithy_client_1.expectString)(data.ProposalId);
848
- }
830
+ const doc = (0, smithy_client_1.take)(data, {
831
+ ProposalId: smithy_client_1.expectString,
832
+ });
833
+ Object.assign(contents, doc);
849
834
  return contents;
850
835
  };
851
836
  exports.de_CreateProposalCommand = de_CreateProposalCommand;
@@ -879,10 +864,9 @@ const de_CreateProposalCommandError = async (output, context) => {
879
864
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
880
865
  default:
881
866
  const parsedBody = parsedOutput.body;
882
- (0, smithy_client_1.throwDefaultError)({
867
+ return throwDefaultError({
883
868
  output,
884
869
  parsedBody,
885
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
886
870
  errorCode,
887
871
  });
888
872
  }
@@ -891,7 +875,7 @@ const de_DeleteAccessorCommand = async (output, context) => {
891
875
  if (output.statusCode !== 200 && output.statusCode >= 300) {
892
876
  return de_DeleteAccessorCommandError(output, context);
893
877
  }
894
- const contents = map({
878
+ const contents = (0, smithy_client_1.map)({
895
879
  $metadata: deserializeMetadata(output),
896
880
  });
897
881
  await collectBody(output.body, context);
@@ -922,10 +906,9 @@ const de_DeleteAccessorCommandError = async (output, context) => {
922
906
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
923
907
  default:
924
908
  const parsedBody = parsedOutput.body;
925
- (0, smithy_client_1.throwDefaultError)({
909
+ return throwDefaultError({
926
910
  output,
927
911
  parsedBody,
928
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
929
912
  errorCode,
930
913
  });
931
914
  }
@@ -934,7 +917,7 @@ const de_DeleteMemberCommand = async (output, context) => {
934
917
  if (output.statusCode !== 200 && output.statusCode >= 300) {
935
918
  return de_DeleteMemberCommandError(output, context);
936
919
  }
937
- const contents = map({
920
+ const contents = (0, smithy_client_1.map)({
938
921
  $metadata: deserializeMetadata(output),
939
922
  });
940
923
  await collectBody(output.body, context);
@@ -968,10 +951,9 @@ const de_DeleteMemberCommandError = async (output, context) => {
968
951
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
969
952
  default:
970
953
  const parsedBody = parsedOutput.body;
971
- (0, smithy_client_1.throwDefaultError)({
954
+ return throwDefaultError({
972
955
  output,
973
956
  parsedBody,
974
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
975
957
  errorCode,
976
958
  });
977
959
  }
@@ -980,7 +962,7 @@ const de_DeleteNodeCommand = async (output, context) => {
980
962
  if (output.statusCode !== 200 && output.statusCode >= 300) {
981
963
  return de_DeleteNodeCommandError(output, context);
982
964
  }
983
- const contents = map({
965
+ const contents = (0, smithy_client_1.map)({
984
966
  $metadata: deserializeMetadata(output),
985
967
  });
986
968
  await collectBody(output.body, context);
@@ -1014,10 +996,9 @@ const de_DeleteNodeCommandError = async (output, context) => {
1014
996
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1015
997
  default:
1016
998
  const parsedBody = parsedOutput.body;
1017
- (0, smithy_client_1.throwDefaultError)({
999
+ return throwDefaultError({
1018
1000
  output,
1019
1001
  parsedBody,
1020
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1021
1002
  errorCode,
1022
1003
  });
1023
1004
  }
@@ -1026,13 +1007,14 @@ const de_GetAccessorCommand = async (output, context) => {
1026
1007
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1027
1008
  return de_GetAccessorCommandError(output, context);
1028
1009
  }
1029
- const contents = map({
1010
+ const contents = (0, smithy_client_1.map)({
1030
1011
  $metadata: deserializeMetadata(output),
1031
1012
  });
1032
1013
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1033
- if (data.Accessor != null) {
1034
- contents.Accessor = de_Accessor(data.Accessor, context);
1035
- }
1014
+ const doc = (0, smithy_client_1.take)(data, {
1015
+ Accessor: (_) => de_Accessor(_, context),
1016
+ });
1017
+ Object.assign(contents, doc);
1036
1018
  return contents;
1037
1019
  };
1038
1020
  exports.de_GetAccessorCommand = de_GetAccessorCommand;
@@ -1060,10 +1042,9 @@ const de_GetAccessorCommandError = async (output, context) => {
1060
1042
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1061
1043
  default:
1062
1044
  const parsedBody = parsedOutput.body;
1063
- (0, smithy_client_1.throwDefaultError)({
1045
+ return throwDefaultError({
1064
1046
  output,
1065
1047
  parsedBody,
1066
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1067
1048
  errorCode,
1068
1049
  });
1069
1050
  }
@@ -1072,13 +1053,14 @@ const de_GetMemberCommand = async (output, context) => {
1072
1053
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1073
1054
  return de_GetMemberCommandError(output, context);
1074
1055
  }
1075
- const contents = map({
1056
+ const contents = (0, smithy_client_1.map)({
1076
1057
  $metadata: deserializeMetadata(output),
1077
1058
  });
1078
1059
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1079
- if (data.Member != null) {
1080
- contents.Member = de_Member(data.Member, context);
1081
- }
1060
+ const doc = (0, smithy_client_1.take)(data, {
1061
+ Member: (_) => de_Member(_, context),
1062
+ });
1063
+ Object.assign(contents, doc);
1082
1064
  return contents;
1083
1065
  };
1084
1066
  exports.de_GetMemberCommand = de_GetMemberCommand;
@@ -1106,10 +1088,9 @@ const de_GetMemberCommandError = async (output, context) => {
1106
1088
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1107
1089
  default:
1108
1090
  const parsedBody = parsedOutput.body;
1109
- (0, smithy_client_1.throwDefaultError)({
1091
+ return throwDefaultError({
1110
1092
  output,
1111
1093
  parsedBody,
1112
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1113
1094
  errorCode,
1114
1095
  });
1115
1096
  }
@@ -1118,13 +1099,14 @@ const de_GetNetworkCommand = async (output, context) => {
1118
1099
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1119
1100
  return de_GetNetworkCommandError(output, context);
1120
1101
  }
1121
- const contents = map({
1102
+ const contents = (0, smithy_client_1.map)({
1122
1103
  $metadata: deserializeMetadata(output),
1123
1104
  });
1124
1105
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1125
- if (data.Network != null) {
1126
- contents.Network = de_Network(data.Network, context);
1127
- }
1106
+ const doc = (0, smithy_client_1.take)(data, {
1107
+ Network: (_) => de_Network(_, context),
1108
+ });
1109
+ Object.assign(contents, doc);
1128
1110
  return contents;
1129
1111
  };
1130
1112
  exports.de_GetNetworkCommand = de_GetNetworkCommand;
@@ -1152,10 +1134,9 @@ const de_GetNetworkCommandError = async (output, context) => {
1152
1134
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1153
1135
  default:
1154
1136
  const parsedBody = parsedOutput.body;
1155
- (0, smithy_client_1.throwDefaultError)({
1137
+ return throwDefaultError({
1156
1138
  output,
1157
1139
  parsedBody,
1158
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1159
1140
  errorCode,
1160
1141
  });
1161
1142
  }
@@ -1164,13 +1145,14 @@ const de_GetNodeCommand = async (output, context) => {
1164
1145
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1165
1146
  return de_GetNodeCommandError(output, context);
1166
1147
  }
1167
- const contents = map({
1148
+ const contents = (0, smithy_client_1.map)({
1168
1149
  $metadata: deserializeMetadata(output),
1169
1150
  });
1170
1151
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1171
- if (data.Node != null) {
1172
- contents.Node = de_Node(data.Node, context);
1173
- }
1152
+ const doc = (0, smithy_client_1.take)(data, {
1153
+ Node: (_) => de_Node(_, context),
1154
+ });
1155
+ Object.assign(contents, doc);
1174
1156
  return contents;
1175
1157
  };
1176
1158
  exports.de_GetNodeCommand = de_GetNodeCommand;
@@ -1198,10 +1180,9 @@ const de_GetNodeCommandError = async (output, context) => {
1198
1180
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1199
1181
  default:
1200
1182
  const parsedBody = parsedOutput.body;
1201
- (0, smithy_client_1.throwDefaultError)({
1183
+ return throwDefaultError({
1202
1184
  output,
1203
1185
  parsedBody,
1204
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1205
1186
  errorCode,
1206
1187
  });
1207
1188
  }
@@ -1210,13 +1191,14 @@ const de_GetProposalCommand = async (output, context) => {
1210
1191
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1211
1192
  return de_GetProposalCommandError(output, context);
1212
1193
  }
1213
- const contents = map({
1194
+ const contents = (0, smithy_client_1.map)({
1214
1195
  $metadata: deserializeMetadata(output),
1215
1196
  });
1216
1197
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1217
- if (data.Proposal != null) {
1218
- contents.Proposal = de_Proposal(data.Proposal, context);
1219
- }
1198
+ const doc = (0, smithy_client_1.take)(data, {
1199
+ Proposal: (_) => de_Proposal(_, context),
1200
+ });
1201
+ Object.assign(contents, doc);
1220
1202
  return contents;
1221
1203
  };
1222
1204
  exports.de_GetProposalCommand = de_GetProposalCommand;
@@ -1244,10 +1226,9 @@ const de_GetProposalCommandError = async (output, context) => {
1244
1226
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1245
1227
  default:
1246
1228
  const parsedBody = parsedOutput.body;
1247
- (0, smithy_client_1.throwDefaultError)({
1229
+ return throwDefaultError({
1248
1230
  output,
1249
1231
  parsedBody,
1250
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1251
1232
  errorCode,
1252
1233
  });
1253
1234
  }
@@ -1256,16 +1237,15 @@ const de_ListAccessorsCommand = async (output, context) => {
1256
1237
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1257
1238
  return de_ListAccessorsCommandError(output, context);
1258
1239
  }
1259
- const contents = map({
1240
+ const contents = (0, smithy_client_1.map)({
1260
1241
  $metadata: deserializeMetadata(output),
1261
1242
  });
1262
1243
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1263
- if (data.Accessors != null) {
1264
- contents.Accessors = de_AccessorSummaryList(data.Accessors, context);
1265
- }
1266
- if (data.NextToken != null) {
1267
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1268
- }
1244
+ const doc = (0, smithy_client_1.take)(data, {
1245
+ Accessors: (_) => de_AccessorSummaryList(_, context),
1246
+ NextToken: smithy_client_1.expectString,
1247
+ });
1248
+ Object.assign(contents, doc);
1269
1249
  return contents;
1270
1250
  };
1271
1251
  exports.de_ListAccessorsCommand = de_ListAccessorsCommand;
@@ -1290,10 +1270,9 @@ const de_ListAccessorsCommandError = async (output, context) => {
1290
1270
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1291
1271
  default:
1292
1272
  const parsedBody = parsedOutput.body;
1293
- (0, smithy_client_1.throwDefaultError)({
1273
+ return throwDefaultError({
1294
1274
  output,
1295
1275
  parsedBody,
1296
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1297
1276
  errorCode,
1298
1277
  });
1299
1278
  }
@@ -1302,16 +1281,15 @@ const de_ListInvitationsCommand = async (output, context) => {
1302
1281
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1303
1282
  return de_ListInvitationsCommandError(output, context);
1304
1283
  }
1305
- const contents = map({
1284
+ const contents = (0, smithy_client_1.map)({
1306
1285
  $metadata: deserializeMetadata(output),
1307
1286
  });
1308
1287
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1309
- if (data.Invitations != null) {
1310
- contents.Invitations = de_InvitationList(data.Invitations, context);
1311
- }
1312
- if (data.NextToken != null) {
1313
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1314
- }
1288
+ const doc = (0, smithy_client_1.take)(data, {
1289
+ Invitations: (_) => de_InvitationList(_, context),
1290
+ NextToken: smithy_client_1.expectString,
1291
+ });
1292
+ Object.assign(contents, doc);
1315
1293
  return contents;
1316
1294
  };
1317
1295
  exports.de_ListInvitationsCommand = de_ListInvitationsCommand;
@@ -1342,10 +1320,9 @@ const de_ListInvitationsCommandError = async (output, context) => {
1342
1320
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1343
1321
  default:
1344
1322
  const parsedBody = parsedOutput.body;
1345
- (0, smithy_client_1.throwDefaultError)({
1323
+ return throwDefaultError({
1346
1324
  output,
1347
1325
  parsedBody,
1348
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1349
1326
  errorCode,
1350
1327
  });
1351
1328
  }
@@ -1354,16 +1331,15 @@ const de_ListMembersCommand = async (output, context) => {
1354
1331
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1355
1332
  return de_ListMembersCommandError(output, context);
1356
1333
  }
1357
- const contents = map({
1334
+ const contents = (0, smithy_client_1.map)({
1358
1335
  $metadata: deserializeMetadata(output),
1359
1336
  });
1360
1337
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1361
- if (data.Members != null) {
1362
- contents.Members = de_MemberSummaryList(data.Members, context);
1363
- }
1364
- if (data.NextToken != null) {
1365
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1366
- }
1338
+ const doc = (0, smithy_client_1.take)(data, {
1339
+ Members: (_) => de_MemberSummaryList(_, context),
1340
+ NextToken: smithy_client_1.expectString,
1341
+ });
1342
+ Object.assign(contents, doc);
1367
1343
  return contents;
1368
1344
  };
1369
1345
  exports.de_ListMembersCommand = de_ListMembersCommand;
@@ -1388,10 +1364,9 @@ const de_ListMembersCommandError = async (output, context) => {
1388
1364
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1389
1365
  default:
1390
1366
  const parsedBody = parsedOutput.body;
1391
- (0, smithy_client_1.throwDefaultError)({
1367
+ return throwDefaultError({
1392
1368
  output,
1393
1369
  parsedBody,
1394
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1395
1370
  errorCode,
1396
1371
  });
1397
1372
  }
@@ -1400,16 +1375,15 @@ const de_ListNetworksCommand = async (output, context) => {
1400
1375
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1401
1376
  return de_ListNetworksCommandError(output, context);
1402
1377
  }
1403
- const contents = map({
1378
+ const contents = (0, smithy_client_1.map)({
1404
1379
  $metadata: deserializeMetadata(output),
1405
1380
  });
1406
1381
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1407
- if (data.Networks != null) {
1408
- contents.Networks = de_NetworkSummaryList(data.Networks, context);
1409
- }
1410
- if (data.NextToken != null) {
1411
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1412
- }
1382
+ const doc = (0, smithy_client_1.take)(data, {
1383
+ Networks: (_) => de_NetworkSummaryList(_, context),
1384
+ NextToken: smithy_client_1.expectString,
1385
+ });
1386
+ Object.assign(contents, doc);
1413
1387
  return contents;
1414
1388
  };
1415
1389
  exports.de_ListNetworksCommand = de_ListNetworksCommand;
@@ -1434,10 +1408,9 @@ const de_ListNetworksCommandError = async (output, context) => {
1434
1408
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1435
1409
  default:
1436
1410
  const parsedBody = parsedOutput.body;
1437
- (0, smithy_client_1.throwDefaultError)({
1411
+ return throwDefaultError({
1438
1412
  output,
1439
1413
  parsedBody,
1440
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1441
1414
  errorCode,
1442
1415
  });
1443
1416
  }
@@ -1446,16 +1419,15 @@ const de_ListNodesCommand = async (output, context) => {
1446
1419
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1447
1420
  return de_ListNodesCommandError(output, context);
1448
1421
  }
1449
- const contents = map({
1422
+ const contents = (0, smithy_client_1.map)({
1450
1423
  $metadata: deserializeMetadata(output),
1451
1424
  });
1452
1425
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1453
- if (data.NextToken != null) {
1454
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1455
- }
1456
- if (data.Nodes != null) {
1457
- contents.Nodes = de_NodeSummaryList(data.Nodes, context);
1458
- }
1426
+ const doc = (0, smithy_client_1.take)(data, {
1427
+ NextToken: smithy_client_1.expectString,
1428
+ Nodes: (_) => de_NodeSummaryList(_, context),
1429
+ });
1430
+ Object.assign(contents, doc);
1459
1431
  return contents;
1460
1432
  };
1461
1433
  exports.de_ListNodesCommand = de_ListNodesCommand;
@@ -1480,10 +1452,9 @@ const de_ListNodesCommandError = async (output, context) => {
1480
1452
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1481
1453
  default:
1482
1454
  const parsedBody = parsedOutput.body;
1483
- (0, smithy_client_1.throwDefaultError)({
1455
+ return throwDefaultError({
1484
1456
  output,
1485
1457
  parsedBody,
1486
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1487
1458
  errorCode,
1488
1459
  });
1489
1460
  }
@@ -1492,16 +1463,15 @@ const de_ListProposalsCommand = async (output, context) => {
1492
1463
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1493
1464
  return de_ListProposalsCommandError(output, context);
1494
1465
  }
1495
- const contents = map({
1466
+ const contents = (0, smithy_client_1.map)({
1496
1467
  $metadata: deserializeMetadata(output),
1497
1468
  });
1498
1469
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1499
- if (data.NextToken != null) {
1500
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1501
- }
1502
- if (data.Proposals != null) {
1503
- contents.Proposals = de_ProposalSummaryList(data.Proposals, context);
1504
- }
1470
+ const doc = (0, smithy_client_1.take)(data, {
1471
+ NextToken: smithy_client_1.expectString,
1472
+ Proposals: (_) => de_ProposalSummaryList(_, context),
1473
+ });
1474
+ Object.assign(contents, doc);
1505
1475
  return contents;
1506
1476
  };
1507
1477
  exports.de_ListProposalsCommand = de_ListProposalsCommand;
@@ -1529,10 +1499,9 @@ const de_ListProposalsCommandError = async (output, context) => {
1529
1499
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1530
1500
  default:
1531
1501
  const parsedBody = parsedOutput.body;
1532
- (0, smithy_client_1.throwDefaultError)({
1502
+ return throwDefaultError({
1533
1503
  output,
1534
1504
  parsedBody,
1535
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1536
1505
  errorCode,
1537
1506
  });
1538
1507
  }
@@ -1541,16 +1510,15 @@ const de_ListProposalVotesCommand = async (output, context) => {
1541
1510
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1542
1511
  return de_ListProposalVotesCommandError(output, context);
1543
1512
  }
1544
- const contents = map({
1513
+ const contents = (0, smithy_client_1.map)({
1545
1514
  $metadata: deserializeMetadata(output),
1546
1515
  });
1547
1516
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1548
- if (data.NextToken != null) {
1549
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1550
- }
1551
- if (data.ProposalVotes != null) {
1552
- contents.ProposalVotes = de_ProposalVoteList(data.ProposalVotes, context);
1553
- }
1517
+ const doc = (0, smithy_client_1.take)(data, {
1518
+ NextToken: smithy_client_1.expectString,
1519
+ ProposalVotes: smithy_client_1._json,
1520
+ });
1521
+ Object.assign(contents, doc);
1554
1522
  return contents;
1555
1523
  };
1556
1524
  exports.de_ListProposalVotesCommand = de_ListProposalVotesCommand;
@@ -1575,10 +1543,9 @@ const de_ListProposalVotesCommandError = async (output, context) => {
1575
1543
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1576
1544
  default:
1577
1545
  const parsedBody = parsedOutput.body;
1578
- (0, smithy_client_1.throwDefaultError)({
1546
+ return throwDefaultError({
1579
1547
  output,
1580
1548
  parsedBody,
1581
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1582
1549
  errorCode,
1583
1550
  });
1584
1551
  }
@@ -1587,13 +1554,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1587
1554
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1588
1555
  return de_ListTagsForResourceCommandError(output, context);
1589
1556
  }
1590
- const contents = map({
1557
+ const contents = (0, smithy_client_1.map)({
1591
1558
  $metadata: deserializeMetadata(output),
1592
1559
  });
1593
1560
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1594
- if (data.Tags != null) {
1595
- contents.Tags = de_OutputTagMap(data.Tags, context);
1596
- }
1561
+ const doc = (0, smithy_client_1.take)(data, {
1562
+ Tags: smithy_client_1._json,
1563
+ });
1564
+ Object.assign(contents, doc);
1597
1565
  return contents;
1598
1566
  };
1599
1567
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1618,10 +1586,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1618
1586
  throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
1619
1587
  default:
1620
1588
  const parsedBody = parsedOutput.body;
1621
- (0, smithy_client_1.throwDefaultError)({
1589
+ return throwDefaultError({
1622
1590
  output,
1623
1591
  parsedBody,
1624
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1625
1592
  errorCode,
1626
1593
  });
1627
1594
  }
@@ -1630,7 +1597,7 @@ const de_RejectInvitationCommand = async (output, context) => {
1630
1597
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1631
1598
  return de_RejectInvitationCommandError(output, context);
1632
1599
  }
1633
- const contents = map({
1600
+ const contents = (0, smithy_client_1.map)({
1634
1601
  $metadata: deserializeMetadata(output),
1635
1602
  });
1636
1603
  await collectBody(output.body, context);
@@ -1664,10 +1631,9 @@ const de_RejectInvitationCommandError = async (output, context) => {
1664
1631
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1665
1632
  default:
1666
1633
  const parsedBody = parsedOutput.body;
1667
- (0, smithy_client_1.throwDefaultError)({
1634
+ return throwDefaultError({
1668
1635
  output,
1669
1636
  parsedBody,
1670
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1671
1637
  errorCode,
1672
1638
  });
1673
1639
  }
@@ -1676,7 +1642,7 @@ const de_TagResourceCommand = async (output, context) => {
1676
1642
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1677
1643
  return de_TagResourceCommandError(output, context);
1678
1644
  }
1679
- const contents = map({
1645
+ const contents = (0, smithy_client_1.map)({
1680
1646
  $metadata: deserializeMetadata(output),
1681
1647
  });
1682
1648
  await collectBody(output.body, context);
@@ -1707,10 +1673,9 @@ const de_TagResourceCommandError = async (output, context) => {
1707
1673
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1708
1674
  default:
1709
1675
  const parsedBody = parsedOutput.body;
1710
- (0, smithy_client_1.throwDefaultError)({
1676
+ return throwDefaultError({
1711
1677
  output,
1712
1678
  parsedBody,
1713
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1714
1679
  errorCode,
1715
1680
  });
1716
1681
  }
@@ -1719,7 +1684,7 @@ const de_UntagResourceCommand = async (output, context) => {
1719
1684
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1720
1685
  return de_UntagResourceCommandError(output, context);
1721
1686
  }
1722
- const contents = map({
1687
+ const contents = (0, smithy_client_1.map)({
1723
1688
  $metadata: deserializeMetadata(output),
1724
1689
  });
1725
1690
  await collectBody(output.body, context);
@@ -1747,10 +1712,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1747
1712
  throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
1748
1713
  default:
1749
1714
  const parsedBody = parsedOutput.body;
1750
- (0, smithy_client_1.throwDefaultError)({
1715
+ return throwDefaultError({
1751
1716
  output,
1752
1717
  parsedBody,
1753
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1754
1718
  errorCode,
1755
1719
  });
1756
1720
  }
@@ -1759,7 +1723,7 @@ const de_UpdateMemberCommand = async (output, context) => {
1759
1723
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1760
1724
  return de_UpdateMemberCommandError(output, context);
1761
1725
  }
1762
- const contents = map({
1726
+ const contents = (0, smithy_client_1.map)({
1763
1727
  $metadata: deserializeMetadata(output),
1764
1728
  });
1765
1729
  await collectBody(output.body, context);
@@ -1790,10 +1754,9 @@ const de_UpdateMemberCommandError = async (output, context) => {
1790
1754
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1791
1755
  default:
1792
1756
  const parsedBody = parsedOutput.body;
1793
- (0, smithy_client_1.throwDefaultError)({
1757
+ return throwDefaultError({
1794
1758
  output,
1795
1759
  parsedBody,
1796
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1797
1760
  errorCode,
1798
1761
  });
1799
1762
  }
@@ -1802,7 +1765,7 @@ const de_UpdateNodeCommand = async (output, context) => {
1802
1765
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1803
1766
  return de_UpdateNodeCommandError(output, context);
1804
1767
  }
1805
- const contents = map({
1768
+ const contents = (0, smithy_client_1.map)({
1806
1769
  $metadata: deserializeMetadata(output),
1807
1770
  });
1808
1771
  await collectBody(output.body, context);
@@ -1833,10 +1796,9 @@ const de_UpdateNodeCommandError = async (output, context) => {
1833
1796
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1834
1797
  default:
1835
1798
  const parsedBody = parsedOutput.body;
1836
- (0, smithy_client_1.throwDefaultError)({
1799
+ return throwDefaultError({
1837
1800
  output,
1838
1801
  parsedBody,
1839
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1840
1802
  errorCode,
1841
1803
  });
1842
1804
  }
@@ -1845,7 +1807,7 @@ const de_VoteOnProposalCommand = async (output, context) => {
1845
1807
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1846
1808
  return de_VoteOnProposalCommandError(output, context);
1847
1809
  }
1848
- const contents = map({
1810
+ const contents = (0, smithy_client_1.map)({
1849
1811
  $metadata: deserializeMetadata(output),
1850
1812
  });
1851
1813
  await collectBody(output.body, context);
@@ -1879,21 +1841,21 @@ const de_VoteOnProposalCommandError = async (output, context) => {
1879
1841
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1880
1842
  default:
1881
1843
  const parsedBody = parsedOutput.body;
1882
- (0, smithy_client_1.throwDefaultError)({
1844
+ return throwDefaultError({
1883
1845
  output,
1884
1846
  parsedBody,
1885
- exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
1886
1847
  errorCode,
1887
1848
  });
1888
1849
  }
1889
1850
  };
1890
- const map = smithy_client_1.map;
1851
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ManagedBlockchainServiceException_1.ManagedBlockchainServiceException);
1891
1852
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1892
- const contents = map({});
1853
+ const contents = (0, smithy_client_1.map)({});
1893
1854
  const data = parsedOutput.body;
1894
- if (data.Message != null) {
1895
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1896
- }
1855
+ const doc = (0, smithy_client_1.take)(data, {
1856
+ Message: smithy_client_1.expectString,
1857
+ });
1858
+ Object.assign(contents, doc);
1897
1859
  const exception = new models_0_1.AccessDeniedException({
1898
1860
  $metadata: deserializeMetadata(parsedOutput),
1899
1861
  ...contents,
@@ -1901,11 +1863,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1901
1863
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1902
1864
  };
1903
1865
  const de_IllegalActionExceptionRes = async (parsedOutput, context) => {
1904
- const contents = map({});
1866
+ const contents = (0, smithy_client_1.map)({});
1905
1867
  const data = parsedOutput.body;
1906
- if (data.Message != null) {
1907
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1908
- }
1868
+ const doc = (0, smithy_client_1.take)(data, {
1869
+ Message: smithy_client_1.expectString,
1870
+ });
1871
+ Object.assign(contents, doc);
1909
1872
  const exception = new models_0_1.IllegalActionException({
1910
1873
  $metadata: deserializeMetadata(parsedOutput),
1911
1874
  ...contents,
@@ -1913,8 +1876,10 @@ const de_IllegalActionExceptionRes = async (parsedOutput, context) => {
1913
1876
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1914
1877
  };
1915
1878
  const de_InternalServiceErrorExceptionRes = async (parsedOutput, context) => {
1916
- const contents = map({});
1879
+ const contents = (0, smithy_client_1.map)({});
1917
1880
  const data = parsedOutput.body;
1881
+ const doc = (0, smithy_client_1.take)(data, {});
1882
+ Object.assign(contents, doc);
1918
1883
  const exception = new models_0_1.InternalServiceErrorException({
1919
1884
  $metadata: deserializeMetadata(parsedOutput),
1920
1885
  ...contents,
@@ -1922,11 +1887,12 @@ const de_InternalServiceErrorExceptionRes = async (parsedOutput, context) => {
1922
1887
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1923
1888
  };
1924
1889
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1925
- const contents = map({});
1890
+ const contents = (0, smithy_client_1.map)({});
1926
1891
  const data = parsedOutput.body;
1927
- if (data.Message != null) {
1928
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1929
- }
1892
+ const doc = (0, smithy_client_1.take)(data, {
1893
+ Message: smithy_client_1.expectString,
1894
+ });
1895
+ Object.assign(contents, doc);
1930
1896
  const exception = new models_0_1.InvalidRequestException({
1931
1897
  $metadata: deserializeMetadata(parsedOutput),
1932
1898
  ...contents,
@@ -1934,11 +1900,12 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1934
1900
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1935
1901
  };
1936
1902
  const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1937
- const contents = map({});
1903
+ const contents = (0, smithy_client_1.map)({});
1938
1904
  const data = parsedOutput.body;
1939
- if (data.Message != null) {
1940
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1941
- }
1905
+ const doc = (0, smithy_client_1.take)(data, {
1906
+ Message: smithy_client_1.expectString,
1907
+ });
1908
+ Object.assign(contents, doc);
1942
1909
  const exception = new models_0_1.ResourceAlreadyExistsException({
1943
1910
  $metadata: deserializeMetadata(parsedOutput),
1944
1911
  ...contents,
@@ -1946,11 +1913,12 @@ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1946
1913
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1947
1914
  };
1948
1915
  const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
1949
- const contents = map({});
1916
+ const contents = (0, smithy_client_1.map)({});
1950
1917
  const data = parsedOutput.body;
1951
- if (data.Message != null) {
1952
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1953
- }
1918
+ const doc = (0, smithy_client_1.take)(data, {
1919
+ Message: smithy_client_1.expectString,
1920
+ });
1921
+ Object.assign(contents, doc);
1954
1922
  const exception = new models_0_1.ResourceLimitExceededException({
1955
1923
  $metadata: deserializeMetadata(parsedOutput),
1956
1924
  ...contents,
@@ -1958,14 +1926,13 @@ const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
1958
1926
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1959
1927
  };
1960
1928
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1961
- const contents = map({});
1929
+ const contents = (0, smithy_client_1.map)({});
1962
1930
  const data = parsedOutput.body;
1963
- if (data.Message != null) {
1964
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1965
- }
1966
- if (data.ResourceName != null) {
1967
- contents.ResourceName = (0, smithy_client_1.expectString)(data.ResourceName);
1968
- }
1931
+ const doc = (0, smithy_client_1.take)(data, {
1932
+ Message: smithy_client_1.expectString,
1933
+ ResourceName: smithy_client_1.expectString,
1934
+ });
1935
+ Object.assign(contents, doc);
1969
1936
  const exception = new models_0_1.ResourceNotFoundException({
1970
1937
  $metadata: deserializeMetadata(parsedOutput),
1971
1938
  ...contents,
@@ -1973,11 +1940,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1973
1940
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1974
1941
  };
1975
1942
  const de_ResourceNotReadyExceptionRes = async (parsedOutput, context) => {
1976
- const contents = map({});
1943
+ const contents = (0, smithy_client_1.map)({});
1977
1944
  const data = parsedOutput.body;
1978
- if (data.Message != null) {
1979
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1980
- }
1945
+ const doc = (0, smithy_client_1.take)(data, {
1946
+ Message: smithy_client_1.expectString,
1947
+ });
1948
+ Object.assign(contents, doc);
1981
1949
  const exception = new models_0_1.ResourceNotReadyException({
1982
1950
  $metadata: deserializeMetadata(parsedOutput),
1983
1951
  ...contents,
@@ -1985,8 +1953,10 @@ const de_ResourceNotReadyExceptionRes = async (parsedOutput, context) => {
1985
1953
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1986
1954
  };
1987
1955
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1988
- const contents = map({});
1956
+ const contents = (0, smithy_client_1.map)({});
1989
1957
  const data = parsedOutput.body;
1958
+ const doc = (0, smithy_client_1.take)(data, {});
1959
+ Object.assign(contents, doc);
1990
1960
  const exception = new models_0_1.ThrottlingException({
1991
1961
  $metadata: deserializeMetadata(parsedOutput),
1992
1962
  ...contents,
@@ -1994,526 +1964,208 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1994
1964
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1995
1965
  };
1996
1966
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1997
- const contents = map({});
1967
+ const contents = (0, smithy_client_1.map)({});
1998
1968
  const data = parsedOutput.body;
1999
- if (data.Message != null) {
2000
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2001
- }
2002
- if (data.ResourceName != null) {
2003
- contents.ResourceName = (0, smithy_client_1.expectString)(data.ResourceName);
2004
- }
1969
+ const doc = (0, smithy_client_1.take)(data, {
1970
+ Message: smithy_client_1.expectString,
1971
+ ResourceName: smithy_client_1.expectString,
1972
+ });
1973
+ Object.assign(contents, doc);
2005
1974
  const exception = new models_0_1.TooManyTagsException({
2006
1975
  $metadata: deserializeMetadata(parsedOutput),
2007
1976
  ...contents,
2008
1977
  });
2009
1978
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2010
1979
  };
2011
- const se_ApprovalThresholdPolicy = (input, context) => {
2012
- return {
2013
- ...(input.ProposalDurationInHours != null && { ProposalDurationInHours: input.ProposalDurationInHours }),
2014
- ...(input.ThresholdComparator != null && { ThresholdComparator: input.ThresholdComparator }),
2015
- ...(input.ThresholdPercentage != null && { ThresholdPercentage: input.ThresholdPercentage }),
2016
- };
2017
- };
2018
- const se_InputTagMap = (input, context) => {
2019
- return Object.entries(input).reduce((acc, [key, value]) => {
2020
- if (value === null) {
2021
- return acc;
2022
- }
2023
- acc[key] = value;
2024
- return acc;
2025
- }, {});
2026
- };
2027
- const se_InviteAction = (input, context) => {
2028
- return {
2029
- ...(input.Principal != null && { Principal: input.Principal }),
2030
- };
2031
- };
2032
- const se_InviteActionList = (input, context) => {
2033
- return input
2034
- .filter((e) => e != null)
2035
- .map((entry) => {
2036
- return se_InviteAction(entry, context);
2037
- });
2038
- };
2039
- const se_LogConfiguration = (input, context) => {
2040
- return {
2041
- ...(input.Enabled != null && { Enabled: input.Enabled }),
2042
- };
2043
- };
2044
- const se_LogConfigurations = (input, context) => {
2045
- return {
2046
- ...(input.Cloudwatch != null && { Cloudwatch: se_LogConfiguration(input.Cloudwatch, context) }),
2047
- };
2048
- };
2049
- const se_MemberConfiguration = (input, context) => {
2050
- return {
2051
- ...(input.Description != null && { Description: input.Description }),
2052
- ...(input.FrameworkConfiguration != null && {
2053
- FrameworkConfiguration: se_MemberFrameworkConfiguration(input.FrameworkConfiguration, context),
2054
- }),
2055
- ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
2056
- ...(input.LogPublishingConfiguration != null && {
2057
- LogPublishingConfiguration: se_MemberLogPublishingConfiguration(input.LogPublishingConfiguration, context),
2058
- }),
2059
- ...(input.Name != null && { Name: input.Name }),
2060
- ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }),
2061
- };
2062
- };
2063
- const se_MemberFabricConfiguration = (input, context) => {
2064
- return {
2065
- ...(input.AdminPassword != null && { AdminPassword: input.AdminPassword }),
2066
- ...(input.AdminUsername != null && { AdminUsername: input.AdminUsername }),
2067
- };
2068
- };
2069
- const se_MemberFabricLogPublishingConfiguration = (input, context) => {
2070
- return {
2071
- ...(input.CaLogs != null && { CaLogs: se_LogConfigurations(input.CaLogs, context) }),
2072
- };
2073
- };
2074
- const se_MemberFrameworkConfiguration = (input, context) => {
2075
- return {
2076
- ...(input.Fabric != null && { Fabric: se_MemberFabricConfiguration(input.Fabric, context) }),
2077
- };
2078
- };
2079
- const se_MemberLogPublishingConfiguration = (input, context) => {
2080
- return {
2081
- ...(input.Fabric != null && { Fabric: se_MemberFabricLogPublishingConfiguration(input.Fabric, context) }),
2082
- };
2083
- };
2084
- const se_NetworkFabricConfiguration = (input, context) => {
2085
- return {
2086
- ...(input.Edition != null && { Edition: input.Edition }),
2087
- };
2088
- };
2089
- const se_NetworkFrameworkConfiguration = (input, context) => {
2090
- return {
2091
- ...(input.Fabric != null && { Fabric: se_NetworkFabricConfiguration(input.Fabric, context) }),
2092
- };
2093
- };
2094
- const se_NodeConfiguration = (input, context) => {
2095
- return {
2096
- ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }),
2097
- ...(input.InstanceType != null && { InstanceType: input.InstanceType }),
2098
- ...(input.LogPublishingConfiguration != null && {
2099
- LogPublishingConfiguration: se_NodeLogPublishingConfiguration(input.LogPublishingConfiguration, context),
2100
- }),
2101
- ...(input.StateDB != null && { StateDB: input.StateDB }),
2102
- };
2103
- };
2104
- const se_NodeFabricLogPublishingConfiguration = (input, context) => {
2105
- return {
2106
- ...(input.ChaincodeLogs != null && { ChaincodeLogs: se_LogConfigurations(input.ChaincodeLogs, context) }),
2107
- ...(input.PeerLogs != null && { PeerLogs: se_LogConfigurations(input.PeerLogs, context) }),
2108
- };
2109
- };
2110
- const se_NodeLogPublishingConfiguration = (input, context) => {
2111
- return {
2112
- ...(input.Fabric != null && { Fabric: se_NodeFabricLogPublishingConfiguration(input.Fabric, context) }),
2113
- };
2114
- };
2115
- const se_ProposalActions = (input, context) => {
2116
- return {
2117
- ...(input.Invitations != null && { Invitations: se_InviteActionList(input.Invitations, context) }),
2118
- ...(input.Removals != null && { Removals: se_RemoveActionList(input.Removals, context) }),
2119
- };
2120
- };
2121
- const se_RemoveAction = (input, context) => {
2122
- return {
2123
- ...(input.MemberId != null && { MemberId: input.MemberId }),
2124
- };
2125
- };
2126
- const se_RemoveActionList = (input, context) => {
2127
- return input
2128
- .filter((e) => e != null)
2129
- .map((entry) => {
2130
- return se_RemoveAction(entry, context);
2131
- });
2132
- };
2133
- const se_VotingPolicy = (input, context) => {
2134
- return {
2135
- ...(input.ApprovalThresholdPolicy != null && {
2136
- ApprovalThresholdPolicy: se_ApprovalThresholdPolicy(input.ApprovalThresholdPolicy, context),
2137
- }),
2138
- };
2139
- };
2140
1980
  const de_Accessor = (output, context) => {
2141
- return {
2142
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2143
- BillingToken: (0, smithy_client_1.expectString)(output.BillingToken),
2144
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2145
- Id: (0, smithy_client_1.expectString)(output.Id),
2146
- Status: (0, smithy_client_1.expectString)(output.Status),
2147
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2148
- Type: (0, smithy_client_1.expectString)(output.Type),
2149
- };
1981
+ return (0, smithy_client_1.take)(output, {
1982
+ Arn: smithy_client_1.expectString,
1983
+ BillingToken: smithy_client_1.expectString,
1984
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1985
+ Id: smithy_client_1.expectString,
1986
+ Status: smithy_client_1.expectString,
1987
+ Tags: smithy_client_1._json,
1988
+ Type: smithy_client_1.expectString,
1989
+ });
2150
1990
  };
2151
1991
  const de_AccessorSummary = (output, context) => {
2152
- return {
2153
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2154
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2155
- Id: (0, smithy_client_1.expectString)(output.Id),
2156
- Status: (0, smithy_client_1.expectString)(output.Status),
2157
- Type: (0, smithy_client_1.expectString)(output.Type),
2158
- };
1992
+ return (0, smithy_client_1.take)(output, {
1993
+ Arn: smithy_client_1.expectString,
1994
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1995
+ Id: smithy_client_1.expectString,
1996
+ Status: smithy_client_1.expectString,
1997
+ Type: smithy_client_1.expectString,
1998
+ });
2159
1999
  };
2160
2000
  const de_AccessorSummaryList = (output, context) => {
2161
2001
  const retVal = (output || [])
2162
2002
  .filter((e) => e != null)
2163
2003
  .map((entry) => {
2164
- if (entry === null) {
2165
- return null;
2166
- }
2167
2004
  return de_AccessorSummary(entry, context);
2168
2005
  });
2169
2006
  return retVal;
2170
2007
  };
2171
- const de_ApprovalThresholdPolicy = (output, context) => {
2172
- return {
2173
- ProposalDurationInHours: (0, smithy_client_1.expectInt32)(output.ProposalDurationInHours),
2174
- ThresholdComparator: (0, smithy_client_1.expectString)(output.ThresholdComparator),
2175
- ThresholdPercentage: (0, smithy_client_1.expectInt32)(output.ThresholdPercentage),
2176
- };
2177
- };
2178
2008
  const de_Invitation = (output, context) => {
2179
- return {
2180
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2181
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2182
- ExpirationDate: output.ExpirationDate != null
2183
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.ExpirationDate))
2184
- : undefined,
2185
- InvitationId: (0, smithy_client_1.expectString)(output.InvitationId),
2186
- NetworkSummary: output.NetworkSummary != null ? de_NetworkSummary(output.NetworkSummary, context) : undefined,
2187
- Status: (0, smithy_client_1.expectString)(output.Status),
2188
- };
2009
+ return (0, smithy_client_1.take)(output, {
2010
+ Arn: smithy_client_1.expectString,
2011
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2012
+ ExpirationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2013
+ InvitationId: smithy_client_1.expectString,
2014
+ NetworkSummary: (_) => de_NetworkSummary(_, context),
2015
+ Status: smithy_client_1.expectString,
2016
+ });
2189
2017
  };
2190
2018
  const de_InvitationList = (output, context) => {
2191
2019
  const retVal = (output || [])
2192
2020
  .filter((e) => e != null)
2193
2021
  .map((entry) => {
2194
- if (entry === null) {
2195
- return null;
2196
- }
2197
2022
  return de_Invitation(entry, context);
2198
2023
  });
2199
2024
  return retVal;
2200
2025
  };
2201
- const de_InviteAction = (output, context) => {
2202
- return {
2203
- Principal: (0, smithy_client_1.expectString)(output.Principal),
2204
- };
2205
- };
2206
- const de_InviteActionList = (output, context) => {
2207
- const retVal = (output || [])
2208
- .filter((e) => e != null)
2209
- .map((entry) => {
2210
- if (entry === null) {
2211
- return null;
2212
- }
2213
- return de_InviteAction(entry, context);
2214
- });
2215
- return retVal;
2216
- };
2217
- const de_LogConfiguration = (output, context) => {
2218
- return {
2219
- Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
2220
- };
2221
- };
2222
- const de_LogConfigurations = (output, context) => {
2223
- return {
2224
- Cloudwatch: output.Cloudwatch != null ? de_LogConfiguration(output.Cloudwatch, context) : undefined,
2225
- };
2226
- };
2227
2026
  const de_Member = (output, context) => {
2228
- return {
2229
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2230
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2231
- Description: (0, smithy_client_1.expectString)(output.Description),
2232
- FrameworkAttributes: output.FrameworkAttributes != null
2233
- ? de_MemberFrameworkAttributes(output.FrameworkAttributes, context)
2234
- : undefined,
2235
- Id: (0, smithy_client_1.expectString)(output.Id),
2236
- KmsKeyArn: (0, smithy_client_1.expectString)(output.KmsKeyArn),
2237
- LogPublishingConfiguration: output.LogPublishingConfiguration != null
2238
- ? de_MemberLogPublishingConfiguration(output.LogPublishingConfiguration, context)
2239
- : undefined,
2240
- Name: (0, smithy_client_1.expectString)(output.Name),
2241
- NetworkId: (0, smithy_client_1.expectString)(output.NetworkId),
2242
- Status: (0, smithy_client_1.expectString)(output.Status),
2243
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2244
- };
2245
- };
2246
- const de_MemberFabricAttributes = (output, context) => {
2247
- return {
2248
- AdminUsername: (0, smithy_client_1.expectString)(output.AdminUsername),
2249
- CaEndpoint: (0, smithy_client_1.expectString)(output.CaEndpoint),
2250
- };
2251
- };
2252
- const de_MemberFabricLogPublishingConfiguration = (output, context) => {
2253
- return {
2254
- CaLogs: output.CaLogs != null ? de_LogConfigurations(output.CaLogs, context) : undefined,
2255
- };
2256
- };
2257
- const de_MemberFrameworkAttributes = (output, context) => {
2258
- return {
2259
- Fabric: output.Fabric != null ? de_MemberFabricAttributes(output.Fabric, context) : undefined,
2260
- };
2261
- };
2262
- const de_MemberLogPublishingConfiguration = (output, context) => {
2263
- return {
2264
- Fabric: output.Fabric != null ? de_MemberFabricLogPublishingConfiguration(output.Fabric, context) : undefined,
2265
- };
2027
+ return (0, smithy_client_1.take)(output, {
2028
+ Arn: smithy_client_1.expectString,
2029
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2030
+ Description: smithy_client_1.expectString,
2031
+ FrameworkAttributes: smithy_client_1._json,
2032
+ Id: smithy_client_1.expectString,
2033
+ KmsKeyArn: smithy_client_1.expectString,
2034
+ LogPublishingConfiguration: smithy_client_1._json,
2035
+ Name: smithy_client_1.expectString,
2036
+ NetworkId: smithy_client_1.expectString,
2037
+ Status: smithy_client_1.expectString,
2038
+ Tags: smithy_client_1._json,
2039
+ });
2266
2040
  };
2267
2041
  const de_MemberSummary = (output, context) => {
2268
- return {
2269
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2270
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2271
- Description: (0, smithy_client_1.expectString)(output.Description),
2272
- Id: (0, smithy_client_1.expectString)(output.Id),
2273
- IsOwned: (0, smithy_client_1.expectBoolean)(output.IsOwned),
2274
- Name: (0, smithy_client_1.expectString)(output.Name),
2275
- Status: (0, smithy_client_1.expectString)(output.Status),
2276
- };
2042
+ return (0, smithy_client_1.take)(output, {
2043
+ Arn: smithy_client_1.expectString,
2044
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2045
+ Description: smithy_client_1.expectString,
2046
+ Id: smithy_client_1.expectString,
2047
+ IsOwned: smithy_client_1.expectBoolean,
2048
+ Name: smithy_client_1.expectString,
2049
+ Status: smithy_client_1.expectString,
2050
+ });
2277
2051
  };
2278
2052
  const de_MemberSummaryList = (output, context) => {
2279
2053
  const retVal = (output || [])
2280
2054
  .filter((e) => e != null)
2281
2055
  .map((entry) => {
2282
- if (entry === null) {
2283
- return null;
2284
- }
2285
2056
  return de_MemberSummary(entry, context);
2286
2057
  });
2287
2058
  return retVal;
2288
2059
  };
2289
2060
  const de_Network = (output, context) => {
2290
- return {
2291
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2292
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2293
- Description: (0, smithy_client_1.expectString)(output.Description),
2294
- Framework: (0, smithy_client_1.expectString)(output.Framework),
2295
- FrameworkAttributes: output.FrameworkAttributes != null
2296
- ? de_NetworkFrameworkAttributes(output.FrameworkAttributes, context)
2297
- : undefined,
2298
- FrameworkVersion: (0, smithy_client_1.expectString)(output.FrameworkVersion),
2299
- Id: (0, smithy_client_1.expectString)(output.Id),
2300
- Name: (0, smithy_client_1.expectString)(output.Name),
2301
- Status: (0, smithy_client_1.expectString)(output.Status),
2302
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2303
- VotingPolicy: output.VotingPolicy != null ? de_VotingPolicy(output.VotingPolicy, context) : undefined,
2304
- VpcEndpointServiceName: (0, smithy_client_1.expectString)(output.VpcEndpointServiceName),
2305
- };
2306
- };
2307
- const de_NetworkEthereumAttributes = (output, context) => {
2308
- return {
2309
- ChainId: (0, smithy_client_1.expectString)(output.ChainId),
2310
- };
2311
- };
2312
- const de_NetworkFabricAttributes = (output, context) => {
2313
- return {
2314
- Edition: (0, smithy_client_1.expectString)(output.Edition),
2315
- OrderingServiceEndpoint: (0, smithy_client_1.expectString)(output.OrderingServiceEndpoint),
2316
- };
2317
- };
2318
- const de_NetworkFrameworkAttributes = (output, context) => {
2319
- return {
2320
- Ethereum: output.Ethereum != null ? de_NetworkEthereumAttributes(output.Ethereum, context) : undefined,
2321
- Fabric: output.Fabric != null ? de_NetworkFabricAttributes(output.Fabric, context) : undefined,
2322
- };
2061
+ return (0, smithy_client_1.take)(output, {
2062
+ Arn: smithy_client_1.expectString,
2063
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2064
+ Description: smithy_client_1.expectString,
2065
+ Framework: smithy_client_1.expectString,
2066
+ FrameworkAttributes: smithy_client_1._json,
2067
+ FrameworkVersion: smithy_client_1.expectString,
2068
+ Id: smithy_client_1.expectString,
2069
+ Name: smithy_client_1.expectString,
2070
+ Status: smithy_client_1.expectString,
2071
+ Tags: smithy_client_1._json,
2072
+ VotingPolicy: smithy_client_1._json,
2073
+ VpcEndpointServiceName: smithy_client_1.expectString,
2074
+ });
2323
2075
  };
2324
2076
  const de_NetworkSummary = (output, context) => {
2325
- return {
2326
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2327
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2328
- Description: (0, smithy_client_1.expectString)(output.Description),
2329
- Framework: (0, smithy_client_1.expectString)(output.Framework),
2330
- FrameworkVersion: (0, smithy_client_1.expectString)(output.FrameworkVersion),
2331
- Id: (0, smithy_client_1.expectString)(output.Id),
2332
- Name: (0, smithy_client_1.expectString)(output.Name),
2333
- Status: (0, smithy_client_1.expectString)(output.Status),
2334
- };
2077
+ return (0, smithy_client_1.take)(output, {
2078
+ Arn: smithy_client_1.expectString,
2079
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2080
+ Description: smithy_client_1.expectString,
2081
+ Framework: smithy_client_1.expectString,
2082
+ FrameworkVersion: smithy_client_1.expectString,
2083
+ Id: smithy_client_1.expectString,
2084
+ Name: smithy_client_1.expectString,
2085
+ Status: smithy_client_1.expectString,
2086
+ });
2335
2087
  };
2336
2088
  const de_NetworkSummaryList = (output, context) => {
2337
2089
  const retVal = (output || [])
2338
2090
  .filter((e) => e != null)
2339
2091
  .map((entry) => {
2340
- if (entry === null) {
2341
- return null;
2342
- }
2343
2092
  return de_NetworkSummary(entry, context);
2344
2093
  });
2345
2094
  return retVal;
2346
2095
  };
2347
2096
  const de_Node = (output, context) => {
2348
- return {
2349
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2350
- AvailabilityZone: (0, smithy_client_1.expectString)(output.AvailabilityZone),
2351
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2352
- FrameworkAttributes: output.FrameworkAttributes != null ? de_NodeFrameworkAttributes(output.FrameworkAttributes, context) : undefined,
2353
- Id: (0, smithy_client_1.expectString)(output.Id),
2354
- InstanceType: (0, smithy_client_1.expectString)(output.InstanceType),
2355
- KmsKeyArn: (0, smithy_client_1.expectString)(output.KmsKeyArn),
2356
- LogPublishingConfiguration: output.LogPublishingConfiguration != null
2357
- ? de_NodeLogPublishingConfiguration(output.LogPublishingConfiguration, context)
2358
- : undefined,
2359
- MemberId: (0, smithy_client_1.expectString)(output.MemberId),
2360
- NetworkId: (0, smithy_client_1.expectString)(output.NetworkId),
2361
- StateDB: (0, smithy_client_1.expectString)(output.StateDB),
2362
- Status: (0, smithy_client_1.expectString)(output.Status),
2363
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2364
- };
2365
- };
2366
- const de_NodeEthereumAttributes = (output, context) => {
2367
- return {
2368
- HttpEndpoint: (0, smithy_client_1.expectString)(output.HttpEndpoint),
2369
- WebSocketEndpoint: (0, smithy_client_1.expectString)(output.WebSocketEndpoint),
2370
- };
2371
- };
2372
- const de_NodeFabricAttributes = (output, context) => {
2373
- return {
2374
- PeerEndpoint: (0, smithy_client_1.expectString)(output.PeerEndpoint),
2375
- PeerEventEndpoint: (0, smithy_client_1.expectString)(output.PeerEventEndpoint),
2376
- };
2377
- };
2378
- const de_NodeFabricLogPublishingConfiguration = (output, context) => {
2379
- return {
2380
- ChaincodeLogs: output.ChaincodeLogs != null ? de_LogConfigurations(output.ChaincodeLogs, context) : undefined,
2381
- PeerLogs: output.PeerLogs != null ? de_LogConfigurations(output.PeerLogs, context) : undefined,
2382
- };
2383
- };
2384
- const de_NodeFrameworkAttributes = (output, context) => {
2385
- return {
2386
- Ethereum: output.Ethereum != null ? de_NodeEthereumAttributes(output.Ethereum, context) : undefined,
2387
- Fabric: output.Fabric != null ? de_NodeFabricAttributes(output.Fabric, context) : undefined,
2388
- };
2389
- };
2390
- const de_NodeLogPublishingConfiguration = (output, context) => {
2391
- return {
2392
- Fabric: output.Fabric != null ? de_NodeFabricLogPublishingConfiguration(output.Fabric, context) : undefined,
2393
- };
2097
+ return (0, smithy_client_1.take)(output, {
2098
+ Arn: smithy_client_1.expectString,
2099
+ AvailabilityZone: smithy_client_1.expectString,
2100
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2101
+ FrameworkAttributes: smithy_client_1._json,
2102
+ Id: smithy_client_1.expectString,
2103
+ InstanceType: smithy_client_1.expectString,
2104
+ KmsKeyArn: smithy_client_1.expectString,
2105
+ LogPublishingConfiguration: smithy_client_1._json,
2106
+ MemberId: smithy_client_1.expectString,
2107
+ NetworkId: smithy_client_1.expectString,
2108
+ StateDB: smithy_client_1.expectString,
2109
+ Status: smithy_client_1.expectString,
2110
+ Tags: smithy_client_1._json,
2111
+ });
2394
2112
  };
2395
2113
  const de_NodeSummary = (output, context) => {
2396
- return {
2397
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2398
- AvailabilityZone: (0, smithy_client_1.expectString)(output.AvailabilityZone),
2399
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2400
- Id: (0, smithy_client_1.expectString)(output.Id),
2401
- InstanceType: (0, smithy_client_1.expectString)(output.InstanceType),
2402
- Status: (0, smithy_client_1.expectString)(output.Status),
2403
- };
2114
+ return (0, smithy_client_1.take)(output, {
2115
+ Arn: smithy_client_1.expectString,
2116
+ AvailabilityZone: smithy_client_1.expectString,
2117
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2118
+ Id: smithy_client_1.expectString,
2119
+ InstanceType: smithy_client_1.expectString,
2120
+ Status: smithy_client_1.expectString,
2121
+ });
2404
2122
  };
2405
2123
  const de_NodeSummaryList = (output, context) => {
2406
2124
  const retVal = (output || [])
2407
2125
  .filter((e) => e != null)
2408
2126
  .map((entry) => {
2409
- if (entry === null) {
2410
- return null;
2411
- }
2412
2127
  return de_NodeSummary(entry, context);
2413
2128
  });
2414
2129
  return retVal;
2415
2130
  };
2416
- const de_OutputTagMap = (output, context) => {
2417
- return Object.entries(output).reduce((acc, [key, value]) => {
2418
- if (value === null) {
2419
- return acc;
2420
- }
2421
- acc[key] = (0, smithy_client_1.expectString)(value);
2422
- return acc;
2423
- }, {});
2424
- };
2425
2131
  const de_Proposal = (output, context) => {
2426
- return {
2427
- Actions: output.Actions != null ? de_ProposalActions(output.Actions, context) : undefined,
2428
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2429
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2430
- Description: (0, smithy_client_1.expectString)(output.Description),
2431
- ExpirationDate: output.ExpirationDate != null
2432
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.ExpirationDate))
2433
- : undefined,
2434
- NetworkId: (0, smithy_client_1.expectString)(output.NetworkId),
2435
- NoVoteCount: (0, smithy_client_1.expectInt32)(output.NoVoteCount),
2436
- OutstandingVoteCount: (0, smithy_client_1.expectInt32)(output.OutstandingVoteCount),
2437
- ProposalId: (0, smithy_client_1.expectString)(output.ProposalId),
2438
- ProposedByMemberId: (0, smithy_client_1.expectString)(output.ProposedByMemberId),
2439
- ProposedByMemberName: (0, smithy_client_1.expectString)(output.ProposedByMemberName),
2440
- Status: (0, smithy_client_1.expectString)(output.Status),
2441
- Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined,
2442
- YesVoteCount: (0, smithy_client_1.expectInt32)(output.YesVoteCount),
2443
- };
2444
- };
2445
- const de_ProposalActions = (output, context) => {
2446
- return {
2447
- Invitations: output.Invitations != null ? de_InviteActionList(output.Invitations, context) : undefined,
2448
- Removals: output.Removals != null ? de_RemoveActionList(output.Removals, context) : undefined,
2449
- };
2132
+ return (0, smithy_client_1.take)(output, {
2133
+ Actions: smithy_client_1._json,
2134
+ Arn: smithy_client_1.expectString,
2135
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2136
+ Description: smithy_client_1.expectString,
2137
+ ExpirationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2138
+ NetworkId: smithy_client_1.expectString,
2139
+ NoVoteCount: smithy_client_1.expectInt32,
2140
+ OutstandingVoteCount: smithy_client_1.expectInt32,
2141
+ ProposalId: smithy_client_1.expectString,
2142
+ ProposedByMemberId: smithy_client_1.expectString,
2143
+ ProposedByMemberName: smithy_client_1.expectString,
2144
+ Status: smithy_client_1.expectString,
2145
+ Tags: smithy_client_1._json,
2146
+ YesVoteCount: smithy_client_1.expectInt32,
2147
+ });
2450
2148
  };
2451
2149
  const de_ProposalSummary = (output, context) => {
2452
- return {
2453
- Arn: (0, smithy_client_1.expectString)(output.Arn),
2454
- CreationDate: output.CreationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreationDate)) : undefined,
2455
- Description: (0, smithy_client_1.expectString)(output.Description),
2456
- ExpirationDate: output.ExpirationDate != null
2457
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.ExpirationDate))
2458
- : undefined,
2459
- ProposalId: (0, smithy_client_1.expectString)(output.ProposalId),
2460
- ProposedByMemberId: (0, smithy_client_1.expectString)(output.ProposedByMemberId),
2461
- ProposedByMemberName: (0, smithy_client_1.expectString)(output.ProposedByMemberName),
2462
- Status: (0, smithy_client_1.expectString)(output.Status),
2463
- };
2150
+ return (0, smithy_client_1.take)(output, {
2151
+ Arn: smithy_client_1.expectString,
2152
+ CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2153
+ Description: smithy_client_1.expectString,
2154
+ ExpirationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2155
+ ProposalId: smithy_client_1.expectString,
2156
+ ProposedByMemberId: smithy_client_1.expectString,
2157
+ ProposedByMemberName: smithy_client_1.expectString,
2158
+ Status: smithy_client_1.expectString,
2159
+ });
2464
2160
  };
2465
2161
  const de_ProposalSummaryList = (output, context) => {
2466
2162
  const retVal = (output || [])
2467
2163
  .filter((e) => e != null)
2468
2164
  .map((entry) => {
2469
- if (entry === null) {
2470
- return null;
2471
- }
2472
2165
  return de_ProposalSummary(entry, context);
2473
2166
  });
2474
2167
  return retVal;
2475
2168
  };
2476
- const de_ProposalVoteList = (output, context) => {
2477
- const retVal = (output || [])
2478
- .filter((e) => e != null)
2479
- .map((entry) => {
2480
- if (entry === null) {
2481
- return null;
2482
- }
2483
- return de_VoteSummary(entry, context);
2484
- });
2485
- return retVal;
2486
- };
2487
- const de_RemoveAction = (output, context) => {
2488
- return {
2489
- MemberId: (0, smithy_client_1.expectString)(output.MemberId),
2490
- };
2491
- };
2492
- const de_RemoveActionList = (output, context) => {
2493
- const retVal = (output || [])
2494
- .filter((e) => e != null)
2495
- .map((entry) => {
2496
- if (entry === null) {
2497
- return null;
2498
- }
2499
- return de_RemoveAction(entry, context);
2500
- });
2501
- return retVal;
2502
- };
2503
- const de_VoteSummary = (output, context) => {
2504
- return {
2505
- MemberId: (0, smithy_client_1.expectString)(output.MemberId),
2506
- MemberName: (0, smithy_client_1.expectString)(output.MemberName),
2507
- Vote: (0, smithy_client_1.expectString)(output.Vote),
2508
- };
2509
- };
2510
- const de_VotingPolicy = (output, context) => {
2511
- return {
2512
- ApprovalThresholdPolicy: output.ApprovalThresholdPolicy != null
2513
- ? de_ApprovalThresholdPolicy(output.ApprovalThresholdPolicy, context)
2514
- : undefined,
2515
- };
2516
- };
2517
2169
  const deserializeMetadata = (output) => ({
2518
2170
  httpStatusCode: output.statusCode,
2519
2171
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],