@aws-sdk/client-textract 3.489.0 → 3.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/Textract.js +1 -61
- package/dist-cjs/TextractClient.js +1 -43
- package/dist-cjs/commands/AnalyzeDocumentCommand.js +1 -28
- package/dist-cjs/commands/AnalyzeExpenseCommand.js +1 -28
- package/dist-cjs/commands/AnalyzeIDCommand.js +1 -28
- package/dist-cjs/commands/CreateAdapterCommand.js +1 -28
- package/dist-cjs/commands/CreateAdapterVersionCommand.js +1 -28
- package/dist-cjs/commands/DeleteAdapterCommand.js +1 -28
- package/dist-cjs/commands/DeleteAdapterVersionCommand.js +1 -28
- package/dist-cjs/commands/DetectDocumentTextCommand.js +1 -28
- package/dist-cjs/commands/GetAdapterCommand.js +1 -28
- package/dist-cjs/commands/GetAdapterVersionCommand.js +1 -28
- package/dist-cjs/commands/GetDocumentAnalysisCommand.js +1 -28
- package/dist-cjs/commands/GetDocumentTextDetectionCommand.js +1 -28
- package/dist-cjs/commands/GetExpenseAnalysisCommand.js +1 -28
- package/dist-cjs/commands/GetLendingAnalysisCommand.js +1 -28
- package/dist-cjs/commands/GetLendingAnalysisSummaryCommand.js +1 -28
- package/dist-cjs/commands/ListAdapterVersionsCommand.js +1 -28
- package/dist-cjs/commands/ListAdaptersCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/StartDocumentAnalysisCommand.js +1 -28
- package/dist-cjs/commands/StartDocumentTextDetectionCommand.js +1 -28
- package/dist-cjs/commands/StartExpenseAnalysisCommand.js +1 -28
- package/dist-cjs/commands/StartLendingAnalysisCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateAdapterCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -28
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +3428 -11
- package/dist-cjs/models/TextractServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -364
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListAdapterVersionsPaginator.js +1 -7
- package/dist-cjs/pagination/ListAdaptersPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -6
- package/dist-cjs/protocols/Aws_json1_1.js +1 -2359
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,2359 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const uuid_1 = require("uuid");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const TextractServiceException_1 = require("../models/TextractServiceException");
|
|
9
|
-
const se_AnalyzeDocumentCommand = async (input, context) => {
|
|
10
|
-
const headers = sharedHeaders("AnalyzeDocument");
|
|
11
|
-
let body;
|
|
12
|
-
body = JSON.stringify(se_AnalyzeDocumentRequest(input, context));
|
|
13
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
|
-
};
|
|
15
|
-
exports.se_AnalyzeDocumentCommand = se_AnalyzeDocumentCommand;
|
|
16
|
-
const se_AnalyzeExpenseCommand = async (input, context) => {
|
|
17
|
-
const headers = sharedHeaders("AnalyzeExpense");
|
|
18
|
-
let body;
|
|
19
|
-
body = JSON.stringify(se_AnalyzeExpenseRequest(input, context));
|
|
20
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
21
|
-
};
|
|
22
|
-
exports.se_AnalyzeExpenseCommand = se_AnalyzeExpenseCommand;
|
|
23
|
-
const se_AnalyzeIDCommand = async (input, context) => {
|
|
24
|
-
const headers = sharedHeaders("AnalyzeID");
|
|
25
|
-
let body;
|
|
26
|
-
body = JSON.stringify(se_AnalyzeIDRequest(input, context));
|
|
27
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
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;
|
|
58
|
-
const se_DetectDocumentTextCommand = async (input, context) => {
|
|
59
|
-
const headers = sharedHeaders("DetectDocumentText");
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify(se_DetectDocumentTextRequest(input, context));
|
|
62
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
63
|
-
};
|
|
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;
|
|
79
|
-
const se_GetDocumentAnalysisCommand = async (input, context) => {
|
|
80
|
-
const headers = sharedHeaders("GetDocumentAnalysis");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
83
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
84
|
-
};
|
|
85
|
-
exports.se_GetDocumentAnalysisCommand = se_GetDocumentAnalysisCommand;
|
|
86
|
-
const se_GetDocumentTextDetectionCommand = async (input, context) => {
|
|
87
|
-
const headers = sharedHeaders("GetDocumentTextDetection");
|
|
88
|
-
let body;
|
|
89
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
90
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
91
|
-
};
|
|
92
|
-
exports.se_GetDocumentTextDetectionCommand = se_GetDocumentTextDetectionCommand;
|
|
93
|
-
const se_GetExpenseAnalysisCommand = async (input, context) => {
|
|
94
|
-
const headers = sharedHeaders("GetExpenseAnalysis");
|
|
95
|
-
let body;
|
|
96
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
97
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
98
|
-
};
|
|
99
|
-
exports.se_GetExpenseAnalysisCommand = se_GetExpenseAnalysisCommand;
|
|
100
|
-
const se_GetLendingAnalysisCommand = async (input, context) => {
|
|
101
|
-
const headers = sharedHeaders("GetLendingAnalysis");
|
|
102
|
-
let body;
|
|
103
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
104
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
105
|
-
};
|
|
106
|
-
exports.se_GetLendingAnalysisCommand = se_GetLendingAnalysisCommand;
|
|
107
|
-
const se_GetLendingAnalysisSummaryCommand = async (input, context) => {
|
|
108
|
-
const headers = sharedHeaders("GetLendingAnalysisSummary");
|
|
109
|
-
let body;
|
|
110
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
111
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
|
-
};
|
|
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;
|
|
135
|
-
const se_StartDocumentAnalysisCommand = async (input, context) => {
|
|
136
|
-
const headers = sharedHeaders("StartDocumentAnalysis");
|
|
137
|
-
let body;
|
|
138
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
139
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
140
|
-
};
|
|
141
|
-
exports.se_StartDocumentAnalysisCommand = se_StartDocumentAnalysisCommand;
|
|
142
|
-
const se_StartDocumentTextDetectionCommand = async (input, context) => {
|
|
143
|
-
const headers = sharedHeaders("StartDocumentTextDetection");
|
|
144
|
-
let body;
|
|
145
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
146
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
147
|
-
};
|
|
148
|
-
exports.se_StartDocumentTextDetectionCommand = se_StartDocumentTextDetectionCommand;
|
|
149
|
-
const se_StartExpenseAnalysisCommand = async (input, context) => {
|
|
150
|
-
const headers = sharedHeaders("StartExpenseAnalysis");
|
|
151
|
-
let body;
|
|
152
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
153
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
154
|
-
};
|
|
155
|
-
exports.se_StartExpenseAnalysisCommand = se_StartExpenseAnalysisCommand;
|
|
156
|
-
const se_StartLendingAnalysisCommand = async (input, context) => {
|
|
157
|
-
const headers = sharedHeaders("StartLendingAnalysis");
|
|
158
|
-
let body;
|
|
159
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
160
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
161
|
-
};
|
|
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;
|
|
184
|
-
const de_AnalyzeDocumentCommand = async (output, context) => {
|
|
185
|
-
if (output.statusCode >= 300) {
|
|
186
|
-
return de_AnalyzeDocumentCommandError(output, context);
|
|
187
|
-
}
|
|
188
|
-
const data = await parseBody(output.body, context);
|
|
189
|
-
let contents = {};
|
|
190
|
-
contents = de_AnalyzeDocumentResponse(data, context);
|
|
191
|
-
const response = {
|
|
192
|
-
$metadata: deserializeMetadata(output),
|
|
193
|
-
...contents,
|
|
194
|
-
};
|
|
195
|
-
return response;
|
|
196
|
-
};
|
|
197
|
-
exports.de_AnalyzeDocumentCommand = de_AnalyzeDocumentCommand;
|
|
198
|
-
const de_AnalyzeDocumentCommandError = async (output, context) => {
|
|
199
|
-
const parsedOutput = {
|
|
200
|
-
...output,
|
|
201
|
-
body: await parseErrorBody(output.body, context),
|
|
202
|
-
};
|
|
203
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
204
|
-
switch (errorCode) {
|
|
205
|
-
case "AccessDeniedException":
|
|
206
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
207
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
208
|
-
case "BadDocumentException":
|
|
209
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
210
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
211
|
-
case "DocumentTooLargeException":
|
|
212
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
213
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
214
|
-
case "HumanLoopQuotaExceededException":
|
|
215
|
-
case "com.amazonaws.textract#HumanLoopQuotaExceededException":
|
|
216
|
-
throw await de_HumanLoopQuotaExceededExceptionRes(parsedOutput, context);
|
|
217
|
-
case "InternalServerError":
|
|
218
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
219
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
220
|
-
case "InvalidParameterException":
|
|
221
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
222
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
223
|
-
case "InvalidS3ObjectException":
|
|
224
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
225
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
226
|
-
case "ProvisionedThroughputExceededException":
|
|
227
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
228
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
229
|
-
case "ThrottlingException":
|
|
230
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
231
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
232
|
-
case "UnsupportedDocumentException":
|
|
233
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
234
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
235
|
-
default:
|
|
236
|
-
const parsedBody = parsedOutput.body;
|
|
237
|
-
return throwDefaultError({
|
|
238
|
-
output,
|
|
239
|
-
parsedBody,
|
|
240
|
-
errorCode,
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
const de_AnalyzeExpenseCommand = async (output, context) => {
|
|
245
|
-
if (output.statusCode >= 300) {
|
|
246
|
-
return de_AnalyzeExpenseCommandError(output, context);
|
|
247
|
-
}
|
|
248
|
-
const data = await parseBody(output.body, context);
|
|
249
|
-
let contents = {};
|
|
250
|
-
contents = de_AnalyzeExpenseResponse(data, context);
|
|
251
|
-
const response = {
|
|
252
|
-
$metadata: deserializeMetadata(output),
|
|
253
|
-
...contents,
|
|
254
|
-
};
|
|
255
|
-
return response;
|
|
256
|
-
};
|
|
257
|
-
exports.de_AnalyzeExpenseCommand = de_AnalyzeExpenseCommand;
|
|
258
|
-
const de_AnalyzeExpenseCommandError = async (output, context) => {
|
|
259
|
-
const parsedOutput = {
|
|
260
|
-
...output,
|
|
261
|
-
body: await parseErrorBody(output.body, context),
|
|
262
|
-
};
|
|
263
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
264
|
-
switch (errorCode) {
|
|
265
|
-
case "AccessDeniedException":
|
|
266
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
267
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
268
|
-
case "BadDocumentException":
|
|
269
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
270
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
271
|
-
case "DocumentTooLargeException":
|
|
272
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
273
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
274
|
-
case "InternalServerError":
|
|
275
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
276
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
277
|
-
case "InvalidParameterException":
|
|
278
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
279
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
280
|
-
case "InvalidS3ObjectException":
|
|
281
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
282
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
283
|
-
case "ProvisionedThroughputExceededException":
|
|
284
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
285
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
286
|
-
case "ThrottlingException":
|
|
287
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
288
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
289
|
-
case "UnsupportedDocumentException":
|
|
290
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
291
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
292
|
-
default:
|
|
293
|
-
const parsedBody = parsedOutput.body;
|
|
294
|
-
return throwDefaultError({
|
|
295
|
-
output,
|
|
296
|
-
parsedBody,
|
|
297
|
-
errorCode,
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
const de_AnalyzeIDCommand = async (output, context) => {
|
|
302
|
-
if (output.statusCode >= 300) {
|
|
303
|
-
return de_AnalyzeIDCommandError(output, context);
|
|
304
|
-
}
|
|
305
|
-
const data = await parseBody(output.body, context);
|
|
306
|
-
let contents = {};
|
|
307
|
-
contents = de_AnalyzeIDResponse(data, context);
|
|
308
|
-
const response = {
|
|
309
|
-
$metadata: deserializeMetadata(output),
|
|
310
|
-
...contents,
|
|
311
|
-
};
|
|
312
|
-
return response;
|
|
313
|
-
};
|
|
314
|
-
exports.de_AnalyzeIDCommand = de_AnalyzeIDCommand;
|
|
315
|
-
const de_AnalyzeIDCommandError = async (output, context) => {
|
|
316
|
-
const parsedOutput = {
|
|
317
|
-
...output,
|
|
318
|
-
body: await parseErrorBody(output.body, context),
|
|
319
|
-
};
|
|
320
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
321
|
-
switch (errorCode) {
|
|
322
|
-
case "AccessDeniedException":
|
|
323
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
324
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
325
|
-
case "BadDocumentException":
|
|
326
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
327
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
328
|
-
case "DocumentTooLargeException":
|
|
329
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
330
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
331
|
-
case "InternalServerError":
|
|
332
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
333
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
334
|
-
case "InvalidParameterException":
|
|
335
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
336
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
337
|
-
case "InvalidS3ObjectException":
|
|
338
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
339
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
340
|
-
case "ProvisionedThroughputExceededException":
|
|
341
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
342
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
343
|
-
case "ThrottlingException":
|
|
344
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
345
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
346
|
-
case "UnsupportedDocumentException":
|
|
347
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
348
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
349
|
-
default:
|
|
350
|
-
const parsedBody = parsedOutput.body;
|
|
351
|
-
return throwDefaultError({
|
|
352
|
-
output,
|
|
353
|
-
parsedBody,
|
|
354
|
-
errorCode,
|
|
355
|
-
});
|
|
356
|
-
}
|
|
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
|
-
};
|
|
595
|
-
const de_DetectDocumentTextCommand = async (output, context) => {
|
|
596
|
-
if (output.statusCode >= 300) {
|
|
597
|
-
return de_DetectDocumentTextCommandError(output, context);
|
|
598
|
-
}
|
|
599
|
-
const data = await parseBody(output.body, context);
|
|
600
|
-
let contents = {};
|
|
601
|
-
contents = de_DetectDocumentTextResponse(data, context);
|
|
602
|
-
const response = {
|
|
603
|
-
$metadata: deserializeMetadata(output),
|
|
604
|
-
...contents,
|
|
605
|
-
};
|
|
606
|
-
return response;
|
|
607
|
-
};
|
|
608
|
-
exports.de_DetectDocumentTextCommand = de_DetectDocumentTextCommand;
|
|
609
|
-
const de_DetectDocumentTextCommandError = async (output, context) => {
|
|
610
|
-
const parsedOutput = {
|
|
611
|
-
...output,
|
|
612
|
-
body: await parseErrorBody(output.body, context),
|
|
613
|
-
};
|
|
614
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
615
|
-
switch (errorCode) {
|
|
616
|
-
case "AccessDeniedException":
|
|
617
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
618
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
619
|
-
case "BadDocumentException":
|
|
620
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
621
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
622
|
-
case "DocumentTooLargeException":
|
|
623
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
624
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
625
|
-
case "InternalServerError":
|
|
626
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
627
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
628
|
-
case "InvalidParameterException":
|
|
629
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
630
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
631
|
-
case "InvalidS3ObjectException":
|
|
632
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
633
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
634
|
-
case "ProvisionedThroughputExceededException":
|
|
635
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
636
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
637
|
-
case "ThrottlingException":
|
|
638
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
639
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
640
|
-
case "UnsupportedDocumentException":
|
|
641
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
642
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
643
|
-
default:
|
|
644
|
-
const parsedBody = parsedOutput.body;
|
|
645
|
-
return throwDefaultError({
|
|
646
|
-
output,
|
|
647
|
-
parsedBody,
|
|
648
|
-
errorCode,
|
|
649
|
-
});
|
|
650
|
-
}
|
|
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
|
-
};
|
|
754
|
-
const de_GetDocumentAnalysisCommand = async (output, context) => {
|
|
755
|
-
if (output.statusCode >= 300) {
|
|
756
|
-
return de_GetDocumentAnalysisCommandError(output, context);
|
|
757
|
-
}
|
|
758
|
-
const data = await parseBody(output.body, context);
|
|
759
|
-
let contents = {};
|
|
760
|
-
contents = de_GetDocumentAnalysisResponse(data, context);
|
|
761
|
-
const response = {
|
|
762
|
-
$metadata: deserializeMetadata(output),
|
|
763
|
-
...contents,
|
|
764
|
-
};
|
|
765
|
-
return response;
|
|
766
|
-
};
|
|
767
|
-
exports.de_GetDocumentAnalysisCommand = de_GetDocumentAnalysisCommand;
|
|
768
|
-
const de_GetDocumentAnalysisCommandError = async (output, context) => {
|
|
769
|
-
const parsedOutput = {
|
|
770
|
-
...output,
|
|
771
|
-
body: await parseErrorBody(output.body, context),
|
|
772
|
-
};
|
|
773
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
774
|
-
switch (errorCode) {
|
|
775
|
-
case "AccessDeniedException":
|
|
776
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
777
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
778
|
-
case "InternalServerError":
|
|
779
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
780
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
781
|
-
case "InvalidJobIdException":
|
|
782
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
783
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
784
|
-
case "InvalidKMSKeyException":
|
|
785
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
786
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
787
|
-
case "InvalidParameterException":
|
|
788
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
789
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
790
|
-
case "InvalidS3ObjectException":
|
|
791
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
792
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
793
|
-
case "ProvisionedThroughputExceededException":
|
|
794
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
795
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
796
|
-
case "ThrottlingException":
|
|
797
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
798
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
799
|
-
default:
|
|
800
|
-
const parsedBody = parsedOutput.body;
|
|
801
|
-
return throwDefaultError({
|
|
802
|
-
output,
|
|
803
|
-
parsedBody,
|
|
804
|
-
errorCode,
|
|
805
|
-
});
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
const de_GetDocumentTextDetectionCommand = async (output, context) => {
|
|
809
|
-
if (output.statusCode >= 300) {
|
|
810
|
-
return de_GetDocumentTextDetectionCommandError(output, context);
|
|
811
|
-
}
|
|
812
|
-
const data = await parseBody(output.body, context);
|
|
813
|
-
let contents = {};
|
|
814
|
-
contents = de_GetDocumentTextDetectionResponse(data, context);
|
|
815
|
-
const response = {
|
|
816
|
-
$metadata: deserializeMetadata(output),
|
|
817
|
-
...contents,
|
|
818
|
-
};
|
|
819
|
-
return response;
|
|
820
|
-
};
|
|
821
|
-
exports.de_GetDocumentTextDetectionCommand = de_GetDocumentTextDetectionCommand;
|
|
822
|
-
const de_GetDocumentTextDetectionCommandError = async (output, context) => {
|
|
823
|
-
const parsedOutput = {
|
|
824
|
-
...output,
|
|
825
|
-
body: await parseErrorBody(output.body, context),
|
|
826
|
-
};
|
|
827
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
828
|
-
switch (errorCode) {
|
|
829
|
-
case "AccessDeniedException":
|
|
830
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
831
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
832
|
-
case "InternalServerError":
|
|
833
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
834
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
835
|
-
case "InvalidJobIdException":
|
|
836
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
837
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
838
|
-
case "InvalidKMSKeyException":
|
|
839
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
840
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
841
|
-
case "InvalidParameterException":
|
|
842
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
843
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
844
|
-
case "InvalidS3ObjectException":
|
|
845
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
846
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
847
|
-
case "ProvisionedThroughputExceededException":
|
|
848
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
849
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
850
|
-
case "ThrottlingException":
|
|
851
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
852
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
853
|
-
default:
|
|
854
|
-
const parsedBody = parsedOutput.body;
|
|
855
|
-
return throwDefaultError({
|
|
856
|
-
output,
|
|
857
|
-
parsedBody,
|
|
858
|
-
errorCode,
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
|
-
};
|
|
862
|
-
const de_GetExpenseAnalysisCommand = async (output, context) => {
|
|
863
|
-
if (output.statusCode >= 300) {
|
|
864
|
-
return de_GetExpenseAnalysisCommandError(output, context);
|
|
865
|
-
}
|
|
866
|
-
const data = await parseBody(output.body, context);
|
|
867
|
-
let contents = {};
|
|
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);
|
|
1031
|
-
const response = {
|
|
1032
|
-
$metadata: deserializeMetadata(output),
|
|
1033
|
-
...contents,
|
|
1034
|
-
};
|
|
1035
|
-
return response;
|
|
1036
|
-
};
|
|
1037
|
-
exports.de_ListAdaptersCommand = de_ListAdaptersCommand;
|
|
1038
|
-
const de_ListAdaptersCommandError = async (output, context) => {
|
|
1039
|
-
const parsedOutput = {
|
|
1040
|
-
...output,
|
|
1041
|
-
body: await parseErrorBody(output.body, context),
|
|
1042
|
-
};
|
|
1043
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1044
|
-
switch (errorCode) {
|
|
1045
|
-
case "AccessDeniedException":
|
|
1046
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1047
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1048
|
-
case "InternalServerError":
|
|
1049
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1050
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1051
|
-
case "InvalidParameterException":
|
|
1052
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1053
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1054
|
-
case "ProvisionedThroughputExceededException":
|
|
1055
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1056
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1057
|
-
case "ThrottlingException":
|
|
1058
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1059
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1060
|
-
case "ValidationException":
|
|
1061
|
-
case "com.amazonaws.textract#ValidationException":
|
|
1062
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1063
|
-
default:
|
|
1064
|
-
const parsedBody = parsedOutput.body;
|
|
1065
|
-
return throwDefaultError({
|
|
1066
|
-
output,
|
|
1067
|
-
parsedBody,
|
|
1068
|
-
errorCode,
|
|
1069
|
-
});
|
|
1070
|
-
}
|
|
1071
|
-
};
|
|
1072
|
-
const de_ListAdapterVersionsCommand = async (output, context) => {
|
|
1073
|
-
if (output.statusCode >= 300) {
|
|
1074
|
-
return de_ListAdapterVersionsCommandError(output, context);
|
|
1075
|
-
}
|
|
1076
|
-
const data = await parseBody(output.body, context);
|
|
1077
|
-
let contents = {};
|
|
1078
|
-
contents = de_ListAdapterVersionsResponse(data, context);
|
|
1079
|
-
const response = {
|
|
1080
|
-
$metadata: deserializeMetadata(output),
|
|
1081
|
-
...contents,
|
|
1082
|
-
};
|
|
1083
|
-
return response;
|
|
1084
|
-
};
|
|
1085
|
-
exports.de_ListAdapterVersionsCommand = de_ListAdapterVersionsCommand;
|
|
1086
|
-
const de_ListAdapterVersionsCommandError = async (output, context) => {
|
|
1087
|
-
const parsedOutput = {
|
|
1088
|
-
...output,
|
|
1089
|
-
body: await parseErrorBody(output.body, context),
|
|
1090
|
-
};
|
|
1091
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1092
|
-
switch (errorCode) {
|
|
1093
|
-
case "AccessDeniedException":
|
|
1094
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1095
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1096
|
-
case "InternalServerError":
|
|
1097
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1098
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1099
|
-
case "InvalidParameterException":
|
|
1100
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1101
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1102
|
-
case "ProvisionedThroughputExceededException":
|
|
1103
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1104
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1105
|
-
case "ResourceNotFoundException":
|
|
1106
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1107
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1108
|
-
case "ThrottlingException":
|
|
1109
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1110
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1111
|
-
case "ValidationException":
|
|
1112
|
-
case "com.amazonaws.textract#ValidationException":
|
|
1113
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1114
|
-
default:
|
|
1115
|
-
const parsedBody = parsedOutput.body;
|
|
1116
|
-
return throwDefaultError({
|
|
1117
|
-
output,
|
|
1118
|
-
parsedBody,
|
|
1119
|
-
errorCode,
|
|
1120
|
-
});
|
|
1121
|
-
}
|
|
1122
|
-
};
|
|
1123
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1124
|
-
if (output.statusCode >= 300) {
|
|
1125
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
1126
|
-
}
|
|
1127
|
-
const data = await parseBody(output.body, context);
|
|
1128
|
-
let contents = {};
|
|
1129
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1130
|
-
const response = {
|
|
1131
|
-
$metadata: deserializeMetadata(output),
|
|
1132
|
-
...contents,
|
|
1133
|
-
};
|
|
1134
|
-
return response;
|
|
1135
|
-
};
|
|
1136
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
1137
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1138
|
-
const parsedOutput = {
|
|
1139
|
-
...output,
|
|
1140
|
-
body: await parseErrorBody(output.body, context),
|
|
1141
|
-
};
|
|
1142
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1143
|
-
switch (errorCode) {
|
|
1144
|
-
case "AccessDeniedException":
|
|
1145
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1146
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1147
|
-
case "InternalServerError":
|
|
1148
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1149
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1150
|
-
case "InvalidParameterException":
|
|
1151
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1152
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1153
|
-
case "ProvisionedThroughputExceededException":
|
|
1154
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1155
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1156
|
-
case "ResourceNotFoundException":
|
|
1157
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1158
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1159
|
-
case "ThrottlingException":
|
|
1160
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1161
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1162
|
-
case "ValidationException":
|
|
1163
|
-
case "com.amazonaws.textract#ValidationException":
|
|
1164
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1165
|
-
default:
|
|
1166
|
-
const parsedBody = parsedOutput.body;
|
|
1167
|
-
return throwDefaultError({
|
|
1168
|
-
output,
|
|
1169
|
-
parsedBody,
|
|
1170
|
-
errorCode,
|
|
1171
|
-
});
|
|
1172
|
-
}
|
|
1173
|
-
};
|
|
1174
|
-
const de_StartDocumentAnalysisCommand = async (output, context) => {
|
|
1175
|
-
if (output.statusCode >= 300) {
|
|
1176
|
-
return de_StartDocumentAnalysisCommandError(output, context);
|
|
1177
|
-
}
|
|
1178
|
-
const data = await parseBody(output.body, context);
|
|
1179
|
-
let contents = {};
|
|
1180
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1181
|
-
const response = {
|
|
1182
|
-
$metadata: deserializeMetadata(output),
|
|
1183
|
-
...contents,
|
|
1184
|
-
};
|
|
1185
|
-
return response;
|
|
1186
|
-
};
|
|
1187
|
-
exports.de_StartDocumentAnalysisCommand = de_StartDocumentAnalysisCommand;
|
|
1188
|
-
const de_StartDocumentAnalysisCommandError = async (output, context) => {
|
|
1189
|
-
const parsedOutput = {
|
|
1190
|
-
...output,
|
|
1191
|
-
body: await parseErrorBody(output.body, context),
|
|
1192
|
-
};
|
|
1193
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1194
|
-
switch (errorCode) {
|
|
1195
|
-
case "AccessDeniedException":
|
|
1196
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1197
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1198
|
-
case "BadDocumentException":
|
|
1199
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
1200
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
1201
|
-
case "DocumentTooLargeException":
|
|
1202
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1203
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
1204
|
-
case "IdempotentParameterMismatchException":
|
|
1205
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1206
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
1207
|
-
case "InternalServerError":
|
|
1208
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1209
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1210
|
-
case "InvalidKMSKeyException":
|
|
1211
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1212
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
1213
|
-
case "InvalidParameterException":
|
|
1214
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1215
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1216
|
-
case "InvalidS3ObjectException":
|
|
1217
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1218
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1219
|
-
case "LimitExceededException":
|
|
1220
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
1221
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1222
|
-
case "ProvisionedThroughputExceededException":
|
|
1223
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1224
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1225
|
-
case "ThrottlingException":
|
|
1226
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1227
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1228
|
-
case "UnsupportedDocumentException":
|
|
1229
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1230
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
1231
|
-
default:
|
|
1232
|
-
const parsedBody = parsedOutput.body;
|
|
1233
|
-
return throwDefaultError({
|
|
1234
|
-
output,
|
|
1235
|
-
parsedBody,
|
|
1236
|
-
errorCode,
|
|
1237
|
-
});
|
|
1238
|
-
}
|
|
1239
|
-
};
|
|
1240
|
-
const de_StartDocumentTextDetectionCommand = async (output, context) => {
|
|
1241
|
-
if (output.statusCode >= 300) {
|
|
1242
|
-
return de_StartDocumentTextDetectionCommandError(output, context);
|
|
1243
|
-
}
|
|
1244
|
-
const data = await parseBody(output.body, context);
|
|
1245
|
-
let contents = {};
|
|
1246
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1247
|
-
const response = {
|
|
1248
|
-
$metadata: deserializeMetadata(output),
|
|
1249
|
-
...contents,
|
|
1250
|
-
};
|
|
1251
|
-
return response;
|
|
1252
|
-
};
|
|
1253
|
-
exports.de_StartDocumentTextDetectionCommand = de_StartDocumentTextDetectionCommand;
|
|
1254
|
-
const de_StartDocumentTextDetectionCommandError = async (output, context) => {
|
|
1255
|
-
const parsedOutput = {
|
|
1256
|
-
...output,
|
|
1257
|
-
body: await parseErrorBody(output.body, context),
|
|
1258
|
-
};
|
|
1259
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1260
|
-
switch (errorCode) {
|
|
1261
|
-
case "AccessDeniedException":
|
|
1262
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1263
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1264
|
-
case "BadDocumentException":
|
|
1265
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
1266
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
1267
|
-
case "DocumentTooLargeException":
|
|
1268
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1269
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
1270
|
-
case "IdempotentParameterMismatchException":
|
|
1271
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1272
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
1273
|
-
case "InternalServerError":
|
|
1274
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1275
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1276
|
-
case "InvalidKMSKeyException":
|
|
1277
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1278
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
1279
|
-
case "InvalidParameterException":
|
|
1280
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1281
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1282
|
-
case "InvalidS3ObjectException":
|
|
1283
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1284
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1285
|
-
case "LimitExceededException":
|
|
1286
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
1287
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1288
|
-
case "ProvisionedThroughputExceededException":
|
|
1289
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1290
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1291
|
-
case "ThrottlingException":
|
|
1292
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1293
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1294
|
-
case "UnsupportedDocumentException":
|
|
1295
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1296
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
1297
|
-
default:
|
|
1298
|
-
const parsedBody = parsedOutput.body;
|
|
1299
|
-
return throwDefaultError({
|
|
1300
|
-
output,
|
|
1301
|
-
parsedBody,
|
|
1302
|
-
errorCode,
|
|
1303
|
-
});
|
|
1304
|
-
}
|
|
1305
|
-
};
|
|
1306
|
-
const de_StartExpenseAnalysisCommand = async (output, context) => {
|
|
1307
|
-
if (output.statusCode >= 300) {
|
|
1308
|
-
return de_StartExpenseAnalysisCommandError(output, context);
|
|
1309
|
-
}
|
|
1310
|
-
const data = await parseBody(output.body, context);
|
|
1311
|
-
let contents = {};
|
|
1312
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1313
|
-
const response = {
|
|
1314
|
-
$metadata: deserializeMetadata(output),
|
|
1315
|
-
...contents,
|
|
1316
|
-
};
|
|
1317
|
-
return response;
|
|
1318
|
-
};
|
|
1319
|
-
exports.de_StartExpenseAnalysisCommand = de_StartExpenseAnalysisCommand;
|
|
1320
|
-
const de_StartExpenseAnalysisCommandError = async (output, context) => {
|
|
1321
|
-
const parsedOutput = {
|
|
1322
|
-
...output,
|
|
1323
|
-
body: await parseErrorBody(output.body, context),
|
|
1324
|
-
};
|
|
1325
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1326
|
-
switch (errorCode) {
|
|
1327
|
-
case "AccessDeniedException":
|
|
1328
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1329
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1330
|
-
case "BadDocumentException":
|
|
1331
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
1332
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
1333
|
-
case "DocumentTooLargeException":
|
|
1334
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1335
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
1336
|
-
case "IdempotentParameterMismatchException":
|
|
1337
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1338
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
1339
|
-
case "InternalServerError":
|
|
1340
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1341
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1342
|
-
case "InvalidKMSKeyException":
|
|
1343
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1344
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
1345
|
-
case "InvalidParameterException":
|
|
1346
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1347
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1348
|
-
case "InvalidS3ObjectException":
|
|
1349
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1350
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1351
|
-
case "LimitExceededException":
|
|
1352
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
1353
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1354
|
-
case "ProvisionedThroughputExceededException":
|
|
1355
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1356
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1357
|
-
case "ThrottlingException":
|
|
1358
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1359
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1360
|
-
case "UnsupportedDocumentException":
|
|
1361
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1362
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
1363
|
-
default:
|
|
1364
|
-
const parsedBody = parsedOutput.body;
|
|
1365
|
-
return throwDefaultError({
|
|
1366
|
-
output,
|
|
1367
|
-
parsedBody,
|
|
1368
|
-
errorCode,
|
|
1369
|
-
});
|
|
1370
|
-
}
|
|
1371
|
-
};
|
|
1372
|
-
const de_StartLendingAnalysisCommand = async (output, context) => {
|
|
1373
|
-
if (output.statusCode >= 300) {
|
|
1374
|
-
return de_StartLendingAnalysisCommandError(output, context);
|
|
1375
|
-
}
|
|
1376
|
-
const data = await parseBody(output.body, context);
|
|
1377
|
-
let contents = {};
|
|
1378
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1379
|
-
const response = {
|
|
1380
|
-
$metadata: deserializeMetadata(output),
|
|
1381
|
-
...contents,
|
|
1382
|
-
};
|
|
1383
|
-
return response;
|
|
1384
|
-
};
|
|
1385
|
-
exports.de_StartLendingAnalysisCommand = de_StartLendingAnalysisCommand;
|
|
1386
|
-
const de_StartLendingAnalysisCommandError = async (output, context) => {
|
|
1387
|
-
const parsedOutput = {
|
|
1388
|
-
...output,
|
|
1389
|
-
body: await parseErrorBody(output.body, context),
|
|
1390
|
-
};
|
|
1391
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1392
|
-
switch (errorCode) {
|
|
1393
|
-
case "AccessDeniedException":
|
|
1394
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1395
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1396
|
-
case "BadDocumentException":
|
|
1397
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
1398
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
1399
|
-
case "DocumentTooLargeException":
|
|
1400
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1401
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
1402
|
-
case "IdempotentParameterMismatchException":
|
|
1403
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1404
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
1405
|
-
case "InternalServerError":
|
|
1406
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1407
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1408
|
-
case "InvalidKMSKeyException":
|
|
1409
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1410
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
1411
|
-
case "InvalidParameterException":
|
|
1412
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1413
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1414
|
-
case "InvalidS3ObjectException":
|
|
1415
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1416
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1417
|
-
case "LimitExceededException":
|
|
1418
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
1419
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1420
|
-
case "ProvisionedThroughputExceededException":
|
|
1421
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1422
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1423
|
-
case "ThrottlingException":
|
|
1424
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1425
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1426
|
-
case "UnsupportedDocumentException":
|
|
1427
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1428
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
1429
|
-
default:
|
|
1430
|
-
const parsedBody = parsedOutput.body;
|
|
1431
|
-
return throwDefaultError({
|
|
1432
|
-
output,
|
|
1433
|
-
parsedBody,
|
|
1434
|
-
errorCode,
|
|
1435
|
-
});
|
|
1436
|
-
}
|
|
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
|
-
};
|
|
1597
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1598
|
-
const body = parsedOutput.body;
|
|
1599
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1600
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1601
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1602
|
-
...deserialized,
|
|
1603
|
-
});
|
|
1604
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1605
|
-
};
|
|
1606
|
-
const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
|
|
1607
|
-
const body = parsedOutput.body;
|
|
1608
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1609
|
-
const exception = new models_0_1.BadDocumentException({
|
|
1610
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1611
|
-
...deserialized,
|
|
1612
|
-
});
|
|
1613
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
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
|
-
};
|
|
1624
|
-
const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
1625
|
-
const body = parsedOutput.body;
|
|
1626
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1627
|
-
const exception = new models_0_1.DocumentTooLargeException({
|
|
1628
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1629
|
-
...deserialized,
|
|
1630
|
-
});
|
|
1631
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1632
|
-
};
|
|
1633
|
-
const de_HumanLoopQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1634
|
-
const body = parsedOutput.body;
|
|
1635
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1636
|
-
const exception = new models_0_1.HumanLoopQuotaExceededException({
|
|
1637
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1638
|
-
...deserialized,
|
|
1639
|
-
});
|
|
1640
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1641
|
-
};
|
|
1642
|
-
const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context) => {
|
|
1643
|
-
const body = parsedOutput.body;
|
|
1644
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1645
|
-
const exception = new models_0_1.IdempotentParameterMismatchException({
|
|
1646
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1647
|
-
...deserialized,
|
|
1648
|
-
});
|
|
1649
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1650
|
-
};
|
|
1651
|
-
const de_InternalServerErrorRes = async (parsedOutput, context) => {
|
|
1652
|
-
const body = parsedOutput.body;
|
|
1653
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1654
|
-
const exception = new models_0_1.InternalServerError({
|
|
1655
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1656
|
-
...deserialized,
|
|
1657
|
-
});
|
|
1658
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1659
|
-
};
|
|
1660
|
-
const de_InvalidJobIdExceptionRes = async (parsedOutput, context) => {
|
|
1661
|
-
const body = parsedOutput.body;
|
|
1662
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1663
|
-
const exception = new models_0_1.InvalidJobIdException({
|
|
1664
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1665
|
-
...deserialized,
|
|
1666
|
-
});
|
|
1667
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1668
|
-
};
|
|
1669
|
-
const de_InvalidKMSKeyExceptionRes = async (parsedOutput, context) => {
|
|
1670
|
-
const body = parsedOutput.body;
|
|
1671
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1672
|
-
const exception = new models_0_1.InvalidKMSKeyException({
|
|
1673
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1674
|
-
...deserialized,
|
|
1675
|
-
});
|
|
1676
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1677
|
-
};
|
|
1678
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
1679
|
-
const body = parsedOutput.body;
|
|
1680
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1681
|
-
const exception = new models_0_1.InvalidParameterException({
|
|
1682
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1683
|
-
...deserialized,
|
|
1684
|
-
});
|
|
1685
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1686
|
-
};
|
|
1687
|
-
const de_InvalidS3ObjectExceptionRes = async (parsedOutput, context) => {
|
|
1688
|
-
const body = parsedOutput.body;
|
|
1689
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1690
|
-
const exception = new models_0_1.InvalidS3ObjectException({
|
|
1691
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1692
|
-
...deserialized,
|
|
1693
|
-
});
|
|
1694
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1695
|
-
};
|
|
1696
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
1697
|
-
const body = parsedOutput.body;
|
|
1698
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1699
|
-
const exception = new models_0_1.LimitExceededException({
|
|
1700
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1701
|
-
...deserialized,
|
|
1702
|
-
});
|
|
1703
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1704
|
-
};
|
|
1705
|
-
const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, context) => {
|
|
1706
|
-
const body = parsedOutput.body;
|
|
1707
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1708
|
-
const exception = new models_0_1.ProvisionedThroughputExceededException({
|
|
1709
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1710
|
-
...deserialized,
|
|
1711
|
-
});
|
|
1712
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
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
|
-
};
|
|
1732
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1733
|
-
const body = parsedOutput.body;
|
|
1734
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1735
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1736
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1737
|
-
...deserialized,
|
|
1738
|
-
});
|
|
1739
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1740
|
-
};
|
|
1741
|
-
const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
|
|
1742
|
-
const body = parsedOutput.body;
|
|
1743
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1744
|
-
const exception = new models_0_1.UnsupportedDocumentException({
|
|
1745
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1746
|
-
...deserialized,
|
|
1747
|
-
});
|
|
1748
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
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
|
-
};
|
|
1759
|
-
const se_AnalyzeDocumentRequest = (input, context) => {
|
|
1760
|
-
return (0, smithy_client_1.take)(input, {
|
|
1761
|
-
AdaptersConfig: smithy_client_1._json,
|
|
1762
|
-
Document: (_) => se_Document(_, context),
|
|
1763
|
-
FeatureTypes: smithy_client_1._json,
|
|
1764
|
-
HumanLoopConfig: smithy_client_1._json,
|
|
1765
|
-
QueriesConfig: smithy_client_1._json,
|
|
1766
|
-
});
|
|
1767
|
-
};
|
|
1768
|
-
const se_AnalyzeExpenseRequest = (input, context) => {
|
|
1769
|
-
return (0, smithy_client_1.take)(input, {
|
|
1770
|
-
Document: (_) => se_Document(_, context),
|
|
1771
|
-
});
|
|
1772
|
-
};
|
|
1773
|
-
const se_AnalyzeIDRequest = (input, context) => {
|
|
1774
|
-
return (0, smithy_client_1.take)(input, {
|
|
1775
|
-
DocumentPages: (_) => se_DocumentPages(_, context),
|
|
1776
|
-
});
|
|
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
|
-
};
|
|
1798
|
-
const se_DetectDocumentTextRequest = (input, context) => {
|
|
1799
|
-
return (0, smithy_client_1.take)(input, {
|
|
1800
|
-
Document: (_) => se_Document(_, context),
|
|
1801
|
-
});
|
|
1802
|
-
};
|
|
1803
|
-
const se_Document = (input, context) => {
|
|
1804
|
-
return (0, smithy_client_1.take)(input, {
|
|
1805
|
-
Bytes: context.base64Encoder,
|
|
1806
|
-
S3Object: smithy_client_1._json,
|
|
1807
|
-
});
|
|
1808
|
-
};
|
|
1809
|
-
const se_DocumentPages = (input, context) => {
|
|
1810
|
-
return input
|
|
1811
|
-
.filter((e) => e != null)
|
|
1812
|
-
.map((entry) => {
|
|
1813
|
-
return se_Document(entry, context);
|
|
1814
|
-
});
|
|
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
|
-
};
|
|
1882
|
-
const de_AnalyzeDocumentResponse = (output, context) => {
|
|
1883
|
-
return (0, smithy_client_1.take)(output, {
|
|
1884
|
-
AnalyzeDocumentModelVersion: smithy_client_1.expectString,
|
|
1885
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
1886
|
-
DocumentMetadata: smithy_client_1._json,
|
|
1887
|
-
HumanLoopActivationOutput: (_) => de_HumanLoopActivationOutput(_, context),
|
|
1888
|
-
});
|
|
1889
|
-
};
|
|
1890
|
-
const de_AnalyzeExpenseResponse = (output, context) => {
|
|
1891
|
-
return (0, smithy_client_1.take)(output, {
|
|
1892
|
-
DocumentMetadata: smithy_client_1._json,
|
|
1893
|
-
ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
|
|
1894
|
-
});
|
|
1895
|
-
};
|
|
1896
|
-
const de_AnalyzeIDDetections = (output, context) => {
|
|
1897
|
-
return (0, smithy_client_1.take)(output, {
|
|
1898
|
-
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1899
|
-
NormalizedValue: smithy_client_1._json,
|
|
1900
|
-
Text: smithy_client_1.expectString,
|
|
1901
|
-
});
|
|
1902
|
-
};
|
|
1903
|
-
const de_AnalyzeIDResponse = (output, context) => {
|
|
1904
|
-
return (0, smithy_client_1.take)(output, {
|
|
1905
|
-
AnalyzeIDModelVersion: smithy_client_1.expectString,
|
|
1906
|
-
DocumentMetadata: smithy_client_1._json,
|
|
1907
|
-
IdentityDocuments: (_) => de_IdentityDocumentList(_, context),
|
|
1908
|
-
});
|
|
1909
|
-
};
|
|
1910
|
-
const de_Block = (output, context) => {
|
|
1911
|
-
return (0, smithy_client_1.take)(output, {
|
|
1912
|
-
BlockType: smithy_client_1.expectString,
|
|
1913
|
-
ColumnIndex: smithy_client_1.expectInt32,
|
|
1914
|
-
ColumnSpan: smithy_client_1.expectInt32,
|
|
1915
|
-
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1916
|
-
EntityTypes: smithy_client_1._json,
|
|
1917
|
-
Geometry: (_) => de_Geometry(_, context),
|
|
1918
|
-
Id: smithy_client_1.expectString,
|
|
1919
|
-
Page: smithy_client_1.expectInt32,
|
|
1920
|
-
Query: smithy_client_1._json,
|
|
1921
|
-
Relationships: smithy_client_1._json,
|
|
1922
|
-
RowIndex: smithy_client_1.expectInt32,
|
|
1923
|
-
RowSpan: smithy_client_1.expectInt32,
|
|
1924
|
-
SelectionStatus: smithy_client_1.expectString,
|
|
1925
|
-
Text: smithy_client_1.expectString,
|
|
1926
|
-
TextType: smithy_client_1.expectString,
|
|
1927
|
-
});
|
|
1928
|
-
};
|
|
1929
|
-
const de_BlockList = (output, context) => {
|
|
1930
|
-
const retVal = (output || [])
|
|
1931
|
-
.filter((e) => e != null)
|
|
1932
|
-
.map((entry) => {
|
|
1933
|
-
return de_Block(entry, context);
|
|
1934
|
-
});
|
|
1935
|
-
return retVal;
|
|
1936
|
-
};
|
|
1937
|
-
const de_BoundingBox = (output, context) => {
|
|
1938
|
-
return (0, smithy_client_1.take)(output, {
|
|
1939
|
-
Height: smithy_client_1.limitedParseFloat32,
|
|
1940
|
-
Left: smithy_client_1.limitedParseFloat32,
|
|
1941
|
-
Top: smithy_client_1.limitedParseFloat32,
|
|
1942
|
-
Width: smithy_client_1.limitedParseFloat32,
|
|
1943
|
-
});
|
|
1944
|
-
};
|
|
1945
|
-
const de_DetectDocumentTextResponse = (output, context) => {
|
|
1946
|
-
return (0, smithy_client_1.take)(output, {
|
|
1947
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
1948
|
-
DetectDocumentTextModelVersion: smithy_client_1.expectString,
|
|
1949
|
-
DocumentMetadata: smithy_client_1._json,
|
|
1950
|
-
});
|
|
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
|
-
};
|
|
1959
|
-
const de_ExpenseCurrency = (output, context) => {
|
|
1960
|
-
return (0, smithy_client_1.take)(output, {
|
|
1961
|
-
Code: smithy_client_1.expectString,
|
|
1962
|
-
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1963
|
-
});
|
|
1964
|
-
};
|
|
1965
|
-
const de_ExpenseDetection = (output, context) => {
|
|
1966
|
-
return (0, smithy_client_1.take)(output, {
|
|
1967
|
-
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1968
|
-
Geometry: (_) => de_Geometry(_, context),
|
|
1969
|
-
Text: smithy_client_1.expectString,
|
|
1970
|
-
});
|
|
1971
|
-
};
|
|
1972
|
-
const de_ExpenseDocument = (output, context) => {
|
|
1973
|
-
return (0, smithy_client_1.take)(output, {
|
|
1974
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
1975
|
-
ExpenseIndex: smithy_client_1.expectInt32,
|
|
1976
|
-
LineItemGroups: (_) => de_LineItemGroupList(_, context),
|
|
1977
|
-
SummaryFields: (_) => de_ExpenseFieldList(_, context),
|
|
1978
|
-
});
|
|
1979
|
-
};
|
|
1980
|
-
const de_ExpenseDocumentList = (output, context) => {
|
|
1981
|
-
const retVal = (output || [])
|
|
1982
|
-
.filter((e) => e != null)
|
|
1983
|
-
.map((entry) => {
|
|
1984
|
-
return de_ExpenseDocument(entry, context);
|
|
1985
|
-
});
|
|
1986
|
-
return retVal;
|
|
1987
|
-
};
|
|
1988
|
-
const de_ExpenseField = (output, context) => {
|
|
1989
|
-
return (0, smithy_client_1.take)(output, {
|
|
1990
|
-
Currency: (_) => de_ExpenseCurrency(_, context),
|
|
1991
|
-
GroupProperties: smithy_client_1._json,
|
|
1992
|
-
LabelDetection: (_) => de_ExpenseDetection(_, context),
|
|
1993
|
-
PageNumber: smithy_client_1.expectInt32,
|
|
1994
|
-
Type: (_) => de_ExpenseType(_, context),
|
|
1995
|
-
ValueDetection: (_) => de_ExpenseDetection(_, context),
|
|
1996
|
-
});
|
|
1997
|
-
};
|
|
1998
|
-
const de_ExpenseFieldList = (output, context) => {
|
|
1999
|
-
const retVal = (output || [])
|
|
2000
|
-
.filter((e) => e != null)
|
|
2001
|
-
.map((entry) => {
|
|
2002
|
-
return de_ExpenseField(entry, context);
|
|
2003
|
-
});
|
|
2004
|
-
return retVal;
|
|
2005
|
-
};
|
|
2006
|
-
const de_ExpenseType = (output, context) => {
|
|
2007
|
-
return (0, smithy_client_1.take)(output, {
|
|
2008
|
-
Confidence: smithy_client_1.limitedParseFloat32,
|
|
2009
|
-
Text: smithy_client_1.expectString,
|
|
2010
|
-
});
|
|
2011
|
-
};
|
|
2012
|
-
const de_Extraction = (output, context) => {
|
|
2013
|
-
return (0, smithy_client_1.take)(output, {
|
|
2014
|
-
ExpenseDocument: (_) => de_ExpenseDocument(_, context),
|
|
2015
|
-
IdentityDocument: (_) => de_IdentityDocument(_, context),
|
|
2016
|
-
LendingDocument: (_) => de_LendingDocument(_, context),
|
|
2017
|
-
});
|
|
2018
|
-
};
|
|
2019
|
-
const de_ExtractionList = (output, context) => {
|
|
2020
|
-
const retVal = (output || [])
|
|
2021
|
-
.filter((e) => e != null)
|
|
2022
|
-
.map((entry) => {
|
|
2023
|
-
return de_Extraction(entry, context);
|
|
2024
|
-
});
|
|
2025
|
-
return retVal;
|
|
2026
|
-
};
|
|
2027
|
-
const de_Geometry = (output, context) => {
|
|
2028
|
-
return (0, smithy_client_1.take)(output, {
|
|
2029
|
-
BoundingBox: (_) => de_BoundingBox(_, context),
|
|
2030
|
-
Polygon: (_) => de_Polygon(_, context),
|
|
2031
|
-
});
|
|
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
|
-
};
|
|
2059
|
-
const de_GetDocumentAnalysisResponse = (output, context) => {
|
|
2060
|
-
return (0, smithy_client_1.take)(output, {
|
|
2061
|
-
AnalyzeDocumentModelVersion: smithy_client_1.expectString,
|
|
2062
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
2063
|
-
DocumentMetadata: smithy_client_1._json,
|
|
2064
|
-
JobStatus: smithy_client_1.expectString,
|
|
2065
|
-
NextToken: smithy_client_1.expectString,
|
|
2066
|
-
StatusMessage: smithy_client_1.expectString,
|
|
2067
|
-
Warnings: smithy_client_1._json,
|
|
2068
|
-
});
|
|
2069
|
-
};
|
|
2070
|
-
const de_GetDocumentTextDetectionResponse = (output, context) => {
|
|
2071
|
-
return (0, smithy_client_1.take)(output, {
|
|
2072
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
2073
|
-
DetectDocumentTextModelVersion: smithy_client_1.expectString,
|
|
2074
|
-
DocumentMetadata: smithy_client_1._json,
|
|
2075
|
-
JobStatus: smithy_client_1.expectString,
|
|
2076
|
-
NextToken: smithy_client_1.expectString,
|
|
2077
|
-
StatusMessage: smithy_client_1.expectString,
|
|
2078
|
-
Warnings: smithy_client_1._json,
|
|
2079
|
-
});
|
|
2080
|
-
};
|
|
2081
|
-
const de_GetExpenseAnalysisResponse = (output, context) => {
|
|
2082
|
-
return (0, smithy_client_1.take)(output, {
|
|
2083
|
-
AnalyzeExpenseModelVersion: smithy_client_1.expectString,
|
|
2084
|
-
DocumentMetadata: smithy_client_1._json,
|
|
2085
|
-
ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
|
|
2086
|
-
JobStatus: smithy_client_1.expectString,
|
|
2087
|
-
NextToken: smithy_client_1.expectString,
|
|
2088
|
-
StatusMessage: smithy_client_1.expectString,
|
|
2089
|
-
Warnings: smithy_client_1._json,
|
|
2090
|
-
});
|
|
2091
|
-
};
|
|
2092
|
-
const de_GetLendingAnalysisResponse = (output, context) => {
|
|
2093
|
-
return (0, smithy_client_1.take)(output, {
|
|
2094
|
-
AnalyzeLendingModelVersion: smithy_client_1.expectString,
|
|
2095
|
-
DocumentMetadata: smithy_client_1._json,
|
|
2096
|
-
JobStatus: smithy_client_1.expectString,
|
|
2097
|
-
NextToken: smithy_client_1.expectString,
|
|
2098
|
-
Results: (_) => de_LendingResultList(_, context),
|
|
2099
|
-
StatusMessage: smithy_client_1.expectString,
|
|
2100
|
-
Warnings: smithy_client_1._json,
|
|
2101
|
-
});
|
|
2102
|
-
};
|
|
2103
|
-
const de_HumanLoopActivationOutput = (output, context) => {
|
|
2104
|
-
return (0, smithy_client_1.take)(output, {
|
|
2105
|
-
HumanLoopActivationConditionsEvaluationResults: (_) => new smithy_client_1.LazyJsonString(_),
|
|
2106
|
-
HumanLoopActivationReasons: smithy_client_1._json,
|
|
2107
|
-
HumanLoopArn: smithy_client_1.expectString,
|
|
2108
|
-
});
|
|
2109
|
-
};
|
|
2110
|
-
const de_IdentityDocument = (output, context) => {
|
|
2111
|
-
return (0, smithy_client_1.take)(output, {
|
|
2112
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
2113
|
-
DocumentIndex: smithy_client_1.expectInt32,
|
|
2114
|
-
IdentityDocumentFields: (_) => de_IdentityDocumentFieldList(_, context),
|
|
2115
|
-
});
|
|
2116
|
-
};
|
|
2117
|
-
const de_IdentityDocumentField = (output, context) => {
|
|
2118
|
-
return (0, smithy_client_1.take)(output, {
|
|
2119
|
-
Type: (_) => de_AnalyzeIDDetections(_, context),
|
|
2120
|
-
ValueDetection: (_) => de_AnalyzeIDDetections(_, context),
|
|
2121
|
-
});
|
|
2122
|
-
};
|
|
2123
|
-
const de_IdentityDocumentFieldList = (output, context) => {
|
|
2124
|
-
const retVal = (output || [])
|
|
2125
|
-
.filter((e) => e != null)
|
|
2126
|
-
.map((entry) => {
|
|
2127
|
-
return de_IdentityDocumentField(entry, context);
|
|
2128
|
-
});
|
|
2129
|
-
return retVal;
|
|
2130
|
-
};
|
|
2131
|
-
const de_IdentityDocumentList = (output, context) => {
|
|
2132
|
-
const retVal = (output || [])
|
|
2133
|
-
.filter((e) => e != null)
|
|
2134
|
-
.map((entry) => {
|
|
2135
|
-
return de_IdentityDocument(entry, context);
|
|
2136
|
-
});
|
|
2137
|
-
return retVal;
|
|
2138
|
-
};
|
|
2139
|
-
const de_LendingDetection = (output, context) => {
|
|
2140
|
-
return (0, smithy_client_1.take)(output, {
|
|
2141
|
-
Confidence: smithy_client_1.limitedParseFloat32,
|
|
2142
|
-
Geometry: (_) => de_Geometry(_, context),
|
|
2143
|
-
SelectionStatus: smithy_client_1.expectString,
|
|
2144
|
-
Text: smithy_client_1.expectString,
|
|
2145
|
-
});
|
|
2146
|
-
};
|
|
2147
|
-
const de_LendingDetectionList = (output, context) => {
|
|
2148
|
-
const retVal = (output || [])
|
|
2149
|
-
.filter((e) => e != null)
|
|
2150
|
-
.map((entry) => {
|
|
2151
|
-
return de_LendingDetection(entry, context);
|
|
2152
|
-
});
|
|
2153
|
-
return retVal;
|
|
2154
|
-
};
|
|
2155
|
-
const de_LendingDocument = (output, context) => {
|
|
2156
|
-
return (0, smithy_client_1.take)(output, {
|
|
2157
|
-
LendingFields: (_) => de_LendingFieldList(_, context),
|
|
2158
|
-
SignatureDetections: (_) => de_SignatureDetectionList(_, context),
|
|
2159
|
-
});
|
|
2160
|
-
};
|
|
2161
|
-
const de_LendingField = (output, context) => {
|
|
2162
|
-
return (0, smithy_client_1.take)(output, {
|
|
2163
|
-
KeyDetection: (_) => de_LendingDetection(_, context),
|
|
2164
|
-
Type: smithy_client_1.expectString,
|
|
2165
|
-
ValueDetections: (_) => de_LendingDetectionList(_, context),
|
|
2166
|
-
});
|
|
2167
|
-
};
|
|
2168
|
-
const de_LendingFieldList = (output, context) => {
|
|
2169
|
-
const retVal = (output || [])
|
|
2170
|
-
.filter((e) => e != null)
|
|
2171
|
-
.map((entry) => {
|
|
2172
|
-
return de_LendingField(entry, context);
|
|
2173
|
-
});
|
|
2174
|
-
return retVal;
|
|
2175
|
-
};
|
|
2176
|
-
const de_LendingResult = (output, context) => {
|
|
2177
|
-
return (0, smithy_client_1.take)(output, {
|
|
2178
|
-
Extractions: (_) => de_ExtractionList(_, context),
|
|
2179
|
-
Page: smithy_client_1.expectInt32,
|
|
2180
|
-
PageClassification: (_) => de_PageClassification(_, context),
|
|
2181
|
-
});
|
|
2182
|
-
};
|
|
2183
|
-
const de_LendingResultList = (output, context) => {
|
|
2184
|
-
const retVal = (output || [])
|
|
2185
|
-
.filter((e) => e != null)
|
|
2186
|
-
.map((entry) => {
|
|
2187
|
-
return de_LendingResult(entry, context);
|
|
2188
|
-
});
|
|
2189
|
-
return retVal;
|
|
2190
|
-
};
|
|
2191
|
-
const de_LineItemFields = (output, context) => {
|
|
2192
|
-
return (0, smithy_client_1.take)(output, {
|
|
2193
|
-
LineItemExpenseFields: (_) => de_ExpenseFieldList(_, context),
|
|
2194
|
-
});
|
|
2195
|
-
};
|
|
2196
|
-
const de_LineItemGroup = (output, context) => {
|
|
2197
|
-
return (0, smithy_client_1.take)(output, {
|
|
2198
|
-
LineItemGroupIndex: smithy_client_1.expectInt32,
|
|
2199
|
-
LineItems: (_) => de_LineItemList(_, context),
|
|
2200
|
-
});
|
|
2201
|
-
};
|
|
2202
|
-
const de_LineItemGroupList = (output, context) => {
|
|
2203
|
-
const retVal = (output || [])
|
|
2204
|
-
.filter((e) => e != null)
|
|
2205
|
-
.map((entry) => {
|
|
2206
|
-
return de_LineItemGroup(entry, context);
|
|
2207
|
-
});
|
|
2208
|
-
return retVal;
|
|
2209
|
-
};
|
|
2210
|
-
const de_LineItemList = (output, context) => {
|
|
2211
|
-
const retVal = (output || [])
|
|
2212
|
-
.filter((e) => e != null)
|
|
2213
|
-
.map((entry) => {
|
|
2214
|
-
return de_LineItemFields(entry, context);
|
|
2215
|
-
});
|
|
2216
|
-
return retVal;
|
|
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
|
-
};
|
|
2230
|
-
const de_PageClassification = (output, context) => {
|
|
2231
|
-
return (0, smithy_client_1.take)(output, {
|
|
2232
|
-
PageNumber: (_) => de_PredictionList(_, context),
|
|
2233
|
-
PageType: (_) => de_PredictionList(_, context),
|
|
2234
|
-
});
|
|
2235
|
-
};
|
|
2236
|
-
const de_Point = (output, context) => {
|
|
2237
|
-
return (0, smithy_client_1.take)(output, {
|
|
2238
|
-
X: smithy_client_1.limitedParseFloat32,
|
|
2239
|
-
Y: smithy_client_1.limitedParseFloat32,
|
|
2240
|
-
});
|
|
2241
|
-
};
|
|
2242
|
-
const de_Polygon = (output, context) => {
|
|
2243
|
-
const retVal = (output || [])
|
|
2244
|
-
.filter((e) => e != null)
|
|
2245
|
-
.map((entry) => {
|
|
2246
|
-
return de_Point(entry, context);
|
|
2247
|
-
});
|
|
2248
|
-
return retVal;
|
|
2249
|
-
};
|
|
2250
|
-
const de_Prediction = (output, context) => {
|
|
2251
|
-
return (0, smithy_client_1.take)(output, {
|
|
2252
|
-
Confidence: smithy_client_1.limitedParseFloat32,
|
|
2253
|
-
Value: smithy_client_1.expectString,
|
|
2254
|
-
});
|
|
2255
|
-
};
|
|
2256
|
-
const de_PredictionList = (output, context) => {
|
|
2257
|
-
const retVal = (output || [])
|
|
2258
|
-
.filter((e) => e != null)
|
|
2259
|
-
.map((entry) => {
|
|
2260
|
-
return de_Prediction(entry, context);
|
|
2261
|
-
});
|
|
2262
|
-
return retVal;
|
|
2263
|
-
};
|
|
2264
|
-
const de_SignatureDetection = (output, context) => {
|
|
2265
|
-
return (0, smithy_client_1.take)(output, {
|
|
2266
|
-
Confidence: smithy_client_1.limitedParseFloat32,
|
|
2267
|
-
Geometry: (_) => de_Geometry(_, context),
|
|
2268
|
-
});
|
|
2269
|
-
};
|
|
2270
|
-
const de_SignatureDetectionList = (output, context) => {
|
|
2271
|
-
const retVal = (output || [])
|
|
2272
|
-
.filter((e) => e != null)
|
|
2273
|
-
.map((entry) => {
|
|
2274
|
-
return de_SignatureDetection(entry, context);
|
|
2275
|
-
});
|
|
2276
|
-
return retVal;
|
|
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
|
-
};
|
|
2288
|
-
const deserializeMetadata = (output) => ({
|
|
2289
|
-
httpStatusCode: output.statusCode,
|
|
2290
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
2291
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2292
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
2293
|
-
});
|
|
2294
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2295
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(TextractServiceException_1.TextractServiceException);
|
|
2296
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
2297
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2298
|
-
const contents = {
|
|
2299
|
-
protocol,
|
|
2300
|
-
hostname,
|
|
2301
|
-
port,
|
|
2302
|
-
method: "POST",
|
|
2303
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
2304
|
-
headers,
|
|
2305
|
-
};
|
|
2306
|
-
if (resolvedHostname !== undefined) {
|
|
2307
|
-
contents.hostname = resolvedHostname;
|
|
2308
|
-
}
|
|
2309
|
-
if (body !== undefined) {
|
|
2310
|
-
contents.body = body;
|
|
2311
|
-
}
|
|
2312
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
2313
|
-
};
|
|
2314
|
-
function sharedHeaders(operation) {
|
|
2315
|
-
return {
|
|
2316
|
-
"content-type": "application/x-amz-json-1.1",
|
|
2317
|
-
"x-amz-target": `Textract.${operation}`,
|
|
2318
|
-
};
|
|
2319
|
-
}
|
|
2320
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2321
|
-
if (encoded.length) {
|
|
2322
|
-
return JSON.parse(encoded);
|
|
2323
|
-
}
|
|
2324
|
-
return {};
|
|
2325
|
-
});
|
|
2326
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
2327
|
-
const value = await parseBody(errorBody, context);
|
|
2328
|
-
value.message = value.message ?? value.Message;
|
|
2329
|
-
return value;
|
|
2330
|
-
};
|
|
2331
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
2332
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2333
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
2334
|
-
let cleanValue = rawValue;
|
|
2335
|
-
if (typeof cleanValue === "number") {
|
|
2336
|
-
cleanValue = cleanValue.toString();
|
|
2337
|
-
}
|
|
2338
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
2339
|
-
cleanValue = cleanValue.split(",")[0];
|
|
2340
|
-
}
|
|
2341
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2342
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2343
|
-
}
|
|
2344
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2345
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2346
|
-
}
|
|
2347
|
-
return cleanValue;
|
|
2348
|
-
};
|
|
2349
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2350
|
-
if (headerKey !== undefined) {
|
|
2351
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2352
|
-
}
|
|
2353
|
-
if (data.code !== undefined) {
|
|
2354
|
-
return sanitizeErrorCode(data.code);
|
|
2355
|
-
}
|
|
2356
|
-
if (data["__type"] !== undefined) {
|
|
2357
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2358
|
-
}
|
|
2359
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|