@aws-sdk/client-managedblockchain 3.476.0 → 3.477.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.
@@ -2,17 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_TagResourceCommand = exports.de_RejectInvitationCommand = exports.de_ListTagsForResourceCommand = exports.de_ListProposalVotesCommand = exports.de_ListProposalsCommand = exports.de_ListNodesCommand = exports.de_ListNetworksCommand = exports.de_ListMembersCommand = exports.de_ListInvitationsCommand = exports.de_ListAccessorsCommand = exports.de_GetProposalCommand = exports.de_GetNodeCommand = exports.de_GetNetworkCommand = exports.de_GetMemberCommand = exports.de_GetAccessorCommand = exports.de_DeleteNodeCommand = exports.de_DeleteMemberCommand = exports.de_DeleteAccessorCommand = exports.de_CreateProposalCommand = exports.de_CreateNodeCommand = exports.de_CreateNetworkCommand = exports.de_CreateMemberCommand = exports.de_CreateAccessorCommand = exports.se_VoteOnProposalCommand = exports.se_UpdateNodeCommand = exports.se_UpdateMemberCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_RejectInvitationCommand = exports.se_ListTagsForResourceCommand = exports.se_ListProposalVotesCommand = exports.se_ListProposalsCommand = exports.se_ListNodesCommand = exports.se_ListNetworksCommand = exports.se_ListMembersCommand = exports.se_ListInvitationsCommand = exports.se_ListAccessorsCommand = exports.se_GetProposalCommand = exports.se_GetNodeCommand = exports.se_GetNetworkCommand = exports.se_GetMemberCommand = exports.se_GetAccessorCommand = exports.se_DeleteNodeCommand = exports.se_DeleteMemberCommand = exports.se_DeleteAccessorCommand = exports.se_CreateProposalCommand = exports.se_CreateNodeCommand = exports.se_CreateNetworkCommand = exports.se_CreateMemberCommand = exports.se_CreateAccessorCommand = void 0;
4
4
  exports.de_VoteOnProposalCommand = exports.de_UpdateNodeCommand = exports.de_UpdateMemberCommand = exports.de_UntagResourceCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_1 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const uuid_1 = require("uuid");
8
8
  const ManagedBlockchainServiceException_1 = require("../models/ManagedBlockchainServiceException");
9
9
  const models_0_1 = require("../models/models_0");
10
10
  const se_CreateAccessorCommand = async (input, context) => {
11
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const b = (0, core_1.requestBuilder)(input, context);
12
12
  const headers = {
13
13
  "content-type": "application/json",
14
14
  };
15
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors";
15
+ b.bp("/accessors");
16
16
  let body;
17
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
18
18
  AccessorType: [],
@@ -20,47 +20,33 @@ const se_CreateAccessorCommand = async (input, context) => {
20
20
  NetworkType: [],
21
21
  Tags: (_) => (0, smithy_client_1._json)(_),
22
22
  }));
23
- return new protocol_http_1.HttpRequest({
24
- protocol,
25
- hostname,
26
- port,
27
- method: "POST",
28
- headers,
29
- path: resolvedPath,
30
- body,
31
- });
23
+ b.m("POST").h(headers).b(body);
24
+ return b.build();
32
25
  };
33
26
  exports.se_CreateAccessorCommand = se_CreateAccessorCommand;
34
27
  const se_CreateMemberCommand = async (input, context) => {
35
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28
+ const b = (0, core_1.requestBuilder)(input, context);
36
29
  const headers = {
37
30
  "content-type": "application/json",
38
31
  };
39
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
40
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
32
+ b.bp("/networks/{NetworkId}/members");
33
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
41
34
  let body;
42
35
  body = JSON.stringify((0, smithy_client_1.take)(input, {
43
36
  ClientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
44
37
  InvitationId: [],
45
38
  MemberConfiguration: (_) => (0, smithy_client_1._json)(_),
46
39
  }));
47
- return new protocol_http_1.HttpRequest({
48
- protocol,
49
- hostname,
50
- port,
51
- method: "POST",
52
- headers,
53
- path: resolvedPath,
54
- body,
55
- });
40
+ b.m("POST").h(headers).b(body);
41
+ return b.build();
56
42
  };
57
43
  exports.se_CreateMemberCommand = se_CreateMemberCommand;
58
44
  const se_CreateNetworkCommand = async (input, context) => {
59
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
45
+ const b = (0, core_1.requestBuilder)(input, context);
60
46
  const headers = {
61
47
  "content-type": "application/json",
62
48
  };
63
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
49
+ b.bp("/networks");
64
50
  let body;
65
51
  body = JSON.stringify((0, smithy_client_1.take)(input, {
66
52
  ClientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -73,24 +59,17 @@ const se_CreateNetworkCommand = async (input, context) => {
73
59
  Tags: (_) => (0, smithy_client_1._json)(_),
74
60
  VotingPolicy: (_) => (0, smithy_client_1._json)(_),
75
61
  }));
76
- return new protocol_http_1.HttpRequest({
77
- protocol,
78
- hostname,
79
- port,
80
- method: "POST",
81
- headers,
82
- path: resolvedPath,
83
- body,
84
- });
62
+ b.m("POST").h(headers).b(body);
63
+ return b.build();
85
64
  };
86
65
  exports.se_CreateNetworkCommand = se_CreateNetworkCommand;
87
66
  const se_CreateNodeCommand = async (input, context) => {
88
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
67
+ const b = (0, core_1.requestBuilder)(input, context);
89
68
  const headers = {
90
69
  "content-type": "application/json",
91
70
  };
92
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
93
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
71
+ b.bp("/networks/{NetworkId}/nodes");
72
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
94
73
  let body;
95
74
  body = JSON.stringify((0, smithy_client_1.take)(input, {
96
75
  ClientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -98,24 +77,17 @@ const se_CreateNodeCommand = async (input, context) => {
98
77
  NodeConfiguration: (_) => (0, smithy_client_1._json)(_),
99
78
  Tags: (_) => (0, smithy_client_1._json)(_),
100
79
  }));
101
- return new protocol_http_1.HttpRequest({
102
- protocol,
103
- hostname,
104
- port,
105
- method: "POST",
106
- headers,
107
- path: resolvedPath,
108
- body,
109
- });
80
+ b.m("POST").h(headers).b(body);
81
+ return b.build();
110
82
  };
111
83
  exports.se_CreateNodeCommand = se_CreateNodeCommand;
112
84
  const se_CreateProposalCommand = async (input, context) => {
113
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = (0, core_1.requestBuilder)(input, context);
114
86
  const headers = {
115
87
  "content-type": "application/json",
116
88
  };
117
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
118
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
89
+ b.bp("/networks/{NetworkId}/proposals");
90
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
119
91
  let body;
120
92
  body = JSON.stringify((0, smithy_client_1.take)(input, {
121
93
  Actions: (_) => (0, smithy_client_1._json)(_),
@@ -124,479 +96,305 @@ const se_CreateProposalCommand = async (input, context) => {
124
96
  MemberId: [],
125
97
  Tags: (_) => (0, smithy_client_1._json)(_),
126
98
  }));
127
- return new protocol_http_1.HttpRequest({
128
- protocol,
129
- hostname,
130
- port,
131
- method: "POST",
132
- headers,
133
- path: resolvedPath,
134
- body,
135
- });
99
+ b.m("POST").h(headers).b(body);
100
+ return b.build();
136
101
  };
137
102
  exports.se_CreateProposalCommand = se_CreateProposalCommand;
138
103
  const se_DeleteAccessorCommand = async (input, context) => {
139
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = (0, core_1.requestBuilder)(input, context);
140
105
  const headers = {};
141
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors/{AccessorId}";
142
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccessorId", () => input.AccessorId, "{AccessorId}", false);
106
+ b.bp("/accessors/{AccessorId}");
107
+ b.p("AccessorId", () => input.AccessorId, "{AccessorId}", false);
143
108
  let body;
144
- return new protocol_http_1.HttpRequest({
145
- protocol,
146
- hostname,
147
- port,
148
- method: "DELETE",
149
- headers,
150
- path: resolvedPath,
151
- body,
152
- });
109
+ b.m("DELETE").h(headers).b(body);
110
+ return b.build();
153
111
  };
154
112
  exports.se_DeleteAccessorCommand = se_DeleteAccessorCommand;
155
113
  const se_DeleteMemberCommand = async (input, context) => {
156
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
114
+ const b = (0, core_1.requestBuilder)(input, context);
157
115
  const headers = {};
158
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
159
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
160
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
116
+ b.bp("/networks/{NetworkId}/members/{MemberId}");
117
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
118
+ b.p("MemberId", () => input.MemberId, "{MemberId}", false);
161
119
  let body;
162
- return new protocol_http_1.HttpRequest({
163
- protocol,
164
- hostname,
165
- port,
166
- method: "DELETE",
167
- headers,
168
- path: resolvedPath,
169
- body,
170
- });
120
+ b.m("DELETE").h(headers).b(body);
121
+ return b.build();
171
122
  };
172
123
  exports.se_DeleteMemberCommand = se_DeleteMemberCommand;
173
124
  const se_DeleteNodeCommand = async (input, context) => {
174
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const b = (0, core_1.requestBuilder)(input, context);
175
126
  const headers = {};
176
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
177
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
178
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
127
+ b.bp("/networks/{NetworkId}/nodes/{NodeId}");
128
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
129
+ b.p("NodeId", () => input.NodeId, "{NodeId}", false);
179
130
  const query = (0, smithy_client_1.map)({
180
- memberId: [, input.MemberId],
131
+ [_mI]: [, input[_MI]],
181
132
  });
182
133
  let body;
183
- return new protocol_http_1.HttpRequest({
184
- protocol,
185
- hostname,
186
- port,
187
- method: "DELETE",
188
- headers,
189
- path: resolvedPath,
190
- query,
191
- body,
192
- });
134
+ b.m("DELETE").h(headers).q(query).b(body);
135
+ return b.build();
193
136
  };
194
137
  exports.se_DeleteNodeCommand = se_DeleteNodeCommand;
195
138
  const se_GetAccessorCommand = async (input, context) => {
196
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
139
+ const b = (0, core_1.requestBuilder)(input, context);
197
140
  const headers = {};
198
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors/{AccessorId}";
199
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AccessorId", () => input.AccessorId, "{AccessorId}", false);
141
+ b.bp("/accessors/{AccessorId}");
142
+ b.p("AccessorId", () => input.AccessorId, "{AccessorId}", false);
200
143
  let body;
201
- return new protocol_http_1.HttpRequest({
202
- protocol,
203
- hostname,
204
- port,
205
- method: "GET",
206
- headers,
207
- path: resolvedPath,
208
- body,
209
- });
144
+ b.m("GET").h(headers).b(body);
145
+ return b.build();
210
146
  };
211
147
  exports.se_GetAccessorCommand = se_GetAccessorCommand;
212
148
  const se_GetMemberCommand = async (input, context) => {
213
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const b = (0, core_1.requestBuilder)(input, context);
214
150
  const headers = {};
215
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
216
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
217
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
151
+ b.bp("/networks/{NetworkId}/members/{MemberId}");
152
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
153
+ b.p("MemberId", () => input.MemberId, "{MemberId}", false);
218
154
  let body;
219
- return new protocol_http_1.HttpRequest({
220
- protocol,
221
- hostname,
222
- port,
223
- method: "GET",
224
- headers,
225
- path: resolvedPath,
226
- body,
227
- });
155
+ b.m("GET").h(headers).b(body);
156
+ return b.build();
228
157
  };
229
158
  exports.se_GetMemberCommand = se_GetMemberCommand;
230
159
  const se_GetNetworkCommand = async (input, context) => {
231
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
160
+ const b = (0, core_1.requestBuilder)(input, context);
232
161
  const headers = {};
233
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}";
234
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
162
+ b.bp("/networks/{NetworkId}");
163
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
235
164
  let body;
236
- return new protocol_http_1.HttpRequest({
237
- protocol,
238
- hostname,
239
- port,
240
- method: "GET",
241
- headers,
242
- path: resolvedPath,
243
- body,
244
- });
165
+ b.m("GET").h(headers).b(body);
166
+ return b.build();
245
167
  };
246
168
  exports.se_GetNetworkCommand = se_GetNetworkCommand;
247
169
  const se_GetNodeCommand = async (input, context) => {
248
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
170
+ const b = (0, core_1.requestBuilder)(input, context);
249
171
  const headers = {};
250
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
251
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
252
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
172
+ b.bp("/networks/{NetworkId}/nodes/{NodeId}");
173
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
174
+ b.p("NodeId", () => input.NodeId, "{NodeId}", false);
253
175
  const query = (0, smithy_client_1.map)({
254
- memberId: [, input.MemberId],
176
+ [_mI]: [, input[_MI]],
255
177
  });
256
178
  let body;
257
- return new protocol_http_1.HttpRequest({
258
- protocol,
259
- hostname,
260
- port,
261
- method: "GET",
262
- headers,
263
- path: resolvedPath,
264
- query,
265
- body,
266
- });
179
+ b.m("GET").h(headers).q(query).b(body);
180
+ return b.build();
267
181
  };
268
182
  exports.se_GetNodeCommand = se_GetNodeCommand;
269
183
  const se_GetProposalCommand = async (input, context) => {
270
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
184
+ const b = (0, core_1.requestBuilder)(input, context);
271
185
  const headers = {};
272
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
273
- "/networks/{NetworkId}/proposals/{ProposalId}";
274
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
275
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
186
+ b.bp("/networks/{NetworkId}/proposals/{ProposalId}");
187
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
188
+ b.p("ProposalId", () => input.ProposalId, "{ProposalId}", false);
276
189
  let body;
277
- return new protocol_http_1.HttpRequest({
278
- protocol,
279
- hostname,
280
- port,
281
- method: "GET",
282
- headers,
283
- path: resolvedPath,
284
- body,
285
- });
190
+ b.m("GET").h(headers).b(body);
191
+ return b.build();
286
192
  };
287
193
  exports.se_GetProposalCommand = se_GetProposalCommand;
288
194
  const se_ListAccessorsCommand = async (input, context) => {
289
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
195
+ const b = (0, core_1.requestBuilder)(input, context);
290
196
  const headers = {};
291
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors";
197
+ b.bp("/accessors");
292
198
  const query = (0, smithy_client_1.map)({
293
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
294
- nextToken: [, input.NextToken],
295
- networkType: [, input.NetworkType],
199
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
200
+ [_nT]: [, input[_NT]],
201
+ [_nTe]: [, input[_NTe]],
296
202
  });
297
203
  let body;
298
- return new protocol_http_1.HttpRequest({
299
- protocol,
300
- hostname,
301
- port,
302
- method: "GET",
303
- headers,
304
- path: resolvedPath,
305
- query,
306
- body,
307
- });
204
+ b.m("GET").h(headers).q(query).b(body);
205
+ return b.build();
308
206
  };
309
207
  exports.se_ListAccessorsCommand = se_ListAccessorsCommand;
310
208
  const se_ListInvitationsCommand = async (input, context) => {
311
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
209
+ const b = (0, core_1.requestBuilder)(input, context);
312
210
  const headers = {};
313
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations";
211
+ b.bp("/invitations");
314
212
  const query = (0, smithy_client_1.map)({
315
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
316
- nextToken: [, input.NextToken],
213
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
214
+ [_nT]: [, input[_NT]],
317
215
  });
318
216
  let body;
319
- return new protocol_http_1.HttpRequest({
320
- protocol,
321
- hostname,
322
- port,
323
- method: "GET",
324
- headers,
325
- path: resolvedPath,
326
- query,
327
- body,
328
- });
217
+ b.m("GET").h(headers).q(query).b(body);
218
+ return b.build();
329
219
  };
330
220
  exports.se_ListInvitationsCommand = se_ListInvitationsCommand;
331
221
  const se_ListMembersCommand = async (input, context) => {
332
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
222
+ const b = (0, core_1.requestBuilder)(input, context);
333
223
  const headers = {};
334
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
335
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
224
+ b.bp("/networks/{NetworkId}/members");
225
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
336
226
  const query = (0, smithy_client_1.map)({
337
- name: [, input.Name],
338
- status: [, input.Status],
339
- isOwned: [() => input.IsOwned !== void 0, () => input.IsOwned.toString()],
340
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
341
- nextToken: [, input.NextToken],
227
+ [_n]: [, input[_N]],
228
+ [_s]: [, input[_S]],
229
+ [_iO]: [() => input.IsOwned !== void 0, () => input[_IO].toString()],
230
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
231
+ [_nT]: [, input[_NT]],
342
232
  });
343
233
  let body;
344
- return new protocol_http_1.HttpRequest({
345
- protocol,
346
- hostname,
347
- port,
348
- method: "GET",
349
- headers,
350
- path: resolvedPath,
351
- query,
352
- body,
353
- });
234
+ b.m("GET").h(headers).q(query).b(body);
235
+ return b.build();
354
236
  };
355
237
  exports.se_ListMembersCommand = se_ListMembersCommand;
356
238
  const se_ListNetworksCommand = async (input, context) => {
357
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
239
+ const b = (0, core_1.requestBuilder)(input, context);
358
240
  const headers = {};
359
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
241
+ b.bp("/networks");
360
242
  const query = (0, smithy_client_1.map)({
361
- name: [, input.Name],
362
- framework: [, input.Framework],
363
- status: [, input.Status],
364
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
365
- nextToken: [, input.NextToken],
243
+ [_n]: [, input[_N]],
244
+ [_f]: [, input[_F]],
245
+ [_s]: [, input[_S]],
246
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
247
+ [_nT]: [, input[_NT]],
366
248
  });
367
249
  let body;
368
- return new protocol_http_1.HttpRequest({
369
- protocol,
370
- hostname,
371
- port,
372
- method: "GET",
373
- headers,
374
- path: resolvedPath,
375
- query,
376
- body,
377
- });
250
+ b.m("GET").h(headers).q(query).b(body);
251
+ return b.build();
378
252
  };
379
253
  exports.se_ListNetworksCommand = se_ListNetworksCommand;
380
254
  const se_ListNodesCommand = async (input, context) => {
381
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const b = (0, core_1.requestBuilder)(input, context);
382
256
  const headers = {};
383
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
384
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
257
+ b.bp("/networks/{NetworkId}/nodes");
258
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
385
259
  const query = (0, smithy_client_1.map)({
386
- memberId: [, input.MemberId],
387
- status: [, input.Status],
388
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
389
- nextToken: [, input.NextToken],
260
+ [_mI]: [, input[_MI]],
261
+ [_s]: [, input[_S]],
262
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
263
+ [_nT]: [, input[_NT]],
390
264
  });
391
265
  let body;
392
- return new protocol_http_1.HttpRequest({
393
- protocol,
394
- hostname,
395
- port,
396
- method: "GET",
397
- headers,
398
- path: resolvedPath,
399
- query,
400
- body,
401
- });
266
+ b.m("GET").h(headers).q(query).b(body);
267
+ return b.build();
402
268
  };
403
269
  exports.se_ListNodesCommand = se_ListNodesCommand;
404
270
  const se_ListProposalsCommand = async (input, context) => {
405
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
271
+ const b = (0, core_1.requestBuilder)(input, context);
406
272
  const headers = {};
407
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
408
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
273
+ b.bp("/networks/{NetworkId}/proposals");
274
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
409
275
  const query = (0, smithy_client_1.map)({
410
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
411
- nextToken: [, input.NextToken],
276
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
277
+ [_nT]: [, input[_NT]],
412
278
  });
413
279
  let body;
414
- return new protocol_http_1.HttpRequest({
415
- protocol,
416
- hostname,
417
- port,
418
- method: "GET",
419
- headers,
420
- path: resolvedPath,
421
- query,
422
- body,
423
- });
280
+ b.m("GET").h(headers).q(query).b(body);
281
+ return b.build();
424
282
  };
425
283
  exports.se_ListProposalsCommand = se_ListProposalsCommand;
426
284
  const se_ListProposalVotesCommand = async (input, context) => {
427
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
285
+ const b = (0, core_1.requestBuilder)(input, context);
428
286
  const headers = {};
429
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
430
- "/networks/{NetworkId}/proposals/{ProposalId}/votes";
431
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
432
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
287
+ b.bp("/networks/{NetworkId}/proposals/{ProposalId}/votes");
288
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
289
+ b.p("ProposalId", () => input.ProposalId, "{ProposalId}", false);
433
290
  const query = (0, smithy_client_1.map)({
434
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
435
- nextToken: [, input.NextToken],
291
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
292
+ [_nT]: [, input[_NT]],
436
293
  });
437
294
  let body;
438
- return new protocol_http_1.HttpRequest({
439
- protocol,
440
- hostname,
441
- port,
442
- method: "GET",
443
- headers,
444
- path: resolvedPath,
445
- query,
446
- body,
447
- });
295
+ b.m("GET").h(headers).q(query).b(body);
296
+ return b.build();
448
297
  };
449
298
  exports.se_ListProposalVotesCommand = se_ListProposalVotesCommand;
450
299
  const se_ListTagsForResourceCommand = async (input, context) => {
451
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
300
+ const b = (0, core_1.requestBuilder)(input, context);
452
301
  const headers = {};
453
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
454
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
302
+ b.bp("/tags/{ResourceArn}");
303
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
455
304
  let body;
456
- return new protocol_http_1.HttpRequest({
457
- protocol,
458
- hostname,
459
- port,
460
- method: "GET",
461
- headers,
462
- path: resolvedPath,
463
- body,
464
- });
305
+ b.m("GET").h(headers).b(body);
306
+ return b.build();
465
307
  };
466
308
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
467
309
  const se_RejectInvitationCommand = async (input, context) => {
468
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
310
+ const b = (0, core_1.requestBuilder)(input, context);
469
311
  const headers = {};
470
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/{InvitationId}";
471
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "InvitationId", () => input.InvitationId, "{InvitationId}", false);
312
+ b.bp("/invitations/{InvitationId}");
313
+ b.p("InvitationId", () => input.InvitationId, "{InvitationId}", false);
472
314
  let body;
473
- return new protocol_http_1.HttpRequest({
474
- protocol,
475
- hostname,
476
- port,
477
- method: "DELETE",
478
- headers,
479
- path: resolvedPath,
480
- body,
481
- });
315
+ b.m("DELETE").h(headers).b(body);
316
+ return b.build();
482
317
  };
483
318
  exports.se_RejectInvitationCommand = se_RejectInvitationCommand;
484
319
  const se_TagResourceCommand = async (input, context) => {
485
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
320
+ const b = (0, core_1.requestBuilder)(input, context);
486
321
  const headers = {
487
322
  "content-type": "application/json",
488
323
  };
489
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
490
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
324
+ b.bp("/tags/{ResourceArn}");
325
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
491
326
  let body;
492
327
  body = JSON.stringify((0, smithy_client_1.take)(input, {
493
328
  Tags: (_) => (0, smithy_client_1._json)(_),
494
329
  }));
495
- return new protocol_http_1.HttpRequest({
496
- protocol,
497
- hostname,
498
- port,
499
- method: "POST",
500
- headers,
501
- path: resolvedPath,
502
- body,
503
- });
330
+ b.m("POST").h(headers).b(body);
331
+ return b.build();
504
332
  };
505
333
  exports.se_TagResourceCommand = se_TagResourceCommand;
506
334
  const se_UntagResourceCommand = async (input, context) => {
507
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
335
+ const b = (0, core_1.requestBuilder)(input, context);
508
336
  const headers = {};
509
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
510
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
337
+ b.bp("/tags/{ResourceArn}");
338
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
511
339
  const query = (0, smithy_client_1.map)({
512
- tagKeys: [
340
+ [_tK]: [
513
341
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
514
- () => (input.TagKeys || []).map((_entry) => _entry),
342
+ () => (input[_TK] || []).map((_entry) => _entry),
515
343
  ],
516
344
  });
517
345
  let body;
518
- return new protocol_http_1.HttpRequest({
519
- protocol,
520
- hostname,
521
- port,
522
- method: "DELETE",
523
- headers,
524
- path: resolvedPath,
525
- query,
526
- body,
527
- });
346
+ b.m("DELETE").h(headers).q(query).b(body);
347
+ return b.build();
528
348
  };
529
349
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
530
350
  const se_UpdateMemberCommand = async (input, context) => {
531
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
351
+ const b = (0, core_1.requestBuilder)(input, context);
532
352
  const headers = {
533
353
  "content-type": "application/json",
534
354
  };
535
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
536
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
537
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
355
+ b.bp("/networks/{NetworkId}/members/{MemberId}");
356
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
357
+ b.p("MemberId", () => input.MemberId, "{MemberId}", false);
538
358
  let body;
539
359
  body = JSON.stringify((0, smithy_client_1.take)(input, {
540
360
  LogPublishingConfiguration: (_) => (0, smithy_client_1._json)(_),
541
361
  }));
542
- return new protocol_http_1.HttpRequest({
543
- protocol,
544
- hostname,
545
- port,
546
- method: "PATCH",
547
- headers,
548
- path: resolvedPath,
549
- body,
550
- });
362
+ b.m("PATCH").h(headers).b(body);
363
+ return b.build();
551
364
  };
552
365
  exports.se_UpdateMemberCommand = se_UpdateMemberCommand;
553
366
  const se_UpdateNodeCommand = async (input, context) => {
554
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
367
+ const b = (0, core_1.requestBuilder)(input, context);
555
368
  const headers = {
556
369
  "content-type": "application/json",
557
370
  };
558
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
559
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
560
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
371
+ b.bp("/networks/{NetworkId}/nodes/{NodeId}");
372
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
373
+ b.p("NodeId", () => input.NodeId, "{NodeId}", false);
561
374
  let body;
562
375
  body = JSON.stringify((0, smithy_client_1.take)(input, {
563
376
  LogPublishingConfiguration: (_) => (0, smithy_client_1._json)(_),
564
377
  MemberId: [],
565
378
  }));
566
- return new protocol_http_1.HttpRequest({
567
- protocol,
568
- hostname,
569
- port,
570
- method: "PATCH",
571
- headers,
572
- path: resolvedPath,
573
- body,
574
- });
379
+ b.m("PATCH").h(headers).b(body);
380
+ return b.build();
575
381
  };
576
382
  exports.se_UpdateNodeCommand = se_UpdateNodeCommand;
577
383
  const se_VoteOnProposalCommand = async (input, context) => {
578
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
384
+ const b = (0, core_1.requestBuilder)(input, context);
579
385
  const headers = {
580
386
  "content-type": "application/json",
581
387
  };
582
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
583
- "/networks/{NetworkId}/proposals/{ProposalId}/votes";
584
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
585
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
388
+ b.bp("/networks/{NetworkId}/proposals/{ProposalId}/votes");
389
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
390
+ b.p("ProposalId", () => input.ProposalId, "{ProposalId}", false);
586
391
  let body;
587
392
  body = JSON.stringify((0, smithy_client_1.take)(input, {
588
393
  Vote: [],
589
394
  VoterMemberId: [],
590
395
  }));
591
- return new protocol_http_1.HttpRequest({
592
- protocol,
593
- hostname,
594
- port,
595
- method: "POST",
596
- headers,
597
- path: resolvedPath,
598
- body,
599
- });
396
+ b.m("POST").h(headers).b(body);
397
+ return b.build();
600
398
  };
601
399
  exports.se_VoteOnProposalCommand = se_VoteOnProposalCommand;
602
400
  const de_CreateAccessorCommand = async (output, context) => {
@@ -2183,6 +1981,24 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2183
1981
  value !== "" &&
2184
1982
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2185
1983
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1984
+ const _F = "Framework";
1985
+ const _IO = "IsOwned";
1986
+ const _MI = "MemberId";
1987
+ const _MR = "MaxResults";
1988
+ const _N = "Name";
1989
+ const _NT = "NextToken";
1990
+ const _NTe = "NetworkType";
1991
+ const _S = "Status";
1992
+ const _TK = "TagKeys";
1993
+ const _f = "framework";
1994
+ const _iO = "isOwned";
1995
+ const _mI = "memberId";
1996
+ const _mR = "maxResults";
1997
+ const _n = "name";
1998
+ const _nT = "nextToken";
1999
+ const _nTe = "networkType";
2000
+ const _s = "status";
2001
+ const _tK = "tagKeys";
2186
2002
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2187
2003
  if (encoded.length) {
2188
2004
  return JSON.parse(encoded);