@aws-sdk/client-amp 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.
@@ -3,66 +3,50 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PutRuleGroupsNamespaceCommand = exports.de_PutAlertManagerDefinitionCommand = exports.de_ListWorkspacesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListScrapersCommand = exports.de_ListRuleGroupsNamespacesCommand = exports.de_GetDefaultScraperConfigurationCommand = exports.de_DescribeWorkspaceCommand = exports.de_DescribeScraperCommand = exports.de_DescribeRuleGroupsNamespaceCommand = exports.de_DescribeLoggingConfigurationCommand = exports.de_DescribeAlertManagerDefinitionCommand = exports.de_DeleteWorkspaceCommand = exports.de_DeleteScraperCommand = exports.de_DeleteRuleGroupsNamespaceCommand = exports.de_DeleteLoggingConfigurationCommand = exports.de_DeleteAlertManagerDefinitionCommand = exports.de_CreateWorkspaceCommand = exports.de_CreateScraperCommand = exports.de_CreateRuleGroupsNamespaceCommand = exports.de_CreateLoggingConfigurationCommand = exports.de_CreateAlertManagerDefinitionCommand = exports.se_UpdateWorkspaceAliasCommand = exports.se_UpdateLoggingConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PutRuleGroupsNamespaceCommand = exports.se_PutAlertManagerDefinitionCommand = exports.se_ListWorkspacesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListScrapersCommand = exports.se_ListRuleGroupsNamespacesCommand = exports.se_GetDefaultScraperConfigurationCommand = exports.se_DescribeWorkspaceCommand = exports.se_DescribeScraperCommand = exports.se_DescribeRuleGroupsNamespaceCommand = exports.se_DescribeLoggingConfigurationCommand = exports.se_DescribeAlertManagerDefinitionCommand = exports.se_DeleteWorkspaceCommand = exports.se_DeleteScraperCommand = exports.se_DeleteRuleGroupsNamespaceCommand = exports.se_DeleteLoggingConfigurationCommand = exports.se_DeleteAlertManagerDefinitionCommand = exports.se_CreateWorkspaceCommand = exports.se_CreateScraperCommand = exports.se_CreateRuleGroupsNamespaceCommand = exports.se_CreateLoggingConfigurationCommand = exports.se_CreateAlertManagerDefinitionCommand = void 0;
4
4
  exports.de_UpdateWorkspaceAliasCommand = exports.de_UpdateLoggingConfigurationCommand = void 0;
5
5
  const core_1 = require("@aws-sdk/core");
6
- const protocol_http_1 = require("@smithy/protocol-http");
6
+ const core_2 = require("@smithy/core");
7
7
  const smithy_client_1 = require("@smithy/smithy-client");
8
8
  const uuid_1 = require("uuid");
9
9
  const AmpServiceException_1 = require("../models/AmpServiceException");
10
10
  const models_0_1 = require("../models/models_0");
11
11
  const se_CreateAlertManagerDefinitionCommand = async (input, context) => {
12
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
12
+ const b = (0, core_2.requestBuilder)(input, context);
13
13
  const headers = {
14
14
  "content-type": "application/json",
15
15
  };
16
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
17
- "/workspaces/{workspaceId}/alertmanager/definition";
18
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
16
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
17
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
19
18
  let body;
20
19
  body = JSON.stringify((0, smithy_client_1.take)(input, {
21
20
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
22
21
  data: (_) => context.base64Encoder(_),
23
22
  }));
24
- return new protocol_http_1.HttpRequest({
25
- protocol,
26
- hostname,
27
- port,
28
- method: "POST",
29
- headers,
30
- path: resolvedPath,
31
- body,
32
- });
23
+ b.m("POST").h(headers).b(body);
24
+ return b.build();
33
25
  };
34
26
  exports.se_CreateAlertManagerDefinitionCommand = se_CreateAlertManagerDefinitionCommand;
35
27
  const se_CreateLoggingConfigurationCommand = async (input, context) => {
36
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28
+ const b = (0, core_2.requestBuilder)(input, context);
37
29
  const headers = {
38
30
  "content-type": "application/json",
39
31
  };
40
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
41
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
32
+ b.bp("/workspaces/{workspaceId}/logging");
33
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
42
34
  let body;
43
35
  body = JSON.stringify((0, smithy_client_1.take)(input, {
44
36
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
45
37
  logGroupArn: [],
46
38
  }));
47
- return new protocol_http_1.HttpRequest({
48
- protocol,
49
- hostname,
50
- port,
51
- method: "POST",
52
- headers,
53
- path: resolvedPath,
54
- body,
55
- });
39
+ b.m("POST").h(headers).b(body);
40
+ return b.build();
56
41
  };
57
42
  exports.se_CreateLoggingConfigurationCommand = se_CreateLoggingConfigurationCommand;
58
43
  const se_CreateRuleGroupsNamespaceCommand = async (input, context) => {
59
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
44
+ const b = (0, core_2.requestBuilder)(input, context);
60
45
  const headers = {
61
46
  "content-type": "application/json",
62
47
  };
63
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
64
- "/workspaces/{workspaceId}/rulegroupsnamespaces";
65
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
48
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces");
49
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
66
50
  let body;
67
51
  body = JSON.stringify((0, smithy_client_1.take)(input, {
68
52
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -70,23 +54,16 @@ const se_CreateRuleGroupsNamespaceCommand = async (input, context) => {
70
54
  name: [],
71
55
  tags: (_) => (0, smithy_client_1._json)(_),
72
56
  }));
73
- return new protocol_http_1.HttpRequest({
74
- protocol,
75
- hostname,
76
- port,
77
- method: "POST",
78
- headers,
79
- path: resolvedPath,
80
- body,
81
- });
57
+ b.m("POST").h(headers).b(body);
58
+ return b.build();
82
59
  };
83
60
  exports.se_CreateRuleGroupsNamespaceCommand = se_CreateRuleGroupsNamespaceCommand;
84
61
  const se_CreateScraperCommand = async (input, context) => {
85
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = (0, core_2.requestBuilder)(input, context);
86
63
  const headers = {
87
64
  "content-type": "application/json",
88
65
  };
89
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scrapers";
66
+ b.bp("/scrapers");
90
67
  let body;
91
68
  body = JSON.stringify((0, smithy_client_1.take)(input, {
92
69
  alias: [],
@@ -96,479 +73,302 @@ const se_CreateScraperCommand = async (input, context) => {
96
73
  source: (_) => (0, smithy_client_1._json)(_),
97
74
  tags: (_) => (0, smithy_client_1._json)(_),
98
75
  }));
99
- return new protocol_http_1.HttpRequest({
100
- protocol,
101
- hostname,
102
- port,
103
- method: "POST",
104
- headers,
105
- path: resolvedPath,
106
- body,
107
- });
76
+ b.m("POST").h(headers).b(body);
77
+ return b.build();
108
78
  };
109
79
  exports.se_CreateScraperCommand = se_CreateScraperCommand;
110
80
  const se_CreateWorkspaceCommand = async (input, context) => {
111
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
81
+ const b = (0, core_2.requestBuilder)(input, context);
112
82
  const headers = {
113
83
  "content-type": "application/json",
114
84
  };
115
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
85
+ b.bp("/workspaces");
116
86
  let body;
117
87
  body = JSON.stringify((0, smithy_client_1.take)(input, {
118
88
  alias: [],
119
89
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
120
90
  tags: (_) => (0, smithy_client_1._json)(_),
121
91
  }));
122
- return new protocol_http_1.HttpRequest({
123
- protocol,
124
- hostname,
125
- port,
126
- method: "POST",
127
- headers,
128
- path: resolvedPath,
129
- body,
130
- });
92
+ b.m("POST").h(headers).b(body);
93
+ return b.build();
131
94
  };
132
95
  exports.se_CreateWorkspaceCommand = se_CreateWorkspaceCommand;
133
96
  const se_DeleteAlertManagerDefinitionCommand = async (input, context) => {
134
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
97
+ const b = (0, core_2.requestBuilder)(input, context);
135
98
  const headers = {};
136
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
137
- "/workspaces/{workspaceId}/alertmanager/definition";
138
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
99
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
100
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
139
101
  const query = (0, smithy_client_1.map)({
140
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
102
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
141
103
  });
142
104
  let body;
143
- return new protocol_http_1.HttpRequest({
144
- protocol,
145
- hostname,
146
- port,
147
- method: "DELETE",
148
- headers,
149
- path: resolvedPath,
150
- query,
151
- body,
152
- });
105
+ b.m("DELETE").h(headers).q(query).b(body);
106
+ return b.build();
153
107
  };
154
108
  exports.se_DeleteAlertManagerDefinitionCommand = se_DeleteAlertManagerDefinitionCommand;
155
109
  const se_DeleteLoggingConfigurationCommand = async (input, context) => {
156
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
110
+ const b = (0, core_2.requestBuilder)(input, context);
157
111
  const headers = {};
158
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
159
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
112
+ b.bp("/workspaces/{workspaceId}/logging");
113
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
160
114
  const query = (0, smithy_client_1.map)({
161
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
115
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
162
116
  });
163
117
  let body;
164
- return new protocol_http_1.HttpRequest({
165
- protocol,
166
- hostname,
167
- port,
168
- method: "DELETE",
169
- headers,
170
- path: resolvedPath,
171
- query,
172
- body,
173
- });
118
+ b.m("DELETE").h(headers).q(query).b(body);
119
+ return b.build();
174
120
  };
175
121
  exports.se_DeleteLoggingConfigurationCommand = se_DeleteLoggingConfigurationCommand;
176
122
  const se_DeleteRuleGroupsNamespaceCommand = async (input, context) => {
177
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
123
+ const b = (0, core_2.requestBuilder)(input, context);
178
124
  const headers = {};
179
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
180
- "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
181
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
182
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "name", () => input.name, "{name}", false);
125
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
126
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
127
+ b.p("name", () => input.name, "{name}", false);
183
128
  const query = (0, smithy_client_1.map)({
184
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
129
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
185
130
  });
186
131
  let body;
187
- return new protocol_http_1.HttpRequest({
188
- protocol,
189
- hostname,
190
- port,
191
- method: "DELETE",
192
- headers,
193
- path: resolvedPath,
194
- query,
195
- body,
196
- });
132
+ b.m("DELETE").h(headers).q(query).b(body);
133
+ return b.build();
197
134
  };
198
135
  exports.se_DeleteRuleGroupsNamespaceCommand = se_DeleteRuleGroupsNamespaceCommand;
199
136
  const se_DeleteScraperCommand = async (input, context) => {
200
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
137
+ const b = (0, core_2.requestBuilder)(input, context);
201
138
  const headers = {};
202
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scrapers/{scraperId}";
203
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "scraperId", () => input.scraperId, "{scraperId}", false);
139
+ b.bp("/scrapers/{scraperId}");
140
+ b.p("scraperId", () => input.scraperId, "{scraperId}", false);
204
141
  const query = (0, smithy_client_1.map)({
205
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
142
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
206
143
  });
207
144
  let body;
208
- return new protocol_http_1.HttpRequest({
209
- protocol,
210
- hostname,
211
- port,
212
- method: "DELETE",
213
- headers,
214
- path: resolvedPath,
215
- query,
216
- body,
217
- });
145
+ b.m("DELETE").h(headers).q(query).b(body);
146
+ return b.build();
218
147
  };
219
148
  exports.se_DeleteScraperCommand = se_DeleteScraperCommand;
220
149
  const se_DeleteWorkspaceCommand = async (input, context) => {
221
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
150
+ const b = (0, core_2.requestBuilder)(input, context);
222
151
  const headers = {};
223
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
224
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
152
+ b.bp("/workspaces/{workspaceId}");
153
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
225
154
  const query = (0, smithy_client_1.map)({
226
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
155
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
227
156
  });
228
157
  let body;
229
- return new protocol_http_1.HttpRequest({
230
- protocol,
231
- hostname,
232
- port,
233
- method: "DELETE",
234
- headers,
235
- path: resolvedPath,
236
- query,
237
- body,
238
- });
158
+ b.m("DELETE").h(headers).q(query).b(body);
159
+ return b.build();
239
160
  };
240
161
  exports.se_DeleteWorkspaceCommand = se_DeleteWorkspaceCommand;
241
162
  const se_DescribeAlertManagerDefinitionCommand = async (input, context) => {
242
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const b = (0, core_2.requestBuilder)(input, context);
243
164
  const headers = {};
244
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
245
- "/workspaces/{workspaceId}/alertmanager/definition";
246
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
165
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
166
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
247
167
  let body;
248
- return new protocol_http_1.HttpRequest({
249
- protocol,
250
- hostname,
251
- port,
252
- method: "GET",
253
- headers,
254
- path: resolvedPath,
255
- body,
256
- });
168
+ b.m("GET").h(headers).b(body);
169
+ return b.build();
257
170
  };
258
171
  exports.se_DescribeAlertManagerDefinitionCommand = se_DescribeAlertManagerDefinitionCommand;
259
172
  const se_DescribeLoggingConfigurationCommand = async (input, context) => {
260
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
173
+ const b = (0, core_2.requestBuilder)(input, context);
261
174
  const headers = {};
262
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
263
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
175
+ b.bp("/workspaces/{workspaceId}/logging");
176
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
264
177
  let body;
265
- return new protocol_http_1.HttpRequest({
266
- protocol,
267
- hostname,
268
- port,
269
- method: "GET",
270
- headers,
271
- path: resolvedPath,
272
- body,
273
- });
178
+ b.m("GET").h(headers).b(body);
179
+ return b.build();
274
180
  };
275
181
  exports.se_DescribeLoggingConfigurationCommand = se_DescribeLoggingConfigurationCommand;
276
182
  const se_DescribeRuleGroupsNamespaceCommand = async (input, context) => {
277
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = (0, core_2.requestBuilder)(input, context);
278
184
  const headers = {};
279
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
280
- "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
281
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
282
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "name", () => input.name, "{name}", false);
185
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
186
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
187
+ b.p("name", () => input.name, "{name}", false);
283
188
  let body;
284
- return new protocol_http_1.HttpRequest({
285
- protocol,
286
- hostname,
287
- port,
288
- method: "GET",
289
- headers,
290
- path: resolvedPath,
291
- body,
292
- });
189
+ b.m("GET").h(headers).b(body);
190
+ return b.build();
293
191
  };
294
192
  exports.se_DescribeRuleGroupsNamespaceCommand = se_DescribeRuleGroupsNamespaceCommand;
295
193
  const se_DescribeScraperCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
194
+ const b = (0, core_2.requestBuilder)(input, context);
297
195
  const headers = {};
298
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scrapers/{scraperId}";
299
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "scraperId", () => input.scraperId, "{scraperId}", false);
196
+ b.bp("/scrapers/{scraperId}");
197
+ b.p("scraperId", () => input.scraperId, "{scraperId}", false);
300
198
  let body;
301
- return new protocol_http_1.HttpRequest({
302
- protocol,
303
- hostname,
304
- port,
305
- method: "GET",
306
- headers,
307
- path: resolvedPath,
308
- body,
309
- });
199
+ b.m("GET").h(headers).b(body);
200
+ return b.build();
310
201
  };
311
202
  exports.se_DescribeScraperCommand = se_DescribeScraperCommand;
312
203
  const se_DescribeWorkspaceCommand = async (input, context) => {
313
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
204
+ const b = (0, core_2.requestBuilder)(input, context);
314
205
  const headers = {};
315
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
316
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
206
+ b.bp("/workspaces/{workspaceId}");
207
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
317
208
  let body;
318
- return new protocol_http_1.HttpRequest({
319
- protocol,
320
- hostname,
321
- port,
322
- method: "GET",
323
- headers,
324
- path: resolvedPath,
325
- body,
326
- });
209
+ b.m("GET").h(headers).b(body);
210
+ return b.build();
327
211
  };
328
212
  exports.se_DescribeWorkspaceCommand = se_DescribeWorkspaceCommand;
329
213
  const se_GetDefaultScraperConfigurationCommand = async (input, context) => {
330
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
214
+ const b = (0, core_2.requestBuilder)(input, context);
331
215
  const headers = {
332
216
  "content-type": "application/json",
333
217
  };
334
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scraperconfiguration";
218
+ b.bp("/scraperconfiguration");
335
219
  let body;
336
220
  body = "";
337
- return new protocol_http_1.HttpRequest({
338
- protocol,
339
- hostname,
340
- port,
341
- method: "GET",
342
- headers,
343
- path: resolvedPath,
344
- body,
345
- });
221
+ b.m("GET").h(headers).b(body);
222
+ return b.build();
346
223
  };
347
224
  exports.se_GetDefaultScraperConfigurationCommand = se_GetDefaultScraperConfigurationCommand;
348
225
  const se_ListRuleGroupsNamespacesCommand = async (input, context) => {
349
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
226
+ const b = (0, core_2.requestBuilder)(input, context);
350
227
  const headers = {};
351
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
352
- "/workspaces/{workspaceId}/rulegroupsnamespaces";
353
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
228
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces");
229
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
354
230
  const query = (0, smithy_client_1.map)({
355
- name: [, input.name],
356
- nextToken: [, input.nextToken],
357
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
231
+ [_n]: [, input[_n]],
232
+ [_nT]: [, input[_nT]],
233
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
358
234
  });
359
235
  let body;
360
- return new protocol_http_1.HttpRequest({
361
- protocol,
362
- hostname,
363
- port,
364
- method: "GET",
365
- headers,
366
- path: resolvedPath,
367
- query,
368
- body,
369
- });
236
+ b.m("GET").h(headers).q(query).b(body);
237
+ return b.build();
370
238
  };
371
239
  exports.se_ListRuleGroupsNamespacesCommand = se_ListRuleGroupsNamespacesCommand;
372
240
  const se_ListScrapersCommand = async (input, context) => {
373
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
241
+ const b = (0, core_2.requestBuilder)(input, context);
374
242
  const headers = {};
375
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scrapers";
243
+ b.bp("/scrapers");
376
244
  const query = (0, smithy_client_1.map)({
377
245
  ...(0, smithy_client_1.convertMap)(input.filters),
378
- nextToken: [, input.nextToken],
379
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
246
+ [_nT]: [, input[_nT]],
247
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
380
248
  });
381
249
  let body;
382
- return new protocol_http_1.HttpRequest({
383
- protocol,
384
- hostname,
385
- port,
386
- method: "GET",
387
- headers,
388
- path: resolvedPath,
389
- query,
390
- body,
391
- });
250
+ b.m("GET").h(headers).q(query).b(body);
251
+ return b.build();
392
252
  };
393
253
  exports.se_ListScrapersCommand = se_ListScrapersCommand;
394
254
  const se_ListTagsForResourceCommand = async (input, context) => {
395
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const b = (0, core_2.requestBuilder)(input, context);
396
256
  const headers = {};
397
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
398
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
257
+ b.bp("/tags/{resourceArn}");
258
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
399
259
  let body;
400
- return new protocol_http_1.HttpRequest({
401
- protocol,
402
- hostname,
403
- port,
404
- method: "GET",
405
- headers,
406
- path: resolvedPath,
407
- body,
408
- });
260
+ b.m("GET").h(headers).b(body);
261
+ return b.build();
409
262
  };
410
263
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
411
264
  const se_ListWorkspacesCommand = async (input, context) => {
412
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
265
+ const b = (0, core_2.requestBuilder)(input, context);
413
266
  const headers = {};
414
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
267
+ b.bp("/workspaces");
415
268
  const query = (0, smithy_client_1.map)({
416
- nextToken: [, input.nextToken],
417
- alias: [, input.alias],
418
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
269
+ [_nT]: [, input[_nT]],
270
+ [_a]: [, input[_a]],
271
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
419
272
  });
420
273
  let body;
421
- return new protocol_http_1.HttpRequest({
422
- protocol,
423
- hostname,
424
- port,
425
- method: "GET",
426
- headers,
427
- path: resolvedPath,
428
- query,
429
- body,
430
- });
274
+ b.m("GET").h(headers).q(query).b(body);
275
+ return b.build();
431
276
  };
432
277
  exports.se_ListWorkspacesCommand = se_ListWorkspacesCommand;
433
278
  const se_PutAlertManagerDefinitionCommand = async (input, context) => {
434
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
279
+ const b = (0, core_2.requestBuilder)(input, context);
435
280
  const headers = {
436
281
  "content-type": "application/json",
437
282
  };
438
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
439
- "/workspaces/{workspaceId}/alertmanager/definition";
440
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
283
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
284
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
441
285
  let body;
442
286
  body = JSON.stringify((0, smithy_client_1.take)(input, {
443
287
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
444
288
  data: (_) => context.base64Encoder(_),
445
289
  }));
446
- return new protocol_http_1.HttpRequest({
447
- protocol,
448
- hostname,
449
- port,
450
- method: "PUT",
451
- headers,
452
- path: resolvedPath,
453
- body,
454
- });
290
+ b.m("PUT").h(headers).b(body);
291
+ return b.build();
455
292
  };
456
293
  exports.se_PutAlertManagerDefinitionCommand = se_PutAlertManagerDefinitionCommand;
457
294
  const se_PutRuleGroupsNamespaceCommand = async (input, context) => {
458
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
295
+ const b = (0, core_2.requestBuilder)(input, context);
459
296
  const headers = {
460
297
  "content-type": "application/json",
461
298
  };
462
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
463
- "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
464
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
465
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "name", () => input.name, "{name}", false);
299
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
300
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
301
+ b.p("name", () => input.name, "{name}", false);
466
302
  let body;
467
303
  body = JSON.stringify((0, smithy_client_1.take)(input, {
468
304
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
469
305
  data: (_) => context.base64Encoder(_),
470
306
  }));
471
- return new protocol_http_1.HttpRequest({
472
- protocol,
473
- hostname,
474
- port,
475
- method: "PUT",
476
- headers,
477
- path: resolvedPath,
478
- body,
479
- });
307
+ b.m("PUT").h(headers).b(body);
308
+ return b.build();
480
309
  };
481
310
  exports.se_PutRuleGroupsNamespaceCommand = se_PutRuleGroupsNamespaceCommand;
482
311
  const se_TagResourceCommand = async (input, context) => {
483
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
312
+ const b = (0, core_2.requestBuilder)(input, context);
484
313
  const headers = {
485
314
  "content-type": "application/json",
486
315
  };
487
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
488
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
316
+ b.bp("/tags/{resourceArn}");
317
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
489
318
  let body;
490
319
  body = JSON.stringify((0, smithy_client_1.take)(input, {
491
320
  tags: (_) => (0, smithy_client_1._json)(_),
492
321
  }));
493
- return new protocol_http_1.HttpRequest({
494
- protocol,
495
- hostname,
496
- port,
497
- method: "POST",
498
- headers,
499
- path: resolvedPath,
500
- body,
501
- });
322
+ b.m("POST").h(headers).b(body);
323
+ return b.build();
502
324
  };
503
325
  exports.se_TagResourceCommand = se_TagResourceCommand;
504
326
  const se_UntagResourceCommand = async (input, context) => {
505
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
327
+ const b = (0, core_2.requestBuilder)(input, context);
506
328
  const headers = {};
507
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
508
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
329
+ b.bp("/tags/{resourceArn}");
330
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
509
331
  const query = (0, smithy_client_1.map)({
510
- tagKeys: [
332
+ [_tK]: [
511
333
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
512
- () => (input.tagKeys || []).map((_entry) => _entry),
334
+ () => (input[_tK] || []).map((_entry) => _entry),
513
335
  ],
514
336
  });
515
337
  let body;
516
- return new protocol_http_1.HttpRequest({
517
- protocol,
518
- hostname,
519
- port,
520
- method: "DELETE",
521
- headers,
522
- path: resolvedPath,
523
- query,
524
- body,
525
- });
338
+ b.m("DELETE").h(headers).q(query).b(body);
339
+ return b.build();
526
340
  };
527
341
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
528
342
  const se_UpdateLoggingConfigurationCommand = async (input, context) => {
529
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
343
+ const b = (0, core_2.requestBuilder)(input, context);
530
344
  const headers = {
531
345
  "content-type": "application/json",
532
346
  };
533
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
534
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
347
+ b.bp("/workspaces/{workspaceId}/logging");
348
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
535
349
  let body;
536
350
  body = JSON.stringify((0, smithy_client_1.take)(input, {
537
351
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
538
352
  logGroupArn: [],
539
353
  }));
540
- return new protocol_http_1.HttpRequest({
541
- protocol,
542
- hostname,
543
- port,
544
- method: "PUT",
545
- headers,
546
- path: resolvedPath,
547
- body,
548
- });
354
+ b.m("PUT").h(headers).b(body);
355
+ return b.build();
549
356
  };
550
357
  exports.se_UpdateLoggingConfigurationCommand = se_UpdateLoggingConfigurationCommand;
551
358
  const se_UpdateWorkspaceAliasCommand = async (input, context) => {
552
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
359
+ const b = (0, core_2.requestBuilder)(input, context);
553
360
  const headers = {
554
361
  "content-type": "application/json",
555
362
  };
556
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/alias";
557
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
363
+ b.bp("/workspaces/{workspaceId}/alias");
364
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
558
365
  let body;
559
366
  body = JSON.stringify((0, smithy_client_1.take)(input, {
560
367
  alias: [],
561
368
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
562
369
  }));
563
- return new protocol_http_1.HttpRequest({
564
- protocol,
565
- hostname,
566
- port,
567
- method: "POST",
568
- headers,
569
- path: resolvedPath,
570
- body,
571
- });
370
+ b.m("POST").h(headers).b(body);
371
+ return b.build();
572
372
  };
573
373
  exports.se_UpdateWorkspaceAliasCommand = se_UpdateWorkspaceAliasCommand;
574
374
  const de_CreateAlertManagerDefinitionCommand = async (output, context) => {
@@ -1819,10 +1619,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1819
1619
  };
1820
1620
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1821
1621
  const contents = (0, smithy_client_1.map)({
1822
- retryAfterSeconds: [
1823
- () => void 0 !== parsedOutput.headers["retry-after"],
1824
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1825
- ],
1622
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1826
1623
  });
1827
1624
  const data = parsedOutput.body;
1828
1625
  const doc = (0, smithy_client_1.take)(data, {
@@ -1869,10 +1666,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1869
1666
  };
1870
1667
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1871
1668
  const contents = (0, smithy_client_1.map)({
1872
- retryAfterSeconds: [
1873
- () => void 0 !== parsedOutput.headers["retry-after"],
1874
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1875
- ],
1669
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1876
1670
  });
1877
1671
  const data = parsedOutput.body;
1878
1672
  const doc = (0, smithy_client_1.take)(data, {
@@ -2042,6 +1836,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2042
1836
  value !== "" &&
2043
1837
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2044
1838
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1839
+ const _a = "alias";
1840
+ const _cT = "clientToken";
1841
+ const _mR = "maxResults";
1842
+ const _n = "name";
1843
+ const _nT = "nextToken";
1844
+ const _rAS = "retryAfterSeconds";
1845
+ const _ra = "retry-after";
1846
+ const _tK = "tagKeys";
2045
1847
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2046
1848
  if (encoded.length) {
2047
1849
  return JSON.parse(encoded);