@aws-sdk/client-textract 3.504.0 → 3.509.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +113 -1106
- package/dist-es/protocols/Aws_json1_1.js +145 -1138
- package/package.json +3 -3
|
@@ -155,7 +155,7 @@ export const se_UpdateAdapterCommand = async (input, context) => {
|
|
|
155
155
|
};
|
|
156
156
|
export const de_AnalyzeDocumentCommand = async (output, context) => {
|
|
157
157
|
if (output.statusCode >= 300) {
|
|
158
|
-
return
|
|
158
|
+
return de_CommandError(output, context);
|
|
159
159
|
}
|
|
160
160
|
const data = await parseBody(output.body, context);
|
|
161
161
|
let contents = {};
|
|
@@ -166,55 +166,9 @@ export const de_AnalyzeDocumentCommand = async (output, context) => {
|
|
|
166
166
|
};
|
|
167
167
|
return response;
|
|
168
168
|
};
|
|
169
|
-
const de_AnalyzeDocumentCommandError = async (output, context) => {
|
|
170
|
-
const parsedOutput = {
|
|
171
|
-
...output,
|
|
172
|
-
body: await parseErrorBody(output.body, context),
|
|
173
|
-
};
|
|
174
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
175
|
-
switch (errorCode) {
|
|
176
|
-
case "AccessDeniedException":
|
|
177
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
178
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
179
|
-
case "BadDocumentException":
|
|
180
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
181
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
182
|
-
case "DocumentTooLargeException":
|
|
183
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
184
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
185
|
-
case "HumanLoopQuotaExceededException":
|
|
186
|
-
case "com.amazonaws.textract#HumanLoopQuotaExceededException":
|
|
187
|
-
throw await de_HumanLoopQuotaExceededExceptionRes(parsedOutput, context);
|
|
188
|
-
case "InternalServerError":
|
|
189
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
190
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
191
|
-
case "InvalidParameterException":
|
|
192
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
193
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
194
|
-
case "InvalidS3ObjectException":
|
|
195
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
196
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
197
|
-
case "ProvisionedThroughputExceededException":
|
|
198
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
199
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
200
|
-
case "ThrottlingException":
|
|
201
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
202
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
203
|
-
case "UnsupportedDocumentException":
|
|
204
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
205
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
206
|
-
default:
|
|
207
|
-
const parsedBody = parsedOutput.body;
|
|
208
|
-
return throwDefaultError({
|
|
209
|
-
output,
|
|
210
|
-
parsedBody,
|
|
211
|
-
errorCode,
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
169
|
export const de_AnalyzeExpenseCommand = async (output, context) => {
|
|
216
170
|
if (output.statusCode >= 300) {
|
|
217
|
-
return
|
|
171
|
+
return de_CommandError(output, context);
|
|
218
172
|
}
|
|
219
173
|
const data = await parseBody(output.body, context);
|
|
220
174
|
let contents = {};
|
|
@@ -225,52 +179,9 @@ export const de_AnalyzeExpenseCommand = async (output, context) => {
|
|
|
225
179
|
};
|
|
226
180
|
return response;
|
|
227
181
|
};
|
|
228
|
-
const de_AnalyzeExpenseCommandError = async (output, context) => {
|
|
229
|
-
const parsedOutput = {
|
|
230
|
-
...output,
|
|
231
|
-
body: await parseErrorBody(output.body, context),
|
|
232
|
-
};
|
|
233
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
234
|
-
switch (errorCode) {
|
|
235
|
-
case "AccessDeniedException":
|
|
236
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
237
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
238
|
-
case "BadDocumentException":
|
|
239
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
240
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
241
|
-
case "DocumentTooLargeException":
|
|
242
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
243
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
244
|
-
case "InternalServerError":
|
|
245
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
246
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
247
|
-
case "InvalidParameterException":
|
|
248
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
249
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
250
|
-
case "InvalidS3ObjectException":
|
|
251
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
252
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
253
|
-
case "ProvisionedThroughputExceededException":
|
|
254
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
255
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
256
|
-
case "ThrottlingException":
|
|
257
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
258
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
259
|
-
case "UnsupportedDocumentException":
|
|
260
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
261
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
262
|
-
default:
|
|
263
|
-
const parsedBody = parsedOutput.body;
|
|
264
|
-
return throwDefaultError({
|
|
265
|
-
output,
|
|
266
|
-
parsedBody,
|
|
267
|
-
errorCode,
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
182
|
export const de_AnalyzeIDCommand = async (output, context) => {
|
|
272
183
|
if (output.statusCode >= 300) {
|
|
273
|
-
return
|
|
184
|
+
return de_CommandError(output, context);
|
|
274
185
|
}
|
|
275
186
|
const data = await parseBody(output.body, context);
|
|
276
187
|
let contents = {};
|
|
@@ -281,52 +192,9 @@ export const de_AnalyzeIDCommand = async (output, context) => {
|
|
|
281
192
|
};
|
|
282
193
|
return response;
|
|
283
194
|
};
|
|
284
|
-
const de_AnalyzeIDCommandError = async (output, context) => {
|
|
285
|
-
const parsedOutput = {
|
|
286
|
-
...output,
|
|
287
|
-
body: await parseErrorBody(output.body, context),
|
|
288
|
-
};
|
|
289
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
290
|
-
switch (errorCode) {
|
|
291
|
-
case "AccessDeniedException":
|
|
292
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
293
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
294
|
-
case "BadDocumentException":
|
|
295
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
296
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
297
|
-
case "DocumentTooLargeException":
|
|
298
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
299
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
300
|
-
case "InternalServerError":
|
|
301
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
302
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
303
|
-
case "InvalidParameterException":
|
|
304
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
305
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
306
|
-
case "InvalidS3ObjectException":
|
|
307
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
308
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
309
|
-
case "ProvisionedThroughputExceededException":
|
|
310
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
311
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
312
|
-
case "ThrottlingException":
|
|
313
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
314
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
315
|
-
case "UnsupportedDocumentException":
|
|
316
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
317
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
318
|
-
default:
|
|
319
|
-
const parsedBody = parsedOutput.body;
|
|
320
|
-
return throwDefaultError({
|
|
321
|
-
output,
|
|
322
|
-
parsedBody,
|
|
323
|
-
errorCode,
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
195
|
export const de_CreateAdapterCommand = async (output, context) => {
|
|
328
196
|
if (output.statusCode >= 300) {
|
|
329
|
-
return
|
|
197
|
+
return de_CommandError(output, context);
|
|
330
198
|
}
|
|
331
199
|
const data = await parseBody(output.body, context);
|
|
332
200
|
let contents = {};
|
|
@@ -337,55 +205,9 @@ export const de_CreateAdapterCommand = async (output, context) => {
|
|
|
337
205
|
};
|
|
338
206
|
return response;
|
|
339
207
|
};
|
|
340
|
-
const de_CreateAdapterCommandError = async (output, context) => {
|
|
341
|
-
const parsedOutput = {
|
|
342
|
-
...output,
|
|
343
|
-
body: await parseErrorBody(output.body, context),
|
|
344
|
-
};
|
|
345
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
346
|
-
switch (errorCode) {
|
|
347
|
-
case "AccessDeniedException":
|
|
348
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
349
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
350
|
-
case "ConflictException":
|
|
351
|
-
case "com.amazonaws.textract#ConflictException":
|
|
352
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
353
|
-
case "IdempotentParameterMismatchException":
|
|
354
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
355
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
356
|
-
case "InternalServerError":
|
|
357
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
358
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
359
|
-
case "InvalidParameterException":
|
|
360
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
361
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
362
|
-
case "LimitExceededException":
|
|
363
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
364
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
365
|
-
case "ProvisionedThroughputExceededException":
|
|
366
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
367
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
368
|
-
case "ServiceQuotaExceededException":
|
|
369
|
-
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
370
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
371
|
-
case "ThrottlingException":
|
|
372
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
373
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
374
|
-
case "ValidationException":
|
|
375
|
-
case "com.amazonaws.textract#ValidationException":
|
|
376
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
377
|
-
default:
|
|
378
|
-
const parsedBody = parsedOutput.body;
|
|
379
|
-
return throwDefaultError({
|
|
380
|
-
output,
|
|
381
|
-
parsedBody,
|
|
382
|
-
errorCode,
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
};
|
|
386
208
|
export const de_CreateAdapterVersionCommand = async (output, context) => {
|
|
387
209
|
if (output.statusCode >= 300) {
|
|
388
|
-
return
|
|
210
|
+
return de_CommandError(output, context);
|
|
389
211
|
}
|
|
390
212
|
const data = await parseBody(output.body, context);
|
|
391
213
|
let contents = {};
|
|
@@ -396,64 +218,22 @@ export const de_CreateAdapterVersionCommand = async (output, context) => {
|
|
|
396
218
|
};
|
|
397
219
|
return response;
|
|
398
220
|
};
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
body: await parseErrorBody(output.body, context),
|
|
403
|
-
};
|
|
404
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
405
|
-
switch (errorCode) {
|
|
406
|
-
case "AccessDeniedException":
|
|
407
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
408
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
409
|
-
case "ConflictException":
|
|
410
|
-
case "com.amazonaws.textract#ConflictException":
|
|
411
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
412
|
-
case "IdempotentParameterMismatchException":
|
|
413
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
414
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
415
|
-
case "InternalServerError":
|
|
416
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
417
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
418
|
-
case "InvalidKMSKeyException":
|
|
419
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
420
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
421
|
-
case "InvalidParameterException":
|
|
422
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
423
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
424
|
-
case "InvalidS3ObjectException":
|
|
425
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
426
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
427
|
-
case "LimitExceededException":
|
|
428
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
429
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
430
|
-
case "ProvisionedThroughputExceededException":
|
|
431
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
432
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
433
|
-
case "ResourceNotFoundException":
|
|
434
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
435
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
436
|
-
case "ServiceQuotaExceededException":
|
|
437
|
-
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
438
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
439
|
-
case "ThrottlingException":
|
|
440
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
441
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
442
|
-
case "ValidationException":
|
|
443
|
-
case "com.amazonaws.textract#ValidationException":
|
|
444
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
445
|
-
default:
|
|
446
|
-
const parsedBody = parsedOutput.body;
|
|
447
|
-
return throwDefaultError({
|
|
448
|
-
output,
|
|
449
|
-
parsedBody,
|
|
450
|
-
errorCode,
|
|
451
|
-
});
|
|
221
|
+
export const de_DeleteAdapterCommand = async (output, context) => {
|
|
222
|
+
if (output.statusCode >= 300) {
|
|
223
|
+
return de_CommandError(output, context);
|
|
452
224
|
}
|
|
225
|
+
const data = await parseBody(output.body, context);
|
|
226
|
+
let contents = {};
|
|
227
|
+
contents = _json(data);
|
|
228
|
+
const response = {
|
|
229
|
+
$metadata: deserializeMetadata(output),
|
|
230
|
+
...contents,
|
|
231
|
+
};
|
|
232
|
+
return response;
|
|
453
233
|
};
|
|
454
|
-
export const
|
|
234
|
+
export const de_DeleteAdapterVersionCommand = async (output, context) => {
|
|
455
235
|
if (output.statusCode >= 300) {
|
|
456
|
-
return
|
|
236
|
+
return de_CommandError(output, context);
|
|
457
237
|
}
|
|
458
238
|
const data = await parseBody(output.body, context);
|
|
459
239
|
let contents = {};
|
|
@@ -464,523 +244,113 @@ export const de_DeleteAdapterCommand = async (output, context) => {
|
|
|
464
244
|
};
|
|
465
245
|
return response;
|
|
466
246
|
};
|
|
467
|
-
const
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
247
|
+
export const de_DetectDocumentTextCommand = async (output, context) => {
|
|
248
|
+
if (output.statusCode >= 300) {
|
|
249
|
+
return de_CommandError(output, context);
|
|
250
|
+
}
|
|
251
|
+
const data = await parseBody(output.body, context);
|
|
252
|
+
let contents = {};
|
|
253
|
+
contents = de_DetectDocumentTextResponse(data, context);
|
|
254
|
+
const response = {
|
|
255
|
+
$metadata: deserializeMetadata(output),
|
|
256
|
+
...contents,
|
|
471
257
|
};
|
|
472
|
-
|
|
473
|
-
switch (errorCode) {
|
|
474
|
-
case "AccessDeniedException":
|
|
475
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
476
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
477
|
-
case "ConflictException":
|
|
478
|
-
case "com.amazonaws.textract#ConflictException":
|
|
479
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
480
|
-
case "InternalServerError":
|
|
481
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
482
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
483
|
-
case "InvalidParameterException":
|
|
484
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
485
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
486
|
-
case "ProvisionedThroughputExceededException":
|
|
487
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
488
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
489
|
-
case "ResourceNotFoundException":
|
|
490
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
491
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
492
|
-
case "ThrottlingException":
|
|
493
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
494
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
495
|
-
case "ValidationException":
|
|
496
|
-
case "com.amazonaws.textract#ValidationException":
|
|
497
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
498
|
-
default:
|
|
499
|
-
const parsedBody = parsedOutput.body;
|
|
500
|
-
return throwDefaultError({
|
|
501
|
-
output,
|
|
502
|
-
parsedBody,
|
|
503
|
-
errorCode,
|
|
504
|
-
});
|
|
505
|
-
}
|
|
258
|
+
return response;
|
|
506
259
|
};
|
|
507
|
-
export const
|
|
260
|
+
export const de_GetAdapterCommand = async (output, context) => {
|
|
508
261
|
if (output.statusCode >= 300) {
|
|
509
|
-
return
|
|
262
|
+
return de_CommandError(output, context);
|
|
510
263
|
}
|
|
511
264
|
const data = await parseBody(output.body, context);
|
|
512
265
|
let contents = {};
|
|
513
|
-
contents =
|
|
266
|
+
contents = de_GetAdapterResponse(data, context);
|
|
514
267
|
const response = {
|
|
515
268
|
$metadata: deserializeMetadata(output),
|
|
516
269
|
...contents,
|
|
517
270
|
};
|
|
518
271
|
return response;
|
|
519
272
|
};
|
|
520
|
-
const
|
|
521
|
-
const parsedOutput = {
|
|
522
|
-
...output,
|
|
523
|
-
body: await parseErrorBody(output.body, context),
|
|
524
|
-
};
|
|
525
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
526
|
-
switch (errorCode) {
|
|
527
|
-
case "AccessDeniedException":
|
|
528
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
529
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
530
|
-
case "ConflictException":
|
|
531
|
-
case "com.amazonaws.textract#ConflictException":
|
|
532
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
533
|
-
case "InternalServerError":
|
|
534
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
535
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
536
|
-
case "InvalidParameterException":
|
|
537
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
538
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
539
|
-
case "ProvisionedThroughputExceededException":
|
|
540
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
541
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
542
|
-
case "ResourceNotFoundException":
|
|
543
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
544
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
545
|
-
case "ThrottlingException":
|
|
546
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
547
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
548
|
-
case "ValidationException":
|
|
549
|
-
case "com.amazonaws.textract#ValidationException":
|
|
550
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
551
|
-
default:
|
|
552
|
-
const parsedBody = parsedOutput.body;
|
|
553
|
-
return throwDefaultError({
|
|
554
|
-
output,
|
|
555
|
-
parsedBody,
|
|
556
|
-
errorCode,
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
export const de_DetectDocumentTextCommand = async (output, context) => {
|
|
273
|
+
export const de_GetAdapterVersionCommand = async (output, context) => {
|
|
561
274
|
if (output.statusCode >= 300) {
|
|
562
|
-
return
|
|
275
|
+
return de_CommandError(output, context);
|
|
563
276
|
}
|
|
564
277
|
const data = await parseBody(output.body, context);
|
|
565
278
|
let contents = {};
|
|
566
|
-
contents =
|
|
279
|
+
contents = de_GetAdapterVersionResponse(data, context);
|
|
567
280
|
const response = {
|
|
568
281
|
$metadata: deserializeMetadata(output),
|
|
569
282
|
...contents,
|
|
570
283
|
};
|
|
571
284
|
return response;
|
|
572
285
|
};
|
|
573
|
-
const
|
|
574
|
-
const parsedOutput = {
|
|
575
|
-
...output,
|
|
576
|
-
body: await parseErrorBody(output.body, context),
|
|
577
|
-
};
|
|
578
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
579
|
-
switch (errorCode) {
|
|
580
|
-
case "AccessDeniedException":
|
|
581
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
582
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
583
|
-
case "BadDocumentException":
|
|
584
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
585
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
586
|
-
case "DocumentTooLargeException":
|
|
587
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
588
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
589
|
-
case "InternalServerError":
|
|
590
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
591
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
592
|
-
case "InvalidParameterException":
|
|
593
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
594
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
595
|
-
case "InvalidS3ObjectException":
|
|
596
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
597
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
598
|
-
case "ProvisionedThroughputExceededException":
|
|
599
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
600
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
601
|
-
case "ThrottlingException":
|
|
602
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
603
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
604
|
-
case "UnsupportedDocumentException":
|
|
605
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
606
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
607
|
-
default:
|
|
608
|
-
const parsedBody = parsedOutput.body;
|
|
609
|
-
return throwDefaultError({
|
|
610
|
-
output,
|
|
611
|
-
parsedBody,
|
|
612
|
-
errorCode,
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
};
|
|
616
|
-
export const de_GetAdapterCommand = async (output, context) => {
|
|
286
|
+
export const de_GetDocumentAnalysisCommand = async (output, context) => {
|
|
617
287
|
if (output.statusCode >= 300) {
|
|
618
|
-
return
|
|
288
|
+
return de_CommandError(output, context);
|
|
619
289
|
}
|
|
620
290
|
const data = await parseBody(output.body, context);
|
|
621
291
|
let contents = {};
|
|
622
|
-
contents =
|
|
292
|
+
contents = de_GetDocumentAnalysisResponse(data, context);
|
|
623
293
|
const response = {
|
|
624
294
|
$metadata: deserializeMetadata(output),
|
|
625
295
|
...contents,
|
|
626
296
|
};
|
|
627
297
|
return response;
|
|
628
298
|
};
|
|
629
|
-
const
|
|
630
|
-
const parsedOutput = {
|
|
631
|
-
...output,
|
|
632
|
-
body: await parseErrorBody(output.body, context),
|
|
633
|
-
};
|
|
634
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
635
|
-
switch (errorCode) {
|
|
636
|
-
case "AccessDeniedException":
|
|
637
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
638
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
639
|
-
case "InternalServerError":
|
|
640
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
641
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
642
|
-
case "InvalidParameterException":
|
|
643
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
644
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
645
|
-
case "ProvisionedThroughputExceededException":
|
|
646
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
647
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
648
|
-
case "ResourceNotFoundException":
|
|
649
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
650
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
651
|
-
case "ThrottlingException":
|
|
652
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
653
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
654
|
-
case "ValidationException":
|
|
655
|
-
case "com.amazonaws.textract#ValidationException":
|
|
656
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
657
|
-
default:
|
|
658
|
-
const parsedBody = parsedOutput.body;
|
|
659
|
-
return throwDefaultError({
|
|
660
|
-
output,
|
|
661
|
-
parsedBody,
|
|
662
|
-
errorCode,
|
|
663
|
-
});
|
|
664
|
-
}
|
|
665
|
-
};
|
|
666
|
-
export const de_GetAdapterVersionCommand = async (output, context) => {
|
|
299
|
+
export const de_GetDocumentTextDetectionCommand = async (output, context) => {
|
|
667
300
|
if (output.statusCode >= 300) {
|
|
668
|
-
return
|
|
301
|
+
return de_CommandError(output, context);
|
|
669
302
|
}
|
|
670
303
|
const data = await parseBody(output.body, context);
|
|
671
304
|
let contents = {};
|
|
672
|
-
contents =
|
|
305
|
+
contents = de_GetDocumentTextDetectionResponse(data, context);
|
|
673
306
|
const response = {
|
|
674
307
|
$metadata: deserializeMetadata(output),
|
|
675
308
|
...contents,
|
|
676
309
|
};
|
|
677
310
|
return response;
|
|
678
311
|
};
|
|
679
|
-
const
|
|
680
|
-
const parsedOutput = {
|
|
681
|
-
...output,
|
|
682
|
-
body: await parseErrorBody(output.body, context),
|
|
683
|
-
};
|
|
684
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
685
|
-
switch (errorCode) {
|
|
686
|
-
case "AccessDeniedException":
|
|
687
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
688
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
689
|
-
case "InternalServerError":
|
|
690
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
691
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
692
|
-
case "InvalidParameterException":
|
|
693
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
694
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
695
|
-
case "ProvisionedThroughputExceededException":
|
|
696
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
697
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
698
|
-
case "ResourceNotFoundException":
|
|
699
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
700
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
701
|
-
case "ThrottlingException":
|
|
702
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
703
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
704
|
-
case "ValidationException":
|
|
705
|
-
case "com.amazonaws.textract#ValidationException":
|
|
706
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
707
|
-
default:
|
|
708
|
-
const parsedBody = parsedOutput.body;
|
|
709
|
-
return throwDefaultError({
|
|
710
|
-
output,
|
|
711
|
-
parsedBody,
|
|
712
|
-
errorCode,
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
};
|
|
716
|
-
export const de_GetDocumentAnalysisCommand = async (output, context) => {
|
|
312
|
+
export const de_GetExpenseAnalysisCommand = async (output, context) => {
|
|
717
313
|
if (output.statusCode >= 300) {
|
|
718
|
-
return
|
|
314
|
+
return de_CommandError(output, context);
|
|
719
315
|
}
|
|
720
316
|
const data = await parseBody(output.body, context);
|
|
721
317
|
let contents = {};
|
|
722
|
-
contents =
|
|
318
|
+
contents = de_GetExpenseAnalysisResponse(data, context);
|
|
723
319
|
const response = {
|
|
724
320
|
$metadata: deserializeMetadata(output),
|
|
725
321
|
...contents,
|
|
726
322
|
};
|
|
727
323
|
return response;
|
|
728
324
|
};
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
body: await parseErrorBody(output.body, context),
|
|
733
|
-
};
|
|
734
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
735
|
-
switch (errorCode) {
|
|
736
|
-
case "AccessDeniedException":
|
|
737
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
738
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
739
|
-
case "InternalServerError":
|
|
740
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
741
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
742
|
-
case "InvalidJobIdException":
|
|
743
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
744
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
745
|
-
case "InvalidKMSKeyException":
|
|
746
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
747
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
748
|
-
case "InvalidParameterException":
|
|
749
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
750
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
751
|
-
case "InvalidS3ObjectException":
|
|
752
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
753
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
754
|
-
case "ProvisionedThroughputExceededException":
|
|
755
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
756
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
757
|
-
case "ThrottlingException":
|
|
758
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
759
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
760
|
-
default:
|
|
761
|
-
const parsedBody = parsedOutput.body;
|
|
762
|
-
return throwDefaultError({
|
|
763
|
-
output,
|
|
764
|
-
parsedBody,
|
|
765
|
-
errorCode,
|
|
766
|
-
});
|
|
325
|
+
export const de_GetLendingAnalysisCommand = async (output, context) => {
|
|
326
|
+
if (output.statusCode >= 300) {
|
|
327
|
+
return de_CommandError(output, context);
|
|
767
328
|
}
|
|
329
|
+
const data = await parseBody(output.body, context);
|
|
330
|
+
let contents = {};
|
|
331
|
+
contents = de_GetLendingAnalysisResponse(data, context);
|
|
332
|
+
const response = {
|
|
333
|
+
$metadata: deserializeMetadata(output),
|
|
334
|
+
...contents,
|
|
335
|
+
};
|
|
336
|
+
return response;
|
|
768
337
|
};
|
|
769
|
-
export const
|
|
338
|
+
export const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
|
|
770
339
|
if (output.statusCode >= 300) {
|
|
771
|
-
return
|
|
340
|
+
return de_CommandError(output, context);
|
|
772
341
|
}
|
|
773
342
|
const data = await parseBody(output.body, context);
|
|
774
343
|
let contents = {};
|
|
775
|
-
contents =
|
|
344
|
+
contents = _json(data);
|
|
776
345
|
const response = {
|
|
777
346
|
$metadata: deserializeMetadata(output),
|
|
778
347
|
...contents,
|
|
779
348
|
};
|
|
780
349
|
return response;
|
|
781
350
|
};
|
|
782
|
-
const de_GetDocumentTextDetectionCommandError = async (output, context) => {
|
|
783
|
-
const parsedOutput = {
|
|
784
|
-
...output,
|
|
785
|
-
body: await parseErrorBody(output.body, context),
|
|
786
|
-
};
|
|
787
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
788
|
-
switch (errorCode) {
|
|
789
|
-
case "AccessDeniedException":
|
|
790
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
791
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
792
|
-
case "InternalServerError":
|
|
793
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
794
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
795
|
-
case "InvalidJobIdException":
|
|
796
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
797
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
798
|
-
case "InvalidKMSKeyException":
|
|
799
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
800
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
801
|
-
case "InvalidParameterException":
|
|
802
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
803
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
804
|
-
case "InvalidS3ObjectException":
|
|
805
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
806
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
807
|
-
case "ProvisionedThroughputExceededException":
|
|
808
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
809
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
810
|
-
case "ThrottlingException":
|
|
811
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
812
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
813
|
-
default:
|
|
814
|
-
const parsedBody = parsedOutput.body;
|
|
815
|
-
return throwDefaultError({
|
|
816
|
-
output,
|
|
817
|
-
parsedBody,
|
|
818
|
-
errorCode,
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
};
|
|
822
|
-
export const de_GetExpenseAnalysisCommand = async (output, context) => {
|
|
823
|
-
if (output.statusCode >= 300) {
|
|
824
|
-
return de_GetExpenseAnalysisCommandError(output, context);
|
|
825
|
-
}
|
|
826
|
-
const data = await parseBody(output.body, context);
|
|
827
|
-
let contents = {};
|
|
828
|
-
contents = de_GetExpenseAnalysisResponse(data, context);
|
|
829
|
-
const response = {
|
|
830
|
-
$metadata: deserializeMetadata(output),
|
|
831
|
-
...contents,
|
|
832
|
-
};
|
|
833
|
-
return response;
|
|
834
|
-
};
|
|
835
|
-
const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
836
|
-
const parsedOutput = {
|
|
837
|
-
...output,
|
|
838
|
-
body: await parseErrorBody(output.body, context),
|
|
839
|
-
};
|
|
840
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
841
|
-
switch (errorCode) {
|
|
842
|
-
case "AccessDeniedException":
|
|
843
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
844
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
845
|
-
case "InternalServerError":
|
|
846
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
847
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
848
|
-
case "InvalidJobIdException":
|
|
849
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
850
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
851
|
-
case "InvalidKMSKeyException":
|
|
852
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
853
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
854
|
-
case "InvalidParameterException":
|
|
855
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
856
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
857
|
-
case "InvalidS3ObjectException":
|
|
858
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
859
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
860
|
-
case "ProvisionedThroughputExceededException":
|
|
861
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
862
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
863
|
-
case "ThrottlingException":
|
|
864
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
865
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
866
|
-
default:
|
|
867
|
-
const parsedBody = parsedOutput.body;
|
|
868
|
-
return throwDefaultError({
|
|
869
|
-
output,
|
|
870
|
-
parsedBody,
|
|
871
|
-
errorCode,
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
};
|
|
875
|
-
export const de_GetLendingAnalysisCommand = async (output, context) => {
|
|
876
|
-
if (output.statusCode >= 300) {
|
|
877
|
-
return de_GetLendingAnalysisCommandError(output, context);
|
|
878
|
-
}
|
|
879
|
-
const data = await parseBody(output.body, context);
|
|
880
|
-
let contents = {};
|
|
881
|
-
contents = de_GetLendingAnalysisResponse(data, context);
|
|
882
|
-
const response = {
|
|
883
|
-
$metadata: deserializeMetadata(output),
|
|
884
|
-
...contents,
|
|
885
|
-
};
|
|
886
|
-
return response;
|
|
887
|
-
};
|
|
888
|
-
const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
889
|
-
const parsedOutput = {
|
|
890
|
-
...output,
|
|
891
|
-
body: await parseErrorBody(output.body, context),
|
|
892
|
-
};
|
|
893
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
894
|
-
switch (errorCode) {
|
|
895
|
-
case "AccessDeniedException":
|
|
896
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
897
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
898
|
-
case "InternalServerError":
|
|
899
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
900
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
901
|
-
case "InvalidJobIdException":
|
|
902
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
903
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
904
|
-
case "InvalidKMSKeyException":
|
|
905
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
906
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
907
|
-
case "InvalidParameterException":
|
|
908
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
909
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
910
|
-
case "InvalidS3ObjectException":
|
|
911
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
912
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
913
|
-
case "ProvisionedThroughputExceededException":
|
|
914
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
915
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
916
|
-
case "ThrottlingException":
|
|
917
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
918
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
919
|
-
default:
|
|
920
|
-
const parsedBody = parsedOutput.body;
|
|
921
|
-
return throwDefaultError({
|
|
922
|
-
output,
|
|
923
|
-
parsedBody,
|
|
924
|
-
errorCode,
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
};
|
|
928
|
-
export const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
|
|
929
|
-
if (output.statusCode >= 300) {
|
|
930
|
-
return de_GetLendingAnalysisSummaryCommandError(output, context);
|
|
931
|
-
}
|
|
932
|
-
const data = await parseBody(output.body, context);
|
|
933
|
-
let contents = {};
|
|
934
|
-
contents = _json(data);
|
|
935
|
-
const response = {
|
|
936
|
-
$metadata: deserializeMetadata(output),
|
|
937
|
-
...contents,
|
|
938
|
-
};
|
|
939
|
-
return response;
|
|
940
|
-
};
|
|
941
|
-
const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
|
|
942
|
-
const parsedOutput = {
|
|
943
|
-
...output,
|
|
944
|
-
body: await parseErrorBody(output.body, context),
|
|
945
|
-
};
|
|
946
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
947
|
-
switch (errorCode) {
|
|
948
|
-
case "AccessDeniedException":
|
|
949
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
950
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
951
|
-
case "InternalServerError":
|
|
952
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
953
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
954
|
-
case "InvalidJobIdException":
|
|
955
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
956
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
957
|
-
case "InvalidKMSKeyException":
|
|
958
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
959
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
960
|
-
case "InvalidParameterException":
|
|
961
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
962
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
963
|
-
case "InvalidS3ObjectException":
|
|
964
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
965
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
966
|
-
case "ProvisionedThroughputExceededException":
|
|
967
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
968
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
969
|
-
case "ThrottlingException":
|
|
970
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
971
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
972
|
-
default:
|
|
973
|
-
const parsedBody = parsedOutput.body;
|
|
974
|
-
return throwDefaultError({
|
|
975
|
-
output,
|
|
976
|
-
parsedBody,
|
|
977
|
-
errorCode,
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
};
|
|
981
351
|
export const de_ListAdaptersCommand = async (output, context) => {
|
|
982
352
|
if (output.statusCode >= 300) {
|
|
983
|
-
return
|
|
353
|
+
return de_CommandError(output, context);
|
|
984
354
|
}
|
|
985
355
|
const data = await parseBody(output.body, context);
|
|
986
356
|
let contents = {};
|
|
@@ -991,273 +361,22 @@ export const de_ListAdaptersCommand = async (output, context) => {
|
|
|
991
361
|
};
|
|
992
362
|
return response;
|
|
993
363
|
};
|
|
994
|
-
const de_ListAdaptersCommandError = async (output, context) => {
|
|
995
|
-
const parsedOutput = {
|
|
996
|
-
...output,
|
|
997
|
-
body: await parseErrorBody(output.body, context),
|
|
998
|
-
};
|
|
999
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1000
|
-
switch (errorCode) {
|
|
1001
|
-
case "AccessDeniedException":
|
|
1002
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1003
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1004
|
-
case "InternalServerError":
|
|
1005
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1006
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1007
|
-
case "InvalidParameterException":
|
|
1008
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1009
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1010
|
-
case "ProvisionedThroughputExceededException":
|
|
1011
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1012
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1013
|
-
case "ThrottlingException":
|
|
1014
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1015
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1016
|
-
case "ValidationException":
|
|
1017
|
-
case "com.amazonaws.textract#ValidationException":
|
|
1018
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1019
|
-
default:
|
|
1020
|
-
const parsedBody = parsedOutput.body;
|
|
1021
|
-
return throwDefaultError({
|
|
1022
|
-
output,
|
|
1023
|
-
parsedBody,
|
|
1024
|
-
errorCode,
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
};
|
|
1028
364
|
export const de_ListAdapterVersionsCommand = async (output, context) => {
|
|
1029
365
|
if (output.statusCode >= 300) {
|
|
1030
|
-
return
|
|
1031
|
-
}
|
|
1032
|
-
const data = await parseBody(output.body, context);
|
|
1033
|
-
let contents = {};
|
|
1034
|
-
contents = de_ListAdapterVersionsResponse(data, context);
|
|
1035
|
-
const response = {
|
|
1036
|
-
$metadata: deserializeMetadata(output),
|
|
1037
|
-
...contents,
|
|
1038
|
-
};
|
|
1039
|
-
return response;
|
|
1040
|
-
};
|
|
1041
|
-
const de_ListAdapterVersionsCommandError = async (output, context) => {
|
|
1042
|
-
const parsedOutput = {
|
|
1043
|
-
...output,
|
|
1044
|
-
body: await parseErrorBody(output.body, context),
|
|
1045
|
-
};
|
|
1046
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1047
|
-
switch (errorCode) {
|
|
1048
|
-
case "AccessDeniedException":
|
|
1049
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1050
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1051
|
-
case "InternalServerError":
|
|
1052
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1053
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1054
|
-
case "InvalidParameterException":
|
|
1055
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1056
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1057
|
-
case "ProvisionedThroughputExceededException":
|
|
1058
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1059
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1060
|
-
case "ResourceNotFoundException":
|
|
1061
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1062
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1063
|
-
case "ThrottlingException":
|
|
1064
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1065
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1066
|
-
case "ValidationException":
|
|
1067
|
-
case "com.amazonaws.textract#ValidationException":
|
|
1068
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1069
|
-
default:
|
|
1070
|
-
const parsedBody = parsedOutput.body;
|
|
1071
|
-
return throwDefaultError({
|
|
1072
|
-
output,
|
|
1073
|
-
parsedBody,
|
|
1074
|
-
errorCode,
|
|
1075
|
-
});
|
|
1076
|
-
}
|
|
1077
|
-
};
|
|
1078
|
-
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1079
|
-
if (output.statusCode >= 300) {
|
|
1080
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
1081
|
-
}
|
|
1082
|
-
const data = await parseBody(output.body, context);
|
|
1083
|
-
let contents = {};
|
|
1084
|
-
contents = _json(data);
|
|
1085
|
-
const response = {
|
|
1086
|
-
$metadata: deserializeMetadata(output),
|
|
1087
|
-
...contents,
|
|
1088
|
-
};
|
|
1089
|
-
return response;
|
|
1090
|
-
};
|
|
1091
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1092
|
-
const parsedOutput = {
|
|
1093
|
-
...output,
|
|
1094
|
-
body: await parseErrorBody(output.body, context),
|
|
1095
|
-
};
|
|
1096
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1097
|
-
switch (errorCode) {
|
|
1098
|
-
case "AccessDeniedException":
|
|
1099
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1100
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1101
|
-
case "InternalServerError":
|
|
1102
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1103
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1104
|
-
case "InvalidParameterException":
|
|
1105
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1106
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1107
|
-
case "ProvisionedThroughputExceededException":
|
|
1108
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1109
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1110
|
-
case "ResourceNotFoundException":
|
|
1111
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1112
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1113
|
-
case "ThrottlingException":
|
|
1114
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1115
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1116
|
-
case "ValidationException":
|
|
1117
|
-
case "com.amazonaws.textract#ValidationException":
|
|
1118
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1119
|
-
default:
|
|
1120
|
-
const parsedBody = parsedOutput.body;
|
|
1121
|
-
return throwDefaultError({
|
|
1122
|
-
output,
|
|
1123
|
-
parsedBody,
|
|
1124
|
-
errorCode,
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
};
|
|
1128
|
-
export const de_StartDocumentAnalysisCommand = async (output, context) => {
|
|
1129
|
-
if (output.statusCode >= 300) {
|
|
1130
|
-
return de_StartDocumentAnalysisCommandError(output, context);
|
|
366
|
+
return de_CommandError(output, context);
|
|
1131
367
|
}
|
|
1132
368
|
const data = await parseBody(output.body, context);
|
|
1133
|
-
let contents = {};
|
|
1134
|
-
contents =
|
|
1135
|
-
const response = {
|
|
1136
|
-
$metadata: deserializeMetadata(output),
|
|
1137
|
-
...contents,
|
|
1138
|
-
};
|
|
1139
|
-
return response;
|
|
1140
|
-
};
|
|
1141
|
-
const de_StartDocumentAnalysisCommandError = async (output, context) => {
|
|
1142
|
-
const parsedOutput = {
|
|
1143
|
-
...output,
|
|
1144
|
-
body: await parseErrorBody(output.body, context),
|
|
1145
|
-
};
|
|
1146
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1147
|
-
switch (errorCode) {
|
|
1148
|
-
case "AccessDeniedException":
|
|
1149
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1150
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1151
|
-
case "BadDocumentException":
|
|
1152
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
1153
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
1154
|
-
case "DocumentTooLargeException":
|
|
1155
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1156
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
1157
|
-
case "IdempotentParameterMismatchException":
|
|
1158
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1159
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
1160
|
-
case "InternalServerError":
|
|
1161
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1162
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1163
|
-
case "InvalidKMSKeyException":
|
|
1164
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1165
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
1166
|
-
case "InvalidParameterException":
|
|
1167
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1168
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1169
|
-
case "InvalidS3ObjectException":
|
|
1170
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1171
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1172
|
-
case "LimitExceededException":
|
|
1173
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
1174
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1175
|
-
case "ProvisionedThroughputExceededException":
|
|
1176
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1177
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1178
|
-
case "ThrottlingException":
|
|
1179
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1180
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1181
|
-
case "UnsupportedDocumentException":
|
|
1182
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1183
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
1184
|
-
default:
|
|
1185
|
-
const parsedBody = parsedOutput.body;
|
|
1186
|
-
return throwDefaultError({
|
|
1187
|
-
output,
|
|
1188
|
-
parsedBody,
|
|
1189
|
-
errorCode,
|
|
1190
|
-
});
|
|
1191
|
-
}
|
|
1192
|
-
};
|
|
1193
|
-
export const de_StartDocumentTextDetectionCommand = async (output, context) => {
|
|
1194
|
-
if (output.statusCode >= 300) {
|
|
1195
|
-
return de_StartDocumentTextDetectionCommandError(output, context);
|
|
1196
|
-
}
|
|
1197
|
-
const data = await parseBody(output.body, context);
|
|
1198
|
-
let contents = {};
|
|
1199
|
-
contents = _json(data);
|
|
1200
|
-
const response = {
|
|
1201
|
-
$metadata: deserializeMetadata(output),
|
|
1202
|
-
...contents,
|
|
1203
|
-
};
|
|
1204
|
-
return response;
|
|
1205
|
-
};
|
|
1206
|
-
const de_StartDocumentTextDetectionCommandError = async (output, context) => {
|
|
1207
|
-
const parsedOutput = {
|
|
1208
|
-
...output,
|
|
1209
|
-
body: await parseErrorBody(output.body, context),
|
|
1210
|
-
};
|
|
1211
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1212
|
-
switch (errorCode) {
|
|
1213
|
-
case "AccessDeniedException":
|
|
1214
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1215
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1216
|
-
case "BadDocumentException":
|
|
1217
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
1218
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
1219
|
-
case "DocumentTooLargeException":
|
|
1220
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1221
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
1222
|
-
case "IdempotentParameterMismatchException":
|
|
1223
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1224
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
1225
|
-
case "InternalServerError":
|
|
1226
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1227
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1228
|
-
case "InvalidKMSKeyException":
|
|
1229
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1230
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
1231
|
-
case "InvalidParameterException":
|
|
1232
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1233
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1234
|
-
case "InvalidS3ObjectException":
|
|
1235
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1236
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1237
|
-
case "LimitExceededException":
|
|
1238
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
1239
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1240
|
-
case "ProvisionedThroughputExceededException":
|
|
1241
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1242
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1243
|
-
case "ThrottlingException":
|
|
1244
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1245
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1246
|
-
case "UnsupportedDocumentException":
|
|
1247
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1248
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
1249
|
-
default:
|
|
1250
|
-
const parsedBody = parsedOutput.body;
|
|
1251
|
-
return throwDefaultError({
|
|
1252
|
-
output,
|
|
1253
|
-
parsedBody,
|
|
1254
|
-
errorCode,
|
|
1255
|
-
});
|
|
1256
|
-
}
|
|
369
|
+
let contents = {};
|
|
370
|
+
contents = de_ListAdapterVersionsResponse(data, context);
|
|
371
|
+
const response = {
|
|
372
|
+
$metadata: deserializeMetadata(output),
|
|
373
|
+
...contents,
|
|
374
|
+
};
|
|
375
|
+
return response;
|
|
1257
376
|
};
|
|
1258
|
-
export const
|
|
377
|
+
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1259
378
|
if (output.statusCode >= 300) {
|
|
1260
|
-
return
|
|
379
|
+
return de_CommandError(output, context);
|
|
1261
380
|
}
|
|
1262
381
|
const data = await parseBody(output.body, context);
|
|
1263
382
|
let contents = {};
|
|
@@ -1268,61 +387,22 @@ export const de_StartExpenseAnalysisCommand = async (output, context) => {
|
|
|
1268
387
|
};
|
|
1269
388
|
return response;
|
|
1270
389
|
};
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
body: await parseErrorBody(output.body, context),
|
|
1275
|
-
};
|
|
1276
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1277
|
-
switch (errorCode) {
|
|
1278
|
-
case "AccessDeniedException":
|
|
1279
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1280
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1281
|
-
case "BadDocumentException":
|
|
1282
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
1283
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
1284
|
-
case "DocumentTooLargeException":
|
|
1285
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1286
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
1287
|
-
case "IdempotentParameterMismatchException":
|
|
1288
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1289
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
1290
|
-
case "InternalServerError":
|
|
1291
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1292
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1293
|
-
case "InvalidKMSKeyException":
|
|
1294
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1295
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
1296
|
-
case "InvalidParameterException":
|
|
1297
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1298
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1299
|
-
case "InvalidS3ObjectException":
|
|
1300
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1301
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1302
|
-
case "LimitExceededException":
|
|
1303
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
1304
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1305
|
-
case "ProvisionedThroughputExceededException":
|
|
1306
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1307
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1308
|
-
case "ThrottlingException":
|
|
1309
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1310
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1311
|
-
case "UnsupportedDocumentException":
|
|
1312
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1313
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
1314
|
-
default:
|
|
1315
|
-
const parsedBody = parsedOutput.body;
|
|
1316
|
-
return throwDefaultError({
|
|
1317
|
-
output,
|
|
1318
|
-
parsedBody,
|
|
1319
|
-
errorCode,
|
|
1320
|
-
});
|
|
390
|
+
export const de_StartDocumentAnalysisCommand = async (output, context) => {
|
|
391
|
+
if (output.statusCode >= 300) {
|
|
392
|
+
return de_CommandError(output, context);
|
|
1321
393
|
}
|
|
394
|
+
const data = await parseBody(output.body, context);
|
|
395
|
+
let contents = {};
|
|
396
|
+
contents = _json(data);
|
|
397
|
+
const response = {
|
|
398
|
+
$metadata: deserializeMetadata(output),
|
|
399
|
+
...contents,
|
|
400
|
+
};
|
|
401
|
+
return response;
|
|
1322
402
|
};
|
|
1323
|
-
export const
|
|
403
|
+
export const de_StartDocumentTextDetectionCommand = async (output, context) => {
|
|
1324
404
|
if (output.statusCode >= 300) {
|
|
1325
|
-
return
|
|
405
|
+
return de_CommandError(output, context);
|
|
1326
406
|
}
|
|
1327
407
|
const data = await parseBody(output.body, context);
|
|
1328
408
|
let contents = {};
|
|
@@ -1333,61 +413,22 @@ export const de_StartLendingAnalysisCommand = async (output, context) => {
|
|
|
1333
413
|
};
|
|
1334
414
|
return response;
|
|
1335
415
|
};
|
|
1336
|
-
const
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
body: await parseErrorBody(output.body, context),
|
|
1340
|
-
};
|
|
1341
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1342
|
-
switch (errorCode) {
|
|
1343
|
-
case "AccessDeniedException":
|
|
1344
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1345
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1346
|
-
case "BadDocumentException":
|
|
1347
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
1348
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
1349
|
-
case "DocumentTooLargeException":
|
|
1350
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1351
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
1352
|
-
case "IdempotentParameterMismatchException":
|
|
1353
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1354
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
1355
|
-
case "InternalServerError":
|
|
1356
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1357
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1358
|
-
case "InvalidKMSKeyException":
|
|
1359
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1360
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
1361
|
-
case "InvalidParameterException":
|
|
1362
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1363
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1364
|
-
case "InvalidS3ObjectException":
|
|
1365
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1366
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1367
|
-
case "LimitExceededException":
|
|
1368
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
1369
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1370
|
-
case "ProvisionedThroughputExceededException":
|
|
1371
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1372
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1373
|
-
case "ThrottlingException":
|
|
1374
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1375
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1376
|
-
case "UnsupportedDocumentException":
|
|
1377
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1378
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
1379
|
-
default:
|
|
1380
|
-
const parsedBody = parsedOutput.body;
|
|
1381
|
-
return throwDefaultError({
|
|
1382
|
-
output,
|
|
1383
|
-
parsedBody,
|
|
1384
|
-
errorCode,
|
|
1385
|
-
});
|
|
416
|
+
export const de_StartExpenseAnalysisCommand = async (output, context) => {
|
|
417
|
+
if (output.statusCode >= 300) {
|
|
418
|
+
return de_CommandError(output, context);
|
|
1386
419
|
}
|
|
420
|
+
const data = await parseBody(output.body, context);
|
|
421
|
+
let contents = {};
|
|
422
|
+
contents = _json(data);
|
|
423
|
+
const response = {
|
|
424
|
+
$metadata: deserializeMetadata(output),
|
|
425
|
+
...contents,
|
|
426
|
+
};
|
|
427
|
+
return response;
|
|
1387
428
|
};
|
|
1388
|
-
export const
|
|
429
|
+
export const de_StartLendingAnalysisCommand = async (output, context) => {
|
|
1389
430
|
if (output.statusCode >= 300) {
|
|
1390
|
-
return
|
|
431
|
+
return de_CommandError(output, context);
|
|
1391
432
|
}
|
|
1392
433
|
const data = await parseBody(output.body, context);
|
|
1393
434
|
let contents = {};
|
|
@@ -1398,49 +439,22 @@ export const de_TagResourceCommand = async (output, context) => {
|
|
|
1398
439
|
};
|
|
1399
440
|
return response;
|
|
1400
441
|
};
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
body: await parseErrorBody(output.body, context),
|
|
1405
|
-
};
|
|
1406
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1407
|
-
switch (errorCode) {
|
|
1408
|
-
case "AccessDeniedException":
|
|
1409
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1410
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1411
|
-
case "InternalServerError":
|
|
1412
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1413
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1414
|
-
case "InvalidParameterException":
|
|
1415
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1416
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1417
|
-
case "ProvisionedThroughputExceededException":
|
|
1418
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1419
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1420
|
-
case "ResourceNotFoundException":
|
|
1421
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1422
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1423
|
-
case "ServiceQuotaExceededException":
|
|
1424
|
-
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
1425
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1426
|
-
case "ThrottlingException":
|
|
1427
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1428
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1429
|
-
case "ValidationException":
|
|
1430
|
-
case "com.amazonaws.textract#ValidationException":
|
|
1431
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1432
|
-
default:
|
|
1433
|
-
const parsedBody = parsedOutput.body;
|
|
1434
|
-
return throwDefaultError({
|
|
1435
|
-
output,
|
|
1436
|
-
parsedBody,
|
|
1437
|
-
errorCode,
|
|
1438
|
-
});
|
|
442
|
+
export const de_TagResourceCommand = async (output, context) => {
|
|
443
|
+
if (output.statusCode >= 300) {
|
|
444
|
+
return de_CommandError(output, context);
|
|
1439
445
|
}
|
|
446
|
+
const data = await parseBody(output.body, context);
|
|
447
|
+
let contents = {};
|
|
448
|
+
contents = _json(data);
|
|
449
|
+
const response = {
|
|
450
|
+
$metadata: deserializeMetadata(output),
|
|
451
|
+
...contents,
|
|
452
|
+
};
|
|
453
|
+
return response;
|
|
1440
454
|
};
|
|
1441
455
|
export const de_UntagResourceCommand = async (output, context) => {
|
|
1442
456
|
if (output.statusCode >= 300) {
|
|
1443
|
-
return
|
|
457
|
+
return de_CommandError(output, context);
|
|
1444
458
|
}
|
|
1445
459
|
const data = await parseBody(output.body, context);
|
|
1446
460
|
let contents = {};
|
|
@@ -1451,46 +465,9 @@ export const de_UntagResourceCommand = async (output, context) => {
|
|
|
1451
465
|
};
|
|
1452
466
|
return response;
|
|
1453
467
|
};
|
|
1454
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1455
|
-
const parsedOutput = {
|
|
1456
|
-
...output,
|
|
1457
|
-
body: await parseErrorBody(output.body, context),
|
|
1458
|
-
};
|
|
1459
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1460
|
-
switch (errorCode) {
|
|
1461
|
-
case "AccessDeniedException":
|
|
1462
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
1463
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1464
|
-
case "InternalServerError":
|
|
1465
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
1466
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1467
|
-
case "InvalidParameterException":
|
|
1468
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
1469
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1470
|
-
case "ProvisionedThroughputExceededException":
|
|
1471
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1472
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1473
|
-
case "ResourceNotFoundException":
|
|
1474
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1475
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1476
|
-
case "ThrottlingException":
|
|
1477
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
1478
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1479
|
-
case "ValidationException":
|
|
1480
|
-
case "com.amazonaws.textract#ValidationException":
|
|
1481
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1482
|
-
default:
|
|
1483
|
-
const parsedBody = parsedOutput.body;
|
|
1484
|
-
return throwDefaultError({
|
|
1485
|
-
output,
|
|
1486
|
-
parsedBody,
|
|
1487
|
-
errorCode,
|
|
1488
|
-
});
|
|
1489
|
-
}
|
|
1490
|
-
};
|
|
1491
468
|
export const de_UpdateAdapterCommand = async (output, context) => {
|
|
1492
469
|
if (output.statusCode >= 300) {
|
|
1493
|
-
return
|
|
470
|
+
return de_CommandError(output, context);
|
|
1494
471
|
}
|
|
1495
472
|
const data = await parseBody(output.body, context);
|
|
1496
473
|
let contents = {};
|
|
@@ -1501,7 +478,7 @@ export const de_UpdateAdapterCommand = async (output, context) => {
|
|
|
1501
478
|
};
|
|
1502
479
|
return response;
|
|
1503
480
|
};
|
|
1504
|
-
const
|
|
481
|
+
const de_CommandError = async (output, context) => {
|
|
1505
482
|
const parsedOutput = {
|
|
1506
483
|
...output,
|
|
1507
484
|
body: await parseErrorBody(output.body, context),
|
|
@@ -1511,27 +488,57 @@ const de_UpdateAdapterCommandError = async (output, context) => {
|
|
|
1511
488
|
case "AccessDeniedException":
|
|
1512
489
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
1513
490
|
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1514
|
-
case "
|
|
1515
|
-
case "com.amazonaws.textract#
|
|
1516
|
-
throw await
|
|
491
|
+
case "BadDocumentException":
|
|
492
|
+
case "com.amazonaws.textract#BadDocumentException":
|
|
493
|
+
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
494
|
+
case "DocumentTooLargeException":
|
|
495
|
+
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
496
|
+
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
497
|
+
case "HumanLoopQuotaExceededException":
|
|
498
|
+
case "com.amazonaws.textract#HumanLoopQuotaExceededException":
|
|
499
|
+
throw await de_HumanLoopQuotaExceededExceptionRes(parsedOutput, context);
|
|
1517
500
|
case "InternalServerError":
|
|
1518
501
|
case "com.amazonaws.textract#InternalServerError":
|
|
1519
502
|
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1520
503
|
case "InvalidParameterException":
|
|
1521
504
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
1522
505
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
506
|
+
case "InvalidS3ObjectException":
|
|
507
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
508
|
+
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
1523
509
|
case "ProvisionedThroughputExceededException":
|
|
1524
510
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1525
511
|
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
1526
|
-
case "ResourceNotFoundException":
|
|
1527
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
1528
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1529
512
|
case "ThrottlingException":
|
|
1530
513
|
case "com.amazonaws.textract#ThrottlingException":
|
|
1531
514
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
515
|
+
case "UnsupportedDocumentException":
|
|
516
|
+
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
517
|
+
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
518
|
+
case "ConflictException":
|
|
519
|
+
case "com.amazonaws.textract#ConflictException":
|
|
520
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
521
|
+
case "IdempotentParameterMismatchException":
|
|
522
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
523
|
+
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
524
|
+
case "LimitExceededException":
|
|
525
|
+
case "com.amazonaws.textract#LimitExceededException":
|
|
526
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
527
|
+
case "ServiceQuotaExceededException":
|
|
528
|
+
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
529
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1532
530
|
case "ValidationException":
|
|
1533
531
|
case "com.amazonaws.textract#ValidationException":
|
|
1534
532
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
533
|
+
case "InvalidKMSKeyException":
|
|
534
|
+
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
535
|
+
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
536
|
+
case "ResourceNotFoundException":
|
|
537
|
+
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
538
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
539
|
+
case "InvalidJobIdException":
|
|
540
|
+
case "com.amazonaws.textract#InvalidJobIdException":
|
|
541
|
+
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
1535
542
|
default:
|
|
1536
543
|
const parsedBody = parsedOutput.body;
|
|
1537
544
|
return throwDefaultError({
|