@aws-sdk/client-qconnect 3.476.0 → 3.477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,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 { QConnectServiceException as __BaseException } from "../models/QConnectServiceException";
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,479 +117,282 @@ 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_PutFeedbackCommand = 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}/feedback";
606
- resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
378
+ b.bp("/assistants/{assistantId}/feedback");
379
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
607
380
  let body;
608
381
  body = JSON.stringify(take(input, {
609
382
  contentFeedback: (_) => _json(_),
610
383
  targetId: [],
611
384
  targetType: [],
612
385
  }));
613
- return new __HttpRequest({
614
- protocol,
615
- hostname,
616
- port,
617
- method: "PUT",
618
- headers,
619
- path: resolvedPath,
620
- body,
621
- });
386
+ b.m("PUT").h(headers).b(body);
387
+ return b.build();
622
388
  };
623
389
  export const se_QueryAssistantCommand = 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
392
  "content-type": "application/json",
627
393
  };
628
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/query";
629
- resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
394
+ b.bp("/assistants/{assistantId}/query");
395
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
630
396
  let body;
631
397
  body = JSON.stringify(take(input, {
632
398
  maxResults: [],
@@ -635,143 +401,95 @@ export const se_QueryAssistantCommand = async (input, context) => {
635
401
  queryText: [],
636
402
  sessionId: [],
637
403
  }));
638
- return new __HttpRequest({
639
- protocol,
640
- hostname,
641
- port,
642
- method: "POST",
643
- headers,
644
- path: resolvedPath,
645
- body,
646
- });
404
+ b.m("POST").h(headers).b(body);
405
+ return b.build();
647
406
  };
648
407
  export const se_RemoveKnowledgeBaseTemplateUriCommand = async (input, context) => {
649
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
408
+ const b = rb(input, context);
650
409
  const headers = {};
651
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
652
- "/knowledgeBases/{knowledgeBaseId}/templateUri";
653
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
410
+ b.bp("/knowledgeBases/{knowledgeBaseId}/templateUri");
411
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
654
412
  let body;
655
- return new __HttpRequest({
656
- protocol,
657
- hostname,
658
- port,
659
- method: "DELETE",
660
- headers,
661
- path: resolvedPath,
662
- body,
663
- });
413
+ b.m("DELETE").h(headers).b(body);
414
+ return b.build();
664
415
  };
665
416
  export const se_SearchContentCommand = async (input, context) => {
666
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
417
+ const b = rb(input, context);
667
418
  const headers = {
668
419
  "content-type": "application/json",
669
420
  };
670
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/search";
671
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
421
+ b.bp("/knowledgeBases/{knowledgeBaseId}/search");
422
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
672
423
  const query = map({
673
- nextToken: [, input.nextToken],
674
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
424
+ [_nT]: [, input[_nT]],
425
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
675
426
  });
676
427
  let body;
677
428
  body = JSON.stringify(take(input, {
678
429
  searchExpression: (_) => _json(_),
679
430
  }));
680
- return new __HttpRequest({
681
- protocol,
682
- hostname,
683
- port,
684
- method: "POST",
685
- headers,
686
- path: resolvedPath,
687
- query,
688
- body,
689
- });
431
+ b.m("POST").h(headers).q(query).b(body);
432
+ return b.build();
690
433
  };
691
434
  export const se_SearchQuickResponsesCommand = async (input, context) => {
692
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
435
+ const b = rb(input, context);
693
436
  const headers = {
694
437
  "content-type": "application/json",
695
438
  };
696
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
697
- "/knowledgeBases/{knowledgeBaseId}/search/quickResponses";
698
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
439
+ b.bp("/knowledgeBases/{knowledgeBaseId}/search/quickResponses");
440
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
699
441
  const query = map({
700
- nextToken: [, input.nextToken],
701
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
442
+ [_nT]: [, input[_nT]],
443
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
702
444
  });
703
445
  let body;
704
446
  body = JSON.stringify(take(input, {
705
447
  attributes: (_) => _json(_),
706
448
  searchExpression: (_) => _json(_),
707
449
  }));
708
- return new __HttpRequest({
709
- protocol,
710
- hostname,
711
- port,
712
- method: "POST",
713
- headers,
714
- path: resolvedPath,
715
- query,
716
- body,
717
- });
450
+ b.m("POST").h(headers).q(query).b(body);
451
+ return b.build();
718
452
  };
719
453
  export const se_SearchSessionsCommand = async (input, context) => {
720
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
454
+ const b = rb(input, context);
721
455
  const headers = {
722
456
  "content-type": "application/json",
723
457
  };
724
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/searchSessions";
725
- resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
458
+ b.bp("/assistants/{assistantId}/searchSessions");
459
+ b.p("assistantId", () => input.assistantId, "{assistantId}", false);
726
460
  const query = map({
727
- nextToken: [, input.nextToken],
728
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
461
+ [_nT]: [, input[_nT]],
462
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
729
463
  });
730
464
  let body;
731
465
  body = JSON.stringify(take(input, {
732
466
  searchExpression: (_) => _json(_),
733
467
  }));
734
- return new __HttpRequest({
735
- protocol,
736
- hostname,
737
- port,
738
- method: "POST",
739
- headers,
740
- path: resolvedPath,
741
- query,
742
- body,
743
- });
468
+ b.m("POST").h(headers).q(query).b(body);
469
+ return b.build();
744
470
  };
745
471
  export const se_StartContentUploadCommand = async (input, context) => {
746
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
472
+ const b = rb(input, context);
747
473
  const headers = {
748
474
  "content-type": "application/json",
749
475
  };
750
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases/{knowledgeBaseId}/upload";
751
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
476
+ b.bp("/knowledgeBases/{knowledgeBaseId}/upload");
477
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
752
478
  let body;
753
479
  body = JSON.stringify(take(input, {
754
480
  contentType: [],
755
481
  presignedUrlTimeToLive: [],
756
482
  }));
757
- return new __HttpRequest({
758
- protocol,
759
- hostname,
760
- port,
761
- method: "POST",
762
- headers,
763
- path: resolvedPath,
764
- body,
765
- });
483
+ b.m("POST").h(headers).b(body);
484
+ return b.build();
766
485
  };
767
486
  export const se_StartImportJobCommand = async (input, context) => {
768
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
487
+ const b = rb(input, context);
769
488
  const headers = {
770
489
  "content-type": "application/json",
771
490
  };
772
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
773
- "/knowledgeBases/{knowledgeBaseId}/importJobs";
774
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
491
+ b.bp("/knowledgeBases/{knowledgeBaseId}/importJobs");
492
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
775
493
  let body;
776
494
  body = JSON.stringify(take(input, {
777
495
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -780,69 +498,46 @@ export const se_StartImportJobCommand = async (input, context) => {
780
498
  metadata: (_) => _json(_),
781
499
  uploadId: [],
782
500
  }));
783
- return new __HttpRequest({
784
- protocol,
785
- hostname,
786
- port,
787
- method: "POST",
788
- headers,
789
- path: resolvedPath,
790
- body,
791
- });
501
+ b.m("POST").h(headers).b(body);
502
+ return b.build();
792
503
  };
793
504
  export const se_TagResourceCommand = async (input, context) => {
794
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
505
+ const b = rb(input, context);
795
506
  const headers = {
796
507
  "content-type": "application/json",
797
508
  };
798
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
799
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
509
+ b.bp("/tags/{resourceArn}");
510
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
800
511
  let body;
801
512
  body = JSON.stringify(take(input, {
802
513
  tags: (_) => _json(_),
803
514
  }));
804
- return new __HttpRequest({
805
- protocol,
806
- hostname,
807
- port,
808
- method: "POST",
809
- headers,
810
- path: resolvedPath,
811
- body,
812
- });
515
+ b.m("POST").h(headers).b(body);
516
+ return b.build();
813
517
  };
814
518
  export const se_UntagResourceCommand = async (input, context) => {
815
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
519
+ const b = rb(input, context);
816
520
  const headers = {};
817
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
818
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
521
+ b.bp("/tags/{resourceArn}");
522
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
819
523
  const query = map({
820
- tagKeys: [
524
+ [_tK]: [
821
525
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
822
- () => (input.tagKeys || []).map((_entry) => _entry),
526
+ () => (input[_tK] || []).map((_entry) => _entry),
823
527
  ],
824
528
  });
825
529
  let body;
826
- return new __HttpRequest({
827
- protocol,
828
- hostname,
829
- port,
830
- method: "DELETE",
831
- headers,
832
- path: resolvedPath,
833
- query,
834
- body,
835
- });
530
+ b.m("DELETE").h(headers).q(query).b(body);
531
+ return b.build();
836
532
  };
837
533
  export const se_UpdateContentCommand = async (input, context) => {
838
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
534
+ const b = rb(input, context);
839
535
  const headers = {
840
536
  "content-type": "application/json",
841
537
  };
842
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
843
- "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}";
844
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
845
- resolvedPath = __resolvedPath(resolvedPath, input, "contentId", () => input.contentId, "{contentId}", false);
538
+ b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}");
539
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
540
+ b.p("contentId", () => input.contentId, "{contentId}", false);
846
541
  let body;
847
542
  body = JSON.stringify(take(input, {
848
543
  metadata: (_) => _json(_),
@@ -852,47 +547,31 @@ export const se_UpdateContentCommand = async (input, context) => {
852
547
  title: [],
853
548
  uploadId: [],
854
549
  }));
855
- return new __HttpRequest({
856
- protocol,
857
- hostname,
858
- port,
859
- method: "POST",
860
- headers,
861
- path: resolvedPath,
862
- body,
863
- });
550
+ b.m("POST").h(headers).b(body);
551
+ return b.build();
864
552
  };
865
553
  export const se_UpdateKnowledgeBaseTemplateUriCommand = async (input, context) => {
866
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
554
+ const b = rb(input, context);
867
555
  const headers = {
868
556
  "content-type": "application/json",
869
557
  };
870
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
871
- "/knowledgeBases/{knowledgeBaseId}/templateUri";
872
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
558
+ b.bp("/knowledgeBases/{knowledgeBaseId}/templateUri");
559
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
873
560
  let body;
874
561
  body = JSON.stringify(take(input, {
875
562
  templateUri: [],
876
563
  }));
877
- return new __HttpRequest({
878
- protocol,
879
- hostname,
880
- port,
881
- method: "POST",
882
- headers,
883
- path: resolvedPath,
884
- body,
885
- });
564
+ b.m("POST").h(headers).b(body);
565
+ return b.build();
886
566
  };
887
567
  export const se_UpdateQuickResponseCommand = async (input, context) => {
888
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
568
+ const b = rb(input, context);
889
569
  const headers = {
890
570
  "content-type": "application/json",
891
571
  };
892
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
893
- "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}";
894
- resolvedPath = __resolvedPath(resolvedPath, input, "knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
895
- resolvedPath = __resolvedPath(resolvedPath, input, "quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
572
+ b.bp("/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}");
573
+ b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
574
+ b.p("quickResponseId", () => input.quickResponseId, "{quickResponseId}", false);
896
575
  let body;
897
576
  body = JSON.stringify(take(input, {
898
577
  channels: (_) => _json(_),
@@ -908,15 +587,8 @@ export const se_UpdateQuickResponseCommand = async (input, context) => {
908
587
  removeShortcutKey: [],
909
588
  shortcutKey: [],
910
589
  }));
911
- return new __HttpRequest({
912
- protocol,
913
- hostname,
914
- port,
915
- method: "POST",
916
- headers,
917
- path: resolvedPath,
918
- body,
919
- });
590
+ b.m("POST").h(headers).b(body);
591
+ return b.build();
920
592
  };
921
593
  export const de_CreateAssistantCommand = async (output, context) => {
922
594
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2931,6 +2603,10 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2931
2603
  value !== "" &&
2932
2604
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2933
2605
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2606
+ const _mR = "maxResults";
2607
+ const _nT = "nextToken";
2608
+ const _tK = "tagKeys";
2609
+ const _wTS = "waitTimeSeconds";
2934
2610
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2935
2611
  if (encoded.length) {
2936
2612
  return JSON.parse(encoded);