@aws-sdk/client-bedrock-agent 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,40 +1,32 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { BedrockAgentServiceException as __BaseException } from "../models/BedrockAgentServiceException";
6
6
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
7
7
  export const se_AssociateAgentKnowledgeBaseCommand = 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
- "/agents/{agentId}/agentversions/{agentVersion}/knowledgebases";
14
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
15
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
12
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases");
13
+ b.p("agentId", () => input.agentId, "{agentId}", false);
14
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
16
15
  let body;
17
16
  body = JSON.stringify(take(input, {
18
17
  description: [],
19
18
  knowledgeBaseId: [],
20
19
  knowledgeBaseState: [],
21
20
  }));
22
- return new __HttpRequest({
23
- protocol,
24
- hostname,
25
- port,
26
- method: "PUT",
27
- headers,
28
- path: resolvedPath,
29
- body,
30
- });
21
+ b.m("PUT").h(headers).b(body);
22
+ return b.build();
31
23
  };
32
24
  export const se_CreateAgentCommand = async (input, context) => {
33
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
25
+ const b = rb(input, context);
34
26
  const headers = {
35
27
  "content-type": "application/json",
36
28
  };
37
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents";
29
+ b.bp("/agents");
38
30
  let body;
39
31
  body = JSON.stringify(take(input, {
40
32
  agentName: [],
@@ -48,25 +40,17 @@ export const se_CreateAgentCommand = async (input, context) => {
48
40
  promptOverrideConfiguration: (_) => se_PromptOverrideConfiguration(_, context),
49
41
  tags: (_) => _json(_),
50
42
  }));
51
- return new __HttpRequest({
52
- protocol,
53
- hostname,
54
- port,
55
- method: "PUT",
56
- headers,
57
- path: resolvedPath,
58
- body,
59
- });
43
+ b.m("PUT").h(headers).b(body);
44
+ return b.build();
60
45
  };
61
46
  export const se_CreateAgentActionGroupCommand = async (input, context) => {
62
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
47
+ const b = rb(input, context);
63
48
  const headers = {
64
49
  "content-type": "application/json",
65
50
  };
66
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
67
- "/agents/{agentId}/agentversions/{agentVersion}/actiongroups";
68
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
69
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
51
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups");
52
+ b.p("agentId", () => input.agentId, "{agentId}", false);
53
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
70
54
  let body;
71
55
  body = JSON.stringify(take(input, {
72
56
  actionGroupExecutor: (_) => _json(_),
@@ -77,23 +61,16 @@ export const se_CreateAgentActionGroupCommand = async (input, context) => {
77
61
  description: [],
78
62
  parentActionGroupSignature: [],
79
63
  }));
80
- return new __HttpRequest({
81
- protocol,
82
- hostname,
83
- port,
84
- method: "PUT",
85
- headers,
86
- path: resolvedPath,
87
- body,
88
- });
64
+ b.m("PUT").h(headers).b(body);
65
+ return b.build();
89
66
  };
90
67
  export const se_CreateAgentAliasCommand = async (input, context) => {
91
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
+ const b = rb(input, context);
92
69
  const headers = {
93
70
  "content-type": "application/json",
94
71
  };
95
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}/agentaliases";
96
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
72
+ b.bp("/agents/{agentId}/agentaliases");
73
+ b.p("agentId", () => input.agentId, "{agentId}", false);
97
74
  let body;
98
75
  body = JSON.stringify(take(input, {
99
76
  agentAliasName: [],
@@ -102,24 +79,16 @@ export const se_CreateAgentAliasCommand = async (input, context) => {
102
79
  routingConfiguration: (_) => _json(_),
103
80
  tags: (_) => _json(_),
104
81
  }));
105
- return new __HttpRequest({
106
- protocol,
107
- hostname,
108
- port,
109
- method: "PUT",
110
- headers,
111
- path: resolvedPath,
112
- body,
113
- });
82
+ b.m("PUT").h(headers).b(body);
83
+ return b.build();
114
84
  };
115
85
  export const se_CreateDataSourceCommand = async (input, context) => {
116
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
86
+ const b = rb(input, context);
117
87
  const headers = {
118
88
  "content-type": "application/json",
119
89
  };
120
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
121
- "/knowledgebases/{knowledgeBaseId}/datasources";
122
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
90
+ b.bp("/knowledgebases/{knowledgeBaseId}/datasources");
91
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
123
92
  let body;
124
93
  body = JSON.stringify(take(input, {
125
94
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -129,22 +98,15 @@ export const se_CreateDataSourceCommand = async (input, context) => {
129
98
  serverSideEncryptionConfiguration: (_) => _json(_),
130
99
  vectorIngestionConfiguration: (_) => _json(_),
131
100
  }));
132
- return new __HttpRequest({
133
- protocol,
134
- hostname,
135
- port,
136
- method: "PUT",
137
- headers,
138
- path: resolvedPath,
139
- body,
140
- });
101
+ b.m("PUT").h(headers).b(body);
102
+ return b.build();
141
103
  };
142
104
  export const se_CreateKnowledgeBaseCommand = async (input, context) => {
143
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
105
+ const b = rb(input, context);
144
106
  const headers = {
145
107
  "content-type": "application/json",
146
108
  };
147
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases";
109
+ b.bp("/knowledgebases");
148
110
  let body;
149
111
  body = JSON.stringify(take(input, {
150
112
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -155,449 +117,268 @@ export const se_CreateKnowledgeBaseCommand = async (input, context) => {
155
117
  storageConfiguration: (_) => _json(_),
156
118
  tags: (_) => _json(_),
157
119
  }));
158
- return new __HttpRequest({
159
- protocol,
160
- hostname,
161
- port,
162
- method: "PUT",
163
- headers,
164
- path: resolvedPath,
165
- body,
166
- });
120
+ b.m("PUT").h(headers).b(body);
121
+ return b.build();
167
122
  };
168
123
  export const se_DeleteAgentCommand = async (input, context) => {
169
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
124
+ const b = rb(input, context);
170
125
  const headers = {};
171
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}";
172
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
126
+ b.bp("/agents/{agentId}");
127
+ b.p("agentId", () => input.agentId, "{agentId}", false);
173
128
  const query = map({
174
- skipResourceInUseCheck: [
175
- () => input.skipResourceInUseCheck !== void 0,
176
- () => input.skipResourceInUseCheck.toString(),
177
- ],
129
+ [_sRIUC]: [() => input.skipResourceInUseCheck !== void 0, () => input[_sRIUC].toString()],
178
130
  });
179
131
  let body;
180
- return new __HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "DELETE",
185
- headers,
186
- path: resolvedPath,
187
- query,
188
- body,
189
- });
132
+ b.m("DELETE").h(headers).q(query).b(body);
133
+ return b.build();
190
134
  };
191
135
  export const se_DeleteAgentActionGroupCommand = async (input, context) => {
192
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
+ const b = rb(input, context);
193
137
  const headers = {};
194
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
195
- "/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}";
196
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
197
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
198
- resolvedPath = __resolvedPath(resolvedPath, input, "actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
138
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}");
139
+ b.p("agentId", () => input.agentId, "{agentId}", false);
140
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
141
+ b.p("actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
199
142
  const query = map({
200
- skipResourceInUseCheck: [
201
- () => input.skipResourceInUseCheck !== void 0,
202
- () => input.skipResourceInUseCheck.toString(),
203
- ],
143
+ [_sRIUC]: [() => input.skipResourceInUseCheck !== void 0, () => input[_sRIUC].toString()],
204
144
  });
205
145
  let body;
206
- return new __HttpRequest({
207
- protocol,
208
- hostname,
209
- port,
210
- method: "DELETE",
211
- headers,
212
- path: resolvedPath,
213
- query,
214
- body,
215
- });
146
+ b.m("DELETE").h(headers).q(query).b(body);
147
+ return b.build();
216
148
  };
217
149
  export const se_DeleteAgentAliasCommand = async (input, context) => {
218
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
150
+ const b = rb(input, context);
219
151
  const headers = {};
220
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
221
- "/agents/{agentId}/agentaliases/{agentAliasId}";
222
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
223
- resolvedPath = __resolvedPath(resolvedPath, input, "agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
152
+ b.bp("/agents/{agentId}/agentaliases/{agentAliasId}");
153
+ b.p("agentId", () => input.agentId, "{agentId}", false);
154
+ b.p("agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
224
155
  let body;
225
- return new __HttpRequest({
226
- protocol,
227
- hostname,
228
- port,
229
- method: "DELETE",
230
- headers,
231
- path: resolvedPath,
232
- body,
233
- });
156
+ b.m("DELETE").h(headers).b(body);
157
+ return b.build();
234
158
  };
235
159
  export const se_DeleteAgentVersionCommand = async (input, context) => {
236
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
160
+ const b = rb(input, context);
237
161
  const headers = {};
238
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
239
- "/agents/{agentId}/agentversions/{agentVersion}";
240
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
241
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
162
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}");
163
+ b.p("agentId", () => input.agentId, "{agentId}", false);
164
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
242
165
  const query = map({
243
- skipResourceInUseCheck: [
244
- () => input.skipResourceInUseCheck !== void 0,
245
- () => input.skipResourceInUseCheck.toString(),
246
- ],
166
+ [_sRIUC]: [() => input.skipResourceInUseCheck !== void 0, () => input[_sRIUC].toString()],
247
167
  });
248
168
  let body;
249
- return new __HttpRequest({
250
- protocol,
251
- hostname,
252
- port,
253
- method: "DELETE",
254
- headers,
255
- path: resolvedPath,
256
- query,
257
- body,
258
- });
169
+ b.m("DELETE").h(headers).q(query).b(body);
170
+ return b.build();
259
171
  };
260
172
  export const se_DeleteDataSourceCommand = async (input, context) => {
261
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
173
+ const b = rb(input, context);
262
174
  const headers = {};
263
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
264
- "/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}";
265
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
266
- resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
175
+ b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}");
176
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
177
+ b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
267
178
  let body;
268
- return new __HttpRequest({
269
- protocol,
270
- hostname,
271
- port,
272
- method: "DELETE",
273
- headers,
274
- path: resolvedPath,
275
- body,
276
- });
179
+ b.m("DELETE").h(headers).b(body);
180
+ return b.build();
277
181
  };
278
182
  export const se_DeleteKnowledgeBaseCommand = async (input, context) => {
279
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = rb(input, context);
280
184
  const headers = {};
281
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases/{knowledgeBaseId}";
282
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
185
+ b.bp("/knowledgebases/{knowledgeBaseId}");
186
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
283
187
  let body;
284
- return new __HttpRequest({
285
- protocol,
286
- hostname,
287
- port,
288
- method: "DELETE",
289
- headers,
290
- path: resolvedPath,
291
- body,
292
- });
188
+ b.m("DELETE").h(headers).b(body);
189
+ return b.build();
293
190
  };
294
191
  export const se_DisassociateAgentKnowledgeBaseCommand = async (input, context) => {
295
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
192
+ const b = rb(input, context);
296
193
  const headers = {};
297
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
298
- "/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}";
299
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
300
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
301
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
194
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}");
195
+ b.p("agentId", () => input.agentId, "{agentId}", false);
196
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
197
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
302
198
  let body;
303
- return new __HttpRequest({
304
- protocol,
305
- hostname,
306
- port,
307
- method: "DELETE",
308
- headers,
309
- path: resolvedPath,
310
- body,
311
- });
199
+ b.m("DELETE").h(headers).b(body);
200
+ return b.build();
312
201
  };
313
202
  export const se_GetAgentCommand = async (input, context) => {
314
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
203
+ const b = rb(input, context);
315
204
  const headers = {};
316
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}";
317
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
205
+ b.bp("/agents/{agentId}");
206
+ b.p("agentId", () => input.agentId, "{agentId}", false);
318
207
  let body;
319
- return new __HttpRequest({
320
- protocol,
321
- hostname,
322
- port,
323
- method: "GET",
324
- headers,
325
- path: resolvedPath,
326
- body,
327
- });
208
+ b.m("GET").h(headers).b(body);
209
+ return b.build();
328
210
  };
329
211
  export const se_GetAgentActionGroupCommand = async (input, context) => {
330
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
212
+ const b = rb(input, context);
331
213
  const headers = {};
332
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
333
- "/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}";
334
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
335
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
336
- resolvedPath = __resolvedPath(resolvedPath, input, "actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
214
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}");
215
+ b.p("agentId", () => input.agentId, "{agentId}", false);
216
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
217
+ b.p("actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
337
218
  let body;
338
- return new __HttpRequest({
339
- protocol,
340
- hostname,
341
- port,
342
- method: "GET",
343
- headers,
344
- path: resolvedPath,
345
- body,
346
- });
219
+ b.m("GET").h(headers).b(body);
220
+ return b.build();
347
221
  };
348
222
  export const se_GetAgentAliasCommand = async (input, context) => {
349
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
223
+ const b = rb(input, context);
350
224
  const headers = {};
351
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
352
- "/agents/{agentId}/agentaliases/{agentAliasId}";
353
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
354
- resolvedPath = __resolvedPath(resolvedPath, input, "agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
225
+ b.bp("/agents/{agentId}/agentaliases/{agentAliasId}");
226
+ b.p("agentId", () => input.agentId, "{agentId}", false);
227
+ b.p("agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
355
228
  let body;
356
- return new __HttpRequest({
357
- protocol,
358
- hostname,
359
- port,
360
- method: "GET",
361
- headers,
362
- path: resolvedPath,
363
- body,
364
- });
229
+ b.m("GET").h(headers).b(body);
230
+ return b.build();
365
231
  };
366
232
  export const se_GetAgentKnowledgeBaseCommand = async (input, context) => {
367
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
+ const b = rb(input, context);
368
234
  const headers = {};
369
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
370
- "/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}";
371
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
372
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
373
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
235
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}");
236
+ b.p("agentId", () => input.agentId, "{agentId}", false);
237
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
238
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
374
239
  let body;
375
- return new __HttpRequest({
376
- protocol,
377
- hostname,
378
- port,
379
- method: "GET",
380
- headers,
381
- path: resolvedPath,
382
- body,
383
- });
240
+ b.m("GET").h(headers).b(body);
241
+ return b.build();
384
242
  };
385
243
  export const se_GetAgentVersionCommand = async (input, context) => {
386
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
244
+ const b = rb(input, context);
387
245
  const headers = {};
388
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
389
- "/agents/{agentId}/agentversions/{agentVersion}";
390
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
391
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
246
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}");
247
+ b.p("agentId", () => input.agentId, "{agentId}", false);
248
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
392
249
  let body;
393
- return new __HttpRequest({
394
- protocol,
395
- hostname,
396
- port,
397
- method: "GET",
398
- headers,
399
- path: resolvedPath,
400
- body,
401
- });
250
+ b.m("GET").h(headers).b(body);
251
+ return b.build();
402
252
  };
403
253
  export const se_GetDataSourceCommand = async (input, context) => {
404
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
254
+ const b = rb(input, context);
405
255
  const headers = {};
406
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
407
- "/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}";
408
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
409
- resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
256
+ b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}");
257
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
258
+ b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
410
259
  let body;
411
- return new __HttpRequest({
412
- protocol,
413
- hostname,
414
- port,
415
- method: "GET",
416
- headers,
417
- path: resolvedPath,
418
- body,
419
- });
260
+ b.m("GET").h(headers).b(body);
261
+ return b.build();
420
262
  };
421
263
  export const se_GetIngestionJobCommand = async (input, context) => {
422
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
264
+ const b = rb(input, context);
423
265
  const headers = {};
424
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
425
- "/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs/{ingestionJobId}";
426
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
427
- resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
428
- resolvedPath = __resolvedPath(resolvedPath, input, "ingestionJobId", () => input.ingestionJobId, "{ingestionJobId}", false);
266
+ b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs/{ingestionJobId}");
267
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
268
+ b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
269
+ b.p("ingestionJobId", () => input.ingestionJobId, "{ingestionJobId}", false);
429
270
  let body;
430
- return new __HttpRequest({
431
- protocol,
432
- hostname,
433
- port,
434
- method: "GET",
435
- headers,
436
- path: resolvedPath,
437
- body,
438
- });
271
+ b.m("GET").h(headers).b(body);
272
+ return b.build();
439
273
  };
440
274
  export const se_GetKnowledgeBaseCommand = async (input, context) => {
441
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
275
+ const b = rb(input, context);
442
276
  const headers = {};
443
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases/{knowledgeBaseId}";
444
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
277
+ b.bp("/knowledgebases/{knowledgeBaseId}");
278
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
445
279
  let body;
446
- return new __HttpRequest({
447
- protocol,
448
- hostname,
449
- port,
450
- method: "GET",
451
- headers,
452
- path: resolvedPath,
453
- body,
454
- });
280
+ b.m("GET").h(headers).b(body);
281
+ return b.build();
455
282
  };
456
283
  export const se_ListAgentActionGroupsCommand = async (input, context) => {
457
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
284
+ const b = rb(input, context);
458
285
  const headers = {
459
286
  "content-type": "application/json",
460
287
  };
461
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
462
- "/agents/{agentId}/agentversions/{agentVersion}/actiongroups";
463
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
464
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
288
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups");
289
+ b.p("agentId", () => input.agentId, "{agentId}", false);
290
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
465
291
  let body;
466
292
  body = JSON.stringify(take(input, {
467
293
  maxResults: [],
468
294
  nextToken: [],
469
295
  }));
470
- return new __HttpRequest({
471
- protocol,
472
- hostname,
473
- port,
474
- method: "POST",
475
- headers,
476
- path: resolvedPath,
477
- body,
478
- });
296
+ b.m("POST").h(headers).b(body);
297
+ return b.build();
479
298
  };
480
299
  export const se_ListAgentAliasesCommand = async (input, context) => {
481
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
300
+ const b = rb(input, context);
482
301
  const headers = {
483
302
  "content-type": "application/json",
484
303
  };
485
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}/agentaliases";
486
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
304
+ b.bp("/agents/{agentId}/agentaliases");
305
+ b.p("agentId", () => input.agentId, "{agentId}", false);
487
306
  let body;
488
307
  body = JSON.stringify(take(input, {
489
308
  maxResults: [],
490
309
  nextToken: [],
491
310
  }));
492
- return new __HttpRequest({
493
- protocol,
494
- hostname,
495
- port,
496
- method: "POST",
497
- headers,
498
- path: resolvedPath,
499
- body,
500
- });
311
+ b.m("POST").h(headers).b(body);
312
+ return b.build();
501
313
  };
502
314
  export const se_ListAgentKnowledgeBasesCommand = async (input, context) => {
503
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
315
+ const b = rb(input, context);
504
316
  const headers = {
505
317
  "content-type": "application/json",
506
318
  };
507
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
508
- "/agents/{agentId}/agentversions/{agentVersion}/knowledgebases";
509
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
510
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
319
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases");
320
+ b.p("agentId", () => input.agentId, "{agentId}", false);
321
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
511
322
  let body;
512
323
  body = JSON.stringify(take(input, {
513
324
  maxResults: [],
514
325
  nextToken: [],
515
326
  }));
516
- return new __HttpRequest({
517
- protocol,
518
- hostname,
519
- port,
520
- method: "POST",
521
- headers,
522
- path: resolvedPath,
523
- body,
524
- });
327
+ b.m("POST").h(headers).b(body);
328
+ return b.build();
525
329
  };
526
330
  export const se_ListAgentsCommand = async (input, context) => {
527
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
331
+ const b = rb(input, context);
528
332
  const headers = {
529
333
  "content-type": "application/json",
530
334
  };
531
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents";
335
+ b.bp("/agents");
532
336
  let body;
533
337
  body = JSON.stringify(take(input, {
534
338
  maxResults: [],
535
339
  nextToken: [],
536
340
  }));
537
- return new __HttpRequest({
538
- protocol,
539
- hostname,
540
- port,
541
- method: "POST",
542
- headers,
543
- path: resolvedPath,
544
- body,
545
- });
341
+ b.m("POST").h(headers).b(body);
342
+ return b.build();
546
343
  };
547
344
  export const se_ListAgentVersionsCommand = async (input, context) => {
548
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
345
+ const b = rb(input, context);
549
346
  const headers = {
550
347
  "content-type": "application/json",
551
348
  };
552
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}/agentversions";
553
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
349
+ b.bp("/agents/{agentId}/agentversions");
350
+ b.p("agentId", () => input.agentId, "{agentId}", false);
554
351
  let body;
555
352
  body = JSON.stringify(take(input, {
556
353
  maxResults: [],
557
354
  nextToken: [],
558
355
  }));
559
- return new __HttpRequest({
560
- protocol,
561
- hostname,
562
- port,
563
- method: "POST",
564
- headers,
565
- path: resolvedPath,
566
- body,
567
- });
356
+ b.m("POST").h(headers).b(body);
357
+ return b.build();
568
358
  };
569
359
  export const se_ListDataSourcesCommand = async (input, context) => {
570
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
360
+ const b = rb(input, context);
571
361
  const headers = {
572
362
  "content-type": "application/json",
573
363
  };
574
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
575
- "/knowledgebases/{knowledgeBaseId}/datasources";
576
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
364
+ b.bp("/knowledgebases/{knowledgeBaseId}/datasources");
365
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
577
366
  let body;
578
367
  body = JSON.stringify(take(input, {
579
368
  maxResults: [],
580
369
  nextToken: [],
581
370
  }));
582
- return new __HttpRequest({
583
- protocol,
584
- hostname,
585
- port,
586
- method: "POST",
587
- headers,
588
- path: resolvedPath,
589
- body,
590
- });
371
+ b.m("POST").h(headers).b(body);
372
+ return b.build();
591
373
  };
592
374
  export const se_ListIngestionJobsCommand = async (input, context) => {
593
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
375
+ const b = rb(input, context);
594
376
  const headers = {
595
377
  "content-type": "application/json",
596
378
  };
597
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
598
- "/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs";
599
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
600
- resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
379
+ b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs");
380
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
381
+ b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
601
382
  let body;
602
383
  body = JSON.stringify(take(input, {
603
384
  filters: (_) => _json(_),
@@ -605,144 +386,93 @@ export const se_ListIngestionJobsCommand = async (input, context) => {
605
386
  nextToken: [],
606
387
  sortBy: (_) => _json(_),
607
388
  }));
608
- return new __HttpRequest({
609
- protocol,
610
- hostname,
611
- port,
612
- method: "POST",
613
- headers,
614
- path: resolvedPath,
615
- body,
616
- });
389
+ b.m("POST").h(headers).b(body);
390
+ return b.build();
617
391
  };
618
392
  export const se_ListKnowledgeBasesCommand = async (input, context) => {
619
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
393
+ const b = rb(input, context);
620
394
  const headers = {
621
395
  "content-type": "application/json",
622
396
  };
623
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases";
397
+ b.bp("/knowledgebases");
624
398
  let body;
625
399
  body = JSON.stringify(take(input, {
626
400
  maxResults: [],
627
401
  nextToken: [],
628
402
  }));
629
- return new __HttpRequest({
630
- protocol,
631
- hostname,
632
- port,
633
- method: "POST",
634
- headers,
635
- path: resolvedPath,
636
- body,
637
- });
403
+ b.m("POST").h(headers).b(body);
404
+ return b.build();
638
405
  };
639
406
  export const se_ListTagsForResourceCommand = async (input, context) => {
640
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
407
+ const b = rb(input, context);
641
408
  const headers = {};
642
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
643
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
409
+ b.bp("/tags/{resourceArn}");
410
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
644
411
  let body;
645
- return new __HttpRequest({
646
- protocol,
647
- hostname,
648
- port,
649
- method: "GET",
650
- headers,
651
- path: resolvedPath,
652
- body,
653
- });
412
+ b.m("GET").h(headers).b(body);
413
+ return b.build();
654
414
  };
655
415
  export const se_PrepareAgentCommand = async (input, context) => {
656
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
416
+ const b = rb(input, context);
657
417
  const headers = {};
658
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}";
659
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
418
+ b.bp("/agents/{agentId}");
419
+ b.p("agentId", () => input.agentId, "{agentId}", false);
660
420
  let body;
661
- return new __HttpRequest({
662
- protocol,
663
- hostname,
664
- port,
665
- method: "POST",
666
- headers,
667
- path: resolvedPath,
668
- body,
669
- });
421
+ b.m("POST").h(headers).b(body);
422
+ return b.build();
670
423
  };
671
424
  export const se_StartIngestionJobCommand = async (input, context) => {
672
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
425
+ const b = rb(input, context);
673
426
  const headers = {
674
427
  "content-type": "application/json",
675
428
  };
676
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
677
- "/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs";
678
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
679
- resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
429
+ b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/ingestionjobs");
430
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
431
+ b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
680
432
  let body;
681
433
  body = JSON.stringify(take(input, {
682
434
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
683
435
  description: [],
684
436
  }));
685
- return new __HttpRequest({
686
- protocol,
687
- hostname,
688
- port,
689
- method: "PUT",
690
- headers,
691
- path: resolvedPath,
692
- body,
693
- });
437
+ b.m("PUT").h(headers).b(body);
438
+ return b.build();
694
439
  };
695
440
  export const se_TagResourceCommand = async (input, context) => {
696
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
441
+ const b = rb(input, context);
697
442
  const headers = {
698
443
  "content-type": "application/json",
699
444
  };
700
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
701
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
445
+ b.bp("/tags/{resourceArn}");
446
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
702
447
  let body;
703
448
  body = JSON.stringify(take(input, {
704
449
  tags: (_) => _json(_),
705
450
  }));
706
- return new __HttpRequest({
707
- protocol,
708
- hostname,
709
- port,
710
- method: "POST",
711
- headers,
712
- path: resolvedPath,
713
- body,
714
- });
451
+ b.m("POST").h(headers).b(body);
452
+ return b.build();
715
453
  };
716
454
  export const se_UntagResourceCommand = async (input, context) => {
717
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
455
+ const b = rb(input, context);
718
456
  const headers = {};
719
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
720
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
457
+ b.bp("/tags/{resourceArn}");
458
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
721
459
  const query = map({
722
- tagKeys: [
460
+ [_tK]: [
723
461
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
724
- () => (input.tagKeys || []).map((_entry) => _entry),
462
+ () => (input[_tK] || []).map((_entry) => _entry),
725
463
  ],
726
464
  });
727
465
  let body;
728
- return new __HttpRequest({
729
- protocol,
730
- hostname,
731
- port,
732
- method: "DELETE",
733
- headers,
734
- path: resolvedPath,
735
- query,
736
- body,
737
- });
466
+ b.m("DELETE").h(headers).q(query).b(body);
467
+ return b.build();
738
468
  };
739
469
  export const se_UpdateAgentCommand = async (input, context) => {
740
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
470
+ const b = rb(input, context);
741
471
  const headers = {
742
472
  "content-type": "application/json",
743
473
  };
744
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agents/{agentId}";
745
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
474
+ b.bp("/agents/{agentId}");
475
+ b.p("agentId", () => input.agentId, "{agentId}", false);
746
476
  let body;
747
477
  body = JSON.stringify(take(input, {
748
478
  agentName: [],
@@ -754,26 +484,18 @@ export const se_UpdateAgentCommand = async (input, context) => {
754
484
  instruction: [],
755
485
  promptOverrideConfiguration: (_) => se_PromptOverrideConfiguration(_, context),
756
486
  }));
757
- return new __HttpRequest({
758
- protocol,
759
- hostname,
760
- port,
761
- method: "PUT",
762
- headers,
763
- path: resolvedPath,
764
- body,
765
- });
487
+ b.m("PUT").h(headers).b(body);
488
+ return b.build();
766
489
  };
767
490
  export const se_UpdateAgentActionGroupCommand = async (input, context) => {
768
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
491
+ const b = rb(input, context);
769
492
  const headers = {
770
493
  "content-type": "application/json",
771
494
  };
772
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
773
- "/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}";
774
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
775
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
776
- resolvedPath = __resolvedPath(resolvedPath, input, "actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
495
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/actiongroups/{actionGroupId}");
496
+ b.p("agentId", () => input.agentId, "{agentId}", false);
497
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
498
+ b.p("actionGroupId", () => input.actionGroupId, "{actionGroupId}", false);
777
499
  let body;
778
500
  body = JSON.stringify(take(input, {
779
501
  actionGroupExecutor: (_) => _json(_),
@@ -783,75 +505,51 @@ export const se_UpdateAgentActionGroupCommand = async (input, context) => {
783
505
  description: [],
784
506
  parentActionGroupSignature: [],
785
507
  }));
786
- return new __HttpRequest({
787
- protocol,
788
- hostname,
789
- port,
790
- method: "PUT",
791
- headers,
792
- path: resolvedPath,
793
- body,
794
- });
508
+ b.m("PUT").h(headers).b(body);
509
+ return b.build();
795
510
  };
796
511
  export const se_UpdateAgentAliasCommand = async (input, context) => {
797
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
512
+ const b = rb(input, context);
798
513
  const headers = {
799
514
  "content-type": "application/json",
800
515
  };
801
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
802
- "/agents/{agentId}/agentaliases/{agentAliasId}";
803
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
804
- resolvedPath = __resolvedPath(resolvedPath, input, "agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
516
+ b.bp("/agents/{agentId}/agentaliases/{agentAliasId}");
517
+ b.p("agentId", () => input.agentId, "{agentId}", false);
518
+ b.p("agentAliasId", () => input.agentAliasId, "{agentAliasId}", false);
805
519
  let body;
806
520
  body = JSON.stringify(take(input, {
807
521
  agentAliasName: [],
808
522
  description: [],
809
523
  routingConfiguration: (_) => _json(_),
810
524
  }));
811
- return new __HttpRequest({
812
- protocol,
813
- hostname,
814
- port,
815
- method: "PUT",
816
- headers,
817
- path: resolvedPath,
818
- body,
819
- });
525
+ b.m("PUT").h(headers).b(body);
526
+ return b.build();
820
527
  };
821
528
  export const se_UpdateAgentKnowledgeBaseCommand = async (input, context) => {
822
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
529
+ const b = rb(input, context);
823
530
  const headers = {
824
531
  "content-type": "application/json",
825
532
  };
826
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
827
- "/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}";
828
- resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId, "{agentId}", false);
829
- resolvedPath = __resolvedPath(resolvedPath, input, "agentVersion", () => input.agentVersion, "{agentVersion}", false);
830
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
533
+ b.bp("/agents/{agentId}/agentversions/{agentVersion}/knowledgebases/{knowledgeBaseId}");
534
+ b.p("agentId", () => input.agentId, "{agentId}", false);
535
+ b.p("agentVersion", () => input.agentVersion, "{agentVersion}", false);
536
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
831
537
  let body;
832
538
  body = JSON.stringify(take(input, {
833
539
  description: [],
834
540
  knowledgeBaseState: [],
835
541
  }));
836
- return new __HttpRequest({
837
- protocol,
838
- hostname,
839
- port,
840
- method: "PUT",
841
- headers,
842
- path: resolvedPath,
843
- body,
844
- });
542
+ b.m("PUT").h(headers).b(body);
543
+ return b.build();
845
544
  };
846
545
  export const se_UpdateDataSourceCommand = async (input, context) => {
847
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
546
+ const b = rb(input, context);
848
547
  const headers = {
849
548
  "content-type": "application/json",
850
549
  };
851
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
852
- "/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}";
853
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
854
- resolvedPath = __resolvedPath(resolvedPath, input, "dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
550
+ b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}");
551
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
552
+ b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
855
553
  let body;
856
554
  body = JSON.stringify(take(input, {
857
555
  dataSourceConfiguration: (_) => _json(_),
@@ -860,23 +558,16 @@ export const se_UpdateDataSourceCommand = async (input, context) => {
860
558
  serverSideEncryptionConfiguration: (_) => _json(_),
861
559
  vectorIngestionConfiguration: (_) => _json(_),
862
560
  }));
863
- return new __HttpRequest({
864
- protocol,
865
- hostname,
866
- port,
867
- method: "PUT",
868
- headers,
869
- path: resolvedPath,
870
- body,
871
- });
561
+ b.m("PUT").h(headers).b(body);
562
+ return b.build();
872
563
  };
873
564
  export const se_UpdateKnowledgeBaseCommand = async (input, context) => {
874
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
565
+ const b = rb(input, context);
875
566
  const headers = {
876
567
  "content-type": "application/json",
877
568
  };
878
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgebases/{knowledgeBaseId}";
879
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
569
+ b.bp("/knowledgebases/{knowledgeBaseId}");
570
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
880
571
  let body;
881
572
  body = JSON.stringify(take(input, {
882
573
  description: [],
@@ -885,15 +576,8 @@ export const se_UpdateKnowledgeBaseCommand = async (input, context) => {
885
576
  roleArn: [],
886
577
  storageConfiguration: (_) => _json(_),
887
578
  }));
888
- return new __HttpRequest({
889
- protocol,
890
- hostname,
891
- port,
892
- method: "PUT",
893
- headers,
894
- path: resolvedPath,
895
- body,
896
- });
579
+ b.m("PUT").h(headers).b(body);
580
+ return b.build();
897
581
  };
898
582
  export const de_AssociateAgentKnowledgeBaseCommand = async (output, context) => {
899
583
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3236,6 +2920,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
3236
2920
  value !== "" &&
3237
2921
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3238
2922
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2923
+ const _sRIUC = "skipResourceInUseCheck";
2924
+ const _tK = "tagKeys";
3239
2925
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3240
2926
  if (encoded.length) {
3241
2927
  return JSON.parse(encoded);