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