@aws-sdk/client-managedblockchain 3.476.0 → 3.478.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist-cjs/pagination/ListAccessorsPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListInvitationsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListMembersPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListNetworksPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListNodesPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListProposalVotesPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListProposalsPaginator.js +2 -24
  8. package/dist-cjs/protocols/Aws_restJson1.js +185 -369
  9. package/dist-es/pagination/ListAccessorsPaginator.js +2 -23
  10. package/dist-es/pagination/ListInvitationsPaginator.js +2 -23
  11. package/dist-es/pagination/ListMembersPaginator.js +2 -23
  12. package/dist-es/pagination/ListNetworksPaginator.js +2 -23
  13. package/dist-es/pagination/ListNodesPaginator.js +2 -23
  14. package/dist-es/pagination/ListProposalVotesPaginator.js +2 -23
  15. package/dist-es/pagination/ListProposalsPaginator.js +2 -23
  16. package/dist-es/protocols/Aws_restJson1.js +186 -370
  17. package/dist-types/pagination/ListAccessorsPaginator.d.ts +1 -1
  18. package/dist-types/pagination/ListInvitationsPaginator.d.ts +1 -1
  19. package/dist-types/pagination/ListMembersPaginator.d.ts +1 -1
  20. package/dist-types/pagination/ListNetworksPaginator.d.ts +1 -1
  21. package/dist-types/pagination/ListNodesPaginator.d.ts +1 -1
  22. package/dist-types/pagination/ListProposalVotesPaginator.d.ts +1 -1
  23. package/dist-types/pagination/ListProposalsPaginator.d.ts +1 -1
  24. package/dist-types/ts3.4/pagination/ListAccessorsPaginator.d.ts +3 -3
  25. package/dist-types/ts3.4/pagination/ListInvitationsPaginator.d.ts +3 -3
  26. package/dist-types/ts3.4/pagination/ListMembersPaginator.d.ts +3 -3
  27. package/dist-types/ts3.4/pagination/ListNetworksPaginator.d.ts +3 -3
  28. package/dist-types/ts3.4/pagination/ListNodesPaginator.d.ts +3 -3
  29. package/dist-types/ts3.4/pagination/ListProposalVotesPaginator.d.ts +3 -3
  30. package/dist-types/ts3.4/pagination/ListProposalsPaginator.d.ts +3 -3
  31. package/package.json +7 -6
@@ -1,14 +1,14 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ManagedBlockchainServiceException as __BaseException } from "../models/ManagedBlockchainServiceException";
5
5
  import { AccessDeniedException, IllegalActionException, InternalServiceErrorException, InvalidRequestException, ResourceAlreadyExistsException, ResourceLimitExceededException, ResourceNotFoundException, ResourceNotReadyException, ThrottlingException, TooManyTagsException, } from "../models/models_0";
6
6
  export const se_CreateAccessorCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors";
11
+ b.bp("/accessors");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  AccessorType: [],
@@ -16,45 +16,31 @@ export const se_CreateAccessorCommand = async (input, context) => {
16
16
  NetworkType: [],
17
17
  Tags: (_) => _json(_),
18
18
  }));
19
- return new __HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "POST",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  export const se_CreateMemberCommand = async (input, context) => {
30
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
23
+ const b = rb(input, context);
31
24
  const headers = {
32
25
  "content-type": "application/json",
33
26
  };
34
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
35
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
27
+ b.bp("/networks/{NetworkId}/members");
28
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
36
29
  let body;
37
30
  body = JSON.stringify(take(input, {
38
31
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
39
32
  InvitationId: [],
40
33
  MemberConfiguration: (_) => _json(_),
41
34
  }));
42
- return new __HttpRequest({
43
- protocol,
44
- hostname,
45
- port,
46
- method: "POST",
47
- headers,
48
- path: resolvedPath,
49
- body,
50
- });
35
+ b.m("POST").h(headers).b(body);
36
+ return b.build();
51
37
  };
52
38
  export const se_CreateNetworkCommand = async (input, context) => {
53
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const b = rb(input, context);
54
40
  const headers = {
55
41
  "content-type": "application/json",
56
42
  };
57
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
43
+ b.bp("/networks");
58
44
  let body;
59
45
  body = JSON.stringify(take(input, {
60
46
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -67,23 +53,16 @@ export const se_CreateNetworkCommand = async (input, context) => {
67
53
  Tags: (_) => _json(_),
68
54
  VotingPolicy: (_) => _json(_),
69
55
  }));
70
- return new __HttpRequest({
71
- protocol,
72
- hostname,
73
- port,
74
- method: "POST",
75
- headers,
76
- path: resolvedPath,
77
- body,
78
- });
56
+ b.m("POST").h(headers).b(body);
57
+ return b.build();
79
58
  };
80
59
  export const se_CreateNodeCommand = async (input, context) => {
81
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
60
+ const b = rb(input, context);
82
61
  const headers = {
83
62
  "content-type": "application/json",
84
63
  };
85
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
86
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
64
+ b.bp("/networks/{NetworkId}/nodes");
65
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
87
66
  let body;
88
67
  body = JSON.stringify(take(input, {
89
68
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -91,23 +70,16 @@ export const se_CreateNodeCommand = async (input, context) => {
91
70
  NodeConfiguration: (_) => _json(_),
92
71
  Tags: (_) => _json(_),
93
72
  }));
94
- return new __HttpRequest({
95
- protocol,
96
- hostname,
97
- port,
98
- method: "POST",
99
- headers,
100
- path: resolvedPath,
101
- body,
102
- });
73
+ b.m("POST").h(headers).b(body);
74
+ return b.build();
103
75
  };
104
76
  export const se_CreateProposalCommand = async (input, context) => {
105
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const b = rb(input, context);
106
78
  const headers = {
107
79
  "content-type": "application/json",
108
80
  };
109
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
110
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
81
+ b.bp("/networks/{NetworkId}/proposals");
82
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
111
83
  let body;
112
84
  body = JSON.stringify(take(input, {
113
85
  Actions: (_) => _json(_),
@@ -116,457 +88,283 @@ export const se_CreateProposalCommand = async (input, context) => {
116
88
  MemberId: [],
117
89
  Tags: (_) => _json(_),
118
90
  }));
119
- return new __HttpRequest({
120
- protocol,
121
- hostname,
122
- port,
123
- method: "POST",
124
- headers,
125
- path: resolvedPath,
126
- body,
127
- });
91
+ b.m("POST").h(headers).b(body);
92
+ return b.build();
128
93
  };
129
94
  export const se_DeleteAccessorCommand = async (input, context) => {
130
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
95
+ const b = rb(input, context);
131
96
  const headers = {};
132
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors/{AccessorId}";
133
- resolvedPath = __resolvedPath(resolvedPath, input, "AccessorId", () => input.AccessorId, "{AccessorId}", false);
97
+ b.bp("/accessors/{AccessorId}");
98
+ b.p("AccessorId", () => input.AccessorId, "{AccessorId}", false);
134
99
  let body;
135
- return new __HttpRequest({
136
- protocol,
137
- hostname,
138
- port,
139
- method: "DELETE",
140
- headers,
141
- path: resolvedPath,
142
- body,
143
- });
100
+ b.m("DELETE").h(headers).b(body);
101
+ return b.build();
144
102
  };
145
103
  export const se_DeleteMemberCommand = async (input, context) => {
146
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = rb(input, context);
147
105
  const headers = {};
148
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
149
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
150
- resolvedPath = __resolvedPath(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
106
+ b.bp("/networks/{NetworkId}/members/{MemberId}");
107
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
108
+ b.p("MemberId", () => input.MemberId, "{MemberId}", false);
151
109
  let body;
152
- return new __HttpRequest({
153
- protocol,
154
- hostname,
155
- port,
156
- method: "DELETE",
157
- headers,
158
- path: resolvedPath,
159
- body,
160
- });
110
+ b.m("DELETE").h(headers).b(body);
111
+ return b.build();
161
112
  };
162
113
  export const se_DeleteNodeCommand = async (input, context) => {
163
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
114
+ const b = rb(input, context);
164
115
  const headers = {};
165
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
166
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
167
- resolvedPath = __resolvedPath(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
116
+ b.bp("/networks/{NetworkId}/nodes/{NodeId}");
117
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
118
+ b.p("NodeId", () => input.NodeId, "{NodeId}", false);
168
119
  const query = map({
169
- memberId: [, input.MemberId],
120
+ [_mI]: [, input[_MI]],
170
121
  });
171
122
  let body;
172
- return new __HttpRequest({
173
- protocol,
174
- hostname,
175
- port,
176
- method: "DELETE",
177
- headers,
178
- path: resolvedPath,
179
- query,
180
- body,
181
- });
123
+ b.m("DELETE").h(headers).q(query).b(body);
124
+ return b.build();
182
125
  };
183
126
  export const se_GetAccessorCommand = async (input, context) => {
184
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
127
+ const b = rb(input, context);
185
128
  const headers = {};
186
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors/{AccessorId}";
187
- resolvedPath = __resolvedPath(resolvedPath, input, "AccessorId", () => input.AccessorId, "{AccessorId}", false);
129
+ b.bp("/accessors/{AccessorId}");
130
+ b.p("AccessorId", () => input.AccessorId, "{AccessorId}", false);
188
131
  let body;
189
- return new __HttpRequest({
190
- protocol,
191
- hostname,
192
- port,
193
- method: "GET",
194
- headers,
195
- path: resolvedPath,
196
- body,
197
- });
132
+ b.m("GET").h(headers).b(body);
133
+ return b.build();
198
134
  };
199
135
  export const se_GetMemberCommand = async (input, context) => {
200
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
+ const b = rb(input, context);
201
137
  const headers = {};
202
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
203
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
204
- resolvedPath = __resolvedPath(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
138
+ b.bp("/networks/{NetworkId}/members/{MemberId}");
139
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
140
+ b.p("MemberId", () => input.MemberId, "{MemberId}", false);
205
141
  let body;
206
- return new __HttpRequest({
207
- protocol,
208
- hostname,
209
- port,
210
- method: "GET",
211
- headers,
212
- path: resolvedPath,
213
- body,
214
- });
142
+ b.m("GET").h(headers).b(body);
143
+ return b.build();
215
144
  };
216
145
  export const se_GetNetworkCommand = async (input, context) => {
217
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
146
+ const b = rb(input, context);
218
147
  const headers = {};
219
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}";
220
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
148
+ b.bp("/networks/{NetworkId}");
149
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
221
150
  let body;
222
- return new __HttpRequest({
223
- protocol,
224
- hostname,
225
- port,
226
- method: "GET",
227
- headers,
228
- path: resolvedPath,
229
- body,
230
- });
151
+ b.m("GET").h(headers).b(body);
152
+ return b.build();
231
153
  };
232
154
  export const se_GetNodeCommand = async (input, context) => {
233
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
155
+ const b = rb(input, context);
234
156
  const headers = {};
235
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
236
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
237
- resolvedPath = __resolvedPath(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
157
+ b.bp("/networks/{NetworkId}/nodes/{NodeId}");
158
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
159
+ b.p("NodeId", () => input.NodeId, "{NodeId}", false);
238
160
  const query = map({
239
- memberId: [, input.MemberId],
161
+ [_mI]: [, input[_MI]],
240
162
  });
241
163
  let body;
242
- return new __HttpRequest({
243
- protocol,
244
- hostname,
245
- port,
246
- method: "GET",
247
- headers,
248
- path: resolvedPath,
249
- query,
250
- body,
251
- });
164
+ b.m("GET").h(headers).q(query).b(body);
165
+ return b.build();
252
166
  };
253
167
  export const se_GetProposalCommand = async (input, context) => {
254
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const b = rb(input, context);
255
169
  const headers = {};
256
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
257
- "/networks/{NetworkId}/proposals/{ProposalId}";
258
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
259
- resolvedPath = __resolvedPath(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
170
+ b.bp("/networks/{NetworkId}/proposals/{ProposalId}");
171
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
172
+ b.p("ProposalId", () => input.ProposalId, "{ProposalId}", false);
260
173
  let body;
261
- return new __HttpRequest({
262
- protocol,
263
- hostname,
264
- port,
265
- method: "GET",
266
- headers,
267
- path: resolvedPath,
268
- body,
269
- });
174
+ b.m("GET").h(headers).b(body);
175
+ return b.build();
270
176
  };
271
177
  export const se_ListAccessorsCommand = async (input, context) => {
272
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
178
+ const b = rb(input, context);
273
179
  const headers = {};
274
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors";
180
+ b.bp("/accessors");
275
181
  const query = map({
276
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
277
- nextToken: [, input.NextToken],
278
- networkType: [, input.NetworkType],
182
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
183
+ [_nT]: [, input[_NT]],
184
+ [_nTe]: [, input[_NTe]],
279
185
  });
280
186
  let body;
281
- return new __HttpRequest({
282
- protocol,
283
- hostname,
284
- port,
285
- method: "GET",
286
- headers,
287
- path: resolvedPath,
288
- query,
289
- body,
290
- });
187
+ b.m("GET").h(headers).q(query).b(body);
188
+ return b.build();
291
189
  };
292
190
  export const se_ListInvitationsCommand = async (input, context) => {
293
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
191
+ const b = rb(input, context);
294
192
  const headers = {};
295
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations";
193
+ b.bp("/invitations");
296
194
  const query = map({
297
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
298
- nextToken: [, input.NextToken],
195
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
196
+ [_nT]: [, input[_NT]],
299
197
  });
300
198
  let body;
301
- return new __HttpRequest({
302
- protocol,
303
- hostname,
304
- port,
305
- method: "GET",
306
- headers,
307
- path: resolvedPath,
308
- query,
309
- body,
310
- });
199
+ b.m("GET").h(headers).q(query).b(body);
200
+ return b.build();
311
201
  };
312
202
  export const se_ListMembersCommand = async (input, context) => {
313
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
203
+ const b = rb(input, context);
314
204
  const headers = {};
315
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
316
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
205
+ b.bp("/networks/{NetworkId}/members");
206
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
317
207
  const query = map({
318
- name: [, input.Name],
319
- status: [, input.Status],
320
- isOwned: [() => input.IsOwned !== void 0, () => input.IsOwned.toString()],
321
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
322
- nextToken: [, input.NextToken],
208
+ [_n]: [, input[_N]],
209
+ [_s]: [, input[_S]],
210
+ [_iO]: [() => input.IsOwned !== void 0, () => input[_IO].toString()],
211
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
212
+ [_nT]: [, input[_NT]],
323
213
  });
324
214
  let body;
325
- return new __HttpRequest({
326
- protocol,
327
- hostname,
328
- port,
329
- method: "GET",
330
- headers,
331
- path: resolvedPath,
332
- query,
333
- body,
334
- });
215
+ b.m("GET").h(headers).q(query).b(body);
216
+ return b.build();
335
217
  };
336
218
  export const se_ListNetworksCommand = async (input, context) => {
337
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
219
+ const b = rb(input, context);
338
220
  const headers = {};
339
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
221
+ b.bp("/networks");
340
222
  const query = map({
341
- name: [, input.Name],
342
- framework: [, input.Framework],
343
- status: [, input.Status],
344
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
345
- nextToken: [, input.NextToken],
223
+ [_n]: [, input[_N]],
224
+ [_f]: [, input[_F]],
225
+ [_s]: [, input[_S]],
226
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
227
+ [_nT]: [, input[_NT]],
346
228
  });
347
229
  let body;
348
- return new __HttpRequest({
349
- protocol,
350
- hostname,
351
- port,
352
- method: "GET",
353
- headers,
354
- path: resolvedPath,
355
- query,
356
- body,
357
- });
230
+ b.m("GET").h(headers).q(query).b(body);
231
+ return b.build();
358
232
  };
359
233
  export const se_ListNodesCommand = async (input, context) => {
360
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
234
+ const b = rb(input, context);
361
235
  const headers = {};
362
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
363
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
236
+ b.bp("/networks/{NetworkId}/nodes");
237
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
364
238
  const query = map({
365
- memberId: [, input.MemberId],
366
- status: [, input.Status],
367
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
368
- nextToken: [, input.NextToken],
239
+ [_mI]: [, input[_MI]],
240
+ [_s]: [, input[_S]],
241
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
242
+ [_nT]: [, input[_NT]],
369
243
  });
370
244
  let body;
371
- return new __HttpRequest({
372
- protocol,
373
- hostname,
374
- port,
375
- method: "GET",
376
- headers,
377
- path: resolvedPath,
378
- query,
379
- body,
380
- });
245
+ b.m("GET").h(headers).q(query).b(body);
246
+ return b.build();
381
247
  };
382
248
  export const se_ListProposalsCommand = async (input, context) => {
383
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
+ const b = rb(input, context);
384
250
  const headers = {};
385
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
386
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
251
+ b.bp("/networks/{NetworkId}/proposals");
252
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
387
253
  const query = map({
388
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
389
- nextToken: [, input.NextToken],
254
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
255
+ [_nT]: [, input[_NT]],
390
256
  });
391
257
  let body;
392
- return new __HttpRequest({
393
- protocol,
394
- hostname,
395
- port,
396
- method: "GET",
397
- headers,
398
- path: resolvedPath,
399
- query,
400
- body,
401
- });
258
+ b.m("GET").h(headers).q(query).b(body);
259
+ return b.build();
402
260
  };
403
261
  export const se_ListProposalVotesCommand = async (input, context) => {
404
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
262
+ const b = rb(input, context);
405
263
  const headers = {};
406
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
407
- "/networks/{NetworkId}/proposals/{ProposalId}/votes";
408
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
409
- resolvedPath = __resolvedPath(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
264
+ b.bp("/networks/{NetworkId}/proposals/{ProposalId}/votes");
265
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
266
+ b.p("ProposalId", () => input.ProposalId, "{ProposalId}", false);
410
267
  const query = map({
411
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
412
- nextToken: [, input.NextToken],
268
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
269
+ [_nT]: [, input[_NT]],
413
270
  });
414
271
  let body;
415
- return new __HttpRequest({
416
- protocol,
417
- hostname,
418
- port,
419
- method: "GET",
420
- headers,
421
- path: resolvedPath,
422
- query,
423
- body,
424
- });
272
+ b.m("GET").h(headers).q(query).b(body);
273
+ return b.build();
425
274
  };
426
275
  export const se_ListTagsForResourceCommand = async (input, context) => {
427
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
276
+ const b = rb(input, context);
428
277
  const headers = {};
429
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
430
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
278
+ b.bp("/tags/{ResourceArn}");
279
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
431
280
  let body;
432
- return new __HttpRequest({
433
- protocol,
434
- hostname,
435
- port,
436
- method: "GET",
437
- headers,
438
- path: resolvedPath,
439
- body,
440
- });
281
+ b.m("GET").h(headers).b(body);
282
+ return b.build();
441
283
  };
442
284
  export const se_RejectInvitationCommand = async (input, context) => {
443
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
285
+ const b = rb(input, context);
444
286
  const headers = {};
445
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/{InvitationId}";
446
- resolvedPath = __resolvedPath(resolvedPath, input, "InvitationId", () => input.InvitationId, "{InvitationId}", false);
287
+ b.bp("/invitations/{InvitationId}");
288
+ b.p("InvitationId", () => input.InvitationId, "{InvitationId}", false);
447
289
  let body;
448
- return new __HttpRequest({
449
- protocol,
450
- hostname,
451
- port,
452
- method: "DELETE",
453
- headers,
454
- path: resolvedPath,
455
- body,
456
- });
290
+ b.m("DELETE").h(headers).b(body);
291
+ return b.build();
457
292
  };
458
293
  export const se_TagResourceCommand = async (input, context) => {
459
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
294
+ const b = rb(input, context);
460
295
  const headers = {
461
296
  "content-type": "application/json",
462
297
  };
463
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
464
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
298
+ b.bp("/tags/{ResourceArn}");
299
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
465
300
  let body;
466
301
  body = JSON.stringify(take(input, {
467
302
  Tags: (_) => _json(_),
468
303
  }));
469
- return new __HttpRequest({
470
- protocol,
471
- hostname,
472
- port,
473
- method: "POST",
474
- headers,
475
- path: resolvedPath,
476
- body,
477
- });
304
+ b.m("POST").h(headers).b(body);
305
+ return b.build();
478
306
  };
479
307
  export const se_UntagResourceCommand = async (input, context) => {
480
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
308
+ const b = rb(input, context);
481
309
  const headers = {};
482
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
483
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
310
+ b.bp("/tags/{ResourceArn}");
311
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
484
312
  const query = map({
485
- tagKeys: [
313
+ [_tK]: [
486
314
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
487
- () => (input.TagKeys || []).map((_entry) => _entry),
315
+ () => (input[_TK] || []).map((_entry) => _entry),
488
316
  ],
489
317
  });
490
318
  let body;
491
- return new __HttpRequest({
492
- protocol,
493
- hostname,
494
- port,
495
- method: "DELETE",
496
- headers,
497
- path: resolvedPath,
498
- query,
499
- body,
500
- });
319
+ b.m("DELETE").h(headers).q(query).b(body);
320
+ return b.build();
501
321
  };
502
322
  export const se_UpdateMemberCommand = async (input, context) => {
503
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
323
+ const b = rb(input, context);
504
324
  const headers = {
505
325
  "content-type": "application/json",
506
326
  };
507
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
508
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
509
- resolvedPath = __resolvedPath(resolvedPath, input, "MemberId", () => input.MemberId, "{MemberId}", false);
327
+ b.bp("/networks/{NetworkId}/members/{MemberId}");
328
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
329
+ b.p("MemberId", () => input.MemberId, "{MemberId}", false);
510
330
  let body;
511
331
  body = JSON.stringify(take(input, {
512
332
  LogPublishingConfiguration: (_) => _json(_),
513
333
  }));
514
- return new __HttpRequest({
515
- protocol,
516
- hostname,
517
- port,
518
- method: "PATCH",
519
- headers,
520
- path: resolvedPath,
521
- body,
522
- });
334
+ b.m("PATCH").h(headers).b(body);
335
+ return b.build();
523
336
  };
524
337
  export const se_UpdateNodeCommand = async (input, context) => {
525
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
338
+ const b = rb(input, context);
526
339
  const headers = {
527
340
  "content-type": "application/json",
528
341
  };
529
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
530
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
531
- resolvedPath = __resolvedPath(resolvedPath, input, "NodeId", () => input.NodeId, "{NodeId}", false);
342
+ b.bp("/networks/{NetworkId}/nodes/{NodeId}");
343
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
344
+ b.p("NodeId", () => input.NodeId, "{NodeId}", false);
532
345
  let body;
533
346
  body = JSON.stringify(take(input, {
534
347
  LogPublishingConfiguration: (_) => _json(_),
535
348
  MemberId: [],
536
349
  }));
537
- return new __HttpRequest({
538
- protocol,
539
- hostname,
540
- port,
541
- method: "PATCH",
542
- headers,
543
- path: resolvedPath,
544
- body,
545
- });
350
+ b.m("PATCH").h(headers).b(body);
351
+ return b.build();
546
352
  };
547
353
  export const se_VoteOnProposalCommand = async (input, context) => {
548
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
354
+ const b = rb(input, context);
549
355
  const headers = {
550
356
  "content-type": "application/json",
551
357
  };
552
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
553
- "/networks/{NetworkId}/proposals/{ProposalId}/votes";
554
- resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId, "{NetworkId}", false);
555
- resolvedPath = __resolvedPath(resolvedPath, input, "ProposalId", () => input.ProposalId, "{ProposalId}", false);
358
+ b.bp("/networks/{NetworkId}/proposals/{ProposalId}/votes");
359
+ b.p("NetworkId", () => input.NetworkId, "{NetworkId}", false);
360
+ b.p("ProposalId", () => input.ProposalId, "{ProposalId}", false);
556
361
  let body;
557
362
  body = JSON.stringify(take(input, {
558
363
  Vote: [],
559
364
  VoterMemberId: [],
560
365
  }));
561
- return new __HttpRequest({
562
- protocol,
563
- hostname,
564
- port,
565
- method: "POST",
566
- headers,
567
- path: resolvedPath,
568
- body,
569
- });
366
+ b.m("POST").h(headers).b(body);
367
+ return b.build();
570
368
  };
571
369
  export const de_CreateAccessorCommand = async (output, context) => {
572
370
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2125,6 +1923,24 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2125
1923
  value !== "" &&
2126
1924
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2127
1925
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1926
+ const _F = "Framework";
1927
+ const _IO = "IsOwned";
1928
+ const _MI = "MemberId";
1929
+ const _MR = "MaxResults";
1930
+ const _N = "Name";
1931
+ const _NT = "NextToken";
1932
+ const _NTe = "NetworkType";
1933
+ const _S = "Status";
1934
+ const _TK = "TagKeys";
1935
+ const _f = "framework";
1936
+ const _iO = "isOwned";
1937
+ const _mI = "memberId";
1938
+ const _mR = "maxResults";
1939
+ const _n = "name";
1940
+ const _nT = "nextToken";
1941
+ const _nTe = "networkType";
1942
+ const _s = "status";
1943
+ const _tK = "tagKeys";
2128
1944
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2129
1945
  if (encoded.length) {
2130
1946
  return JSON.parse(encoded);