@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.
@@ -1,62 +1,46 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, convertMap, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
+ import { _json, collectBody, convertMap, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { AmpServiceException as __BaseException } from "../models/AmpServiceException";
6
6
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ScrapeConfiguration, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
7
7
  export const se_CreateAlertManagerDefinitionCommand = async (input, context) => {
8
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const b = rb(input, context);
9
9
  const headers = {
10
10
  "content-type": "application/json",
11
11
  };
12
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
13
- "/workspaces/{workspaceId}/alertmanager/definition";
14
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
12
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
13
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
15
14
  let body;
16
15
  body = JSON.stringify(take(input, {
17
16
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
18
17
  data: (_) => context.base64Encoder(_),
19
18
  }));
20
- return new __HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "POST",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
29
21
  };
30
22
  export const se_CreateLoggingConfigurationCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
23
+ const b = rb(input, context);
32
24
  const headers = {
33
25
  "content-type": "application/json",
34
26
  };
35
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
36
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
27
+ b.bp("/workspaces/{workspaceId}/logging");
28
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
37
29
  let body;
38
30
  body = JSON.stringify(take(input, {
39
31
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
40
32
  logGroupArn: [],
41
33
  }));
42
- return new __HttpRequest({
43
- protocol,
44
- hostname,
45
- port,
46
- method: "POST",
47
- headers,
48
- path: resolvedPath,
49
- body,
50
- });
34
+ b.m("POST").h(headers).b(body);
35
+ return b.build();
51
36
  };
52
37
  export const se_CreateRuleGroupsNamespaceCommand = async (input, context) => {
53
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
38
+ const b = rb(input, context);
54
39
  const headers = {
55
40
  "content-type": "application/json",
56
41
  };
57
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
58
- "/workspaces/{workspaceId}/rulegroupsnamespaces";
59
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
42
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces");
43
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
60
44
  let body;
61
45
  body = JSON.stringify(take(input, {
62
46
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -64,22 +48,15 @@ export const se_CreateRuleGroupsNamespaceCommand = async (input, context) => {
64
48
  name: [],
65
49
  tags: (_) => _json(_),
66
50
  }));
67
- return new __HttpRequest({
68
- protocol,
69
- hostname,
70
- port,
71
- method: "POST",
72
- headers,
73
- path: resolvedPath,
74
- body,
75
- });
51
+ b.m("POST").h(headers).b(body);
52
+ return b.build();
76
53
  };
77
54
  export const se_CreateScraperCommand = async (input, context) => {
78
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
+ const b = rb(input, context);
79
56
  const headers = {
80
57
  "content-type": "application/json",
81
58
  };
82
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scrapers";
59
+ b.bp("/scrapers");
83
60
  let body;
84
61
  body = JSON.stringify(take(input, {
85
62
  alias: [],
@@ -89,457 +66,280 @@ export const se_CreateScraperCommand = async (input, context) => {
89
66
  source: (_) => _json(_),
90
67
  tags: (_) => _json(_),
91
68
  }));
92
- return new __HttpRequest({
93
- protocol,
94
- hostname,
95
- port,
96
- method: "POST",
97
- headers,
98
- path: resolvedPath,
99
- body,
100
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
101
71
  };
102
72
  export const se_CreateWorkspaceCommand = async (input, context) => {
103
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = rb(input, context);
104
74
  const headers = {
105
75
  "content-type": "application/json",
106
76
  };
107
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
77
+ b.bp("/workspaces");
108
78
  let body;
109
79
  body = JSON.stringify(take(input, {
110
80
  alias: [],
111
81
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
112
82
  tags: (_) => _json(_),
113
83
  }));
114
- return new __HttpRequest({
115
- protocol,
116
- hostname,
117
- port,
118
- method: "POST",
119
- headers,
120
- path: resolvedPath,
121
- body,
122
- });
84
+ b.m("POST").h(headers).b(body);
85
+ return b.build();
123
86
  };
124
87
  export const se_DeleteAlertManagerDefinitionCommand = async (input, context) => {
125
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
88
+ const b = rb(input, context);
126
89
  const headers = {};
127
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
128
- "/workspaces/{workspaceId}/alertmanager/definition";
129
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
90
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
91
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
130
92
  const query = map({
131
- clientToken: [, input.clientToken ?? generateIdempotencyToken()],
93
+ [_cT]: [, input[_cT] ?? generateIdempotencyToken()],
132
94
  });
133
95
  let body;
134
- return new __HttpRequest({
135
- protocol,
136
- hostname,
137
- port,
138
- method: "DELETE",
139
- headers,
140
- path: resolvedPath,
141
- query,
142
- body,
143
- });
96
+ b.m("DELETE").h(headers).q(query).b(body);
97
+ return b.build();
144
98
  };
145
99
  export const se_DeleteLoggingConfigurationCommand = async (input, context) => {
146
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = rb(input, context);
147
101
  const headers = {};
148
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
149
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
102
+ b.bp("/workspaces/{workspaceId}/logging");
103
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
150
104
  const query = map({
151
- clientToken: [, input.clientToken ?? generateIdempotencyToken()],
105
+ [_cT]: [, input[_cT] ?? generateIdempotencyToken()],
152
106
  });
153
107
  let body;
154
- return new __HttpRequest({
155
- protocol,
156
- hostname,
157
- port,
158
- method: "DELETE",
159
- headers,
160
- path: resolvedPath,
161
- query,
162
- body,
163
- });
108
+ b.m("DELETE").h(headers).q(query).b(body);
109
+ return b.build();
164
110
  };
165
111
  export const se_DeleteRuleGroupsNamespaceCommand = async (input, context) => {
166
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
112
+ const b = rb(input, context);
167
113
  const headers = {};
168
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
169
- "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
170
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
171
- resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
114
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
115
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
116
+ b.p("name", () => input.name, "{name}", false);
172
117
  const query = map({
173
- clientToken: [, input.clientToken ?? generateIdempotencyToken()],
118
+ [_cT]: [, input[_cT] ?? generateIdempotencyToken()],
174
119
  });
175
120
  let body;
176
- return new __HttpRequest({
177
- protocol,
178
- hostname,
179
- port,
180
- method: "DELETE",
181
- headers,
182
- path: resolvedPath,
183
- query,
184
- body,
185
- });
121
+ b.m("DELETE").h(headers).q(query).b(body);
122
+ return b.build();
186
123
  };
187
124
  export const se_DeleteScraperCommand = async (input, context) => {
188
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const b = rb(input, context);
189
126
  const headers = {};
190
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scrapers/{scraperId}";
191
- resolvedPath = __resolvedPath(resolvedPath, input, "scraperId", () => input.scraperId, "{scraperId}", false);
127
+ b.bp("/scrapers/{scraperId}");
128
+ b.p("scraperId", () => input.scraperId, "{scraperId}", false);
192
129
  const query = map({
193
- clientToken: [, input.clientToken ?? generateIdempotencyToken()],
130
+ [_cT]: [, input[_cT] ?? generateIdempotencyToken()],
194
131
  });
195
132
  let body;
196
- return new __HttpRequest({
197
- protocol,
198
- hostname,
199
- port,
200
- method: "DELETE",
201
- headers,
202
- path: resolvedPath,
203
- query,
204
- body,
205
- });
133
+ b.m("DELETE").h(headers).q(query).b(body);
134
+ return b.build();
206
135
  };
207
136
  export const se_DeleteWorkspaceCommand = async (input, context) => {
208
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
137
+ const b = rb(input, context);
209
138
  const headers = {};
210
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
211
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
139
+ b.bp("/workspaces/{workspaceId}");
140
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
212
141
  const query = map({
213
- clientToken: [, input.clientToken ?? generateIdempotencyToken()],
142
+ [_cT]: [, input[_cT] ?? generateIdempotencyToken()],
214
143
  });
215
144
  let body;
216
- return new __HttpRequest({
217
- protocol,
218
- hostname,
219
- port,
220
- method: "DELETE",
221
- headers,
222
- path: resolvedPath,
223
- query,
224
- body,
225
- });
145
+ b.m("DELETE").h(headers).q(query).b(body);
146
+ return b.build();
226
147
  };
227
148
  export const se_DescribeAlertManagerDefinitionCommand = async (input, context) => {
228
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const b = rb(input, context);
229
150
  const headers = {};
230
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
231
- "/workspaces/{workspaceId}/alertmanager/definition";
232
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
151
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
152
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
233
153
  let body;
234
- return new __HttpRequest({
235
- protocol,
236
- hostname,
237
- port,
238
- method: "GET",
239
- headers,
240
- path: resolvedPath,
241
- body,
242
- });
154
+ b.m("GET").h(headers).b(body);
155
+ return b.build();
243
156
  };
244
157
  export const se_DescribeLoggingConfigurationCommand = async (input, context) => {
245
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
158
+ const b = rb(input, context);
246
159
  const headers = {};
247
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
248
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
160
+ b.bp("/workspaces/{workspaceId}/logging");
161
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
249
162
  let body;
250
- return new __HttpRequest({
251
- protocol,
252
- hostname,
253
- port,
254
- method: "GET",
255
- headers,
256
- path: resolvedPath,
257
- body,
258
- });
163
+ b.m("GET").h(headers).b(body);
164
+ return b.build();
259
165
  };
260
166
  export const se_DescribeRuleGroupsNamespaceCommand = async (input, context) => {
261
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
167
+ const b = rb(input, context);
262
168
  const headers = {};
263
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
264
- "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
265
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
266
- resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
169
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
170
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
171
+ b.p("name", () => input.name, "{name}", false);
267
172
  let body;
268
- return new __HttpRequest({
269
- protocol,
270
- hostname,
271
- port,
272
- method: "GET",
273
- headers,
274
- path: resolvedPath,
275
- body,
276
- });
173
+ b.m("GET").h(headers).b(body);
174
+ return b.build();
277
175
  };
278
176
  export const se_DescribeScraperCommand = async (input, context) => {
279
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
177
+ const b = rb(input, context);
280
178
  const headers = {};
281
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scrapers/{scraperId}";
282
- resolvedPath = __resolvedPath(resolvedPath, input, "scraperId", () => input.scraperId, "{scraperId}", false);
179
+ b.bp("/scrapers/{scraperId}");
180
+ b.p("scraperId", () => input.scraperId, "{scraperId}", false);
283
181
  let body;
284
- return new __HttpRequest({
285
- protocol,
286
- hostname,
287
- port,
288
- method: "GET",
289
- headers,
290
- path: resolvedPath,
291
- body,
292
- });
182
+ b.m("GET").h(headers).b(body);
183
+ return b.build();
293
184
  };
294
185
  export const se_DescribeWorkspaceCommand = async (input, context) => {
295
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
186
+ const b = rb(input, context);
296
187
  const headers = {};
297
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
298
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
188
+ b.bp("/workspaces/{workspaceId}");
189
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
299
190
  let body;
300
- return new __HttpRequest({
301
- protocol,
302
- hostname,
303
- port,
304
- method: "GET",
305
- headers,
306
- path: resolvedPath,
307
- body,
308
- });
191
+ b.m("GET").h(headers).b(body);
192
+ return b.build();
309
193
  };
310
194
  export const se_GetDefaultScraperConfigurationCommand = async (input, context) => {
311
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
195
+ const b = rb(input, context);
312
196
  const headers = {
313
197
  "content-type": "application/json",
314
198
  };
315
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scraperconfiguration";
199
+ b.bp("/scraperconfiguration");
316
200
  let body;
317
201
  body = "";
318
- return new __HttpRequest({
319
- protocol,
320
- hostname,
321
- port,
322
- method: "GET",
323
- headers,
324
- path: resolvedPath,
325
- body,
326
- });
202
+ b.m("GET").h(headers).b(body);
203
+ return b.build();
327
204
  };
328
205
  export const se_ListRuleGroupsNamespacesCommand = async (input, context) => {
329
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
206
+ const b = rb(input, context);
330
207
  const headers = {};
331
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
332
- "/workspaces/{workspaceId}/rulegroupsnamespaces";
333
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
208
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces");
209
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
334
210
  const query = map({
335
- name: [, input.name],
336
- nextToken: [, input.nextToken],
337
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
211
+ [_n]: [, input[_n]],
212
+ [_nT]: [, input[_nT]],
213
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
338
214
  });
339
215
  let body;
340
- return new __HttpRequest({
341
- protocol,
342
- hostname,
343
- port,
344
- method: "GET",
345
- headers,
346
- path: resolvedPath,
347
- query,
348
- body,
349
- });
216
+ b.m("GET").h(headers).q(query).b(body);
217
+ return b.build();
350
218
  };
351
219
  export const se_ListScrapersCommand = async (input, context) => {
352
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
220
+ const b = rb(input, context);
353
221
  const headers = {};
354
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/scrapers";
222
+ b.bp("/scrapers");
355
223
  const query = map({
356
224
  ...convertMap(input.filters),
357
- nextToken: [, input.nextToken],
358
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
225
+ [_nT]: [, input[_nT]],
226
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
359
227
  });
360
228
  let body;
361
- return new __HttpRequest({
362
- protocol,
363
- hostname,
364
- port,
365
- method: "GET",
366
- headers,
367
- path: resolvedPath,
368
- query,
369
- body,
370
- });
229
+ b.m("GET").h(headers).q(query).b(body);
230
+ return b.build();
371
231
  };
372
232
  export const se_ListTagsForResourceCommand = async (input, context) => {
373
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
+ const b = rb(input, context);
374
234
  const headers = {};
375
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
376
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
235
+ b.bp("/tags/{resourceArn}");
236
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
377
237
  let body;
378
- return new __HttpRequest({
379
- protocol,
380
- hostname,
381
- port,
382
- method: "GET",
383
- headers,
384
- path: resolvedPath,
385
- body,
386
- });
238
+ b.m("GET").h(headers).b(body);
239
+ return b.build();
387
240
  };
388
241
  export const se_ListWorkspacesCommand = async (input, context) => {
389
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
242
+ const b = rb(input, context);
390
243
  const headers = {};
391
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
244
+ b.bp("/workspaces");
392
245
  const query = map({
393
- nextToken: [, input.nextToken],
394
- alias: [, input.alias],
395
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
246
+ [_nT]: [, input[_nT]],
247
+ [_a]: [, input[_a]],
248
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
396
249
  });
397
250
  let body;
398
- return new __HttpRequest({
399
- protocol,
400
- hostname,
401
- port,
402
- method: "GET",
403
- headers,
404
- path: resolvedPath,
405
- query,
406
- body,
407
- });
251
+ b.m("GET").h(headers).q(query).b(body);
252
+ return b.build();
408
253
  };
409
254
  export const se_PutAlertManagerDefinitionCommand = async (input, context) => {
410
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const b = rb(input, context);
411
256
  const headers = {
412
257
  "content-type": "application/json",
413
258
  };
414
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
415
- "/workspaces/{workspaceId}/alertmanager/definition";
416
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
259
+ b.bp("/workspaces/{workspaceId}/alertmanager/definition");
260
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
417
261
  let body;
418
262
  body = JSON.stringify(take(input, {
419
263
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
420
264
  data: (_) => context.base64Encoder(_),
421
265
  }));
422
- return new __HttpRequest({
423
- protocol,
424
- hostname,
425
- port,
426
- method: "PUT",
427
- headers,
428
- path: resolvedPath,
429
- body,
430
- });
266
+ b.m("PUT").h(headers).b(body);
267
+ return b.build();
431
268
  };
432
269
  export const se_PutRuleGroupsNamespaceCommand = async (input, context) => {
433
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
270
+ const b = rb(input, context);
434
271
  const headers = {
435
272
  "content-type": "application/json",
436
273
  };
437
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
438
- "/workspaces/{workspaceId}/rulegroupsnamespaces/{name}";
439
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
440
- resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
274
+ b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
275
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
276
+ b.p("name", () => input.name, "{name}", false);
441
277
  let body;
442
278
  body = JSON.stringify(take(input, {
443
279
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
444
280
  data: (_) => context.base64Encoder(_),
445
281
  }));
446
- return new __HttpRequest({
447
- protocol,
448
- hostname,
449
- port,
450
- method: "PUT",
451
- headers,
452
- path: resolvedPath,
453
- body,
454
- });
282
+ b.m("PUT").h(headers).b(body);
283
+ return b.build();
455
284
  };
456
285
  export const se_TagResourceCommand = async (input, context) => {
457
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
286
+ const b = rb(input, context);
458
287
  const headers = {
459
288
  "content-type": "application/json",
460
289
  };
461
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
462
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
290
+ b.bp("/tags/{resourceArn}");
291
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
463
292
  let body;
464
293
  body = JSON.stringify(take(input, {
465
294
  tags: (_) => _json(_),
466
295
  }));
467
- return new __HttpRequest({
468
- protocol,
469
- hostname,
470
- port,
471
- method: "POST",
472
- headers,
473
- path: resolvedPath,
474
- body,
475
- });
296
+ b.m("POST").h(headers).b(body);
297
+ return b.build();
476
298
  };
477
299
  export const se_UntagResourceCommand = async (input, context) => {
478
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
300
+ const b = rb(input, context);
479
301
  const headers = {};
480
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
481
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
302
+ b.bp("/tags/{resourceArn}");
303
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
482
304
  const query = map({
483
- tagKeys: [
305
+ [_tK]: [
484
306
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
485
- () => (input.tagKeys || []).map((_entry) => _entry),
307
+ () => (input[_tK] || []).map((_entry) => _entry),
486
308
  ],
487
309
  });
488
310
  let body;
489
- return new __HttpRequest({
490
- protocol,
491
- hostname,
492
- port,
493
- method: "DELETE",
494
- headers,
495
- path: resolvedPath,
496
- query,
497
- body,
498
- });
311
+ b.m("DELETE").h(headers).q(query).b(body);
312
+ return b.build();
499
313
  };
500
314
  export const se_UpdateLoggingConfigurationCommand = async (input, context) => {
501
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
315
+ const b = rb(input, context);
502
316
  const headers = {
503
317
  "content-type": "application/json",
504
318
  };
505
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
506
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
319
+ b.bp("/workspaces/{workspaceId}/logging");
320
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
507
321
  let body;
508
322
  body = JSON.stringify(take(input, {
509
323
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
510
324
  logGroupArn: [],
511
325
  }));
512
- return new __HttpRequest({
513
- protocol,
514
- hostname,
515
- port,
516
- method: "PUT",
517
- headers,
518
- path: resolvedPath,
519
- body,
520
- });
326
+ b.m("PUT").h(headers).b(body);
327
+ return b.build();
521
328
  };
522
329
  export const se_UpdateWorkspaceAliasCommand = async (input, context) => {
523
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
330
+ const b = rb(input, context);
524
331
  const headers = {
525
332
  "content-type": "application/json",
526
333
  };
527
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/alias";
528
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
334
+ b.bp("/workspaces/{workspaceId}/alias");
335
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
529
336
  let body;
530
337
  body = JSON.stringify(take(input, {
531
338
  alias: [],
532
339
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
533
340
  }));
534
- return new __HttpRequest({
535
- protocol,
536
- hostname,
537
- port,
538
- method: "POST",
539
- headers,
540
- path: resolvedPath,
541
- body,
542
- });
341
+ b.m("POST").h(headers).b(body);
342
+ return b.build();
543
343
  };
544
344
  export const de_CreateAlertManagerDefinitionCommand = async (output, context) => {
545
345
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -1763,10 +1563,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1763
1563
  };
1764
1564
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1765
1565
  const contents = map({
1766
- retryAfterSeconds: [
1767
- () => void 0 !== parsedOutput.headers["retry-after"],
1768
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1769
- ],
1566
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1770
1567
  });
1771
1568
  const data = parsedOutput.body;
1772
1569
  const doc = take(data, {
@@ -1813,10 +1610,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1813
1610
  };
1814
1611
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1815
1612
  const contents = map({
1816
- retryAfterSeconds: [
1817
- () => void 0 !== parsedOutput.headers["retry-after"],
1818
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1819
- ],
1613
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1820
1614
  });
1821
1615
  const data = parsedOutput.body;
1822
1616
  const doc = take(data, {
@@ -1986,6 +1780,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1986
1780
  value !== "" &&
1987
1781
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1988
1782
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1783
+ const _a = "alias";
1784
+ const _cT = "clientToken";
1785
+ const _mR = "maxResults";
1786
+ const _n = "name";
1787
+ const _nT = "nextToken";
1788
+ const _rAS = "retryAfterSeconds";
1789
+ const _ra = "retry-after";
1790
+ const _tK = "tagKeys";
1989
1791
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1990
1792
  if (encoded.length) {
1991
1793
  return JSON.parse(encoded);