@aws-sdk/client-mq 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.
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateUserCommand = exports.de_UpdateConfigurationCommand = exports.de_UpdateBrokerCommand = exports.de_RebootBrokerCommand = exports.de_PromoteCommand = exports.de_ListUsersCommand = exports.de_ListTagsCommand = exports.de_ListConfigurationsCommand = exports.de_ListConfigurationRevisionsCommand = exports.de_ListBrokersCommand = exports.de_DescribeUserCommand = exports.de_DescribeConfigurationRevisionCommand = exports.de_DescribeConfigurationCommand = exports.de_DescribeBrokerInstanceOptionsCommand = exports.de_DescribeBrokerEngineTypesCommand = exports.de_DescribeBrokerCommand = exports.de_DeleteUserCommand = exports.de_DeleteTagsCommand = exports.de_DeleteBrokerCommand = exports.de_CreateUserCommand = exports.de_CreateTagsCommand = exports.de_CreateConfigurationCommand = exports.de_CreateBrokerCommand = exports.se_UpdateUserCommand = exports.se_UpdateConfigurationCommand = exports.se_UpdateBrokerCommand = exports.se_RebootBrokerCommand = exports.se_PromoteCommand = exports.se_ListUsersCommand = exports.se_ListTagsCommand = exports.se_ListConfigurationsCommand = exports.se_ListConfigurationRevisionsCommand = exports.se_ListBrokersCommand = exports.se_DescribeUserCommand = exports.se_DescribeConfigurationRevisionCommand = exports.se_DescribeConfigurationCommand = exports.se_DescribeBrokerInstanceOptionsCommand = exports.se_DescribeBrokerEngineTypesCommand = exports.se_DescribeBrokerCommand = exports.se_DeleteUserCommand = exports.se_DeleteTagsCommand = exports.se_DeleteBrokerCommand = exports.se_CreateUserCommand = exports.se_CreateTagsCommand = exports.se_CreateConfigurationCommand = exports.se_CreateBrokerCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const MqServiceException_1 = require("../models/MqServiceException");
9
9
  const se_CreateBrokerCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers";
14
+ b.bp("/v1/brokers");
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  authenticationStrategy: [, , `AuthenticationStrategy`],
@@ -36,23 +36,16 @@ const se_CreateBrokerCommand = async (input, context) => {
36
36
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
37
37
  users: [, (_) => se___listOfUser(_, context), `Users`],
38
38
  }));
39
- return new protocol_http_1.HttpRequest({
40
- protocol,
41
- hostname,
42
- port,
43
- method: "POST",
44
- headers,
45
- path: resolvedPath,
46
- body,
47
- });
39
+ b.m("POST").h(headers).b(body);
40
+ return b.build();
48
41
  };
49
42
  exports.se_CreateBrokerCommand = se_CreateBrokerCommand;
50
43
  const se_CreateConfigurationCommand = async (input, context) => {
51
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
44
+ const b = (0, core_1.requestBuilder)(input, context);
52
45
  const headers = {
53
46
  "content-type": "application/json",
54
47
  };
55
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations";
48
+ b.bp("/v1/configurations");
56
49
  let body;
57
50
  body = JSON.stringify((0, smithy_client_1.take)(input, {
58
51
  authenticationStrategy: [, , `AuthenticationStrategy`],
@@ -61,47 +54,33 @@ const se_CreateConfigurationCommand = async (input, context) => {
61
54
  name: [, , `Name`],
62
55
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
63
56
  }));
64
- return new protocol_http_1.HttpRequest({
65
- protocol,
66
- hostname,
67
- port,
68
- method: "POST",
69
- headers,
70
- path: resolvedPath,
71
- body,
72
- });
57
+ b.m("POST").h(headers).b(body);
58
+ return b.build();
73
59
  };
74
60
  exports.se_CreateConfigurationCommand = se_CreateConfigurationCommand;
75
61
  const se_CreateTagsCommand = async (input, context) => {
76
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = (0, core_1.requestBuilder)(input, context);
77
63
  const headers = {
78
64
  "content-type": "application/json",
79
65
  };
80
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}";
81
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
66
+ b.bp("/v1/tags/{ResourceArn}");
67
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
82
68
  let body;
83
69
  body = JSON.stringify((0, smithy_client_1.take)(input, {
84
70
  tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
85
71
  }));
86
- return new protocol_http_1.HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "POST",
91
- headers,
92
- path: resolvedPath,
93
- body,
94
- });
72
+ b.m("POST").h(headers).b(body);
73
+ return b.build();
95
74
  };
96
75
  exports.se_CreateTagsCommand = se_CreateTagsCommand;
97
76
  const se_CreateUserCommand = async (input, context) => {
98
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const b = (0, core_1.requestBuilder)(input, context);
99
78
  const headers = {
100
79
  "content-type": "application/json",
101
80
  };
102
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users/{Username}";
103
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
104
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
81
+ b.bp("/v1/brokers/{BrokerId}/users/{Username}");
82
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
83
+ b.p("Username", () => input.Username, "{Username}", false);
105
84
  let body;
106
85
  body = JSON.stringify((0, smithy_client_1.take)(input, {
107
86
  consoleAccess: [, , `ConsoleAccess`],
@@ -109,343 +88,215 @@ const se_CreateUserCommand = async (input, context) => {
109
88
  password: [, , `Password`],
110
89
  replicationUser: [, , `ReplicationUser`],
111
90
  }));
112
- return new protocol_http_1.HttpRequest({
113
- protocol,
114
- hostname,
115
- port,
116
- method: "POST",
117
- headers,
118
- path: resolvedPath,
119
- body,
120
- });
91
+ b.m("POST").h(headers).b(body);
92
+ return b.build();
121
93
  };
122
94
  exports.se_CreateUserCommand = se_CreateUserCommand;
123
95
  const se_DeleteBrokerCommand = async (input, context) => {
124
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
96
+ const b = (0, core_1.requestBuilder)(input, context);
125
97
  const headers = {};
126
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}";
127
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
98
+ b.bp("/v1/brokers/{BrokerId}");
99
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
128
100
  let body;
129
- return new protocol_http_1.HttpRequest({
130
- protocol,
131
- hostname,
132
- port,
133
- method: "DELETE",
134
- headers,
135
- path: resolvedPath,
136
- body,
137
- });
101
+ b.m("DELETE").h(headers).b(body);
102
+ return b.build();
138
103
  };
139
104
  exports.se_DeleteBrokerCommand = se_DeleteBrokerCommand;
140
105
  const se_DeleteTagsCommand = async (input, context) => {
141
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
106
+ const b = (0, core_1.requestBuilder)(input, context);
142
107
  const headers = {};
143
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}";
144
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
108
+ b.bp("/v1/tags/{ResourceArn}");
109
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
145
110
  const query = (0, smithy_client_1.map)({
146
- tagKeys: [
111
+ [_tK]: [
147
112
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
148
- () => (input.TagKeys || []).map((_entry) => _entry),
113
+ () => (input[_TK] || []).map((_entry) => _entry),
149
114
  ],
150
115
  });
151
116
  let body;
152
- return new protocol_http_1.HttpRequest({
153
- protocol,
154
- hostname,
155
- port,
156
- method: "DELETE",
157
- headers,
158
- path: resolvedPath,
159
- query,
160
- body,
161
- });
117
+ b.m("DELETE").h(headers).q(query).b(body);
118
+ return b.build();
162
119
  };
163
120
  exports.se_DeleteTagsCommand = se_DeleteTagsCommand;
164
121
  const se_DeleteUserCommand = async (input, context) => {
165
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
122
+ const b = (0, core_1.requestBuilder)(input, context);
166
123
  const headers = {};
167
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users/{Username}";
168
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
169
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
124
+ b.bp("/v1/brokers/{BrokerId}/users/{Username}");
125
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
126
+ b.p("Username", () => input.Username, "{Username}", false);
170
127
  let body;
171
- return new protocol_http_1.HttpRequest({
172
- protocol,
173
- hostname,
174
- port,
175
- method: "DELETE",
176
- headers,
177
- path: resolvedPath,
178
- body,
179
- });
128
+ b.m("DELETE").h(headers).b(body);
129
+ return b.build();
180
130
  };
181
131
  exports.se_DeleteUserCommand = se_DeleteUserCommand;
182
132
  const se_DescribeBrokerCommand = async (input, context) => {
183
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
133
+ const b = (0, core_1.requestBuilder)(input, context);
184
134
  const headers = {};
185
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}";
186
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
135
+ b.bp("/v1/brokers/{BrokerId}");
136
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
187
137
  let body;
188
- return new protocol_http_1.HttpRequest({
189
- protocol,
190
- hostname,
191
- port,
192
- method: "GET",
193
- headers,
194
- path: resolvedPath,
195
- body,
196
- });
138
+ b.m("GET").h(headers).b(body);
139
+ return b.build();
197
140
  };
198
141
  exports.se_DescribeBrokerCommand = se_DescribeBrokerCommand;
199
142
  const se_DescribeBrokerEngineTypesCommand = async (input, context) => {
200
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
143
+ const b = (0, core_1.requestBuilder)(input, context);
201
144
  const headers = {};
202
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/broker-engine-types";
145
+ b.bp("/v1/broker-engine-types");
203
146
  const query = (0, smithy_client_1.map)({
204
- engineType: [, input.EngineType],
205
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
206
- nextToken: [, input.NextToken],
147
+ [_eT]: [, input[_ET]],
148
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
149
+ [_nT]: [, input[_NT]],
207
150
  });
208
151
  let body;
209
- return new protocol_http_1.HttpRequest({
210
- protocol,
211
- hostname,
212
- port,
213
- method: "GET",
214
- headers,
215
- path: resolvedPath,
216
- query,
217
- body,
218
- });
152
+ b.m("GET").h(headers).q(query).b(body);
153
+ return b.build();
219
154
  };
220
155
  exports.se_DescribeBrokerEngineTypesCommand = se_DescribeBrokerEngineTypesCommand;
221
156
  const se_DescribeBrokerInstanceOptionsCommand = async (input, context) => {
222
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const b = (0, core_1.requestBuilder)(input, context);
223
158
  const headers = {};
224
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/broker-instance-options";
159
+ b.bp("/v1/broker-instance-options");
225
160
  const query = (0, smithy_client_1.map)({
226
- engineType: [, input.EngineType],
227
- hostInstanceType: [, input.HostInstanceType],
228
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
229
- nextToken: [, input.NextToken],
230
- storageType: [, input.StorageType],
161
+ [_eT]: [, input[_ET]],
162
+ [_hIT]: [, input[_HIT]],
163
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
164
+ [_nT]: [, input[_NT]],
165
+ [_sT]: [, input[_ST]],
231
166
  });
232
167
  let body;
233
- return new protocol_http_1.HttpRequest({
234
- protocol,
235
- hostname,
236
- port,
237
- method: "GET",
238
- headers,
239
- path: resolvedPath,
240
- query,
241
- body,
242
- });
168
+ b.m("GET").h(headers).q(query).b(body);
169
+ return b.build();
243
170
  };
244
171
  exports.se_DescribeBrokerInstanceOptionsCommand = se_DescribeBrokerInstanceOptionsCommand;
245
172
  const se_DescribeConfigurationCommand = async (input, context) => {
246
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
173
+ const b = (0, core_1.requestBuilder)(input, context);
247
174
  const headers = {};
248
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations/{ConfigurationId}";
249
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
175
+ b.bp("/v1/configurations/{ConfigurationId}");
176
+ b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
250
177
  let body;
251
- return new protocol_http_1.HttpRequest({
252
- protocol,
253
- hostname,
254
- port,
255
- method: "GET",
256
- headers,
257
- path: resolvedPath,
258
- body,
259
- });
178
+ b.m("GET").h(headers).b(body);
179
+ return b.build();
260
180
  };
261
181
  exports.se_DescribeConfigurationCommand = se_DescribeConfigurationCommand;
262
182
  const se_DescribeConfigurationRevisionCommand = async (input, context) => {
263
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = (0, core_1.requestBuilder)(input, context);
264
184
  const headers = {};
265
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
266
- "/v1/configurations/{ConfigurationId}/revisions/{ConfigurationRevision}";
267
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
268
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConfigurationRevision", () => input.ConfigurationRevision, "{ConfigurationRevision}", false);
185
+ b.bp("/v1/configurations/{ConfigurationId}/revisions/{ConfigurationRevision}");
186
+ b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
187
+ b.p("ConfigurationRevision", () => input.ConfigurationRevision, "{ConfigurationRevision}", false);
269
188
  let body;
270
- return new protocol_http_1.HttpRequest({
271
- protocol,
272
- hostname,
273
- port,
274
- method: "GET",
275
- headers,
276
- path: resolvedPath,
277
- body,
278
- });
189
+ b.m("GET").h(headers).b(body);
190
+ return b.build();
279
191
  };
280
192
  exports.se_DescribeConfigurationRevisionCommand = se_DescribeConfigurationRevisionCommand;
281
193
  const se_DescribeUserCommand = async (input, context) => {
282
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
194
+ const b = (0, core_1.requestBuilder)(input, context);
283
195
  const headers = {};
284
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users/{Username}";
285
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
286
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
196
+ b.bp("/v1/brokers/{BrokerId}/users/{Username}");
197
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
198
+ b.p("Username", () => input.Username, "{Username}", false);
287
199
  let body;
288
- return new protocol_http_1.HttpRequest({
289
- protocol,
290
- hostname,
291
- port,
292
- method: "GET",
293
- headers,
294
- path: resolvedPath,
295
- body,
296
- });
200
+ b.m("GET").h(headers).b(body);
201
+ return b.build();
297
202
  };
298
203
  exports.se_DescribeUserCommand = se_DescribeUserCommand;
299
204
  const se_ListBrokersCommand = async (input, context) => {
300
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
+ const b = (0, core_1.requestBuilder)(input, context);
301
206
  const headers = {};
302
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers";
207
+ b.bp("/v1/brokers");
303
208
  const query = (0, smithy_client_1.map)({
304
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
305
- nextToken: [, input.NextToken],
209
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
210
+ [_nT]: [, input[_NT]],
306
211
  });
307
212
  let body;
308
- return new protocol_http_1.HttpRequest({
309
- protocol,
310
- hostname,
311
- port,
312
- method: "GET",
313
- headers,
314
- path: resolvedPath,
315
- query,
316
- body,
317
- });
213
+ b.m("GET").h(headers).q(query).b(body);
214
+ return b.build();
318
215
  };
319
216
  exports.se_ListBrokersCommand = se_ListBrokersCommand;
320
217
  const se_ListConfigurationRevisionsCommand = async (input, context) => {
321
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
218
+ const b = (0, core_1.requestBuilder)(input, context);
322
219
  const headers = {};
323
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
324
- "/v1/configurations/{ConfigurationId}/revisions";
325
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
220
+ b.bp("/v1/configurations/{ConfigurationId}/revisions");
221
+ b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
326
222
  const query = (0, smithy_client_1.map)({
327
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
328
- nextToken: [, input.NextToken],
223
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
224
+ [_nT]: [, input[_NT]],
329
225
  });
330
226
  let body;
331
- return new protocol_http_1.HttpRequest({
332
- protocol,
333
- hostname,
334
- port,
335
- method: "GET",
336
- headers,
337
- path: resolvedPath,
338
- query,
339
- body,
340
- });
227
+ b.m("GET").h(headers).q(query).b(body);
228
+ return b.build();
341
229
  };
342
230
  exports.se_ListConfigurationRevisionsCommand = se_ListConfigurationRevisionsCommand;
343
231
  const se_ListConfigurationsCommand = async (input, context) => {
344
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
232
+ const b = (0, core_1.requestBuilder)(input, context);
345
233
  const headers = {};
346
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations";
234
+ b.bp("/v1/configurations");
347
235
  const query = (0, smithy_client_1.map)({
348
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
349
- nextToken: [, input.NextToken],
236
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
237
+ [_nT]: [, input[_NT]],
350
238
  });
351
239
  let body;
352
- return new protocol_http_1.HttpRequest({
353
- protocol,
354
- hostname,
355
- port,
356
- method: "GET",
357
- headers,
358
- path: resolvedPath,
359
- query,
360
- body,
361
- });
240
+ b.m("GET").h(headers).q(query).b(body);
241
+ return b.build();
362
242
  };
363
243
  exports.se_ListConfigurationsCommand = se_ListConfigurationsCommand;
364
244
  const se_ListTagsCommand = async (input, context) => {
365
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
245
+ const b = (0, core_1.requestBuilder)(input, context);
366
246
  const headers = {};
367
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}";
368
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
247
+ b.bp("/v1/tags/{ResourceArn}");
248
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
369
249
  let body;
370
- return new protocol_http_1.HttpRequest({
371
- protocol,
372
- hostname,
373
- port,
374
- method: "GET",
375
- headers,
376
- path: resolvedPath,
377
- body,
378
- });
250
+ b.m("GET").h(headers).b(body);
251
+ return b.build();
379
252
  };
380
253
  exports.se_ListTagsCommand = se_ListTagsCommand;
381
254
  const se_ListUsersCommand = async (input, context) => {
382
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const b = (0, core_1.requestBuilder)(input, context);
383
256
  const headers = {};
384
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users";
385
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
257
+ b.bp("/v1/brokers/{BrokerId}/users");
258
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
386
259
  const query = (0, smithy_client_1.map)({
387
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
388
- nextToken: [, input.NextToken],
260
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
261
+ [_nT]: [, input[_NT]],
389
262
  });
390
263
  let body;
391
- return new protocol_http_1.HttpRequest({
392
- protocol,
393
- hostname,
394
- port,
395
- method: "GET",
396
- headers,
397
- path: resolvedPath,
398
- query,
399
- body,
400
- });
264
+ b.m("GET").h(headers).q(query).b(body);
265
+ return b.build();
401
266
  };
402
267
  exports.se_ListUsersCommand = se_ListUsersCommand;
403
268
  const se_PromoteCommand = async (input, context) => {
404
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
269
+ const b = (0, core_1.requestBuilder)(input, context);
405
270
  const headers = {
406
271
  "content-type": "application/json",
407
272
  };
408
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/promote";
409
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
273
+ b.bp("/v1/brokers/{BrokerId}/promote");
274
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
410
275
  let body;
411
276
  body = JSON.stringify((0, smithy_client_1.take)(input, {
412
277
  mode: [, , `Mode`],
413
278
  }));
414
- return new protocol_http_1.HttpRequest({
415
- protocol,
416
- hostname,
417
- port,
418
- method: "POST",
419
- headers,
420
- path: resolvedPath,
421
- body,
422
- });
279
+ b.m("POST").h(headers).b(body);
280
+ return b.build();
423
281
  };
424
282
  exports.se_PromoteCommand = se_PromoteCommand;
425
283
  const se_RebootBrokerCommand = async (input, context) => {
426
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
284
+ const b = (0, core_1.requestBuilder)(input, context);
427
285
  const headers = {};
428
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/reboot";
429
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
286
+ b.bp("/v1/brokers/{BrokerId}/reboot");
287
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
430
288
  let body;
431
- return new protocol_http_1.HttpRequest({
432
- protocol,
433
- hostname,
434
- port,
435
- method: "POST",
436
- headers,
437
- path: resolvedPath,
438
- body,
439
- });
289
+ b.m("POST").h(headers).b(body);
290
+ return b.build();
440
291
  };
441
292
  exports.se_RebootBrokerCommand = se_RebootBrokerCommand;
442
293
  const se_UpdateBrokerCommand = async (input, context) => {
443
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
294
+ const b = (0, core_1.requestBuilder)(input, context);
444
295
  const headers = {
445
296
  "content-type": "application/json",
446
297
  };
447
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}";
448
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
298
+ b.bp("/v1/brokers/{BrokerId}");
299
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
449
300
  let body;
450
301
  body = JSON.stringify((0, smithy_client_1.take)(input, {
451
302
  authenticationStrategy: [, , `AuthenticationStrategy`],
@@ -459,48 +310,34 @@ const se_UpdateBrokerCommand = async (input, context) => {
459
310
  maintenanceWindowStartTime: [, (_) => se_WeeklyStartTime(_, context), `MaintenanceWindowStartTime`],
460
311
  securityGroups: [, (_) => (0, smithy_client_1._json)(_), `SecurityGroups`],
461
312
  }));
462
- return new protocol_http_1.HttpRequest({
463
- protocol,
464
- hostname,
465
- port,
466
- method: "PUT",
467
- headers,
468
- path: resolvedPath,
469
- body,
470
- });
313
+ b.m("PUT").h(headers).b(body);
314
+ return b.build();
471
315
  };
472
316
  exports.se_UpdateBrokerCommand = se_UpdateBrokerCommand;
473
317
  const se_UpdateConfigurationCommand = async (input, context) => {
474
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
318
+ const b = (0, core_1.requestBuilder)(input, context);
475
319
  const headers = {
476
320
  "content-type": "application/json",
477
321
  };
478
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations/{ConfigurationId}";
479
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
322
+ b.bp("/v1/configurations/{ConfigurationId}");
323
+ b.p("ConfigurationId", () => input.ConfigurationId, "{ConfigurationId}", false);
480
324
  let body;
481
325
  body = JSON.stringify((0, smithy_client_1.take)(input, {
482
326
  data: [, , `Data`],
483
327
  description: [, , `Description`],
484
328
  }));
485
- return new protocol_http_1.HttpRequest({
486
- protocol,
487
- hostname,
488
- port,
489
- method: "PUT",
490
- headers,
491
- path: resolvedPath,
492
- body,
493
- });
329
+ b.m("PUT").h(headers).b(body);
330
+ return b.build();
494
331
  };
495
332
  exports.se_UpdateConfigurationCommand = se_UpdateConfigurationCommand;
496
333
  const se_UpdateUserCommand = async (input, context) => {
497
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
334
+ const b = (0, core_1.requestBuilder)(input, context);
498
335
  const headers = {
499
336
  "content-type": "application/json",
500
337
  };
501
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}/users/{Username}";
502
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BrokerId", () => input.BrokerId, "{BrokerId}", false);
503
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Username", () => input.Username, "{Username}", false);
338
+ b.bp("/v1/brokers/{BrokerId}/users/{Username}");
339
+ b.p("BrokerId", () => input.BrokerId, "{BrokerId}", false);
340
+ b.p("Username", () => input.Username, "{Username}", false);
504
341
  let body;
505
342
  body = JSON.stringify((0, smithy_client_1.take)(input, {
506
343
  consoleAccess: [, , `ConsoleAccess`],
@@ -508,15 +345,8 @@ const se_UpdateUserCommand = async (input, context) => {
508
345
  password: [, , `Password`],
509
346
  replicationUser: [, , `ReplicationUser`],
510
347
  }));
511
- return new protocol_http_1.HttpRequest({
512
- protocol,
513
- hostname,
514
- port,
515
- method: "PUT",
516
- headers,
517
- path: resolvedPath,
518
- body,
519
- });
348
+ b.m("PUT").h(headers).b(body);
349
+ return b.build();
520
350
  };
521
351
  exports.se_UpdateUserCommand = se_UpdateUserCommand;
522
352
  const de_CreateBrokerCommand = async (output, context) => {
@@ -1995,6 +1825,18 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1995
1825
  value !== "" &&
1996
1826
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1997
1827
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1828
+ const _ET = "EngineType";
1829
+ const _HIT = "HostInstanceType";
1830
+ const _MR = "MaxResults";
1831
+ const _NT = "NextToken";
1832
+ const _ST = "StorageType";
1833
+ const _TK = "TagKeys";
1834
+ const _eT = "engineType";
1835
+ const _hIT = "hostInstanceType";
1836
+ const _mR = "maxResults";
1837
+ const _nT = "nextToken";
1838
+ const _sT = "storageType";
1839
+ const _tK = "tagKeys";
1998
1840
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1999
1841
  if (encoded.length) {
2000
1842
  return JSON.parse(encoded);