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