@aws-sdk/client-managedblockchain 3.131.0 → 3.142.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.
- package/CHANGELOG.md +33 -0
- package/README.md +1 -1
- package/dist-cjs/commands/CreateMemberCommand.js +2 -2
- package/dist-cjs/commands/CreateNetworkCommand.js +2 -2
- package/dist-cjs/commands/CreateNodeCommand.js +2 -2
- package/dist-cjs/commands/CreateProposalCommand.js +2 -2
- package/dist-cjs/commands/DeleteMemberCommand.js +2 -2
- package/dist-cjs/commands/DeleteNodeCommand.js +2 -2
- package/dist-cjs/commands/GetMemberCommand.js +2 -2
- package/dist-cjs/commands/GetNetworkCommand.js +2 -2
- package/dist-cjs/commands/GetNodeCommand.js +2 -2
- package/dist-cjs/commands/GetProposalCommand.js +2 -2
- package/dist-cjs/commands/ListInvitationsCommand.js +2 -2
- package/dist-cjs/commands/ListMembersCommand.js +2 -2
- package/dist-cjs/commands/ListNetworksCommand.js +2 -2
- package/dist-cjs/commands/ListNodesCommand.js +2 -2
- package/dist-cjs/commands/ListProposalVotesCommand.js +2 -2
- package/dist-cjs/commands/ListProposalsCommand.js +2 -2
- package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
- package/dist-cjs/commands/RejectInvitationCommand.js +2 -2
- package/dist-cjs/commands/TagResourceCommand.js +2 -2
- package/dist-cjs/commands/UntagResourceCommand.js +2 -2
- package/dist-cjs/commands/UpdateMemberCommand.js +2 -2
- package/dist-cjs/commands/UpdateNodeCommand.js +2 -2
- package/dist-cjs/commands/VoteOnProposalCommand.js +2 -2
- package/dist-cjs/models/models_0.js +338 -500
- package/dist-cjs/protocols/Aws_restJson1.js +297 -654
- package/dist-es/commands/CreateMemberCommand.js +3 -3
- package/dist-es/commands/CreateNetworkCommand.js +3 -3
- package/dist-es/commands/CreateNodeCommand.js +3 -3
- package/dist-es/commands/CreateProposalCommand.js +3 -3
- package/dist-es/commands/DeleteMemberCommand.js +3 -3
- package/dist-es/commands/DeleteNodeCommand.js +3 -3
- package/dist-es/commands/GetMemberCommand.js +3 -3
- package/dist-es/commands/GetNetworkCommand.js +3 -3
- package/dist-es/commands/GetNodeCommand.js +3 -3
- package/dist-es/commands/GetProposalCommand.js +3 -3
- package/dist-es/commands/ListInvitationsCommand.js +3 -3
- package/dist-es/commands/ListMembersCommand.js +3 -3
- package/dist-es/commands/ListNetworksCommand.js +3 -3
- package/dist-es/commands/ListNodesCommand.js +3 -3
- package/dist-es/commands/ListProposalVotesCommand.js +3 -3
- package/dist-es/commands/ListProposalsCommand.js +3 -3
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
- package/dist-es/commands/RejectInvitationCommand.js +3 -3
- package/dist-es/commands/TagResourceCommand.js +3 -3
- package/dist-es/commands/UntagResourceCommand.js +3 -3
- package/dist-es/commands/UpdateMemberCommand.js +3 -3
- package/dist-es/commands/UpdateNodeCommand.js +3 -3
- package/dist-es/commands/VoteOnProposalCommand.js +3 -3
- package/dist-es/models/models_0.js +87 -330
- package/dist-es/protocols/Aws_restJson1.js +387 -643
- package/dist-types/models/models_0.d.ts +324 -486
- package/dist-types/ts3.4/models/models_0.d.ts +162 -324
- package/package.json +6 -6
|
@@ -13,16 +13,7 @@ const serializeAws_restJson1CreateMemberCommand = async (input, context) => {
|
|
|
13
13
|
"content-type": "application/json",
|
|
14
14
|
};
|
|
15
15
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
|
|
16
|
-
|
|
17
|
-
const labelValue = input.NetworkId;
|
|
18
|
-
if (labelValue.length <= 0) {
|
|
19
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
20
|
-
}
|
|
21
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
25
|
-
}
|
|
16
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
26
17
|
let body;
|
|
27
18
|
body = JSON.stringify({
|
|
28
19
|
ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
@@ -85,16 +76,7 @@ const serializeAws_restJson1CreateNodeCommand = async (input, context) => {
|
|
|
85
76
|
"content-type": "application/json",
|
|
86
77
|
};
|
|
87
78
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
|
|
88
|
-
|
|
89
|
-
const labelValue = input.NetworkId;
|
|
90
|
-
if (labelValue.length <= 0) {
|
|
91
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
92
|
-
}
|
|
93
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
97
|
-
}
|
|
79
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
98
80
|
let body;
|
|
99
81
|
body = JSON.stringify({
|
|
100
82
|
ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
@@ -122,16 +104,7 @@ const serializeAws_restJson1CreateProposalCommand = async (input, context) => {
|
|
|
122
104
|
"content-type": "application/json",
|
|
123
105
|
};
|
|
124
106
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
|
|
125
|
-
|
|
126
|
-
const labelValue = input.NetworkId;
|
|
127
|
-
if (labelValue.length <= 0) {
|
|
128
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
129
|
-
}
|
|
130
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
134
|
-
}
|
|
107
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
135
108
|
let body;
|
|
136
109
|
body = JSON.stringify({
|
|
137
110
|
...(input.Actions != null && { Actions: serializeAws_restJson1ProposalActions(input.Actions, context) }),
|
|
@@ -155,26 +128,8 @@ const serializeAws_restJson1DeleteMemberCommand = async (input, context) => {
|
|
|
155
128
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
156
129
|
const headers = {};
|
|
157
130
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (labelValue.length <= 0) {
|
|
161
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
162
|
-
}
|
|
163
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
167
|
-
}
|
|
168
|
-
if (input.MemberId !== undefined) {
|
|
169
|
-
const labelValue = input.MemberId;
|
|
170
|
-
if (labelValue.length <= 0) {
|
|
171
|
-
throw new Error("Empty value provided for input HTTP label: MemberId.");
|
|
172
|
-
}
|
|
173
|
-
resolvedPath = resolvedPath.replace("{MemberId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
throw new Error("No value provided for input HTTP label: MemberId.");
|
|
177
|
-
}
|
|
131
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
132
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
|
|
178
133
|
let body;
|
|
179
134
|
return new protocol_http_1.HttpRequest({
|
|
180
135
|
protocol,
|
|
@@ -191,29 +146,11 @@ const serializeAws_restJson1DeleteNodeCommand = async (input, context) => {
|
|
|
191
146
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
192
147
|
const headers = {};
|
|
193
148
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
203
|
-
}
|
|
204
|
-
if (input.NodeId !== undefined) {
|
|
205
|
-
const labelValue = input.NodeId;
|
|
206
|
-
if (labelValue.length <= 0) {
|
|
207
|
-
throw new Error("Empty value provided for input HTTP label: NodeId.");
|
|
208
|
-
}
|
|
209
|
-
resolvedPath = resolvedPath.replace("{NodeId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
210
|
-
}
|
|
211
|
-
else {
|
|
212
|
-
throw new Error("No value provided for input HTTP label: NodeId.");
|
|
213
|
-
}
|
|
214
|
-
const query = {
|
|
215
|
-
...(input.MemberId !== undefined && { memberId: input.MemberId }),
|
|
216
|
-
};
|
|
149
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
150
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
|
|
151
|
+
const query = map({
|
|
152
|
+
memberId: [, input.MemberId],
|
|
153
|
+
});
|
|
217
154
|
let body;
|
|
218
155
|
return new protocol_http_1.HttpRequest({
|
|
219
156
|
protocol,
|
|
@@ -231,26 +168,8 @@ const serializeAws_restJson1GetMemberCommand = async (input, context) => {
|
|
|
231
168
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
232
169
|
const headers = {};
|
|
233
170
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if (labelValue.length <= 0) {
|
|
237
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
238
|
-
}
|
|
239
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
243
|
-
}
|
|
244
|
-
if (input.MemberId !== undefined) {
|
|
245
|
-
const labelValue = input.MemberId;
|
|
246
|
-
if (labelValue.length <= 0) {
|
|
247
|
-
throw new Error("Empty value provided for input HTTP label: MemberId.");
|
|
248
|
-
}
|
|
249
|
-
resolvedPath = resolvedPath.replace("{MemberId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
250
|
-
}
|
|
251
|
-
else {
|
|
252
|
-
throw new Error("No value provided for input HTTP label: MemberId.");
|
|
253
|
-
}
|
|
171
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
172
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
|
|
254
173
|
let body;
|
|
255
174
|
return new protocol_http_1.HttpRequest({
|
|
256
175
|
protocol,
|
|
@@ -267,16 +186,7 @@ const serializeAws_restJson1GetNetworkCommand = async (input, context) => {
|
|
|
267
186
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
268
187
|
const headers = {};
|
|
269
188
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}";
|
|
270
|
-
|
|
271
|
-
const labelValue = input.NetworkId;
|
|
272
|
-
if (labelValue.length <= 0) {
|
|
273
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
274
|
-
}
|
|
275
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
279
|
-
}
|
|
189
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
280
190
|
let body;
|
|
281
191
|
return new protocol_http_1.HttpRequest({
|
|
282
192
|
protocol,
|
|
@@ -293,29 +203,11 @@ const serializeAws_restJson1GetNodeCommand = async (input, context) => {
|
|
|
293
203
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
294
204
|
const headers = {};
|
|
295
205
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
305
|
-
}
|
|
306
|
-
if (input.NodeId !== undefined) {
|
|
307
|
-
const labelValue = input.NodeId;
|
|
308
|
-
if (labelValue.length <= 0) {
|
|
309
|
-
throw new Error("Empty value provided for input HTTP label: NodeId.");
|
|
310
|
-
}
|
|
311
|
-
resolvedPath = resolvedPath.replace("{NodeId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
314
|
-
throw new Error("No value provided for input HTTP label: NodeId.");
|
|
315
|
-
}
|
|
316
|
-
const query = {
|
|
317
|
-
...(input.MemberId !== undefined && { memberId: input.MemberId }),
|
|
318
|
-
};
|
|
206
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
207
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
|
|
208
|
+
const query = map({
|
|
209
|
+
memberId: [, input.MemberId],
|
|
210
|
+
});
|
|
319
211
|
let body;
|
|
320
212
|
return new protocol_http_1.HttpRequest({
|
|
321
213
|
protocol,
|
|
@@ -334,26 +226,8 @@ const serializeAws_restJson1GetProposalCommand = async (input, context) => {
|
|
|
334
226
|
const headers = {};
|
|
335
227
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
336
228
|
"/networks/{NetworkId}/proposals/{ProposalId}";
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
if (labelValue.length <= 0) {
|
|
340
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
341
|
-
}
|
|
342
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
346
|
-
}
|
|
347
|
-
if (input.ProposalId !== undefined) {
|
|
348
|
-
const labelValue = input.ProposalId;
|
|
349
|
-
if (labelValue.length <= 0) {
|
|
350
|
-
throw new Error("Empty value provided for input HTTP label: ProposalId.");
|
|
351
|
-
}
|
|
352
|
-
resolvedPath = resolvedPath.replace("{ProposalId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
353
|
-
}
|
|
354
|
-
else {
|
|
355
|
-
throw new Error("No value provided for input HTTP label: ProposalId.");
|
|
356
|
-
}
|
|
229
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
230
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
|
|
357
231
|
let body;
|
|
358
232
|
return new protocol_http_1.HttpRequest({
|
|
359
233
|
protocol,
|
|
@@ -370,10 +244,10 @@ const serializeAws_restJson1ListInvitationsCommand = async (input, context) => {
|
|
|
370
244
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
371
245
|
const headers = {};
|
|
372
246
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/invitations";
|
|
373
|
-
const query = {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
};
|
|
247
|
+
const query = map({
|
|
248
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
249
|
+
nextToken: [, input.NextToken],
|
|
250
|
+
});
|
|
377
251
|
let body;
|
|
378
252
|
return new protocol_http_1.HttpRequest({
|
|
379
253
|
protocol,
|
|
@@ -391,23 +265,14 @@ const serializeAws_restJson1ListMembersCommand = async (input, context) => {
|
|
|
391
265
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
392
266
|
const headers = {};
|
|
393
267
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
403
|
-
}
|
|
404
|
-
const query = {
|
|
405
|
-
...(input.Name !== undefined && { name: input.Name }),
|
|
406
|
-
...(input.Status !== undefined && { status: input.Status }),
|
|
407
|
-
...(input.IsOwned !== undefined && { isOwned: input.IsOwned.toString() }),
|
|
408
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
409
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
410
|
-
};
|
|
268
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
269
|
+
const query = map({
|
|
270
|
+
name: [, input.Name],
|
|
271
|
+
status: [, input.Status],
|
|
272
|
+
isOwned: [() => input.IsOwned !== void 0, () => input.IsOwned.toString()],
|
|
273
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
274
|
+
nextToken: [, input.NextToken],
|
|
275
|
+
});
|
|
411
276
|
let body;
|
|
412
277
|
return new protocol_http_1.HttpRequest({
|
|
413
278
|
protocol,
|
|
@@ -425,13 +290,13 @@ const serializeAws_restJson1ListNetworksCommand = async (input, context) => {
|
|
|
425
290
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
426
291
|
const headers = {};
|
|
427
292
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
|
|
428
|
-
const query = {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
};
|
|
293
|
+
const query = map({
|
|
294
|
+
name: [, input.Name],
|
|
295
|
+
framework: [, input.Framework],
|
|
296
|
+
status: [, input.Status],
|
|
297
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
298
|
+
nextToken: [, input.NextToken],
|
|
299
|
+
});
|
|
435
300
|
let body;
|
|
436
301
|
return new protocol_http_1.HttpRequest({
|
|
437
302
|
protocol,
|
|
@@ -449,22 +314,13 @@ const serializeAws_restJson1ListNodesCommand = async (input, context) => {
|
|
|
449
314
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
450
315
|
const headers = {};
|
|
451
316
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}
|
|
459
|
-
else {
|
|
460
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
461
|
-
}
|
|
462
|
-
const query = {
|
|
463
|
-
...(input.MemberId !== undefined && { memberId: input.MemberId }),
|
|
464
|
-
...(input.Status !== undefined && { status: input.Status }),
|
|
465
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
466
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
467
|
-
};
|
|
317
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
318
|
+
const query = map({
|
|
319
|
+
memberId: [, input.MemberId],
|
|
320
|
+
status: [, input.Status],
|
|
321
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
322
|
+
nextToken: [, input.NextToken],
|
|
323
|
+
});
|
|
468
324
|
let body;
|
|
469
325
|
return new protocol_http_1.HttpRequest({
|
|
470
326
|
protocol,
|
|
@@ -482,20 +338,11 @@ const serializeAws_restJson1ListProposalsCommand = async (input, context) => {
|
|
|
482
338
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
483
339
|
const headers = {};
|
|
484
340
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
491
|
-
}
|
|
492
|
-
else {
|
|
493
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
494
|
-
}
|
|
495
|
-
const query = {
|
|
496
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
497
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
498
|
-
};
|
|
341
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
342
|
+
const query = map({
|
|
343
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
344
|
+
nextToken: [, input.NextToken],
|
|
345
|
+
});
|
|
499
346
|
let body;
|
|
500
347
|
return new protocol_http_1.HttpRequest({
|
|
501
348
|
protocol,
|
|
@@ -514,30 +361,12 @@ const serializeAws_restJson1ListProposalVotesCommand = async (input, context) =>
|
|
|
514
361
|
const headers = {};
|
|
515
362
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
516
363
|
"/networks/{NetworkId}/proposals/{ProposalId}/votes";
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}
|
|
524
|
-
else {
|
|
525
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
526
|
-
}
|
|
527
|
-
if (input.ProposalId !== undefined) {
|
|
528
|
-
const labelValue = input.ProposalId;
|
|
529
|
-
if (labelValue.length <= 0) {
|
|
530
|
-
throw new Error("Empty value provided for input HTTP label: ProposalId.");
|
|
531
|
-
}
|
|
532
|
-
resolvedPath = resolvedPath.replace("{ProposalId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
533
|
-
}
|
|
534
|
-
else {
|
|
535
|
-
throw new Error("No value provided for input HTTP label: ProposalId.");
|
|
536
|
-
}
|
|
537
|
-
const query = {
|
|
538
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
539
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
540
|
-
};
|
|
364
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
365
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
|
|
366
|
+
const query = map({
|
|
367
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
368
|
+
nextToken: [, input.NextToken],
|
|
369
|
+
});
|
|
541
370
|
let body;
|
|
542
371
|
return new protocol_http_1.HttpRequest({
|
|
543
372
|
protocol,
|
|
@@ -555,16 +384,7 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
555
384
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
556
385
|
const headers = {};
|
|
557
386
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
558
|
-
|
|
559
|
-
const labelValue = input.ResourceArn;
|
|
560
|
-
if (labelValue.length <= 0) {
|
|
561
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
562
|
-
}
|
|
563
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
564
|
-
}
|
|
565
|
-
else {
|
|
566
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
567
|
-
}
|
|
387
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
568
388
|
let body;
|
|
569
389
|
return new protocol_http_1.HttpRequest({
|
|
570
390
|
protocol,
|
|
@@ -581,16 +401,7 @@ const serializeAws_restJson1RejectInvitationCommand = async (input, context) =>
|
|
|
581
401
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
582
402
|
const headers = {};
|
|
583
403
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/{InvitationId}";
|
|
584
|
-
|
|
585
|
-
const labelValue = input.InvitationId;
|
|
586
|
-
if (labelValue.length <= 0) {
|
|
587
|
-
throw new Error("Empty value provided for input HTTP label: InvitationId.");
|
|
588
|
-
}
|
|
589
|
-
resolvedPath = resolvedPath.replace("{InvitationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
590
|
-
}
|
|
591
|
-
else {
|
|
592
|
-
throw new Error("No value provided for input HTTP label: InvitationId.");
|
|
593
|
-
}
|
|
404
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InvitationId", () => input.InvitationId, "{InvitationId}", false);
|
|
594
405
|
let body;
|
|
595
406
|
return new protocol_http_1.HttpRequest({
|
|
596
407
|
protocol,
|
|
@@ -609,16 +420,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
609
420
|
"content-type": "application/json",
|
|
610
421
|
};
|
|
611
422
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
612
|
-
|
|
613
|
-
const labelValue = input.ResourceArn;
|
|
614
|
-
if (labelValue.length <= 0) {
|
|
615
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
616
|
-
}
|
|
617
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
618
|
-
}
|
|
619
|
-
else {
|
|
620
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
621
|
-
}
|
|
423
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
622
424
|
let body;
|
|
623
425
|
body = JSON.stringify({
|
|
624
426
|
...(input.Tags != null && { Tags: serializeAws_restJson1InputTagMap(input.Tags, context) }),
|
|
@@ -638,19 +440,10 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
638
440
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
639
441
|
const headers = {};
|
|
640
442
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
}
|
|
646
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
647
|
-
}
|
|
648
|
-
else {
|
|
649
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
650
|
-
}
|
|
651
|
-
const query = {
|
|
652
|
-
...(input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map((_entry) => _entry) }),
|
|
653
|
-
};
|
|
443
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
444
|
+
const query = map({
|
|
445
|
+
tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],
|
|
446
|
+
});
|
|
654
447
|
let body;
|
|
655
448
|
return new protocol_http_1.HttpRequest({
|
|
656
449
|
protocol,
|
|
@@ -670,26 +463,8 @@ const serializeAws_restJson1UpdateMemberCommand = async (input, context) => {
|
|
|
670
463
|
"content-type": "application/json",
|
|
671
464
|
};
|
|
672
465
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
if (labelValue.length <= 0) {
|
|
676
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
677
|
-
}
|
|
678
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
679
|
-
}
|
|
680
|
-
else {
|
|
681
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
682
|
-
}
|
|
683
|
-
if (input.MemberId !== undefined) {
|
|
684
|
-
const labelValue = input.MemberId;
|
|
685
|
-
if (labelValue.length <= 0) {
|
|
686
|
-
throw new Error("Empty value provided for input HTTP label: MemberId.");
|
|
687
|
-
}
|
|
688
|
-
resolvedPath = resolvedPath.replace("{MemberId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
689
|
-
}
|
|
690
|
-
else {
|
|
691
|
-
throw new Error("No value provided for input HTTP label: MemberId.");
|
|
692
|
-
}
|
|
466
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
467
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
|
|
693
468
|
let body;
|
|
694
469
|
body = JSON.stringify({
|
|
695
470
|
...(input.LogPublishingConfiguration != null && {
|
|
@@ -713,26 +488,8 @@ const serializeAws_restJson1UpdateNodeCommand = async (input, context) => {
|
|
|
713
488
|
"content-type": "application/json",
|
|
714
489
|
};
|
|
715
490
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
if (labelValue.length <= 0) {
|
|
719
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
720
|
-
}
|
|
721
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
722
|
-
}
|
|
723
|
-
else {
|
|
724
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
725
|
-
}
|
|
726
|
-
if (input.NodeId !== undefined) {
|
|
727
|
-
const labelValue = input.NodeId;
|
|
728
|
-
if (labelValue.length <= 0) {
|
|
729
|
-
throw new Error("Empty value provided for input HTTP label: NodeId.");
|
|
730
|
-
}
|
|
731
|
-
resolvedPath = resolvedPath.replace("{NodeId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
732
|
-
}
|
|
733
|
-
else {
|
|
734
|
-
throw new Error("No value provided for input HTTP label: NodeId.");
|
|
735
|
-
}
|
|
491
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
492
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
|
|
736
493
|
let body;
|
|
737
494
|
body = JSON.stringify({
|
|
738
495
|
...(input.LogPublishingConfiguration != null && {
|
|
@@ -758,26 +515,8 @@ const serializeAws_restJson1VoteOnProposalCommand = async (input, context) => {
|
|
|
758
515
|
};
|
|
759
516
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
760
517
|
"/networks/{NetworkId}/proposals/{ProposalId}/votes";
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
if (labelValue.length <= 0) {
|
|
764
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
765
|
-
}
|
|
766
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
767
|
-
}
|
|
768
|
-
else {
|
|
769
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
770
|
-
}
|
|
771
|
-
if (input.ProposalId !== undefined) {
|
|
772
|
-
const labelValue = input.ProposalId;
|
|
773
|
-
if (labelValue.length <= 0) {
|
|
774
|
-
throw new Error("Empty value provided for input HTTP label: ProposalId.");
|
|
775
|
-
}
|
|
776
|
-
resolvedPath = resolvedPath.replace("{ProposalId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
777
|
-
}
|
|
778
|
-
else {
|
|
779
|
-
throw new Error("No value provided for input HTTP label: ProposalId.");
|
|
780
|
-
}
|
|
518
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
|
|
519
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
|
|
781
520
|
let body;
|
|
782
521
|
body = JSON.stringify({
|
|
783
522
|
...(input.Vote != null && { Vote: input.Vote }),
|
|
@@ -798,15 +537,14 @@ const deserializeAws_restJson1CreateMemberCommand = async (output, context) => {
|
|
|
798
537
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
799
538
|
return deserializeAws_restJson1CreateMemberCommandError(output, context);
|
|
800
539
|
}
|
|
801
|
-
const contents = {
|
|
540
|
+
const contents = map({
|
|
802
541
|
$metadata: deserializeMetadata(output),
|
|
803
|
-
|
|
804
|
-
};
|
|
542
|
+
});
|
|
805
543
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
806
|
-
if (data.MemberId
|
|
544
|
+
if (data.MemberId != null) {
|
|
807
545
|
contents.MemberId = (0, smithy_client_1.expectString)(data.MemberId);
|
|
808
546
|
}
|
|
809
|
-
return
|
|
547
|
+
return contents;
|
|
810
548
|
};
|
|
811
549
|
exports.deserializeAws_restJson1CreateMemberCommand = deserializeAws_restJson1CreateMemberCommand;
|
|
812
550
|
const deserializeAws_restJson1CreateMemberCommandError = async (output, context) => {
|
|
@@ -814,7 +552,6 @@ const deserializeAws_restJson1CreateMemberCommandError = async (output, context)
|
|
|
814
552
|
...output,
|
|
815
553
|
body: await parseBody(output.body, context),
|
|
816
554
|
};
|
|
817
|
-
let response;
|
|
818
555
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
819
556
|
switch (errorCode) {
|
|
820
557
|
case "AccessDeniedException":
|
|
@@ -846,33 +583,29 @@ const deserializeAws_restJson1CreateMemberCommandError = async (output, context)
|
|
|
846
583
|
throw await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
847
584
|
default:
|
|
848
585
|
const parsedBody = parsedOutput.body;
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
$metadata,
|
|
586
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
587
|
+
output,
|
|
588
|
+
parsedBody,
|
|
589
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
590
|
+
errorCode,
|
|
855
591
|
});
|
|
856
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
857
592
|
}
|
|
858
593
|
};
|
|
859
594
|
const deserializeAws_restJson1CreateNetworkCommand = async (output, context) => {
|
|
860
595
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
861
596
|
return deserializeAws_restJson1CreateNetworkCommandError(output, context);
|
|
862
597
|
}
|
|
863
|
-
const contents = {
|
|
598
|
+
const contents = map({
|
|
864
599
|
$metadata: deserializeMetadata(output),
|
|
865
|
-
|
|
866
|
-
NetworkId: undefined,
|
|
867
|
-
};
|
|
600
|
+
});
|
|
868
601
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
869
|
-
if (data.MemberId
|
|
602
|
+
if (data.MemberId != null) {
|
|
870
603
|
contents.MemberId = (0, smithy_client_1.expectString)(data.MemberId);
|
|
871
604
|
}
|
|
872
|
-
if (data.NetworkId
|
|
605
|
+
if (data.NetworkId != null) {
|
|
873
606
|
contents.NetworkId = (0, smithy_client_1.expectString)(data.NetworkId);
|
|
874
607
|
}
|
|
875
|
-
return
|
|
608
|
+
return contents;
|
|
876
609
|
};
|
|
877
610
|
exports.deserializeAws_restJson1CreateNetworkCommand = deserializeAws_restJson1CreateNetworkCommand;
|
|
878
611
|
const deserializeAws_restJson1CreateNetworkCommandError = async (output, context) => {
|
|
@@ -880,7 +613,6 @@ const deserializeAws_restJson1CreateNetworkCommandError = async (output, context
|
|
|
880
613
|
...output,
|
|
881
614
|
body: await parseBody(output.body, context),
|
|
882
615
|
};
|
|
883
|
-
let response;
|
|
884
616
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
885
617
|
switch (errorCode) {
|
|
886
618
|
case "AccessDeniedException":
|
|
@@ -906,29 +638,26 @@ const deserializeAws_restJson1CreateNetworkCommandError = async (output, context
|
|
|
906
638
|
throw await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
907
639
|
default:
|
|
908
640
|
const parsedBody = parsedOutput.body;
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
$metadata,
|
|
641
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
642
|
+
output,
|
|
643
|
+
parsedBody,
|
|
644
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
645
|
+
errorCode,
|
|
915
646
|
});
|
|
916
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
917
647
|
}
|
|
918
648
|
};
|
|
919
649
|
const deserializeAws_restJson1CreateNodeCommand = async (output, context) => {
|
|
920
650
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
921
651
|
return deserializeAws_restJson1CreateNodeCommandError(output, context);
|
|
922
652
|
}
|
|
923
|
-
const contents = {
|
|
653
|
+
const contents = map({
|
|
924
654
|
$metadata: deserializeMetadata(output),
|
|
925
|
-
|
|
926
|
-
};
|
|
655
|
+
});
|
|
927
656
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
928
|
-
if (data.NodeId
|
|
657
|
+
if (data.NodeId != null) {
|
|
929
658
|
contents.NodeId = (0, smithy_client_1.expectString)(data.NodeId);
|
|
930
659
|
}
|
|
931
|
-
return
|
|
660
|
+
return contents;
|
|
932
661
|
};
|
|
933
662
|
exports.deserializeAws_restJson1CreateNodeCommand = deserializeAws_restJson1CreateNodeCommand;
|
|
934
663
|
const deserializeAws_restJson1CreateNodeCommandError = async (output, context) => {
|
|
@@ -936,7 +665,6 @@ const deserializeAws_restJson1CreateNodeCommandError = async (output, context) =
|
|
|
936
665
|
...output,
|
|
937
666
|
body: await parseBody(output.body, context),
|
|
938
667
|
};
|
|
939
|
-
let response;
|
|
940
668
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
941
669
|
switch (errorCode) {
|
|
942
670
|
case "AccessDeniedException":
|
|
@@ -968,29 +696,26 @@ const deserializeAws_restJson1CreateNodeCommandError = async (output, context) =
|
|
|
968
696
|
throw await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
969
697
|
default:
|
|
970
698
|
const parsedBody = parsedOutput.body;
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
$metadata,
|
|
699
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
700
|
+
output,
|
|
701
|
+
parsedBody,
|
|
702
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
703
|
+
errorCode,
|
|
977
704
|
});
|
|
978
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
979
705
|
}
|
|
980
706
|
};
|
|
981
707
|
const deserializeAws_restJson1CreateProposalCommand = async (output, context) => {
|
|
982
708
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
983
709
|
return deserializeAws_restJson1CreateProposalCommandError(output, context);
|
|
984
710
|
}
|
|
985
|
-
const contents = {
|
|
711
|
+
const contents = map({
|
|
986
712
|
$metadata: deserializeMetadata(output),
|
|
987
|
-
|
|
988
|
-
};
|
|
713
|
+
});
|
|
989
714
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
990
|
-
if (data.ProposalId
|
|
715
|
+
if (data.ProposalId != null) {
|
|
991
716
|
contents.ProposalId = (0, smithy_client_1.expectString)(data.ProposalId);
|
|
992
717
|
}
|
|
993
|
-
return
|
|
718
|
+
return contents;
|
|
994
719
|
};
|
|
995
720
|
exports.deserializeAws_restJson1CreateProposalCommand = deserializeAws_restJson1CreateProposalCommand;
|
|
996
721
|
const deserializeAws_restJson1CreateProposalCommandError = async (output, context) => {
|
|
@@ -998,7 +723,6 @@ const deserializeAws_restJson1CreateProposalCommandError = async (output, contex
|
|
|
998
723
|
...output,
|
|
999
724
|
body: await parseBody(output.body, context),
|
|
1000
725
|
};
|
|
1001
|
-
let response;
|
|
1002
726
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1003
727
|
switch (errorCode) {
|
|
1004
728
|
case "AccessDeniedException":
|
|
@@ -1024,25 +748,23 @@ const deserializeAws_restJson1CreateProposalCommandError = async (output, contex
|
|
|
1024
748
|
throw await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
1025
749
|
default:
|
|
1026
750
|
const parsedBody = parsedOutput.body;
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
$metadata,
|
|
751
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
752
|
+
output,
|
|
753
|
+
parsedBody,
|
|
754
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
755
|
+
errorCode,
|
|
1033
756
|
});
|
|
1034
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1035
757
|
}
|
|
1036
758
|
};
|
|
1037
759
|
const deserializeAws_restJson1DeleteMemberCommand = async (output, context) => {
|
|
1038
760
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1039
761
|
return deserializeAws_restJson1DeleteMemberCommandError(output, context);
|
|
1040
762
|
}
|
|
1041
|
-
const contents = {
|
|
763
|
+
const contents = map({
|
|
1042
764
|
$metadata: deserializeMetadata(output),
|
|
1043
|
-
};
|
|
765
|
+
});
|
|
1044
766
|
await collectBody(output.body, context);
|
|
1045
|
-
return
|
|
767
|
+
return contents;
|
|
1046
768
|
};
|
|
1047
769
|
exports.deserializeAws_restJson1DeleteMemberCommand = deserializeAws_restJson1DeleteMemberCommand;
|
|
1048
770
|
const deserializeAws_restJson1DeleteMemberCommandError = async (output, context) => {
|
|
@@ -1050,7 +772,6 @@ const deserializeAws_restJson1DeleteMemberCommandError = async (output, context)
|
|
|
1050
772
|
...output,
|
|
1051
773
|
body: await parseBody(output.body, context),
|
|
1052
774
|
};
|
|
1053
|
-
let response;
|
|
1054
775
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1055
776
|
switch (errorCode) {
|
|
1056
777
|
case "AccessDeniedException":
|
|
@@ -1073,25 +794,23 @@ const deserializeAws_restJson1DeleteMemberCommandError = async (output, context)
|
|
|
1073
794
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1074
795
|
default:
|
|
1075
796
|
const parsedBody = parsedOutput.body;
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
$metadata,
|
|
797
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
798
|
+
output,
|
|
799
|
+
parsedBody,
|
|
800
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
801
|
+
errorCode,
|
|
1082
802
|
});
|
|
1083
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1084
803
|
}
|
|
1085
804
|
};
|
|
1086
805
|
const deserializeAws_restJson1DeleteNodeCommand = async (output, context) => {
|
|
1087
806
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1088
807
|
return deserializeAws_restJson1DeleteNodeCommandError(output, context);
|
|
1089
808
|
}
|
|
1090
|
-
const contents = {
|
|
809
|
+
const contents = map({
|
|
1091
810
|
$metadata: deserializeMetadata(output),
|
|
1092
|
-
};
|
|
811
|
+
});
|
|
1093
812
|
await collectBody(output.body, context);
|
|
1094
|
-
return
|
|
813
|
+
return contents;
|
|
1095
814
|
};
|
|
1096
815
|
exports.deserializeAws_restJson1DeleteNodeCommand = deserializeAws_restJson1DeleteNodeCommand;
|
|
1097
816
|
const deserializeAws_restJson1DeleteNodeCommandError = async (output, context) => {
|
|
@@ -1099,7 +818,6 @@ const deserializeAws_restJson1DeleteNodeCommandError = async (output, context) =
|
|
|
1099
818
|
...output,
|
|
1100
819
|
body: await parseBody(output.body, context),
|
|
1101
820
|
};
|
|
1102
|
-
let response;
|
|
1103
821
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1104
822
|
switch (errorCode) {
|
|
1105
823
|
case "AccessDeniedException":
|
|
@@ -1122,29 +840,26 @@ const deserializeAws_restJson1DeleteNodeCommandError = async (output, context) =
|
|
|
1122
840
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1123
841
|
default:
|
|
1124
842
|
const parsedBody = parsedOutput.body;
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
$metadata,
|
|
843
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
844
|
+
output,
|
|
845
|
+
parsedBody,
|
|
846
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
847
|
+
errorCode,
|
|
1131
848
|
});
|
|
1132
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1133
849
|
}
|
|
1134
850
|
};
|
|
1135
851
|
const deserializeAws_restJson1GetMemberCommand = async (output, context) => {
|
|
1136
852
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1137
853
|
return deserializeAws_restJson1GetMemberCommandError(output, context);
|
|
1138
854
|
}
|
|
1139
|
-
const contents = {
|
|
855
|
+
const contents = map({
|
|
1140
856
|
$metadata: deserializeMetadata(output),
|
|
1141
|
-
|
|
1142
|
-
};
|
|
857
|
+
});
|
|
1143
858
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1144
|
-
if (data.Member
|
|
859
|
+
if (data.Member != null) {
|
|
1145
860
|
contents.Member = deserializeAws_restJson1Member(data.Member, context);
|
|
1146
861
|
}
|
|
1147
|
-
return
|
|
862
|
+
return contents;
|
|
1148
863
|
};
|
|
1149
864
|
exports.deserializeAws_restJson1GetMemberCommand = deserializeAws_restJson1GetMemberCommand;
|
|
1150
865
|
const deserializeAws_restJson1GetMemberCommandError = async (output, context) => {
|
|
@@ -1152,7 +867,6 @@ const deserializeAws_restJson1GetMemberCommandError = async (output, context) =>
|
|
|
1152
867
|
...output,
|
|
1153
868
|
body: await parseBody(output.body, context),
|
|
1154
869
|
};
|
|
1155
|
-
let response;
|
|
1156
870
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1157
871
|
switch (errorCode) {
|
|
1158
872
|
case "AccessDeniedException":
|
|
@@ -1172,29 +886,26 @@ const deserializeAws_restJson1GetMemberCommandError = async (output, context) =>
|
|
|
1172
886
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1173
887
|
default:
|
|
1174
888
|
const parsedBody = parsedOutput.body;
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
$metadata,
|
|
889
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
890
|
+
output,
|
|
891
|
+
parsedBody,
|
|
892
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
893
|
+
errorCode,
|
|
1181
894
|
});
|
|
1182
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1183
895
|
}
|
|
1184
896
|
};
|
|
1185
897
|
const deserializeAws_restJson1GetNetworkCommand = async (output, context) => {
|
|
1186
898
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1187
899
|
return deserializeAws_restJson1GetNetworkCommandError(output, context);
|
|
1188
900
|
}
|
|
1189
|
-
const contents = {
|
|
901
|
+
const contents = map({
|
|
1190
902
|
$metadata: deserializeMetadata(output),
|
|
1191
|
-
|
|
1192
|
-
};
|
|
903
|
+
});
|
|
1193
904
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1194
|
-
if (data.Network
|
|
905
|
+
if (data.Network != null) {
|
|
1195
906
|
contents.Network = deserializeAws_restJson1Network(data.Network, context);
|
|
1196
907
|
}
|
|
1197
|
-
return
|
|
908
|
+
return contents;
|
|
1198
909
|
};
|
|
1199
910
|
exports.deserializeAws_restJson1GetNetworkCommand = deserializeAws_restJson1GetNetworkCommand;
|
|
1200
911
|
const deserializeAws_restJson1GetNetworkCommandError = async (output, context) => {
|
|
@@ -1202,7 +913,6 @@ const deserializeAws_restJson1GetNetworkCommandError = async (output, context) =
|
|
|
1202
913
|
...output,
|
|
1203
914
|
body: await parseBody(output.body, context),
|
|
1204
915
|
};
|
|
1205
|
-
let response;
|
|
1206
916
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1207
917
|
switch (errorCode) {
|
|
1208
918
|
case "AccessDeniedException":
|
|
@@ -1222,29 +932,26 @@ const deserializeAws_restJson1GetNetworkCommandError = async (output, context) =
|
|
|
1222
932
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1223
933
|
default:
|
|
1224
934
|
const parsedBody = parsedOutput.body;
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
$metadata,
|
|
935
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
936
|
+
output,
|
|
937
|
+
parsedBody,
|
|
938
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
939
|
+
errorCode,
|
|
1231
940
|
});
|
|
1232
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1233
941
|
}
|
|
1234
942
|
};
|
|
1235
943
|
const deserializeAws_restJson1GetNodeCommand = async (output, context) => {
|
|
1236
944
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1237
945
|
return deserializeAws_restJson1GetNodeCommandError(output, context);
|
|
1238
946
|
}
|
|
1239
|
-
const contents = {
|
|
947
|
+
const contents = map({
|
|
1240
948
|
$metadata: deserializeMetadata(output),
|
|
1241
|
-
|
|
1242
|
-
};
|
|
949
|
+
});
|
|
1243
950
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1244
|
-
if (data.Node
|
|
951
|
+
if (data.Node != null) {
|
|
1245
952
|
contents.Node = deserializeAws_restJson1Node(data.Node, context);
|
|
1246
953
|
}
|
|
1247
|
-
return
|
|
954
|
+
return contents;
|
|
1248
955
|
};
|
|
1249
956
|
exports.deserializeAws_restJson1GetNodeCommand = deserializeAws_restJson1GetNodeCommand;
|
|
1250
957
|
const deserializeAws_restJson1GetNodeCommandError = async (output, context) => {
|
|
@@ -1252,7 +959,6 @@ const deserializeAws_restJson1GetNodeCommandError = async (output, context) => {
|
|
|
1252
959
|
...output,
|
|
1253
960
|
body: await parseBody(output.body, context),
|
|
1254
961
|
};
|
|
1255
|
-
let response;
|
|
1256
962
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1257
963
|
switch (errorCode) {
|
|
1258
964
|
case "AccessDeniedException":
|
|
@@ -1272,29 +978,26 @@ const deserializeAws_restJson1GetNodeCommandError = async (output, context) => {
|
|
|
1272
978
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1273
979
|
default:
|
|
1274
980
|
const parsedBody = parsedOutput.body;
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
$metadata,
|
|
981
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
982
|
+
output,
|
|
983
|
+
parsedBody,
|
|
984
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
985
|
+
errorCode,
|
|
1281
986
|
});
|
|
1282
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1283
987
|
}
|
|
1284
988
|
};
|
|
1285
989
|
const deserializeAws_restJson1GetProposalCommand = async (output, context) => {
|
|
1286
990
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1287
991
|
return deserializeAws_restJson1GetProposalCommandError(output, context);
|
|
1288
992
|
}
|
|
1289
|
-
const contents = {
|
|
993
|
+
const contents = map({
|
|
1290
994
|
$metadata: deserializeMetadata(output),
|
|
1291
|
-
|
|
1292
|
-
};
|
|
995
|
+
});
|
|
1293
996
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1294
|
-
if (data.Proposal
|
|
997
|
+
if (data.Proposal != null) {
|
|
1295
998
|
contents.Proposal = deserializeAws_restJson1Proposal(data.Proposal, context);
|
|
1296
999
|
}
|
|
1297
|
-
return
|
|
1000
|
+
return contents;
|
|
1298
1001
|
};
|
|
1299
1002
|
exports.deserializeAws_restJson1GetProposalCommand = deserializeAws_restJson1GetProposalCommand;
|
|
1300
1003
|
const deserializeAws_restJson1GetProposalCommandError = async (output, context) => {
|
|
@@ -1302,7 +1005,6 @@ const deserializeAws_restJson1GetProposalCommandError = async (output, context)
|
|
|
1302
1005
|
...output,
|
|
1303
1006
|
body: await parseBody(output.body, context),
|
|
1304
1007
|
};
|
|
1305
|
-
let response;
|
|
1306
1008
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1307
1009
|
switch (errorCode) {
|
|
1308
1010
|
case "AccessDeniedException":
|
|
@@ -1322,33 +1024,29 @@ const deserializeAws_restJson1GetProposalCommandError = async (output, context)
|
|
|
1322
1024
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1323
1025
|
default:
|
|
1324
1026
|
const parsedBody = parsedOutput.body;
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
$metadata,
|
|
1027
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1028
|
+
output,
|
|
1029
|
+
parsedBody,
|
|
1030
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1031
|
+
errorCode,
|
|
1331
1032
|
});
|
|
1332
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1333
1033
|
}
|
|
1334
1034
|
};
|
|
1335
1035
|
const deserializeAws_restJson1ListInvitationsCommand = async (output, context) => {
|
|
1336
1036
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1337
1037
|
return deserializeAws_restJson1ListInvitationsCommandError(output, context);
|
|
1338
1038
|
}
|
|
1339
|
-
const contents = {
|
|
1039
|
+
const contents = map({
|
|
1340
1040
|
$metadata: deserializeMetadata(output),
|
|
1341
|
-
|
|
1342
|
-
NextToken: undefined,
|
|
1343
|
-
};
|
|
1041
|
+
});
|
|
1344
1042
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1345
|
-
if (data.Invitations
|
|
1043
|
+
if (data.Invitations != null) {
|
|
1346
1044
|
contents.Invitations = deserializeAws_restJson1InvitationList(data.Invitations, context);
|
|
1347
1045
|
}
|
|
1348
|
-
if (data.NextToken
|
|
1046
|
+
if (data.NextToken != null) {
|
|
1349
1047
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
1350
1048
|
}
|
|
1351
|
-
return
|
|
1049
|
+
return contents;
|
|
1352
1050
|
};
|
|
1353
1051
|
exports.deserializeAws_restJson1ListInvitationsCommand = deserializeAws_restJson1ListInvitationsCommand;
|
|
1354
1052
|
const deserializeAws_restJson1ListInvitationsCommandError = async (output, context) => {
|
|
@@ -1356,7 +1054,6 @@ const deserializeAws_restJson1ListInvitationsCommandError = async (output, conte
|
|
|
1356
1054
|
...output,
|
|
1357
1055
|
body: await parseBody(output.body, context),
|
|
1358
1056
|
};
|
|
1359
|
-
let response;
|
|
1360
1057
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1361
1058
|
switch (errorCode) {
|
|
1362
1059
|
case "AccessDeniedException":
|
|
@@ -1379,33 +1076,29 @@ const deserializeAws_restJson1ListInvitationsCommandError = async (output, conte
|
|
|
1379
1076
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1380
1077
|
default:
|
|
1381
1078
|
const parsedBody = parsedOutput.body;
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
$metadata,
|
|
1079
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1080
|
+
output,
|
|
1081
|
+
parsedBody,
|
|
1082
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1083
|
+
errorCode,
|
|
1388
1084
|
});
|
|
1389
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1390
1085
|
}
|
|
1391
1086
|
};
|
|
1392
1087
|
const deserializeAws_restJson1ListMembersCommand = async (output, context) => {
|
|
1393
1088
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1394
1089
|
return deserializeAws_restJson1ListMembersCommandError(output, context);
|
|
1395
1090
|
}
|
|
1396
|
-
const contents = {
|
|
1091
|
+
const contents = map({
|
|
1397
1092
|
$metadata: deserializeMetadata(output),
|
|
1398
|
-
|
|
1399
|
-
NextToken: undefined,
|
|
1400
|
-
};
|
|
1093
|
+
});
|
|
1401
1094
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1402
|
-
if (data.Members
|
|
1095
|
+
if (data.Members != null) {
|
|
1403
1096
|
contents.Members = deserializeAws_restJson1MemberSummaryList(data.Members, context);
|
|
1404
1097
|
}
|
|
1405
|
-
if (data.NextToken
|
|
1098
|
+
if (data.NextToken != null) {
|
|
1406
1099
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
1407
1100
|
}
|
|
1408
|
-
return
|
|
1101
|
+
return contents;
|
|
1409
1102
|
};
|
|
1410
1103
|
exports.deserializeAws_restJson1ListMembersCommand = deserializeAws_restJson1ListMembersCommand;
|
|
1411
1104
|
const deserializeAws_restJson1ListMembersCommandError = async (output, context) => {
|
|
@@ -1413,7 +1106,6 @@ const deserializeAws_restJson1ListMembersCommandError = async (output, context)
|
|
|
1413
1106
|
...output,
|
|
1414
1107
|
body: await parseBody(output.body, context),
|
|
1415
1108
|
};
|
|
1416
|
-
let response;
|
|
1417
1109
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1418
1110
|
switch (errorCode) {
|
|
1419
1111
|
case "AccessDeniedException":
|
|
@@ -1430,33 +1122,29 @@ const deserializeAws_restJson1ListMembersCommandError = async (output, context)
|
|
|
1430
1122
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1431
1123
|
default:
|
|
1432
1124
|
const parsedBody = parsedOutput.body;
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
$metadata,
|
|
1125
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1126
|
+
output,
|
|
1127
|
+
parsedBody,
|
|
1128
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1129
|
+
errorCode,
|
|
1439
1130
|
});
|
|
1440
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1441
1131
|
}
|
|
1442
1132
|
};
|
|
1443
1133
|
const deserializeAws_restJson1ListNetworksCommand = async (output, context) => {
|
|
1444
1134
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1445
1135
|
return deserializeAws_restJson1ListNetworksCommandError(output, context);
|
|
1446
1136
|
}
|
|
1447
|
-
const contents = {
|
|
1137
|
+
const contents = map({
|
|
1448
1138
|
$metadata: deserializeMetadata(output),
|
|
1449
|
-
|
|
1450
|
-
NextToken: undefined,
|
|
1451
|
-
};
|
|
1139
|
+
});
|
|
1452
1140
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1453
|
-
if (data.Networks
|
|
1141
|
+
if (data.Networks != null) {
|
|
1454
1142
|
contents.Networks = deserializeAws_restJson1NetworkSummaryList(data.Networks, context);
|
|
1455
1143
|
}
|
|
1456
|
-
if (data.NextToken
|
|
1144
|
+
if (data.NextToken != null) {
|
|
1457
1145
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
1458
1146
|
}
|
|
1459
|
-
return
|
|
1147
|
+
return contents;
|
|
1460
1148
|
};
|
|
1461
1149
|
exports.deserializeAws_restJson1ListNetworksCommand = deserializeAws_restJson1ListNetworksCommand;
|
|
1462
1150
|
const deserializeAws_restJson1ListNetworksCommandError = async (output, context) => {
|
|
@@ -1464,7 +1152,6 @@ const deserializeAws_restJson1ListNetworksCommandError = async (output, context)
|
|
|
1464
1152
|
...output,
|
|
1465
1153
|
body: await parseBody(output.body, context),
|
|
1466
1154
|
};
|
|
1467
|
-
let response;
|
|
1468
1155
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1469
1156
|
switch (errorCode) {
|
|
1470
1157
|
case "AccessDeniedException":
|
|
@@ -1481,33 +1168,29 @@ const deserializeAws_restJson1ListNetworksCommandError = async (output, context)
|
|
|
1481
1168
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1482
1169
|
default:
|
|
1483
1170
|
const parsedBody = parsedOutput.body;
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
$metadata,
|
|
1171
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1172
|
+
output,
|
|
1173
|
+
parsedBody,
|
|
1174
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1175
|
+
errorCode,
|
|
1490
1176
|
});
|
|
1491
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1492
1177
|
}
|
|
1493
1178
|
};
|
|
1494
1179
|
const deserializeAws_restJson1ListNodesCommand = async (output, context) => {
|
|
1495
1180
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1496
1181
|
return deserializeAws_restJson1ListNodesCommandError(output, context);
|
|
1497
1182
|
}
|
|
1498
|
-
const contents = {
|
|
1183
|
+
const contents = map({
|
|
1499
1184
|
$metadata: deserializeMetadata(output),
|
|
1500
|
-
|
|
1501
|
-
Nodes: undefined,
|
|
1502
|
-
};
|
|
1185
|
+
});
|
|
1503
1186
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1504
|
-
if (data.NextToken
|
|
1187
|
+
if (data.NextToken != null) {
|
|
1505
1188
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
1506
1189
|
}
|
|
1507
|
-
if (data.Nodes
|
|
1190
|
+
if (data.Nodes != null) {
|
|
1508
1191
|
contents.Nodes = deserializeAws_restJson1NodeSummaryList(data.Nodes, context);
|
|
1509
1192
|
}
|
|
1510
|
-
return
|
|
1193
|
+
return contents;
|
|
1511
1194
|
};
|
|
1512
1195
|
exports.deserializeAws_restJson1ListNodesCommand = deserializeAws_restJson1ListNodesCommand;
|
|
1513
1196
|
const deserializeAws_restJson1ListNodesCommandError = async (output, context) => {
|
|
@@ -1515,7 +1198,6 @@ const deserializeAws_restJson1ListNodesCommandError = async (output, context) =>
|
|
|
1515
1198
|
...output,
|
|
1516
1199
|
body: await parseBody(output.body, context),
|
|
1517
1200
|
};
|
|
1518
|
-
let response;
|
|
1519
1201
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1520
1202
|
switch (errorCode) {
|
|
1521
1203
|
case "AccessDeniedException":
|
|
@@ -1532,33 +1214,29 @@ const deserializeAws_restJson1ListNodesCommandError = async (output, context) =>
|
|
|
1532
1214
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1533
1215
|
default:
|
|
1534
1216
|
const parsedBody = parsedOutput.body;
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
$metadata,
|
|
1217
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1218
|
+
output,
|
|
1219
|
+
parsedBody,
|
|
1220
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1221
|
+
errorCode,
|
|
1541
1222
|
});
|
|
1542
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1543
1223
|
}
|
|
1544
1224
|
};
|
|
1545
1225
|
const deserializeAws_restJson1ListProposalsCommand = async (output, context) => {
|
|
1546
1226
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1547
1227
|
return deserializeAws_restJson1ListProposalsCommandError(output, context);
|
|
1548
1228
|
}
|
|
1549
|
-
const contents = {
|
|
1229
|
+
const contents = map({
|
|
1550
1230
|
$metadata: deserializeMetadata(output),
|
|
1551
|
-
|
|
1552
|
-
Proposals: undefined,
|
|
1553
|
-
};
|
|
1231
|
+
});
|
|
1554
1232
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1555
|
-
if (data.NextToken
|
|
1233
|
+
if (data.NextToken != null) {
|
|
1556
1234
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
1557
1235
|
}
|
|
1558
|
-
if (data.Proposals
|
|
1236
|
+
if (data.Proposals != null) {
|
|
1559
1237
|
contents.Proposals = deserializeAws_restJson1ProposalSummaryList(data.Proposals, context);
|
|
1560
1238
|
}
|
|
1561
|
-
return
|
|
1239
|
+
return contents;
|
|
1562
1240
|
};
|
|
1563
1241
|
exports.deserializeAws_restJson1ListProposalsCommand = deserializeAws_restJson1ListProposalsCommand;
|
|
1564
1242
|
const deserializeAws_restJson1ListProposalsCommandError = async (output, context) => {
|
|
@@ -1566,7 +1244,6 @@ const deserializeAws_restJson1ListProposalsCommandError = async (output, context
|
|
|
1566
1244
|
...output,
|
|
1567
1245
|
body: await parseBody(output.body, context),
|
|
1568
1246
|
};
|
|
1569
|
-
let response;
|
|
1570
1247
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1571
1248
|
switch (errorCode) {
|
|
1572
1249
|
case "AccessDeniedException":
|
|
@@ -1586,33 +1263,29 @@ const deserializeAws_restJson1ListProposalsCommandError = async (output, context
|
|
|
1586
1263
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1587
1264
|
default:
|
|
1588
1265
|
const parsedBody = parsedOutput.body;
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
$metadata,
|
|
1266
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1267
|
+
output,
|
|
1268
|
+
parsedBody,
|
|
1269
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1270
|
+
errorCode,
|
|
1595
1271
|
});
|
|
1596
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1597
1272
|
}
|
|
1598
1273
|
};
|
|
1599
1274
|
const deserializeAws_restJson1ListProposalVotesCommand = async (output, context) => {
|
|
1600
1275
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1601
1276
|
return deserializeAws_restJson1ListProposalVotesCommandError(output, context);
|
|
1602
1277
|
}
|
|
1603
|
-
const contents = {
|
|
1278
|
+
const contents = map({
|
|
1604
1279
|
$metadata: deserializeMetadata(output),
|
|
1605
|
-
|
|
1606
|
-
ProposalVotes: undefined,
|
|
1607
|
-
};
|
|
1280
|
+
});
|
|
1608
1281
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1609
|
-
if (data.NextToken
|
|
1282
|
+
if (data.NextToken != null) {
|
|
1610
1283
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
1611
1284
|
}
|
|
1612
|
-
if (data.ProposalVotes
|
|
1285
|
+
if (data.ProposalVotes != null) {
|
|
1613
1286
|
contents.ProposalVotes = deserializeAws_restJson1ProposalVoteList(data.ProposalVotes, context);
|
|
1614
1287
|
}
|
|
1615
|
-
return
|
|
1288
|
+
return contents;
|
|
1616
1289
|
};
|
|
1617
1290
|
exports.deserializeAws_restJson1ListProposalVotesCommand = deserializeAws_restJson1ListProposalVotesCommand;
|
|
1618
1291
|
const deserializeAws_restJson1ListProposalVotesCommandError = async (output, context) => {
|
|
@@ -1620,7 +1293,6 @@ const deserializeAws_restJson1ListProposalVotesCommandError = async (output, con
|
|
|
1620
1293
|
...output,
|
|
1621
1294
|
body: await parseBody(output.body, context),
|
|
1622
1295
|
};
|
|
1623
|
-
let response;
|
|
1624
1296
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1625
1297
|
switch (errorCode) {
|
|
1626
1298
|
case "AccessDeniedException":
|
|
@@ -1637,29 +1309,26 @@ const deserializeAws_restJson1ListProposalVotesCommandError = async (output, con
|
|
|
1637
1309
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1638
1310
|
default:
|
|
1639
1311
|
const parsedBody = parsedOutput.body;
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
$metadata,
|
|
1312
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1313
|
+
output,
|
|
1314
|
+
parsedBody,
|
|
1315
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1316
|
+
errorCode,
|
|
1646
1317
|
});
|
|
1647
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1648
1318
|
}
|
|
1649
1319
|
};
|
|
1650
1320
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
1651
1321
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1652
1322
|
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
1653
1323
|
}
|
|
1654
|
-
const contents = {
|
|
1324
|
+
const contents = map({
|
|
1655
1325
|
$metadata: deserializeMetadata(output),
|
|
1656
|
-
|
|
1657
|
-
};
|
|
1326
|
+
});
|
|
1658
1327
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1659
|
-
if (data.Tags
|
|
1328
|
+
if (data.Tags != null) {
|
|
1660
1329
|
contents.Tags = deserializeAws_restJson1OutputTagMap(data.Tags, context);
|
|
1661
1330
|
}
|
|
1662
|
-
return
|
|
1331
|
+
return contents;
|
|
1663
1332
|
};
|
|
1664
1333
|
exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
|
|
1665
1334
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
@@ -1667,7 +1336,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1667
1336
|
...output,
|
|
1668
1337
|
body: await parseBody(output.body, context),
|
|
1669
1338
|
};
|
|
1670
|
-
let response;
|
|
1671
1339
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1672
1340
|
switch (errorCode) {
|
|
1673
1341
|
case "InternalServiceErrorException":
|
|
@@ -1684,25 +1352,23 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1684
1352
|
throw await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context);
|
|
1685
1353
|
default:
|
|
1686
1354
|
const parsedBody = parsedOutput.body;
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
$metadata,
|
|
1355
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1356
|
+
output,
|
|
1357
|
+
parsedBody,
|
|
1358
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1359
|
+
errorCode,
|
|
1693
1360
|
});
|
|
1694
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1695
1361
|
}
|
|
1696
1362
|
};
|
|
1697
1363
|
const deserializeAws_restJson1RejectInvitationCommand = async (output, context) => {
|
|
1698
1364
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1699
1365
|
return deserializeAws_restJson1RejectInvitationCommandError(output, context);
|
|
1700
1366
|
}
|
|
1701
|
-
const contents = {
|
|
1367
|
+
const contents = map({
|
|
1702
1368
|
$metadata: deserializeMetadata(output),
|
|
1703
|
-
};
|
|
1369
|
+
});
|
|
1704
1370
|
await collectBody(output.body, context);
|
|
1705
|
-
return
|
|
1371
|
+
return contents;
|
|
1706
1372
|
};
|
|
1707
1373
|
exports.deserializeAws_restJson1RejectInvitationCommand = deserializeAws_restJson1RejectInvitationCommand;
|
|
1708
1374
|
const deserializeAws_restJson1RejectInvitationCommandError = async (output, context) => {
|
|
@@ -1710,7 +1376,6 @@ const deserializeAws_restJson1RejectInvitationCommandError = async (output, cont
|
|
|
1710
1376
|
...output,
|
|
1711
1377
|
body: await parseBody(output.body, context),
|
|
1712
1378
|
};
|
|
1713
|
-
let response;
|
|
1714
1379
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1715
1380
|
switch (errorCode) {
|
|
1716
1381
|
case "AccessDeniedException":
|
|
@@ -1733,25 +1398,23 @@ const deserializeAws_restJson1RejectInvitationCommandError = async (output, cont
|
|
|
1733
1398
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1734
1399
|
default:
|
|
1735
1400
|
const parsedBody = parsedOutput.body;
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
$metadata,
|
|
1401
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1402
|
+
output,
|
|
1403
|
+
parsedBody,
|
|
1404
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1405
|
+
errorCode,
|
|
1742
1406
|
});
|
|
1743
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1744
1407
|
}
|
|
1745
1408
|
};
|
|
1746
1409
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
1747
1410
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1748
1411
|
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
1749
1412
|
}
|
|
1750
|
-
const contents = {
|
|
1413
|
+
const contents = map({
|
|
1751
1414
|
$metadata: deserializeMetadata(output),
|
|
1752
|
-
};
|
|
1415
|
+
});
|
|
1753
1416
|
await collectBody(output.body, context);
|
|
1754
|
-
return
|
|
1417
|
+
return contents;
|
|
1755
1418
|
};
|
|
1756
1419
|
exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
|
|
1757
1420
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
@@ -1759,7 +1422,6 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1759
1422
|
...output,
|
|
1760
1423
|
body: await parseBody(output.body, context),
|
|
1761
1424
|
};
|
|
1762
|
-
let response;
|
|
1763
1425
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1764
1426
|
switch (errorCode) {
|
|
1765
1427
|
case "InternalServiceErrorException":
|
|
@@ -1779,25 +1441,23 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1779
1441
|
throw await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
1780
1442
|
default:
|
|
1781
1443
|
const parsedBody = parsedOutput.body;
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
$metadata,
|
|
1444
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1445
|
+
output,
|
|
1446
|
+
parsedBody,
|
|
1447
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1448
|
+
errorCode,
|
|
1788
1449
|
});
|
|
1789
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1790
1450
|
}
|
|
1791
1451
|
};
|
|
1792
1452
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
1793
1453
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1794
1454
|
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
1795
1455
|
}
|
|
1796
|
-
const contents = {
|
|
1456
|
+
const contents = map({
|
|
1797
1457
|
$metadata: deserializeMetadata(output),
|
|
1798
|
-
};
|
|
1458
|
+
});
|
|
1799
1459
|
await collectBody(output.body, context);
|
|
1800
|
-
return
|
|
1460
|
+
return contents;
|
|
1801
1461
|
};
|
|
1802
1462
|
exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
|
|
1803
1463
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
@@ -1805,7 +1465,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1805
1465
|
...output,
|
|
1806
1466
|
body: await parseBody(output.body, context),
|
|
1807
1467
|
};
|
|
1808
|
-
let response;
|
|
1809
1468
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1810
1469
|
switch (errorCode) {
|
|
1811
1470
|
case "InternalServiceErrorException":
|
|
@@ -1822,25 +1481,23 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1822
1481
|
throw await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context);
|
|
1823
1482
|
default:
|
|
1824
1483
|
const parsedBody = parsedOutput.body;
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
$metadata,
|
|
1484
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1485
|
+
output,
|
|
1486
|
+
parsedBody,
|
|
1487
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1488
|
+
errorCode,
|
|
1831
1489
|
});
|
|
1832
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1833
1490
|
}
|
|
1834
1491
|
};
|
|
1835
1492
|
const deserializeAws_restJson1UpdateMemberCommand = async (output, context) => {
|
|
1836
1493
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1837
1494
|
return deserializeAws_restJson1UpdateMemberCommandError(output, context);
|
|
1838
1495
|
}
|
|
1839
|
-
const contents = {
|
|
1496
|
+
const contents = map({
|
|
1840
1497
|
$metadata: deserializeMetadata(output),
|
|
1841
|
-
};
|
|
1498
|
+
});
|
|
1842
1499
|
await collectBody(output.body, context);
|
|
1843
|
-
return
|
|
1500
|
+
return contents;
|
|
1844
1501
|
};
|
|
1845
1502
|
exports.deserializeAws_restJson1UpdateMemberCommand = deserializeAws_restJson1UpdateMemberCommand;
|
|
1846
1503
|
const deserializeAws_restJson1UpdateMemberCommandError = async (output, context) => {
|
|
@@ -1848,7 +1505,6 @@ const deserializeAws_restJson1UpdateMemberCommandError = async (output, context)
|
|
|
1848
1505
|
...output,
|
|
1849
1506
|
body: await parseBody(output.body, context),
|
|
1850
1507
|
};
|
|
1851
|
-
let response;
|
|
1852
1508
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1853
1509
|
switch (errorCode) {
|
|
1854
1510
|
case "AccessDeniedException":
|
|
@@ -1868,25 +1524,23 @@ const deserializeAws_restJson1UpdateMemberCommandError = async (output, context)
|
|
|
1868
1524
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1869
1525
|
default:
|
|
1870
1526
|
const parsedBody = parsedOutput.body;
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
$metadata,
|
|
1527
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1528
|
+
output,
|
|
1529
|
+
parsedBody,
|
|
1530
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1531
|
+
errorCode,
|
|
1877
1532
|
});
|
|
1878
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1879
1533
|
}
|
|
1880
1534
|
};
|
|
1881
1535
|
const deserializeAws_restJson1UpdateNodeCommand = async (output, context) => {
|
|
1882
1536
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1883
1537
|
return deserializeAws_restJson1UpdateNodeCommandError(output, context);
|
|
1884
1538
|
}
|
|
1885
|
-
const contents = {
|
|
1539
|
+
const contents = map({
|
|
1886
1540
|
$metadata: deserializeMetadata(output),
|
|
1887
|
-
};
|
|
1541
|
+
});
|
|
1888
1542
|
await collectBody(output.body, context);
|
|
1889
|
-
return
|
|
1543
|
+
return contents;
|
|
1890
1544
|
};
|
|
1891
1545
|
exports.deserializeAws_restJson1UpdateNodeCommand = deserializeAws_restJson1UpdateNodeCommand;
|
|
1892
1546
|
const deserializeAws_restJson1UpdateNodeCommandError = async (output, context) => {
|
|
@@ -1894,7 +1548,6 @@ const deserializeAws_restJson1UpdateNodeCommandError = async (output, context) =
|
|
|
1894
1548
|
...output,
|
|
1895
1549
|
body: await parseBody(output.body, context),
|
|
1896
1550
|
};
|
|
1897
|
-
let response;
|
|
1898
1551
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1899
1552
|
switch (errorCode) {
|
|
1900
1553
|
case "AccessDeniedException":
|
|
@@ -1914,25 +1567,23 @@ const deserializeAws_restJson1UpdateNodeCommandError = async (output, context) =
|
|
|
1914
1567
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1915
1568
|
default:
|
|
1916
1569
|
const parsedBody = parsedOutput.body;
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
$metadata,
|
|
1570
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1571
|
+
output,
|
|
1572
|
+
parsedBody,
|
|
1573
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1574
|
+
errorCode,
|
|
1923
1575
|
});
|
|
1924
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1925
1576
|
}
|
|
1926
1577
|
};
|
|
1927
1578
|
const deserializeAws_restJson1VoteOnProposalCommand = async (output, context) => {
|
|
1928
1579
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1929
1580
|
return deserializeAws_restJson1VoteOnProposalCommandError(output, context);
|
|
1930
1581
|
}
|
|
1931
|
-
const contents = {
|
|
1582
|
+
const contents = map({
|
|
1932
1583
|
$metadata: deserializeMetadata(output),
|
|
1933
|
-
};
|
|
1584
|
+
});
|
|
1934
1585
|
await collectBody(output.body, context);
|
|
1935
|
-
return
|
|
1586
|
+
return contents;
|
|
1936
1587
|
};
|
|
1937
1588
|
exports.deserializeAws_restJson1VoteOnProposalCommand = deserializeAws_restJson1VoteOnProposalCommand;
|
|
1938
1589
|
const deserializeAws_restJson1VoteOnProposalCommandError = async (output, context) => {
|
|
@@ -1940,7 +1591,6 @@ const deserializeAws_restJson1VoteOnProposalCommandError = async (output, contex
|
|
|
1940
1591
|
...output,
|
|
1941
1592
|
body: await parseBody(output.body, context),
|
|
1942
1593
|
};
|
|
1943
|
-
let response;
|
|
1944
1594
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1945
1595
|
switch (errorCode) {
|
|
1946
1596
|
case "AccessDeniedException":
|
|
@@ -1963,20 +1613,19 @@ const deserializeAws_restJson1VoteOnProposalCommandError = async (output, contex
|
|
|
1963
1613
|
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1964
1614
|
default:
|
|
1965
1615
|
const parsedBody = parsedOutput.body;
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
$metadata,
|
|
1616
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1617
|
+
output,
|
|
1618
|
+
parsedBody,
|
|
1619
|
+
exceptionCtor: ManagedBlockchainServiceException_1.ManagedBlockchainServiceException,
|
|
1620
|
+
errorCode,
|
|
1972
1621
|
});
|
|
1973
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1974
1622
|
}
|
|
1975
1623
|
};
|
|
1624
|
+
const map = smithy_client_1.map;
|
|
1976
1625
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
1977
|
-
const contents = {};
|
|
1626
|
+
const contents = map({});
|
|
1978
1627
|
const data = parsedOutput.body;
|
|
1979
|
-
if (data.Message
|
|
1628
|
+
if (data.Message != null) {
|
|
1980
1629
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1981
1630
|
}
|
|
1982
1631
|
const exception = new models_0_1.AccessDeniedException({
|
|
@@ -1986,9 +1635,9 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
1986
1635
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1987
1636
|
};
|
|
1988
1637
|
const deserializeAws_restJson1IllegalActionExceptionResponse = async (parsedOutput, context) => {
|
|
1989
|
-
const contents = {};
|
|
1638
|
+
const contents = map({});
|
|
1990
1639
|
const data = parsedOutput.body;
|
|
1991
|
-
if (data.Message
|
|
1640
|
+
if (data.Message != null) {
|
|
1992
1641
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1993
1642
|
}
|
|
1994
1643
|
const exception = new models_0_1.IllegalActionException({
|
|
@@ -1998,7 +1647,7 @@ const deserializeAws_restJson1IllegalActionExceptionResponse = async (parsedOutp
|
|
|
1998
1647
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1999
1648
|
};
|
|
2000
1649
|
const deserializeAws_restJson1InternalServiceErrorExceptionResponse = async (parsedOutput, context) => {
|
|
2001
|
-
const contents = {};
|
|
1650
|
+
const contents = map({});
|
|
2002
1651
|
const data = parsedOutput.body;
|
|
2003
1652
|
const exception = new models_0_1.InternalServiceErrorException({
|
|
2004
1653
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -2007,9 +1656,9 @@ const deserializeAws_restJson1InternalServiceErrorExceptionResponse = async (par
|
|
|
2007
1656
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2008
1657
|
};
|
|
2009
1658
|
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
2010
|
-
const contents = {};
|
|
1659
|
+
const contents = map({});
|
|
2011
1660
|
const data = parsedOutput.body;
|
|
2012
|
-
if (data.Message
|
|
1661
|
+
if (data.Message != null) {
|
|
2013
1662
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
2014
1663
|
}
|
|
2015
1664
|
const exception = new models_0_1.InvalidRequestException({
|
|
@@ -2019,9 +1668,9 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
|
|
|
2019
1668
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2020
1669
|
};
|
|
2021
1670
|
const deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
|
|
2022
|
-
const contents = {};
|
|
1671
|
+
const contents = map({});
|
|
2023
1672
|
const data = parsedOutput.body;
|
|
2024
|
-
if (data.Message
|
|
1673
|
+
if (data.Message != null) {
|
|
2025
1674
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
2026
1675
|
}
|
|
2027
1676
|
const exception = new models_0_1.ResourceAlreadyExistsException({
|
|
@@ -2031,9 +1680,9 @@ const deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse = async (pa
|
|
|
2031
1680
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2032
1681
|
};
|
|
2033
1682
|
const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
2034
|
-
const contents = {};
|
|
1683
|
+
const contents = map({});
|
|
2035
1684
|
const data = parsedOutput.body;
|
|
2036
|
-
if (data.Message
|
|
1685
|
+
if (data.Message != null) {
|
|
2037
1686
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
2038
1687
|
}
|
|
2039
1688
|
const exception = new models_0_1.ResourceLimitExceededException({
|
|
@@ -2043,12 +1692,12 @@ const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (pa
|
|
|
2043
1692
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2044
1693
|
};
|
|
2045
1694
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
2046
|
-
const contents = {};
|
|
1695
|
+
const contents = map({});
|
|
2047
1696
|
const data = parsedOutput.body;
|
|
2048
|
-
if (data.Message
|
|
1697
|
+
if (data.Message != null) {
|
|
2049
1698
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
2050
1699
|
}
|
|
2051
|
-
if (data.ResourceName
|
|
1700
|
+
if (data.ResourceName != null) {
|
|
2052
1701
|
contents.ResourceName = (0, smithy_client_1.expectString)(data.ResourceName);
|
|
2053
1702
|
}
|
|
2054
1703
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
@@ -2058,9 +1707,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
2058
1707
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2059
1708
|
};
|
|
2060
1709
|
const deserializeAws_restJson1ResourceNotReadyExceptionResponse = async (parsedOutput, context) => {
|
|
2061
|
-
const contents = {};
|
|
1710
|
+
const contents = map({});
|
|
2062
1711
|
const data = parsedOutput.body;
|
|
2063
|
-
if (data.Message
|
|
1712
|
+
if (data.Message != null) {
|
|
2064
1713
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
2065
1714
|
}
|
|
2066
1715
|
const exception = new models_0_1.ResourceNotReadyException({
|
|
@@ -2070,7 +1719,7 @@ const deserializeAws_restJson1ResourceNotReadyExceptionResponse = async (parsedO
|
|
|
2070
1719
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2071
1720
|
};
|
|
2072
1721
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
2073
|
-
const contents = {};
|
|
1722
|
+
const contents = map({});
|
|
2074
1723
|
const data = parsedOutput.body;
|
|
2075
1724
|
const exception = new models_0_1.ThrottlingException({
|
|
2076
1725
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -2079,12 +1728,12 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
|
|
|
2079
1728
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2080
1729
|
};
|
|
2081
1730
|
const deserializeAws_restJson1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
|
|
2082
|
-
const contents = {};
|
|
1731
|
+
const contents = map({});
|
|
2083
1732
|
const data = parsedOutput.body;
|
|
2084
|
-
if (data.Message
|
|
1733
|
+
if (data.Message != null) {
|
|
2085
1734
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
2086
1735
|
}
|
|
2087
|
-
if (data.ResourceName
|
|
1736
|
+
if (data.ResourceName != null) {
|
|
2088
1737
|
contents.ResourceName = (0, smithy_client_1.expectString)(data.ResourceName);
|
|
2089
1738
|
}
|
|
2090
1739
|
const exception = new models_0_1.TooManyTagsException({
|
|
@@ -2120,9 +1769,6 @@ const serializeAws_restJson1InviteActionList = (input, context) => {
|
|
|
2120
1769
|
return input
|
|
2121
1770
|
.filter((e) => e != null)
|
|
2122
1771
|
.map((entry) => {
|
|
2123
|
-
if (entry === null) {
|
|
2124
|
-
return null;
|
|
2125
|
-
}
|
|
2126
1772
|
return serializeAws_restJson1InviteAction(entry, context);
|
|
2127
1773
|
});
|
|
2128
1774
|
};
|
|
@@ -2225,9 +1871,6 @@ const serializeAws_restJson1RemoveActionList = (input, context) => {
|
|
|
2225
1871
|
return input
|
|
2226
1872
|
.filter((e) => e != null)
|
|
2227
1873
|
.map((entry) => {
|
|
2228
|
-
if (entry === null) {
|
|
2229
|
-
return null;
|
|
2230
|
-
}
|
|
2231
1874
|
return serializeAws_restJson1RemoveAction(entry, context);
|
|
2232
1875
|
});
|
|
2233
1876
|
};
|