@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,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_StartLendingAnalysisCommand = exports.de_StartExpenseAnalysisCommand = exports.de_StartDocumentTextDetectionCommand = exports.de_StartDocumentAnalysisCommand = exports.de_GetLendingAnalysisSummaryCommand = exports.de_GetLendingAnalysisCommand = exports.de_GetExpenseAnalysisCommand = exports.de_GetDocumentTextDetectionCommand = exports.de_GetDocumentAnalysisCommand = exports.de_DetectDocumentTextCommand = exports.de_AnalyzeIDCommand = exports.de_AnalyzeExpenseCommand = exports.de_AnalyzeDocumentCommand = exports.se_StartLendingAnalysisCommand = exports.se_StartExpenseAnalysisCommand = exports.se_StartDocumentTextDetectionCommand = exports.se_StartDocumentAnalysisCommand = exports.se_GetLendingAnalysisSummaryCommand = exports.se_GetLendingAnalysisCommand = exports.se_GetExpenseAnalysisCommand = exports.se_GetDocumentTextDetectionCommand = exports.se_GetDocumentAnalysisCommand = exports.se_DetectDocumentTextCommand = exports.se_AnalyzeIDCommand = exports.se_AnalyzeExpenseCommand = exports.se_AnalyzeDocumentCommand = void 0;
|
|
3
|
+
exports.de_UpdateAdapterCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartLendingAnalysisCommand = exports.de_StartExpenseAnalysisCommand = exports.de_StartDocumentTextDetectionCommand = exports.de_StartDocumentAnalysisCommand = exports.de_ListTagsForResourceCommand = exports.de_ListAdapterVersionsCommand = exports.de_ListAdaptersCommand = exports.de_GetLendingAnalysisSummaryCommand = exports.de_GetLendingAnalysisCommand = exports.de_GetExpenseAnalysisCommand = exports.de_GetDocumentTextDetectionCommand = exports.de_GetDocumentAnalysisCommand = exports.de_GetAdapterVersionCommand = exports.de_GetAdapterCommand = exports.de_DetectDocumentTextCommand = exports.de_DeleteAdapterVersionCommand = exports.de_DeleteAdapterCommand = exports.de_CreateAdapterVersionCommand = exports.de_CreateAdapterCommand = exports.de_AnalyzeIDCommand = exports.de_AnalyzeExpenseCommand = exports.de_AnalyzeDocumentCommand = exports.se_UpdateAdapterCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartLendingAnalysisCommand = exports.se_StartExpenseAnalysisCommand = exports.se_StartDocumentTextDetectionCommand = exports.se_StartDocumentAnalysisCommand = exports.se_ListTagsForResourceCommand = exports.se_ListAdapterVersionsCommand = exports.se_ListAdaptersCommand = exports.se_GetLendingAnalysisSummaryCommand = exports.se_GetLendingAnalysisCommand = exports.se_GetExpenseAnalysisCommand = exports.se_GetDocumentTextDetectionCommand = exports.se_GetDocumentAnalysisCommand = exports.se_GetAdapterVersionCommand = exports.se_GetAdapterCommand = exports.se_DetectDocumentTextCommand = exports.se_DeleteAdapterVersionCommand = exports.se_DeleteAdapterCommand = exports.se_CreateAdapterVersionCommand = exports.se_CreateAdapterCommand = exports.se_AnalyzeIDCommand = exports.se_AnalyzeExpenseCommand = exports.se_AnalyzeDocumentCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
+
const uuid_1 = require("uuid");
|
|
6
7
|
const models_0_1 = require("../models/models_0");
|
|
7
8
|
const TextractServiceException_1 = require("../models/TextractServiceException");
|
|
8
9
|
const se_AnalyzeDocumentCommand = async (input, context) => {
|
|
@@ -26,6 +27,34 @@ const se_AnalyzeIDCommand = async (input, context) => {
|
|
|
26
27
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
28
|
};
|
|
28
29
|
exports.se_AnalyzeIDCommand = se_AnalyzeIDCommand;
|
|
30
|
+
const se_CreateAdapterCommand = async (input, context) => {
|
|
31
|
+
const headers = sharedHeaders("CreateAdapter");
|
|
32
|
+
let body;
|
|
33
|
+
body = JSON.stringify(se_CreateAdapterRequest(input, context));
|
|
34
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
+
};
|
|
36
|
+
exports.se_CreateAdapterCommand = se_CreateAdapterCommand;
|
|
37
|
+
const se_CreateAdapterVersionCommand = async (input, context) => {
|
|
38
|
+
const headers = sharedHeaders("CreateAdapterVersion");
|
|
39
|
+
let body;
|
|
40
|
+
body = JSON.stringify(se_CreateAdapterVersionRequest(input, context));
|
|
41
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
+
};
|
|
43
|
+
exports.se_CreateAdapterVersionCommand = se_CreateAdapterVersionCommand;
|
|
44
|
+
const se_DeleteAdapterCommand = async (input, context) => {
|
|
45
|
+
const headers = sharedHeaders("DeleteAdapter");
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
50
|
+
exports.se_DeleteAdapterCommand = se_DeleteAdapterCommand;
|
|
51
|
+
const se_DeleteAdapterVersionCommand = async (input, context) => {
|
|
52
|
+
const headers = sharedHeaders("DeleteAdapterVersion");
|
|
53
|
+
let body;
|
|
54
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
55
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
|
+
};
|
|
57
|
+
exports.se_DeleteAdapterVersionCommand = se_DeleteAdapterVersionCommand;
|
|
29
58
|
const se_DetectDocumentTextCommand = async (input, context) => {
|
|
30
59
|
const headers = sharedHeaders("DetectDocumentText");
|
|
31
60
|
let body;
|
|
@@ -33,6 +62,20 @@ const se_DetectDocumentTextCommand = async (input, context) => {
|
|
|
33
62
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
63
|
};
|
|
35
64
|
exports.se_DetectDocumentTextCommand = se_DetectDocumentTextCommand;
|
|
65
|
+
const se_GetAdapterCommand = async (input, context) => {
|
|
66
|
+
const headers = sharedHeaders("GetAdapter");
|
|
67
|
+
let body;
|
|
68
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
69
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
70
|
+
};
|
|
71
|
+
exports.se_GetAdapterCommand = se_GetAdapterCommand;
|
|
72
|
+
const se_GetAdapterVersionCommand = async (input, context) => {
|
|
73
|
+
const headers = sharedHeaders("GetAdapterVersion");
|
|
74
|
+
let body;
|
|
75
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
76
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
|
+
};
|
|
78
|
+
exports.se_GetAdapterVersionCommand = se_GetAdapterVersionCommand;
|
|
36
79
|
const se_GetDocumentAnalysisCommand = async (input, context) => {
|
|
37
80
|
const headers = sharedHeaders("GetDocumentAnalysis");
|
|
38
81
|
let body;
|
|
@@ -68,6 +111,27 @@ const se_GetLendingAnalysisSummaryCommand = async (input, context) => {
|
|
|
68
111
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
69
112
|
};
|
|
70
113
|
exports.se_GetLendingAnalysisSummaryCommand = se_GetLendingAnalysisSummaryCommand;
|
|
114
|
+
const se_ListAdaptersCommand = async (input, context) => {
|
|
115
|
+
const headers = sharedHeaders("ListAdapters");
|
|
116
|
+
let body;
|
|
117
|
+
body = JSON.stringify(se_ListAdaptersRequest(input, context));
|
|
118
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
119
|
+
};
|
|
120
|
+
exports.se_ListAdaptersCommand = se_ListAdaptersCommand;
|
|
121
|
+
const se_ListAdapterVersionsCommand = async (input, context) => {
|
|
122
|
+
const headers = sharedHeaders("ListAdapterVersions");
|
|
123
|
+
let body;
|
|
124
|
+
body = JSON.stringify(se_ListAdapterVersionsRequest(input, context));
|
|
125
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
126
|
+
};
|
|
127
|
+
exports.se_ListAdapterVersionsCommand = se_ListAdapterVersionsCommand;
|
|
128
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
129
|
+
const headers = sharedHeaders("ListTagsForResource");
|
|
130
|
+
let body;
|
|
131
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
132
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
133
|
+
};
|
|
134
|
+
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
71
135
|
const se_StartDocumentAnalysisCommand = async (input, context) => {
|
|
72
136
|
const headers = sharedHeaders("StartDocumentAnalysis");
|
|
73
137
|
let body;
|
|
@@ -96,6 +160,27 @@ const se_StartLendingAnalysisCommand = async (input, context) => {
|
|
|
96
160
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
161
|
};
|
|
98
162
|
exports.se_StartLendingAnalysisCommand = se_StartLendingAnalysisCommand;
|
|
163
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
164
|
+
const headers = sharedHeaders("TagResource");
|
|
165
|
+
let body;
|
|
166
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
167
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
168
|
+
};
|
|
169
|
+
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
170
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
171
|
+
const headers = sharedHeaders("UntagResource");
|
|
172
|
+
let body;
|
|
173
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
174
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
175
|
+
};
|
|
176
|
+
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
177
|
+
const se_UpdateAdapterCommand = async (input, context) => {
|
|
178
|
+
const headers = sharedHeaders("UpdateAdapter");
|
|
179
|
+
let body;
|
|
180
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
181
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
182
|
+
};
|
|
183
|
+
exports.se_UpdateAdapterCommand = se_UpdateAdapterCommand;
|
|
99
184
|
const de_AnalyzeDocumentCommand = async (output, context) => {
|
|
100
185
|
if (output.statusCode >= 300) {
|
|
101
186
|
return de_AnalyzeDocumentCommandError(output, context);
|
|
@@ -270,6 +355,243 @@ const de_AnalyzeIDCommandError = async (output, context) => {
|
|
|
270
355
|
});
|
|
271
356
|
}
|
|
272
357
|
};
|
|
358
|
+
const de_CreateAdapterCommand = async (output, context) => {
|
|
359
|
+
if (output.statusCode >= 300) {
|
|
360
|
+
return de_CreateAdapterCommandError(output, context);
|
|
361
|
+
}
|
|
362
|
+
const data = await parseBody(output.body, context);
|
|
363
|
+
let contents = {};
|
|
364
|
+
contents = (0, smithy_client_1._json)(data);
|
|
365
|
+
const response = {
|
|
366
|
+
$metadata: deserializeMetadata(output),
|
|
367
|
+
...contents,
|
|
368
|
+
};
|
|
369
|
+
return response;
|
|
370
|
+
};
|
|
371
|
+
exports.de_CreateAdapterCommand = de_CreateAdapterCommand;
|
|
372
|
+
const de_CreateAdapterCommandError = async (output, context) => {
|
|
373
|
+
const parsedOutput = {
|
|
374
|
+
...output,
|
|
375
|
+
body: await parseErrorBody(output.body, context),
|
|
376
|
+
};
|
|
377
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
378
|
+
switch (errorCode) {
|
|
379
|
+
case "AccessDeniedException":
|
|
380
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
381
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
382
|
+
case "ConflictException":
|
|
383
|
+
case "com.amazonaws.textract#ConflictException":
|
|
384
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
385
|
+
case "IdempotentParameterMismatchException":
|
|
386
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
387
|
+
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
388
|
+
case "InternalServerError":
|
|
389
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
390
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
391
|
+
case "InvalidParameterException":
|
|
392
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
393
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
394
|
+
case "LimitExceededException":
|
|
395
|
+
case "com.amazonaws.textract#LimitExceededException":
|
|
396
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
397
|
+
case "ProvisionedThroughputExceededException":
|
|
398
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
399
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
400
|
+
case "ServiceQuotaExceededException":
|
|
401
|
+
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
402
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
403
|
+
case "ThrottlingException":
|
|
404
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
405
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
406
|
+
case "ValidationException":
|
|
407
|
+
case "com.amazonaws.textract#ValidationException":
|
|
408
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
409
|
+
default:
|
|
410
|
+
const parsedBody = parsedOutput.body;
|
|
411
|
+
return throwDefaultError({
|
|
412
|
+
output,
|
|
413
|
+
parsedBody,
|
|
414
|
+
errorCode,
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
const de_CreateAdapterVersionCommand = async (output, context) => {
|
|
419
|
+
if (output.statusCode >= 300) {
|
|
420
|
+
return de_CreateAdapterVersionCommandError(output, context);
|
|
421
|
+
}
|
|
422
|
+
const data = await parseBody(output.body, context);
|
|
423
|
+
let contents = {};
|
|
424
|
+
contents = (0, smithy_client_1._json)(data);
|
|
425
|
+
const response = {
|
|
426
|
+
$metadata: deserializeMetadata(output),
|
|
427
|
+
...contents,
|
|
428
|
+
};
|
|
429
|
+
return response;
|
|
430
|
+
};
|
|
431
|
+
exports.de_CreateAdapterVersionCommand = de_CreateAdapterVersionCommand;
|
|
432
|
+
const de_CreateAdapterVersionCommandError = async (output, context) => {
|
|
433
|
+
const parsedOutput = {
|
|
434
|
+
...output,
|
|
435
|
+
body: await parseErrorBody(output.body, context),
|
|
436
|
+
};
|
|
437
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
438
|
+
switch (errorCode) {
|
|
439
|
+
case "AccessDeniedException":
|
|
440
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
441
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
442
|
+
case "ConflictException":
|
|
443
|
+
case "com.amazonaws.textract#ConflictException":
|
|
444
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
445
|
+
case "IdempotentParameterMismatchException":
|
|
446
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
447
|
+
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
448
|
+
case "InternalServerError":
|
|
449
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
450
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
451
|
+
case "InvalidKMSKeyException":
|
|
452
|
+
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
453
|
+
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
454
|
+
case "InvalidParameterException":
|
|
455
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
456
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
457
|
+
case "InvalidS3ObjectException":
|
|
458
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
459
|
+
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
460
|
+
case "LimitExceededException":
|
|
461
|
+
case "com.amazonaws.textract#LimitExceededException":
|
|
462
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
463
|
+
case "ProvisionedThroughputExceededException":
|
|
464
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
465
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
466
|
+
case "ResourceNotFoundException":
|
|
467
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
468
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
469
|
+
case "ServiceQuotaExceededException":
|
|
470
|
+
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
471
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
472
|
+
case "ThrottlingException":
|
|
473
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
474
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
475
|
+
case "ValidationException":
|
|
476
|
+
case "com.amazonaws.textract#ValidationException":
|
|
477
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
478
|
+
default:
|
|
479
|
+
const parsedBody = parsedOutput.body;
|
|
480
|
+
return throwDefaultError({
|
|
481
|
+
output,
|
|
482
|
+
parsedBody,
|
|
483
|
+
errorCode,
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
const de_DeleteAdapterCommand = async (output, context) => {
|
|
488
|
+
if (output.statusCode >= 300) {
|
|
489
|
+
return de_DeleteAdapterCommandError(output, context);
|
|
490
|
+
}
|
|
491
|
+
const data = await parseBody(output.body, context);
|
|
492
|
+
let contents = {};
|
|
493
|
+
contents = (0, smithy_client_1._json)(data);
|
|
494
|
+
const response = {
|
|
495
|
+
$metadata: deserializeMetadata(output),
|
|
496
|
+
...contents,
|
|
497
|
+
};
|
|
498
|
+
return response;
|
|
499
|
+
};
|
|
500
|
+
exports.de_DeleteAdapterCommand = de_DeleteAdapterCommand;
|
|
501
|
+
const de_DeleteAdapterCommandError = async (output, context) => {
|
|
502
|
+
const parsedOutput = {
|
|
503
|
+
...output,
|
|
504
|
+
body: await parseErrorBody(output.body, context),
|
|
505
|
+
};
|
|
506
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
507
|
+
switch (errorCode) {
|
|
508
|
+
case "AccessDeniedException":
|
|
509
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
510
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
511
|
+
case "ConflictException":
|
|
512
|
+
case "com.amazonaws.textract#ConflictException":
|
|
513
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
514
|
+
case "InternalServerError":
|
|
515
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
516
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
517
|
+
case "InvalidParameterException":
|
|
518
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
519
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
520
|
+
case "ProvisionedThroughputExceededException":
|
|
521
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
522
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
523
|
+
case "ResourceNotFoundException":
|
|
524
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
525
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
526
|
+
case "ThrottlingException":
|
|
527
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
528
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
529
|
+
case "ValidationException":
|
|
530
|
+
case "com.amazonaws.textract#ValidationException":
|
|
531
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
532
|
+
default:
|
|
533
|
+
const parsedBody = parsedOutput.body;
|
|
534
|
+
return throwDefaultError({
|
|
535
|
+
output,
|
|
536
|
+
parsedBody,
|
|
537
|
+
errorCode,
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
const de_DeleteAdapterVersionCommand = async (output, context) => {
|
|
542
|
+
if (output.statusCode >= 300) {
|
|
543
|
+
return de_DeleteAdapterVersionCommandError(output, context);
|
|
544
|
+
}
|
|
545
|
+
const data = await parseBody(output.body, context);
|
|
546
|
+
let contents = {};
|
|
547
|
+
contents = (0, smithy_client_1._json)(data);
|
|
548
|
+
const response = {
|
|
549
|
+
$metadata: deserializeMetadata(output),
|
|
550
|
+
...contents,
|
|
551
|
+
};
|
|
552
|
+
return response;
|
|
553
|
+
};
|
|
554
|
+
exports.de_DeleteAdapterVersionCommand = de_DeleteAdapterVersionCommand;
|
|
555
|
+
const de_DeleteAdapterVersionCommandError = async (output, context) => {
|
|
556
|
+
const parsedOutput = {
|
|
557
|
+
...output,
|
|
558
|
+
body: await parseErrorBody(output.body, context),
|
|
559
|
+
};
|
|
560
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
561
|
+
switch (errorCode) {
|
|
562
|
+
case "AccessDeniedException":
|
|
563
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
564
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
565
|
+
case "ConflictException":
|
|
566
|
+
case "com.amazonaws.textract#ConflictException":
|
|
567
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
568
|
+
case "InternalServerError":
|
|
569
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
570
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
571
|
+
case "InvalidParameterException":
|
|
572
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
573
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
574
|
+
case "ProvisionedThroughputExceededException":
|
|
575
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
576
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
577
|
+
case "ResourceNotFoundException":
|
|
578
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
579
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
580
|
+
case "ThrottlingException":
|
|
581
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
582
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
583
|
+
case "ValidationException":
|
|
584
|
+
case "com.amazonaws.textract#ValidationException":
|
|
585
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
586
|
+
default:
|
|
587
|
+
const parsedBody = parsedOutput.body;
|
|
588
|
+
return throwDefaultError({
|
|
589
|
+
output,
|
|
590
|
+
parsedBody,
|
|
591
|
+
errorCode,
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
};
|
|
273
595
|
const de_DetectDocumentTextCommand = async (output, context) => {
|
|
274
596
|
if (output.statusCode >= 300) {
|
|
275
597
|
return de_DetectDocumentTextCommandError(output, context);
|
|
@@ -327,6 +649,108 @@ const de_DetectDocumentTextCommandError = async (output, context) => {
|
|
|
327
649
|
});
|
|
328
650
|
}
|
|
329
651
|
};
|
|
652
|
+
const de_GetAdapterCommand = async (output, context) => {
|
|
653
|
+
if (output.statusCode >= 300) {
|
|
654
|
+
return de_GetAdapterCommandError(output, context);
|
|
655
|
+
}
|
|
656
|
+
const data = await parseBody(output.body, context);
|
|
657
|
+
let contents = {};
|
|
658
|
+
contents = de_GetAdapterResponse(data, context);
|
|
659
|
+
const response = {
|
|
660
|
+
$metadata: deserializeMetadata(output),
|
|
661
|
+
...contents,
|
|
662
|
+
};
|
|
663
|
+
return response;
|
|
664
|
+
};
|
|
665
|
+
exports.de_GetAdapterCommand = de_GetAdapterCommand;
|
|
666
|
+
const de_GetAdapterCommandError = async (output, context) => {
|
|
667
|
+
const parsedOutput = {
|
|
668
|
+
...output,
|
|
669
|
+
body: await parseErrorBody(output.body, context),
|
|
670
|
+
};
|
|
671
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
672
|
+
switch (errorCode) {
|
|
673
|
+
case "AccessDeniedException":
|
|
674
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
675
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
676
|
+
case "InternalServerError":
|
|
677
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
678
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
679
|
+
case "InvalidParameterException":
|
|
680
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
681
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
682
|
+
case "ProvisionedThroughputExceededException":
|
|
683
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
684
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
685
|
+
case "ResourceNotFoundException":
|
|
686
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
687
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
688
|
+
case "ThrottlingException":
|
|
689
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
690
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
691
|
+
case "ValidationException":
|
|
692
|
+
case "com.amazonaws.textract#ValidationException":
|
|
693
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
694
|
+
default:
|
|
695
|
+
const parsedBody = parsedOutput.body;
|
|
696
|
+
return throwDefaultError({
|
|
697
|
+
output,
|
|
698
|
+
parsedBody,
|
|
699
|
+
errorCode,
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
const de_GetAdapterVersionCommand = async (output, context) => {
|
|
704
|
+
if (output.statusCode >= 300) {
|
|
705
|
+
return de_GetAdapterVersionCommandError(output, context);
|
|
706
|
+
}
|
|
707
|
+
const data = await parseBody(output.body, context);
|
|
708
|
+
let contents = {};
|
|
709
|
+
contents = de_GetAdapterVersionResponse(data, context);
|
|
710
|
+
const response = {
|
|
711
|
+
$metadata: deserializeMetadata(output),
|
|
712
|
+
...contents,
|
|
713
|
+
};
|
|
714
|
+
return response;
|
|
715
|
+
};
|
|
716
|
+
exports.de_GetAdapterVersionCommand = de_GetAdapterVersionCommand;
|
|
717
|
+
const de_GetAdapterVersionCommandError = async (output, context) => {
|
|
718
|
+
const parsedOutput = {
|
|
719
|
+
...output,
|
|
720
|
+
body: await parseErrorBody(output.body, context),
|
|
721
|
+
};
|
|
722
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
723
|
+
switch (errorCode) {
|
|
724
|
+
case "AccessDeniedException":
|
|
725
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
726
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
727
|
+
case "InternalServerError":
|
|
728
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
729
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
730
|
+
case "InvalidParameterException":
|
|
731
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
732
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
733
|
+
case "ProvisionedThroughputExceededException":
|
|
734
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
735
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
736
|
+
case "ResourceNotFoundException":
|
|
737
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
738
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
739
|
+
case "ThrottlingException":
|
|
740
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
741
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
742
|
+
case "ValidationException":
|
|
743
|
+
case "com.amazonaws.textract#ValidationException":
|
|
744
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
745
|
+
default:
|
|
746
|
+
const parsedBody = parsedOutput.body;
|
|
747
|
+
return throwDefaultError({
|
|
748
|
+
output,
|
|
749
|
+
parsedBody,
|
|
750
|
+
errorCode,
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
};
|
|
330
754
|
const de_GetDocumentAnalysisCommand = async (output, context) => {
|
|
331
755
|
if (output.statusCode >= 300) {
|
|
332
756
|
return de_GetDocumentAnalysisCommandError(output, context);
|
|
@@ -441,15 +865,177 @@ const de_GetExpenseAnalysisCommand = async (output, context) => {
|
|
|
441
865
|
}
|
|
442
866
|
const data = await parseBody(output.body, context);
|
|
443
867
|
let contents = {};
|
|
444
|
-
contents = de_GetExpenseAnalysisResponse(data, context);
|
|
868
|
+
contents = de_GetExpenseAnalysisResponse(data, context);
|
|
869
|
+
const response = {
|
|
870
|
+
$metadata: deserializeMetadata(output),
|
|
871
|
+
...contents,
|
|
872
|
+
};
|
|
873
|
+
return response;
|
|
874
|
+
};
|
|
875
|
+
exports.de_GetExpenseAnalysisCommand = de_GetExpenseAnalysisCommand;
|
|
876
|
+
const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
877
|
+
const parsedOutput = {
|
|
878
|
+
...output,
|
|
879
|
+
body: await parseErrorBody(output.body, context),
|
|
880
|
+
};
|
|
881
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
882
|
+
switch (errorCode) {
|
|
883
|
+
case "AccessDeniedException":
|
|
884
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
885
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
886
|
+
case "InternalServerError":
|
|
887
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
888
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
889
|
+
case "InvalidJobIdException":
|
|
890
|
+
case "com.amazonaws.textract#InvalidJobIdException":
|
|
891
|
+
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
892
|
+
case "InvalidKMSKeyException":
|
|
893
|
+
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
894
|
+
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
895
|
+
case "InvalidParameterException":
|
|
896
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
897
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
898
|
+
case "InvalidS3ObjectException":
|
|
899
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
900
|
+
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
901
|
+
case "ProvisionedThroughputExceededException":
|
|
902
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
903
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
904
|
+
case "ThrottlingException":
|
|
905
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
906
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
907
|
+
default:
|
|
908
|
+
const parsedBody = parsedOutput.body;
|
|
909
|
+
return throwDefaultError({
|
|
910
|
+
output,
|
|
911
|
+
parsedBody,
|
|
912
|
+
errorCode,
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
const de_GetLendingAnalysisCommand = async (output, context) => {
|
|
917
|
+
if (output.statusCode >= 300) {
|
|
918
|
+
return de_GetLendingAnalysisCommandError(output, context);
|
|
919
|
+
}
|
|
920
|
+
const data = await parseBody(output.body, context);
|
|
921
|
+
let contents = {};
|
|
922
|
+
contents = de_GetLendingAnalysisResponse(data, context);
|
|
923
|
+
const response = {
|
|
924
|
+
$metadata: deserializeMetadata(output),
|
|
925
|
+
...contents,
|
|
926
|
+
};
|
|
927
|
+
return response;
|
|
928
|
+
};
|
|
929
|
+
exports.de_GetLendingAnalysisCommand = de_GetLendingAnalysisCommand;
|
|
930
|
+
const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
931
|
+
const parsedOutput = {
|
|
932
|
+
...output,
|
|
933
|
+
body: await parseErrorBody(output.body, context),
|
|
934
|
+
};
|
|
935
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
936
|
+
switch (errorCode) {
|
|
937
|
+
case "AccessDeniedException":
|
|
938
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
939
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
940
|
+
case "InternalServerError":
|
|
941
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
942
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
943
|
+
case "InvalidJobIdException":
|
|
944
|
+
case "com.amazonaws.textract#InvalidJobIdException":
|
|
945
|
+
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
946
|
+
case "InvalidKMSKeyException":
|
|
947
|
+
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
948
|
+
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
949
|
+
case "InvalidParameterException":
|
|
950
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
951
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
952
|
+
case "InvalidS3ObjectException":
|
|
953
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
954
|
+
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
955
|
+
case "ProvisionedThroughputExceededException":
|
|
956
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
957
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
958
|
+
case "ThrottlingException":
|
|
959
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
960
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
961
|
+
default:
|
|
962
|
+
const parsedBody = parsedOutput.body;
|
|
963
|
+
return throwDefaultError({
|
|
964
|
+
output,
|
|
965
|
+
parsedBody,
|
|
966
|
+
errorCode,
|
|
967
|
+
});
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
|
|
971
|
+
if (output.statusCode >= 300) {
|
|
972
|
+
return de_GetLendingAnalysisSummaryCommandError(output, context);
|
|
973
|
+
}
|
|
974
|
+
const data = await parseBody(output.body, context);
|
|
975
|
+
let contents = {};
|
|
976
|
+
contents = (0, smithy_client_1._json)(data);
|
|
977
|
+
const response = {
|
|
978
|
+
$metadata: deserializeMetadata(output),
|
|
979
|
+
...contents,
|
|
980
|
+
};
|
|
981
|
+
return response;
|
|
982
|
+
};
|
|
983
|
+
exports.de_GetLendingAnalysisSummaryCommand = de_GetLendingAnalysisSummaryCommand;
|
|
984
|
+
const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
|
|
985
|
+
const parsedOutput = {
|
|
986
|
+
...output,
|
|
987
|
+
body: await parseErrorBody(output.body, context),
|
|
988
|
+
};
|
|
989
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
990
|
+
switch (errorCode) {
|
|
991
|
+
case "AccessDeniedException":
|
|
992
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
993
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
994
|
+
case "InternalServerError":
|
|
995
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
996
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
997
|
+
case "InvalidJobIdException":
|
|
998
|
+
case "com.amazonaws.textract#InvalidJobIdException":
|
|
999
|
+
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
1000
|
+
case "InvalidKMSKeyException":
|
|
1001
|
+
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1002
|
+
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
1003
|
+
case "InvalidParameterException":
|
|
1004
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
1005
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1006
|
+
case "InvalidS3ObjectException":
|
|
1007
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1008
|
+
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1009
|
+
case "ProvisionedThroughputExceededException":
|
|
1010
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1011
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1012
|
+
case "ThrottlingException":
|
|
1013
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
1014
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1015
|
+
default:
|
|
1016
|
+
const parsedBody = parsedOutput.body;
|
|
1017
|
+
return throwDefaultError({
|
|
1018
|
+
output,
|
|
1019
|
+
parsedBody,
|
|
1020
|
+
errorCode,
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
};
|
|
1024
|
+
const de_ListAdaptersCommand = async (output, context) => {
|
|
1025
|
+
if (output.statusCode >= 300) {
|
|
1026
|
+
return de_ListAdaptersCommandError(output, context);
|
|
1027
|
+
}
|
|
1028
|
+
const data = await parseBody(output.body, context);
|
|
1029
|
+
let contents = {};
|
|
1030
|
+
contents = de_ListAdaptersResponse(data, context);
|
|
445
1031
|
const response = {
|
|
446
1032
|
$metadata: deserializeMetadata(output),
|
|
447
1033
|
...contents,
|
|
448
1034
|
};
|
|
449
1035
|
return response;
|
|
450
1036
|
};
|
|
451
|
-
exports.
|
|
452
|
-
const
|
|
1037
|
+
exports.de_ListAdaptersCommand = de_ListAdaptersCommand;
|
|
1038
|
+
const de_ListAdaptersCommandError = async (output, context) => {
|
|
453
1039
|
const parsedOutput = {
|
|
454
1040
|
...output,
|
|
455
1041
|
body: await parseErrorBody(output.body, context),
|
|
@@ -462,24 +1048,18 @@ const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
|
462
1048
|
case "InternalServerError":
|
|
463
1049
|
case "com.amazonaws.textract#InternalServerError":
|
|
464
1050
|
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
465
|
-
case "InvalidJobIdException":
|
|
466
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
467
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
468
|
-
case "InvalidKMSKeyException":
|
|
469
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
470
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
471
1051
|
case "InvalidParameterException":
|
|
472
1052
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
473
1053
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
474
|
-
case "InvalidS3ObjectException":
|
|
475
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
476
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
477
1054
|
case "ProvisionedThroughputExceededException":
|
|
478
1055
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
479
1056
|
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
480
1057
|
case "ThrottlingException":
|
|
481
1058
|
case "com.amazonaws.textract#ThrottlingException":
|
|
482
1059
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1060
|
+
case "ValidationException":
|
|
1061
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1062
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
483
1063
|
default:
|
|
484
1064
|
const parsedBody = parsedOutput.body;
|
|
485
1065
|
return throwDefaultError({
|
|
@@ -489,21 +1069,21 @@ const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
|
489
1069
|
});
|
|
490
1070
|
}
|
|
491
1071
|
};
|
|
492
|
-
const
|
|
1072
|
+
const de_ListAdapterVersionsCommand = async (output, context) => {
|
|
493
1073
|
if (output.statusCode >= 300) {
|
|
494
|
-
return
|
|
1074
|
+
return de_ListAdapterVersionsCommandError(output, context);
|
|
495
1075
|
}
|
|
496
1076
|
const data = await parseBody(output.body, context);
|
|
497
1077
|
let contents = {};
|
|
498
|
-
contents =
|
|
1078
|
+
contents = de_ListAdapterVersionsResponse(data, context);
|
|
499
1079
|
const response = {
|
|
500
1080
|
$metadata: deserializeMetadata(output),
|
|
501
1081
|
...contents,
|
|
502
1082
|
};
|
|
503
1083
|
return response;
|
|
504
1084
|
};
|
|
505
|
-
exports.
|
|
506
|
-
const
|
|
1085
|
+
exports.de_ListAdapterVersionsCommand = de_ListAdapterVersionsCommand;
|
|
1086
|
+
const de_ListAdapterVersionsCommandError = async (output, context) => {
|
|
507
1087
|
const parsedOutput = {
|
|
508
1088
|
...output,
|
|
509
1089
|
body: await parseErrorBody(output.body, context),
|
|
@@ -516,24 +1096,21 @@ const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
|
516
1096
|
case "InternalServerError":
|
|
517
1097
|
case "com.amazonaws.textract#InternalServerError":
|
|
518
1098
|
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
519
|
-
case "InvalidJobIdException":
|
|
520
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
521
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
522
|
-
case "InvalidKMSKeyException":
|
|
523
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
524
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
525
1099
|
case "InvalidParameterException":
|
|
526
1100
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
527
1101
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
528
|
-
case "InvalidS3ObjectException":
|
|
529
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
530
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
531
1102
|
case "ProvisionedThroughputExceededException":
|
|
532
1103
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
533
1104
|
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1105
|
+
case "ResourceNotFoundException":
|
|
1106
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1107
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
534
1108
|
case "ThrottlingException":
|
|
535
1109
|
case "com.amazonaws.textract#ThrottlingException":
|
|
536
1110
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1111
|
+
case "ValidationException":
|
|
1112
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1113
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
537
1114
|
default:
|
|
538
1115
|
const parsedBody = parsedOutput.body;
|
|
539
1116
|
return throwDefaultError({
|
|
@@ -543,9 +1120,9 @@ const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
|
543
1120
|
});
|
|
544
1121
|
}
|
|
545
1122
|
};
|
|
546
|
-
const
|
|
1123
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
547
1124
|
if (output.statusCode >= 300) {
|
|
548
|
-
return
|
|
1125
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
549
1126
|
}
|
|
550
1127
|
const data = await parseBody(output.body, context);
|
|
551
1128
|
let contents = {};
|
|
@@ -556,8 +1133,8 @@ const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
|
|
|
556
1133
|
};
|
|
557
1134
|
return response;
|
|
558
1135
|
};
|
|
559
|
-
exports.
|
|
560
|
-
const
|
|
1136
|
+
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
1137
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
561
1138
|
const parsedOutput = {
|
|
562
1139
|
...output,
|
|
563
1140
|
body: await parseErrorBody(output.body, context),
|
|
@@ -570,24 +1147,21 @@ const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
|
|
|
570
1147
|
case "InternalServerError":
|
|
571
1148
|
case "com.amazonaws.textract#InternalServerError":
|
|
572
1149
|
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
573
|
-
case "InvalidJobIdException":
|
|
574
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
575
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
576
|
-
case "InvalidKMSKeyException":
|
|
577
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
578
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
579
1150
|
case "InvalidParameterException":
|
|
580
1151
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
581
1152
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
582
|
-
case "InvalidS3ObjectException":
|
|
583
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
584
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
585
1153
|
case "ProvisionedThroughputExceededException":
|
|
586
1154
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
587
1155
|
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1156
|
+
case "ResourceNotFoundException":
|
|
1157
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1158
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
588
1159
|
case "ThrottlingException":
|
|
589
1160
|
case "com.amazonaws.textract#ThrottlingException":
|
|
590
1161
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1162
|
+
case "ValidationException":
|
|
1163
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1164
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
591
1165
|
default:
|
|
592
1166
|
const parsedBody = parsedOutput.body;
|
|
593
1167
|
return throwDefaultError({
|
|
@@ -861,6 +1435,165 @@ const de_StartLendingAnalysisCommandError = async (output, context) => {
|
|
|
861
1435
|
});
|
|
862
1436
|
}
|
|
863
1437
|
};
|
|
1438
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
1439
|
+
if (output.statusCode >= 300) {
|
|
1440
|
+
return de_TagResourceCommandError(output, context);
|
|
1441
|
+
}
|
|
1442
|
+
const data = await parseBody(output.body, context);
|
|
1443
|
+
let contents = {};
|
|
1444
|
+
contents = (0, smithy_client_1._json)(data);
|
|
1445
|
+
const response = {
|
|
1446
|
+
$metadata: deserializeMetadata(output),
|
|
1447
|
+
...contents,
|
|
1448
|
+
};
|
|
1449
|
+
return response;
|
|
1450
|
+
};
|
|
1451
|
+
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1452
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
1453
|
+
const parsedOutput = {
|
|
1454
|
+
...output,
|
|
1455
|
+
body: await parseErrorBody(output.body, context),
|
|
1456
|
+
};
|
|
1457
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1458
|
+
switch (errorCode) {
|
|
1459
|
+
case "AccessDeniedException":
|
|
1460
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
1461
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1462
|
+
case "InternalServerError":
|
|
1463
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
1464
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1465
|
+
case "InvalidParameterException":
|
|
1466
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
1467
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1468
|
+
case "ProvisionedThroughputExceededException":
|
|
1469
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1470
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1471
|
+
case "ResourceNotFoundException":
|
|
1472
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1473
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1474
|
+
case "ServiceQuotaExceededException":
|
|
1475
|
+
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
1476
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1477
|
+
case "ThrottlingException":
|
|
1478
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
1479
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1480
|
+
case "ValidationException":
|
|
1481
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1482
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1483
|
+
default:
|
|
1484
|
+
const parsedBody = parsedOutput.body;
|
|
1485
|
+
return throwDefaultError({
|
|
1486
|
+
output,
|
|
1487
|
+
parsedBody,
|
|
1488
|
+
errorCode,
|
|
1489
|
+
});
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
1493
|
+
if (output.statusCode >= 300) {
|
|
1494
|
+
return de_UntagResourceCommandError(output, context);
|
|
1495
|
+
}
|
|
1496
|
+
const data = await parseBody(output.body, context);
|
|
1497
|
+
let contents = {};
|
|
1498
|
+
contents = (0, smithy_client_1._json)(data);
|
|
1499
|
+
const response = {
|
|
1500
|
+
$metadata: deserializeMetadata(output),
|
|
1501
|
+
...contents,
|
|
1502
|
+
};
|
|
1503
|
+
return response;
|
|
1504
|
+
};
|
|
1505
|
+
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1506
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
1507
|
+
const parsedOutput = {
|
|
1508
|
+
...output,
|
|
1509
|
+
body: await parseErrorBody(output.body, context),
|
|
1510
|
+
};
|
|
1511
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1512
|
+
switch (errorCode) {
|
|
1513
|
+
case "AccessDeniedException":
|
|
1514
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
1515
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1516
|
+
case "InternalServerError":
|
|
1517
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
1518
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1519
|
+
case "InvalidParameterException":
|
|
1520
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
1521
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1522
|
+
case "ProvisionedThroughputExceededException":
|
|
1523
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1524
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1525
|
+
case "ResourceNotFoundException":
|
|
1526
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1527
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1528
|
+
case "ThrottlingException":
|
|
1529
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
1530
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1531
|
+
case "ValidationException":
|
|
1532
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1533
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1534
|
+
default:
|
|
1535
|
+
const parsedBody = parsedOutput.body;
|
|
1536
|
+
return throwDefaultError({
|
|
1537
|
+
output,
|
|
1538
|
+
parsedBody,
|
|
1539
|
+
errorCode,
|
|
1540
|
+
});
|
|
1541
|
+
}
|
|
1542
|
+
};
|
|
1543
|
+
const de_UpdateAdapterCommand = async (output, context) => {
|
|
1544
|
+
if (output.statusCode >= 300) {
|
|
1545
|
+
return de_UpdateAdapterCommandError(output, context);
|
|
1546
|
+
}
|
|
1547
|
+
const data = await parseBody(output.body, context);
|
|
1548
|
+
let contents = {};
|
|
1549
|
+
contents = de_UpdateAdapterResponse(data, context);
|
|
1550
|
+
const response = {
|
|
1551
|
+
$metadata: deserializeMetadata(output),
|
|
1552
|
+
...contents,
|
|
1553
|
+
};
|
|
1554
|
+
return response;
|
|
1555
|
+
};
|
|
1556
|
+
exports.de_UpdateAdapterCommand = de_UpdateAdapterCommand;
|
|
1557
|
+
const de_UpdateAdapterCommandError = async (output, context) => {
|
|
1558
|
+
const parsedOutput = {
|
|
1559
|
+
...output,
|
|
1560
|
+
body: await parseErrorBody(output.body, context),
|
|
1561
|
+
};
|
|
1562
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1563
|
+
switch (errorCode) {
|
|
1564
|
+
case "AccessDeniedException":
|
|
1565
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
1566
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1567
|
+
case "ConflictException":
|
|
1568
|
+
case "com.amazonaws.textract#ConflictException":
|
|
1569
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1570
|
+
case "InternalServerError":
|
|
1571
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
1572
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1573
|
+
case "InvalidParameterException":
|
|
1574
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
1575
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1576
|
+
case "ProvisionedThroughputExceededException":
|
|
1577
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1578
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1579
|
+
case "ResourceNotFoundException":
|
|
1580
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1581
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1582
|
+
case "ThrottlingException":
|
|
1583
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
1584
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1585
|
+
case "ValidationException":
|
|
1586
|
+
case "com.amazonaws.textract#ValidationException":
|
|
1587
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1588
|
+
default:
|
|
1589
|
+
const parsedBody = parsedOutput.body;
|
|
1590
|
+
return throwDefaultError({
|
|
1591
|
+
output,
|
|
1592
|
+
parsedBody,
|
|
1593
|
+
errorCode,
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
};
|
|
864
1597
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
865
1598
|
const body = parsedOutput.body;
|
|
866
1599
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -879,6 +1612,15 @@ const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
|
|
|
879
1612
|
});
|
|
880
1613
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
881
1614
|
};
|
|
1615
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1616
|
+
const body = parsedOutput.body;
|
|
1617
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1618
|
+
const exception = new models_0_1.ConflictException({
|
|
1619
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1620
|
+
...deserialized,
|
|
1621
|
+
});
|
|
1622
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1623
|
+
};
|
|
882
1624
|
const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
883
1625
|
const body = parsedOutput.body;
|
|
884
1626
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -969,6 +1711,24 @@ const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, contex
|
|
|
969
1711
|
});
|
|
970
1712
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
971
1713
|
};
|
|
1714
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1715
|
+
const body = parsedOutput.body;
|
|
1716
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1717
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
1718
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1719
|
+
...deserialized,
|
|
1720
|
+
});
|
|
1721
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1722
|
+
};
|
|
1723
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1724
|
+
const body = parsedOutput.body;
|
|
1725
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1726
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1727
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1728
|
+
...deserialized,
|
|
1729
|
+
});
|
|
1730
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1731
|
+
};
|
|
972
1732
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
973
1733
|
const body = parsedOutput.body;
|
|
974
1734
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -987,8 +1747,18 @@ const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
|
|
|
987
1747
|
});
|
|
988
1748
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
989
1749
|
};
|
|
1750
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1751
|
+
const body = parsedOutput.body;
|
|
1752
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1753
|
+
const exception = new models_0_1.ValidationException({
|
|
1754
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1755
|
+
...deserialized,
|
|
1756
|
+
});
|
|
1757
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1758
|
+
};
|
|
990
1759
|
const se_AnalyzeDocumentRequest = (input, context) => {
|
|
991
1760
|
return (0, smithy_client_1.take)(input, {
|
|
1761
|
+
AdaptersConfig: smithy_client_1._json,
|
|
992
1762
|
Document: (_) => se_Document(_, context),
|
|
993
1763
|
FeatureTypes: smithy_client_1._json,
|
|
994
1764
|
HumanLoopConfig: smithy_client_1._json,
|
|
@@ -1005,6 +1775,26 @@ const se_AnalyzeIDRequest = (input, context) => {
|
|
|
1005
1775
|
DocumentPages: (_) => se_DocumentPages(_, context),
|
|
1006
1776
|
});
|
|
1007
1777
|
};
|
|
1778
|
+
const se_CreateAdapterRequest = (input, context) => {
|
|
1779
|
+
return (0, smithy_client_1.take)(input, {
|
|
1780
|
+
AdapterName: [],
|
|
1781
|
+
AutoUpdate: [],
|
|
1782
|
+
ClientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1783
|
+
Description: [],
|
|
1784
|
+
FeatureTypes: smithy_client_1._json,
|
|
1785
|
+
Tags: smithy_client_1._json,
|
|
1786
|
+
});
|
|
1787
|
+
};
|
|
1788
|
+
const se_CreateAdapterVersionRequest = (input, context) => {
|
|
1789
|
+
return (0, smithy_client_1.take)(input, {
|
|
1790
|
+
AdapterId: [],
|
|
1791
|
+
ClientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1792
|
+
DatasetConfig: smithy_client_1._json,
|
|
1793
|
+
KMSKeyId: [],
|
|
1794
|
+
OutputConfig: smithy_client_1._json,
|
|
1795
|
+
Tags: smithy_client_1._json,
|
|
1796
|
+
});
|
|
1797
|
+
};
|
|
1008
1798
|
const se_DetectDocumentTextRequest = (input, context) => {
|
|
1009
1799
|
return (0, smithy_client_1.take)(input, {
|
|
1010
1800
|
Document: (_) => se_Document(_, context),
|
|
@@ -1023,6 +1813,72 @@ const se_DocumentPages = (input, context) => {
|
|
|
1023
1813
|
return se_Document(entry, context);
|
|
1024
1814
|
});
|
|
1025
1815
|
};
|
|
1816
|
+
const se_ListAdaptersRequest = (input, context) => {
|
|
1817
|
+
return (0, smithy_client_1.take)(input, {
|
|
1818
|
+
AfterCreationTime: (_) => Math.round(_.getTime() / 1000),
|
|
1819
|
+
BeforeCreationTime: (_) => Math.round(_.getTime() / 1000),
|
|
1820
|
+
MaxResults: [],
|
|
1821
|
+
NextToken: [],
|
|
1822
|
+
});
|
|
1823
|
+
};
|
|
1824
|
+
const se_ListAdapterVersionsRequest = (input, context) => {
|
|
1825
|
+
return (0, smithy_client_1.take)(input, {
|
|
1826
|
+
AdapterId: [],
|
|
1827
|
+
AfterCreationTime: (_) => Math.round(_.getTime() / 1000),
|
|
1828
|
+
BeforeCreationTime: (_) => Math.round(_.getTime() / 1000),
|
|
1829
|
+
MaxResults: [],
|
|
1830
|
+
NextToken: [],
|
|
1831
|
+
});
|
|
1832
|
+
};
|
|
1833
|
+
const de_AdapterList = (output, context) => {
|
|
1834
|
+
const retVal = (output || [])
|
|
1835
|
+
.filter((e) => e != null)
|
|
1836
|
+
.map((entry) => {
|
|
1837
|
+
return de_AdapterOverview(entry, context);
|
|
1838
|
+
});
|
|
1839
|
+
return retVal;
|
|
1840
|
+
};
|
|
1841
|
+
const de_AdapterOverview = (output, context) => {
|
|
1842
|
+
return (0, smithy_client_1.take)(output, {
|
|
1843
|
+
AdapterId: smithy_client_1.expectString,
|
|
1844
|
+
AdapterName: smithy_client_1.expectString,
|
|
1845
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1846
|
+
FeatureTypes: smithy_client_1._json,
|
|
1847
|
+
});
|
|
1848
|
+
};
|
|
1849
|
+
const de_AdapterVersionEvaluationMetric = (output, context) => {
|
|
1850
|
+
return (0, smithy_client_1.take)(output, {
|
|
1851
|
+
AdapterVersion: (_) => de_EvaluationMetric(_, context),
|
|
1852
|
+
Baseline: (_) => de_EvaluationMetric(_, context),
|
|
1853
|
+
FeatureType: smithy_client_1.expectString,
|
|
1854
|
+
});
|
|
1855
|
+
};
|
|
1856
|
+
const de_AdapterVersionEvaluationMetrics = (output, context) => {
|
|
1857
|
+
const retVal = (output || [])
|
|
1858
|
+
.filter((e) => e != null)
|
|
1859
|
+
.map((entry) => {
|
|
1860
|
+
return de_AdapterVersionEvaluationMetric(entry, context);
|
|
1861
|
+
});
|
|
1862
|
+
return retVal;
|
|
1863
|
+
};
|
|
1864
|
+
const de_AdapterVersionList = (output, context) => {
|
|
1865
|
+
const retVal = (output || [])
|
|
1866
|
+
.filter((e) => e != null)
|
|
1867
|
+
.map((entry) => {
|
|
1868
|
+
return de_AdapterVersionOverview(entry, context);
|
|
1869
|
+
});
|
|
1870
|
+
return retVal;
|
|
1871
|
+
};
|
|
1872
|
+
const de_AdapterVersionOverview = (output, context) => {
|
|
1873
|
+
return (0, smithy_client_1.take)(output, {
|
|
1874
|
+
AdapterId: smithy_client_1.expectString,
|
|
1875
|
+
AdapterVersion: smithy_client_1.expectString,
|
|
1876
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1877
|
+
FeatureTypes: smithy_client_1._json,
|
|
1878
|
+
Status: smithy_client_1.expectString,
|
|
1879
|
+
StatusMessage: smithy_client_1.expectString,
|
|
1880
|
+
});
|
|
1881
|
+
};
|
|
1026
1882
|
const de_AnalyzeDocumentResponse = (output, context) => {
|
|
1027
1883
|
return (0, smithy_client_1.take)(output, {
|
|
1028
1884
|
AnalyzeDocumentModelVersion: smithy_client_1.expectString,
|
|
@@ -1093,6 +1949,13 @@ const de_DetectDocumentTextResponse = (output, context) => {
|
|
|
1093
1949
|
DocumentMetadata: smithy_client_1._json,
|
|
1094
1950
|
});
|
|
1095
1951
|
};
|
|
1952
|
+
const de_EvaluationMetric = (output, context) => {
|
|
1953
|
+
return (0, smithy_client_1.take)(output, {
|
|
1954
|
+
F1Score: smithy_client_1.limitedParseFloat32,
|
|
1955
|
+
Precision: smithy_client_1.limitedParseFloat32,
|
|
1956
|
+
Recall: smithy_client_1.limitedParseFloat32,
|
|
1957
|
+
});
|
|
1958
|
+
};
|
|
1096
1959
|
const de_ExpenseCurrency = (output, context) => {
|
|
1097
1960
|
return (0, smithy_client_1.take)(output, {
|
|
1098
1961
|
Code: smithy_client_1.expectString,
|
|
@@ -1167,6 +2030,32 @@ const de_Geometry = (output, context) => {
|
|
|
1167
2030
|
Polygon: (_) => de_Polygon(_, context),
|
|
1168
2031
|
});
|
|
1169
2032
|
};
|
|
2033
|
+
const de_GetAdapterResponse = (output, context) => {
|
|
2034
|
+
return (0, smithy_client_1.take)(output, {
|
|
2035
|
+
AdapterId: smithy_client_1.expectString,
|
|
2036
|
+
AdapterName: smithy_client_1.expectString,
|
|
2037
|
+
AutoUpdate: smithy_client_1.expectString,
|
|
2038
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2039
|
+
Description: smithy_client_1.expectString,
|
|
2040
|
+
FeatureTypes: smithy_client_1._json,
|
|
2041
|
+
Tags: smithy_client_1._json,
|
|
2042
|
+
});
|
|
2043
|
+
};
|
|
2044
|
+
const de_GetAdapterVersionResponse = (output, context) => {
|
|
2045
|
+
return (0, smithy_client_1.take)(output, {
|
|
2046
|
+
AdapterId: smithy_client_1.expectString,
|
|
2047
|
+
AdapterVersion: smithy_client_1.expectString,
|
|
2048
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2049
|
+
DatasetConfig: smithy_client_1._json,
|
|
2050
|
+
EvaluationMetrics: (_) => de_AdapterVersionEvaluationMetrics(_, context),
|
|
2051
|
+
FeatureTypes: smithy_client_1._json,
|
|
2052
|
+
KMSKeyId: smithy_client_1.expectString,
|
|
2053
|
+
OutputConfig: smithy_client_1._json,
|
|
2054
|
+
Status: smithy_client_1.expectString,
|
|
2055
|
+
StatusMessage: smithy_client_1.expectString,
|
|
2056
|
+
Tags: smithy_client_1._json,
|
|
2057
|
+
});
|
|
2058
|
+
};
|
|
1170
2059
|
const de_GetDocumentAnalysisResponse = (output, context) => {
|
|
1171
2060
|
return (0, smithy_client_1.take)(output, {
|
|
1172
2061
|
AnalyzeDocumentModelVersion: smithy_client_1.expectString,
|
|
@@ -1326,6 +2215,18 @@ const de_LineItemList = (output, context) => {
|
|
|
1326
2215
|
});
|
|
1327
2216
|
return retVal;
|
|
1328
2217
|
};
|
|
2218
|
+
const de_ListAdaptersResponse = (output, context) => {
|
|
2219
|
+
return (0, smithy_client_1.take)(output, {
|
|
2220
|
+
Adapters: (_) => de_AdapterList(_, context),
|
|
2221
|
+
NextToken: smithy_client_1.expectString,
|
|
2222
|
+
});
|
|
2223
|
+
};
|
|
2224
|
+
const de_ListAdapterVersionsResponse = (output, context) => {
|
|
2225
|
+
return (0, smithy_client_1.take)(output, {
|
|
2226
|
+
AdapterVersions: (_) => de_AdapterVersionList(_, context),
|
|
2227
|
+
NextToken: smithy_client_1.expectString,
|
|
2228
|
+
});
|
|
2229
|
+
};
|
|
1329
2230
|
const de_PageClassification = (output, context) => {
|
|
1330
2231
|
return (0, smithy_client_1.take)(output, {
|
|
1331
2232
|
PageNumber: (_) => de_PredictionList(_, context),
|
|
@@ -1374,6 +2275,16 @@ const de_SignatureDetectionList = (output, context) => {
|
|
|
1374
2275
|
});
|
|
1375
2276
|
return retVal;
|
|
1376
2277
|
};
|
|
2278
|
+
const de_UpdateAdapterResponse = (output, context) => {
|
|
2279
|
+
return (0, smithy_client_1.take)(output, {
|
|
2280
|
+
AdapterId: smithy_client_1.expectString,
|
|
2281
|
+
AdapterName: smithy_client_1.expectString,
|
|
2282
|
+
AutoUpdate: smithy_client_1.expectString,
|
|
2283
|
+
CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2284
|
+
Description: smithy_client_1.expectString,
|
|
2285
|
+
FeatureTypes: smithy_client_1._json,
|
|
2286
|
+
});
|
|
2287
|
+
};
|
|
1377
2288
|
const deserializeMetadata = (output) => ({
|
|
1378
2289
|
httpStatusCode: output.statusCode,
|
|
1379
2290
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|