@aws-sdk/client-kendra-ranking 3.490.0 → 3.496.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.
package/dist-cjs/index.js CHANGED
@@ -1,12 +1,1201 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KendraRankingServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./KendraRankingClient"), exports);
6
- tslib_1.__exportStar(require("./KendraRanking"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./models"), exports);
10
- require("@aws-sdk/util-endpoints");
11
- var KendraRankingServiceException_1 = require("./models/KendraRankingServiceException");
12
- Object.defineProperty(exports, "KendraRankingServiceException", { enumerable: true, get: function () { return KendraRankingServiceException_1.KendraRankingServiceException; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ AccessDeniedException: () => AccessDeniedException,
25
+ ConflictException: () => ConflictException,
26
+ CreateRescoreExecutionPlanCommand: () => CreateRescoreExecutionPlanCommand,
27
+ DeleteRescoreExecutionPlanCommand: () => DeleteRescoreExecutionPlanCommand,
28
+ DescribeRescoreExecutionPlanCommand: () => DescribeRescoreExecutionPlanCommand,
29
+ InternalServerException: () => InternalServerException,
30
+ KendraRanking: () => KendraRanking,
31
+ KendraRankingClient: () => KendraRankingClient,
32
+ KendraRankingServiceException: () => KendraRankingServiceException,
33
+ ListRescoreExecutionPlansCommand: () => ListRescoreExecutionPlansCommand,
34
+ ListTagsForResourceCommand: () => ListTagsForResourceCommand,
35
+ RescoreCommand: () => RescoreCommand,
36
+ RescoreExecutionPlanStatus: () => RescoreExecutionPlanStatus,
37
+ ResourceNotFoundException: () => ResourceNotFoundException,
38
+ ResourceUnavailableException: () => ResourceUnavailableException,
39
+ ServiceQuotaExceededException: () => ServiceQuotaExceededException,
40
+ TagResourceCommand: () => TagResourceCommand,
41
+ ThrottlingException: () => ThrottlingException,
42
+ UntagResourceCommand: () => UntagResourceCommand,
43
+ UpdateRescoreExecutionPlanCommand: () => UpdateRescoreExecutionPlanCommand,
44
+ ValidationException: () => ValidationException,
45
+ __Client: () => import_smithy_client.Client,
46
+ paginateListRescoreExecutionPlans: () => paginateListRescoreExecutionPlans
47
+ });
48
+ module.exports = __toCommonJS(src_exports);
49
+
50
+ // src/KendraRankingClient.ts
51
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
52
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
53
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
54
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
55
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
56
+ var import_config_resolver = require("@smithy/config-resolver");
57
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
58
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
59
+ var import_middleware_retry = require("@smithy/middleware-retry");
60
+
61
+
62
+ // src/endpoint/EndpointParameters.ts
63
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
64
+ return {
65
+ ...options,
66
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
67
+ defaultSigningName: "kendra-ranking"
68
+ };
69
+ }, "resolveClientEndpointParameters");
70
+ var commonParams = {
71
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
72
+ Endpoint: { type: "builtInParams", name: "endpoint" },
73
+ Region: { type: "builtInParams", name: "region" }
74
+ };
75
+
76
+ // src/KendraRankingClient.ts
77
+ var import_runtimeConfig = require("././runtimeConfig");
78
+
79
+ // src/runtimeExtensions.ts
80
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
81
+ var import_protocol_http = require("@smithy/protocol-http");
82
+ var import_smithy_client = require("@smithy/smithy-client");
83
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
84
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
85
+ const extensionConfiguration = {
86
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
87
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
88
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
89
+ };
90
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
91
+ return {
92
+ ...runtimeConfig,
93
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
94
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
95
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
96
+ };
97
+ }, "resolveRuntimeExtensions");
98
+
99
+ // src/KendraRankingClient.ts
100
+ var _KendraRankingClient = class _KendraRankingClient extends import_smithy_client.Client {
101
+ constructor(...[configuration]) {
102
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
103
+ const _config_1 = resolveClientEndpointParameters(_config_0);
104
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
105
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
106
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
107
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
108
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
109
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
110
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
111
+ super(_config_8);
112
+ this.config = _config_8;
113
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
114
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
115
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
116
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
117
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
118
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
119
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
120
+ }
121
+ /**
122
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
123
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
124
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
125
+ */
126
+ destroy() {
127
+ super.destroy();
128
+ }
129
+ };
130
+ __name(_KendraRankingClient, "KendraRankingClient");
131
+ var KendraRankingClient = _KendraRankingClient;
132
+
133
+ // src/KendraRanking.ts
134
+
135
+
136
+ // src/commands/CreateRescoreExecutionPlanCommand.ts
137
+
138
+ var import_middleware_serde = require("@smithy/middleware-serde");
139
+
140
+ var import_types = require("@smithy/types");
141
+
142
+ // src/protocols/Aws_json1_0.ts
143
+
144
+
145
+ var import_uuid = require("uuid");
146
+
147
+ // src/models/KendraRankingServiceException.ts
148
+
149
+ var _KendraRankingServiceException = class _KendraRankingServiceException extends import_smithy_client.ServiceException {
150
+ /**
151
+ * @internal
152
+ */
153
+ constructor(options) {
154
+ super(options);
155
+ Object.setPrototypeOf(this, _KendraRankingServiceException.prototype);
156
+ }
157
+ };
158
+ __name(_KendraRankingServiceException, "KendraRankingServiceException");
159
+ var KendraRankingServiceException = _KendraRankingServiceException;
160
+
161
+ // src/models/models_0.ts
162
+ var _AccessDeniedException = class _AccessDeniedException extends KendraRankingServiceException {
163
+ /**
164
+ * @internal
165
+ */
166
+ constructor(opts) {
167
+ super({
168
+ name: "AccessDeniedException",
169
+ $fault: "client",
170
+ ...opts
171
+ });
172
+ this.name = "AccessDeniedException";
173
+ this.$fault = "client";
174
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
175
+ this.Message = opts.Message;
176
+ }
177
+ };
178
+ __name(_AccessDeniedException, "AccessDeniedException");
179
+ var AccessDeniedException = _AccessDeniedException;
180
+ var _ConflictException = class _ConflictException extends KendraRankingServiceException {
181
+ /**
182
+ * @internal
183
+ */
184
+ constructor(opts) {
185
+ super({
186
+ name: "ConflictException",
187
+ $fault: "client",
188
+ ...opts
189
+ });
190
+ this.name = "ConflictException";
191
+ this.$fault = "client";
192
+ Object.setPrototypeOf(this, _ConflictException.prototype);
193
+ this.Message = opts.Message;
194
+ }
195
+ };
196
+ __name(_ConflictException, "ConflictException");
197
+ var ConflictException = _ConflictException;
198
+ var _InternalServerException = class _InternalServerException extends KendraRankingServiceException {
199
+ /**
200
+ * @internal
201
+ */
202
+ constructor(opts) {
203
+ super({
204
+ name: "InternalServerException",
205
+ $fault: "server",
206
+ ...opts
207
+ });
208
+ this.name = "InternalServerException";
209
+ this.$fault = "server";
210
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
211
+ this.Message = opts.Message;
212
+ }
213
+ };
214
+ __name(_InternalServerException, "InternalServerException");
215
+ var InternalServerException = _InternalServerException;
216
+ var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends KendraRankingServiceException {
217
+ /**
218
+ * @internal
219
+ */
220
+ constructor(opts) {
221
+ super({
222
+ name: "ServiceQuotaExceededException",
223
+ $fault: "client",
224
+ ...opts
225
+ });
226
+ this.name = "ServiceQuotaExceededException";
227
+ this.$fault = "client";
228
+ Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
229
+ this.Message = opts.Message;
230
+ }
231
+ };
232
+ __name(_ServiceQuotaExceededException, "ServiceQuotaExceededException");
233
+ var ServiceQuotaExceededException = _ServiceQuotaExceededException;
234
+ var _ThrottlingException = class _ThrottlingException extends KendraRankingServiceException {
235
+ /**
236
+ * @internal
237
+ */
238
+ constructor(opts) {
239
+ super({
240
+ name: "ThrottlingException",
241
+ $fault: "client",
242
+ ...opts
243
+ });
244
+ this.name = "ThrottlingException";
245
+ this.$fault = "client";
246
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
247
+ this.Message = opts.Message;
248
+ }
249
+ };
250
+ __name(_ThrottlingException, "ThrottlingException");
251
+ var ThrottlingException = _ThrottlingException;
252
+ var _ValidationException = class _ValidationException extends KendraRankingServiceException {
253
+ /**
254
+ * @internal
255
+ */
256
+ constructor(opts) {
257
+ super({
258
+ name: "ValidationException",
259
+ $fault: "client",
260
+ ...opts
261
+ });
262
+ this.name = "ValidationException";
263
+ this.$fault = "client";
264
+ Object.setPrototypeOf(this, _ValidationException.prototype);
265
+ this.Message = opts.Message;
266
+ }
267
+ };
268
+ __name(_ValidationException, "ValidationException");
269
+ var ValidationException = _ValidationException;
270
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends KendraRankingServiceException {
271
+ /**
272
+ * @internal
273
+ */
274
+ constructor(opts) {
275
+ super({
276
+ name: "ResourceNotFoundException",
277
+ $fault: "client",
278
+ ...opts
279
+ });
280
+ this.name = "ResourceNotFoundException";
281
+ this.$fault = "client";
282
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
283
+ this.Message = opts.Message;
284
+ }
285
+ };
286
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
287
+ var ResourceNotFoundException = _ResourceNotFoundException;
288
+ var RescoreExecutionPlanStatus = {
289
+ ACTIVE: "ACTIVE",
290
+ CREATING: "CREATING",
291
+ DELETING: "DELETING",
292
+ FAILED: "FAILED",
293
+ UPDATING: "UPDATING"
294
+ };
295
+ var _ResourceUnavailableException = class _ResourceUnavailableException extends KendraRankingServiceException {
296
+ /**
297
+ * @internal
298
+ */
299
+ constructor(opts) {
300
+ super({
301
+ name: "ResourceUnavailableException",
302
+ $fault: "client",
303
+ ...opts
304
+ });
305
+ this.name = "ResourceUnavailableException";
306
+ this.$fault = "client";
307
+ Object.setPrototypeOf(this, _ResourceUnavailableException.prototype);
308
+ this.Message = opts.Message;
309
+ }
310
+ };
311
+ __name(_ResourceUnavailableException, "ResourceUnavailableException");
312
+ var ResourceUnavailableException = _ResourceUnavailableException;
313
+
314
+ // src/protocols/Aws_json1_0.ts
315
+ var se_CreateRescoreExecutionPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
316
+ const headers = sharedHeaders("CreateRescoreExecutionPlan");
317
+ let body;
318
+ body = JSON.stringify(se_CreateRescoreExecutionPlanRequest(input, context));
319
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
320
+ }, "se_CreateRescoreExecutionPlanCommand");
321
+ var se_DeleteRescoreExecutionPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
322
+ const headers = sharedHeaders("DeleteRescoreExecutionPlan");
323
+ let body;
324
+ body = JSON.stringify((0, import_smithy_client._json)(input));
325
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
326
+ }, "se_DeleteRescoreExecutionPlanCommand");
327
+ var se_DescribeRescoreExecutionPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
328
+ const headers = sharedHeaders("DescribeRescoreExecutionPlan");
329
+ let body;
330
+ body = JSON.stringify((0, import_smithy_client._json)(input));
331
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
332
+ }, "se_DescribeRescoreExecutionPlanCommand");
333
+ var se_ListRescoreExecutionPlansCommand = /* @__PURE__ */ __name(async (input, context) => {
334
+ const headers = sharedHeaders("ListRescoreExecutionPlans");
335
+ let body;
336
+ body = JSON.stringify((0, import_smithy_client._json)(input));
337
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
338
+ }, "se_ListRescoreExecutionPlansCommand");
339
+ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
340
+ const headers = sharedHeaders("ListTagsForResource");
341
+ let body;
342
+ body = JSON.stringify((0, import_smithy_client._json)(input));
343
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
344
+ }, "se_ListTagsForResourceCommand");
345
+ var se_RescoreCommand = /* @__PURE__ */ __name(async (input, context) => {
346
+ const headers = sharedHeaders("Rescore");
347
+ let body;
348
+ body = JSON.stringify(se_RescoreRequest(input, context));
349
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
350
+ }, "se_RescoreCommand");
351
+ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
352
+ const headers = sharedHeaders("TagResource");
353
+ let body;
354
+ body = JSON.stringify((0, import_smithy_client._json)(input));
355
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
356
+ }, "se_TagResourceCommand");
357
+ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
358
+ const headers = sharedHeaders("UntagResource");
359
+ let body;
360
+ body = JSON.stringify((0, import_smithy_client._json)(input));
361
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
362
+ }, "se_UntagResourceCommand");
363
+ var se_UpdateRescoreExecutionPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
364
+ const headers = sharedHeaders("UpdateRescoreExecutionPlan");
365
+ let body;
366
+ body = JSON.stringify((0, import_smithy_client._json)(input));
367
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
368
+ }, "se_UpdateRescoreExecutionPlanCommand");
369
+ var de_CreateRescoreExecutionPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
370
+ if (output.statusCode >= 300) {
371
+ return de_CreateRescoreExecutionPlanCommandError(output, context);
372
+ }
373
+ const data = await parseBody(output.body, context);
374
+ let contents = {};
375
+ contents = (0, import_smithy_client._json)(data);
376
+ const response = {
377
+ $metadata: deserializeMetadata(output),
378
+ ...contents
379
+ };
380
+ return response;
381
+ }, "de_CreateRescoreExecutionPlanCommand");
382
+ var de_CreateRescoreExecutionPlanCommandError = /* @__PURE__ */ __name(async (output, context) => {
383
+ const parsedOutput = {
384
+ ...output,
385
+ body: await parseErrorBody(output.body, context)
386
+ };
387
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
388
+ switch (errorCode) {
389
+ case "AccessDeniedException":
390
+ case "com.amazonaws.kendraranking#AccessDeniedException":
391
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
392
+ case "ConflictException":
393
+ case "com.amazonaws.kendraranking#ConflictException":
394
+ throw await de_ConflictExceptionRes(parsedOutput, context);
395
+ case "InternalServerException":
396
+ case "com.amazonaws.kendraranking#InternalServerException":
397
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
398
+ case "ServiceQuotaExceededException":
399
+ case "com.amazonaws.kendraranking#ServiceQuotaExceededException":
400
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
401
+ case "ThrottlingException":
402
+ case "com.amazonaws.kendraranking#ThrottlingException":
403
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
404
+ case "ValidationException":
405
+ case "com.amazonaws.kendraranking#ValidationException":
406
+ throw await de_ValidationExceptionRes(parsedOutput, context);
407
+ default:
408
+ const parsedBody = parsedOutput.body;
409
+ return throwDefaultError({
410
+ output,
411
+ parsedBody,
412
+ errorCode
413
+ });
414
+ }
415
+ }, "de_CreateRescoreExecutionPlanCommandError");
416
+ var de_DeleteRescoreExecutionPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
417
+ if (output.statusCode >= 300) {
418
+ return de_DeleteRescoreExecutionPlanCommandError(output, context);
419
+ }
420
+ await (0, import_smithy_client.collectBody)(output.body, context);
421
+ const response = {
422
+ $metadata: deserializeMetadata(output)
423
+ };
424
+ return response;
425
+ }, "de_DeleteRescoreExecutionPlanCommand");
426
+ var de_DeleteRescoreExecutionPlanCommandError = /* @__PURE__ */ __name(async (output, context) => {
427
+ const parsedOutput = {
428
+ ...output,
429
+ body: await parseErrorBody(output.body, context)
430
+ };
431
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
432
+ switch (errorCode) {
433
+ case "AccessDeniedException":
434
+ case "com.amazonaws.kendraranking#AccessDeniedException":
435
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
436
+ case "ConflictException":
437
+ case "com.amazonaws.kendraranking#ConflictException":
438
+ throw await de_ConflictExceptionRes(parsedOutput, context);
439
+ case "InternalServerException":
440
+ case "com.amazonaws.kendraranking#InternalServerException":
441
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
442
+ case "ResourceNotFoundException":
443
+ case "com.amazonaws.kendraranking#ResourceNotFoundException":
444
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
445
+ case "ThrottlingException":
446
+ case "com.amazonaws.kendraranking#ThrottlingException":
447
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
448
+ case "ValidationException":
449
+ case "com.amazonaws.kendraranking#ValidationException":
450
+ throw await de_ValidationExceptionRes(parsedOutput, context);
451
+ default:
452
+ const parsedBody = parsedOutput.body;
453
+ return throwDefaultError({
454
+ output,
455
+ parsedBody,
456
+ errorCode
457
+ });
458
+ }
459
+ }, "de_DeleteRescoreExecutionPlanCommandError");
460
+ var de_DescribeRescoreExecutionPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
461
+ if (output.statusCode >= 300) {
462
+ return de_DescribeRescoreExecutionPlanCommandError(output, context);
463
+ }
464
+ const data = await parseBody(output.body, context);
465
+ let contents = {};
466
+ contents = de_DescribeRescoreExecutionPlanResponse(data, context);
467
+ const response = {
468
+ $metadata: deserializeMetadata(output),
469
+ ...contents
470
+ };
471
+ return response;
472
+ }, "de_DescribeRescoreExecutionPlanCommand");
473
+ var de_DescribeRescoreExecutionPlanCommandError = /* @__PURE__ */ __name(async (output, context) => {
474
+ const parsedOutput = {
475
+ ...output,
476
+ body: await parseErrorBody(output.body, context)
477
+ };
478
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
479
+ switch (errorCode) {
480
+ case "AccessDeniedException":
481
+ case "com.amazonaws.kendraranking#AccessDeniedException":
482
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
483
+ case "InternalServerException":
484
+ case "com.amazonaws.kendraranking#InternalServerException":
485
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
486
+ case "ResourceNotFoundException":
487
+ case "com.amazonaws.kendraranking#ResourceNotFoundException":
488
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
489
+ case "ThrottlingException":
490
+ case "com.amazonaws.kendraranking#ThrottlingException":
491
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
492
+ case "ValidationException":
493
+ case "com.amazonaws.kendraranking#ValidationException":
494
+ throw await de_ValidationExceptionRes(parsedOutput, context);
495
+ default:
496
+ const parsedBody = parsedOutput.body;
497
+ return throwDefaultError({
498
+ output,
499
+ parsedBody,
500
+ errorCode
501
+ });
502
+ }
503
+ }, "de_DescribeRescoreExecutionPlanCommandError");
504
+ var de_ListRescoreExecutionPlansCommand = /* @__PURE__ */ __name(async (output, context) => {
505
+ if (output.statusCode >= 300) {
506
+ return de_ListRescoreExecutionPlansCommandError(output, context);
507
+ }
508
+ const data = await parseBody(output.body, context);
509
+ let contents = {};
510
+ contents = de_ListRescoreExecutionPlansResponse(data, context);
511
+ const response = {
512
+ $metadata: deserializeMetadata(output),
513
+ ...contents
514
+ };
515
+ return response;
516
+ }, "de_ListRescoreExecutionPlansCommand");
517
+ var de_ListRescoreExecutionPlansCommandError = /* @__PURE__ */ __name(async (output, context) => {
518
+ const parsedOutput = {
519
+ ...output,
520
+ body: await parseErrorBody(output.body, context)
521
+ };
522
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
523
+ switch (errorCode) {
524
+ case "AccessDeniedException":
525
+ case "com.amazonaws.kendraranking#AccessDeniedException":
526
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
527
+ case "InternalServerException":
528
+ case "com.amazonaws.kendraranking#InternalServerException":
529
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
530
+ case "ThrottlingException":
531
+ case "com.amazonaws.kendraranking#ThrottlingException":
532
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
533
+ case "ValidationException":
534
+ case "com.amazonaws.kendraranking#ValidationException":
535
+ throw await de_ValidationExceptionRes(parsedOutput, context);
536
+ default:
537
+ const parsedBody = parsedOutput.body;
538
+ return throwDefaultError({
539
+ output,
540
+ parsedBody,
541
+ errorCode
542
+ });
543
+ }
544
+ }, "de_ListRescoreExecutionPlansCommandError");
545
+ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
546
+ if (output.statusCode >= 300) {
547
+ return de_ListTagsForResourceCommandError(output, context);
548
+ }
549
+ const data = await parseBody(output.body, context);
550
+ let contents = {};
551
+ contents = (0, import_smithy_client._json)(data);
552
+ const response = {
553
+ $metadata: deserializeMetadata(output),
554
+ ...contents
555
+ };
556
+ return response;
557
+ }, "de_ListTagsForResourceCommand");
558
+ var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
559
+ const parsedOutput = {
560
+ ...output,
561
+ body: await parseErrorBody(output.body, context)
562
+ };
563
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
564
+ switch (errorCode) {
565
+ case "AccessDeniedException":
566
+ case "com.amazonaws.kendraranking#AccessDeniedException":
567
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
568
+ case "InternalServerException":
569
+ case "com.amazonaws.kendraranking#InternalServerException":
570
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
571
+ case "ResourceUnavailableException":
572
+ case "com.amazonaws.kendraranking#ResourceUnavailableException":
573
+ throw await de_ResourceUnavailableExceptionRes(parsedOutput, context);
574
+ case "ThrottlingException":
575
+ case "com.amazonaws.kendraranking#ThrottlingException":
576
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
577
+ case "ValidationException":
578
+ case "com.amazonaws.kendraranking#ValidationException":
579
+ throw await de_ValidationExceptionRes(parsedOutput, context);
580
+ default:
581
+ const parsedBody = parsedOutput.body;
582
+ return throwDefaultError({
583
+ output,
584
+ parsedBody,
585
+ errorCode
586
+ });
587
+ }
588
+ }, "de_ListTagsForResourceCommandError");
589
+ var de_RescoreCommand = /* @__PURE__ */ __name(async (output, context) => {
590
+ if (output.statusCode >= 300) {
591
+ return de_RescoreCommandError(output, context);
592
+ }
593
+ const data = await parseBody(output.body, context);
594
+ let contents = {};
595
+ contents = de_RescoreResult(data, context);
596
+ const response = {
597
+ $metadata: deserializeMetadata(output),
598
+ ...contents
599
+ };
600
+ return response;
601
+ }, "de_RescoreCommand");
602
+ var de_RescoreCommandError = /* @__PURE__ */ __name(async (output, context) => {
603
+ const parsedOutput = {
604
+ ...output,
605
+ body: await parseErrorBody(output.body, context)
606
+ };
607
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
608
+ switch (errorCode) {
609
+ case "AccessDeniedException":
610
+ case "com.amazonaws.kendraranking#AccessDeniedException":
611
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
612
+ case "ConflictException":
613
+ case "com.amazonaws.kendraranking#ConflictException":
614
+ throw await de_ConflictExceptionRes(parsedOutput, context);
615
+ case "InternalServerException":
616
+ case "com.amazonaws.kendraranking#InternalServerException":
617
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
618
+ case "ResourceNotFoundException":
619
+ case "com.amazonaws.kendraranking#ResourceNotFoundException":
620
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
621
+ case "ThrottlingException":
622
+ case "com.amazonaws.kendraranking#ThrottlingException":
623
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
624
+ case "ValidationException":
625
+ case "com.amazonaws.kendraranking#ValidationException":
626
+ throw await de_ValidationExceptionRes(parsedOutput, context);
627
+ default:
628
+ const parsedBody = parsedOutput.body;
629
+ return throwDefaultError({
630
+ output,
631
+ parsedBody,
632
+ errorCode
633
+ });
634
+ }
635
+ }, "de_RescoreCommandError");
636
+ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
637
+ if (output.statusCode >= 300) {
638
+ return de_TagResourceCommandError(output, context);
639
+ }
640
+ const data = await parseBody(output.body, context);
641
+ let contents = {};
642
+ contents = (0, import_smithy_client._json)(data);
643
+ const response = {
644
+ $metadata: deserializeMetadata(output),
645
+ ...contents
646
+ };
647
+ return response;
648
+ }, "de_TagResourceCommand");
649
+ var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
650
+ const parsedOutput = {
651
+ ...output,
652
+ body: await parseErrorBody(output.body, context)
653
+ };
654
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
655
+ switch (errorCode) {
656
+ case "AccessDeniedException":
657
+ case "com.amazonaws.kendraranking#AccessDeniedException":
658
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
659
+ case "InternalServerException":
660
+ case "com.amazonaws.kendraranking#InternalServerException":
661
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
662
+ case "ResourceUnavailableException":
663
+ case "com.amazonaws.kendraranking#ResourceUnavailableException":
664
+ throw await de_ResourceUnavailableExceptionRes(parsedOutput, context);
665
+ case "ThrottlingException":
666
+ case "com.amazonaws.kendraranking#ThrottlingException":
667
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
668
+ case "ValidationException":
669
+ case "com.amazonaws.kendraranking#ValidationException":
670
+ throw await de_ValidationExceptionRes(parsedOutput, context);
671
+ default:
672
+ const parsedBody = parsedOutput.body;
673
+ return throwDefaultError({
674
+ output,
675
+ parsedBody,
676
+ errorCode
677
+ });
678
+ }
679
+ }, "de_TagResourceCommandError");
680
+ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
681
+ if (output.statusCode >= 300) {
682
+ return de_UntagResourceCommandError(output, context);
683
+ }
684
+ const data = await parseBody(output.body, context);
685
+ let contents = {};
686
+ contents = (0, import_smithy_client._json)(data);
687
+ const response = {
688
+ $metadata: deserializeMetadata(output),
689
+ ...contents
690
+ };
691
+ return response;
692
+ }, "de_UntagResourceCommand");
693
+ var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
694
+ const parsedOutput = {
695
+ ...output,
696
+ body: await parseErrorBody(output.body, context)
697
+ };
698
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
+ switch (errorCode) {
700
+ case "AccessDeniedException":
701
+ case "com.amazonaws.kendraranking#AccessDeniedException":
702
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
703
+ case "InternalServerException":
704
+ case "com.amazonaws.kendraranking#InternalServerException":
705
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
706
+ case "ResourceUnavailableException":
707
+ case "com.amazonaws.kendraranking#ResourceUnavailableException":
708
+ throw await de_ResourceUnavailableExceptionRes(parsedOutput, context);
709
+ case "ThrottlingException":
710
+ case "com.amazonaws.kendraranking#ThrottlingException":
711
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
712
+ case "ValidationException":
713
+ case "com.amazonaws.kendraranking#ValidationException":
714
+ throw await de_ValidationExceptionRes(parsedOutput, context);
715
+ default:
716
+ const parsedBody = parsedOutput.body;
717
+ return throwDefaultError({
718
+ output,
719
+ parsedBody,
720
+ errorCode
721
+ });
722
+ }
723
+ }, "de_UntagResourceCommandError");
724
+ var de_UpdateRescoreExecutionPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
725
+ if (output.statusCode >= 300) {
726
+ return de_UpdateRescoreExecutionPlanCommandError(output, context);
727
+ }
728
+ await (0, import_smithy_client.collectBody)(output.body, context);
729
+ const response = {
730
+ $metadata: deserializeMetadata(output)
731
+ };
732
+ return response;
733
+ }, "de_UpdateRescoreExecutionPlanCommand");
734
+ var de_UpdateRescoreExecutionPlanCommandError = /* @__PURE__ */ __name(async (output, context) => {
735
+ const parsedOutput = {
736
+ ...output,
737
+ body: await parseErrorBody(output.body, context)
738
+ };
739
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
740
+ switch (errorCode) {
741
+ case "AccessDeniedException":
742
+ case "com.amazonaws.kendraranking#AccessDeniedException":
743
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
744
+ case "ConflictException":
745
+ case "com.amazonaws.kendraranking#ConflictException":
746
+ throw await de_ConflictExceptionRes(parsedOutput, context);
747
+ case "InternalServerException":
748
+ case "com.amazonaws.kendraranking#InternalServerException":
749
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
750
+ case "ResourceNotFoundException":
751
+ case "com.amazonaws.kendraranking#ResourceNotFoundException":
752
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
753
+ case "ServiceQuotaExceededException":
754
+ case "com.amazonaws.kendraranking#ServiceQuotaExceededException":
755
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
756
+ case "ThrottlingException":
757
+ case "com.amazonaws.kendraranking#ThrottlingException":
758
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
759
+ case "ValidationException":
760
+ case "com.amazonaws.kendraranking#ValidationException":
761
+ throw await de_ValidationExceptionRes(parsedOutput, context);
762
+ default:
763
+ const parsedBody = parsedOutput.body;
764
+ return throwDefaultError({
765
+ output,
766
+ parsedBody,
767
+ errorCode
768
+ });
769
+ }
770
+ }, "de_UpdateRescoreExecutionPlanCommandError");
771
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
772
+ const body = parsedOutput.body;
773
+ const deserialized = (0, import_smithy_client._json)(body);
774
+ const exception = new AccessDeniedException({
775
+ $metadata: deserializeMetadata(parsedOutput),
776
+ ...deserialized
777
+ });
778
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
779
+ }, "de_AccessDeniedExceptionRes");
780
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
781
+ const body = parsedOutput.body;
782
+ const deserialized = (0, import_smithy_client._json)(body);
783
+ const exception = new ConflictException({
784
+ $metadata: deserializeMetadata(parsedOutput),
785
+ ...deserialized
786
+ });
787
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
788
+ }, "de_ConflictExceptionRes");
789
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
790
+ const body = parsedOutput.body;
791
+ const deserialized = (0, import_smithy_client._json)(body);
792
+ const exception = new InternalServerException({
793
+ $metadata: deserializeMetadata(parsedOutput),
794
+ ...deserialized
795
+ });
796
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
797
+ }, "de_InternalServerExceptionRes");
798
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
799
+ const body = parsedOutput.body;
800
+ const deserialized = (0, import_smithy_client._json)(body);
801
+ const exception = new ResourceNotFoundException({
802
+ $metadata: deserializeMetadata(parsedOutput),
803
+ ...deserialized
804
+ });
805
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
806
+ }, "de_ResourceNotFoundExceptionRes");
807
+ var de_ResourceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
808
+ const body = parsedOutput.body;
809
+ const deserialized = (0, import_smithy_client._json)(body);
810
+ const exception = new ResourceUnavailableException({
811
+ $metadata: deserializeMetadata(parsedOutput),
812
+ ...deserialized
813
+ });
814
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
815
+ }, "de_ResourceUnavailableExceptionRes");
816
+ var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
817
+ const body = parsedOutput.body;
818
+ const deserialized = (0, import_smithy_client._json)(body);
819
+ const exception = new ServiceQuotaExceededException({
820
+ $metadata: deserializeMetadata(parsedOutput),
821
+ ...deserialized
822
+ });
823
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
824
+ }, "de_ServiceQuotaExceededExceptionRes");
825
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
826
+ const body = parsedOutput.body;
827
+ const deserialized = (0, import_smithy_client._json)(body);
828
+ const exception = new ThrottlingException({
829
+ $metadata: deserializeMetadata(parsedOutput),
830
+ ...deserialized
831
+ });
832
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
833
+ }, "de_ThrottlingExceptionRes");
834
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
835
+ const body = parsedOutput.body;
836
+ const deserialized = (0, import_smithy_client._json)(body);
837
+ const exception = new ValidationException({
838
+ $metadata: deserializeMetadata(parsedOutput),
839
+ ...deserialized
840
+ });
841
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
842
+ }, "de_ValidationExceptionRes");
843
+ var se_CreateRescoreExecutionPlanRequest = /* @__PURE__ */ __name((input, context) => {
844
+ return (0, import_smithy_client.take)(input, {
845
+ CapacityUnits: import_smithy_client._json,
846
+ ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
847
+ Description: [],
848
+ Name: [],
849
+ Tags: import_smithy_client._json
850
+ });
851
+ }, "se_CreateRescoreExecutionPlanRequest");
852
+ var se_Document = /* @__PURE__ */ __name((input, context) => {
853
+ return (0, import_smithy_client.take)(input, {
854
+ Body: [],
855
+ GroupId: [],
856
+ Id: [],
857
+ OriginalScore: import_smithy_client.serializeFloat,
858
+ Title: [],
859
+ TokenizedBody: import_smithy_client._json,
860
+ TokenizedTitle: import_smithy_client._json
861
+ });
862
+ }, "se_Document");
863
+ var se_DocumentList = /* @__PURE__ */ __name((input, context) => {
864
+ return input.filter((e) => e != null).map((entry) => {
865
+ return se_Document(entry, context);
866
+ });
867
+ }, "se_DocumentList");
868
+ var se_RescoreRequest = /* @__PURE__ */ __name((input, context) => {
869
+ return (0, import_smithy_client.take)(input, {
870
+ Documents: (_) => se_DocumentList(_, context),
871
+ RescoreExecutionPlanId: [],
872
+ SearchQuery: []
873
+ });
874
+ }, "se_RescoreRequest");
875
+ var de_DescribeRescoreExecutionPlanResponse = /* @__PURE__ */ __name((output, context) => {
876
+ return (0, import_smithy_client.take)(output, {
877
+ Arn: import_smithy_client.expectString,
878
+ CapacityUnits: import_smithy_client._json,
879
+ CreatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
880
+ Description: import_smithy_client.expectString,
881
+ ErrorMessage: import_smithy_client.expectString,
882
+ Id: import_smithy_client.expectString,
883
+ Name: import_smithy_client.expectString,
884
+ Status: import_smithy_client.expectString,
885
+ UpdatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
886
+ });
887
+ }, "de_DescribeRescoreExecutionPlanResponse");
888
+ var de_ListRescoreExecutionPlansResponse = /* @__PURE__ */ __name((output, context) => {
889
+ return (0, import_smithy_client.take)(output, {
890
+ NextToken: import_smithy_client.expectString,
891
+ SummaryItems: (_) => de_RescoreExecutionPlanSummaryList(_, context)
892
+ });
893
+ }, "de_ListRescoreExecutionPlansResponse");
894
+ var de_RescoreExecutionPlanSummary = /* @__PURE__ */ __name((output, context) => {
895
+ return (0, import_smithy_client.take)(output, {
896
+ CreatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
897
+ Id: import_smithy_client.expectString,
898
+ Name: import_smithy_client.expectString,
899
+ Status: import_smithy_client.expectString,
900
+ UpdatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
901
+ });
902
+ }, "de_RescoreExecutionPlanSummary");
903
+ var de_RescoreExecutionPlanSummaryList = /* @__PURE__ */ __name((output, context) => {
904
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
905
+ return de_RescoreExecutionPlanSummary(entry, context);
906
+ });
907
+ return retVal;
908
+ }, "de_RescoreExecutionPlanSummaryList");
909
+ var de_RescoreResult = /* @__PURE__ */ __name((output, context) => {
910
+ return (0, import_smithy_client.take)(output, {
911
+ RescoreId: import_smithy_client.expectString,
912
+ ResultItems: (_) => de_RescoreResultItemList(_, context)
913
+ });
914
+ }, "de_RescoreResult");
915
+ var de_RescoreResultItem = /* @__PURE__ */ __name((output, context) => {
916
+ return (0, import_smithy_client.take)(output, {
917
+ DocumentId: import_smithy_client.expectString,
918
+ Score: import_smithy_client.limitedParseFloat32
919
+ });
920
+ }, "de_RescoreResultItem");
921
+ var de_RescoreResultItemList = /* @__PURE__ */ __name((output, context) => {
922
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
923
+ return de_RescoreResultItem(entry, context);
924
+ });
925
+ return retVal;
926
+ }, "de_RescoreResultItemList");
927
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
928
+ httpStatusCode: output.statusCode,
929
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
930
+ extendedRequestId: output.headers["x-amz-id-2"],
931
+ cfId: output.headers["x-amz-cf-id"]
932
+ }), "deserializeMetadata");
933
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
934
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(KendraRankingServiceException);
935
+ var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
936
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
937
+ const contents = {
938
+ protocol,
939
+ hostname,
940
+ port,
941
+ method: "POST",
942
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
943
+ headers
944
+ };
945
+ if (resolvedHostname !== void 0) {
946
+ contents.hostname = resolvedHostname;
947
+ }
948
+ if (body !== void 0) {
949
+ contents.body = body;
950
+ }
951
+ return new import_protocol_http.HttpRequest(contents);
952
+ }, "buildHttpRpcRequest");
953
+ function sharedHeaders(operation) {
954
+ return {
955
+ "content-type": "application/x-amz-json-1.0",
956
+ "x-amz-target": `AWSKendraRerankingFrontendService.${operation}`
957
+ };
958
+ }
959
+ __name(sharedHeaders, "sharedHeaders");
960
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
961
+ if (encoded.length) {
962
+ return JSON.parse(encoded);
963
+ }
964
+ return {};
965
+ }), "parseBody");
966
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
967
+ const value = await parseBody(errorBody, context);
968
+ value.message = value.message ?? value.Message;
969
+ return value;
970
+ }, "parseErrorBody");
971
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
972
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
973
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
974
+ let cleanValue = rawValue;
975
+ if (typeof cleanValue === "number") {
976
+ cleanValue = cleanValue.toString();
977
+ }
978
+ if (cleanValue.indexOf(",") >= 0) {
979
+ cleanValue = cleanValue.split(",")[0];
980
+ }
981
+ if (cleanValue.indexOf(":") >= 0) {
982
+ cleanValue = cleanValue.split(":")[0];
983
+ }
984
+ if (cleanValue.indexOf("#") >= 0) {
985
+ cleanValue = cleanValue.split("#")[1];
986
+ }
987
+ return cleanValue;
988
+ }, "sanitizeErrorCode");
989
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
990
+ if (headerKey !== void 0) {
991
+ return sanitizeErrorCode(output.headers[headerKey]);
992
+ }
993
+ if (data.code !== void 0) {
994
+ return sanitizeErrorCode(data.code);
995
+ }
996
+ if (data["__type"] !== void 0) {
997
+ return sanitizeErrorCode(data["__type"]);
998
+ }
999
+ }, "loadRestJsonErrorCode");
1000
+
1001
+ // src/commands/CreateRescoreExecutionPlanCommand.ts
1002
+ var _CreateRescoreExecutionPlanCommand = class _CreateRescoreExecutionPlanCommand extends import_smithy_client.Command.classBuilder().ep({
1003
+ ...commonParams
1004
+ }).m(function(Command, cs, config, o) {
1005
+ return [
1006
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1007
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1008
+ ];
1009
+ }).s("AWSKendraRerankingFrontendService", "CreateRescoreExecutionPlan", {}).n("KendraRankingClient", "CreateRescoreExecutionPlanCommand").f(void 0, void 0).ser(se_CreateRescoreExecutionPlanCommand).de(de_CreateRescoreExecutionPlanCommand).build() {
1010
+ };
1011
+ __name(_CreateRescoreExecutionPlanCommand, "CreateRescoreExecutionPlanCommand");
1012
+ var CreateRescoreExecutionPlanCommand = _CreateRescoreExecutionPlanCommand;
1013
+
1014
+ // src/commands/DeleteRescoreExecutionPlanCommand.ts
1015
+
1016
+
1017
+
1018
+
1019
+ var _DeleteRescoreExecutionPlanCommand = class _DeleteRescoreExecutionPlanCommand extends import_smithy_client.Command.classBuilder().ep({
1020
+ ...commonParams
1021
+ }).m(function(Command, cs, config, o) {
1022
+ return [
1023
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1024
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1025
+ ];
1026
+ }).s("AWSKendraRerankingFrontendService", "DeleteRescoreExecutionPlan", {}).n("KendraRankingClient", "DeleteRescoreExecutionPlanCommand").f(void 0, void 0).ser(se_DeleteRescoreExecutionPlanCommand).de(de_DeleteRescoreExecutionPlanCommand).build() {
1027
+ };
1028
+ __name(_DeleteRescoreExecutionPlanCommand, "DeleteRescoreExecutionPlanCommand");
1029
+ var DeleteRescoreExecutionPlanCommand = _DeleteRescoreExecutionPlanCommand;
1030
+
1031
+ // src/commands/DescribeRescoreExecutionPlanCommand.ts
1032
+
1033
+
1034
+
1035
+
1036
+ var _DescribeRescoreExecutionPlanCommand = class _DescribeRescoreExecutionPlanCommand extends import_smithy_client.Command.classBuilder().ep({
1037
+ ...commonParams
1038
+ }).m(function(Command, cs, config, o) {
1039
+ return [
1040
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1041
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1042
+ ];
1043
+ }).s("AWSKendraRerankingFrontendService", "DescribeRescoreExecutionPlan", {}).n("KendraRankingClient", "DescribeRescoreExecutionPlanCommand").f(void 0, void 0).ser(se_DescribeRescoreExecutionPlanCommand).de(de_DescribeRescoreExecutionPlanCommand).build() {
1044
+ };
1045
+ __name(_DescribeRescoreExecutionPlanCommand, "DescribeRescoreExecutionPlanCommand");
1046
+ var DescribeRescoreExecutionPlanCommand = _DescribeRescoreExecutionPlanCommand;
1047
+
1048
+ // src/commands/ListRescoreExecutionPlansCommand.ts
1049
+
1050
+
1051
+
1052
+
1053
+ var _ListRescoreExecutionPlansCommand = class _ListRescoreExecutionPlansCommand extends import_smithy_client.Command.classBuilder().ep({
1054
+ ...commonParams
1055
+ }).m(function(Command, cs, config, o) {
1056
+ return [
1057
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1058
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1059
+ ];
1060
+ }).s("AWSKendraRerankingFrontendService", "ListRescoreExecutionPlans", {}).n("KendraRankingClient", "ListRescoreExecutionPlansCommand").f(void 0, void 0).ser(se_ListRescoreExecutionPlansCommand).de(de_ListRescoreExecutionPlansCommand).build() {
1061
+ };
1062
+ __name(_ListRescoreExecutionPlansCommand, "ListRescoreExecutionPlansCommand");
1063
+ var ListRescoreExecutionPlansCommand = _ListRescoreExecutionPlansCommand;
1064
+
1065
+ // src/commands/ListTagsForResourceCommand.ts
1066
+
1067
+
1068
+
1069
+
1070
+ var _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends import_smithy_client.Command.classBuilder().ep({
1071
+ ...commonParams
1072
+ }).m(function(Command, cs, config, o) {
1073
+ return [
1074
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1075
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1076
+ ];
1077
+ }).s("AWSKendraRerankingFrontendService", "ListTagsForResource", {}).n("KendraRankingClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
1078
+ };
1079
+ __name(_ListTagsForResourceCommand, "ListTagsForResourceCommand");
1080
+ var ListTagsForResourceCommand = _ListTagsForResourceCommand;
1081
+
1082
+ // src/commands/RescoreCommand.ts
1083
+
1084
+
1085
+
1086
+
1087
+ var _RescoreCommand = class _RescoreCommand extends import_smithy_client.Command.classBuilder().ep({
1088
+ ...commonParams
1089
+ }).m(function(Command, cs, config, o) {
1090
+ return [
1091
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1092
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1093
+ ];
1094
+ }).s("AWSKendraRerankingFrontendService", "Rescore", {}).n("KendraRankingClient", "RescoreCommand").f(void 0, void 0).ser(se_RescoreCommand).de(de_RescoreCommand).build() {
1095
+ };
1096
+ __name(_RescoreCommand, "RescoreCommand");
1097
+ var RescoreCommand = _RescoreCommand;
1098
+
1099
+ // src/commands/TagResourceCommand.ts
1100
+
1101
+
1102
+
1103
+
1104
+ var _TagResourceCommand = class _TagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
1105
+ ...commonParams
1106
+ }).m(function(Command, cs, config, o) {
1107
+ return [
1108
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1109
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1110
+ ];
1111
+ }).s("AWSKendraRerankingFrontendService", "TagResource", {}).n("KendraRankingClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
1112
+ };
1113
+ __name(_TagResourceCommand, "TagResourceCommand");
1114
+ var TagResourceCommand = _TagResourceCommand;
1115
+
1116
+ // src/commands/UntagResourceCommand.ts
1117
+
1118
+
1119
+
1120
+
1121
+ var _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
1122
+ ...commonParams
1123
+ }).m(function(Command, cs, config, o) {
1124
+ return [
1125
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1126
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1127
+ ];
1128
+ }).s("AWSKendraRerankingFrontendService", "UntagResource", {}).n("KendraRankingClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
1129
+ };
1130
+ __name(_UntagResourceCommand, "UntagResourceCommand");
1131
+ var UntagResourceCommand = _UntagResourceCommand;
1132
+
1133
+ // src/commands/UpdateRescoreExecutionPlanCommand.ts
1134
+
1135
+
1136
+
1137
+
1138
+ var _UpdateRescoreExecutionPlanCommand = class _UpdateRescoreExecutionPlanCommand extends import_smithy_client.Command.classBuilder().ep({
1139
+ ...commonParams
1140
+ }).m(function(Command, cs, config, o) {
1141
+ return [
1142
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1143
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1144
+ ];
1145
+ }).s("AWSKendraRerankingFrontendService", "UpdateRescoreExecutionPlan", {}).n("KendraRankingClient", "UpdateRescoreExecutionPlanCommand").f(void 0, void 0).ser(se_UpdateRescoreExecutionPlanCommand).de(de_UpdateRescoreExecutionPlanCommand).build() {
1146
+ };
1147
+ __name(_UpdateRescoreExecutionPlanCommand, "UpdateRescoreExecutionPlanCommand");
1148
+ var UpdateRescoreExecutionPlanCommand = _UpdateRescoreExecutionPlanCommand;
1149
+
1150
+ // src/KendraRanking.ts
1151
+ var commands = {
1152
+ CreateRescoreExecutionPlanCommand,
1153
+ DeleteRescoreExecutionPlanCommand,
1154
+ DescribeRescoreExecutionPlanCommand,
1155
+ ListRescoreExecutionPlansCommand,
1156
+ ListTagsForResourceCommand,
1157
+ RescoreCommand,
1158
+ TagResourceCommand,
1159
+ UntagResourceCommand,
1160
+ UpdateRescoreExecutionPlanCommand
1161
+ };
1162
+ var _KendraRanking = class _KendraRanking extends KendraRankingClient {
1163
+ };
1164
+ __name(_KendraRanking, "KendraRanking");
1165
+ var KendraRanking = _KendraRanking;
1166
+ (0, import_smithy_client.createAggregatedClient)(commands, KendraRanking);
1167
+
1168
+ // src/pagination/ListRescoreExecutionPlansPaginator.ts
1169
+ var import_core = require("@smithy/core");
1170
+ var paginateListRescoreExecutionPlans = (0, import_core.createPaginator)(KendraRankingClient, ListRescoreExecutionPlansCommand, "NextToken", "NextToken", "MaxResults");
1171
+
1172
+ // src/index.ts
1173
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
1174
+ // Annotate the CommonJS export names for ESM import in node:
1175
+
1176
+ 0 && (module.exports = {
1177
+ AccessDeniedException,
1178
+ ConflictException,
1179
+ CreateRescoreExecutionPlanCommand,
1180
+ DeleteRescoreExecutionPlanCommand,
1181
+ DescribeRescoreExecutionPlanCommand,
1182
+ InternalServerException,
1183
+ KendraRanking,
1184
+ KendraRankingClient,
1185
+ KendraRankingServiceException,
1186
+ ListRescoreExecutionPlansCommand,
1187
+ ListTagsForResourceCommand,
1188
+ RescoreCommand,
1189
+ RescoreExecutionPlanStatus,
1190
+ ResourceNotFoundException,
1191
+ ResourceUnavailableException,
1192
+ ServiceQuotaExceededException,
1193
+ TagResourceCommand,
1194
+ ThrottlingException,
1195
+ UntagResourceCommand,
1196
+ UpdateRescoreExecutionPlanCommand,
1197
+ ValidationException,
1198
+ __Client,
1199
+ paginateListRescoreExecutionPlans
1200
+ });
1201
+