@aws-sdk/client-mq 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.
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListBrokersCommand } from "../commands/ListBrokersCommand";
2
3
  import { MqClient } from "../MqClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBrokersCommand(input), ...args);
5
- };
6
- export async function* paginateListBrokers(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MqClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Mq | MqClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListBrokers = createPaginator(MqClient, ListBrokersCommand, "NextToken", "NextToken", "MaxResults");
@@ -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 { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, UnauthorizedException, } from "../models/models_0";
5
5
  import { MqServiceException as __BaseException } from "../models/MqServiceException";
6
6
  export const se_CreateBrokerCommand = 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 || ""}` + "/v1/brokers";
11
+ b.bp("/v1/brokers");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  authenticationStrategy: [, , `AuthenticationStrategy`],
@@ -33,22 +33,15 @@ export const se_CreateBrokerCommand = async (input, context) => {
33
33
  tags: [, (_) => _json(_), `Tags`],
34
34
  users: [, (_) => se___listOfUser(_, context), `Users`],
35
35
  }));
36
- return new __HttpRequest({
37
- protocol,
38
- hostname,
39
- port,
40
- method: "POST",
41
- headers,
42
- path: resolvedPath,
43
- body,
44
- });
36
+ b.m("POST").h(headers).b(body);
37
+ return b.build();
45
38
  };
46
39
  export const se_CreateConfigurationCommand = async (input, context) => {
47
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = rb(input, context);
48
41
  const headers = {
49
42
  "content-type": "application/json",
50
43
  };
51
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations";
44
+ b.bp("/v1/configurations");
52
45
  let body;
53
46
  body = JSON.stringify(take(input, {
54
47
  authenticationStrategy: [, , `AuthenticationStrategy`],
@@ -57,45 +50,31 @@ export const se_CreateConfigurationCommand = async (input, context) => {
57
50
  name: [, , `Name`],
58
51
  tags: [, (_) => _json(_), `Tags`],
59
52
  }));
60
- return new __HttpRequest({
61
- protocol,
62
- hostname,
63
- port,
64
- method: "POST",
65
- headers,
66
- path: resolvedPath,
67
- body,
68
- });
53
+ b.m("POST").h(headers).b(body);
54
+ return b.build();
69
55
  };
70
56
  export const se_CreateTagsCommand = async (input, context) => {
71
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
57
+ const b = rb(input, context);
72
58
  const headers = {
73
59
  "content-type": "application/json",
74
60
  };
75
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}";
76
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
61
+ b.bp("/v1/tags/{ResourceArn}");
62
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
77
63
  let body;
78
64
  body = JSON.stringify(take(input, {
79
65
  tags: [, (_) => _json(_), `Tags`],
80
66
  }));
81
- return new __HttpRequest({
82
- protocol,
83
- hostname,
84
- port,
85
- method: "POST",
86
- headers,
87
- path: resolvedPath,
88
- body,
89
- });
67
+ b.m("POST").h(headers).b(body);
68
+ return b.build();
90
69
  };
91
70
  export const se_CreateUserCommand = async (input, context) => {
92
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
71
+ const b = rb(input, context);
93
72
  const headers = {
94
73
  "content-type": "application/json",
95
74
  };
96
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users/{Username}";
97
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
98
- resolvedPath = __resolvedPath(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
75
+ b.bp("/v1/brokers/{BrokerId}/users/{Username}");
76
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
77
+ b.p("Username", () => input.Username, "{Username}", false);
99
78
  let body;
100
79
  body = JSON.stringify(take(input, {
101
80
  consoleAccess: [, , `ConsoleAccess`],
@@ -103,326 +82,198 @@ export const se_CreateUserCommand = async (input, context) => {
103
82
  password: [, , `Password`],
104
83
  replicationUser: [, , `ReplicationUser`],
105
84
  }));
106
- return new __HttpRequest({
107
- protocol,
108
- hostname,
109
- port,
110
- method: "POST",
111
- headers,
112
- path: resolvedPath,
113
- body,
114
- });
85
+ b.m("POST").h(headers).b(body);
86
+ return b.build();
115
87
  };
116
88
  export const se_DeleteBrokerCommand = async (input, context) => {
117
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = rb(input, context);
118
90
  const headers = {};
119
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}";
120
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
91
+ b.bp("/v1/brokers/{BrokerId}");
92
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
121
93
  let body;
122
- return new __HttpRequest({
123
- protocol,
124
- hostname,
125
- port,
126
- method: "DELETE",
127
- headers,
128
- path: resolvedPath,
129
- body,
130
- });
94
+ b.m("DELETE").h(headers).b(body);
95
+ return b.build();
131
96
  };
132
97
  export const se_DeleteTagsCommand = async (input, context) => {
133
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = rb(input, context);
134
99
  const headers = {};
135
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}";
136
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
100
+ b.bp("/v1/tags/{ResourceArn}");
101
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
137
102
  const query = map({
138
- tagKeys: [
103
+ [_tK]: [
139
104
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
140
- () => (input.TagKeys || []).map((_entry) => _entry),
105
+ () => (input[_TK] || []).map((_entry) => _entry),
141
106
  ],
142
107
  });
143
108
  let body;
144
- return new __HttpRequest({
145
- protocol,
146
- hostname,
147
- port,
148
- method: "DELETE",
149
- headers,
150
- path: resolvedPath,
151
- query,
152
- body,
153
- });
109
+ b.m("DELETE").h(headers).q(query).b(body);
110
+ return b.build();
154
111
  };
155
112
  export const se_DeleteUserCommand = async (input, context) => {
156
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = rb(input, context);
157
114
  const headers = {};
158
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users/{Username}";
159
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
160
- resolvedPath = __resolvedPath(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
115
+ b.bp("/v1/brokers/{BrokerId}/users/{Username}");
116
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
117
+ b.p("Username", () => input.Username, "{Username}", false);
161
118
  let body;
162
- return new __HttpRequest({
163
- protocol,
164
- hostname,
165
- port,
166
- method: "DELETE",
167
- headers,
168
- path: resolvedPath,
169
- body,
170
- });
119
+ b.m("DELETE").h(headers).b(body);
120
+ return b.build();
171
121
  };
172
122
  export const se_DescribeBrokerCommand = async (input, context) => {
173
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
123
+ const b = rb(input, context);
174
124
  const headers = {};
175
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}";
176
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
125
+ b.bp("/v1/brokers/{BrokerId}");
126
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
177
127
  let body;
178
- return new __HttpRequest({
179
- protocol,
180
- hostname,
181
- port,
182
- method: "GET",
183
- headers,
184
- path: resolvedPath,
185
- body,
186
- });
128
+ b.m("GET").h(headers).b(body);
129
+ return b.build();
187
130
  };
188
131
  export const se_DescribeBrokerEngineTypesCommand = async (input, context) => {
189
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
132
+ const b = rb(input, context);
190
133
  const headers = {};
191
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/broker-engine-types";
134
+ b.bp("/v1/broker-engine-types");
192
135
  const query = map({
193
- engineType: [, input.EngineType],
194
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
195
- nextToken: [, input.NextToken],
136
+ [_eT]: [, input[_ET]],
137
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
138
+ [_nT]: [, input[_NT]],
196
139
  });
197
140
  let body;
198
- return new __HttpRequest({
199
- protocol,
200
- hostname,
201
- port,
202
- method: "GET",
203
- headers,
204
- path: resolvedPath,
205
- query,
206
- body,
207
- });
141
+ b.m("GET").h(headers).q(query).b(body);
142
+ return b.build();
208
143
  };
209
144
  export const se_DescribeBrokerInstanceOptionsCommand = async (input, context) => {
210
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
145
+ const b = rb(input, context);
211
146
  const headers = {};
212
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/broker-instance-options";
147
+ b.bp("/v1/broker-instance-options");
213
148
  const query = map({
214
- engineType: [, input.EngineType],
215
- hostInstanceType: [, input.HostInstanceType],
216
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
217
- nextToken: [, input.NextToken],
218
- storageType: [, input.StorageType],
149
+ [_eT]: [, input[_ET]],
150
+ [_hIT]: [, input[_HIT]],
151
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
152
+ [_nT]: [, input[_NT]],
153
+ [_sT]: [, input[_ST]],
219
154
  });
220
155
  let body;
221
- return new __HttpRequest({
222
- protocol,
223
- hostname,
224
- port,
225
- method: "GET",
226
- headers,
227
- path: resolvedPath,
228
- query,
229
- body,
230
- });
156
+ b.m("GET").h(headers).q(query).b(body);
157
+ return b.build();
231
158
  };
232
159
  export const se_DescribeConfigurationCommand = async (input, context) => {
233
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
160
+ const b = rb(input, context);
234
161
  const headers = {};
235
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations/{ConfigurationId}";
236
- resolvedPath = __resolvedPath(resolvedPath, input, "ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
162
+ b.bp("/v1/configurations/{ConfigurationId}");
163
+ b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
237
164
  let body;
238
- return new __HttpRequest({
239
- protocol,
240
- hostname,
241
- port,
242
- method: "GET",
243
- headers,
244
- path: resolvedPath,
245
- body,
246
- });
165
+ b.m("GET").h(headers).b(body);
166
+ return b.build();
247
167
  };
248
168
  export const se_DescribeConfigurationRevisionCommand = async (input, context) => {
249
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const b = rb(input, context);
250
170
  const headers = {};
251
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
252
- "/v1/configurations/{ConfigurationId}/revisions/{ConfigurationRevision}";
253
- resolvedPath = __resolvedPath(resolvedPath, input, "ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
254
- resolvedPath = __resolvedPath(resolvedPath, input, "ConfigurationRevision", () => input.ConfigurationRevision, "{ConfigurationRevision}", false);
171
+ b.bp("/v1/configurations/{ConfigurationId}/revisions/{ConfigurationRevision}");
172
+ b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
173
+ b.p("ConfigurationRevision", () => input.ConfigurationRevision, "{ConfigurationRevision}", false);
255
174
  let body;
256
- return new __HttpRequest({
257
- protocol,
258
- hostname,
259
- port,
260
- method: "GET",
261
- headers,
262
- path: resolvedPath,
263
- body,
264
- });
175
+ b.m("GET").h(headers).b(body);
176
+ return b.build();
265
177
  };
266
178
  export const se_DescribeUserCommand = async (input, context) => {
267
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
179
+ const b = rb(input, context);
268
180
  const headers = {};
269
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users/{Username}";
270
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
271
- resolvedPath = __resolvedPath(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
181
+ b.bp("/v1/brokers/{BrokerId}/users/{Username}");
182
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
183
+ b.p("Username", () => input.Username, "{Username}", false);
272
184
  let body;
273
- return new __HttpRequest({
274
- protocol,
275
- hostname,
276
- port,
277
- method: "GET",
278
- headers,
279
- path: resolvedPath,
280
- body,
281
- });
185
+ b.m("GET").h(headers).b(body);
186
+ return b.build();
282
187
  };
283
188
  export const se_ListBrokersCommand = async (input, context) => {
284
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
+ const b = rb(input, context);
285
190
  const headers = {};
286
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers";
191
+ b.bp("/v1/brokers");
287
192
  const query = map({
288
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
289
- nextToken: [, input.NextToken],
193
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
194
+ [_nT]: [, input[_NT]],
290
195
  });
291
196
  let body;
292
- return new __HttpRequest({
293
- protocol,
294
- hostname,
295
- port,
296
- method: "GET",
297
- headers,
298
- path: resolvedPath,
299
- query,
300
- body,
301
- });
197
+ b.m("GET").h(headers).q(query).b(body);
198
+ return b.build();
302
199
  };
303
200
  export const se_ListConfigurationRevisionsCommand = async (input, context) => {
304
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
201
+ const b = rb(input, context);
305
202
  const headers = {};
306
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
307
- "/v1/configurations/{ConfigurationId}/revisions";
308
- resolvedPath = __resolvedPath(resolvedPath, input, "ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
203
+ b.bp("/v1/configurations/{ConfigurationId}/revisions");
204
+ b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
309
205
  const query = map({
310
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
311
- nextToken: [, input.NextToken],
206
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
207
+ [_nT]: [, input[_NT]],
312
208
  });
313
209
  let body;
314
- return new __HttpRequest({
315
- protocol,
316
- hostname,
317
- port,
318
- method: "GET",
319
- headers,
320
- path: resolvedPath,
321
- query,
322
- body,
323
- });
210
+ b.m("GET").h(headers).q(query).b(body);
211
+ return b.build();
324
212
  };
325
213
  export const se_ListConfigurationsCommand = async (input, context) => {
326
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
214
+ const b = rb(input, context);
327
215
  const headers = {};
328
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations";
216
+ b.bp("/v1/configurations");
329
217
  const query = map({
330
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
331
- nextToken: [, input.NextToken],
218
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
219
+ [_nT]: [, input[_NT]],
332
220
  });
333
221
  let body;
334
- return new __HttpRequest({
335
- protocol,
336
- hostname,
337
- port,
338
- method: "GET",
339
- headers,
340
- path: resolvedPath,
341
- query,
342
- body,
343
- });
222
+ b.m("GET").h(headers).q(query).b(body);
223
+ return b.build();
344
224
  };
345
225
  export const se_ListTagsCommand = async (input, context) => {
346
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
226
+ const b = rb(input, context);
347
227
  const headers = {};
348
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}";
349
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
228
+ b.bp("/v1/tags/{ResourceArn}");
229
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
350
230
  let body;
351
- return new __HttpRequest({
352
- protocol,
353
- hostname,
354
- port,
355
- method: "GET",
356
- headers,
357
- path: resolvedPath,
358
- body,
359
- });
231
+ b.m("GET").h(headers).b(body);
232
+ return b.build();
360
233
  };
361
234
  export const se_ListUsersCommand = async (input, context) => {
362
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
235
+ const b = rb(input, context);
363
236
  const headers = {};
364
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users";
365
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
237
+ b.bp("/v1/brokers/{BrokerId}/users");
238
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
366
239
  const query = map({
367
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
368
- nextToken: [, input.NextToken],
240
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
241
+ [_nT]: [, input[_NT]],
369
242
  });
370
243
  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
- });
244
+ b.m("GET").h(headers).q(query).b(body);
245
+ return b.build();
381
246
  };
382
247
  export const se_PromoteCommand = async (input, context) => {
383
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
248
+ const b = rb(input, context);
384
249
  const headers = {
385
250
  "content-type": "application/json",
386
251
  };
387
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/promote";
388
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
252
+ b.bp("/v1/brokers/{BrokerId}/promote");
253
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
389
254
  let body;
390
255
  body = JSON.stringify(take(input, {
391
256
  mode: [, , `Mode`],
392
257
  }));
393
- return new __HttpRequest({
394
- protocol,
395
- hostname,
396
- port,
397
- method: "POST",
398
- headers,
399
- path: resolvedPath,
400
- body,
401
- });
258
+ b.m("POST").h(headers).b(body);
259
+ return b.build();
402
260
  };
403
261
  export const se_RebootBrokerCommand = 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 || ""}` + "/v1/brokers/{BrokerId}/reboot";
407
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
264
+ b.bp("/v1/brokers/{BrokerId}/reboot");
265
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
408
266
  let body;
409
- return new __HttpRequest({
410
- protocol,
411
- hostname,
412
- port,
413
- method: "POST",
414
- headers,
415
- path: resolvedPath,
416
- body,
417
- });
267
+ b.m("POST").h(headers).b(body);
268
+ return b.build();
418
269
  };
419
270
  export const se_UpdateBrokerCommand = async (input, context) => {
420
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
271
+ const b = rb(input, context);
421
272
  const headers = {
422
273
  "content-type": "application/json",
423
274
  };
424
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}";
425
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
275
+ b.bp("/v1/brokers/{BrokerId}");
276
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
426
277
  let body;
427
278
  body = JSON.stringify(take(input, {
428
279
  authenticationStrategy: [, , `AuthenticationStrategy`],
@@ -436,46 +287,32 @@ export const se_UpdateBrokerCommand = async (input, context) => {
436
287
  maintenanceWindowStartTime: [, (_) => se_WeeklyStartTime(_, context), `MaintenanceWindowStartTime`],
437
288
  securityGroups: [, (_) => _json(_), `SecurityGroups`],
438
289
  }));
439
- return new __HttpRequest({
440
- protocol,
441
- hostname,
442
- port,
443
- method: "PUT",
444
- headers,
445
- path: resolvedPath,
446
- body,
447
- });
290
+ b.m("PUT").h(headers).b(body);
291
+ return b.build();
448
292
  };
449
293
  export const se_UpdateConfigurationCommand = async (input, context) => {
450
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
294
+ const b = rb(input, context);
451
295
  const headers = {
452
296
  "content-type": "application/json",
453
297
  };
454
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations/{ConfigurationId}";
455
- resolvedPath = __resolvedPath(resolvedPath, input, "ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
298
+ b.bp("/v1/configurations/{ConfigurationId}");
299
+ b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
456
300
  let body;
457
301
  body = JSON.stringify(take(input, {
458
302
  data: [, , `Data`],
459
303
  description: [, , `Description`],
460
304
  }));
461
- return new __HttpRequest({
462
- protocol,
463
- hostname,
464
- port,
465
- method: "PUT",
466
- headers,
467
- path: resolvedPath,
468
- body,
469
- });
305
+ b.m("PUT").h(headers).b(body);
306
+ return b.build();
470
307
  };
471
308
  export const se_UpdateUserCommand = async (input, context) => {
472
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
309
+ const b = rb(input, context);
473
310
  const headers = {
474
311
  "content-type": "application/json",
475
312
  };
476
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users/{Username}";
477
- resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
478
- resolvedPath = __resolvedPath(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
313
+ b.bp("/v1/brokers/{BrokerId}/users/{Username}");
314
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
315
+ b.p("Username", () => input.Username, "{Username}", false);
479
316
  let body;
480
317
  body = JSON.stringify(take(input, {
481
318
  consoleAccess: [, , `ConsoleAccess`],
@@ -483,15 +320,8 @@ export const se_UpdateUserCommand = async (input, context) => {
483
320
  password: [, , `Password`],
484
321
  replicationUser: [, , `ReplicationUser`],
485
322
  }));
486
- return new __HttpRequest({
487
- protocol,
488
- hostname,
489
- port,
490
- method: "PUT",
491
- headers,
492
- path: resolvedPath,
493
- body,
494
- });
323
+ b.m("PUT").h(headers).b(body);
324
+ return b.build();
495
325
  };
496
326
  export const de_CreateBrokerCommand = async (output, context) => {
497
327
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1946,6 +1776,18 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1946
1776
  value !== "" &&
1947
1777
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1948
1778
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1779
+ const _ET = "EngineType";
1780
+ const _HIT = "HostInstanceType";
1781
+ const _MR = "MaxResults";
1782
+ const _NT = "NextToken";
1783
+ const _ST = "StorageType";
1784
+ const _TK = "TagKeys";
1785
+ const _eT = "engineType";
1786
+ const _hIT = "hostInstanceType";
1787
+ const _mR = "maxResults";
1788
+ const _nT = "nextToken";
1789
+ const _sT = "storageType";
1790
+ const _tK = "tagKeys";
1949
1791
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1950
1792
  if (encoded.length) {
1951
1793
  return JSON.parse(encoded);