@aws-sdk/client-textract 3.427.0 → 3.428.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -7
- package/dist-cjs/Textract.js +24 -0
- package/dist-cjs/commands/CreateAdapterCommand.js +51 -0
- package/dist-cjs/commands/CreateAdapterVersionCommand.js +51 -0
- package/dist-cjs/commands/DeleteAdapterCommand.js +51 -0
- package/dist-cjs/commands/DeleteAdapterVersionCommand.js +51 -0
- package/dist-cjs/commands/GetAdapterCommand.js +51 -0
- package/dist-cjs/commands/GetAdapterVersionCommand.js +51 -0
- package/dist-cjs/commands/ListAdapterVersionsCommand.js +51 -0
- package/dist-cjs/commands/ListAdaptersCommand.js +51 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +51 -0
- package/dist-cjs/commands/TagResourceCommand.js +51 -0
- package/dist-cjs/commands/UntagResourceCommand.js +51 -0
- package/dist-cjs/commands/UpdateAdapterCommand.js +51 -0
- package/dist-cjs/commands/index.js +12 -0
- package/dist-cjs/index.js +1 -0
- package/dist-cjs/models/models_0.js +92 -21
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListAdapterVersionsPaginator.js +29 -0
- package/dist-cjs/pagination/ListAdaptersPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_json1_1.js +951 -40
- package/dist-es/Textract.js +24 -0
- package/dist-es/commands/CreateAdapterCommand.js +47 -0
- package/dist-es/commands/CreateAdapterVersionCommand.js +47 -0
- package/dist-es/commands/DeleteAdapterCommand.js +47 -0
- package/dist-es/commands/DeleteAdapterVersionCommand.js +47 -0
- package/dist-es/commands/GetAdapterCommand.js +47 -0
- package/dist-es/commands/GetAdapterVersionCommand.js +47 -0
- package/dist-es/commands/ListAdapterVersionsCommand.js +47 -0
- package/dist-es/commands/ListAdaptersCommand.js +47 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +47 -0
- package/dist-es/commands/TagResourceCommand.js +47 -0
- package/dist-es/commands/UntagResourceCommand.js +47 -0
- package/dist-es/commands/UpdateAdapterCommand.js +47 -0
- package/dist-es/commands/index.js +12 -0
- package/dist-es/index.js +1 -0
- package/dist-es/models/models_0.js +84 -17
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAdapterVersionsPaginator.js +25 -0
- package/dist-es/pagination/ListAdaptersPaginator.js +25 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_json1_1.js +927 -40
- package/dist-types/Textract.d.ts +84 -0
- package/dist-types/TextractClient.d.ts +14 -2
- package/dist-types/commands/AnalyzeDocumentCommand.d.ts +11 -0
- package/dist-types/commands/CreateAdapterCommand.d.ts +128 -0
- package/dist-types/commands/CreateAdapterVersionCommand.d.ts +148 -0
- package/dist-types/commands/DeleteAdapterCommand.d.ts +101 -0
- package/dist-types/commands/DeleteAdapterVersionCommand.d.ts +103 -0
- package/dist-types/commands/GetAdapterCommand.d.ts +111 -0
- package/dist-types/commands/GetAdapterVersionCommand.d.ts +140 -0
- package/dist-types/commands/ListAdapterVersionsCommand.d.ts +116 -0
- package/dist-types/commands/ListAdaptersCommand.d.ts +110 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +102 -0
- package/dist-types/commands/StartDocumentAnalysisCommand.d.ts +11 -0
- package/dist-types/commands/TagResourceCommand.d.ts +104 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +101 -0
- package/dist-types/commands/UpdateAdapterCommand.d.ts +114 -0
- package/dist-types/commands/index.d.ts +12 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +986 -171
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListAdapterVersionsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListAdaptersPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +108 -0
- package/dist-types/ts3.4/Textract.d.ts +204 -0
- package/dist-types/ts3.4/TextractClient.d.ts +74 -2
- package/dist-types/ts3.4/commands/CreateAdapterCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateAdapterVersionCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeleteAdapterCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteAdapterVersionCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetAdapterCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetAdapterVersionCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListAdapterVersionsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListAdaptersCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateAdapterCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +12 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +237 -40
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListAdapterVersionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListAdaptersPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +144 -0
- package/package.json +34 -32
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
|
-
import {
|
|
2
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
|
+
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
|
+
import { AccessDeniedException, BadDocumentException, ConflictException, DocumentTooLargeException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, InternalServerError, InvalidJobIdException, InvalidKMSKeyException, InvalidParameterException, InvalidS3ObjectException, LimitExceededException, ProvisionedThroughputExceededException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UnsupportedDocumentException, ValidationException, } from "../models/models_0";
|
|
4
5
|
import { TextractServiceException as __BaseException } from "../models/TextractServiceException";
|
|
5
6
|
export const se_AnalyzeDocumentCommand = async (input, context) => {
|
|
6
7
|
const headers = sharedHeaders("AnalyzeDocument");
|
|
@@ -20,12 +21,48 @@ export const se_AnalyzeIDCommand = async (input, context) => {
|
|
|
20
21
|
body = JSON.stringify(se_AnalyzeIDRequest(input, context));
|
|
21
22
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
23
|
};
|
|
24
|
+
export const se_CreateAdapterCommand = async (input, context) => {
|
|
25
|
+
const headers = sharedHeaders("CreateAdapter");
|
|
26
|
+
let body;
|
|
27
|
+
body = JSON.stringify(se_CreateAdapterRequest(input, context));
|
|
28
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
+
};
|
|
30
|
+
export const se_CreateAdapterVersionCommand = async (input, context) => {
|
|
31
|
+
const headers = sharedHeaders("CreateAdapterVersion");
|
|
32
|
+
let body;
|
|
33
|
+
body = JSON.stringify(se_CreateAdapterVersionRequest(input, context));
|
|
34
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
+
};
|
|
36
|
+
export const se_DeleteAdapterCommand = async (input, context) => {
|
|
37
|
+
const headers = sharedHeaders("DeleteAdapter");
|
|
38
|
+
let body;
|
|
39
|
+
body = JSON.stringify(_json(input));
|
|
40
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
+
};
|
|
42
|
+
export const se_DeleteAdapterVersionCommand = async (input, context) => {
|
|
43
|
+
const headers = sharedHeaders("DeleteAdapterVersion");
|
|
44
|
+
let body;
|
|
45
|
+
body = JSON.stringify(_json(input));
|
|
46
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
47
|
+
};
|
|
23
48
|
export const se_DetectDocumentTextCommand = async (input, context) => {
|
|
24
49
|
const headers = sharedHeaders("DetectDocumentText");
|
|
25
50
|
let body;
|
|
26
51
|
body = JSON.stringify(se_DetectDocumentTextRequest(input, context));
|
|
27
52
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
28
53
|
};
|
|
54
|
+
export const se_GetAdapterCommand = async (input, context) => {
|
|
55
|
+
const headers = sharedHeaders("GetAdapter");
|
|
56
|
+
let body;
|
|
57
|
+
body = JSON.stringify(_json(input));
|
|
58
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
59
|
+
};
|
|
60
|
+
export const se_GetAdapterVersionCommand = async (input, context) => {
|
|
61
|
+
const headers = sharedHeaders("GetAdapterVersion");
|
|
62
|
+
let body;
|
|
63
|
+
body = JSON.stringify(_json(input));
|
|
64
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
65
|
+
};
|
|
29
66
|
export const se_GetDocumentAnalysisCommand = async (input, context) => {
|
|
30
67
|
const headers = sharedHeaders("GetDocumentAnalysis");
|
|
31
68
|
let body;
|
|
@@ -56,6 +93,24 @@ export const se_GetLendingAnalysisSummaryCommand = async (input, context) => {
|
|
|
56
93
|
body = JSON.stringify(_json(input));
|
|
57
94
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
95
|
};
|
|
96
|
+
export const se_ListAdaptersCommand = async (input, context) => {
|
|
97
|
+
const headers = sharedHeaders("ListAdapters");
|
|
98
|
+
let body;
|
|
99
|
+
body = JSON.stringify(se_ListAdaptersRequest(input, context));
|
|
100
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
101
|
+
};
|
|
102
|
+
export const se_ListAdapterVersionsCommand = async (input, context) => {
|
|
103
|
+
const headers = sharedHeaders("ListAdapterVersions");
|
|
104
|
+
let body;
|
|
105
|
+
body = JSON.stringify(se_ListAdapterVersionsRequest(input, context));
|
|
106
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
107
|
+
};
|
|
108
|
+
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
109
|
+
const headers = sharedHeaders("ListTagsForResource");
|
|
110
|
+
let body;
|
|
111
|
+
body = JSON.stringify(_json(input));
|
|
112
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
113
|
+
};
|
|
59
114
|
export const se_StartDocumentAnalysisCommand = async (input, context) => {
|
|
60
115
|
const headers = sharedHeaders("StartDocumentAnalysis");
|
|
61
116
|
let body;
|
|
@@ -80,6 +135,24 @@ export const se_StartLendingAnalysisCommand = async (input, context) => {
|
|
|
80
135
|
body = JSON.stringify(_json(input));
|
|
81
136
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
82
137
|
};
|
|
138
|
+
export const se_TagResourceCommand = async (input, context) => {
|
|
139
|
+
const headers = sharedHeaders("TagResource");
|
|
140
|
+
let body;
|
|
141
|
+
body = JSON.stringify(_json(input));
|
|
142
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
143
|
+
};
|
|
144
|
+
export const se_UntagResourceCommand = async (input, context) => {
|
|
145
|
+
const headers = sharedHeaders("UntagResource");
|
|
146
|
+
let body;
|
|
147
|
+
body = JSON.stringify(_json(input));
|
|
148
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
149
|
+
};
|
|
150
|
+
export const se_UpdateAdapterCommand = async (input, context) => {
|
|
151
|
+
const headers = sharedHeaders("UpdateAdapter");
|
|
152
|
+
let body;
|
|
153
|
+
body = JSON.stringify(_json(input));
|
|
154
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
155
|
+
};
|
|
83
156
|
export const de_AnalyzeDocumentCommand = async (output, context) => {
|
|
84
157
|
if (output.statusCode >= 300) {
|
|
85
158
|
return de_AnalyzeDocumentCommandError(output, context);
|
|
@@ -251,6 +324,239 @@ const de_AnalyzeIDCommandError = async (output, context) => {
|
|
|
251
324
|
});
|
|
252
325
|
}
|
|
253
326
|
};
|
|
327
|
+
export const de_CreateAdapterCommand = async (output, context) => {
|
|
328
|
+
if (output.statusCode >= 300) {
|
|
329
|
+
return de_CreateAdapterCommandError(output, context);
|
|
330
|
+
}
|
|
331
|
+
const data = await parseBody(output.body, context);
|
|
332
|
+
let contents = {};
|
|
333
|
+
contents = _json(data);
|
|
334
|
+
const response = {
|
|
335
|
+
$metadata: deserializeMetadata(output),
|
|
336
|
+
...contents,
|
|
337
|
+
};
|
|
338
|
+
return response;
|
|
339
|
+
};
|
|
340
|
+
const de_CreateAdapterCommandError = async (output, context) => {
|
|
341
|
+
const parsedOutput = {
|
|
342
|
+
...output,
|
|
343
|
+
body: await parseErrorBody(output.body, context),
|
|
344
|
+
};
|
|
345
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
346
|
+
switch (errorCode) {
|
|
347
|
+
case "AccessDeniedException":
|
|
348
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
349
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
350
|
+
case "ConflictException":
|
|
351
|
+
case "com.amazonaws.textract#ConflictException":
|
|
352
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
353
|
+
case "IdempotentParameterMismatchException":
|
|
354
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
355
|
+
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
356
|
+
case "InternalServerError":
|
|
357
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
358
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
359
|
+
case "InvalidParameterException":
|
|
360
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
361
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
362
|
+
case "LimitExceededException":
|
|
363
|
+
case "com.amazonaws.textract#LimitExceededException":
|
|
364
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
365
|
+
case "ProvisionedThroughputExceededException":
|
|
366
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
367
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
368
|
+
case "ServiceQuotaExceededException":
|
|
369
|
+
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
370
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
371
|
+
case "ThrottlingException":
|
|
372
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
373
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
374
|
+
case "ValidationException":
|
|
375
|
+
case "com.amazonaws.textract#ValidationException":
|
|
376
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
377
|
+
default:
|
|
378
|
+
const parsedBody = parsedOutput.body;
|
|
379
|
+
return throwDefaultError({
|
|
380
|
+
output,
|
|
381
|
+
parsedBody,
|
|
382
|
+
errorCode,
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
export const de_CreateAdapterVersionCommand = async (output, context) => {
|
|
387
|
+
if (output.statusCode >= 300) {
|
|
388
|
+
return de_CreateAdapterVersionCommandError(output, context);
|
|
389
|
+
}
|
|
390
|
+
const data = await parseBody(output.body, context);
|
|
391
|
+
let contents = {};
|
|
392
|
+
contents = _json(data);
|
|
393
|
+
const response = {
|
|
394
|
+
$metadata: deserializeMetadata(output),
|
|
395
|
+
...contents,
|
|
396
|
+
};
|
|
397
|
+
return response;
|
|
398
|
+
};
|
|
399
|
+
const de_CreateAdapterVersionCommandError = async (output, context) => {
|
|
400
|
+
const parsedOutput = {
|
|
401
|
+
...output,
|
|
402
|
+
body: await parseErrorBody(output.body, context),
|
|
403
|
+
};
|
|
404
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
405
|
+
switch (errorCode) {
|
|
406
|
+
case "AccessDeniedException":
|
|
407
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
408
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
409
|
+
case "ConflictException":
|
|
410
|
+
case "com.amazonaws.textract#ConflictException":
|
|
411
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
412
|
+
case "IdempotentParameterMismatchException":
|
|
413
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
414
|
+
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
415
|
+
case "InternalServerError":
|
|
416
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
417
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
418
|
+
case "InvalidKMSKeyException":
|
|
419
|
+
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
420
|
+
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
421
|
+
case "InvalidParameterException":
|
|
422
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
423
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
424
|
+
case "InvalidS3ObjectException":
|
|
425
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
426
|
+
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
427
|
+
case "LimitExceededException":
|
|
428
|
+
case "com.amazonaws.textract#LimitExceededException":
|
|
429
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
430
|
+
case "ProvisionedThroughputExceededException":
|
|
431
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
432
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
433
|
+
case "ResourceNotFoundException":
|
|
434
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
435
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
436
|
+
case "ServiceQuotaExceededException":
|
|
437
|
+
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
438
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
439
|
+
case "ThrottlingException":
|
|
440
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
441
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
442
|
+
case "ValidationException":
|
|
443
|
+
case "com.amazonaws.textract#ValidationException":
|
|
444
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
445
|
+
default:
|
|
446
|
+
const parsedBody = parsedOutput.body;
|
|
447
|
+
return throwDefaultError({
|
|
448
|
+
output,
|
|
449
|
+
parsedBody,
|
|
450
|
+
errorCode,
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
export const de_DeleteAdapterCommand = async (output, context) => {
|
|
455
|
+
if (output.statusCode >= 300) {
|
|
456
|
+
return de_DeleteAdapterCommandError(output, context);
|
|
457
|
+
}
|
|
458
|
+
const data = await parseBody(output.body, context);
|
|
459
|
+
let contents = {};
|
|
460
|
+
contents = _json(data);
|
|
461
|
+
const response = {
|
|
462
|
+
$metadata: deserializeMetadata(output),
|
|
463
|
+
...contents,
|
|
464
|
+
};
|
|
465
|
+
return response;
|
|
466
|
+
};
|
|
467
|
+
const de_DeleteAdapterCommandError = async (output, context) => {
|
|
468
|
+
const parsedOutput = {
|
|
469
|
+
...output,
|
|
470
|
+
body: await parseErrorBody(output.body, context),
|
|
471
|
+
};
|
|
472
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
473
|
+
switch (errorCode) {
|
|
474
|
+
case "AccessDeniedException":
|
|
475
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
476
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
477
|
+
case "ConflictException":
|
|
478
|
+
case "com.amazonaws.textract#ConflictException":
|
|
479
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
480
|
+
case "InternalServerError":
|
|
481
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
482
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
483
|
+
case "InvalidParameterException":
|
|
484
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
485
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
486
|
+
case "ProvisionedThroughputExceededException":
|
|
487
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
488
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
489
|
+
case "ResourceNotFoundException":
|
|
490
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
491
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
492
|
+
case "ThrottlingException":
|
|
493
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
494
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
495
|
+
case "ValidationException":
|
|
496
|
+
case "com.amazonaws.textract#ValidationException":
|
|
497
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
498
|
+
default:
|
|
499
|
+
const parsedBody = parsedOutput.body;
|
|
500
|
+
return throwDefaultError({
|
|
501
|
+
output,
|
|
502
|
+
parsedBody,
|
|
503
|
+
errorCode,
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
export const de_DeleteAdapterVersionCommand = async (output, context) => {
|
|
508
|
+
if (output.statusCode >= 300) {
|
|
509
|
+
return de_DeleteAdapterVersionCommandError(output, context);
|
|
510
|
+
}
|
|
511
|
+
const data = await parseBody(output.body, context);
|
|
512
|
+
let contents = {};
|
|
513
|
+
contents = _json(data);
|
|
514
|
+
const response = {
|
|
515
|
+
$metadata: deserializeMetadata(output),
|
|
516
|
+
...contents,
|
|
517
|
+
};
|
|
518
|
+
return response;
|
|
519
|
+
};
|
|
520
|
+
const de_DeleteAdapterVersionCommandError = async (output, context) => {
|
|
521
|
+
const parsedOutput = {
|
|
522
|
+
...output,
|
|
523
|
+
body: await parseErrorBody(output.body, context),
|
|
524
|
+
};
|
|
525
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
526
|
+
switch (errorCode) {
|
|
527
|
+
case "AccessDeniedException":
|
|
528
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
529
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
530
|
+
case "ConflictException":
|
|
531
|
+
case "com.amazonaws.textract#ConflictException":
|
|
532
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
533
|
+
case "InternalServerError":
|
|
534
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
535
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
536
|
+
case "InvalidParameterException":
|
|
537
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
538
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
539
|
+
case "ProvisionedThroughputExceededException":
|
|
540
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
541
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
542
|
+
case "ResourceNotFoundException":
|
|
543
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
544
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
545
|
+
case "ThrottlingException":
|
|
546
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
547
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
548
|
+
case "ValidationException":
|
|
549
|
+
case "com.amazonaws.textract#ValidationException":
|
|
550
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
551
|
+
default:
|
|
552
|
+
const parsedBody = parsedOutput.body;
|
|
553
|
+
return throwDefaultError({
|
|
554
|
+
output,
|
|
555
|
+
parsedBody,
|
|
556
|
+
errorCode,
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
};
|
|
254
560
|
export const de_DetectDocumentTextCommand = async (output, context) => {
|
|
255
561
|
if (output.statusCode >= 300) {
|
|
256
562
|
return de_DetectDocumentTextCommandError(output, context);
|
|
@@ -307,6 +613,106 @@ const de_DetectDocumentTextCommandError = async (output, context) => {
|
|
|
307
613
|
});
|
|
308
614
|
}
|
|
309
615
|
};
|
|
616
|
+
export const de_GetAdapterCommand = async (output, context) => {
|
|
617
|
+
if (output.statusCode >= 300) {
|
|
618
|
+
return de_GetAdapterCommandError(output, context);
|
|
619
|
+
}
|
|
620
|
+
const data = await parseBody(output.body, context);
|
|
621
|
+
let contents = {};
|
|
622
|
+
contents = de_GetAdapterResponse(data, context);
|
|
623
|
+
const response = {
|
|
624
|
+
$metadata: deserializeMetadata(output),
|
|
625
|
+
...contents,
|
|
626
|
+
};
|
|
627
|
+
return response;
|
|
628
|
+
};
|
|
629
|
+
const de_GetAdapterCommandError = async (output, context) => {
|
|
630
|
+
const parsedOutput = {
|
|
631
|
+
...output,
|
|
632
|
+
body: await parseErrorBody(output.body, context),
|
|
633
|
+
};
|
|
634
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
635
|
+
switch (errorCode) {
|
|
636
|
+
case "AccessDeniedException":
|
|
637
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
638
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
639
|
+
case "InternalServerError":
|
|
640
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
641
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
642
|
+
case "InvalidParameterException":
|
|
643
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
644
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
645
|
+
case "ProvisionedThroughputExceededException":
|
|
646
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
647
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
648
|
+
case "ResourceNotFoundException":
|
|
649
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
650
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
651
|
+
case "ThrottlingException":
|
|
652
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
653
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
654
|
+
case "ValidationException":
|
|
655
|
+
case "com.amazonaws.textract#ValidationException":
|
|
656
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
657
|
+
default:
|
|
658
|
+
const parsedBody = parsedOutput.body;
|
|
659
|
+
return throwDefaultError({
|
|
660
|
+
output,
|
|
661
|
+
parsedBody,
|
|
662
|
+
errorCode,
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
export const de_GetAdapterVersionCommand = async (output, context) => {
|
|
667
|
+
if (output.statusCode >= 300) {
|
|
668
|
+
return de_GetAdapterVersionCommandError(output, context);
|
|
669
|
+
}
|
|
670
|
+
const data = await parseBody(output.body, context);
|
|
671
|
+
let contents = {};
|
|
672
|
+
contents = de_GetAdapterVersionResponse(data, context);
|
|
673
|
+
const response = {
|
|
674
|
+
$metadata: deserializeMetadata(output),
|
|
675
|
+
...contents,
|
|
676
|
+
};
|
|
677
|
+
return response;
|
|
678
|
+
};
|
|
679
|
+
const de_GetAdapterVersionCommandError = async (output, context) => {
|
|
680
|
+
const parsedOutput = {
|
|
681
|
+
...output,
|
|
682
|
+
body: await parseErrorBody(output.body, context),
|
|
683
|
+
};
|
|
684
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
685
|
+
switch (errorCode) {
|
|
686
|
+
case "AccessDeniedException":
|
|
687
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
688
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
689
|
+
case "InternalServerError":
|
|
690
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
691
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
692
|
+
case "InvalidParameterException":
|
|
693
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
694
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
695
|
+
case "ProvisionedThroughputExceededException":
|
|
696
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
697
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
698
|
+
case "ResourceNotFoundException":
|
|
699
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
700
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
701
|
+
case "ThrottlingException":
|
|
702
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
703
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
704
|
+
case "ValidationException":
|
|
705
|
+
case "com.amazonaws.textract#ValidationException":
|
|
706
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
707
|
+
default:
|
|
708
|
+
const parsedBody = parsedOutput.body;
|
|
709
|
+
return throwDefaultError({
|
|
710
|
+
output,
|
|
711
|
+
parsedBody,
|
|
712
|
+
errorCode,
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
};
|
|
310
716
|
export const de_GetDocumentAnalysisCommand = async (output, context) => {
|
|
311
717
|
if (output.statusCode >= 300) {
|
|
312
718
|
return de_GetDocumentAnalysisCommandError(output, context);
|
|
@@ -413,20 +819,179 @@ const de_GetDocumentTextDetectionCommandError = async (output, context) => {
|
|
|
413
819
|
});
|
|
414
820
|
}
|
|
415
821
|
};
|
|
416
|
-
export const de_GetExpenseAnalysisCommand = async (output, context) => {
|
|
822
|
+
export const de_GetExpenseAnalysisCommand = async (output, context) => {
|
|
823
|
+
if (output.statusCode >= 300) {
|
|
824
|
+
return de_GetExpenseAnalysisCommandError(output, context);
|
|
825
|
+
}
|
|
826
|
+
const data = await parseBody(output.body, context);
|
|
827
|
+
let contents = {};
|
|
828
|
+
contents = de_GetExpenseAnalysisResponse(data, context);
|
|
829
|
+
const response = {
|
|
830
|
+
$metadata: deserializeMetadata(output),
|
|
831
|
+
...contents,
|
|
832
|
+
};
|
|
833
|
+
return response;
|
|
834
|
+
};
|
|
835
|
+
const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
836
|
+
const parsedOutput = {
|
|
837
|
+
...output,
|
|
838
|
+
body: await parseErrorBody(output.body, context),
|
|
839
|
+
};
|
|
840
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
841
|
+
switch (errorCode) {
|
|
842
|
+
case "AccessDeniedException":
|
|
843
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
844
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
845
|
+
case "InternalServerError":
|
|
846
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
847
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
848
|
+
case "InvalidJobIdException":
|
|
849
|
+
case "com.amazonaws.textract#InvalidJobIdException":
|
|
850
|
+
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
851
|
+
case "InvalidKMSKeyException":
|
|
852
|
+
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
853
|
+
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
854
|
+
case "InvalidParameterException":
|
|
855
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
856
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
857
|
+
case "InvalidS3ObjectException":
|
|
858
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
859
|
+
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
860
|
+
case "ProvisionedThroughputExceededException":
|
|
861
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
862
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
863
|
+
case "ThrottlingException":
|
|
864
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
865
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
866
|
+
default:
|
|
867
|
+
const parsedBody = parsedOutput.body;
|
|
868
|
+
return throwDefaultError({
|
|
869
|
+
output,
|
|
870
|
+
parsedBody,
|
|
871
|
+
errorCode,
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
export const de_GetLendingAnalysisCommand = async (output, context) => {
|
|
876
|
+
if (output.statusCode >= 300) {
|
|
877
|
+
return de_GetLendingAnalysisCommandError(output, context);
|
|
878
|
+
}
|
|
879
|
+
const data = await parseBody(output.body, context);
|
|
880
|
+
let contents = {};
|
|
881
|
+
contents = de_GetLendingAnalysisResponse(data, context);
|
|
882
|
+
const response = {
|
|
883
|
+
$metadata: deserializeMetadata(output),
|
|
884
|
+
...contents,
|
|
885
|
+
};
|
|
886
|
+
return response;
|
|
887
|
+
};
|
|
888
|
+
const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
889
|
+
const parsedOutput = {
|
|
890
|
+
...output,
|
|
891
|
+
body: await parseErrorBody(output.body, context),
|
|
892
|
+
};
|
|
893
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
894
|
+
switch (errorCode) {
|
|
895
|
+
case "AccessDeniedException":
|
|
896
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
897
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
898
|
+
case "InternalServerError":
|
|
899
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
900
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
901
|
+
case "InvalidJobIdException":
|
|
902
|
+
case "com.amazonaws.textract#InvalidJobIdException":
|
|
903
|
+
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
904
|
+
case "InvalidKMSKeyException":
|
|
905
|
+
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
906
|
+
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
907
|
+
case "InvalidParameterException":
|
|
908
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
909
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
910
|
+
case "InvalidS3ObjectException":
|
|
911
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
912
|
+
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
913
|
+
case "ProvisionedThroughputExceededException":
|
|
914
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
915
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
916
|
+
case "ThrottlingException":
|
|
917
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
918
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
919
|
+
default:
|
|
920
|
+
const parsedBody = parsedOutput.body;
|
|
921
|
+
return throwDefaultError({
|
|
922
|
+
output,
|
|
923
|
+
parsedBody,
|
|
924
|
+
errorCode,
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
export const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
|
|
929
|
+
if (output.statusCode >= 300) {
|
|
930
|
+
return de_GetLendingAnalysisSummaryCommandError(output, context);
|
|
931
|
+
}
|
|
932
|
+
const data = await parseBody(output.body, context);
|
|
933
|
+
let contents = {};
|
|
934
|
+
contents = _json(data);
|
|
935
|
+
const response = {
|
|
936
|
+
$metadata: deserializeMetadata(output),
|
|
937
|
+
...contents,
|
|
938
|
+
};
|
|
939
|
+
return response;
|
|
940
|
+
};
|
|
941
|
+
const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
|
|
942
|
+
const parsedOutput = {
|
|
943
|
+
...output,
|
|
944
|
+
body: await parseErrorBody(output.body, context),
|
|
945
|
+
};
|
|
946
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
947
|
+
switch (errorCode) {
|
|
948
|
+
case "AccessDeniedException":
|
|
949
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
950
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
951
|
+
case "InternalServerError":
|
|
952
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
953
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
954
|
+
case "InvalidJobIdException":
|
|
955
|
+
case "com.amazonaws.textract#InvalidJobIdException":
|
|
956
|
+
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
957
|
+
case "InvalidKMSKeyException":
|
|
958
|
+
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
959
|
+
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
960
|
+
case "InvalidParameterException":
|
|
961
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
962
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
963
|
+
case "InvalidS3ObjectException":
|
|
964
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
965
|
+
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
966
|
+
case "ProvisionedThroughputExceededException":
|
|
967
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
968
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
969
|
+
case "ThrottlingException":
|
|
970
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
971
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
972
|
+
default:
|
|
973
|
+
const parsedBody = parsedOutput.body;
|
|
974
|
+
return throwDefaultError({
|
|
975
|
+
output,
|
|
976
|
+
parsedBody,
|
|
977
|
+
errorCode,
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
};
|
|
981
|
+
export const de_ListAdaptersCommand = async (output, context) => {
|
|
417
982
|
if (output.statusCode >= 300) {
|
|
418
|
-
return
|
|
983
|
+
return de_ListAdaptersCommandError(output, context);
|
|
419
984
|
}
|
|
420
985
|
const data = await parseBody(output.body, context);
|
|
421
986
|
let contents = {};
|
|
422
|
-
contents =
|
|
987
|
+
contents = de_ListAdaptersResponse(data, context);
|
|
423
988
|
const response = {
|
|
424
989
|
$metadata: deserializeMetadata(output),
|
|
425
990
|
...contents,
|
|
426
991
|
};
|
|
427
992
|
return response;
|
|
428
993
|
};
|
|
429
|
-
const
|
|
994
|
+
const de_ListAdaptersCommandError = async (output, context) => {
|
|
430
995
|
const parsedOutput = {
|
|
431
996
|
...output,
|
|
432
997
|
body: await parseErrorBody(output.body, context),
|
|
@@ -439,24 +1004,18 @@ const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
|
439
1004
|
case "InternalServerError":
|
|
440
1005
|
case "com.amazonaws.textract#InternalServerError":
|
|
441
1006
|
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
442
|
-
case "InvalidJobIdException":
|
|
443
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
444
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
445
|
-
case "InvalidKMSKeyException":
|
|
446
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
447
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
448
1007
|
case "InvalidParameterException":
|
|
449
1008
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
450
1009
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
451
|
-
case "InvalidS3ObjectException":
|
|
452
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
453
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
454
1010
|
case "ProvisionedThroughputExceededException":
|
|
455
1011
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
456
1012
|
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
457
1013
|
case "ThrottlingException":
|
|
458
1014
|
case "com.amazonaws.textract#ThrottlingException":
|
|
459
1015
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1016
|
+
case "ValidationException":
|
|
1017
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1018
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
460
1019
|
default:
|
|
461
1020
|
const parsedBody = parsedOutput.body;
|
|
462
1021
|
return throwDefaultError({
|
|
@@ -466,20 +1025,20 @@ const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
|
466
1025
|
});
|
|
467
1026
|
}
|
|
468
1027
|
};
|
|
469
|
-
export const
|
|
1028
|
+
export const de_ListAdapterVersionsCommand = async (output, context) => {
|
|
470
1029
|
if (output.statusCode >= 300) {
|
|
471
|
-
return
|
|
1030
|
+
return de_ListAdapterVersionsCommandError(output, context);
|
|
472
1031
|
}
|
|
473
1032
|
const data = await parseBody(output.body, context);
|
|
474
1033
|
let contents = {};
|
|
475
|
-
contents =
|
|
1034
|
+
contents = de_ListAdapterVersionsResponse(data, context);
|
|
476
1035
|
const response = {
|
|
477
1036
|
$metadata: deserializeMetadata(output),
|
|
478
1037
|
...contents,
|
|
479
1038
|
};
|
|
480
1039
|
return response;
|
|
481
1040
|
};
|
|
482
|
-
const
|
|
1041
|
+
const de_ListAdapterVersionsCommandError = async (output, context) => {
|
|
483
1042
|
const parsedOutput = {
|
|
484
1043
|
...output,
|
|
485
1044
|
body: await parseErrorBody(output.body, context),
|
|
@@ -492,24 +1051,21 @@ const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
|
492
1051
|
case "InternalServerError":
|
|
493
1052
|
case "com.amazonaws.textract#InternalServerError":
|
|
494
1053
|
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
495
|
-
case "InvalidJobIdException":
|
|
496
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
497
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
498
|
-
case "InvalidKMSKeyException":
|
|
499
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
500
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
501
1054
|
case "InvalidParameterException":
|
|
502
1055
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
503
1056
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
504
|
-
case "InvalidS3ObjectException":
|
|
505
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
506
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
507
1057
|
case "ProvisionedThroughputExceededException":
|
|
508
1058
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
509
1059
|
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1060
|
+
case "ResourceNotFoundException":
|
|
1061
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1062
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
510
1063
|
case "ThrottlingException":
|
|
511
1064
|
case "com.amazonaws.textract#ThrottlingException":
|
|
512
1065
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1066
|
+
case "ValidationException":
|
|
1067
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1068
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
513
1069
|
default:
|
|
514
1070
|
const parsedBody = parsedOutput.body;
|
|
515
1071
|
return throwDefaultError({
|
|
@@ -519,9 +1075,9 @@ const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
|
519
1075
|
});
|
|
520
1076
|
}
|
|
521
1077
|
};
|
|
522
|
-
export const
|
|
1078
|
+
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
523
1079
|
if (output.statusCode >= 300) {
|
|
524
|
-
return
|
|
1080
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
525
1081
|
}
|
|
526
1082
|
const data = await parseBody(output.body, context);
|
|
527
1083
|
let contents = {};
|
|
@@ -532,7 +1088,7 @@ export const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
|
|
|
532
1088
|
};
|
|
533
1089
|
return response;
|
|
534
1090
|
};
|
|
535
|
-
const
|
|
1091
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
536
1092
|
const parsedOutput = {
|
|
537
1093
|
...output,
|
|
538
1094
|
body: await parseErrorBody(output.body, context),
|
|
@@ -545,24 +1101,21 @@ const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
|
|
|
545
1101
|
case "InternalServerError":
|
|
546
1102
|
case "com.amazonaws.textract#InternalServerError":
|
|
547
1103
|
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
548
|
-
case "InvalidJobIdException":
|
|
549
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
550
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
551
|
-
case "InvalidKMSKeyException":
|
|
552
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
553
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
554
1104
|
case "InvalidParameterException":
|
|
555
1105
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
556
1106
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
557
|
-
case "InvalidS3ObjectException":
|
|
558
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
559
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
560
1107
|
case "ProvisionedThroughputExceededException":
|
|
561
1108
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
562
1109
|
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1110
|
+
case "ResourceNotFoundException":
|
|
1111
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1112
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
563
1113
|
case "ThrottlingException":
|
|
564
1114
|
case "com.amazonaws.textract#ThrottlingException":
|
|
565
1115
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1116
|
+
case "ValidationException":
|
|
1117
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1118
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
566
1119
|
default:
|
|
567
1120
|
const parsedBody = parsedOutput.body;
|
|
568
1121
|
return throwDefaultError({
|
|
@@ -832,6 +1385,162 @@ const de_StartLendingAnalysisCommandError = async (output, context) => {
|
|
|
832
1385
|
});
|
|
833
1386
|
}
|
|
834
1387
|
};
|
|
1388
|
+
export const de_TagResourceCommand = async (output, context) => {
|
|
1389
|
+
if (output.statusCode >= 300) {
|
|
1390
|
+
return de_TagResourceCommandError(output, context);
|
|
1391
|
+
}
|
|
1392
|
+
const data = await parseBody(output.body, context);
|
|
1393
|
+
let contents = {};
|
|
1394
|
+
contents = _json(data);
|
|
1395
|
+
const response = {
|
|
1396
|
+
$metadata: deserializeMetadata(output),
|
|
1397
|
+
...contents,
|
|
1398
|
+
};
|
|
1399
|
+
return response;
|
|
1400
|
+
};
|
|
1401
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
1402
|
+
const parsedOutput = {
|
|
1403
|
+
...output,
|
|
1404
|
+
body: await parseErrorBody(output.body, context),
|
|
1405
|
+
};
|
|
1406
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1407
|
+
switch (errorCode) {
|
|
1408
|
+
case "AccessDeniedException":
|
|
1409
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
1410
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1411
|
+
case "InternalServerError":
|
|
1412
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
1413
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1414
|
+
case "InvalidParameterException":
|
|
1415
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
1416
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1417
|
+
case "ProvisionedThroughputExceededException":
|
|
1418
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1419
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1420
|
+
case "ResourceNotFoundException":
|
|
1421
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1422
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1423
|
+
case "ServiceQuotaExceededException":
|
|
1424
|
+
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
1425
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1426
|
+
case "ThrottlingException":
|
|
1427
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
1428
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1429
|
+
case "ValidationException":
|
|
1430
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1431
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1432
|
+
default:
|
|
1433
|
+
const parsedBody = parsedOutput.body;
|
|
1434
|
+
return throwDefaultError({
|
|
1435
|
+
output,
|
|
1436
|
+
parsedBody,
|
|
1437
|
+
errorCode,
|
|
1438
|
+
});
|
|
1439
|
+
}
|
|
1440
|
+
};
|
|
1441
|
+
export const de_UntagResourceCommand = async (output, context) => {
|
|
1442
|
+
if (output.statusCode >= 300) {
|
|
1443
|
+
return de_UntagResourceCommandError(output, context);
|
|
1444
|
+
}
|
|
1445
|
+
const data = await parseBody(output.body, context);
|
|
1446
|
+
let contents = {};
|
|
1447
|
+
contents = _json(data);
|
|
1448
|
+
const response = {
|
|
1449
|
+
$metadata: deserializeMetadata(output),
|
|
1450
|
+
...contents,
|
|
1451
|
+
};
|
|
1452
|
+
return response;
|
|
1453
|
+
};
|
|
1454
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
1455
|
+
const parsedOutput = {
|
|
1456
|
+
...output,
|
|
1457
|
+
body: await parseErrorBody(output.body, context),
|
|
1458
|
+
};
|
|
1459
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1460
|
+
switch (errorCode) {
|
|
1461
|
+
case "AccessDeniedException":
|
|
1462
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
1463
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1464
|
+
case "InternalServerError":
|
|
1465
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
1466
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1467
|
+
case "InvalidParameterException":
|
|
1468
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
1469
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1470
|
+
case "ProvisionedThroughputExceededException":
|
|
1471
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1472
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1473
|
+
case "ResourceNotFoundException":
|
|
1474
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1475
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1476
|
+
case "ThrottlingException":
|
|
1477
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
1478
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1479
|
+
case "ValidationException":
|
|
1480
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1481
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1482
|
+
default:
|
|
1483
|
+
const parsedBody = parsedOutput.body;
|
|
1484
|
+
return throwDefaultError({
|
|
1485
|
+
output,
|
|
1486
|
+
parsedBody,
|
|
1487
|
+
errorCode,
|
|
1488
|
+
});
|
|
1489
|
+
}
|
|
1490
|
+
};
|
|
1491
|
+
export const de_UpdateAdapterCommand = async (output, context) => {
|
|
1492
|
+
if (output.statusCode >= 300) {
|
|
1493
|
+
return de_UpdateAdapterCommandError(output, context);
|
|
1494
|
+
}
|
|
1495
|
+
const data = await parseBody(output.body, context);
|
|
1496
|
+
let contents = {};
|
|
1497
|
+
contents = de_UpdateAdapterResponse(data, context);
|
|
1498
|
+
const response = {
|
|
1499
|
+
$metadata: deserializeMetadata(output),
|
|
1500
|
+
...contents,
|
|
1501
|
+
};
|
|
1502
|
+
return response;
|
|
1503
|
+
};
|
|
1504
|
+
const de_UpdateAdapterCommandError = async (output, context) => {
|
|
1505
|
+
const parsedOutput = {
|
|
1506
|
+
...output,
|
|
1507
|
+
body: await parseErrorBody(output.body, context),
|
|
1508
|
+
};
|
|
1509
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1510
|
+
switch (errorCode) {
|
|
1511
|
+
case "AccessDeniedException":
|
|
1512
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
1513
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1514
|
+
case "ConflictException":
|
|
1515
|
+
case "com.amazonaws.textract#ConflictException":
|
|
1516
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1517
|
+
case "InternalServerError":
|
|
1518
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
1519
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1520
|
+
case "InvalidParameterException":
|
|
1521
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
1522
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1523
|
+
case "ProvisionedThroughputExceededException":
|
|
1524
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1525
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1526
|
+
case "ResourceNotFoundException":
|
|
1527
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1528
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1529
|
+
case "ThrottlingException":
|
|
1530
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
1531
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1532
|
+
case "ValidationException":
|
|
1533
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1534
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1535
|
+
default:
|
|
1536
|
+
const parsedBody = parsedOutput.body;
|
|
1537
|
+
return throwDefaultError({
|
|
1538
|
+
output,
|
|
1539
|
+
parsedBody,
|
|
1540
|
+
errorCode,
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
};
|
|
835
1544
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
836
1545
|
const body = parsedOutput.body;
|
|
837
1546
|
const deserialized = _json(body);
|
|
@@ -850,6 +1559,15 @@ const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
|
|
|
850
1559
|
});
|
|
851
1560
|
return __decorateServiceException(exception, body);
|
|
852
1561
|
};
|
|
1562
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1563
|
+
const body = parsedOutput.body;
|
|
1564
|
+
const deserialized = _json(body);
|
|
1565
|
+
const exception = new ConflictException({
|
|
1566
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1567
|
+
...deserialized,
|
|
1568
|
+
});
|
|
1569
|
+
return __decorateServiceException(exception, body);
|
|
1570
|
+
};
|
|
853
1571
|
const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
854
1572
|
const body = parsedOutput.body;
|
|
855
1573
|
const deserialized = _json(body);
|
|
@@ -940,6 +1658,24 @@ const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, contex
|
|
|
940
1658
|
});
|
|
941
1659
|
return __decorateServiceException(exception, body);
|
|
942
1660
|
};
|
|
1661
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1662
|
+
const body = parsedOutput.body;
|
|
1663
|
+
const deserialized = _json(body);
|
|
1664
|
+
const exception = new ResourceNotFoundException({
|
|
1665
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1666
|
+
...deserialized,
|
|
1667
|
+
});
|
|
1668
|
+
return __decorateServiceException(exception, body);
|
|
1669
|
+
};
|
|
1670
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1671
|
+
const body = parsedOutput.body;
|
|
1672
|
+
const deserialized = _json(body);
|
|
1673
|
+
const exception = new ServiceQuotaExceededException({
|
|
1674
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1675
|
+
...deserialized,
|
|
1676
|
+
});
|
|
1677
|
+
return __decorateServiceException(exception, body);
|
|
1678
|
+
};
|
|
943
1679
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
944
1680
|
const body = parsedOutput.body;
|
|
945
1681
|
const deserialized = _json(body);
|
|
@@ -958,8 +1694,18 @@ const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
|
|
|
958
1694
|
});
|
|
959
1695
|
return __decorateServiceException(exception, body);
|
|
960
1696
|
};
|
|
1697
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1698
|
+
const body = parsedOutput.body;
|
|
1699
|
+
const deserialized = _json(body);
|
|
1700
|
+
const exception = new ValidationException({
|
|
1701
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1702
|
+
...deserialized,
|
|
1703
|
+
});
|
|
1704
|
+
return __decorateServiceException(exception, body);
|
|
1705
|
+
};
|
|
961
1706
|
const se_AnalyzeDocumentRequest = (input, context) => {
|
|
962
1707
|
return take(input, {
|
|
1708
|
+
AdaptersConfig: _json,
|
|
963
1709
|
Document: (_) => se_Document(_, context),
|
|
964
1710
|
FeatureTypes: _json,
|
|
965
1711
|
HumanLoopConfig: _json,
|
|
@@ -976,6 +1722,26 @@ const se_AnalyzeIDRequest = (input, context) => {
|
|
|
976
1722
|
DocumentPages: (_) => se_DocumentPages(_, context),
|
|
977
1723
|
});
|
|
978
1724
|
};
|
|
1725
|
+
const se_CreateAdapterRequest = (input, context) => {
|
|
1726
|
+
return take(input, {
|
|
1727
|
+
AdapterName: [],
|
|
1728
|
+
AutoUpdate: [],
|
|
1729
|
+
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
1730
|
+
Description: [],
|
|
1731
|
+
FeatureTypes: _json,
|
|
1732
|
+
Tags: _json,
|
|
1733
|
+
});
|
|
1734
|
+
};
|
|
1735
|
+
const se_CreateAdapterVersionRequest = (input, context) => {
|
|
1736
|
+
return take(input, {
|
|
1737
|
+
AdapterId: [],
|
|
1738
|
+
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
1739
|
+
DatasetConfig: _json,
|
|
1740
|
+
KMSKeyId: [],
|
|
1741
|
+
OutputConfig: _json,
|
|
1742
|
+
Tags: _json,
|
|
1743
|
+
});
|
|
1744
|
+
};
|
|
979
1745
|
const se_DetectDocumentTextRequest = (input, context) => {
|
|
980
1746
|
return take(input, {
|
|
981
1747
|
Document: (_) => se_Document(_, context),
|
|
@@ -994,6 +1760,72 @@ const se_DocumentPages = (input, context) => {
|
|
|
994
1760
|
return se_Document(entry, context);
|
|
995
1761
|
});
|
|
996
1762
|
};
|
|
1763
|
+
const se_ListAdaptersRequest = (input, context) => {
|
|
1764
|
+
return take(input, {
|
|
1765
|
+
AfterCreationTime: (_) => Math.round(_.getTime() / 1000),
|
|
1766
|
+
BeforeCreationTime: (_) => Math.round(_.getTime() / 1000),
|
|
1767
|
+
MaxResults: [],
|
|
1768
|
+
NextToken: [],
|
|
1769
|
+
});
|
|
1770
|
+
};
|
|
1771
|
+
const se_ListAdapterVersionsRequest = (input, context) => {
|
|
1772
|
+
return take(input, {
|
|
1773
|
+
AdapterId: [],
|
|
1774
|
+
AfterCreationTime: (_) => Math.round(_.getTime() / 1000),
|
|
1775
|
+
BeforeCreationTime: (_) => Math.round(_.getTime() / 1000),
|
|
1776
|
+
MaxResults: [],
|
|
1777
|
+
NextToken: [],
|
|
1778
|
+
});
|
|
1779
|
+
};
|
|
1780
|
+
const de_AdapterList = (output, context) => {
|
|
1781
|
+
const retVal = (output || [])
|
|
1782
|
+
.filter((e) => e != null)
|
|
1783
|
+
.map((entry) => {
|
|
1784
|
+
return de_AdapterOverview(entry, context);
|
|
1785
|
+
});
|
|
1786
|
+
return retVal;
|
|
1787
|
+
};
|
|
1788
|
+
const de_AdapterOverview = (output, context) => {
|
|
1789
|
+
return take(output, {
|
|
1790
|
+
AdapterId: __expectString,
|
|
1791
|
+
AdapterName: __expectString,
|
|
1792
|
+
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1793
|
+
FeatureTypes: _json,
|
|
1794
|
+
});
|
|
1795
|
+
};
|
|
1796
|
+
const de_AdapterVersionEvaluationMetric = (output, context) => {
|
|
1797
|
+
return take(output, {
|
|
1798
|
+
AdapterVersion: (_) => de_EvaluationMetric(_, context),
|
|
1799
|
+
Baseline: (_) => de_EvaluationMetric(_, context),
|
|
1800
|
+
FeatureType: __expectString,
|
|
1801
|
+
});
|
|
1802
|
+
};
|
|
1803
|
+
const de_AdapterVersionEvaluationMetrics = (output, context) => {
|
|
1804
|
+
const retVal = (output || [])
|
|
1805
|
+
.filter((e) => e != null)
|
|
1806
|
+
.map((entry) => {
|
|
1807
|
+
return de_AdapterVersionEvaluationMetric(entry, context);
|
|
1808
|
+
});
|
|
1809
|
+
return retVal;
|
|
1810
|
+
};
|
|
1811
|
+
const de_AdapterVersionList = (output, context) => {
|
|
1812
|
+
const retVal = (output || [])
|
|
1813
|
+
.filter((e) => e != null)
|
|
1814
|
+
.map((entry) => {
|
|
1815
|
+
return de_AdapterVersionOverview(entry, context);
|
|
1816
|
+
});
|
|
1817
|
+
return retVal;
|
|
1818
|
+
};
|
|
1819
|
+
const de_AdapterVersionOverview = (output, context) => {
|
|
1820
|
+
return take(output, {
|
|
1821
|
+
AdapterId: __expectString,
|
|
1822
|
+
AdapterVersion: __expectString,
|
|
1823
|
+
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1824
|
+
FeatureTypes: _json,
|
|
1825
|
+
Status: __expectString,
|
|
1826
|
+
StatusMessage: __expectString,
|
|
1827
|
+
});
|
|
1828
|
+
};
|
|
997
1829
|
const de_AnalyzeDocumentResponse = (output, context) => {
|
|
998
1830
|
return take(output, {
|
|
999
1831
|
AnalyzeDocumentModelVersion: __expectString,
|
|
@@ -1064,6 +1896,13 @@ const de_DetectDocumentTextResponse = (output, context) => {
|
|
|
1064
1896
|
DocumentMetadata: _json,
|
|
1065
1897
|
});
|
|
1066
1898
|
};
|
|
1899
|
+
const de_EvaluationMetric = (output, context) => {
|
|
1900
|
+
return take(output, {
|
|
1901
|
+
F1Score: __limitedParseFloat32,
|
|
1902
|
+
Precision: __limitedParseFloat32,
|
|
1903
|
+
Recall: __limitedParseFloat32,
|
|
1904
|
+
});
|
|
1905
|
+
};
|
|
1067
1906
|
const de_ExpenseCurrency = (output, context) => {
|
|
1068
1907
|
return take(output, {
|
|
1069
1908
|
Code: __expectString,
|
|
@@ -1138,6 +1977,32 @@ const de_Geometry = (output, context) => {
|
|
|
1138
1977
|
Polygon: (_) => de_Polygon(_, context),
|
|
1139
1978
|
});
|
|
1140
1979
|
};
|
|
1980
|
+
const de_GetAdapterResponse = (output, context) => {
|
|
1981
|
+
return take(output, {
|
|
1982
|
+
AdapterId: __expectString,
|
|
1983
|
+
AdapterName: __expectString,
|
|
1984
|
+
AutoUpdate: __expectString,
|
|
1985
|
+
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1986
|
+
Description: __expectString,
|
|
1987
|
+
FeatureTypes: _json,
|
|
1988
|
+
Tags: _json,
|
|
1989
|
+
});
|
|
1990
|
+
};
|
|
1991
|
+
const de_GetAdapterVersionResponse = (output, context) => {
|
|
1992
|
+
return take(output, {
|
|
1993
|
+
AdapterId: __expectString,
|
|
1994
|
+
AdapterVersion: __expectString,
|
|
1995
|
+
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1996
|
+
DatasetConfig: _json,
|
|
1997
|
+
EvaluationMetrics: (_) => de_AdapterVersionEvaluationMetrics(_, context),
|
|
1998
|
+
FeatureTypes: _json,
|
|
1999
|
+
KMSKeyId: __expectString,
|
|
2000
|
+
OutputConfig: _json,
|
|
2001
|
+
Status: __expectString,
|
|
2002
|
+
StatusMessage: __expectString,
|
|
2003
|
+
Tags: _json,
|
|
2004
|
+
});
|
|
2005
|
+
};
|
|
1141
2006
|
const de_GetDocumentAnalysisResponse = (output, context) => {
|
|
1142
2007
|
return take(output, {
|
|
1143
2008
|
AnalyzeDocumentModelVersion: __expectString,
|
|
@@ -1297,6 +2162,18 @@ const de_LineItemList = (output, context) => {
|
|
|
1297
2162
|
});
|
|
1298
2163
|
return retVal;
|
|
1299
2164
|
};
|
|
2165
|
+
const de_ListAdaptersResponse = (output, context) => {
|
|
2166
|
+
return take(output, {
|
|
2167
|
+
Adapters: (_) => de_AdapterList(_, context),
|
|
2168
|
+
NextToken: __expectString,
|
|
2169
|
+
});
|
|
2170
|
+
};
|
|
2171
|
+
const de_ListAdapterVersionsResponse = (output, context) => {
|
|
2172
|
+
return take(output, {
|
|
2173
|
+
AdapterVersions: (_) => de_AdapterVersionList(_, context),
|
|
2174
|
+
NextToken: __expectString,
|
|
2175
|
+
});
|
|
2176
|
+
};
|
|
1300
2177
|
const de_PageClassification = (output, context) => {
|
|
1301
2178
|
return take(output, {
|
|
1302
2179
|
PageNumber: (_) => de_PredictionList(_, context),
|
|
@@ -1345,6 +2222,16 @@ const de_SignatureDetectionList = (output, context) => {
|
|
|
1345
2222
|
});
|
|
1346
2223
|
return retVal;
|
|
1347
2224
|
};
|
|
2225
|
+
const de_UpdateAdapterResponse = (output, context) => {
|
|
2226
|
+
return take(output, {
|
|
2227
|
+
AdapterId: __expectString,
|
|
2228
|
+
AdapterName: __expectString,
|
|
2229
|
+
AutoUpdate: __expectString,
|
|
2230
|
+
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
2231
|
+
Description: __expectString,
|
|
2232
|
+
FeatureTypes: _json,
|
|
2233
|
+
});
|
|
2234
|
+
};
|
|
1348
2235
|
const deserializeMetadata = (output) => ({
|
|
1349
2236
|
httpStatusCode: output.statusCode,
|
|
1350
2237
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|