@aws-sdk/client-managedblockchain 3.928.0 → 3.930.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.
Files changed (51) hide show
  1. package/dist-cjs/index.js +1285 -1343
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/ManagedBlockchainClient.js +2 -0
  4. package/dist-es/commands/CreateAccessorCommand.js +3 -9
  5. package/dist-es/commands/CreateMemberCommand.js +3 -10
  6. package/dist-es/commands/CreateNetworkCommand.js +3 -10
  7. package/dist-es/commands/CreateNodeCommand.js +3 -9
  8. package/dist-es/commands/CreateProposalCommand.js +3 -9
  9. package/dist-es/commands/DeleteAccessorCommand.js +3 -9
  10. package/dist-es/commands/DeleteMemberCommand.js +3 -9
  11. package/dist-es/commands/DeleteNodeCommand.js +3 -9
  12. package/dist-es/commands/GetAccessorCommand.js +3 -9
  13. package/dist-es/commands/GetMemberCommand.js +3 -9
  14. package/dist-es/commands/GetNetworkCommand.js +3 -9
  15. package/dist-es/commands/GetNodeCommand.js +3 -9
  16. package/dist-es/commands/GetProposalCommand.js +3 -9
  17. package/dist-es/commands/ListAccessorsCommand.js +3 -9
  18. package/dist-es/commands/ListInvitationsCommand.js +3 -9
  19. package/dist-es/commands/ListMembersCommand.js +3 -9
  20. package/dist-es/commands/ListNetworksCommand.js +3 -9
  21. package/dist-es/commands/ListNodesCommand.js +3 -9
  22. package/dist-es/commands/ListProposalVotesCommand.js +3 -9
  23. package/dist-es/commands/ListProposalsCommand.js +3 -9
  24. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  25. package/dist-es/commands/RejectInvitationCommand.js +3 -9
  26. package/dist-es/commands/TagResourceCommand.js +3 -9
  27. package/dist-es/commands/UntagResourceCommand.js +3 -9
  28. package/dist-es/commands/UpdateMemberCommand.js +3 -9
  29. package/dist-es/commands/UpdateNodeCommand.js +3 -9
  30. package/dist-es/commands/VoteOnProposalCommand.js +3 -9
  31. package/dist-es/models/models_0.js +0 -27
  32. package/dist-es/runtimeConfig.shared.js +2 -0
  33. package/dist-es/schemas/schemas_0.js +1218 -0
  34. package/dist-types/ManagedBlockchainClient.d.ts +10 -1
  35. package/dist-types/models/models_0.d.ts +0 -20
  36. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  37. package/dist-types/runtimeConfig.d.ts +1 -0
  38. package/dist-types/runtimeConfig.native.d.ts +1 -0
  39. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  40. package/dist-types/schemas/schemas_0.d.ts +144 -0
  41. package/dist-types/ts3.4/ManagedBlockchainClient.d.ts +4 -0
  42. package/dist-types/ts3.4/models/models_0.d.ts +0 -15
  43. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  44. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  45. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  46. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  47. package/dist-types/ts3.4/schemas/schemas_0.d.ts +150 -0
  48. package/package.json +33 -34
  49. package/dist-es/protocols/Aws_restJson1.js +0 -1109
  50. package/dist-types/protocols/Aws_restJson1.d.ts +0 -245
  51. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -329
@@ -1,1109 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { ManagedBlockchainServiceException as __BaseException } from "../models/ManagedBlockchainServiceException";
6
- import { AccessDeniedException, IllegalActionException, InternalServiceErrorException, InvalidRequestException, ResourceAlreadyExistsException, ResourceLimitExceededException, ResourceNotFoundException, ResourceNotReadyException, ThrottlingException, TooManyTagsException, } from "../models/models_0";
7
- export const se_CreateAccessorCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/accessors");
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- AccessorType: [],
16
- ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
17
- NetworkType: [],
18
- Tags: (_) => _json(_),
19
- }));
20
- b.m("POST").h(headers).b(body);
21
- return b.build();
22
- };
23
- export const se_CreateMemberCommand = async (input, context) => {
24
- const b = rb(input, context);
25
- const headers = {
26
- "content-type": "application/json",
27
- };
28
- b.bp("/networks/{NetworkId}/members");
29
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
30
- let body;
31
- body = JSON.stringify(take(input, {
32
- ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
33
- InvitationId: [],
34
- MemberConfiguration: (_) => _json(_),
35
- }));
36
- b.m("POST").h(headers).b(body);
37
- return b.build();
38
- };
39
- export const se_CreateNetworkCommand = async (input, context) => {
40
- const b = rb(input, context);
41
- const headers = {
42
- "content-type": "application/json",
43
- };
44
- b.bp("/networks");
45
- let body;
46
- body = JSON.stringify(take(input, {
47
- ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
48
- Description: [],
49
- Framework: [],
50
- FrameworkConfiguration: (_) => _json(_),
51
- FrameworkVersion: [],
52
- MemberConfiguration: (_) => _json(_),
53
- Name: [],
54
- Tags: (_) => _json(_),
55
- VotingPolicy: (_) => _json(_),
56
- }));
57
- b.m("POST").h(headers).b(body);
58
- return b.build();
59
- };
60
- export const se_CreateNodeCommand = async (input, context) => {
61
- const b = rb(input, context);
62
- const headers = {
63
- "content-type": "application/json",
64
- };
65
- b.bp("/networks/{NetworkId}/nodes");
66
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
67
- let body;
68
- body = JSON.stringify(take(input, {
69
- ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
70
- MemberId: [],
71
- NodeConfiguration: (_) => _json(_),
72
- Tags: (_) => _json(_),
73
- }));
74
- b.m("POST").h(headers).b(body);
75
- return b.build();
76
- };
77
- export const se_CreateProposalCommand = async (input, context) => {
78
- const b = rb(input, context);
79
- const headers = {
80
- "content-type": "application/json",
81
- };
82
- b.bp("/networks/{NetworkId}/proposals");
83
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
84
- let body;
85
- body = JSON.stringify(take(input, {
86
- Actions: (_) => _json(_),
87
- ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
88
- Description: [],
89
- MemberId: [],
90
- Tags: (_) => _json(_),
91
- }));
92
- b.m("POST").h(headers).b(body);
93
- return b.build();
94
- };
95
- export const se_DeleteAccessorCommand = async (input, context) => {
96
- const b = rb(input, context);
97
- const headers = {};
98
- b.bp("/accessors/{AccessorId}");
99
- b.p("AccessorId", () => input.AccessorId, "{AccessorId}", false);
100
- let body;
101
- b.m("DELETE").h(headers).b(body);
102
- return b.build();
103
- };
104
- export const se_DeleteMemberCommand = async (input, context) => {
105
- const b = rb(input, context);
106
- const headers = {};
107
- b.bp("/networks/{NetworkId}/members/{MemberId}");
108
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
109
- b.p("MemberId", () => input.MemberId, "{MemberId}", false);
110
- let body;
111
- b.m("DELETE").h(headers).b(body);
112
- return b.build();
113
- };
114
- export const se_DeleteNodeCommand = async (input, context) => {
115
- const b = rb(input, context);
116
- const headers = {};
117
- b.bp("/networks/{NetworkId}/nodes/{NodeId}");
118
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
119
- b.p("NodeId", () => input.NodeId, "{NodeId}", false);
120
- const query = map({
121
- [_mI]: [, input[_MI]],
122
- });
123
- let body;
124
- b.m("DELETE").h(headers).q(query).b(body);
125
- return b.build();
126
- };
127
- export const se_GetAccessorCommand = async (input, context) => {
128
- const b = rb(input, context);
129
- const headers = {};
130
- b.bp("/accessors/{AccessorId}");
131
- b.p("AccessorId", () => input.AccessorId, "{AccessorId}", false);
132
- let body;
133
- b.m("GET").h(headers).b(body);
134
- return b.build();
135
- };
136
- export const se_GetMemberCommand = async (input, context) => {
137
- const b = rb(input, context);
138
- const headers = {};
139
- b.bp("/networks/{NetworkId}/members/{MemberId}");
140
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
141
- b.p("MemberId", () => input.MemberId, "{MemberId}", false);
142
- let body;
143
- b.m("GET").h(headers).b(body);
144
- return b.build();
145
- };
146
- export const se_GetNetworkCommand = async (input, context) => {
147
- const b = rb(input, context);
148
- const headers = {};
149
- b.bp("/networks/{NetworkId}");
150
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
151
- let body;
152
- b.m("GET").h(headers).b(body);
153
- return b.build();
154
- };
155
- export const se_GetNodeCommand = async (input, context) => {
156
- const b = rb(input, context);
157
- const headers = {};
158
- b.bp("/networks/{NetworkId}/nodes/{NodeId}");
159
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
160
- b.p("NodeId", () => input.NodeId, "{NodeId}", false);
161
- const query = map({
162
- [_mI]: [, input[_MI]],
163
- });
164
- let body;
165
- b.m("GET").h(headers).q(query).b(body);
166
- return b.build();
167
- };
168
- export const se_GetProposalCommand = async (input, context) => {
169
- const b = rb(input, context);
170
- const headers = {};
171
- b.bp("/networks/{NetworkId}/proposals/{ProposalId}");
172
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
173
- b.p("ProposalId", () => input.ProposalId, "{ProposalId}", false);
174
- let body;
175
- b.m("GET").h(headers).b(body);
176
- return b.build();
177
- };
178
- export const se_ListAccessorsCommand = async (input, context) => {
179
- const b = rb(input, context);
180
- const headers = {};
181
- b.bp("/accessors");
182
- const query = map({
183
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
184
- [_nT]: [, input[_NT]],
185
- [_nTe]: [, input[_NTe]],
186
- });
187
- let body;
188
- b.m("GET").h(headers).q(query).b(body);
189
- return b.build();
190
- };
191
- export const se_ListInvitationsCommand = async (input, context) => {
192
- const b = rb(input, context);
193
- const headers = {};
194
- b.bp("/invitations");
195
- const query = map({
196
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
197
- [_nT]: [, input[_NT]],
198
- });
199
- let body;
200
- b.m("GET").h(headers).q(query).b(body);
201
- return b.build();
202
- };
203
- export const se_ListMembersCommand = async (input, context) => {
204
- const b = rb(input, context);
205
- const headers = {};
206
- b.bp("/networks/{NetworkId}/members");
207
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
208
- const query = map({
209
- [_n]: [, input[_N]],
210
- [_s]: [, input[_S]],
211
- [_iO]: [() => input.IsOwned !== void 0, () => input[_IO].toString()],
212
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
213
- [_nT]: [, input[_NT]],
214
- });
215
- let body;
216
- b.m("GET").h(headers).q(query).b(body);
217
- return b.build();
218
- };
219
- export const se_ListNetworksCommand = async (input, context) => {
220
- const b = rb(input, context);
221
- const headers = {};
222
- b.bp("/networks");
223
- const query = map({
224
- [_n]: [, input[_N]],
225
- [_f]: [, input[_F]],
226
- [_s]: [, input[_S]],
227
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
228
- [_nT]: [, input[_NT]],
229
- });
230
- let body;
231
- b.m("GET").h(headers).q(query).b(body);
232
- return b.build();
233
- };
234
- export const se_ListNodesCommand = async (input, context) => {
235
- const b = rb(input, context);
236
- const headers = {};
237
- b.bp("/networks/{NetworkId}/nodes");
238
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
239
- const query = map({
240
- [_mI]: [, input[_MI]],
241
- [_s]: [, input[_S]],
242
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
243
- [_nT]: [, input[_NT]],
244
- });
245
- let body;
246
- b.m("GET").h(headers).q(query).b(body);
247
- return b.build();
248
- };
249
- export const se_ListProposalsCommand = async (input, context) => {
250
- const b = rb(input, context);
251
- const headers = {};
252
- b.bp("/networks/{NetworkId}/proposals");
253
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
254
- const query = map({
255
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
256
- [_nT]: [, input[_NT]],
257
- });
258
- let body;
259
- b.m("GET").h(headers).q(query).b(body);
260
- return b.build();
261
- };
262
- export const se_ListProposalVotesCommand = async (input, context) => {
263
- const b = rb(input, context);
264
- const headers = {};
265
- b.bp("/networks/{NetworkId}/proposals/{ProposalId}/votes");
266
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
267
- b.p("ProposalId", () => input.ProposalId, "{ProposalId}", false);
268
- const query = map({
269
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
270
- [_nT]: [, input[_NT]],
271
- });
272
- let body;
273
- b.m("GET").h(headers).q(query).b(body);
274
- return b.build();
275
- };
276
- export const se_ListTagsForResourceCommand = async (input, context) => {
277
- const b = rb(input, context);
278
- const headers = {};
279
- b.bp("/tags/{ResourceArn}");
280
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
281
- let body;
282
- b.m("GET").h(headers).b(body);
283
- return b.build();
284
- };
285
- export const se_RejectInvitationCommand = async (input, context) => {
286
- const b = rb(input, context);
287
- const headers = {};
288
- b.bp("/invitations/{InvitationId}");
289
- b.p("InvitationId", () => input.InvitationId, "{InvitationId}", false);
290
- let body;
291
- b.m("DELETE").h(headers).b(body);
292
- return b.build();
293
- };
294
- export const se_TagResourceCommand = async (input, context) => {
295
- const b = rb(input, context);
296
- const headers = {
297
- "content-type": "application/json",
298
- };
299
- b.bp("/tags/{ResourceArn}");
300
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
301
- let body;
302
- body = JSON.stringify(take(input, {
303
- Tags: (_) => _json(_),
304
- }));
305
- b.m("POST").h(headers).b(body);
306
- return b.build();
307
- };
308
- export const se_UntagResourceCommand = async (input, context) => {
309
- const b = rb(input, context);
310
- const headers = {};
311
- b.bp("/tags/{ResourceArn}");
312
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
313
- const query = map({
314
- [_tK]: [__expectNonNull(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []],
315
- });
316
- let body;
317
- b.m("DELETE").h(headers).q(query).b(body);
318
- return b.build();
319
- };
320
- export const se_UpdateMemberCommand = async (input, context) => {
321
- const b = rb(input, context);
322
- const headers = {
323
- "content-type": "application/json",
324
- };
325
- b.bp("/networks/{NetworkId}/members/{MemberId}");
326
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
327
- b.p("MemberId", () => input.MemberId, "{MemberId}", false);
328
- let body;
329
- body = JSON.stringify(take(input, {
330
- LogPublishingConfiguration: (_) => _json(_),
331
- }));
332
- b.m("PATCH").h(headers).b(body);
333
- return b.build();
334
- };
335
- export const se_UpdateNodeCommand = async (input, context) => {
336
- const b = rb(input, context);
337
- const headers = {
338
- "content-type": "application/json",
339
- };
340
- b.bp("/networks/{NetworkId}/nodes/{NodeId}");
341
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
342
- b.p("NodeId", () => input.NodeId, "{NodeId}", false);
343
- let body;
344
- body = JSON.stringify(take(input, {
345
- LogPublishingConfiguration: (_) => _json(_),
346
- MemberId: [],
347
- }));
348
- b.m("PATCH").h(headers).b(body);
349
- return b.build();
350
- };
351
- export const se_VoteOnProposalCommand = async (input, context) => {
352
- const b = rb(input, context);
353
- const headers = {
354
- "content-type": "application/json",
355
- };
356
- b.bp("/networks/{NetworkId}/proposals/{ProposalId}/votes");
357
- b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
358
- b.p("ProposalId", () => input.ProposalId, "{ProposalId}", false);
359
- let body;
360
- body = JSON.stringify(take(input, {
361
- Vote: [],
362
- VoterMemberId: [],
363
- }));
364
- b.m("POST").h(headers).b(body);
365
- return b.build();
366
- };
367
- export const de_CreateAccessorCommand = async (output, context) => {
368
- if (output.statusCode !== 200 && output.statusCode >= 300) {
369
- return de_CommandError(output, context);
370
- }
371
- const contents = map({
372
- $metadata: deserializeMetadata(output),
373
- });
374
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
375
- const doc = take(data, {
376
- AccessorId: __expectString,
377
- BillingToken: __expectString,
378
- NetworkType: __expectString,
379
- });
380
- Object.assign(contents, doc);
381
- return contents;
382
- };
383
- export const de_CreateMemberCommand = async (output, context) => {
384
- if (output.statusCode !== 200 && output.statusCode >= 300) {
385
- return de_CommandError(output, context);
386
- }
387
- const contents = map({
388
- $metadata: deserializeMetadata(output),
389
- });
390
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
391
- const doc = take(data, {
392
- MemberId: __expectString,
393
- });
394
- Object.assign(contents, doc);
395
- return contents;
396
- };
397
- export const de_CreateNetworkCommand = async (output, context) => {
398
- if (output.statusCode !== 200 && output.statusCode >= 300) {
399
- return de_CommandError(output, context);
400
- }
401
- const contents = map({
402
- $metadata: deserializeMetadata(output),
403
- });
404
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
405
- const doc = take(data, {
406
- MemberId: __expectString,
407
- NetworkId: __expectString,
408
- });
409
- Object.assign(contents, doc);
410
- return contents;
411
- };
412
- export const de_CreateNodeCommand = async (output, context) => {
413
- if (output.statusCode !== 200 && output.statusCode >= 300) {
414
- return de_CommandError(output, context);
415
- }
416
- const contents = map({
417
- $metadata: deserializeMetadata(output),
418
- });
419
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
420
- const doc = take(data, {
421
- NodeId: __expectString,
422
- });
423
- Object.assign(contents, doc);
424
- return contents;
425
- };
426
- export const de_CreateProposalCommand = async (output, context) => {
427
- if (output.statusCode !== 200 && output.statusCode >= 300) {
428
- return de_CommandError(output, context);
429
- }
430
- const contents = map({
431
- $metadata: deserializeMetadata(output),
432
- });
433
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
434
- const doc = take(data, {
435
- ProposalId: __expectString,
436
- });
437
- Object.assign(contents, doc);
438
- return contents;
439
- };
440
- export const de_DeleteAccessorCommand = async (output, context) => {
441
- if (output.statusCode !== 200 && output.statusCode >= 300) {
442
- return de_CommandError(output, context);
443
- }
444
- const contents = map({
445
- $metadata: deserializeMetadata(output),
446
- });
447
- await collectBody(output.body, context);
448
- return contents;
449
- };
450
- export const de_DeleteMemberCommand = async (output, context) => {
451
- if (output.statusCode !== 200 && output.statusCode >= 300) {
452
- return de_CommandError(output, context);
453
- }
454
- const contents = map({
455
- $metadata: deserializeMetadata(output),
456
- });
457
- await collectBody(output.body, context);
458
- return contents;
459
- };
460
- export const de_DeleteNodeCommand = async (output, context) => {
461
- if (output.statusCode !== 200 && output.statusCode >= 300) {
462
- return de_CommandError(output, context);
463
- }
464
- const contents = map({
465
- $metadata: deserializeMetadata(output),
466
- });
467
- await collectBody(output.body, context);
468
- return contents;
469
- };
470
- export const de_GetAccessorCommand = async (output, context) => {
471
- if (output.statusCode !== 200 && output.statusCode >= 300) {
472
- return de_CommandError(output, context);
473
- }
474
- const contents = map({
475
- $metadata: deserializeMetadata(output),
476
- });
477
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
478
- const doc = take(data, {
479
- Accessor: (_) => de_Accessor(_, context),
480
- });
481
- Object.assign(contents, doc);
482
- return contents;
483
- };
484
- export const de_GetMemberCommand = async (output, context) => {
485
- if (output.statusCode !== 200 && output.statusCode >= 300) {
486
- return de_CommandError(output, context);
487
- }
488
- const contents = map({
489
- $metadata: deserializeMetadata(output),
490
- });
491
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
492
- const doc = take(data, {
493
- Member: (_) => de_Member(_, context),
494
- });
495
- Object.assign(contents, doc);
496
- return contents;
497
- };
498
- export const de_GetNetworkCommand = async (output, context) => {
499
- if (output.statusCode !== 200 && output.statusCode >= 300) {
500
- return de_CommandError(output, context);
501
- }
502
- const contents = map({
503
- $metadata: deserializeMetadata(output),
504
- });
505
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
506
- const doc = take(data, {
507
- Network: (_) => de_Network(_, context),
508
- });
509
- Object.assign(contents, doc);
510
- return contents;
511
- };
512
- export const de_GetNodeCommand = async (output, context) => {
513
- if (output.statusCode !== 200 && output.statusCode >= 300) {
514
- return de_CommandError(output, context);
515
- }
516
- const contents = map({
517
- $metadata: deserializeMetadata(output),
518
- });
519
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
520
- const doc = take(data, {
521
- Node: (_) => de_Node(_, context),
522
- });
523
- Object.assign(contents, doc);
524
- return contents;
525
- };
526
- export const de_GetProposalCommand = async (output, context) => {
527
- if (output.statusCode !== 200 && output.statusCode >= 300) {
528
- return de_CommandError(output, context);
529
- }
530
- const contents = map({
531
- $metadata: deserializeMetadata(output),
532
- });
533
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
534
- const doc = take(data, {
535
- Proposal: (_) => de_Proposal(_, context),
536
- });
537
- Object.assign(contents, doc);
538
- return contents;
539
- };
540
- export const de_ListAccessorsCommand = async (output, context) => {
541
- if (output.statusCode !== 200 && output.statusCode >= 300) {
542
- return de_CommandError(output, context);
543
- }
544
- const contents = map({
545
- $metadata: deserializeMetadata(output),
546
- });
547
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
548
- const doc = take(data, {
549
- Accessors: (_) => de_AccessorSummaryList(_, context),
550
- NextToken: __expectString,
551
- });
552
- Object.assign(contents, doc);
553
- return contents;
554
- };
555
- export const de_ListInvitationsCommand = async (output, context) => {
556
- if (output.statusCode !== 200 && output.statusCode >= 300) {
557
- return de_CommandError(output, context);
558
- }
559
- const contents = map({
560
- $metadata: deserializeMetadata(output),
561
- });
562
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
563
- const doc = take(data, {
564
- Invitations: (_) => de_InvitationList(_, context),
565
- NextToken: __expectString,
566
- });
567
- Object.assign(contents, doc);
568
- return contents;
569
- };
570
- export const de_ListMembersCommand = async (output, context) => {
571
- if (output.statusCode !== 200 && output.statusCode >= 300) {
572
- return de_CommandError(output, context);
573
- }
574
- const contents = map({
575
- $metadata: deserializeMetadata(output),
576
- });
577
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
578
- const doc = take(data, {
579
- Members: (_) => de_MemberSummaryList(_, context),
580
- NextToken: __expectString,
581
- });
582
- Object.assign(contents, doc);
583
- return contents;
584
- };
585
- export const de_ListNetworksCommand = async (output, context) => {
586
- if (output.statusCode !== 200 && output.statusCode >= 300) {
587
- return de_CommandError(output, context);
588
- }
589
- const contents = map({
590
- $metadata: deserializeMetadata(output),
591
- });
592
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
593
- const doc = take(data, {
594
- Networks: (_) => de_NetworkSummaryList(_, context),
595
- NextToken: __expectString,
596
- });
597
- Object.assign(contents, doc);
598
- return contents;
599
- };
600
- export const de_ListNodesCommand = async (output, context) => {
601
- if (output.statusCode !== 200 && output.statusCode >= 300) {
602
- return de_CommandError(output, context);
603
- }
604
- const contents = map({
605
- $metadata: deserializeMetadata(output),
606
- });
607
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
608
- const doc = take(data, {
609
- NextToken: __expectString,
610
- Nodes: (_) => de_NodeSummaryList(_, context),
611
- });
612
- Object.assign(contents, doc);
613
- return contents;
614
- };
615
- export const de_ListProposalsCommand = async (output, context) => {
616
- if (output.statusCode !== 200 && output.statusCode >= 300) {
617
- return de_CommandError(output, context);
618
- }
619
- const contents = map({
620
- $metadata: deserializeMetadata(output),
621
- });
622
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
623
- const doc = take(data, {
624
- NextToken: __expectString,
625
- Proposals: (_) => de_ProposalSummaryList(_, context),
626
- });
627
- Object.assign(contents, doc);
628
- return contents;
629
- };
630
- export const de_ListProposalVotesCommand = async (output, context) => {
631
- if (output.statusCode !== 200 && output.statusCode >= 300) {
632
- return de_CommandError(output, context);
633
- }
634
- const contents = map({
635
- $metadata: deserializeMetadata(output),
636
- });
637
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
638
- const doc = take(data, {
639
- NextToken: __expectString,
640
- ProposalVotes: _json,
641
- });
642
- Object.assign(contents, doc);
643
- return contents;
644
- };
645
- export const de_ListTagsForResourceCommand = async (output, context) => {
646
- if (output.statusCode !== 200 && output.statusCode >= 300) {
647
- return de_CommandError(output, context);
648
- }
649
- const contents = map({
650
- $metadata: deserializeMetadata(output),
651
- });
652
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
653
- const doc = take(data, {
654
- Tags: _json,
655
- });
656
- Object.assign(contents, doc);
657
- return contents;
658
- };
659
- export const de_RejectInvitationCommand = async (output, context) => {
660
- if (output.statusCode !== 200 && output.statusCode >= 300) {
661
- return de_CommandError(output, context);
662
- }
663
- const contents = map({
664
- $metadata: deserializeMetadata(output),
665
- });
666
- await collectBody(output.body, context);
667
- return contents;
668
- };
669
- export const de_TagResourceCommand = async (output, context) => {
670
- if (output.statusCode !== 200 && output.statusCode >= 300) {
671
- return de_CommandError(output, context);
672
- }
673
- const contents = map({
674
- $metadata: deserializeMetadata(output),
675
- });
676
- await collectBody(output.body, context);
677
- return contents;
678
- };
679
- export const de_UntagResourceCommand = async (output, context) => {
680
- if (output.statusCode !== 200 && output.statusCode >= 300) {
681
- return de_CommandError(output, context);
682
- }
683
- const contents = map({
684
- $metadata: deserializeMetadata(output),
685
- });
686
- await collectBody(output.body, context);
687
- return contents;
688
- };
689
- export const de_UpdateMemberCommand = async (output, context) => {
690
- if (output.statusCode !== 200 && output.statusCode >= 300) {
691
- return de_CommandError(output, context);
692
- }
693
- const contents = map({
694
- $metadata: deserializeMetadata(output),
695
- });
696
- await collectBody(output.body, context);
697
- return contents;
698
- };
699
- export const de_UpdateNodeCommand = async (output, context) => {
700
- if (output.statusCode !== 200 && output.statusCode >= 300) {
701
- return de_CommandError(output, context);
702
- }
703
- const contents = map({
704
- $metadata: deserializeMetadata(output),
705
- });
706
- await collectBody(output.body, context);
707
- return contents;
708
- };
709
- export const de_VoteOnProposalCommand = async (output, context) => {
710
- if (output.statusCode !== 200 && output.statusCode >= 300) {
711
- return de_CommandError(output, context);
712
- }
713
- const contents = map({
714
- $metadata: deserializeMetadata(output),
715
- });
716
- await collectBody(output.body, context);
717
- return contents;
718
- };
719
- const de_CommandError = async (output, context) => {
720
- const parsedOutput = {
721
- ...output,
722
- body: await parseErrorBody(output.body, context),
723
- };
724
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
725
- switch (errorCode) {
726
- case "AccessDeniedException":
727
- case "com.amazonaws.managedblockchain#AccessDeniedException":
728
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
729
- case "InternalServiceErrorException":
730
- case "com.amazonaws.managedblockchain#InternalServiceErrorException":
731
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
732
- case "InvalidRequestException":
733
- case "com.amazonaws.managedblockchain#InvalidRequestException":
734
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
735
- case "ResourceAlreadyExistsException":
736
- case "com.amazonaws.managedblockchain#ResourceAlreadyExistsException":
737
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
738
- case "ResourceLimitExceededException":
739
- case "com.amazonaws.managedblockchain#ResourceLimitExceededException":
740
- throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context);
741
- case "ThrottlingException":
742
- case "com.amazonaws.managedblockchain#ThrottlingException":
743
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
744
- case "TooManyTagsException":
745
- case "com.amazonaws.managedblockchain#TooManyTagsException":
746
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
747
- case "ResourceNotFoundException":
748
- case "com.amazonaws.managedblockchain#ResourceNotFoundException":
749
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
750
- case "ResourceNotReadyException":
751
- case "com.amazonaws.managedblockchain#ResourceNotReadyException":
752
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
753
- case "IllegalActionException":
754
- case "com.amazonaws.managedblockchain#IllegalActionException":
755
- throw await de_IllegalActionExceptionRes(parsedOutput, context);
756
- default:
757
- const parsedBody = parsedOutput.body;
758
- return throwDefaultError({
759
- output,
760
- parsedBody,
761
- errorCode,
762
- });
763
- }
764
- };
765
- const throwDefaultError = withBaseException(__BaseException);
766
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
767
- const contents = map({});
768
- const data = parsedOutput.body;
769
- const doc = take(data, {
770
- Message: __expectString,
771
- });
772
- Object.assign(contents, doc);
773
- const exception = new AccessDeniedException({
774
- $metadata: deserializeMetadata(parsedOutput),
775
- ...contents,
776
- });
777
- return __decorateServiceException(exception, parsedOutput.body);
778
- };
779
- const de_IllegalActionExceptionRes = async (parsedOutput, context) => {
780
- const contents = map({});
781
- const data = parsedOutput.body;
782
- const doc = take(data, {
783
- Message: __expectString,
784
- });
785
- Object.assign(contents, doc);
786
- const exception = new IllegalActionException({
787
- $metadata: deserializeMetadata(parsedOutput),
788
- ...contents,
789
- });
790
- return __decorateServiceException(exception, parsedOutput.body);
791
- };
792
- const de_InternalServiceErrorExceptionRes = async (parsedOutput, context) => {
793
- const contents = map({});
794
- const data = parsedOutput.body;
795
- const doc = take(data, {});
796
- Object.assign(contents, doc);
797
- const exception = new InternalServiceErrorException({
798
- $metadata: deserializeMetadata(parsedOutput),
799
- ...contents,
800
- });
801
- return __decorateServiceException(exception, parsedOutput.body);
802
- };
803
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
804
- const contents = map({});
805
- const data = parsedOutput.body;
806
- const doc = take(data, {
807
- Message: __expectString,
808
- });
809
- Object.assign(contents, doc);
810
- const exception = new InvalidRequestException({
811
- $metadata: deserializeMetadata(parsedOutput),
812
- ...contents,
813
- });
814
- return __decorateServiceException(exception, parsedOutput.body);
815
- };
816
- const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
817
- const contents = map({});
818
- const data = parsedOutput.body;
819
- const doc = take(data, {
820
- Message: __expectString,
821
- });
822
- Object.assign(contents, doc);
823
- const exception = new ResourceAlreadyExistsException({
824
- $metadata: deserializeMetadata(parsedOutput),
825
- ...contents,
826
- });
827
- return __decorateServiceException(exception, parsedOutput.body);
828
- };
829
- const de_ResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
830
- const contents = map({});
831
- const data = parsedOutput.body;
832
- const doc = take(data, {
833
- Message: __expectString,
834
- });
835
- Object.assign(contents, doc);
836
- const exception = new ResourceLimitExceededException({
837
- $metadata: deserializeMetadata(parsedOutput),
838
- ...contents,
839
- });
840
- return __decorateServiceException(exception, parsedOutput.body);
841
- };
842
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
843
- const contents = map({});
844
- const data = parsedOutput.body;
845
- const doc = take(data, {
846
- Message: __expectString,
847
- ResourceName: __expectString,
848
- });
849
- Object.assign(contents, doc);
850
- const exception = new ResourceNotFoundException({
851
- $metadata: deserializeMetadata(parsedOutput),
852
- ...contents,
853
- });
854
- return __decorateServiceException(exception, parsedOutput.body);
855
- };
856
- const de_ResourceNotReadyExceptionRes = async (parsedOutput, context) => {
857
- const contents = map({});
858
- const data = parsedOutput.body;
859
- const doc = take(data, {
860
- Message: __expectString,
861
- });
862
- Object.assign(contents, doc);
863
- const exception = new ResourceNotReadyException({
864
- $metadata: deserializeMetadata(parsedOutput),
865
- ...contents,
866
- });
867
- return __decorateServiceException(exception, parsedOutput.body);
868
- };
869
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
870
- const contents = map({});
871
- const data = parsedOutput.body;
872
- const doc = take(data, {});
873
- Object.assign(contents, doc);
874
- const exception = new ThrottlingException({
875
- $metadata: deserializeMetadata(parsedOutput),
876
- ...contents,
877
- });
878
- return __decorateServiceException(exception, parsedOutput.body);
879
- };
880
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
881
- const contents = map({});
882
- const data = parsedOutput.body;
883
- const doc = take(data, {
884
- Message: __expectString,
885
- ResourceName: __expectString,
886
- });
887
- Object.assign(contents, doc);
888
- const exception = new TooManyTagsException({
889
- $metadata: deserializeMetadata(parsedOutput),
890
- ...contents,
891
- });
892
- return __decorateServiceException(exception, parsedOutput.body);
893
- };
894
- const de_Accessor = (output, context) => {
895
- return take(output, {
896
- Arn: __expectString,
897
- BillingToken: __expectString,
898
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
899
- Id: __expectString,
900
- NetworkType: __expectString,
901
- Status: __expectString,
902
- Tags: _json,
903
- Type: __expectString,
904
- });
905
- };
906
- const de_AccessorSummary = (output, context) => {
907
- return take(output, {
908
- Arn: __expectString,
909
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
910
- Id: __expectString,
911
- NetworkType: __expectString,
912
- Status: __expectString,
913
- Type: __expectString,
914
- });
915
- };
916
- const de_AccessorSummaryList = (output, context) => {
917
- const retVal = (output || [])
918
- .filter((e) => e != null)
919
- .map((entry) => {
920
- return de_AccessorSummary(entry, context);
921
- });
922
- return retVal;
923
- };
924
- const de_Invitation = (output, context) => {
925
- return take(output, {
926
- Arn: __expectString,
927
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
928
- ExpirationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
929
- InvitationId: __expectString,
930
- NetworkSummary: (_) => de_NetworkSummary(_, context),
931
- Status: __expectString,
932
- });
933
- };
934
- const de_InvitationList = (output, context) => {
935
- const retVal = (output || [])
936
- .filter((e) => e != null)
937
- .map((entry) => {
938
- return de_Invitation(entry, context);
939
- });
940
- return retVal;
941
- };
942
- const de_Member = (output, context) => {
943
- return take(output, {
944
- Arn: __expectString,
945
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
946
- Description: __expectString,
947
- FrameworkAttributes: _json,
948
- Id: __expectString,
949
- KmsKeyArn: __expectString,
950
- LogPublishingConfiguration: _json,
951
- Name: __expectString,
952
- NetworkId: __expectString,
953
- Status: __expectString,
954
- Tags: _json,
955
- });
956
- };
957
- const de_MemberSummary = (output, context) => {
958
- return take(output, {
959
- Arn: __expectString,
960
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
961
- Description: __expectString,
962
- Id: __expectString,
963
- IsOwned: __expectBoolean,
964
- Name: __expectString,
965
- Status: __expectString,
966
- });
967
- };
968
- const de_MemberSummaryList = (output, context) => {
969
- const retVal = (output || [])
970
- .filter((e) => e != null)
971
- .map((entry) => {
972
- return de_MemberSummary(entry, context);
973
- });
974
- return retVal;
975
- };
976
- const de_Network = (output, context) => {
977
- return take(output, {
978
- Arn: __expectString,
979
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
980
- Description: __expectString,
981
- Framework: __expectString,
982
- FrameworkAttributes: _json,
983
- FrameworkVersion: __expectString,
984
- Id: __expectString,
985
- Name: __expectString,
986
- Status: __expectString,
987
- Tags: _json,
988
- VotingPolicy: _json,
989
- VpcEndpointServiceName: __expectString,
990
- });
991
- };
992
- const de_NetworkSummary = (output, context) => {
993
- return take(output, {
994
- Arn: __expectString,
995
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
996
- Description: __expectString,
997
- Framework: __expectString,
998
- FrameworkVersion: __expectString,
999
- Id: __expectString,
1000
- Name: __expectString,
1001
- Status: __expectString,
1002
- });
1003
- };
1004
- const de_NetworkSummaryList = (output, context) => {
1005
- const retVal = (output || [])
1006
- .filter((e) => e != null)
1007
- .map((entry) => {
1008
- return de_NetworkSummary(entry, context);
1009
- });
1010
- return retVal;
1011
- };
1012
- const de_Node = (output, context) => {
1013
- return take(output, {
1014
- Arn: __expectString,
1015
- AvailabilityZone: __expectString,
1016
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1017
- FrameworkAttributes: _json,
1018
- Id: __expectString,
1019
- InstanceType: __expectString,
1020
- KmsKeyArn: __expectString,
1021
- LogPublishingConfiguration: _json,
1022
- MemberId: __expectString,
1023
- NetworkId: __expectString,
1024
- StateDB: __expectString,
1025
- Status: __expectString,
1026
- Tags: _json,
1027
- });
1028
- };
1029
- const de_NodeSummary = (output, context) => {
1030
- return take(output, {
1031
- Arn: __expectString,
1032
- AvailabilityZone: __expectString,
1033
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1034
- Id: __expectString,
1035
- InstanceType: __expectString,
1036
- Status: __expectString,
1037
- });
1038
- };
1039
- const de_NodeSummaryList = (output, context) => {
1040
- const retVal = (output || [])
1041
- .filter((e) => e != null)
1042
- .map((entry) => {
1043
- return de_NodeSummary(entry, context);
1044
- });
1045
- return retVal;
1046
- };
1047
- const de_Proposal = (output, context) => {
1048
- return take(output, {
1049
- Actions: _json,
1050
- Arn: __expectString,
1051
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1052
- Description: __expectString,
1053
- ExpirationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1054
- NetworkId: __expectString,
1055
- NoVoteCount: __expectInt32,
1056
- OutstandingVoteCount: __expectInt32,
1057
- ProposalId: __expectString,
1058
- ProposedByMemberId: __expectString,
1059
- ProposedByMemberName: __expectString,
1060
- Status: __expectString,
1061
- Tags: _json,
1062
- YesVoteCount: __expectInt32,
1063
- });
1064
- };
1065
- const de_ProposalSummary = (output, context) => {
1066
- return take(output, {
1067
- Arn: __expectString,
1068
- CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1069
- Description: __expectString,
1070
- ExpirationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1071
- ProposalId: __expectString,
1072
- ProposedByMemberId: __expectString,
1073
- ProposedByMemberName: __expectString,
1074
- Status: __expectString,
1075
- });
1076
- };
1077
- const de_ProposalSummaryList = (output, context) => {
1078
- const retVal = (output || [])
1079
- .filter((e) => e != null)
1080
- .map((entry) => {
1081
- return de_ProposalSummary(entry, context);
1082
- });
1083
- return retVal;
1084
- };
1085
- const deserializeMetadata = (output) => ({
1086
- httpStatusCode: output.statusCode,
1087
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1088
- extendedRequestId: output.headers["x-amz-id-2"],
1089
- cfId: output.headers["x-amz-cf-id"],
1090
- });
1091
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1092
- const _F = "Framework";
1093
- const _IO = "IsOwned";
1094
- const _MI = "MemberId";
1095
- const _MR = "MaxResults";
1096
- const _N = "Name";
1097
- const _NT = "NextToken";
1098
- const _NTe = "NetworkType";
1099
- const _S = "Status";
1100
- const _TK = "TagKeys";
1101
- const _f = "framework";
1102
- const _iO = "isOwned";
1103
- const _mI = "memberId";
1104
- const _mR = "maxResults";
1105
- const _n = "name";
1106
- const _nT = "nextToken";
1107
- const _nTe = "networkType";
1108
- const _s = "status";
1109
- const _tK = "tagKeys";