@aws-sdk/client-textract 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.
Files changed (41) hide show
  1. package/dist-cjs/Textract.js +1 -61
  2. package/dist-cjs/TextractClient.js +1 -43
  3. package/dist-cjs/commands/AnalyzeDocumentCommand.js +1 -28
  4. package/dist-cjs/commands/AnalyzeExpenseCommand.js +1 -28
  5. package/dist-cjs/commands/AnalyzeIDCommand.js +1 -28
  6. package/dist-cjs/commands/CreateAdapterCommand.js +1 -28
  7. package/dist-cjs/commands/CreateAdapterVersionCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteAdapterCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteAdapterVersionCommand.js +1 -28
  10. package/dist-cjs/commands/DetectDocumentTextCommand.js +1 -28
  11. package/dist-cjs/commands/GetAdapterCommand.js +1 -28
  12. package/dist-cjs/commands/GetAdapterVersionCommand.js +1 -28
  13. package/dist-cjs/commands/GetDocumentAnalysisCommand.js +1 -28
  14. package/dist-cjs/commands/GetDocumentTextDetectionCommand.js +1 -28
  15. package/dist-cjs/commands/GetExpenseAnalysisCommand.js +1 -28
  16. package/dist-cjs/commands/GetLendingAnalysisCommand.js +1 -28
  17. package/dist-cjs/commands/GetLendingAnalysisSummaryCommand.js +1 -28
  18. package/dist-cjs/commands/ListAdapterVersionsCommand.js +1 -28
  19. package/dist-cjs/commands/ListAdaptersCommand.js +1 -28
  20. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  21. package/dist-cjs/commands/StartDocumentAnalysisCommand.js +1 -28
  22. package/dist-cjs/commands/StartDocumentTextDetectionCommand.js +1 -28
  23. package/dist-cjs/commands/StartExpenseAnalysisCommand.js +1 -28
  24. package/dist-cjs/commands/StartLendingAnalysisCommand.js +1 -28
  25. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  26. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  27. package/dist-cjs/commands/UpdateAdapterCommand.js +1 -28
  28. package/dist-cjs/commands/index.js +1 -28
  29. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  30. package/dist-cjs/extensionConfiguration.js +1 -2
  31. package/dist-cjs/index.js +3430 -11
  32. package/dist-cjs/models/TextractServiceException.js +1 -12
  33. package/dist-cjs/models/index.js +1 -4
  34. package/dist-cjs/models/models_0.js +1 -364
  35. package/dist-cjs/pagination/Interfaces.js +1 -2
  36. package/dist-cjs/pagination/ListAdapterVersionsPaginator.js +1 -7
  37. package/dist-cjs/pagination/ListAdaptersPaginator.js +1 -7
  38. package/dist-cjs/pagination/index.js +1 -6
  39. package/dist-cjs/protocols/Aws_json1_1.js +1 -2359
  40. package/dist-cjs/runtimeExtensions.js +1 -22
  41. package/package.json +40 -40
package/dist-cjs/index.js CHANGED
@@ -1,12 +1,3431 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextractServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./TextractClient"), exports);
6
- tslib_1.__exportStar(require("./Textract"), 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 TextractServiceException_1 = require("./models/TextractServiceException");
12
- Object.defineProperty(exports, "TextractServiceException", { enumerable: true, get: function () { return TextractServiceException_1.TextractServiceException; } });
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
+ AdapterVersionStatus: () => AdapterVersionStatus,
26
+ AnalyzeDocumentCommand: () => AnalyzeDocumentCommand,
27
+ AnalyzeExpenseCommand: () => AnalyzeExpenseCommand,
28
+ AnalyzeIDCommand: () => AnalyzeIDCommand,
29
+ AutoUpdate: () => AutoUpdate,
30
+ BadDocumentException: () => BadDocumentException,
31
+ BlockType: () => BlockType,
32
+ ConflictException: () => ConflictException,
33
+ ContentClassifier: () => ContentClassifier,
34
+ CreateAdapterCommand: () => CreateAdapterCommand,
35
+ CreateAdapterVersionCommand: () => CreateAdapterVersionCommand,
36
+ DeleteAdapterCommand: () => DeleteAdapterCommand,
37
+ DeleteAdapterVersionCommand: () => DeleteAdapterVersionCommand,
38
+ DetectDocumentTextCommand: () => DetectDocumentTextCommand,
39
+ DocumentTooLargeException: () => DocumentTooLargeException,
40
+ EntityType: () => EntityType,
41
+ FeatureType: () => FeatureType,
42
+ GetAdapterCommand: () => GetAdapterCommand,
43
+ GetAdapterVersionCommand: () => GetAdapterVersionCommand,
44
+ GetDocumentAnalysisCommand: () => GetDocumentAnalysisCommand,
45
+ GetDocumentTextDetectionCommand: () => GetDocumentTextDetectionCommand,
46
+ GetExpenseAnalysisCommand: () => GetExpenseAnalysisCommand,
47
+ GetLendingAnalysisCommand: () => GetLendingAnalysisCommand,
48
+ GetLendingAnalysisSummaryCommand: () => GetLendingAnalysisSummaryCommand,
49
+ HumanLoopQuotaExceededException: () => HumanLoopQuotaExceededException,
50
+ IdempotentParameterMismatchException: () => IdempotentParameterMismatchException,
51
+ InternalServerError: () => InternalServerError,
52
+ InvalidJobIdException: () => InvalidJobIdException,
53
+ InvalidKMSKeyException: () => InvalidKMSKeyException,
54
+ InvalidParameterException: () => InvalidParameterException,
55
+ InvalidS3ObjectException: () => InvalidS3ObjectException,
56
+ JobStatus: () => JobStatus,
57
+ LimitExceededException: () => LimitExceededException,
58
+ ListAdapterVersionsCommand: () => ListAdapterVersionsCommand,
59
+ ListAdaptersCommand: () => ListAdaptersCommand,
60
+ ListTagsForResourceCommand: () => ListTagsForResourceCommand,
61
+ ProvisionedThroughputExceededException: () => ProvisionedThroughputExceededException,
62
+ RelationshipType: () => RelationshipType,
63
+ ResourceNotFoundException: () => ResourceNotFoundException,
64
+ SelectionStatus: () => SelectionStatus,
65
+ ServiceQuotaExceededException: () => ServiceQuotaExceededException,
66
+ StartDocumentAnalysisCommand: () => StartDocumentAnalysisCommand,
67
+ StartDocumentTextDetectionCommand: () => StartDocumentTextDetectionCommand,
68
+ StartExpenseAnalysisCommand: () => StartExpenseAnalysisCommand,
69
+ StartLendingAnalysisCommand: () => StartLendingAnalysisCommand,
70
+ TagResourceCommand: () => TagResourceCommand,
71
+ TextType: () => TextType,
72
+ Textract: () => Textract,
73
+ TextractClient: () => TextractClient,
74
+ TextractServiceException: () => TextractServiceException,
75
+ ThrottlingException: () => ThrottlingException,
76
+ UnsupportedDocumentException: () => UnsupportedDocumentException,
77
+ UntagResourceCommand: () => UntagResourceCommand,
78
+ UpdateAdapterCommand: () => UpdateAdapterCommand,
79
+ ValidationException: () => ValidationException,
80
+ ValueType: () => ValueType,
81
+ __Client: () => import_smithy_client.Client,
82
+ paginateListAdapterVersions: () => paginateListAdapterVersions,
83
+ paginateListAdapters: () => paginateListAdapters
84
+ });
85
+ module.exports = __toCommonJS(src_exports);
86
+
87
+ // src/TextractClient.ts
88
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
89
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
90
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
91
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
92
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
93
+ var import_config_resolver = require("@smithy/config-resolver");
94
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
95
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
96
+ var import_middleware_retry = require("@smithy/middleware-retry");
97
+
98
+
99
+ // src/endpoint/EndpointParameters.ts
100
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
101
+ return {
102
+ ...options,
103
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
104
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
105
+ defaultSigningName: "textract"
106
+ };
107
+ }, "resolveClientEndpointParameters");
108
+ var commonParams = {
109
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
110
+ Endpoint: { type: "builtInParams", name: "endpoint" },
111
+ Region: { type: "builtInParams", name: "region" },
112
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
113
+ };
114
+
115
+ // src/TextractClient.ts
116
+ var import_runtimeConfig = require("././runtimeConfig");
117
+
118
+ // src/runtimeExtensions.ts
119
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
120
+ var import_protocol_http = require("@smithy/protocol-http");
121
+ var import_smithy_client = require("@smithy/smithy-client");
122
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
123
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
124
+ const extensionConfiguration = {
125
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
126
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
127
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
128
+ };
129
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
130
+ return {
131
+ ...runtimeConfig,
132
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
133
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
134
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
135
+ };
136
+ }, "resolveRuntimeExtensions");
137
+
138
+ // src/TextractClient.ts
139
+ var _TextractClient = class _TextractClient extends import_smithy_client.Client {
140
+ constructor(...[configuration]) {
141
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
142
+ const _config_1 = resolveClientEndpointParameters(_config_0);
143
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
144
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
145
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
146
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
147
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
148
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
149
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
150
+ super(_config_8);
151
+ this.config = _config_8;
152
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
153
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
154
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
155
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
156
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
157
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
158
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
159
+ }
160
+ /**
161
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
162
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
163
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
164
+ */
165
+ destroy() {
166
+ super.destroy();
167
+ }
168
+ };
169
+ __name(_TextractClient, "TextractClient");
170
+ var TextractClient = _TextractClient;
171
+
172
+ // src/Textract.ts
173
+
174
+
175
+ // src/commands/AnalyzeDocumentCommand.ts
176
+
177
+ var import_middleware_serde = require("@smithy/middleware-serde");
178
+
179
+ var import_types = require("@smithy/types");
180
+
181
+ // src/protocols/Aws_json1_1.ts
182
+
183
+
184
+ var import_uuid = require("uuid");
185
+
186
+ // src/models/TextractServiceException.ts
187
+
188
+ var _TextractServiceException = class _TextractServiceException extends import_smithy_client.ServiceException {
189
+ /**
190
+ * @internal
191
+ */
192
+ constructor(options) {
193
+ super(options);
194
+ Object.setPrototypeOf(this, _TextractServiceException.prototype);
195
+ }
196
+ };
197
+ __name(_TextractServiceException, "TextractServiceException");
198
+ var TextractServiceException = _TextractServiceException;
199
+
200
+ // src/models/models_0.ts
201
+ var _AccessDeniedException = class _AccessDeniedException extends TextractServiceException {
202
+ /**
203
+ * @internal
204
+ */
205
+ constructor(opts) {
206
+ super({
207
+ name: "AccessDeniedException",
208
+ $fault: "client",
209
+ ...opts
210
+ });
211
+ this.name = "AccessDeniedException";
212
+ this.$fault = "client";
213
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
214
+ this.Message = opts.Message;
215
+ this.Code = opts.Code;
216
+ }
217
+ };
218
+ __name(_AccessDeniedException, "AccessDeniedException");
219
+ var AccessDeniedException = _AccessDeniedException;
220
+ var FeatureType = {
221
+ FORMS: "FORMS",
222
+ LAYOUT: "LAYOUT",
223
+ QUERIES: "QUERIES",
224
+ SIGNATURES: "SIGNATURES",
225
+ TABLES: "TABLES"
226
+ };
227
+ var AdapterVersionStatus = {
228
+ ACTIVE: "ACTIVE",
229
+ AT_RISK: "AT_RISK",
230
+ CREATION_ERROR: "CREATION_ERROR",
231
+ CREATION_IN_PROGRESS: "CREATION_IN_PROGRESS",
232
+ DEPRECATED: "DEPRECATED"
233
+ };
234
+ var ContentClassifier = {
235
+ FREE_OF_ADULT_CONTENT: "FreeOfAdultContent",
236
+ FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION: "FreeOfPersonallyIdentifiableInformation"
237
+ };
238
+ var BlockType = {
239
+ CELL: "CELL",
240
+ KEY_VALUE_SET: "KEY_VALUE_SET",
241
+ LAYOUT_FIGURE: "LAYOUT_FIGURE",
242
+ LAYOUT_FOOTER: "LAYOUT_FOOTER",
243
+ LAYOUT_HEADER: "LAYOUT_HEADER",
244
+ LAYOUT_KEY_VALUE: "LAYOUT_KEY_VALUE",
245
+ LAYOUT_LIST: "LAYOUT_LIST",
246
+ LAYOUT_PAGE_NUMBER: "LAYOUT_PAGE_NUMBER",
247
+ LAYOUT_SECTION_HEADER: "LAYOUT_SECTION_HEADER",
248
+ LAYOUT_TABLE: "LAYOUT_TABLE",
249
+ LAYOUT_TEXT: "LAYOUT_TEXT",
250
+ LAYOUT_TITLE: "LAYOUT_TITLE",
251
+ LINE: "LINE",
252
+ MERGED_CELL: "MERGED_CELL",
253
+ PAGE: "PAGE",
254
+ QUERY: "QUERY",
255
+ QUERY_RESULT: "QUERY_RESULT",
256
+ SELECTION_ELEMENT: "SELECTION_ELEMENT",
257
+ SIGNATURE: "SIGNATURE",
258
+ TABLE: "TABLE",
259
+ TABLE_FOOTER: "TABLE_FOOTER",
260
+ TABLE_TITLE: "TABLE_TITLE",
261
+ TITLE: "TITLE",
262
+ WORD: "WORD"
263
+ };
264
+ var EntityType = {
265
+ COLUMN_HEADER: "COLUMN_HEADER",
266
+ KEY: "KEY",
267
+ SEMI_STRUCTURED_TABLE: "SEMI_STRUCTURED_TABLE",
268
+ STRUCTURED_TABLE: "STRUCTURED_TABLE",
269
+ TABLE_FOOTER: "TABLE_FOOTER",
270
+ TABLE_SECTION_TITLE: "TABLE_SECTION_TITLE",
271
+ TABLE_SUMMARY: "TABLE_SUMMARY",
272
+ TABLE_TITLE: "TABLE_TITLE",
273
+ VALUE: "VALUE"
274
+ };
275
+ var RelationshipType = {
276
+ ANSWER: "ANSWER",
277
+ CHILD: "CHILD",
278
+ COMPLEX_FEATURES: "COMPLEX_FEATURES",
279
+ MERGED_CELL: "MERGED_CELL",
280
+ TABLE: "TABLE",
281
+ TABLE_FOOTER: "TABLE_FOOTER",
282
+ TABLE_TITLE: "TABLE_TITLE",
283
+ TITLE: "TITLE",
284
+ VALUE: "VALUE"
285
+ };
286
+ var SelectionStatus = {
287
+ NOT_SELECTED: "NOT_SELECTED",
288
+ SELECTED: "SELECTED"
289
+ };
290
+ var TextType = {
291
+ HANDWRITING: "HANDWRITING",
292
+ PRINTED: "PRINTED"
293
+ };
294
+ var _BadDocumentException = class _BadDocumentException extends TextractServiceException {
295
+ /**
296
+ * @internal
297
+ */
298
+ constructor(opts) {
299
+ super({
300
+ name: "BadDocumentException",
301
+ $fault: "client",
302
+ ...opts
303
+ });
304
+ this.name = "BadDocumentException";
305
+ this.$fault = "client";
306
+ Object.setPrototypeOf(this, _BadDocumentException.prototype);
307
+ this.Message = opts.Message;
308
+ this.Code = opts.Code;
309
+ }
310
+ };
311
+ __name(_BadDocumentException, "BadDocumentException");
312
+ var BadDocumentException = _BadDocumentException;
313
+ var _DocumentTooLargeException = class _DocumentTooLargeException extends TextractServiceException {
314
+ /**
315
+ * @internal
316
+ */
317
+ constructor(opts) {
318
+ super({
319
+ name: "DocumentTooLargeException",
320
+ $fault: "client",
321
+ ...opts
322
+ });
323
+ this.name = "DocumentTooLargeException";
324
+ this.$fault = "client";
325
+ Object.setPrototypeOf(this, _DocumentTooLargeException.prototype);
326
+ this.Message = opts.Message;
327
+ this.Code = opts.Code;
328
+ }
329
+ };
330
+ __name(_DocumentTooLargeException, "DocumentTooLargeException");
331
+ var DocumentTooLargeException = _DocumentTooLargeException;
332
+ var _HumanLoopQuotaExceededException = class _HumanLoopQuotaExceededException extends TextractServiceException {
333
+ /**
334
+ * @internal
335
+ */
336
+ constructor(opts) {
337
+ super({
338
+ name: "HumanLoopQuotaExceededException",
339
+ $fault: "client",
340
+ ...opts
341
+ });
342
+ this.name = "HumanLoopQuotaExceededException";
343
+ this.$fault = "client";
344
+ Object.setPrototypeOf(this, _HumanLoopQuotaExceededException.prototype);
345
+ this.ResourceType = opts.ResourceType;
346
+ this.QuotaCode = opts.QuotaCode;
347
+ this.ServiceCode = opts.ServiceCode;
348
+ this.Message = opts.Message;
349
+ this.Code = opts.Code;
350
+ }
351
+ };
352
+ __name(_HumanLoopQuotaExceededException, "HumanLoopQuotaExceededException");
353
+ var HumanLoopQuotaExceededException = _HumanLoopQuotaExceededException;
354
+ var _InternalServerError = class _InternalServerError extends TextractServiceException {
355
+ /**
356
+ * @internal
357
+ */
358
+ constructor(opts) {
359
+ super({
360
+ name: "InternalServerError",
361
+ $fault: "server",
362
+ ...opts
363
+ });
364
+ this.name = "InternalServerError";
365
+ this.$fault = "server";
366
+ Object.setPrototypeOf(this, _InternalServerError.prototype);
367
+ this.Message = opts.Message;
368
+ this.Code = opts.Code;
369
+ }
370
+ };
371
+ __name(_InternalServerError, "InternalServerError");
372
+ var InternalServerError = _InternalServerError;
373
+ var _InvalidParameterException = class _InvalidParameterException extends TextractServiceException {
374
+ /**
375
+ * @internal
376
+ */
377
+ constructor(opts) {
378
+ super({
379
+ name: "InvalidParameterException",
380
+ $fault: "client",
381
+ ...opts
382
+ });
383
+ this.name = "InvalidParameterException";
384
+ this.$fault = "client";
385
+ Object.setPrototypeOf(this, _InvalidParameterException.prototype);
386
+ this.Message = opts.Message;
387
+ this.Code = opts.Code;
388
+ }
389
+ };
390
+ __name(_InvalidParameterException, "InvalidParameterException");
391
+ var InvalidParameterException = _InvalidParameterException;
392
+ var _InvalidS3ObjectException = class _InvalidS3ObjectException extends TextractServiceException {
393
+ /**
394
+ * @internal
395
+ */
396
+ constructor(opts) {
397
+ super({
398
+ name: "InvalidS3ObjectException",
399
+ $fault: "client",
400
+ ...opts
401
+ });
402
+ this.name = "InvalidS3ObjectException";
403
+ this.$fault = "client";
404
+ Object.setPrototypeOf(this, _InvalidS3ObjectException.prototype);
405
+ this.Message = opts.Message;
406
+ this.Code = opts.Code;
407
+ }
408
+ };
409
+ __name(_InvalidS3ObjectException, "InvalidS3ObjectException");
410
+ var InvalidS3ObjectException = _InvalidS3ObjectException;
411
+ var _ProvisionedThroughputExceededException = class _ProvisionedThroughputExceededException extends TextractServiceException {
412
+ /**
413
+ * @internal
414
+ */
415
+ constructor(opts) {
416
+ super({
417
+ name: "ProvisionedThroughputExceededException",
418
+ $fault: "client",
419
+ ...opts
420
+ });
421
+ this.name = "ProvisionedThroughputExceededException";
422
+ this.$fault = "client";
423
+ Object.setPrototypeOf(this, _ProvisionedThroughputExceededException.prototype);
424
+ this.Message = opts.Message;
425
+ this.Code = opts.Code;
426
+ }
427
+ };
428
+ __name(_ProvisionedThroughputExceededException, "ProvisionedThroughputExceededException");
429
+ var ProvisionedThroughputExceededException = _ProvisionedThroughputExceededException;
430
+ var _ThrottlingException = class _ThrottlingException extends TextractServiceException {
431
+ /**
432
+ * @internal
433
+ */
434
+ constructor(opts) {
435
+ super({
436
+ name: "ThrottlingException",
437
+ $fault: "server",
438
+ ...opts
439
+ });
440
+ this.name = "ThrottlingException";
441
+ this.$fault = "server";
442
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
443
+ this.Message = opts.Message;
444
+ this.Code = opts.Code;
445
+ }
446
+ };
447
+ __name(_ThrottlingException, "ThrottlingException");
448
+ var ThrottlingException = _ThrottlingException;
449
+ var _UnsupportedDocumentException = class _UnsupportedDocumentException extends TextractServiceException {
450
+ /**
451
+ * @internal
452
+ */
453
+ constructor(opts) {
454
+ super({
455
+ name: "UnsupportedDocumentException",
456
+ $fault: "client",
457
+ ...opts
458
+ });
459
+ this.name = "UnsupportedDocumentException";
460
+ this.$fault = "client";
461
+ Object.setPrototypeOf(this, _UnsupportedDocumentException.prototype);
462
+ this.Message = opts.Message;
463
+ this.Code = opts.Code;
464
+ }
465
+ };
466
+ __name(_UnsupportedDocumentException, "UnsupportedDocumentException");
467
+ var UnsupportedDocumentException = _UnsupportedDocumentException;
468
+ var ValueType = {
469
+ DATE: "DATE"
470
+ };
471
+ var AutoUpdate = {
472
+ DISABLED: "DISABLED",
473
+ ENABLED: "ENABLED"
474
+ };
475
+ var _ConflictException = class _ConflictException extends TextractServiceException {
476
+ /**
477
+ * @internal
478
+ */
479
+ constructor(opts) {
480
+ super({
481
+ name: "ConflictException",
482
+ $fault: "client",
483
+ ...opts
484
+ });
485
+ this.name = "ConflictException";
486
+ this.$fault = "client";
487
+ Object.setPrototypeOf(this, _ConflictException.prototype);
488
+ this.Message = opts.Message;
489
+ this.Code = opts.Code;
490
+ }
491
+ };
492
+ __name(_ConflictException, "ConflictException");
493
+ var ConflictException = _ConflictException;
494
+ var _IdempotentParameterMismatchException = class _IdempotentParameterMismatchException extends TextractServiceException {
495
+ /**
496
+ * @internal
497
+ */
498
+ constructor(opts) {
499
+ super({
500
+ name: "IdempotentParameterMismatchException",
501
+ $fault: "client",
502
+ ...opts
503
+ });
504
+ this.name = "IdempotentParameterMismatchException";
505
+ this.$fault = "client";
506
+ Object.setPrototypeOf(this, _IdempotentParameterMismatchException.prototype);
507
+ this.Message = opts.Message;
508
+ this.Code = opts.Code;
509
+ }
510
+ };
511
+ __name(_IdempotentParameterMismatchException, "IdempotentParameterMismatchException");
512
+ var IdempotentParameterMismatchException = _IdempotentParameterMismatchException;
513
+ var _LimitExceededException = class _LimitExceededException extends TextractServiceException {
514
+ /**
515
+ * @internal
516
+ */
517
+ constructor(opts) {
518
+ super({
519
+ name: "LimitExceededException",
520
+ $fault: "client",
521
+ ...opts
522
+ });
523
+ this.name = "LimitExceededException";
524
+ this.$fault = "client";
525
+ Object.setPrototypeOf(this, _LimitExceededException.prototype);
526
+ this.Message = opts.Message;
527
+ this.Code = opts.Code;
528
+ }
529
+ };
530
+ __name(_LimitExceededException, "LimitExceededException");
531
+ var LimitExceededException = _LimitExceededException;
532
+ var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends TextractServiceException {
533
+ /**
534
+ * @internal
535
+ */
536
+ constructor(opts) {
537
+ super({
538
+ name: "ServiceQuotaExceededException",
539
+ $fault: "client",
540
+ ...opts
541
+ });
542
+ this.name = "ServiceQuotaExceededException";
543
+ this.$fault = "client";
544
+ Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
545
+ this.Message = opts.Message;
546
+ this.Code = opts.Code;
547
+ }
548
+ };
549
+ __name(_ServiceQuotaExceededException, "ServiceQuotaExceededException");
550
+ var ServiceQuotaExceededException = _ServiceQuotaExceededException;
551
+ var _ValidationException = class _ValidationException extends TextractServiceException {
552
+ /**
553
+ * @internal
554
+ */
555
+ constructor(opts) {
556
+ super({
557
+ name: "ValidationException",
558
+ $fault: "client",
559
+ ...opts
560
+ });
561
+ this.name = "ValidationException";
562
+ this.$fault = "client";
563
+ Object.setPrototypeOf(this, _ValidationException.prototype);
564
+ this.Message = opts.Message;
565
+ this.Code = opts.Code;
566
+ }
567
+ };
568
+ __name(_ValidationException, "ValidationException");
569
+ var ValidationException = _ValidationException;
570
+ var _InvalidKMSKeyException = class _InvalidKMSKeyException extends TextractServiceException {
571
+ /**
572
+ * @internal
573
+ */
574
+ constructor(opts) {
575
+ super({
576
+ name: "InvalidKMSKeyException",
577
+ $fault: "client",
578
+ ...opts
579
+ });
580
+ this.name = "InvalidKMSKeyException";
581
+ this.$fault = "client";
582
+ Object.setPrototypeOf(this, _InvalidKMSKeyException.prototype);
583
+ this.Message = opts.Message;
584
+ this.Code = opts.Code;
585
+ }
586
+ };
587
+ __name(_InvalidKMSKeyException, "InvalidKMSKeyException");
588
+ var InvalidKMSKeyException = _InvalidKMSKeyException;
589
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends TextractServiceException {
590
+ /**
591
+ * @internal
592
+ */
593
+ constructor(opts) {
594
+ super({
595
+ name: "ResourceNotFoundException",
596
+ $fault: "client",
597
+ ...opts
598
+ });
599
+ this.name = "ResourceNotFoundException";
600
+ this.$fault = "client";
601
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
602
+ this.Message = opts.Message;
603
+ this.Code = opts.Code;
604
+ }
605
+ };
606
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
607
+ var ResourceNotFoundException = _ResourceNotFoundException;
608
+ var JobStatus = {
609
+ FAILED: "FAILED",
610
+ IN_PROGRESS: "IN_PROGRESS",
611
+ PARTIAL_SUCCESS: "PARTIAL_SUCCESS",
612
+ SUCCEEDED: "SUCCEEDED"
613
+ };
614
+ var _InvalidJobIdException = class _InvalidJobIdException extends TextractServiceException {
615
+ /**
616
+ * @internal
617
+ */
618
+ constructor(opts) {
619
+ super({
620
+ name: "InvalidJobIdException",
621
+ $fault: "client",
622
+ ...opts
623
+ });
624
+ this.name = "InvalidJobIdException";
625
+ this.$fault = "client";
626
+ Object.setPrototypeOf(this, _InvalidJobIdException.prototype);
627
+ this.Message = opts.Message;
628
+ this.Code = opts.Code;
629
+ }
630
+ };
631
+ __name(_InvalidJobIdException, "InvalidJobIdException");
632
+ var InvalidJobIdException = _InvalidJobIdException;
633
+
634
+ // src/protocols/Aws_json1_1.ts
635
+ var se_AnalyzeDocumentCommand = /* @__PURE__ */ __name(async (input, context) => {
636
+ const headers = sharedHeaders("AnalyzeDocument");
637
+ let body;
638
+ body = JSON.stringify(se_AnalyzeDocumentRequest(input, context));
639
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
640
+ }, "se_AnalyzeDocumentCommand");
641
+ var se_AnalyzeExpenseCommand = /* @__PURE__ */ __name(async (input, context) => {
642
+ const headers = sharedHeaders("AnalyzeExpense");
643
+ let body;
644
+ body = JSON.stringify(se_AnalyzeExpenseRequest(input, context));
645
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
646
+ }, "se_AnalyzeExpenseCommand");
647
+ var se_AnalyzeIDCommand = /* @__PURE__ */ __name(async (input, context) => {
648
+ const headers = sharedHeaders("AnalyzeID");
649
+ let body;
650
+ body = JSON.stringify(se_AnalyzeIDRequest(input, context));
651
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
652
+ }, "se_AnalyzeIDCommand");
653
+ var se_CreateAdapterCommand = /* @__PURE__ */ __name(async (input, context) => {
654
+ const headers = sharedHeaders("CreateAdapter");
655
+ let body;
656
+ body = JSON.stringify(se_CreateAdapterRequest(input, context));
657
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
658
+ }, "se_CreateAdapterCommand");
659
+ var se_CreateAdapterVersionCommand = /* @__PURE__ */ __name(async (input, context) => {
660
+ const headers = sharedHeaders("CreateAdapterVersion");
661
+ let body;
662
+ body = JSON.stringify(se_CreateAdapterVersionRequest(input, context));
663
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
664
+ }, "se_CreateAdapterVersionCommand");
665
+ var se_DeleteAdapterCommand = /* @__PURE__ */ __name(async (input, context) => {
666
+ const headers = sharedHeaders("DeleteAdapter");
667
+ let body;
668
+ body = JSON.stringify((0, import_smithy_client._json)(input));
669
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
670
+ }, "se_DeleteAdapterCommand");
671
+ var se_DeleteAdapterVersionCommand = /* @__PURE__ */ __name(async (input, context) => {
672
+ const headers = sharedHeaders("DeleteAdapterVersion");
673
+ let body;
674
+ body = JSON.stringify((0, import_smithy_client._json)(input));
675
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
676
+ }, "se_DeleteAdapterVersionCommand");
677
+ var se_DetectDocumentTextCommand = /* @__PURE__ */ __name(async (input, context) => {
678
+ const headers = sharedHeaders("DetectDocumentText");
679
+ let body;
680
+ body = JSON.stringify(se_DetectDocumentTextRequest(input, context));
681
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
682
+ }, "se_DetectDocumentTextCommand");
683
+ var se_GetAdapterCommand = /* @__PURE__ */ __name(async (input, context) => {
684
+ const headers = sharedHeaders("GetAdapter");
685
+ let body;
686
+ body = JSON.stringify((0, import_smithy_client._json)(input));
687
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
688
+ }, "se_GetAdapterCommand");
689
+ var se_GetAdapterVersionCommand = /* @__PURE__ */ __name(async (input, context) => {
690
+ const headers = sharedHeaders("GetAdapterVersion");
691
+ let body;
692
+ body = JSON.stringify((0, import_smithy_client._json)(input));
693
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
694
+ }, "se_GetAdapterVersionCommand");
695
+ var se_GetDocumentAnalysisCommand = /* @__PURE__ */ __name(async (input, context) => {
696
+ const headers = sharedHeaders("GetDocumentAnalysis");
697
+ let body;
698
+ body = JSON.stringify((0, import_smithy_client._json)(input));
699
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
700
+ }, "se_GetDocumentAnalysisCommand");
701
+ var se_GetDocumentTextDetectionCommand = /* @__PURE__ */ __name(async (input, context) => {
702
+ const headers = sharedHeaders("GetDocumentTextDetection");
703
+ let body;
704
+ body = JSON.stringify((0, import_smithy_client._json)(input));
705
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
706
+ }, "se_GetDocumentTextDetectionCommand");
707
+ var se_GetExpenseAnalysisCommand = /* @__PURE__ */ __name(async (input, context) => {
708
+ const headers = sharedHeaders("GetExpenseAnalysis");
709
+ let body;
710
+ body = JSON.stringify((0, import_smithy_client._json)(input));
711
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
712
+ }, "se_GetExpenseAnalysisCommand");
713
+ var se_GetLendingAnalysisCommand = /* @__PURE__ */ __name(async (input, context) => {
714
+ const headers = sharedHeaders("GetLendingAnalysis");
715
+ let body;
716
+ body = JSON.stringify((0, import_smithy_client._json)(input));
717
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
718
+ }, "se_GetLendingAnalysisCommand");
719
+ var se_GetLendingAnalysisSummaryCommand = /* @__PURE__ */ __name(async (input, context) => {
720
+ const headers = sharedHeaders("GetLendingAnalysisSummary");
721
+ let body;
722
+ body = JSON.stringify((0, import_smithy_client._json)(input));
723
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
724
+ }, "se_GetLendingAnalysisSummaryCommand");
725
+ var se_ListAdaptersCommand = /* @__PURE__ */ __name(async (input, context) => {
726
+ const headers = sharedHeaders("ListAdapters");
727
+ let body;
728
+ body = JSON.stringify(se_ListAdaptersRequest(input, context));
729
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
730
+ }, "se_ListAdaptersCommand");
731
+ var se_ListAdapterVersionsCommand = /* @__PURE__ */ __name(async (input, context) => {
732
+ const headers = sharedHeaders("ListAdapterVersions");
733
+ let body;
734
+ body = JSON.stringify(se_ListAdapterVersionsRequest(input, context));
735
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
736
+ }, "se_ListAdapterVersionsCommand");
737
+ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
738
+ const headers = sharedHeaders("ListTagsForResource");
739
+ let body;
740
+ body = JSON.stringify((0, import_smithy_client._json)(input));
741
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
742
+ }, "se_ListTagsForResourceCommand");
743
+ var se_StartDocumentAnalysisCommand = /* @__PURE__ */ __name(async (input, context) => {
744
+ const headers = sharedHeaders("StartDocumentAnalysis");
745
+ let body;
746
+ body = JSON.stringify((0, import_smithy_client._json)(input));
747
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
748
+ }, "se_StartDocumentAnalysisCommand");
749
+ var se_StartDocumentTextDetectionCommand = /* @__PURE__ */ __name(async (input, context) => {
750
+ const headers = sharedHeaders("StartDocumentTextDetection");
751
+ let body;
752
+ body = JSON.stringify((0, import_smithy_client._json)(input));
753
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
754
+ }, "se_StartDocumentTextDetectionCommand");
755
+ var se_StartExpenseAnalysisCommand = /* @__PURE__ */ __name(async (input, context) => {
756
+ const headers = sharedHeaders("StartExpenseAnalysis");
757
+ let body;
758
+ body = JSON.stringify((0, import_smithy_client._json)(input));
759
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
760
+ }, "se_StartExpenseAnalysisCommand");
761
+ var se_StartLendingAnalysisCommand = /* @__PURE__ */ __name(async (input, context) => {
762
+ const headers = sharedHeaders("StartLendingAnalysis");
763
+ let body;
764
+ body = JSON.stringify((0, import_smithy_client._json)(input));
765
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
766
+ }, "se_StartLendingAnalysisCommand");
767
+ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
768
+ const headers = sharedHeaders("TagResource");
769
+ let body;
770
+ body = JSON.stringify((0, import_smithy_client._json)(input));
771
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
772
+ }, "se_TagResourceCommand");
773
+ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
774
+ const headers = sharedHeaders("UntagResource");
775
+ let body;
776
+ body = JSON.stringify((0, import_smithy_client._json)(input));
777
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
778
+ }, "se_UntagResourceCommand");
779
+ var se_UpdateAdapterCommand = /* @__PURE__ */ __name(async (input, context) => {
780
+ const headers = sharedHeaders("UpdateAdapter");
781
+ let body;
782
+ body = JSON.stringify((0, import_smithy_client._json)(input));
783
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
784
+ }, "se_UpdateAdapterCommand");
785
+ var de_AnalyzeDocumentCommand = /* @__PURE__ */ __name(async (output, context) => {
786
+ if (output.statusCode >= 300) {
787
+ return de_AnalyzeDocumentCommandError(output, context);
788
+ }
789
+ const data = await parseBody(output.body, context);
790
+ let contents = {};
791
+ contents = de_AnalyzeDocumentResponse(data, context);
792
+ const response = {
793
+ $metadata: deserializeMetadata(output),
794
+ ...contents
795
+ };
796
+ return response;
797
+ }, "de_AnalyzeDocumentCommand");
798
+ var de_AnalyzeDocumentCommandError = /* @__PURE__ */ __name(async (output, context) => {
799
+ const parsedOutput = {
800
+ ...output,
801
+ body: await parseErrorBody(output.body, context)
802
+ };
803
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
804
+ switch (errorCode) {
805
+ case "AccessDeniedException":
806
+ case "com.amazonaws.textract#AccessDeniedException":
807
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
808
+ case "BadDocumentException":
809
+ case "com.amazonaws.textract#BadDocumentException":
810
+ throw await de_BadDocumentExceptionRes(parsedOutput, context);
811
+ case "DocumentTooLargeException":
812
+ case "com.amazonaws.textract#DocumentTooLargeException":
813
+ throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
814
+ case "HumanLoopQuotaExceededException":
815
+ case "com.amazonaws.textract#HumanLoopQuotaExceededException":
816
+ throw await de_HumanLoopQuotaExceededExceptionRes(parsedOutput, context);
817
+ case "InternalServerError":
818
+ case "com.amazonaws.textract#InternalServerError":
819
+ throw await de_InternalServerErrorRes(parsedOutput, context);
820
+ case "InvalidParameterException":
821
+ case "com.amazonaws.textract#InvalidParameterException":
822
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
823
+ case "InvalidS3ObjectException":
824
+ case "com.amazonaws.textract#InvalidS3ObjectException":
825
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
826
+ case "ProvisionedThroughputExceededException":
827
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
828
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
829
+ case "ThrottlingException":
830
+ case "com.amazonaws.textract#ThrottlingException":
831
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
832
+ case "UnsupportedDocumentException":
833
+ case "com.amazonaws.textract#UnsupportedDocumentException":
834
+ throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
835
+ default:
836
+ const parsedBody = parsedOutput.body;
837
+ return throwDefaultError({
838
+ output,
839
+ parsedBody,
840
+ errorCode
841
+ });
842
+ }
843
+ }, "de_AnalyzeDocumentCommandError");
844
+ var de_AnalyzeExpenseCommand = /* @__PURE__ */ __name(async (output, context) => {
845
+ if (output.statusCode >= 300) {
846
+ return de_AnalyzeExpenseCommandError(output, context);
847
+ }
848
+ const data = await parseBody(output.body, context);
849
+ let contents = {};
850
+ contents = de_AnalyzeExpenseResponse(data, context);
851
+ const response = {
852
+ $metadata: deserializeMetadata(output),
853
+ ...contents
854
+ };
855
+ return response;
856
+ }, "de_AnalyzeExpenseCommand");
857
+ var de_AnalyzeExpenseCommandError = /* @__PURE__ */ __name(async (output, context) => {
858
+ const parsedOutput = {
859
+ ...output,
860
+ body: await parseErrorBody(output.body, context)
861
+ };
862
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
863
+ switch (errorCode) {
864
+ case "AccessDeniedException":
865
+ case "com.amazonaws.textract#AccessDeniedException":
866
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
867
+ case "BadDocumentException":
868
+ case "com.amazonaws.textract#BadDocumentException":
869
+ throw await de_BadDocumentExceptionRes(parsedOutput, context);
870
+ case "DocumentTooLargeException":
871
+ case "com.amazonaws.textract#DocumentTooLargeException":
872
+ throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
873
+ case "InternalServerError":
874
+ case "com.amazonaws.textract#InternalServerError":
875
+ throw await de_InternalServerErrorRes(parsedOutput, context);
876
+ case "InvalidParameterException":
877
+ case "com.amazonaws.textract#InvalidParameterException":
878
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
879
+ case "InvalidS3ObjectException":
880
+ case "com.amazonaws.textract#InvalidS3ObjectException":
881
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
882
+ case "ProvisionedThroughputExceededException":
883
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
884
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
885
+ case "ThrottlingException":
886
+ case "com.amazonaws.textract#ThrottlingException":
887
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
888
+ case "UnsupportedDocumentException":
889
+ case "com.amazonaws.textract#UnsupportedDocumentException":
890
+ throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
891
+ default:
892
+ const parsedBody = parsedOutput.body;
893
+ return throwDefaultError({
894
+ output,
895
+ parsedBody,
896
+ errorCode
897
+ });
898
+ }
899
+ }, "de_AnalyzeExpenseCommandError");
900
+ var de_AnalyzeIDCommand = /* @__PURE__ */ __name(async (output, context) => {
901
+ if (output.statusCode >= 300) {
902
+ return de_AnalyzeIDCommandError(output, context);
903
+ }
904
+ const data = await parseBody(output.body, context);
905
+ let contents = {};
906
+ contents = de_AnalyzeIDResponse(data, context);
907
+ const response = {
908
+ $metadata: deserializeMetadata(output),
909
+ ...contents
910
+ };
911
+ return response;
912
+ }, "de_AnalyzeIDCommand");
913
+ var de_AnalyzeIDCommandError = /* @__PURE__ */ __name(async (output, context) => {
914
+ const parsedOutput = {
915
+ ...output,
916
+ body: await parseErrorBody(output.body, context)
917
+ };
918
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
919
+ switch (errorCode) {
920
+ case "AccessDeniedException":
921
+ case "com.amazonaws.textract#AccessDeniedException":
922
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
923
+ case "BadDocumentException":
924
+ case "com.amazonaws.textract#BadDocumentException":
925
+ throw await de_BadDocumentExceptionRes(parsedOutput, context);
926
+ case "DocumentTooLargeException":
927
+ case "com.amazonaws.textract#DocumentTooLargeException":
928
+ throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
929
+ case "InternalServerError":
930
+ case "com.amazonaws.textract#InternalServerError":
931
+ throw await de_InternalServerErrorRes(parsedOutput, context);
932
+ case "InvalidParameterException":
933
+ case "com.amazonaws.textract#InvalidParameterException":
934
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
935
+ case "InvalidS3ObjectException":
936
+ case "com.amazonaws.textract#InvalidS3ObjectException":
937
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
938
+ case "ProvisionedThroughputExceededException":
939
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
940
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
941
+ case "ThrottlingException":
942
+ case "com.amazonaws.textract#ThrottlingException":
943
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
944
+ case "UnsupportedDocumentException":
945
+ case "com.amazonaws.textract#UnsupportedDocumentException":
946
+ throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
947
+ default:
948
+ const parsedBody = parsedOutput.body;
949
+ return throwDefaultError({
950
+ output,
951
+ parsedBody,
952
+ errorCode
953
+ });
954
+ }
955
+ }, "de_AnalyzeIDCommandError");
956
+ var de_CreateAdapterCommand = /* @__PURE__ */ __name(async (output, context) => {
957
+ if (output.statusCode >= 300) {
958
+ return de_CreateAdapterCommandError(output, context);
959
+ }
960
+ const data = await parseBody(output.body, context);
961
+ let contents = {};
962
+ contents = (0, import_smithy_client._json)(data);
963
+ const response = {
964
+ $metadata: deserializeMetadata(output),
965
+ ...contents
966
+ };
967
+ return response;
968
+ }, "de_CreateAdapterCommand");
969
+ var de_CreateAdapterCommandError = /* @__PURE__ */ __name(async (output, context) => {
970
+ const parsedOutput = {
971
+ ...output,
972
+ body: await parseErrorBody(output.body, context)
973
+ };
974
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
975
+ switch (errorCode) {
976
+ case "AccessDeniedException":
977
+ case "com.amazonaws.textract#AccessDeniedException":
978
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
979
+ case "ConflictException":
980
+ case "com.amazonaws.textract#ConflictException":
981
+ throw await de_ConflictExceptionRes(parsedOutput, context);
982
+ case "IdempotentParameterMismatchException":
983
+ case "com.amazonaws.textract#IdempotentParameterMismatchException":
984
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
985
+ case "InternalServerError":
986
+ case "com.amazonaws.textract#InternalServerError":
987
+ throw await de_InternalServerErrorRes(parsedOutput, context);
988
+ case "InvalidParameterException":
989
+ case "com.amazonaws.textract#InvalidParameterException":
990
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
991
+ case "LimitExceededException":
992
+ case "com.amazonaws.textract#LimitExceededException":
993
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
994
+ case "ProvisionedThroughputExceededException":
995
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
996
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
997
+ case "ServiceQuotaExceededException":
998
+ case "com.amazonaws.textract#ServiceQuotaExceededException":
999
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1000
+ case "ThrottlingException":
1001
+ case "com.amazonaws.textract#ThrottlingException":
1002
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1003
+ case "ValidationException":
1004
+ case "com.amazonaws.textract#ValidationException":
1005
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1006
+ default:
1007
+ const parsedBody = parsedOutput.body;
1008
+ return throwDefaultError({
1009
+ output,
1010
+ parsedBody,
1011
+ errorCode
1012
+ });
1013
+ }
1014
+ }, "de_CreateAdapterCommandError");
1015
+ var de_CreateAdapterVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
1016
+ if (output.statusCode >= 300) {
1017
+ return de_CreateAdapterVersionCommandError(output, context);
1018
+ }
1019
+ const data = await parseBody(output.body, context);
1020
+ let contents = {};
1021
+ contents = (0, import_smithy_client._json)(data);
1022
+ const response = {
1023
+ $metadata: deserializeMetadata(output),
1024
+ ...contents
1025
+ };
1026
+ return response;
1027
+ }, "de_CreateAdapterVersionCommand");
1028
+ var de_CreateAdapterVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1029
+ const parsedOutput = {
1030
+ ...output,
1031
+ body: await parseErrorBody(output.body, context)
1032
+ };
1033
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1034
+ switch (errorCode) {
1035
+ case "AccessDeniedException":
1036
+ case "com.amazonaws.textract#AccessDeniedException":
1037
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1038
+ case "ConflictException":
1039
+ case "com.amazonaws.textract#ConflictException":
1040
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1041
+ case "IdempotentParameterMismatchException":
1042
+ case "com.amazonaws.textract#IdempotentParameterMismatchException":
1043
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1044
+ case "InternalServerError":
1045
+ case "com.amazonaws.textract#InternalServerError":
1046
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1047
+ case "InvalidKMSKeyException":
1048
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1049
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1050
+ case "InvalidParameterException":
1051
+ case "com.amazonaws.textract#InvalidParameterException":
1052
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1053
+ case "InvalidS3ObjectException":
1054
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1055
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1056
+ case "LimitExceededException":
1057
+ case "com.amazonaws.textract#LimitExceededException":
1058
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1059
+ case "ProvisionedThroughputExceededException":
1060
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1061
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1062
+ case "ResourceNotFoundException":
1063
+ case "com.amazonaws.textract#ResourceNotFoundException":
1064
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1065
+ case "ServiceQuotaExceededException":
1066
+ case "com.amazonaws.textract#ServiceQuotaExceededException":
1067
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1068
+ case "ThrottlingException":
1069
+ case "com.amazonaws.textract#ThrottlingException":
1070
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1071
+ case "ValidationException":
1072
+ case "com.amazonaws.textract#ValidationException":
1073
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1074
+ default:
1075
+ const parsedBody = parsedOutput.body;
1076
+ return throwDefaultError({
1077
+ output,
1078
+ parsedBody,
1079
+ errorCode
1080
+ });
1081
+ }
1082
+ }, "de_CreateAdapterVersionCommandError");
1083
+ var de_DeleteAdapterCommand = /* @__PURE__ */ __name(async (output, context) => {
1084
+ if (output.statusCode >= 300) {
1085
+ return de_DeleteAdapterCommandError(output, context);
1086
+ }
1087
+ const data = await parseBody(output.body, context);
1088
+ let contents = {};
1089
+ contents = (0, import_smithy_client._json)(data);
1090
+ const response = {
1091
+ $metadata: deserializeMetadata(output),
1092
+ ...contents
1093
+ };
1094
+ return response;
1095
+ }, "de_DeleteAdapterCommand");
1096
+ var de_DeleteAdapterCommandError = /* @__PURE__ */ __name(async (output, context) => {
1097
+ const parsedOutput = {
1098
+ ...output,
1099
+ body: await parseErrorBody(output.body, context)
1100
+ };
1101
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1102
+ switch (errorCode) {
1103
+ case "AccessDeniedException":
1104
+ case "com.amazonaws.textract#AccessDeniedException":
1105
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1106
+ case "ConflictException":
1107
+ case "com.amazonaws.textract#ConflictException":
1108
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1109
+ case "InternalServerError":
1110
+ case "com.amazonaws.textract#InternalServerError":
1111
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1112
+ case "InvalidParameterException":
1113
+ case "com.amazonaws.textract#InvalidParameterException":
1114
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1115
+ case "ProvisionedThroughputExceededException":
1116
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1117
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1118
+ case "ResourceNotFoundException":
1119
+ case "com.amazonaws.textract#ResourceNotFoundException":
1120
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1121
+ case "ThrottlingException":
1122
+ case "com.amazonaws.textract#ThrottlingException":
1123
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1124
+ case "ValidationException":
1125
+ case "com.amazonaws.textract#ValidationException":
1126
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1127
+ default:
1128
+ const parsedBody = parsedOutput.body;
1129
+ return throwDefaultError({
1130
+ output,
1131
+ parsedBody,
1132
+ errorCode
1133
+ });
1134
+ }
1135
+ }, "de_DeleteAdapterCommandError");
1136
+ var de_DeleteAdapterVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
1137
+ if (output.statusCode >= 300) {
1138
+ return de_DeleteAdapterVersionCommandError(output, context);
1139
+ }
1140
+ const data = await parseBody(output.body, context);
1141
+ let contents = {};
1142
+ contents = (0, import_smithy_client._json)(data);
1143
+ const response = {
1144
+ $metadata: deserializeMetadata(output),
1145
+ ...contents
1146
+ };
1147
+ return response;
1148
+ }, "de_DeleteAdapterVersionCommand");
1149
+ var de_DeleteAdapterVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1150
+ const parsedOutput = {
1151
+ ...output,
1152
+ body: await parseErrorBody(output.body, context)
1153
+ };
1154
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1155
+ switch (errorCode) {
1156
+ case "AccessDeniedException":
1157
+ case "com.amazonaws.textract#AccessDeniedException":
1158
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1159
+ case "ConflictException":
1160
+ case "com.amazonaws.textract#ConflictException":
1161
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1162
+ case "InternalServerError":
1163
+ case "com.amazonaws.textract#InternalServerError":
1164
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1165
+ case "InvalidParameterException":
1166
+ case "com.amazonaws.textract#InvalidParameterException":
1167
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1168
+ case "ProvisionedThroughputExceededException":
1169
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1170
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1171
+ case "ResourceNotFoundException":
1172
+ case "com.amazonaws.textract#ResourceNotFoundException":
1173
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1174
+ case "ThrottlingException":
1175
+ case "com.amazonaws.textract#ThrottlingException":
1176
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1177
+ case "ValidationException":
1178
+ case "com.amazonaws.textract#ValidationException":
1179
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1180
+ default:
1181
+ const parsedBody = parsedOutput.body;
1182
+ return throwDefaultError({
1183
+ output,
1184
+ parsedBody,
1185
+ errorCode
1186
+ });
1187
+ }
1188
+ }, "de_DeleteAdapterVersionCommandError");
1189
+ var de_DetectDocumentTextCommand = /* @__PURE__ */ __name(async (output, context) => {
1190
+ if (output.statusCode >= 300) {
1191
+ return de_DetectDocumentTextCommandError(output, context);
1192
+ }
1193
+ const data = await parseBody(output.body, context);
1194
+ let contents = {};
1195
+ contents = de_DetectDocumentTextResponse(data, context);
1196
+ const response = {
1197
+ $metadata: deserializeMetadata(output),
1198
+ ...contents
1199
+ };
1200
+ return response;
1201
+ }, "de_DetectDocumentTextCommand");
1202
+ var de_DetectDocumentTextCommandError = /* @__PURE__ */ __name(async (output, context) => {
1203
+ const parsedOutput = {
1204
+ ...output,
1205
+ body: await parseErrorBody(output.body, context)
1206
+ };
1207
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1208
+ switch (errorCode) {
1209
+ case "AccessDeniedException":
1210
+ case "com.amazonaws.textract#AccessDeniedException":
1211
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1212
+ case "BadDocumentException":
1213
+ case "com.amazonaws.textract#BadDocumentException":
1214
+ throw await de_BadDocumentExceptionRes(parsedOutput, context);
1215
+ case "DocumentTooLargeException":
1216
+ case "com.amazonaws.textract#DocumentTooLargeException":
1217
+ throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
1218
+ case "InternalServerError":
1219
+ case "com.amazonaws.textract#InternalServerError":
1220
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1221
+ case "InvalidParameterException":
1222
+ case "com.amazonaws.textract#InvalidParameterException":
1223
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1224
+ case "InvalidS3ObjectException":
1225
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1226
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1227
+ case "ProvisionedThroughputExceededException":
1228
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1229
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1230
+ case "ThrottlingException":
1231
+ case "com.amazonaws.textract#ThrottlingException":
1232
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1233
+ case "UnsupportedDocumentException":
1234
+ case "com.amazonaws.textract#UnsupportedDocumentException":
1235
+ throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
1236
+ default:
1237
+ const parsedBody = parsedOutput.body;
1238
+ return throwDefaultError({
1239
+ output,
1240
+ parsedBody,
1241
+ errorCode
1242
+ });
1243
+ }
1244
+ }, "de_DetectDocumentTextCommandError");
1245
+ var de_GetAdapterCommand = /* @__PURE__ */ __name(async (output, context) => {
1246
+ if (output.statusCode >= 300) {
1247
+ return de_GetAdapterCommandError(output, context);
1248
+ }
1249
+ const data = await parseBody(output.body, context);
1250
+ let contents = {};
1251
+ contents = de_GetAdapterResponse(data, context);
1252
+ const response = {
1253
+ $metadata: deserializeMetadata(output),
1254
+ ...contents
1255
+ };
1256
+ return response;
1257
+ }, "de_GetAdapterCommand");
1258
+ var de_GetAdapterCommandError = /* @__PURE__ */ __name(async (output, context) => {
1259
+ const parsedOutput = {
1260
+ ...output,
1261
+ body: await parseErrorBody(output.body, context)
1262
+ };
1263
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1264
+ switch (errorCode) {
1265
+ case "AccessDeniedException":
1266
+ case "com.amazonaws.textract#AccessDeniedException":
1267
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1268
+ case "InternalServerError":
1269
+ case "com.amazonaws.textract#InternalServerError":
1270
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1271
+ case "InvalidParameterException":
1272
+ case "com.amazonaws.textract#InvalidParameterException":
1273
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1274
+ case "ProvisionedThroughputExceededException":
1275
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1276
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1277
+ case "ResourceNotFoundException":
1278
+ case "com.amazonaws.textract#ResourceNotFoundException":
1279
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1280
+ case "ThrottlingException":
1281
+ case "com.amazonaws.textract#ThrottlingException":
1282
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1283
+ case "ValidationException":
1284
+ case "com.amazonaws.textract#ValidationException":
1285
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1286
+ default:
1287
+ const parsedBody = parsedOutput.body;
1288
+ return throwDefaultError({
1289
+ output,
1290
+ parsedBody,
1291
+ errorCode
1292
+ });
1293
+ }
1294
+ }, "de_GetAdapterCommandError");
1295
+ var de_GetAdapterVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
1296
+ if (output.statusCode >= 300) {
1297
+ return de_GetAdapterVersionCommandError(output, context);
1298
+ }
1299
+ const data = await parseBody(output.body, context);
1300
+ let contents = {};
1301
+ contents = de_GetAdapterVersionResponse(data, context);
1302
+ const response = {
1303
+ $metadata: deserializeMetadata(output),
1304
+ ...contents
1305
+ };
1306
+ return response;
1307
+ }, "de_GetAdapterVersionCommand");
1308
+ var de_GetAdapterVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1309
+ const parsedOutput = {
1310
+ ...output,
1311
+ body: await parseErrorBody(output.body, context)
1312
+ };
1313
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1314
+ switch (errorCode) {
1315
+ case "AccessDeniedException":
1316
+ case "com.amazonaws.textract#AccessDeniedException":
1317
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1318
+ case "InternalServerError":
1319
+ case "com.amazonaws.textract#InternalServerError":
1320
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1321
+ case "InvalidParameterException":
1322
+ case "com.amazonaws.textract#InvalidParameterException":
1323
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1324
+ case "ProvisionedThroughputExceededException":
1325
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1326
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1327
+ case "ResourceNotFoundException":
1328
+ case "com.amazonaws.textract#ResourceNotFoundException":
1329
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1330
+ case "ThrottlingException":
1331
+ case "com.amazonaws.textract#ThrottlingException":
1332
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1333
+ case "ValidationException":
1334
+ case "com.amazonaws.textract#ValidationException":
1335
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1336
+ default:
1337
+ const parsedBody = parsedOutput.body;
1338
+ return throwDefaultError({
1339
+ output,
1340
+ parsedBody,
1341
+ errorCode
1342
+ });
1343
+ }
1344
+ }, "de_GetAdapterVersionCommandError");
1345
+ var de_GetDocumentAnalysisCommand = /* @__PURE__ */ __name(async (output, context) => {
1346
+ if (output.statusCode >= 300) {
1347
+ return de_GetDocumentAnalysisCommandError(output, context);
1348
+ }
1349
+ const data = await parseBody(output.body, context);
1350
+ let contents = {};
1351
+ contents = de_GetDocumentAnalysisResponse(data, context);
1352
+ const response = {
1353
+ $metadata: deserializeMetadata(output),
1354
+ ...contents
1355
+ };
1356
+ return response;
1357
+ }, "de_GetDocumentAnalysisCommand");
1358
+ var de_GetDocumentAnalysisCommandError = /* @__PURE__ */ __name(async (output, context) => {
1359
+ const parsedOutput = {
1360
+ ...output,
1361
+ body: await parseErrorBody(output.body, context)
1362
+ };
1363
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1364
+ switch (errorCode) {
1365
+ case "AccessDeniedException":
1366
+ case "com.amazonaws.textract#AccessDeniedException":
1367
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1368
+ case "InternalServerError":
1369
+ case "com.amazonaws.textract#InternalServerError":
1370
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1371
+ case "InvalidJobIdException":
1372
+ case "com.amazonaws.textract#InvalidJobIdException":
1373
+ throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
1374
+ case "InvalidKMSKeyException":
1375
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1376
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1377
+ case "InvalidParameterException":
1378
+ case "com.amazonaws.textract#InvalidParameterException":
1379
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1380
+ case "InvalidS3ObjectException":
1381
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1382
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1383
+ case "ProvisionedThroughputExceededException":
1384
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1385
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1386
+ case "ThrottlingException":
1387
+ case "com.amazonaws.textract#ThrottlingException":
1388
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1389
+ default:
1390
+ const parsedBody = parsedOutput.body;
1391
+ return throwDefaultError({
1392
+ output,
1393
+ parsedBody,
1394
+ errorCode
1395
+ });
1396
+ }
1397
+ }, "de_GetDocumentAnalysisCommandError");
1398
+ var de_GetDocumentTextDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
1399
+ if (output.statusCode >= 300) {
1400
+ return de_GetDocumentTextDetectionCommandError(output, context);
1401
+ }
1402
+ const data = await parseBody(output.body, context);
1403
+ let contents = {};
1404
+ contents = de_GetDocumentTextDetectionResponse(data, context);
1405
+ const response = {
1406
+ $metadata: deserializeMetadata(output),
1407
+ ...contents
1408
+ };
1409
+ return response;
1410
+ }, "de_GetDocumentTextDetectionCommand");
1411
+ var de_GetDocumentTextDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1412
+ const parsedOutput = {
1413
+ ...output,
1414
+ body: await parseErrorBody(output.body, context)
1415
+ };
1416
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1417
+ switch (errorCode) {
1418
+ case "AccessDeniedException":
1419
+ case "com.amazonaws.textract#AccessDeniedException":
1420
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1421
+ case "InternalServerError":
1422
+ case "com.amazonaws.textract#InternalServerError":
1423
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1424
+ case "InvalidJobIdException":
1425
+ case "com.amazonaws.textract#InvalidJobIdException":
1426
+ throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
1427
+ case "InvalidKMSKeyException":
1428
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1429
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1430
+ case "InvalidParameterException":
1431
+ case "com.amazonaws.textract#InvalidParameterException":
1432
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1433
+ case "InvalidS3ObjectException":
1434
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1435
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1436
+ case "ProvisionedThroughputExceededException":
1437
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1438
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1439
+ case "ThrottlingException":
1440
+ case "com.amazonaws.textract#ThrottlingException":
1441
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1442
+ default:
1443
+ const parsedBody = parsedOutput.body;
1444
+ return throwDefaultError({
1445
+ output,
1446
+ parsedBody,
1447
+ errorCode
1448
+ });
1449
+ }
1450
+ }, "de_GetDocumentTextDetectionCommandError");
1451
+ var de_GetExpenseAnalysisCommand = /* @__PURE__ */ __name(async (output, context) => {
1452
+ if (output.statusCode >= 300) {
1453
+ return de_GetExpenseAnalysisCommandError(output, context);
1454
+ }
1455
+ const data = await parseBody(output.body, context);
1456
+ let contents = {};
1457
+ contents = de_GetExpenseAnalysisResponse(data, context);
1458
+ const response = {
1459
+ $metadata: deserializeMetadata(output),
1460
+ ...contents
1461
+ };
1462
+ return response;
1463
+ }, "de_GetExpenseAnalysisCommand");
1464
+ var de_GetExpenseAnalysisCommandError = /* @__PURE__ */ __name(async (output, context) => {
1465
+ const parsedOutput = {
1466
+ ...output,
1467
+ body: await parseErrorBody(output.body, context)
1468
+ };
1469
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1470
+ switch (errorCode) {
1471
+ case "AccessDeniedException":
1472
+ case "com.amazonaws.textract#AccessDeniedException":
1473
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1474
+ case "InternalServerError":
1475
+ case "com.amazonaws.textract#InternalServerError":
1476
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1477
+ case "InvalidJobIdException":
1478
+ case "com.amazonaws.textract#InvalidJobIdException":
1479
+ throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
1480
+ case "InvalidKMSKeyException":
1481
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1482
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1483
+ case "InvalidParameterException":
1484
+ case "com.amazonaws.textract#InvalidParameterException":
1485
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1486
+ case "InvalidS3ObjectException":
1487
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1488
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1489
+ case "ProvisionedThroughputExceededException":
1490
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1491
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1492
+ case "ThrottlingException":
1493
+ case "com.amazonaws.textract#ThrottlingException":
1494
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1495
+ default:
1496
+ const parsedBody = parsedOutput.body;
1497
+ return throwDefaultError({
1498
+ output,
1499
+ parsedBody,
1500
+ errorCode
1501
+ });
1502
+ }
1503
+ }, "de_GetExpenseAnalysisCommandError");
1504
+ var de_GetLendingAnalysisCommand = /* @__PURE__ */ __name(async (output, context) => {
1505
+ if (output.statusCode >= 300) {
1506
+ return de_GetLendingAnalysisCommandError(output, context);
1507
+ }
1508
+ const data = await parseBody(output.body, context);
1509
+ let contents = {};
1510
+ contents = de_GetLendingAnalysisResponse(data, context);
1511
+ const response = {
1512
+ $metadata: deserializeMetadata(output),
1513
+ ...contents
1514
+ };
1515
+ return response;
1516
+ }, "de_GetLendingAnalysisCommand");
1517
+ var de_GetLendingAnalysisCommandError = /* @__PURE__ */ __name(async (output, context) => {
1518
+ const parsedOutput = {
1519
+ ...output,
1520
+ body: await parseErrorBody(output.body, context)
1521
+ };
1522
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1523
+ switch (errorCode) {
1524
+ case "AccessDeniedException":
1525
+ case "com.amazonaws.textract#AccessDeniedException":
1526
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1527
+ case "InternalServerError":
1528
+ case "com.amazonaws.textract#InternalServerError":
1529
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1530
+ case "InvalidJobIdException":
1531
+ case "com.amazonaws.textract#InvalidJobIdException":
1532
+ throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
1533
+ case "InvalidKMSKeyException":
1534
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1535
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1536
+ case "InvalidParameterException":
1537
+ case "com.amazonaws.textract#InvalidParameterException":
1538
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1539
+ case "InvalidS3ObjectException":
1540
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1541
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1542
+ case "ProvisionedThroughputExceededException":
1543
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1544
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1545
+ case "ThrottlingException":
1546
+ case "com.amazonaws.textract#ThrottlingException":
1547
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1548
+ default:
1549
+ const parsedBody = parsedOutput.body;
1550
+ return throwDefaultError({
1551
+ output,
1552
+ parsedBody,
1553
+ errorCode
1554
+ });
1555
+ }
1556
+ }, "de_GetLendingAnalysisCommandError");
1557
+ var de_GetLendingAnalysisSummaryCommand = /* @__PURE__ */ __name(async (output, context) => {
1558
+ if (output.statusCode >= 300) {
1559
+ return de_GetLendingAnalysisSummaryCommandError(output, context);
1560
+ }
1561
+ const data = await parseBody(output.body, context);
1562
+ let contents = {};
1563
+ contents = (0, import_smithy_client._json)(data);
1564
+ const response = {
1565
+ $metadata: deserializeMetadata(output),
1566
+ ...contents
1567
+ };
1568
+ return response;
1569
+ }, "de_GetLendingAnalysisSummaryCommand");
1570
+ var de_GetLendingAnalysisSummaryCommandError = /* @__PURE__ */ __name(async (output, context) => {
1571
+ const parsedOutput = {
1572
+ ...output,
1573
+ body: await parseErrorBody(output.body, context)
1574
+ };
1575
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1576
+ switch (errorCode) {
1577
+ case "AccessDeniedException":
1578
+ case "com.amazonaws.textract#AccessDeniedException":
1579
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1580
+ case "InternalServerError":
1581
+ case "com.amazonaws.textract#InternalServerError":
1582
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1583
+ case "InvalidJobIdException":
1584
+ case "com.amazonaws.textract#InvalidJobIdException":
1585
+ throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
1586
+ case "InvalidKMSKeyException":
1587
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1588
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1589
+ case "InvalidParameterException":
1590
+ case "com.amazonaws.textract#InvalidParameterException":
1591
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1592
+ case "InvalidS3ObjectException":
1593
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1594
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1595
+ case "ProvisionedThroughputExceededException":
1596
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1597
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1598
+ case "ThrottlingException":
1599
+ case "com.amazonaws.textract#ThrottlingException":
1600
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1601
+ default:
1602
+ const parsedBody = parsedOutput.body;
1603
+ return throwDefaultError({
1604
+ output,
1605
+ parsedBody,
1606
+ errorCode
1607
+ });
1608
+ }
1609
+ }, "de_GetLendingAnalysisSummaryCommandError");
1610
+ var de_ListAdaptersCommand = /* @__PURE__ */ __name(async (output, context) => {
1611
+ if (output.statusCode >= 300) {
1612
+ return de_ListAdaptersCommandError(output, context);
1613
+ }
1614
+ const data = await parseBody(output.body, context);
1615
+ let contents = {};
1616
+ contents = de_ListAdaptersResponse(data, context);
1617
+ const response = {
1618
+ $metadata: deserializeMetadata(output),
1619
+ ...contents
1620
+ };
1621
+ return response;
1622
+ }, "de_ListAdaptersCommand");
1623
+ var de_ListAdaptersCommandError = /* @__PURE__ */ __name(async (output, context) => {
1624
+ const parsedOutput = {
1625
+ ...output,
1626
+ body: await parseErrorBody(output.body, context)
1627
+ };
1628
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1629
+ switch (errorCode) {
1630
+ case "AccessDeniedException":
1631
+ case "com.amazonaws.textract#AccessDeniedException":
1632
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1633
+ case "InternalServerError":
1634
+ case "com.amazonaws.textract#InternalServerError":
1635
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1636
+ case "InvalidParameterException":
1637
+ case "com.amazonaws.textract#InvalidParameterException":
1638
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1639
+ case "ProvisionedThroughputExceededException":
1640
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1641
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1642
+ case "ThrottlingException":
1643
+ case "com.amazonaws.textract#ThrottlingException":
1644
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1645
+ case "ValidationException":
1646
+ case "com.amazonaws.textract#ValidationException":
1647
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1648
+ default:
1649
+ const parsedBody = parsedOutput.body;
1650
+ return throwDefaultError({
1651
+ output,
1652
+ parsedBody,
1653
+ errorCode
1654
+ });
1655
+ }
1656
+ }, "de_ListAdaptersCommandError");
1657
+ var de_ListAdapterVersionsCommand = /* @__PURE__ */ __name(async (output, context) => {
1658
+ if (output.statusCode >= 300) {
1659
+ return de_ListAdapterVersionsCommandError(output, context);
1660
+ }
1661
+ const data = await parseBody(output.body, context);
1662
+ let contents = {};
1663
+ contents = de_ListAdapterVersionsResponse(data, context);
1664
+ const response = {
1665
+ $metadata: deserializeMetadata(output),
1666
+ ...contents
1667
+ };
1668
+ return response;
1669
+ }, "de_ListAdapterVersionsCommand");
1670
+ var de_ListAdapterVersionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1671
+ const parsedOutput = {
1672
+ ...output,
1673
+ body: await parseErrorBody(output.body, context)
1674
+ };
1675
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1676
+ switch (errorCode) {
1677
+ case "AccessDeniedException":
1678
+ case "com.amazonaws.textract#AccessDeniedException":
1679
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1680
+ case "InternalServerError":
1681
+ case "com.amazonaws.textract#InternalServerError":
1682
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1683
+ case "InvalidParameterException":
1684
+ case "com.amazonaws.textract#InvalidParameterException":
1685
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1686
+ case "ProvisionedThroughputExceededException":
1687
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1688
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1689
+ case "ResourceNotFoundException":
1690
+ case "com.amazonaws.textract#ResourceNotFoundException":
1691
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1692
+ case "ThrottlingException":
1693
+ case "com.amazonaws.textract#ThrottlingException":
1694
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1695
+ case "ValidationException":
1696
+ case "com.amazonaws.textract#ValidationException":
1697
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1698
+ default:
1699
+ const parsedBody = parsedOutput.body;
1700
+ return throwDefaultError({
1701
+ output,
1702
+ parsedBody,
1703
+ errorCode
1704
+ });
1705
+ }
1706
+ }, "de_ListAdapterVersionsCommandError");
1707
+ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1708
+ if (output.statusCode >= 300) {
1709
+ return de_ListTagsForResourceCommandError(output, context);
1710
+ }
1711
+ const data = await parseBody(output.body, context);
1712
+ let contents = {};
1713
+ contents = (0, import_smithy_client._json)(data);
1714
+ const response = {
1715
+ $metadata: deserializeMetadata(output),
1716
+ ...contents
1717
+ };
1718
+ return response;
1719
+ }, "de_ListTagsForResourceCommand");
1720
+ var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1721
+ const parsedOutput = {
1722
+ ...output,
1723
+ body: await parseErrorBody(output.body, context)
1724
+ };
1725
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1726
+ switch (errorCode) {
1727
+ case "AccessDeniedException":
1728
+ case "com.amazonaws.textract#AccessDeniedException":
1729
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1730
+ case "InternalServerError":
1731
+ case "com.amazonaws.textract#InternalServerError":
1732
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1733
+ case "InvalidParameterException":
1734
+ case "com.amazonaws.textract#InvalidParameterException":
1735
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1736
+ case "ProvisionedThroughputExceededException":
1737
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1738
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1739
+ case "ResourceNotFoundException":
1740
+ case "com.amazonaws.textract#ResourceNotFoundException":
1741
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1742
+ case "ThrottlingException":
1743
+ case "com.amazonaws.textract#ThrottlingException":
1744
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1745
+ case "ValidationException":
1746
+ case "com.amazonaws.textract#ValidationException":
1747
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1748
+ default:
1749
+ const parsedBody = parsedOutput.body;
1750
+ return throwDefaultError({
1751
+ output,
1752
+ parsedBody,
1753
+ errorCode
1754
+ });
1755
+ }
1756
+ }, "de_ListTagsForResourceCommandError");
1757
+ var de_StartDocumentAnalysisCommand = /* @__PURE__ */ __name(async (output, context) => {
1758
+ if (output.statusCode >= 300) {
1759
+ return de_StartDocumentAnalysisCommandError(output, context);
1760
+ }
1761
+ const data = await parseBody(output.body, context);
1762
+ let contents = {};
1763
+ contents = (0, import_smithy_client._json)(data);
1764
+ const response = {
1765
+ $metadata: deserializeMetadata(output),
1766
+ ...contents
1767
+ };
1768
+ return response;
1769
+ }, "de_StartDocumentAnalysisCommand");
1770
+ var de_StartDocumentAnalysisCommandError = /* @__PURE__ */ __name(async (output, context) => {
1771
+ const parsedOutput = {
1772
+ ...output,
1773
+ body: await parseErrorBody(output.body, context)
1774
+ };
1775
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1776
+ switch (errorCode) {
1777
+ case "AccessDeniedException":
1778
+ case "com.amazonaws.textract#AccessDeniedException":
1779
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1780
+ case "BadDocumentException":
1781
+ case "com.amazonaws.textract#BadDocumentException":
1782
+ throw await de_BadDocumentExceptionRes(parsedOutput, context);
1783
+ case "DocumentTooLargeException":
1784
+ case "com.amazonaws.textract#DocumentTooLargeException":
1785
+ throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
1786
+ case "IdempotentParameterMismatchException":
1787
+ case "com.amazonaws.textract#IdempotentParameterMismatchException":
1788
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1789
+ case "InternalServerError":
1790
+ case "com.amazonaws.textract#InternalServerError":
1791
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1792
+ case "InvalidKMSKeyException":
1793
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1794
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1795
+ case "InvalidParameterException":
1796
+ case "com.amazonaws.textract#InvalidParameterException":
1797
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1798
+ case "InvalidS3ObjectException":
1799
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1800
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1801
+ case "LimitExceededException":
1802
+ case "com.amazonaws.textract#LimitExceededException":
1803
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1804
+ case "ProvisionedThroughputExceededException":
1805
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1806
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1807
+ case "ThrottlingException":
1808
+ case "com.amazonaws.textract#ThrottlingException":
1809
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1810
+ case "UnsupportedDocumentException":
1811
+ case "com.amazonaws.textract#UnsupportedDocumentException":
1812
+ throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
1813
+ default:
1814
+ const parsedBody = parsedOutput.body;
1815
+ return throwDefaultError({
1816
+ output,
1817
+ parsedBody,
1818
+ errorCode
1819
+ });
1820
+ }
1821
+ }, "de_StartDocumentAnalysisCommandError");
1822
+ var de_StartDocumentTextDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
1823
+ if (output.statusCode >= 300) {
1824
+ return de_StartDocumentTextDetectionCommandError(output, context);
1825
+ }
1826
+ const data = await parseBody(output.body, context);
1827
+ let contents = {};
1828
+ contents = (0, import_smithy_client._json)(data);
1829
+ const response = {
1830
+ $metadata: deserializeMetadata(output),
1831
+ ...contents
1832
+ };
1833
+ return response;
1834
+ }, "de_StartDocumentTextDetectionCommand");
1835
+ var de_StartDocumentTextDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1836
+ const parsedOutput = {
1837
+ ...output,
1838
+ body: await parseErrorBody(output.body, context)
1839
+ };
1840
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1841
+ switch (errorCode) {
1842
+ case "AccessDeniedException":
1843
+ case "com.amazonaws.textract#AccessDeniedException":
1844
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1845
+ case "BadDocumentException":
1846
+ case "com.amazonaws.textract#BadDocumentException":
1847
+ throw await de_BadDocumentExceptionRes(parsedOutput, context);
1848
+ case "DocumentTooLargeException":
1849
+ case "com.amazonaws.textract#DocumentTooLargeException":
1850
+ throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
1851
+ case "IdempotentParameterMismatchException":
1852
+ case "com.amazonaws.textract#IdempotentParameterMismatchException":
1853
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1854
+ case "InternalServerError":
1855
+ case "com.amazonaws.textract#InternalServerError":
1856
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1857
+ case "InvalidKMSKeyException":
1858
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1859
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1860
+ case "InvalidParameterException":
1861
+ case "com.amazonaws.textract#InvalidParameterException":
1862
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1863
+ case "InvalidS3ObjectException":
1864
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1865
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1866
+ case "LimitExceededException":
1867
+ case "com.amazonaws.textract#LimitExceededException":
1868
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1869
+ case "ProvisionedThroughputExceededException":
1870
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1871
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1872
+ case "ThrottlingException":
1873
+ case "com.amazonaws.textract#ThrottlingException":
1874
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1875
+ case "UnsupportedDocumentException":
1876
+ case "com.amazonaws.textract#UnsupportedDocumentException":
1877
+ throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
1878
+ default:
1879
+ const parsedBody = parsedOutput.body;
1880
+ return throwDefaultError({
1881
+ output,
1882
+ parsedBody,
1883
+ errorCode
1884
+ });
1885
+ }
1886
+ }, "de_StartDocumentTextDetectionCommandError");
1887
+ var de_StartExpenseAnalysisCommand = /* @__PURE__ */ __name(async (output, context) => {
1888
+ if (output.statusCode >= 300) {
1889
+ return de_StartExpenseAnalysisCommandError(output, context);
1890
+ }
1891
+ const data = await parseBody(output.body, context);
1892
+ let contents = {};
1893
+ contents = (0, import_smithy_client._json)(data);
1894
+ const response = {
1895
+ $metadata: deserializeMetadata(output),
1896
+ ...contents
1897
+ };
1898
+ return response;
1899
+ }, "de_StartExpenseAnalysisCommand");
1900
+ var de_StartExpenseAnalysisCommandError = /* @__PURE__ */ __name(async (output, context) => {
1901
+ const parsedOutput = {
1902
+ ...output,
1903
+ body: await parseErrorBody(output.body, context)
1904
+ };
1905
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1906
+ switch (errorCode) {
1907
+ case "AccessDeniedException":
1908
+ case "com.amazonaws.textract#AccessDeniedException":
1909
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1910
+ case "BadDocumentException":
1911
+ case "com.amazonaws.textract#BadDocumentException":
1912
+ throw await de_BadDocumentExceptionRes(parsedOutput, context);
1913
+ case "DocumentTooLargeException":
1914
+ case "com.amazonaws.textract#DocumentTooLargeException":
1915
+ throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
1916
+ case "IdempotentParameterMismatchException":
1917
+ case "com.amazonaws.textract#IdempotentParameterMismatchException":
1918
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1919
+ case "InternalServerError":
1920
+ case "com.amazonaws.textract#InternalServerError":
1921
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1922
+ case "InvalidKMSKeyException":
1923
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1924
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1925
+ case "InvalidParameterException":
1926
+ case "com.amazonaws.textract#InvalidParameterException":
1927
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1928
+ case "InvalidS3ObjectException":
1929
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1930
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1931
+ case "LimitExceededException":
1932
+ case "com.amazonaws.textract#LimitExceededException":
1933
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1934
+ case "ProvisionedThroughputExceededException":
1935
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
1936
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1937
+ case "ThrottlingException":
1938
+ case "com.amazonaws.textract#ThrottlingException":
1939
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1940
+ case "UnsupportedDocumentException":
1941
+ case "com.amazonaws.textract#UnsupportedDocumentException":
1942
+ throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
1943
+ default:
1944
+ const parsedBody = parsedOutput.body;
1945
+ return throwDefaultError({
1946
+ output,
1947
+ parsedBody,
1948
+ errorCode
1949
+ });
1950
+ }
1951
+ }, "de_StartExpenseAnalysisCommandError");
1952
+ var de_StartLendingAnalysisCommand = /* @__PURE__ */ __name(async (output, context) => {
1953
+ if (output.statusCode >= 300) {
1954
+ return de_StartLendingAnalysisCommandError(output, context);
1955
+ }
1956
+ const data = await parseBody(output.body, context);
1957
+ let contents = {};
1958
+ contents = (0, import_smithy_client._json)(data);
1959
+ const response = {
1960
+ $metadata: deserializeMetadata(output),
1961
+ ...contents
1962
+ };
1963
+ return response;
1964
+ }, "de_StartLendingAnalysisCommand");
1965
+ var de_StartLendingAnalysisCommandError = /* @__PURE__ */ __name(async (output, context) => {
1966
+ const parsedOutput = {
1967
+ ...output,
1968
+ body: await parseErrorBody(output.body, context)
1969
+ };
1970
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1971
+ switch (errorCode) {
1972
+ case "AccessDeniedException":
1973
+ case "com.amazonaws.textract#AccessDeniedException":
1974
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1975
+ case "BadDocumentException":
1976
+ case "com.amazonaws.textract#BadDocumentException":
1977
+ throw await de_BadDocumentExceptionRes(parsedOutput, context);
1978
+ case "DocumentTooLargeException":
1979
+ case "com.amazonaws.textract#DocumentTooLargeException":
1980
+ throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
1981
+ case "IdempotentParameterMismatchException":
1982
+ case "com.amazonaws.textract#IdempotentParameterMismatchException":
1983
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1984
+ case "InternalServerError":
1985
+ case "com.amazonaws.textract#InternalServerError":
1986
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1987
+ case "InvalidKMSKeyException":
1988
+ case "com.amazonaws.textract#InvalidKMSKeyException":
1989
+ throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
1990
+ case "InvalidParameterException":
1991
+ case "com.amazonaws.textract#InvalidParameterException":
1992
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1993
+ case "InvalidS3ObjectException":
1994
+ case "com.amazonaws.textract#InvalidS3ObjectException":
1995
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1996
+ case "LimitExceededException":
1997
+ case "com.amazonaws.textract#LimitExceededException":
1998
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1999
+ case "ProvisionedThroughputExceededException":
2000
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
2001
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2002
+ case "ThrottlingException":
2003
+ case "com.amazonaws.textract#ThrottlingException":
2004
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2005
+ case "UnsupportedDocumentException":
2006
+ case "com.amazonaws.textract#UnsupportedDocumentException":
2007
+ throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
2008
+ default:
2009
+ const parsedBody = parsedOutput.body;
2010
+ return throwDefaultError({
2011
+ output,
2012
+ parsedBody,
2013
+ errorCode
2014
+ });
2015
+ }
2016
+ }, "de_StartLendingAnalysisCommandError");
2017
+ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
2018
+ if (output.statusCode >= 300) {
2019
+ return de_TagResourceCommandError(output, context);
2020
+ }
2021
+ const data = await parseBody(output.body, context);
2022
+ let contents = {};
2023
+ contents = (0, import_smithy_client._json)(data);
2024
+ const response = {
2025
+ $metadata: deserializeMetadata(output),
2026
+ ...contents
2027
+ };
2028
+ return response;
2029
+ }, "de_TagResourceCommand");
2030
+ var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
2031
+ const parsedOutput = {
2032
+ ...output,
2033
+ body: await parseErrorBody(output.body, context)
2034
+ };
2035
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2036
+ switch (errorCode) {
2037
+ case "AccessDeniedException":
2038
+ case "com.amazonaws.textract#AccessDeniedException":
2039
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2040
+ case "InternalServerError":
2041
+ case "com.amazonaws.textract#InternalServerError":
2042
+ throw await de_InternalServerErrorRes(parsedOutput, context);
2043
+ case "InvalidParameterException":
2044
+ case "com.amazonaws.textract#InvalidParameterException":
2045
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2046
+ case "ProvisionedThroughputExceededException":
2047
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
2048
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2049
+ case "ResourceNotFoundException":
2050
+ case "com.amazonaws.textract#ResourceNotFoundException":
2051
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2052
+ case "ServiceQuotaExceededException":
2053
+ case "com.amazonaws.textract#ServiceQuotaExceededException":
2054
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2055
+ case "ThrottlingException":
2056
+ case "com.amazonaws.textract#ThrottlingException":
2057
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2058
+ case "ValidationException":
2059
+ case "com.amazonaws.textract#ValidationException":
2060
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2061
+ default:
2062
+ const parsedBody = parsedOutput.body;
2063
+ return throwDefaultError({
2064
+ output,
2065
+ parsedBody,
2066
+ errorCode
2067
+ });
2068
+ }
2069
+ }, "de_TagResourceCommandError");
2070
+ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
2071
+ if (output.statusCode >= 300) {
2072
+ return de_UntagResourceCommandError(output, context);
2073
+ }
2074
+ const data = await parseBody(output.body, context);
2075
+ let contents = {};
2076
+ contents = (0, import_smithy_client._json)(data);
2077
+ const response = {
2078
+ $metadata: deserializeMetadata(output),
2079
+ ...contents
2080
+ };
2081
+ return response;
2082
+ }, "de_UntagResourceCommand");
2083
+ var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
2084
+ const parsedOutput = {
2085
+ ...output,
2086
+ body: await parseErrorBody(output.body, context)
2087
+ };
2088
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2089
+ switch (errorCode) {
2090
+ case "AccessDeniedException":
2091
+ case "com.amazonaws.textract#AccessDeniedException":
2092
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2093
+ case "InternalServerError":
2094
+ case "com.amazonaws.textract#InternalServerError":
2095
+ throw await de_InternalServerErrorRes(parsedOutput, context);
2096
+ case "InvalidParameterException":
2097
+ case "com.amazonaws.textract#InvalidParameterException":
2098
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2099
+ case "ProvisionedThroughputExceededException":
2100
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
2101
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2102
+ case "ResourceNotFoundException":
2103
+ case "com.amazonaws.textract#ResourceNotFoundException":
2104
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2105
+ case "ThrottlingException":
2106
+ case "com.amazonaws.textract#ThrottlingException":
2107
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2108
+ case "ValidationException":
2109
+ case "com.amazonaws.textract#ValidationException":
2110
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2111
+ default:
2112
+ const parsedBody = parsedOutput.body;
2113
+ return throwDefaultError({
2114
+ output,
2115
+ parsedBody,
2116
+ errorCode
2117
+ });
2118
+ }
2119
+ }, "de_UntagResourceCommandError");
2120
+ var de_UpdateAdapterCommand = /* @__PURE__ */ __name(async (output, context) => {
2121
+ if (output.statusCode >= 300) {
2122
+ return de_UpdateAdapterCommandError(output, context);
2123
+ }
2124
+ const data = await parseBody(output.body, context);
2125
+ let contents = {};
2126
+ contents = de_UpdateAdapterResponse(data, context);
2127
+ const response = {
2128
+ $metadata: deserializeMetadata(output),
2129
+ ...contents
2130
+ };
2131
+ return response;
2132
+ }, "de_UpdateAdapterCommand");
2133
+ var de_UpdateAdapterCommandError = /* @__PURE__ */ __name(async (output, context) => {
2134
+ const parsedOutput = {
2135
+ ...output,
2136
+ body: await parseErrorBody(output.body, context)
2137
+ };
2138
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2139
+ switch (errorCode) {
2140
+ case "AccessDeniedException":
2141
+ case "com.amazonaws.textract#AccessDeniedException":
2142
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2143
+ case "ConflictException":
2144
+ case "com.amazonaws.textract#ConflictException":
2145
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2146
+ case "InternalServerError":
2147
+ case "com.amazonaws.textract#InternalServerError":
2148
+ throw await de_InternalServerErrorRes(parsedOutput, context);
2149
+ case "InvalidParameterException":
2150
+ case "com.amazonaws.textract#InvalidParameterException":
2151
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2152
+ case "ProvisionedThroughputExceededException":
2153
+ case "com.amazonaws.textract#ProvisionedThroughputExceededException":
2154
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2155
+ case "ResourceNotFoundException":
2156
+ case "com.amazonaws.textract#ResourceNotFoundException":
2157
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2158
+ case "ThrottlingException":
2159
+ case "com.amazonaws.textract#ThrottlingException":
2160
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2161
+ case "ValidationException":
2162
+ case "com.amazonaws.textract#ValidationException":
2163
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2164
+ default:
2165
+ const parsedBody = parsedOutput.body;
2166
+ return throwDefaultError({
2167
+ output,
2168
+ parsedBody,
2169
+ errorCode
2170
+ });
2171
+ }
2172
+ }, "de_UpdateAdapterCommandError");
2173
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2174
+ const body = parsedOutput.body;
2175
+ const deserialized = (0, import_smithy_client._json)(body);
2176
+ const exception = new AccessDeniedException({
2177
+ $metadata: deserializeMetadata(parsedOutput),
2178
+ ...deserialized
2179
+ });
2180
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2181
+ }, "de_AccessDeniedExceptionRes");
2182
+ var de_BadDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2183
+ const body = parsedOutput.body;
2184
+ const deserialized = (0, import_smithy_client._json)(body);
2185
+ const exception = new BadDocumentException({
2186
+ $metadata: deserializeMetadata(parsedOutput),
2187
+ ...deserialized
2188
+ });
2189
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2190
+ }, "de_BadDocumentExceptionRes");
2191
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2192
+ const body = parsedOutput.body;
2193
+ const deserialized = (0, import_smithy_client._json)(body);
2194
+ const exception = new ConflictException({
2195
+ $metadata: deserializeMetadata(parsedOutput),
2196
+ ...deserialized
2197
+ });
2198
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2199
+ }, "de_ConflictExceptionRes");
2200
+ var de_DocumentTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2201
+ const body = parsedOutput.body;
2202
+ const deserialized = (0, import_smithy_client._json)(body);
2203
+ const exception = new DocumentTooLargeException({
2204
+ $metadata: deserializeMetadata(parsedOutput),
2205
+ ...deserialized
2206
+ });
2207
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2208
+ }, "de_DocumentTooLargeExceptionRes");
2209
+ var de_HumanLoopQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2210
+ const body = parsedOutput.body;
2211
+ const deserialized = (0, import_smithy_client._json)(body);
2212
+ const exception = new HumanLoopQuotaExceededException({
2213
+ $metadata: deserializeMetadata(parsedOutput),
2214
+ ...deserialized
2215
+ });
2216
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2217
+ }, "de_HumanLoopQuotaExceededExceptionRes");
2218
+ var de_IdempotentParameterMismatchExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2219
+ const body = parsedOutput.body;
2220
+ const deserialized = (0, import_smithy_client._json)(body);
2221
+ const exception = new IdempotentParameterMismatchException({
2222
+ $metadata: deserializeMetadata(parsedOutput),
2223
+ ...deserialized
2224
+ });
2225
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2226
+ }, "de_IdempotentParameterMismatchExceptionRes");
2227
+ var de_InternalServerErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2228
+ const body = parsedOutput.body;
2229
+ const deserialized = (0, import_smithy_client._json)(body);
2230
+ const exception = new InternalServerError({
2231
+ $metadata: deserializeMetadata(parsedOutput),
2232
+ ...deserialized
2233
+ });
2234
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2235
+ }, "de_InternalServerErrorRes");
2236
+ var de_InvalidJobIdExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2237
+ const body = parsedOutput.body;
2238
+ const deserialized = (0, import_smithy_client._json)(body);
2239
+ const exception = new InvalidJobIdException({
2240
+ $metadata: deserializeMetadata(parsedOutput),
2241
+ ...deserialized
2242
+ });
2243
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2244
+ }, "de_InvalidJobIdExceptionRes");
2245
+ var de_InvalidKMSKeyExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2246
+ const body = parsedOutput.body;
2247
+ const deserialized = (0, import_smithy_client._json)(body);
2248
+ const exception = new InvalidKMSKeyException({
2249
+ $metadata: deserializeMetadata(parsedOutput),
2250
+ ...deserialized
2251
+ });
2252
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2253
+ }, "de_InvalidKMSKeyExceptionRes");
2254
+ var de_InvalidParameterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2255
+ const body = parsedOutput.body;
2256
+ const deserialized = (0, import_smithy_client._json)(body);
2257
+ const exception = new InvalidParameterException({
2258
+ $metadata: deserializeMetadata(parsedOutput),
2259
+ ...deserialized
2260
+ });
2261
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2262
+ }, "de_InvalidParameterExceptionRes");
2263
+ var de_InvalidS3ObjectExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2264
+ const body = parsedOutput.body;
2265
+ const deserialized = (0, import_smithy_client._json)(body);
2266
+ const exception = new InvalidS3ObjectException({
2267
+ $metadata: deserializeMetadata(parsedOutput),
2268
+ ...deserialized
2269
+ });
2270
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2271
+ }, "de_InvalidS3ObjectExceptionRes");
2272
+ var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2273
+ const body = parsedOutput.body;
2274
+ const deserialized = (0, import_smithy_client._json)(body);
2275
+ const exception = new LimitExceededException({
2276
+ $metadata: deserializeMetadata(parsedOutput),
2277
+ ...deserialized
2278
+ });
2279
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2280
+ }, "de_LimitExceededExceptionRes");
2281
+ var de_ProvisionedThroughputExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2282
+ const body = parsedOutput.body;
2283
+ const deserialized = (0, import_smithy_client._json)(body);
2284
+ const exception = new ProvisionedThroughputExceededException({
2285
+ $metadata: deserializeMetadata(parsedOutput),
2286
+ ...deserialized
2287
+ });
2288
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2289
+ }, "de_ProvisionedThroughputExceededExceptionRes");
2290
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2291
+ const body = parsedOutput.body;
2292
+ const deserialized = (0, import_smithy_client._json)(body);
2293
+ const exception = new ResourceNotFoundException({
2294
+ $metadata: deserializeMetadata(parsedOutput),
2295
+ ...deserialized
2296
+ });
2297
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2298
+ }, "de_ResourceNotFoundExceptionRes");
2299
+ var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2300
+ const body = parsedOutput.body;
2301
+ const deserialized = (0, import_smithy_client._json)(body);
2302
+ const exception = new ServiceQuotaExceededException({
2303
+ $metadata: deserializeMetadata(parsedOutput),
2304
+ ...deserialized
2305
+ });
2306
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2307
+ }, "de_ServiceQuotaExceededExceptionRes");
2308
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2309
+ const body = parsedOutput.body;
2310
+ const deserialized = (0, import_smithy_client._json)(body);
2311
+ const exception = new ThrottlingException({
2312
+ $metadata: deserializeMetadata(parsedOutput),
2313
+ ...deserialized
2314
+ });
2315
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2316
+ }, "de_ThrottlingExceptionRes");
2317
+ var de_UnsupportedDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2318
+ const body = parsedOutput.body;
2319
+ const deserialized = (0, import_smithy_client._json)(body);
2320
+ const exception = new UnsupportedDocumentException({
2321
+ $metadata: deserializeMetadata(parsedOutput),
2322
+ ...deserialized
2323
+ });
2324
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2325
+ }, "de_UnsupportedDocumentExceptionRes");
2326
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2327
+ const body = parsedOutput.body;
2328
+ const deserialized = (0, import_smithy_client._json)(body);
2329
+ const exception = new ValidationException({
2330
+ $metadata: deserializeMetadata(parsedOutput),
2331
+ ...deserialized
2332
+ });
2333
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2334
+ }, "de_ValidationExceptionRes");
2335
+ var se_AnalyzeDocumentRequest = /* @__PURE__ */ __name((input, context) => {
2336
+ return (0, import_smithy_client.take)(input, {
2337
+ AdaptersConfig: import_smithy_client._json,
2338
+ Document: (_) => se_Document(_, context),
2339
+ FeatureTypes: import_smithy_client._json,
2340
+ HumanLoopConfig: import_smithy_client._json,
2341
+ QueriesConfig: import_smithy_client._json
2342
+ });
2343
+ }, "se_AnalyzeDocumentRequest");
2344
+ var se_AnalyzeExpenseRequest = /* @__PURE__ */ __name((input, context) => {
2345
+ return (0, import_smithy_client.take)(input, {
2346
+ Document: (_) => se_Document(_, context)
2347
+ });
2348
+ }, "se_AnalyzeExpenseRequest");
2349
+ var se_AnalyzeIDRequest = /* @__PURE__ */ __name((input, context) => {
2350
+ return (0, import_smithy_client.take)(input, {
2351
+ DocumentPages: (_) => se_DocumentPages(_, context)
2352
+ });
2353
+ }, "se_AnalyzeIDRequest");
2354
+ var se_CreateAdapterRequest = /* @__PURE__ */ __name((input, context) => {
2355
+ return (0, import_smithy_client.take)(input, {
2356
+ AdapterName: [],
2357
+ AutoUpdate: [],
2358
+ ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
2359
+ Description: [],
2360
+ FeatureTypes: import_smithy_client._json,
2361
+ Tags: import_smithy_client._json
2362
+ });
2363
+ }, "se_CreateAdapterRequest");
2364
+ var se_CreateAdapterVersionRequest = /* @__PURE__ */ __name((input, context) => {
2365
+ return (0, import_smithy_client.take)(input, {
2366
+ AdapterId: [],
2367
+ ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
2368
+ DatasetConfig: import_smithy_client._json,
2369
+ KMSKeyId: [],
2370
+ OutputConfig: import_smithy_client._json,
2371
+ Tags: import_smithy_client._json
2372
+ });
2373
+ }, "se_CreateAdapterVersionRequest");
2374
+ var se_DetectDocumentTextRequest = /* @__PURE__ */ __name((input, context) => {
2375
+ return (0, import_smithy_client.take)(input, {
2376
+ Document: (_) => se_Document(_, context)
2377
+ });
2378
+ }, "se_DetectDocumentTextRequest");
2379
+ var se_Document = /* @__PURE__ */ __name((input, context) => {
2380
+ return (0, import_smithy_client.take)(input, {
2381
+ Bytes: context.base64Encoder,
2382
+ S3Object: import_smithy_client._json
2383
+ });
2384
+ }, "se_Document");
2385
+ var se_DocumentPages = /* @__PURE__ */ __name((input, context) => {
2386
+ return input.filter((e) => e != null).map((entry) => {
2387
+ return se_Document(entry, context);
2388
+ });
2389
+ }, "se_DocumentPages");
2390
+ var se_ListAdaptersRequest = /* @__PURE__ */ __name((input, context) => {
2391
+ return (0, import_smithy_client.take)(input, {
2392
+ AfterCreationTime: (_) => Math.round(_.getTime() / 1e3),
2393
+ BeforeCreationTime: (_) => Math.round(_.getTime() / 1e3),
2394
+ MaxResults: [],
2395
+ NextToken: []
2396
+ });
2397
+ }, "se_ListAdaptersRequest");
2398
+ var se_ListAdapterVersionsRequest = /* @__PURE__ */ __name((input, context) => {
2399
+ return (0, import_smithy_client.take)(input, {
2400
+ AdapterId: [],
2401
+ AfterCreationTime: (_) => Math.round(_.getTime() / 1e3),
2402
+ BeforeCreationTime: (_) => Math.round(_.getTime() / 1e3),
2403
+ MaxResults: [],
2404
+ NextToken: []
2405
+ });
2406
+ }, "se_ListAdapterVersionsRequest");
2407
+ var de_AdapterList = /* @__PURE__ */ __name((output, context) => {
2408
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2409
+ return de_AdapterOverview(entry, context);
2410
+ });
2411
+ return retVal;
2412
+ }, "de_AdapterList");
2413
+ var de_AdapterOverview = /* @__PURE__ */ __name((output, context) => {
2414
+ return (0, import_smithy_client.take)(output, {
2415
+ AdapterId: import_smithy_client.expectString,
2416
+ AdapterName: import_smithy_client.expectString,
2417
+ CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2418
+ FeatureTypes: import_smithy_client._json
2419
+ });
2420
+ }, "de_AdapterOverview");
2421
+ var de_AdapterVersionEvaluationMetric = /* @__PURE__ */ __name((output, context) => {
2422
+ return (0, import_smithy_client.take)(output, {
2423
+ AdapterVersion: (_) => de_EvaluationMetric(_, context),
2424
+ Baseline: (_) => de_EvaluationMetric(_, context),
2425
+ FeatureType: import_smithy_client.expectString
2426
+ });
2427
+ }, "de_AdapterVersionEvaluationMetric");
2428
+ var de_AdapterVersionEvaluationMetrics = /* @__PURE__ */ __name((output, context) => {
2429
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2430
+ return de_AdapterVersionEvaluationMetric(entry, context);
2431
+ });
2432
+ return retVal;
2433
+ }, "de_AdapterVersionEvaluationMetrics");
2434
+ var de_AdapterVersionList = /* @__PURE__ */ __name((output, context) => {
2435
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2436
+ return de_AdapterVersionOverview(entry, context);
2437
+ });
2438
+ return retVal;
2439
+ }, "de_AdapterVersionList");
2440
+ var de_AdapterVersionOverview = /* @__PURE__ */ __name((output, context) => {
2441
+ return (0, import_smithy_client.take)(output, {
2442
+ AdapterId: import_smithy_client.expectString,
2443
+ AdapterVersion: import_smithy_client.expectString,
2444
+ CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2445
+ FeatureTypes: import_smithy_client._json,
2446
+ Status: import_smithy_client.expectString,
2447
+ StatusMessage: import_smithy_client.expectString
2448
+ });
2449
+ }, "de_AdapterVersionOverview");
2450
+ var de_AnalyzeDocumentResponse = /* @__PURE__ */ __name((output, context) => {
2451
+ return (0, import_smithy_client.take)(output, {
2452
+ AnalyzeDocumentModelVersion: import_smithy_client.expectString,
2453
+ Blocks: (_) => de_BlockList(_, context),
2454
+ DocumentMetadata: import_smithy_client._json,
2455
+ HumanLoopActivationOutput: (_) => de_HumanLoopActivationOutput(_, context)
2456
+ });
2457
+ }, "de_AnalyzeDocumentResponse");
2458
+ var de_AnalyzeExpenseResponse = /* @__PURE__ */ __name((output, context) => {
2459
+ return (0, import_smithy_client.take)(output, {
2460
+ DocumentMetadata: import_smithy_client._json,
2461
+ ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context)
2462
+ });
2463
+ }, "de_AnalyzeExpenseResponse");
2464
+ var de_AnalyzeIDDetections = /* @__PURE__ */ __name((output, context) => {
2465
+ return (0, import_smithy_client.take)(output, {
2466
+ Confidence: import_smithy_client.limitedParseFloat32,
2467
+ NormalizedValue: import_smithy_client._json,
2468
+ Text: import_smithy_client.expectString
2469
+ });
2470
+ }, "de_AnalyzeIDDetections");
2471
+ var de_AnalyzeIDResponse = /* @__PURE__ */ __name((output, context) => {
2472
+ return (0, import_smithy_client.take)(output, {
2473
+ AnalyzeIDModelVersion: import_smithy_client.expectString,
2474
+ DocumentMetadata: import_smithy_client._json,
2475
+ IdentityDocuments: (_) => de_IdentityDocumentList(_, context)
2476
+ });
2477
+ }, "de_AnalyzeIDResponse");
2478
+ var de_Block = /* @__PURE__ */ __name((output, context) => {
2479
+ return (0, import_smithy_client.take)(output, {
2480
+ BlockType: import_smithy_client.expectString,
2481
+ ColumnIndex: import_smithy_client.expectInt32,
2482
+ ColumnSpan: import_smithy_client.expectInt32,
2483
+ Confidence: import_smithy_client.limitedParseFloat32,
2484
+ EntityTypes: import_smithy_client._json,
2485
+ Geometry: (_) => de_Geometry(_, context),
2486
+ Id: import_smithy_client.expectString,
2487
+ Page: import_smithy_client.expectInt32,
2488
+ Query: import_smithy_client._json,
2489
+ Relationships: import_smithy_client._json,
2490
+ RowIndex: import_smithy_client.expectInt32,
2491
+ RowSpan: import_smithy_client.expectInt32,
2492
+ SelectionStatus: import_smithy_client.expectString,
2493
+ Text: import_smithy_client.expectString,
2494
+ TextType: import_smithy_client.expectString
2495
+ });
2496
+ }, "de_Block");
2497
+ var de_BlockList = /* @__PURE__ */ __name((output, context) => {
2498
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2499
+ return de_Block(entry, context);
2500
+ });
2501
+ return retVal;
2502
+ }, "de_BlockList");
2503
+ var de_BoundingBox = /* @__PURE__ */ __name((output, context) => {
2504
+ return (0, import_smithy_client.take)(output, {
2505
+ Height: import_smithy_client.limitedParseFloat32,
2506
+ Left: import_smithy_client.limitedParseFloat32,
2507
+ Top: import_smithy_client.limitedParseFloat32,
2508
+ Width: import_smithy_client.limitedParseFloat32
2509
+ });
2510
+ }, "de_BoundingBox");
2511
+ var de_DetectDocumentTextResponse = /* @__PURE__ */ __name((output, context) => {
2512
+ return (0, import_smithy_client.take)(output, {
2513
+ Blocks: (_) => de_BlockList(_, context),
2514
+ DetectDocumentTextModelVersion: import_smithy_client.expectString,
2515
+ DocumentMetadata: import_smithy_client._json
2516
+ });
2517
+ }, "de_DetectDocumentTextResponse");
2518
+ var de_EvaluationMetric = /* @__PURE__ */ __name((output, context) => {
2519
+ return (0, import_smithy_client.take)(output, {
2520
+ F1Score: import_smithy_client.limitedParseFloat32,
2521
+ Precision: import_smithy_client.limitedParseFloat32,
2522
+ Recall: import_smithy_client.limitedParseFloat32
2523
+ });
2524
+ }, "de_EvaluationMetric");
2525
+ var de_ExpenseCurrency = /* @__PURE__ */ __name((output, context) => {
2526
+ return (0, import_smithy_client.take)(output, {
2527
+ Code: import_smithy_client.expectString,
2528
+ Confidence: import_smithy_client.limitedParseFloat32
2529
+ });
2530
+ }, "de_ExpenseCurrency");
2531
+ var de_ExpenseDetection = /* @__PURE__ */ __name((output, context) => {
2532
+ return (0, import_smithy_client.take)(output, {
2533
+ Confidence: import_smithy_client.limitedParseFloat32,
2534
+ Geometry: (_) => de_Geometry(_, context),
2535
+ Text: import_smithy_client.expectString
2536
+ });
2537
+ }, "de_ExpenseDetection");
2538
+ var de_ExpenseDocument = /* @__PURE__ */ __name((output, context) => {
2539
+ return (0, import_smithy_client.take)(output, {
2540
+ Blocks: (_) => de_BlockList(_, context),
2541
+ ExpenseIndex: import_smithy_client.expectInt32,
2542
+ LineItemGroups: (_) => de_LineItemGroupList(_, context),
2543
+ SummaryFields: (_) => de_ExpenseFieldList(_, context)
2544
+ });
2545
+ }, "de_ExpenseDocument");
2546
+ var de_ExpenseDocumentList = /* @__PURE__ */ __name((output, context) => {
2547
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2548
+ return de_ExpenseDocument(entry, context);
2549
+ });
2550
+ return retVal;
2551
+ }, "de_ExpenseDocumentList");
2552
+ var de_ExpenseField = /* @__PURE__ */ __name((output, context) => {
2553
+ return (0, import_smithy_client.take)(output, {
2554
+ Currency: (_) => de_ExpenseCurrency(_, context),
2555
+ GroupProperties: import_smithy_client._json,
2556
+ LabelDetection: (_) => de_ExpenseDetection(_, context),
2557
+ PageNumber: import_smithy_client.expectInt32,
2558
+ Type: (_) => de_ExpenseType(_, context),
2559
+ ValueDetection: (_) => de_ExpenseDetection(_, context)
2560
+ });
2561
+ }, "de_ExpenseField");
2562
+ var de_ExpenseFieldList = /* @__PURE__ */ __name((output, context) => {
2563
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2564
+ return de_ExpenseField(entry, context);
2565
+ });
2566
+ return retVal;
2567
+ }, "de_ExpenseFieldList");
2568
+ var de_ExpenseType = /* @__PURE__ */ __name((output, context) => {
2569
+ return (0, import_smithy_client.take)(output, {
2570
+ Confidence: import_smithy_client.limitedParseFloat32,
2571
+ Text: import_smithy_client.expectString
2572
+ });
2573
+ }, "de_ExpenseType");
2574
+ var de_Extraction = /* @__PURE__ */ __name((output, context) => {
2575
+ return (0, import_smithy_client.take)(output, {
2576
+ ExpenseDocument: (_) => de_ExpenseDocument(_, context),
2577
+ IdentityDocument: (_) => de_IdentityDocument(_, context),
2578
+ LendingDocument: (_) => de_LendingDocument(_, context)
2579
+ });
2580
+ }, "de_Extraction");
2581
+ var de_ExtractionList = /* @__PURE__ */ __name((output, context) => {
2582
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2583
+ return de_Extraction(entry, context);
2584
+ });
2585
+ return retVal;
2586
+ }, "de_ExtractionList");
2587
+ var de_Geometry = /* @__PURE__ */ __name((output, context) => {
2588
+ return (0, import_smithy_client.take)(output, {
2589
+ BoundingBox: (_) => de_BoundingBox(_, context),
2590
+ Polygon: (_) => de_Polygon(_, context)
2591
+ });
2592
+ }, "de_Geometry");
2593
+ var de_GetAdapterResponse = /* @__PURE__ */ __name((output, context) => {
2594
+ return (0, import_smithy_client.take)(output, {
2595
+ AdapterId: import_smithy_client.expectString,
2596
+ AdapterName: import_smithy_client.expectString,
2597
+ AutoUpdate: import_smithy_client.expectString,
2598
+ CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2599
+ Description: import_smithy_client.expectString,
2600
+ FeatureTypes: import_smithy_client._json,
2601
+ Tags: import_smithy_client._json
2602
+ });
2603
+ }, "de_GetAdapterResponse");
2604
+ var de_GetAdapterVersionResponse = /* @__PURE__ */ __name((output, context) => {
2605
+ return (0, import_smithy_client.take)(output, {
2606
+ AdapterId: import_smithy_client.expectString,
2607
+ AdapterVersion: import_smithy_client.expectString,
2608
+ CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2609
+ DatasetConfig: import_smithy_client._json,
2610
+ EvaluationMetrics: (_) => de_AdapterVersionEvaluationMetrics(_, context),
2611
+ FeatureTypes: import_smithy_client._json,
2612
+ KMSKeyId: import_smithy_client.expectString,
2613
+ OutputConfig: import_smithy_client._json,
2614
+ Status: import_smithy_client.expectString,
2615
+ StatusMessage: import_smithy_client.expectString,
2616
+ Tags: import_smithy_client._json
2617
+ });
2618
+ }, "de_GetAdapterVersionResponse");
2619
+ var de_GetDocumentAnalysisResponse = /* @__PURE__ */ __name((output, context) => {
2620
+ return (0, import_smithy_client.take)(output, {
2621
+ AnalyzeDocumentModelVersion: import_smithy_client.expectString,
2622
+ Blocks: (_) => de_BlockList(_, context),
2623
+ DocumentMetadata: import_smithy_client._json,
2624
+ JobStatus: import_smithy_client.expectString,
2625
+ NextToken: import_smithy_client.expectString,
2626
+ StatusMessage: import_smithy_client.expectString,
2627
+ Warnings: import_smithy_client._json
2628
+ });
2629
+ }, "de_GetDocumentAnalysisResponse");
2630
+ var de_GetDocumentTextDetectionResponse = /* @__PURE__ */ __name((output, context) => {
2631
+ return (0, import_smithy_client.take)(output, {
2632
+ Blocks: (_) => de_BlockList(_, context),
2633
+ DetectDocumentTextModelVersion: import_smithy_client.expectString,
2634
+ DocumentMetadata: import_smithy_client._json,
2635
+ JobStatus: import_smithy_client.expectString,
2636
+ NextToken: import_smithy_client.expectString,
2637
+ StatusMessage: import_smithy_client.expectString,
2638
+ Warnings: import_smithy_client._json
2639
+ });
2640
+ }, "de_GetDocumentTextDetectionResponse");
2641
+ var de_GetExpenseAnalysisResponse = /* @__PURE__ */ __name((output, context) => {
2642
+ return (0, import_smithy_client.take)(output, {
2643
+ AnalyzeExpenseModelVersion: import_smithy_client.expectString,
2644
+ DocumentMetadata: import_smithy_client._json,
2645
+ ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
2646
+ JobStatus: import_smithy_client.expectString,
2647
+ NextToken: import_smithy_client.expectString,
2648
+ StatusMessage: import_smithy_client.expectString,
2649
+ Warnings: import_smithy_client._json
2650
+ });
2651
+ }, "de_GetExpenseAnalysisResponse");
2652
+ var de_GetLendingAnalysisResponse = /* @__PURE__ */ __name((output, context) => {
2653
+ return (0, import_smithy_client.take)(output, {
2654
+ AnalyzeLendingModelVersion: import_smithy_client.expectString,
2655
+ DocumentMetadata: import_smithy_client._json,
2656
+ JobStatus: import_smithy_client.expectString,
2657
+ NextToken: import_smithy_client.expectString,
2658
+ Results: (_) => de_LendingResultList(_, context),
2659
+ StatusMessage: import_smithy_client.expectString,
2660
+ Warnings: import_smithy_client._json
2661
+ });
2662
+ }, "de_GetLendingAnalysisResponse");
2663
+ var de_HumanLoopActivationOutput = /* @__PURE__ */ __name((output, context) => {
2664
+ return (0, import_smithy_client.take)(output, {
2665
+ HumanLoopActivationConditionsEvaluationResults: (_) => new import_smithy_client.LazyJsonString(_),
2666
+ HumanLoopActivationReasons: import_smithy_client._json,
2667
+ HumanLoopArn: import_smithy_client.expectString
2668
+ });
2669
+ }, "de_HumanLoopActivationOutput");
2670
+ var de_IdentityDocument = /* @__PURE__ */ __name((output, context) => {
2671
+ return (0, import_smithy_client.take)(output, {
2672
+ Blocks: (_) => de_BlockList(_, context),
2673
+ DocumentIndex: import_smithy_client.expectInt32,
2674
+ IdentityDocumentFields: (_) => de_IdentityDocumentFieldList(_, context)
2675
+ });
2676
+ }, "de_IdentityDocument");
2677
+ var de_IdentityDocumentField = /* @__PURE__ */ __name((output, context) => {
2678
+ return (0, import_smithy_client.take)(output, {
2679
+ Type: (_) => de_AnalyzeIDDetections(_, context),
2680
+ ValueDetection: (_) => de_AnalyzeIDDetections(_, context)
2681
+ });
2682
+ }, "de_IdentityDocumentField");
2683
+ var de_IdentityDocumentFieldList = /* @__PURE__ */ __name((output, context) => {
2684
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2685
+ return de_IdentityDocumentField(entry, context);
2686
+ });
2687
+ return retVal;
2688
+ }, "de_IdentityDocumentFieldList");
2689
+ var de_IdentityDocumentList = /* @__PURE__ */ __name((output, context) => {
2690
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2691
+ return de_IdentityDocument(entry, context);
2692
+ });
2693
+ return retVal;
2694
+ }, "de_IdentityDocumentList");
2695
+ var de_LendingDetection = /* @__PURE__ */ __name((output, context) => {
2696
+ return (0, import_smithy_client.take)(output, {
2697
+ Confidence: import_smithy_client.limitedParseFloat32,
2698
+ Geometry: (_) => de_Geometry(_, context),
2699
+ SelectionStatus: import_smithy_client.expectString,
2700
+ Text: import_smithy_client.expectString
2701
+ });
2702
+ }, "de_LendingDetection");
2703
+ var de_LendingDetectionList = /* @__PURE__ */ __name((output, context) => {
2704
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2705
+ return de_LendingDetection(entry, context);
2706
+ });
2707
+ return retVal;
2708
+ }, "de_LendingDetectionList");
2709
+ var de_LendingDocument = /* @__PURE__ */ __name((output, context) => {
2710
+ return (0, import_smithy_client.take)(output, {
2711
+ LendingFields: (_) => de_LendingFieldList(_, context),
2712
+ SignatureDetections: (_) => de_SignatureDetectionList(_, context)
2713
+ });
2714
+ }, "de_LendingDocument");
2715
+ var de_LendingField = /* @__PURE__ */ __name((output, context) => {
2716
+ return (0, import_smithy_client.take)(output, {
2717
+ KeyDetection: (_) => de_LendingDetection(_, context),
2718
+ Type: import_smithy_client.expectString,
2719
+ ValueDetections: (_) => de_LendingDetectionList(_, context)
2720
+ });
2721
+ }, "de_LendingField");
2722
+ var de_LendingFieldList = /* @__PURE__ */ __name((output, context) => {
2723
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2724
+ return de_LendingField(entry, context);
2725
+ });
2726
+ return retVal;
2727
+ }, "de_LendingFieldList");
2728
+ var de_LendingResult = /* @__PURE__ */ __name((output, context) => {
2729
+ return (0, import_smithy_client.take)(output, {
2730
+ Extractions: (_) => de_ExtractionList(_, context),
2731
+ Page: import_smithy_client.expectInt32,
2732
+ PageClassification: (_) => de_PageClassification(_, context)
2733
+ });
2734
+ }, "de_LendingResult");
2735
+ var de_LendingResultList = /* @__PURE__ */ __name((output, context) => {
2736
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2737
+ return de_LendingResult(entry, context);
2738
+ });
2739
+ return retVal;
2740
+ }, "de_LendingResultList");
2741
+ var de_LineItemFields = /* @__PURE__ */ __name((output, context) => {
2742
+ return (0, import_smithy_client.take)(output, {
2743
+ LineItemExpenseFields: (_) => de_ExpenseFieldList(_, context)
2744
+ });
2745
+ }, "de_LineItemFields");
2746
+ var de_LineItemGroup = /* @__PURE__ */ __name((output, context) => {
2747
+ return (0, import_smithy_client.take)(output, {
2748
+ LineItemGroupIndex: import_smithy_client.expectInt32,
2749
+ LineItems: (_) => de_LineItemList(_, context)
2750
+ });
2751
+ }, "de_LineItemGroup");
2752
+ var de_LineItemGroupList = /* @__PURE__ */ __name((output, context) => {
2753
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2754
+ return de_LineItemGroup(entry, context);
2755
+ });
2756
+ return retVal;
2757
+ }, "de_LineItemGroupList");
2758
+ var de_LineItemList = /* @__PURE__ */ __name((output, context) => {
2759
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2760
+ return de_LineItemFields(entry, context);
2761
+ });
2762
+ return retVal;
2763
+ }, "de_LineItemList");
2764
+ var de_ListAdaptersResponse = /* @__PURE__ */ __name((output, context) => {
2765
+ return (0, import_smithy_client.take)(output, {
2766
+ Adapters: (_) => de_AdapterList(_, context),
2767
+ NextToken: import_smithy_client.expectString
2768
+ });
2769
+ }, "de_ListAdaptersResponse");
2770
+ var de_ListAdapterVersionsResponse = /* @__PURE__ */ __name((output, context) => {
2771
+ return (0, import_smithy_client.take)(output, {
2772
+ AdapterVersions: (_) => de_AdapterVersionList(_, context),
2773
+ NextToken: import_smithy_client.expectString
2774
+ });
2775
+ }, "de_ListAdapterVersionsResponse");
2776
+ var de_PageClassification = /* @__PURE__ */ __name((output, context) => {
2777
+ return (0, import_smithy_client.take)(output, {
2778
+ PageNumber: (_) => de_PredictionList(_, context),
2779
+ PageType: (_) => de_PredictionList(_, context)
2780
+ });
2781
+ }, "de_PageClassification");
2782
+ var de_Point = /* @__PURE__ */ __name((output, context) => {
2783
+ return (0, import_smithy_client.take)(output, {
2784
+ X: import_smithy_client.limitedParseFloat32,
2785
+ Y: import_smithy_client.limitedParseFloat32
2786
+ });
2787
+ }, "de_Point");
2788
+ var de_Polygon = /* @__PURE__ */ __name((output, context) => {
2789
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2790
+ return de_Point(entry, context);
2791
+ });
2792
+ return retVal;
2793
+ }, "de_Polygon");
2794
+ var de_Prediction = /* @__PURE__ */ __name((output, context) => {
2795
+ return (0, import_smithy_client.take)(output, {
2796
+ Confidence: import_smithy_client.limitedParseFloat32,
2797
+ Value: import_smithy_client.expectString
2798
+ });
2799
+ }, "de_Prediction");
2800
+ var de_PredictionList = /* @__PURE__ */ __name((output, context) => {
2801
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2802
+ return de_Prediction(entry, context);
2803
+ });
2804
+ return retVal;
2805
+ }, "de_PredictionList");
2806
+ var de_SignatureDetection = /* @__PURE__ */ __name((output, context) => {
2807
+ return (0, import_smithy_client.take)(output, {
2808
+ Confidence: import_smithy_client.limitedParseFloat32,
2809
+ Geometry: (_) => de_Geometry(_, context)
2810
+ });
2811
+ }, "de_SignatureDetection");
2812
+ var de_SignatureDetectionList = /* @__PURE__ */ __name((output, context) => {
2813
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
2814
+ return de_SignatureDetection(entry, context);
2815
+ });
2816
+ return retVal;
2817
+ }, "de_SignatureDetectionList");
2818
+ var de_UpdateAdapterResponse = /* @__PURE__ */ __name((output, context) => {
2819
+ return (0, import_smithy_client.take)(output, {
2820
+ AdapterId: import_smithy_client.expectString,
2821
+ AdapterName: import_smithy_client.expectString,
2822
+ AutoUpdate: import_smithy_client.expectString,
2823
+ CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2824
+ Description: import_smithy_client.expectString,
2825
+ FeatureTypes: import_smithy_client._json
2826
+ });
2827
+ }, "de_UpdateAdapterResponse");
2828
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
2829
+ httpStatusCode: output.statusCode,
2830
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2831
+ extendedRequestId: output.headers["x-amz-id-2"],
2832
+ cfId: output.headers["x-amz-cf-id"]
2833
+ }), "deserializeMetadata");
2834
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
2835
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(TextractServiceException);
2836
+ var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
2837
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2838
+ const contents = {
2839
+ protocol,
2840
+ hostname,
2841
+ port,
2842
+ method: "POST",
2843
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2844
+ headers
2845
+ };
2846
+ if (resolvedHostname !== void 0) {
2847
+ contents.hostname = resolvedHostname;
2848
+ }
2849
+ if (body !== void 0) {
2850
+ contents.body = body;
2851
+ }
2852
+ return new import_protocol_http.HttpRequest(contents);
2853
+ }, "buildHttpRpcRequest");
2854
+ function sharedHeaders(operation) {
2855
+ return {
2856
+ "content-type": "application/x-amz-json-1.1",
2857
+ "x-amz-target": `Textract.${operation}`
2858
+ };
2859
+ }
2860
+ __name(sharedHeaders, "sharedHeaders");
2861
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2862
+ if (encoded.length) {
2863
+ return JSON.parse(encoded);
2864
+ }
2865
+ return {};
2866
+ }), "parseBody");
2867
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
2868
+ const value = await parseBody(errorBody, context);
2869
+ value.message = value.message ?? value.Message;
2870
+ return value;
2871
+ }, "parseErrorBody");
2872
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
2873
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
2874
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
2875
+ let cleanValue = rawValue;
2876
+ if (typeof cleanValue === "number") {
2877
+ cleanValue = cleanValue.toString();
2878
+ }
2879
+ if (cleanValue.indexOf(",") >= 0) {
2880
+ cleanValue = cleanValue.split(",")[0];
2881
+ }
2882
+ if (cleanValue.indexOf(":") >= 0) {
2883
+ cleanValue = cleanValue.split(":")[0];
2884
+ }
2885
+ if (cleanValue.indexOf("#") >= 0) {
2886
+ cleanValue = cleanValue.split("#")[1];
2887
+ }
2888
+ return cleanValue;
2889
+ }, "sanitizeErrorCode");
2890
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2891
+ if (headerKey !== void 0) {
2892
+ return sanitizeErrorCode(output.headers[headerKey]);
2893
+ }
2894
+ if (data.code !== void 0) {
2895
+ return sanitizeErrorCode(data.code);
2896
+ }
2897
+ if (data["__type"] !== void 0) {
2898
+ return sanitizeErrorCode(data["__type"]);
2899
+ }
2900
+ }, "loadRestJsonErrorCode");
2901
+
2902
+ // src/commands/AnalyzeDocumentCommand.ts
2903
+ var _AnalyzeDocumentCommand = class _AnalyzeDocumentCommand extends import_smithy_client.Command.classBuilder().ep({
2904
+ ...commonParams
2905
+ }).m(function(Command, cs, config, o) {
2906
+ return [
2907
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2908
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2909
+ ];
2910
+ }).s("Textract", "AnalyzeDocument", {}).n("TextractClient", "AnalyzeDocumentCommand").f(void 0, void 0).ser(se_AnalyzeDocumentCommand).de(de_AnalyzeDocumentCommand).build() {
2911
+ };
2912
+ __name(_AnalyzeDocumentCommand, "AnalyzeDocumentCommand");
2913
+ var AnalyzeDocumentCommand = _AnalyzeDocumentCommand;
2914
+
2915
+ // src/commands/AnalyzeExpenseCommand.ts
2916
+
2917
+
2918
+
2919
+
2920
+ var _AnalyzeExpenseCommand = class _AnalyzeExpenseCommand extends import_smithy_client.Command.classBuilder().ep({
2921
+ ...commonParams
2922
+ }).m(function(Command, cs, config, o) {
2923
+ return [
2924
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2925
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2926
+ ];
2927
+ }).s("Textract", "AnalyzeExpense", {}).n("TextractClient", "AnalyzeExpenseCommand").f(void 0, void 0).ser(se_AnalyzeExpenseCommand).de(de_AnalyzeExpenseCommand).build() {
2928
+ };
2929
+ __name(_AnalyzeExpenseCommand, "AnalyzeExpenseCommand");
2930
+ var AnalyzeExpenseCommand = _AnalyzeExpenseCommand;
2931
+
2932
+ // src/commands/AnalyzeIDCommand.ts
2933
+
2934
+
2935
+
2936
+
2937
+ var _AnalyzeIDCommand = class _AnalyzeIDCommand extends import_smithy_client.Command.classBuilder().ep({
2938
+ ...commonParams
2939
+ }).m(function(Command, cs, config, o) {
2940
+ return [
2941
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2942
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2943
+ ];
2944
+ }).s("Textract", "AnalyzeID", {}).n("TextractClient", "AnalyzeIDCommand").f(void 0, void 0).ser(se_AnalyzeIDCommand).de(de_AnalyzeIDCommand).build() {
2945
+ };
2946
+ __name(_AnalyzeIDCommand, "AnalyzeIDCommand");
2947
+ var AnalyzeIDCommand = _AnalyzeIDCommand;
2948
+
2949
+ // src/commands/CreateAdapterCommand.ts
2950
+
2951
+
2952
+
2953
+
2954
+ var _CreateAdapterCommand = class _CreateAdapterCommand extends import_smithy_client.Command.classBuilder().ep({
2955
+ ...commonParams
2956
+ }).m(function(Command, cs, config, o) {
2957
+ return [
2958
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2959
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2960
+ ];
2961
+ }).s("Textract", "CreateAdapter", {}).n("TextractClient", "CreateAdapterCommand").f(void 0, void 0).ser(se_CreateAdapterCommand).de(de_CreateAdapterCommand).build() {
2962
+ };
2963
+ __name(_CreateAdapterCommand, "CreateAdapterCommand");
2964
+ var CreateAdapterCommand = _CreateAdapterCommand;
2965
+
2966
+ // src/commands/CreateAdapterVersionCommand.ts
2967
+
2968
+
2969
+
2970
+
2971
+ var _CreateAdapterVersionCommand = class _CreateAdapterVersionCommand extends import_smithy_client.Command.classBuilder().ep({
2972
+ ...commonParams
2973
+ }).m(function(Command, cs, config, o) {
2974
+ return [
2975
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2976
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2977
+ ];
2978
+ }).s("Textract", "CreateAdapterVersion", {}).n("TextractClient", "CreateAdapterVersionCommand").f(void 0, void 0).ser(se_CreateAdapterVersionCommand).de(de_CreateAdapterVersionCommand).build() {
2979
+ };
2980
+ __name(_CreateAdapterVersionCommand, "CreateAdapterVersionCommand");
2981
+ var CreateAdapterVersionCommand = _CreateAdapterVersionCommand;
2982
+
2983
+ // src/commands/DeleteAdapterCommand.ts
2984
+
2985
+
2986
+
2987
+
2988
+ var _DeleteAdapterCommand = class _DeleteAdapterCommand extends import_smithy_client.Command.classBuilder().ep({
2989
+ ...commonParams
2990
+ }).m(function(Command, cs, config, o) {
2991
+ return [
2992
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
2993
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
2994
+ ];
2995
+ }).s("Textract", "DeleteAdapter", {}).n("TextractClient", "DeleteAdapterCommand").f(void 0, void 0).ser(se_DeleteAdapterCommand).de(de_DeleteAdapterCommand).build() {
2996
+ };
2997
+ __name(_DeleteAdapterCommand, "DeleteAdapterCommand");
2998
+ var DeleteAdapterCommand = _DeleteAdapterCommand;
2999
+
3000
+ // src/commands/DeleteAdapterVersionCommand.ts
3001
+
3002
+
3003
+
3004
+
3005
+ var _DeleteAdapterVersionCommand = class _DeleteAdapterVersionCommand extends import_smithy_client.Command.classBuilder().ep({
3006
+ ...commonParams
3007
+ }).m(function(Command, cs, config, o) {
3008
+ return [
3009
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3010
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3011
+ ];
3012
+ }).s("Textract", "DeleteAdapterVersion", {}).n("TextractClient", "DeleteAdapterVersionCommand").f(void 0, void 0).ser(se_DeleteAdapterVersionCommand).de(de_DeleteAdapterVersionCommand).build() {
3013
+ };
3014
+ __name(_DeleteAdapterVersionCommand, "DeleteAdapterVersionCommand");
3015
+ var DeleteAdapterVersionCommand = _DeleteAdapterVersionCommand;
3016
+
3017
+ // src/commands/DetectDocumentTextCommand.ts
3018
+
3019
+
3020
+
3021
+
3022
+ var _DetectDocumentTextCommand = class _DetectDocumentTextCommand extends import_smithy_client.Command.classBuilder().ep({
3023
+ ...commonParams
3024
+ }).m(function(Command, cs, config, o) {
3025
+ return [
3026
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3027
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3028
+ ];
3029
+ }).s("Textract", "DetectDocumentText", {}).n("TextractClient", "DetectDocumentTextCommand").f(void 0, void 0).ser(se_DetectDocumentTextCommand).de(de_DetectDocumentTextCommand).build() {
3030
+ };
3031
+ __name(_DetectDocumentTextCommand, "DetectDocumentTextCommand");
3032
+ var DetectDocumentTextCommand = _DetectDocumentTextCommand;
3033
+
3034
+ // src/commands/GetAdapterCommand.ts
3035
+
3036
+
3037
+
3038
+
3039
+ var _GetAdapterCommand = class _GetAdapterCommand extends import_smithy_client.Command.classBuilder().ep({
3040
+ ...commonParams
3041
+ }).m(function(Command, cs, config, o) {
3042
+ return [
3043
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3044
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3045
+ ];
3046
+ }).s("Textract", "GetAdapter", {}).n("TextractClient", "GetAdapterCommand").f(void 0, void 0).ser(se_GetAdapterCommand).de(de_GetAdapterCommand).build() {
3047
+ };
3048
+ __name(_GetAdapterCommand, "GetAdapterCommand");
3049
+ var GetAdapterCommand = _GetAdapterCommand;
3050
+
3051
+ // src/commands/GetAdapterVersionCommand.ts
3052
+
3053
+
3054
+
3055
+
3056
+ var _GetAdapterVersionCommand = class _GetAdapterVersionCommand extends import_smithy_client.Command.classBuilder().ep({
3057
+ ...commonParams
3058
+ }).m(function(Command, cs, config, o) {
3059
+ return [
3060
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3061
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3062
+ ];
3063
+ }).s("Textract", "GetAdapterVersion", {}).n("TextractClient", "GetAdapterVersionCommand").f(void 0, void 0).ser(se_GetAdapterVersionCommand).de(de_GetAdapterVersionCommand).build() {
3064
+ };
3065
+ __name(_GetAdapterVersionCommand, "GetAdapterVersionCommand");
3066
+ var GetAdapterVersionCommand = _GetAdapterVersionCommand;
3067
+
3068
+ // src/commands/GetDocumentAnalysisCommand.ts
3069
+
3070
+
3071
+
3072
+
3073
+ var _GetDocumentAnalysisCommand = class _GetDocumentAnalysisCommand extends import_smithy_client.Command.classBuilder().ep({
3074
+ ...commonParams
3075
+ }).m(function(Command, cs, config, o) {
3076
+ return [
3077
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3078
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3079
+ ];
3080
+ }).s("Textract", "GetDocumentAnalysis", {}).n("TextractClient", "GetDocumentAnalysisCommand").f(void 0, void 0).ser(se_GetDocumentAnalysisCommand).de(de_GetDocumentAnalysisCommand).build() {
3081
+ };
3082
+ __name(_GetDocumentAnalysisCommand, "GetDocumentAnalysisCommand");
3083
+ var GetDocumentAnalysisCommand = _GetDocumentAnalysisCommand;
3084
+
3085
+ // src/commands/GetDocumentTextDetectionCommand.ts
3086
+
3087
+
3088
+
3089
+
3090
+ var _GetDocumentTextDetectionCommand = class _GetDocumentTextDetectionCommand extends import_smithy_client.Command.classBuilder().ep({
3091
+ ...commonParams
3092
+ }).m(function(Command, cs, config, o) {
3093
+ return [
3094
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3095
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3096
+ ];
3097
+ }).s("Textract", "GetDocumentTextDetection", {}).n("TextractClient", "GetDocumentTextDetectionCommand").f(void 0, void 0).ser(se_GetDocumentTextDetectionCommand).de(de_GetDocumentTextDetectionCommand).build() {
3098
+ };
3099
+ __name(_GetDocumentTextDetectionCommand, "GetDocumentTextDetectionCommand");
3100
+ var GetDocumentTextDetectionCommand = _GetDocumentTextDetectionCommand;
3101
+
3102
+ // src/commands/GetExpenseAnalysisCommand.ts
3103
+
3104
+
3105
+
3106
+
3107
+ var _GetExpenseAnalysisCommand = class _GetExpenseAnalysisCommand extends import_smithy_client.Command.classBuilder().ep({
3108
+ ...commonParams
3109
+ }).m(function(Command, cs, config, o) {
3110
+ return [
3111
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3112
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3113
+ ];
3114
+ }).s("Textract", "GetExpenseAnalysis", {}).n("TextractClient", "GetExpenseAnalysisCommand").f(void 0, void 0).ser(se_GetExpenseAnalysisCommand).de(de_GetExpenseAnalysisCommand).build() {
3115
+ };
3116
+ __name(_GetExpenseAnalysisCommand, "GetExpenseAnalysisCommand");
3117
+ var GetExpenseAnalysisCommand = _GetExpenseAnalysisCommand;
3118
+
3119
+ // src/commands/GetLendingAnalysisCommand.ts
3120
+
3121
+
3122
+
3123
+
3124
+ var _GetLendingAnalysisCommand = class _GetLendingAnalysisCommand extends import_smithy_client.Command.classBuilder().ep({
3125
+ ...commonParams
3126
+ }).m(function(Command, cs, config, o) {
3127
+ return [
3128
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3129
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3130
+ ];
3131
+ }).s("Textract", "GetLendingAnalysis", {}).n("TextractClient", "GetLendingAnalysisCommand").f(void 0, void 0).ser(se_GetLendingAnalysisCommand).de(de_GetLendingAnalysisCommand).build() {
3132
+ };
3133
+ __name(_GetLendingAnalysisCommand, "GetLendingAnalysisCommand");
3134
+ var GetLendingAnalysisCommand = _GetLendingAnalysisCommand;
3135
+
3136
+ // src/commands/GetLendingAnalysisSummaryCommand.ts
3137
+
3138
+
3139
+
3140
+
3141
+ var _GetLendingAnalysisSummaryCommand = class _GetLendingAnalysisSummaryCommand extends import_smithy_client.Command.classBuilder().ep({
3142
+ ...commonParams
3143
+ }).m(function(Command, cs, config, o) {
3144
+ return [
3145
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3146
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3147
+ ];
3148
+ }).s("Textract", "GetLendingAnalysisSummary", {}).n("TextractClient", "GetLendingAnalysisSummaryCommand").f(void 0, void 0).ser(se_GetLendingAnalysisSummaryCommand).de(de_GetLendingAnalysisSummaryCommand).build() {
3149
+ };
3150
+ __name(_GetLendingAnalysisSummaryCommand, "GetLendingAnalysisSummaryCommand");
3151
+ var GetLendingAnalysisSummaryCommand = _GetLendingAnalysisSummaryCommand;
3152
+
3153
+ // src/commands/ListAdaptersCommand.ts
3154
+
3155
+
3156
+
3157
+
3158
+ var _ListAdaptersCommand = class _ListAdaptersCommand extends import_smithy_client.Command.classBuilder().ep({
3159
+ ...commonParams
3160
+ }).m(function(Command, cs, config, o) {
3161
+ return [
3162
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3163
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3164
+ ];
3165
+ }).s("Textract", "ListAdapters", {}).n("TextractClient", "ListAdaptersCommand").f(void 0, void 0).ser(se_ListAdaptersCommand).de(de_ListAdaptersCommand).build() {
3166
+ };
3167
+ __name(_ListAdaptersCommand, "ListAdaptersCommand");
3168
+ var ListAdaptersCommand = _ListAdaptersCommand;
3169
+
3170
+ // src/commands/ListAdapterVersionsCommand.ts
3171
+
3172
+
3173
+
3174
+
3175
+ var _ListAdapterVersionsCommand = class _ListAdapterVersionsCommand extends import_smithy_client.Command.classBuilder().ep({
3176
+ ...commonParams
3177
+ }).m(function(Command, cs, config, o) {
3178
+ return [
3179
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3180
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3181
+ ];
3182
+ }).s("Textract", "ListAdapterVersions", {}).n("TextractClient", "ListAdapterVersionsCommand").f(void 0, void 0).ser(se_ListAdapterVersionsCommand).de(de_ListAdapterVersionsCommand).build() {
3183
+ };
3184
+ __name(_ListAdapterVersionsCommand, "ListAdapterVersionsCommand");
3185
+ var ListAdapterVersionsCommand = _ListAdapterVersionsCommand;
3186
+
3187
+ // src/commands/ListTagsForResourceCommand.ts
3188
+
3189
+
3190
+
3191
+
3192
+ var _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends import_smithy_client.Command.classBuilder().ep({
3193
+ ...commonParams
3194
+ }).m(function(Command, cs, config, o) {
3195
+ return [
3196
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3197
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3198
+ ];
3199
+ }).s("Textract", "ListTagsForResource", {}).n("TextractClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
3200
+ };
3201
+ __name(_ListTagsForResourceCommand, "ListTagsForResourceCommand");
3202
+ var ListTagsForResourceCommand = _ListTagsForResourceCommand;
3203
+
3204
+ // src/commands/StartDocumentAnalysisCommand.ts
3205
+
3206
+
3207
+
3208
+
3209
+ var _StartDocumentAnalysisCommand = class _StartDocumentAnalysisCommand extends import_smithy_client.Command.classBuilder().ep({
3210
+ ...commonParams
3211
+ }).m(function(Command, cs, config, o) {
3212
+ return [
3213
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3214
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3215
+ ];
3216
+ }).s("Textract", "StartDocumentAnalysis", {}).n("TextractClient", "StartDocumentAnalysisCommand").f(void 0, void 0).ser(se_StartDocumentAnalysisCommand).de(de_StartDocumentAnalysisCommand).build() {
3217
+ };
3218
+ __name(_StartDocumentAnalysisCommand, "StartDocumentAnalysisCommand");
3219
+ var StartDocumentAnalysisCommand = _StartDocumentAnalysisCommand;
3220
+
3221
+ // src/commands/StartDocumentTextDetectionCommand.ts
3222
+
3223
+
3224
+
3225
+
3226
+ var _StartDocumentTextDetectionCommand = class _StartDocumentTextDetectionCommand extends import_smithy_client.Command.classBuilder().ep({
3227
+ ...commonParams
3228
+ }).m(function(Command, cs, config, o) {
3229
+ return [
3230
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3231
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3232
+ ];
3233
+ }).s("Textract", "StartDocumentTextDetection", {}).n("TextractClient", "StartDocumentTextDetectionCommand").f(void 0, void 0).ser(se_StartDocumentTextDetectionCommand).de(de_StartDocumentTextDetectionCommand).build() {
3234
+ };
3235
+ __name(_StartDocumentTextDetectionCommand, "StartDocumentTextDetectionCommand");
3236
+ var StartDocumentTextDetectionCommand = _StartDocumentTextDetectionCommand;
3237
+
3238
+ // src/commands/StartExpenseAnalysisCommand.ts
3239
+
3240
+
3241
+
3242
+
3243
+ var _StartExpenseAnalysisCommand = class _StartExpenseAnalysisCommand extends import_smithy_client.Command.classBuilder().ep({
3244
+ ...commonParams
3245
+ }).m(function(Command, cs, config, o) {
3246
+ return [
3247
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3248
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3249
+ ];
3250
+ }).s("Textract", "StartExpenseAnalysis", {}).n("TextractClient", "StartExpenseAnalysisCommand").f(void 0, void 0).ser(se_StartExpenseAnalysisCommand).de(de_StartExpenseAnalysisCommand).build() {
3251
+ };
3252
+ __name(_StartExpenseAnalysisCommand, "StartExpenseAnalysisCommand");
3253
+ var StartExpenseAnalysisCommand = _StartExpenseAnalysisCommand;
3254
+
3255
+ // src/commands/StartLendingAnalysisCommand.ts
3256
+
3257
+
3258
+
3259
+
3260
+ var _StartLendingAnalysisCommand = class _StartLendingAnalysisCommand extends import_smithy_client.Command.classBuilder().ep({
3261
+ ...commonParams
3262
+ }).m(function(Command, cs, config, o) {
3263
+ return [
3264
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3265
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3266
+ ];
3267
+ }).s("Textract", "StartLendingAnalysis", {}).n("TextractClient", "StartLendingAnalysisCommand").f(void 0, void 0).ser(se_StartLendingAnalysisCommand).de(de_StartLendingAnalysisCommand).build() {
3268
+ };
3269
+ __name(_StartLendingAnalysisCommand, "StartLendingAnalysisCommand");
3270
+ var StartLendingAnalysisCommand = _StartLendingAnalysisCommand;
3271
+
3272
+ // src/commands/TagResourceCommand.ts
3273
+
3274
+
3275
+
3276
+
3277
+ var _TagResourceCommand = class _TagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
3278
+ ...commonParams
3279
+ }).m(function(Command, cs, config, o) {
3280
+ return [
3281
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3282
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3283
+ ];
3284
+ }).s("Textract", "TagResource", {}).n("TextractClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
3285
+ };
3286
+ __name(_TagResourceCommand, "TagResourceCommand");
3287
+ var TagResourceCommand = _TagResourceCommand;
3288
+
3289
+ // src/commands/UntagResourceCommand.ts
3290
+
3291
+
3292
+
3293
+
3294
+ var _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client.Command.classBuilder().ep({
3295
+ ...commonParams
3296
+ }).m(function(Command, cs, config, o) {
3297
+ return [
3298
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3299
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3300
+ ];
3301
+ }).s("Textract", "UntagResource", {}).n("TextractClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
3302
+ };
3303
+ __name(_UntagResourceCommand, "UntagResourceCommand");
3304
+ var UntagResourceCommand = _UntagResourceCommand;
3305
+
3306
+ // src/commands/UpdateAdapterCommand.ts
3307
+
3308
+
3309
+
3310
+
3311
+ var _UpdateAdapterCommand = class _UpdateAdapterCommand extends import_smithy_client.Command.classBuilder().ep({
3312
+ ...commonParams
3313
+ }).m(function(Command, cs, config, o) {
3314
+ return [
3315
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3316
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3317
+ ];
3318
+ }).s("Textract", "UpdateAdapter", {}).n("TextractClient", "UpdateAdapterCommand").f(void 0, void 0).ser(se_UpdateAdapterCommand).de(de_UpdateAdapterCommand).build() {
3319
+ };
3320
+ __name(_UpdateAdapterCommand, "UpdateAdapterCommand");
3321
+ var UpdateAdapterCommand = _UpdateAdapterCommand;
3322
+
3323
+ // src/Textract.ts
3324
+ var commands = {
3325
+ AnalyzeDocumentCommand,
3326
+ AnalyzeExpenseCommand,
3327
+ AnalyzeIDCommand,
3328
+ CreateAdapterCommand,
3329
+ CreateAdapterVersionCommand,
3330
+ DeleteAdapterCommand,
3331
+ DeleteAdapterVersionCommand,
3332
+ DetectDocumentTextCommand,
3333
+ GetAdapterCommand,
3334
+ GetAdapterVersionCommand,
3335
+ GetDocumentAnalysisCommand,
3336
+ GetDocumentTextDetectionCommand,
3337
+ GetExpenseAnalysisCommand,
3338
+ GetLendingAnalysisCommand,
3339
+ GetLendingAnalysisSummaryCommand,
3340
+ ListAdaptersCommand,
3341
+ ListAdapterVersionsCommand,
3342
+ ListTagsForResourceCommand,
3343
+ StartDocumentAnalysisCommand,
3344
+ StartDocumentTextDetectionCommand,
3345
+ StartExpenseAnalysisCommand,
3346
+ StartLendingAnalysisCommand,
3347
+ TagResourceCommand,
3348
+ UntagResourceCommand,
3349
+ UpdateAdapterCommand
3350
+ };
3351
+ var _Textract = class _Textract extends TextractClient {
3352
+ };
3353
+ __name(_Textract, "Textract");
3354
+ var Textract = _Textract;
3355
+ (0, import_smithy_client.createAggregatedClient)(commands, Textract);
3356
+
3357
+ // src/pagination/ListAdapterVersionsPaginator.ts
3358
+ var import_core = require("@smithy/core");
3359
+ var paginateListAdapterVersions = (0, import_core.createPaginator)(TextractClient, ListAdapterVersionsCommand, "NextToken", "NextToken", "MaxResults");
3360
+
3361
+ // src/pagination/ListAdaptersPaginator.ts
3362
+
3363
+ var paginateListAdapters = (0, import_core.createPaginator)(TextractClient, ListAdaptersCommand, "NextToken", "NextToken", "MaxResults");
3364
+
3365
+ // src/index.ts
3366
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
3367
+ // Annotate the CommonJS export names for ESM import in node:
3368
+
3369
+ 0 && (module.exports = {
3370
+ AccessDeniedException,
3371
+ AdapterVersionStatus,
3372
+ AnalyzeDocumentCommand,
3373
+ AnalyzeExpenseCommand,
3374
+ AnalyzeIDCommand,
3375
+ AutoUpdate,
3376
+ BadDocumentException,
3377
+ BlockType,
3378
+ ConflictException,
3379
+ ContentClassifier,
3380
+ CreateAdapterCommand,
3381
+ CreateAdapterVersionCommand,
3382
+ DeleteAdapterCommand,
3383
+ DeleteAdapterVersionCommand,
3384
+ DetectDocumentTextCommand,
3385
+ DocumentTooLargeException,
3386
+ EntityType,
3387
+ FeatureType,
3388
+ GetAdapterCommand,
3389
+ GetAdapterVersionCommand,
3390
+ GetDocumentAnalysisCommand,
3391
+ GetDocumentTextDetectionCommand,
3392
+ GetExpenseAnalysisCommand,
3393
+ GetLendingAnalysisCommand,
3394
+ GetLendingAnalysisSummaryCommand,
3395
+ HumanLoopQuotaExceededException,
3396
+ IdempotentParameterMismatchException,
3397
+ InternalServerError,
3398
+ InvalidJobIdException,
3399
+ InvalidKMSKeyException,
3400
+ InvalidParameterException,
3401
+ InvalidS3ObjectException,
3402
+ JobStatus,
3403
+ LimitExceededException,
3404
+ ListAdapterVersionsCommand,
3405
+ ListAdaptersCommand,
3406
+ ListTagsForResourceCommand,
3407
+ ProvisionedThroughputExceededException,
3408
+ RelationshipType,
3409
+ ResourceNotFoundException,
3410
+ SelectionStatus,
3411
+ ServiceQuotaExceededException,
3412
+ StartDocumentAnalysisCommand,
3413
+ StartDocumentTextDetectionCommand,
3414
+ StartExpenseAnalysisCommand,
3415
+ StartLendingAnalysisCommand,
3416
+ TagResourceCommand,
3417
+ TextType,
3418
+ Textract,
3419
+ TextractClient,
3420
+ TextractServiceException,
3421
+ ThrottlingException,
3422
+ UnsupportedDocumentException,
3423
+ UntagResourceCommand,
3424
+ UpdateAdapterCommand,
3425
+ ValidationException,
3426
+ ValueType,
3427
+ __Client,
3428
+ paginateListAdapterVersions,
3429
+ paginateListAdapters
3430
+ });
3431
+