@aws-sdk/client-textract 3.183.0 → 3.186.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/CHANGELOG.md +19 -0
- package/dist-cjs/protocols/Aws_json1_1.js +2 -2
- package/dist-es/Textract.js +49 -42
- package/dist-es/TextractClient.js +28 -22
- package/dist-es/commands/AnalyzeDocumentCommand.js +28 -21
- package/dist-es/commands/AnalyzeExpenseCommand.js +28 -21
- package/dist-es/commands/AnalyzeIDCommand.js +28 -21
- package/dist-es/commands/DetectDocumentTextCommand.js +28 -21
- package/dist-es/commands/GetDocumentAnalysisCommand.js +28 -21
- package/dist-es/commands/GetDocumentTextDetectionCommand.js +28 -21
- package/dist-es/commands/GetExpenseAnalysisCommand.js +28 -21
- package/dist-es/commands/StartDocumentAnalysisCommand.js +28 -21
- package/dist-es/commands/StartDocumentTextDetectionCommand.js +28 -21
- package/dist-es/commands/StartExpenseAnalysisCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/TextractServiceException.js +10 -5
- package/dist-es/models/models_0.js +233 -326
- package/dist-es/protocols/Aws_json1_1.js +1346 -1108
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +33 -33
|
@@ -1,1010 +1,1225 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { AccessDeniedException, BadDocumentException, DocumentTooLargeException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, InternalServerError, InvalidJobIdException, InvalidKMSKeyException, InvalidParameterException, InvalidS3ObjectException, LimitExceededException, ProvisionedThroughputExceededException, ThrottlingException, UnsupportedDocumentException, } from "../models/models_0";
|
|
4
5
|
import { TextractServiceException as __BaseException } from "../models/TextractServiceException";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
body
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
throw
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
throw
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
throw
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
throw
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
throw
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
output
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
};
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
};
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
throw
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
throw
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
throw
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
throw
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
throw
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
throw
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
throw
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
throw
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
};
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
6
|
+
export var serializeAws_json1_1AnalyzeDocumentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var headers, body;
|
|
8
|
+
return __generator(this, function (_a) {
|
|
9
|
+
headers = {
|
|
10
|
+
"content-type": "application/x-amz-json-1.1",
|
|
11
|
+
"x-amz-target": "Textract.AnalyzeDocument",
|
|
12
|
+
};
|
|
13
|
+
body = JSON.stringify(serializeAws_json1_1AnalyzeDocumentRequest(input, context));
|
|
14
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
15
|
+
});
|
|
16
|
+
}); };
|
|
17
|
+
export var serializeAws_json1_1AnalyzeExpenseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
18
|
+
var headers, body;
|
|
19
|
+
return __generator(this, function (_a) {
|
|
20
|
+
headers = {
|
|
21
|
+
"content-type": "application/x-amz-json-1.1",
|
|
22
|
+
"x-amz-target": "Textract.AnalyzeExpense",
|
|
23
|
+
};
|
|
24
|
+
body = JSON.stringify(serializeAws_json1_1AnalyzeExpenseRequest(input, context));
|
|
25
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
26
|
+
});
|
|
27
|
+
}); };
|
|
28
|
+
export var serializeAws_json1_1AnalyzeIDCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29
|
+
var headers, body;
|
|
30
|
+
return __generator(this, function (_a) {
|
|
31
|
+
headers = {
|
|
32
|
+
"content-type": "application/x-amz-json-1.1",
|
|
33
|
+
"x-amz-target": "Textract.AnalyzeID",
|
|
34
|
+
};
|
|
35
|
+
body = JSON.stringify(serializeAws_json1_1AnalyzeIDRequest(input, context));
|
|
36
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
37
|
+
});
|
|
38
|
+
}); };
|
|
39
|
+
export var serializeAws_json1_1DetectDocumentTextCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
40
|
+
var headers, body;
|
|
41
|
+
return __generator(this, function (_a) {
|
|
42
|
+
headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "Textract.DetectDocumentText",
|
|
45
|
+
};
|
|
46
|
+
body = JSON.stringify(serializeAws_json1_1DetectDocumentTextRequest(input, context));
|
|
47
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
48
|
+
});
|
|
49
|
+
}); };
|
|
50
|
+
export var serializeAws_json1_1GetDocumentAnalysisCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
51
|
+
var headers, body;
|
|
52
|
+
return __generator(this, function (_a) {
|
|
53
|
+
headers = {
|
|
54
|
+
"content-type": "application/x-amz-json-1.1",
|
|
55
|
+
"x-amz-target": "Textract.GetDocumentAnalysis",
|
|
56
|
+
};
|
|
57
|
+
body = JSON.stringify(serializeAws_json1_1GetDocumentAnalysisRequest(input, context));
|
|
58
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
59
|
+
});
|
|
60
|
+
}); };
|
|
61
|
+
export var serializeAws_json1_1GetDocumentTextDetectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
62
|
+
var headers, body;
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
headers = {
|
|
65
|
+
"content-type": "application/x-amz-json-1.1",
|
|
66
|
+
"x-amz-target": "Textract.GetDocumentTextDetection",
|
|
67
|
+
};
|
|
68
|
+
body = JSON.stringify(serializeAws_json1_1GetDocumentTextDetectionRequest(input, context));
|
|
69
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
70
|
+
});
|
|
71
|
+
}); };
|
|
72
|
+
export var serializeAws_json1_1GetExpenseAnalysisCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
73
|
+
var headers, body;
|
|
74
|
+
return __generator(this, function (_a) {
|
|
75
|
+
headers = {
|
|
76
|
+
"content-type": "application/x-amz-json-1.1",
|
|
77
|
+
"x-amz-target": "Textract.GetExpenseAnalysis",
|
|
78
|
+
};
|
|
79
|
+
body = JSON.stringify(serializeAws_json1_1GetExpenseAnalysisRequest(input, context));
|
|
80
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
81
|
+
});
|
|
82
|
+
}); };
|
|
83
|
+
export var serializeAws_json1_1StartDocumentAnalysisCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
+
var headers, body;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
headers = {
|
|
87
|
+
"content-type": "application/x-amz-json-1.1",
|
|
88
|
+
"x-amz-target": "Textract.StartDocumentAnalysis",
|
|
89
|
+
};
|
|
90
|
+
body = JSON.stringify(serializeAws_json1_1StartDocumentAnalysisRequest(input, context));
|
|
91
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
92
|
+
});
|
|
93
|
+
}); };
|
|
94
|
+
export var serializeAws_json1_1StartDocumentTextDetectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
95
|
+
var headers, body;
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
headers = {
|
|
98
|
+
"content-type": "application/x-amz-json-1.1",
|
|
99
|
+
"x-amz-target": "Textract.StartDocumentTextDetection",
|
|
100
|
+
};
|
|
101
|
+
body = JSON.stringify(serializeAws_json1_1StartDocumentTextDetectionRequest(input, context));
|
|
102
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
103
|
+
});
|
|
104
|
+
}); };
|
|
105
|
+
export var serializeAws_json1_1StartExpenseAnalysisCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
106
|
+
var headers, body;
|
|
107
|
+
return __generator(this, function (_a) {
|
|
108
|
+
headers = {
|
|
109
|
+
"content-type": "application/x-amz-json-1.1",
|
|
110
|
+
"x-amz-target": "Textract.StartExpenseAnalysis",
|
|
111
|
+
};
|
|
112
|
+
body = JSON.stringify(serializeAws_json1_1StartExpenseAnalysisRequest(input, context));
|
|
113
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
114
|
+
});
|
|
115
|
+
}); };
|
|
116
|
+
export var deserializeAws_json1_1AnalyzeDocumentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
|
+
var data, contents, response;
|
|
118
|
+
return __generator(this, function (_a) {
|
|
119
|
+
switch (_a.label) {
|
|
120
|
+
case 0:
|
|
121
|
+
if (output.statusCode >= 300) {
|
|
122
|
+
return [2, deserializeAws_json1_1AnalyzeDocumentCommandError(output, context)];
|
|
123
|
+
}
|
|
124
|
+
return [4, parseBody(output.body, context)];
|
|
125
|
+
case 1:
|
|
126
|
+
data = _a.sent();
|
|
127
|
+
contents = {};
|
|
128
|
+
contents = deserializeAws_json1_1AnalyzeDocumentResponse(data, context);
|
|
129
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
130
|
+
return [2, Promise.resolve(response)];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}); };
|
|
134
|
+
var deserializeAws_json1_1AnalyzeDocumentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
135
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
136
|
+
var _c;
|
|
137
|
+
return __generator(this, function (_d) {
|
|
138
|
+
switch (_d.label) {
|
|
139
|
+
case 0:
|
|
140
|
+
_a = [__assign({}, output)];
|
|
141
|
+
_c = {};
|
|
142
|
+
return [4, parseErrorBody(output.body, context)];
|
|
143
|
+
case 1:
|
|
144
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
145
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
146
|
+
_b = errorCode;
|
|
147
|
+
switch (_b) {
|
|
148
|
+
case "AccessDeniedException": return [3, 2];
|
|
149
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
150
|
+
case "BadDocumentException": return [3, 4];
|
|
151
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
152
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
153
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
154
|
+
case "HumanLoopQuotaExceededException": return [3, 8];
|
|
155
|
+
case "com.amazonaws.textract#HumanLoopQuotaExceededException": return [3, 8];
|
|
156
|
+
case "InternalServerError": return [3, 10];
|
|
157
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 10];
|
|
158
|
+
case "InvalidParameterException": return [3, 12];
|
|
159
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 12];
|
|
160
|
+
case "InvalidS3ObjectException": return [3, 14];
|
|
161
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 14];
|
|
162
|
+
case "ProvisionedThroughputExceededException": return [3, 16];
|
|
163
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 16];
|
|
164
|
+
case "ThrottlingException": return [3, 18];
|
|
165
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 18];
|
|
166
|
+
case "UnsupportedDocumentException": return [3, 20];
|
|
167
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 20];
|
|
168
|
+
}
|
|
169
|
+
return [3, 22];
|
|
170
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
171
|
+
case 3: throw _d.sent();
|
|
172
|
+
case 4: return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
173
|
+
case 5: throw _d.sent();
|
|
174
|
+
case 6: return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
175
|
+
case 7: throw _d.sent();
|
|
176
|
+
case 8: return [4, deserializeAws_json1_1HumanLoopQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
177
|
+
case 9: throw _d.sent();
|
|
178
|
+
case 10: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
179
|
+
case 11: throw _d.sent();
|
|
180
|
+
case 12: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
181
|
+
case 13: throw _d.sent();
|
|
182
|
+
case 14: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
183
|
+
case 15: throw _d.sent();
|
|
184
|
+
case 16: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
185
|
+
case 17: throw _d.sent();
|
|
186
|
+
case 18: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
187
|
+
case 19: throw _d.sent();
|
|
188
|
+
case 20: return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
189
|
+
case 21: throw _d.sent();
|
|
190
|
+
case 22:
|
|
191
|
+
parsedBody = parsedOutput.body;
|
|
192
|
+
throwDefaultError({
|
|
193
|
+
output: output,
|
|
194
|
+
parsedBody: parsedBody,
|
|
195
|
+
exceptionCtor: __BaseException,
|
|
196
|
+
errorCode: errorCode,
|
|
197
|
+
});
|
|
198
|
+
_d.label = 23;
|
|
199
|
+
case 23: return [2];
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}); };
|
|
203
|
+
export var deserializeAws_json1_1AnalyzeExpenseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
204
|
+
var data, contents, response;
|
|
205
|
+
return __generator(this, function (_a) {
|
|
206
|
+
switch (_a.label) {
|
|
207
|
+
case 0:
|
|
208
|
+
if (output.statusCode >= 300) {
|
|
209
|
+
return [2, deserializeAws_json1_1AnalyzeExpenseCommandError(output, context)];
|
|
210
|
+
}
|
|
211
|
+
return [4, parseBody(output.body, context)];
|
|
212
|
+
case 1:
|
|
213
|
+
data = _a.sent();
|
|
214
|
+
contents = {};
|
|
215
|
+
contents = deserializeAws_json1_1AnalyzeExpenseResponse(data, context);
|
|
216
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
217
|
+
return [2, Promise.resolve(response)];
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}); };
|
|
221
|
+
var deserializeAws_json1_1AnalyzeExpenseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
222
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
223
|
+
var _c;
|
|
224
|
+
return __generator(this, function (_d) {
|
|
225
|
+
switch (_d.label) {
|
|
226
|
+
case 0:
|
|
227
|
+
_a = [__assign({}, output)];
|
|
228
|
+
_c = {};
|
|
229
|
+
return [4, parseErrorBody(output.body, context)];
|
|
230
|
+
case 1:
|
|
231
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
232
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
233
|
+
_b = errorCode;
|
|
234
|
+
switch (_b) {
|
|
235
|
+
case "AccessDeniedException": return [3, 2];
|
|
236
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
237
|
+
case "BadDocumentException": return [3, 4];
|
|
238
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
239
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
240
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
241
|
+
case "InternalServerError": return [3, 8];
|
|
242
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 8];
|
|
243
|
+
case "InvalidParameterException": return [3, 10];
|
|
244
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
245
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
246
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
247
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
248
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
249
|
+
case "ThrottlingException": return [3, 16];
|
|
250
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
251
|
+
case "UnsupportedDocumentException": return [3, 18];
|
|
252
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 18];
|
|
253
|
+
}
|
|
254
|
+
return [3, 20];
|
|
255
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
256
|
+
case 3: throw _d.sent();
|
|
257
|
+
case 4: return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
258
|
+
case 5: throw _d.sent();
|
|
259
|
+
case 6: return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
260
|
+
case 7: throw _d.sent();
|
|
261
|
+
case 8: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
262
|
+
case 9: throw _d.sent();
|
|
263
|
+
case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
264
|
+
case 11: throw _d.sent();
|
|
265
|
+
case 12: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
266
|
+
case 13: throw _d.sent();
|
|
267
|
+
case 14: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
268
|
+
case 15: throw _d.sent();
|
|
269
|
+
case 16: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
270
|
+
case 17: throw _d.sent();
|
|
271
|
+
case 18: return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
272
|
+
case 19: throw _d.sent();
|
|
273
|
+
case 20:
|
|
274
|
+
parsedBody = parsedOutput.body;
|
|
275
|
+
throwDefaultError({
|
|
276
|
+
output: output,
|
|
277
|
+
parsedBody: parsedBody,
|
|
278
|
+
exceptionCtor: __BaseException,
|
|
279
|
+
errorCode: errorCode,
|
|
280
|
+
});
|
|
281
|
+
_d.label = 21;
|
|
282
|
+
case 21: return [2];
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}); };
|
|
286
|
+
export var deserializeAws_json1_1AnalyzeIDCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
287
|
+
var data, contents, response;
|
|
288
|
+
return __generator(this, function (_a) {
|
|
289
|
+
switch (_a.label) {
|
|
290
|
+
case 0:
|
|
291
|
+
if (output.statusCode >= 300) {
|
|
292
|
+
return [2, deserializeAws_json1_1AnalyzeIDCommandError(output, context)];
|
|
293
|
+
}
|
|
294
|
+
return [4, parseBody(output.body, context)];
|
|
295
|
+
case 1:
|
|
296
|
+
data = _a.sent();
|
|
297
|
+
contents = {};
|
|
298
|
+
contents = deserializeAws_json1_1AnalyzeIDResponse(data, context);
|
|
299
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
300
|
+
return [2, Promise.resolve(response)];
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
}); };
|
|
304
|
+
var deserializeAws_json1_1AnalyzeIDCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
305
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
306
|
+
var _c;
|
|
307
|
+
return __generator(this, function (_d) {
|
|
308
|
+
switch (_d.label) {
|
|
309
|
+
case 0:
|
|
310
|
+
_a = [__assign({}, output)];
|
|
311
|
+
_c = {};
|
|
312
|
+
return [4, parseErrorBody(output.body, context)];
|
|
313
|
+
case 1:
|
|
314
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
315
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
316
|
+
_b = errorCode;
|
|
317
|
+
switch (_b) {
|
|
318
|
+
case "AccessDeniedException": return [3, 2];
|
|
319
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
320
|
+
case "BadDocumentException": return [3, 4];
|
|
321
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
322
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
323
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
324
|
+
case "InternalServerError": return [3, 8];
|
|
325
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 8];
|
|
326
|
+
case "InvalidParameterException": return [3, 10];
|
|
327
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
328
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
329
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
330
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
331
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
332
|
+
case "ThrottlingException": return [3, 16];
|
|
333
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
334
|
+
case "UnsupportedDocumentException": return [3, 18];
|
|
335
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 18];
|
|
336
|
+
}
|
|
337
|
+
return [3, 20];
|
|
338
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
339
|
+
case 3: throw _d.sent();
|
|
340
|
+
case 4: return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
341
|
+
case 5: throw _d.sent();
|
|
342
|
+
case 6: return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
343
|
+
case 7: throw _d.sent();
|
|
344
|
+
case 8: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
345
|
+
case 9: throw _d.sent();
|
|
346
|
+
case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
347
|
+
case 11: throw _d.sent();
|
|
348
|
+
case 12: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
349
|
+
case 13: throw _d.sent();
|
|
350
|
+
case 14: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
351
|
+
case 15: throw _d.sent();
|
|
352
|
+
case 16: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
353
|
+
case 17: throw _d.sent();
|
|
354
|
+
case 18: return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
355
|
+
case 19: throw _d.sent();
|
|
356
|
+
case 20:
|
|
357
|
+
parsedBody = parsedOutput.body;
|
|
358
|
+
throwDefaultError({
|
|
359
|
+
output: output,
|
|
360
|
+
parsedBody: parsedBody,
|
|
361
|
+
exceptionCtor: __BaseException,
|
|
362
|
+
errorCode: errorCode,
|
|
363
|
+
});
|
|
364
|
+
_d.label = 21;
|
|
365
|
+
case 21: return [2];
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
}); };
|
|
369
|
+
export var deserializeAws_json1_1DetectDocumentTextCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
370
|
+
var data, contents, response;
|
|
371
|
+
return __generator(this, function (_a) {
|
|
372
|
+
switch (_a.label) {
|
|
373
|
+
case 0:
|
|
374
|
+
if (output.statusCode >= 300) {
|
|
375
|
+
return [2, deserializeAws_json1_1DetectDocumentTextCommandError(output, context)];
|
|
376
|
+
}
|
|
377
|
+
return [4, parseBody(output.body, context)];
|
|
378
|
+
case 1:
|
|
379
|
+
data = _a.sent();
|
|
380
|
+
contents = {};
|
|
381
|
+
contents = deserializeAws_json1_1DetectDocumentTextResponse(data, context);
|
|
382
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
383
|
+
return [2, Promise.resolve(response)];
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
}); };
|
|
387
|
+
var deserializeAws_json1_1DetectDocumentTextCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
388
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
389
|
+
var _c;
|
|
390
|
+
return __generator(this, function (_d) {
|
|
391
|
+
switch (_d.label) {
|
|
392
|
+
case 0:
|
|
393
|
+
_a = [__assign({}, output)];
|
|
394
|
+
_c = {};
|
|
395
|
+
return [4, parseErrorBody(output.body, context)];
|
|
396
|
+
case 1:
|
|
397
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
398
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
399
|
+
_b = errorCode;
|
|
400
|
+
switch (_b) {
|
|
401
|
+
case "AccessDeniedException": return [3, 2];
|
|
402
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
403
|
+
case "BadDocumentException": return [3, 4];
|
|
404
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
405
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
406
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
407
|
+
case "InternalServerError": return [3, 8];
|
|
408
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 8];
|
|
409
|
+
case "InvalidParameterException": return [3, 10];
|
|
410
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
411
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
412
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
413
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
414
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
415
|
+
case "ThrottlingException": return [3, 16];
|
|
416
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
417
|
+
case "UnsupportedDocumentException": return [3, 18];
|
|
418
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 18];
|
|
419
|
+
}
|
|
420
|
+
return [3, 20];
|
|
421
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
422
|
+
case 3: throw _d.sent();
|
|
423
|
+
case 4: return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
424
|
+
case 5: throw _d.sent();
|
|
425
|
+
case 6: return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
426
|
+
case 7: throw _d.sent();
|
|
427
|
+
case 8: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
428
|
+
case 9: throw _d.sent();
|
|
429
|
+
case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
430
|
+
case 11: throw _d.sent();
|
|
431
|
+
case 12: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
432
|
+
case 13: throw _d.sent();
|
|
433
|
+
case 14: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
434
|
+
case 15: throw _d.sent();
|
|
435
|
+
case 16: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
436
|
+
case 17: throw _d.sent();
|
|
437
|
+
case 18: return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
438
|
+
case 19: throw _d.sent();
|
|
439
|
+
case 20:
|
|
440
|
+
parsedBody = parsedOutput.body;
|
|
441
|
+
throwDefaultError({
|
|
442
|
+
output: output,
|
|
443
|
+
parsedBody: parsedBody,
|
|
444
|
+
exceptionCtor: __BaseException,
|
|
445
|
+
errorCode: errorCode,
|
|
446
|
+
});
|
|
447
|
+
_d.label = 21;
|
|
448
|
+
case 21: return [2];
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
}); };
|
|
452
|
+
export var deserializeAws_json1_1GetDocumentAnalysisCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
453
|
+
var data, contents, response;
|
|
454
|
+
return __generator(this, function (_a) {
|
|
455
|
+
switch (_a.label) {
|
|
456
|
+
case 0:
|
|
457
|
+
if (output.statusCode >= 300) {
|
|
458
|
+
return [2, deserializeAws_json1_1GetDocumentAnalysisCommandError(output, context)];
|
|
459
|
+
}
|
|
460
|
+
return [4, parseBody(output.body, context)];
|
|
461
|
+
case 1:
|
|
462
|
+
data = _a.sent();
|
|
463
|
+
contents = {};
|
|
464
|
+
contents = deserializeAws_json1_1GetDocumentAnalysisResponse(data, context);
|
|
465
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
466
|
+
return [2, Promise.resolve(response)];
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}); };
|
|
470
|
+
var deserializeAws_json1_1GetDocumentAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
471
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
472
|
+
var _c;
|
|
473
|
+
return __generator(this, function (_d) {
|
|
474
|
+
switch (_d.label) {
|
|
475
|
+
case 0:
|
|
476
|
+
_a = [__assign({}, output)];
|
|
477
|
+
_c = {};
|
|
478
|
+
return [4, parseErrorBody(output.body, context)];
|
|
479
|
+
case 1:
|
|
480
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
481
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
482
|
+
_b = errorCode;
|
|
483
|
+
switch (_b) {
|
|
484
|
+
case "AccessDeniedException": return [3, 2];
|
|
485
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
486
|
+
case "InternalServerError": return [3, 4];
|
|
487
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 4];
|
|
488
|
+
case "InvalidJobIdException": return [3, 6];
|
|
489
|
+
case "com.amazonaws.textract#InvalidJobIdException": return [3, 6];
|
|
490
|
+
case "InvalidKMSKeyException": return [3, 8];
|
|
491
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 8];
|
|
492
|
+
case "InvalidParameterException": return [3, 10];
|
|
493
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
494
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
495
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
496
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
497
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
498
|
+
case "ThrottlingException": return [3, 16];
|
|
499
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
500
|
+
}
|
|
501
|
+
return [3, 18];
|
|
502
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
503
|
+
case 3: throw _d.sent();
|
|
504
|
+
case 4: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
505
|
+
case 5: throw _d.sent();
|
|
506
|
+
case 6: return [4, deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context)];
|
|
507
|
+
case 7: throw _d.sent();
|
|
508
|
+
case 8: return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
509
|
+
case 9: throw _d.sent();
|
|
510
|
+
case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
511
|
+
case 11: throw _d.sent();
|
|
512
|
+
case 12: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
513
|
+
case 13: throw _d.sent();
|
|
514
|
+
case 14: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
515
|
+
case 15: throw _d.sent();
|
|
516
|
+
case 16: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
517
|
+
case 17: throw _d.sent();
|
|
518
|
+
case 18:
|
|
519
|
+
parsedBody = parsedOutput.body;
|
|
520
|
+
throwDefaultError({
|
|
521
|
+
output: output,
|
|
522
|
+
parsedBody: parsedBody,
|
|
523
|
+
exceptionCtor: __BaseException,
|
|
524
|
+
errorCode: errorCode,
|
|
525
|
+
});
|
|
526
|
+
_d.label = 19;
|
|
527
|
+
case 19: return [2];
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
}); };
|
|
531
|
+
export var deserializeAws_json1_1GetDocumentTextDetectionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
532
|
+
var data, contents, response;
|
|
533
|
+
return __generator(this, function (_a) {
|
|
534
|
+
switch (_a.label) {
|
|
535
|
+
case 0:
|
|
536
|
+
if (output.statusCode >= 300) {
|
|
537
|
+
return [2, deserializeAws_json1_1GetDocumentTextDetectionCommandError(output, context)];
|
|
538
|
+
}
|
|
539
|
+
return [4, parseBody(output.body, context)];
|
|
540
|
+
case 1:
|
|
541
|
+
data = _a.sent();
|
|
542
|
+
contents = {};
|
|
543
|
+
contents = deserializeAws_json1_1GetDocumentTextDetectionResponse(data, context);
|
|
544
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
545
|
+
return [2, Promise.resolve(response)];
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
}); };
|
|
549
|
+
var deserializeAws_json1_1GetDocumentTextDetectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
550
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
551
|
+
var _c;
|
|
552
|
+
return __generator(this, function (_d) {
|
|
553
|
+
switch (_d.label) {
|
|
554
|
+
case 0:
|
|
555
|
+
_a = [__assign({}, output)];
|
|
556
|
+
_c = {};
|
|
557
|
+
return [4, parseErrorBody(output.body, context)];
|
|
558
|
+
case 1:
|
|
559
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
560
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
561
|
+
_b = errorCode;
|
|
562
|
+
switch (_b) {
|
|
563
|
+
case "AccessDeniedException": return [3, 2];
|
|
564
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
565
|
+
case "InternalServerError": return [3, 4];
|
|
566
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 4];
|
|
567
|
+
case "InvalidJobIdException": return [3, 6];
|
|
568
|
+
case "com.amazonaws.textract#InvalidJobIdException": return [3, 6];
|
|
569
|
+
case "InvalidKMSKeyException": return [3, 8];
|
|
570
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 8];
|
|
571
|
+
case "InvalidParameterException": return [3, 10];
|
|
572
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
573
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
574
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
575
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
576
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
577
|
+
case "ThrottlingException": return [3, 16];
|
|
578
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
579
|
+
}
|
|
580
|
+
return [3, 18];
|
|
581
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
582
|
+
case 3: throw _d.sent();
|
|
583
|
+
case 4: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
584
|
+
case 5: throw _d.sent();
|
|
585
|
+
case 6: return [4, deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context)];
|
|
586
|
+
case 7: throw _d.sent();
|
|
587
|
+
case 8: return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
588
|
+
case 9: throw _d.sent();
|
|
589
|
+
case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
590
|
+
case 11: throw _d.sent();
|
|
591
|
+
case 12: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
592
|
+
case 13: throw _d.sent();
|
|
593
|
+
case 14: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
594
|
+
case 15: throw _d.sent();
|
|
595
|
+
case 16: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
596
|
+
case 17: throw _d.sent();
|
|
597
|
+
case 18:
|
|
598
|
+
parsedBody = parsedOutput.body;
|
|
599
|
+
throwDefaultError({
|
|
600
|
+
output: output,
|
|
601
|
+
parsedBody: parsedBody,
|
|
602
|
+
exceptionCtor: __BaseException,
|
|
603
|
+
errorCode: errorCode,
|
|
604
|
+
});
|
|
605
|
+
_d.label = 19;
|
|
606
|
+
case 19: return [2];
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
}); };
|
|
610
|
+
export var deserializeAws_json1_1GetExpenseAnalysisCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
611
|
+
var data, contents, response;
|
|
612
|
+
return __generator(this, function (_a) {
|
|
613
|
+
switch (_a.label) {
|
|
614
|
+
case 0:
|
|
615
|
+
if (output.statusCode >= 300) {
|
|
616
|
+
return [2, deserializeAws_json1_1GetExpenseAnalysisCommandError(output, context)];
|
|
617
|
+
}
|
|
618
|
+
return [4, parseBody(output.body, context)];
|
|
619
|
+
case 1:
|
|
620
|
+
data = _a.sent();
|
|
621
|
+
contents = {};
|
|
622
|
+
contents = deserializeAws_json1_1GetExpenseAnalysisResponse(data, context);
|
|
623
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
624
|
+
return [2, Promise.resolve(response)];
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
}); };
|
|
628
|
+
var deserializeAws_json1_1GetExpenseAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
629
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
630
|
+
var _c;
|
|
631
|
+
return __generator(this, function (_d) {
|
|
632
|
+
switch (_d.label) {
|
|
633
|
+
case 0:
|
|
634
|
+
_a = [__assign({}, output)];
|
|
635
|
+
_c = {};
|
|
636
|
+
return [4, parseErrorBody(output.body, context)];
|
|
637
|
+
case 1:
|
|
638
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
639
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
640
|
+
_b = errorCode;
|
|
641
|
+
switch (_b) {
|
|
642
|
+
case "AccessDeniedException": return [3, 2];
|
|
643
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
644
|
+
case "InternalServerError": return [3, 4];
|
|
645
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 4];
|
|
646
|
+
case "InvalidJobIdException": return [3, 6];
|
|
647
|
+
case "com.amazonaws.textract#InvalidJobIdException": return [3, 6];
|
|
648
|
+
case "InvalidKMSKeyException": return [3, 8];
|
|
649
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 8];
|
|
650
|
+
case "InvalidParameterException": return [3, 10];
|
|
651
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
652
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
653
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
654
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
655
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
656
|
+
case "ThrottlingException": return [3, 16];
|
|
657
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
658
|
+
}
|
|
659
|
+
return [3, 18];
|
|
660
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
661
|
+
case 3: throw _d.sent();
|
|
662
|
+
case 4: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
663
|
+
case 5: throw _d.sent();
|
|
664
|
+
case 6: return [4, deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context)];
|
|
665
|
+
case 7: throw _d.sent();
|
|
666
|
+
case 8: return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
667
|
+
case 9: throw _d.sent();
|
|
668
|
+
case 10: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
669
|
+
case 11: throw _d.sent();
|
|
670
|
+
case 12: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
671
|
+
case 13: throw _d.sent();
|
|
672
|
+
case 14: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
673
|
+
case 15: throw _d.sent();
|
|
674
|
+
case 16: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
675
|
+
case 17: throw _d.sent();
|
|
676
|
+
case 18:
|
|
677
|
+
parsedBody = parsedOutput.body;
|
|
678
|
+
throwDefaultError({
|
|
679
|
+
output: output,
|
|
680
|
+
parsedBody: parsedBody,
|
|
681
|
+
exceptionCtor: __BaseException,
|
|
682
|
+
errorCode: errorCode,
|
|
683
|
+
});
|
|
684
|
+
_d.label = 19;
|
|
685
|
+
case 19: return [2];
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
}); };
|
|
689
|
+
export var deserializeAws_json1_1StartDocumentAnalysisCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
690
|
+
var data, contents, response;
|
|
691
|
+
return __generator(this, function (_a) {
|
|
692
|
+
switch (_a.label) {
|
|
693
|
+
case 0:
|
|
694
|
+
if (output.statusCode >= 300) {
|
|
695
|
+
return [2, deserializeAws_json1_1StartDocumentAnalysisCommandError(output, context)];
|
|
696
|
+
}
|
|
697
|
+
return [4, parseBody(output.body, context)];
|
|
698
|
+
case 1:
|
|
699
|
+
data = _a.sent();
|
|
700
|
+
contents = {};
|
|
701
|
+
contents = deserializeAws_json1_1StartDocumentAnalysisResponse(data, context);
|
|
702
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
703
|
+
return [2, Promise.resolve(response)];
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
}); };
|
|
707
|
+
var deserializeAws_json1_1StartDocumentAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
708
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
709
|
+
var _c;
|
|
710
|
+
return __generator(this, function (_d) {
|
|
711
|
+
switch (_d.label) {
|
|
712
|
+
case 0:
|
|
713
|
+
_a = [__assign({}, output)];
|
|
714
|
+
_c = {};
|
|
715
|
+
return [4, parseErrorBody(output.body, context)];
|
|
716
|
+
case 1:
|
|
717
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
718
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
719
|
+
_b = errorCode;
|
|
720
|
+
switch (_b) {
|
|
721
|
+
case "AccessDeniedException": return [3, 2];
|
|
722
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
723
|
+
case "BadDocumentException": return [3, 4];
|
|
724
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
725
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
726
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
727
|
+
case "IdempotentParameterMismatchException": return [3, 8];
|
|
728
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException": return [3, 8];
|
|
729
|
+
case "InternalServerError": return [3, 10];
|
|
730
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 10];
|
|
731
|
+
case "InvalidKMSKeyException": return [3, 12];
|
|
732
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 12];
|
|
733
|
+
case "InvalidParameterException": return [3, 14];
|
|
734
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 14];
|
|
735
|
+
case "InvalidS3ObjectException": return [3, 16];
|
|
736
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 16];
|
|
737
|
+
case "LimitExceededException": return [3, 18];
|
|
738
|
+
case "com.amazonaws.textract#LimitExceededException": return [3, 18];
|
|
739
|
+
case "ProvisionedThroughputExceededException": return [3, 20];
|
|
740
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 20];
|
|
741
|
+
case "ThrottlingException": return [3, 22];
|
|
742
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 22];
|
|
743
|
+
case "UnsupportedDocumentException": return [3, 24];
|
|
744
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 24];
|
|
745
|
+
}
|
|
746
|
+
return [3, 26];
|
|
747
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
748
|
+
case 3: throw _d.sent();
|
|
749
|
+
case 4: return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
750
|
+
case 5: throw _d.sent();
|
|
751
|
+
case 6: return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
752
|
+
case 7: throw _d.sent();
|
|
753
|
+
case 8: return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
|
|
754
|
+
case 9: throw _d.sent();
|
|
755
|
+
case 10: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
756
|
+
case 11: throw _d.sent();
|
|
757
|
+
case 12: return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
758
|
+
case 13: throw _d.sent();
|
|
759
|
+
case 14: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
760
|
+
case 15: throw _d.sent();
|
|
761
|
+
case 16: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
762
|
+
case 17: throw _d.sent();
|
|
763
|
+
case 18: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
764
|
+
case 19: throw _d.sent();
|
|
765
|
+
case 20: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
766
|
+
case 21: throw _d.sent();
|
|
767
|
+
case 22: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
768
|
+
case 23: throw _d.sent();
|
|
769
|
+
case 24: return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
770
|
+
case 25: throw _d.sent();
|
|
771
|
+
case 26:
|
|
772
|
+
parsedBody = parsedOutput.body;
|
|
773
|
+
throwDefaultError({
|
|
774
|
+
output: output,
|
|
775
|
+
parsedBody: parsedBody,
|
|
776
|
+
exceptionCtor: __BaseException,
|
|
777
|
+
errorCode: errorCode,
|
|
778
|
+
});
|
|
779
|
+
_d.label = 27;
|
|
780
|
+
case 27: return [2];
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
}); };
|
|
784
|
+
export var deserializeAws_json1_1StartDocumentTextDetectionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
785
|
+
var data, contents, response;
|
|
786
|
+
return __generator(this, function (_a) {
|
|
787
|
+
switch (_a.label) {
|
|
788
|
+
case 0:
|
|
789
|
+
if (output.statusCode >= 300) {
|
|
790
|
+
return [2, deserializeAws_json1_1StartDocumentTextDetectionCommandError(output, context)];
|
|
791
|
+
}
|
|
792
|
+
return [4, parseBody(output.body, context)];
|
|
793
|
+
case 1:
|
|
794
|
+
data = _a.sent();
|
|
795
|
+
contents = {};
|
|
796
|
+
contents = deserializeAws_json1_1StartDocumentTextDetectionResponse(data, context);
|
|
797
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
798
|
+
return [2, Promise.resolve(response)];
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
}); };
|
|
802
|
+
var deserializeAws_json1_1StartDocumentTextDetectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
803
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
804
|
+
var _c;
|
|
805
|
+
return __generator(this, function (_d) {
|
|
806
|
+
switch (_d.label) {
|
|
807
|
+
case 0:
|
|
808
|
+
_a = [__assign({}, output)];
|
|
809
|
+
_c = {};
|
|
810
|
+
return [4, parseErrorBody(output.body, context)];
|
|
811
|
+
case 1:
|
|
812
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
813
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
814
|
+
_b = errorCode;
|
|
815
|
+
switch (_b) {
|
|
816
|
+
case "AccessDeniedException": return [3, 2];
|
|
817
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
818
|
+
case "BadDocumentException": return [3, 4];
|
|
819
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
820
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
821
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
822
|
+
case "IdempotentParameterMismatchException": return [3, 8];
|
|
823
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException": return [3, 8];
|
|
824
|
+
case "InternalServerError": return [3, 10];
|
|
825
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 10];
|
|
826
|
+
case "InvalidKMSKeyException": return [3, 12];
|
|
827
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 12];
|
|
828
|
+
case "InvalidParameterException": return [3, 14];
|
|
829
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 14];
|
|
830
|
+
case "InvalidS3ObjectException": return [3, 16];
|
|
831
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 16];
|
|
832
|
+
case "LimitExceededException": return [3, 18];
|
|
833
|
+
case "com.amazonaws.textract#LimitExceededException": return [3, 18];
|
|
834
|
+
case "ProvisionedThroughputExceededException": return [3, 20];
|
|
835
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 20];
|
|
836
|
+
case "ThrottlingException": return [3, 22];
|
|
837
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 22];
|
|
838
|
+
case "UnsupportedDocumentException": return [3, 24];
|
|
839
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 24];
|
|
840
|
+
}
|
|
841
|
+
return [3, 26];
|
|
842
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
843
|
+
case 3: throw _d.sent();
|
|
844
|
+
case 4: return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
845
|
+
case 5: throw _d.sent();
|
|
846
|
+
case 6: return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
847
|
+
case 7: throw _d.sent();
|
|
848
|
+
case 8: return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
|
|
849
|
+
case 9: throw _d.sent();
|
|
850
|
+
case 10: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
851
|
+
case 11: throw _d.sent();
|
|
852
|
+
case 12: return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
853
|
+
case 13: throw _d.sent();
|
|
854
|
+
case 14: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
855
|
+
case 15: throw _d.sent();
|
|
856
|
+
case 16: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
857
|
+
case 17: throw _d.sent();
|
|
858
|
+
case 18: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
859
|
+
case 19: throw _d.sent();
|
|
860
|
+
case 20: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
861
|
+
case 21: throw _d.sent();
|
|
862
|
+
case 22: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
863
|
+
case 23: throw _d.sent();
|
|
864
|
+
case 24: return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
865
|
+
case 25: throw _d.sent();
|
|
866
|
+
case 26:
|
|
867
|
+
parsedBody = parsedOutput.body;
|
|
868
|
+
throwDefaultError({
|
|
869
|
+
output: output,
|
|
870
|
+
parsedBody: parsedBody,
|
|
871
|
+
exceptionCtor: __BaseException,
|
|
872
|
+
errorCode: errorCode,
|
|
873
|
+
});
|
|
874
|
+
_d.label = 27;
|
|
875
|
+
case 27: return [2];
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
}); };
|
|
879
|
+
export var deserializeAws_json1_1StartExpenseAnalysisCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
880
|
+
var data, contents, response;
|
|
881
|
+
return __generator(this, function (_a) {
|
|
882
|
+
switch (_a.label) {
|
|
883
|
+
case 0:
|
|
884
|
+
if (output.statusCode >= 300) {
|
|
885
|
+
return [2, deserializeAws_json1_1StartExpenseAnalysisCommandError(output, context)];
|
|
886
|
+
}
|
|
887
|
+
return [4, parseBody(output.body, context)];
|
|
888
|
+
case 1:
|
|
889
|
+
data = _a.sent();
|
|
890
|
+
contents = {};
|
|
891
|
+
contents = deserializeAws_json1_1StartExpenseAnalysisResponse(data, context);
|
|
892
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
893
|
+
return [2, Promise.resolve(response)];
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
}); };
|
|
897
|
+
var deserializeAws_json1_1StartExpenseAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
898
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
899
|
+
var _c;
|
|
900
|
+
return __generator(this, function (_d) {
|
|
901
|
+
switch (_d.label) {
|
|
902
|
+
case 0:
|
|
903
|
+
_a = [__assign({}, output)];
|
|
904
|
+
_c = {};
|
|
905
|
+
return [4, parseErrorBody(output.body, context)];
|
|
906
|
+
case 1:
|
|
907
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
908
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
909
|
+
_b = errorCode;
|
|
910
|
+
switch (_b) {
|
|
911
|
+
case "AccessDeniedException": return [3, 2];
|
|
912
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
913
|
+
case "BadDocumentException": return [3, 4];
|
|
914
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
915
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
916
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
917
|
+
case "IdempotentParameterMismatchException": return [3, 8];
|
|
918
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException": return [3, 8];
|
|
919
|
+
case "InternalServerError": return [3, 10];
|
|
920
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 10];
|
|
921
|
+
case "InvalidKMSKeyException": return [3, 12];
|
|
922
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 12];
|
|
923
|
+
case "InvalidParameterException": return [3, 14];
|
|
924
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 14];
|
|
925
|
+
case "InvalidS3ObjectException": return [3, 16];
|
|
926
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 16];
|
|
927
|
+
case "LimitExceededException": return [3, 18];
|
|
928
|
+
case "com.amazonaws.textract#LimitExceededException": return [3, 18];
|
|
929
|
+
case "ProvisionedThroughputExceededException": return [3, 20];
|
|
930
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 20];
|
|
931
|
+
case "ThrottlingException": return [3, 22];
|
|
932
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 22];
|
|
933
|
+
case "UnsupportedDocumentException": return [3, 24];
|
|
934
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 24];
|
|
935
|
+
}
|
|
936
|
+
return [3, 26];
|
|
937
|
+
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
938
|
+
case 3: throw _d.sent();
|
|
939
|
+
case 4: return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
940
|
+
case 5: throw _d.sent();
|
|
941
|
+
case 6: return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
942
|
+
case 7: throw _d.sent();
|
|
943
|
+
case 8: return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
|
|
944
|
+
case 9: throw _d.sent();
|
|
945
|
+
case 10: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
946
|
+
case 11: throw _d.sent();
|
|
947
|
+
case 12: return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
948
|
+
case 13: throw _d.sent();
|
|
949
|
+
case 14: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
950
|
+
case 15: throw _d.sent();
|
|
951
|
+
case 16: return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
952
|
+
case 17: throw _d.sent();
|
|
953
|
+
case 18: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
954
|
+
case 19: throw _d.sent();
|
|
955
|
+
case 20: return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
956
|
+
case 21: throw _d.sent();
|
|
957
|
+
case 22: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
958
|
+
case 23: throw _d.sent();
|
|
959
|
+
case 24: return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
960
|
+
case 25: throw _d.sent();
|
|
961
|
+
case 26:
|
|
962
|
+
parsedBody = parsedOutput.body;
|
|
963
|
+
throwDefaultError({
|
|
964
|
+
output: output,
|
|
965
|
+
parsedBody: parsedBody,
|
|
966
|
+
exceptionCtor: __BaseException,
|
|
967
|
+
errorCode: errorCode,
|
|
968
|
+
});
|
|
969
|
+
_d.label = 27;
|
|
970
|
+
case 27: return [2];
|
|
971
|
+
}
|
|
972
|
+
});
|
|
973
|
+
}); };
|
|
974
|
+
var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
975
|
+
var body, deserialized, exception;
|
|
976
|
+
return __generator(this, function (_a) {
|
|
977
|
+
body = parsedOutput.body;
|
|
978
|
+
deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
979
|
+
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
980
|
+
return [2, __decorateServiceException(exception, body)];
|
|
981
|
+
});
|
|
982
|
+
}); };
|
|
983
|
+
var deserializeAws_json1_1BadDocumentExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
984
|
+
var body, deserialized, exception;
|
|
985
|
+
return __generator(this, function (_a) {
|
|
986
|
+
body = parsedOutput.body;
|
|
987
|
+
deserialized = deserializeAws_json1_1BadDocumentException(body, context);
|
|
988
|
+
exception = new BadDocumentException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
989
|
+
return [2, __decorateServiceException(exception, body)];
|
|
990
|
+
});
|
|
991
|
+
}); };
|
|
992
|
+
var deserializeAws_json1_1DocumentTooLargeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
993
|
+
var body, deserialized, exception;
|
|
994
|
+
return __generator(this, function (_a) {
|
|
995
|
+
body = parsedOutput.body;
|
|
996
|
+
deserialized = deserializeAws_json1_1DocumentTooLargeException(body, context);
|
|
997
|
+
exception = new DocumentTooLargeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
998
|
+
return [2, __decorateServiceException(exception, body)];
|
|
999
|
+
});
|
|
1000
|
+
}); };
|
|
1001
|
+
var deserializeAws_json1_1HumanLoopQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1002
|
+
var body, deserialized, exception;
|
|
1003
|
+
return __generator(this, function (_a) {
|
|
1004
|
+
body = parsedOutput.body;
|
|
1005
|
+
deserialized = deserializeAws_json1_1HumanLoopQuotaExceededException(body, context);
|
|
1006
|
+
exception = new HumanLoopQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1007
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1008
|
+
});
|
|
1009
|
+
}); };
|
|
1010
|
+
var deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1011
|
+
var body, deserialized, exception;
|
|
1012
|
+
return __generator(this, function (_a) {
|
|
1013
|
+
body = parsedOutput.body;
|
|
1014
|
+
deserialized = deserializeAws_json1_1IdempotentParameterMismatchException(body, context);
|
|
1015
|
+
exception = new IdempotentParameterMismatchException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1016
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1017
|
+
});
|
|
1018
|
+
}); };
|
|
1019
|
+
var deserializeAws_json1_1InternalServerErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1020
|
+
var body, deserialized, exception;
|
|
1021
|
+
return __generator(this, function (_a) {
|
|
1022
|
+
body = parsedOutput.body;
|
|
1023
|
+
deserialized = deserializeAws_json1_1InternalServerError(body, context);
|
|
1024
|
+
exception = new InternalServerError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1025
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1026
|
+
});
|
|
1027
|
+
}); };
|
|
1028
|
+
var deserializeAws_json1_1InvalidJobIdExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1029
|
+
var body, deserialized, exception;
|
|
1030
|
+
return __generator(this, function (_a) {
|
|
1031
|
+
body = parsedOutput.body;
|
|
1032
|
+
deserialized = deserializeAws_json1_1InvalidJobIdException(body, context);
|
|
1033
|
+
exception = new InvalidJobIdException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1034
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1035
|
+
});
|
|
1036
|
+
}); };
|
|
1037
|
+
var deserializeAws_json1_1InvalidKMSKeyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1038
|
+
var body, deserialized, exception;
|
|
1039
|
+
return __generator(this, function (_a) {
|
|
1040
|
+
body = parsedOutput.body;
|
|
1041
|
+
deserialized = deserializeAws_json1_1InvalidKMSKeyException(body, context);
|
|
1042
|
+
exception = new InvalidKMSKeyException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1043
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1044
|
+
});
|
|
1045
|
+
}); };
|
|
1046
|
+
var deserializeAws_json1_1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1047
|
+
var body, deserialized, exception;
|
|
1048
|
+
return __generator(this, function (_a) {
|
|
1049
|
+
body = parsedOutput.body;
|
|
1050
|
+
deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
|
|
1051
|
+
exception = new InvalidParameterException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1052
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1053
|
+
});
|
|
1054
|
+
}); };
|
|
1055
|
+
var deserializeAws_json1_1InvalidS3ObjectExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1056
|
+
var body, deserialized, exception;
|
|
1057
|
+
return __generator(this, function (_a) {
|
|
1058
|
+
body = parsedOutput.body;
|
|
1059
|
+
deserialized = deserializeAws_json1_1InvalidS3ObjectException(body, context);
|
|
1060
|
+
exception = new InvalidS3ObjectException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1061
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1062
|
+
});
|
|
1063
|
+
}); };
|
|
1064
|
+
var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1065
|
+
var body, deserialized, exception;
|
|
1066
|
+
return __generator(this, function (_a) {
|
|
1067
|
+
body = parsedOutput.body;
|
|
1068
|
+
deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
1069
|
+
exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1070
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1071
|
+
});
|
|
1072
|
+
}); };
|
|
1073
|
+
var deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1074
|
+
var body, deserialized, exception;
|
|
1075
|
+
return __generator(this, function (_a) {
|
|
1076
|
+
body = parsedOutput.body;
|
|
1077
|
+
deserialized = deserializeAws_json1_1ProvisionedThroughputExceededException(body, context);
|
|
1078
|
+
exception = new ProvisionedThroughputExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1079
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1080
|
+
});
|
|
1081
|
+
}); };
|
|
1082
|
+
var deserializeAws_json1_1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1083
|
+
var body, deserialized, exception;
|
|
1084
|
+
return __generator(this, function (_a) {
|
|
1085
|
+
body = parsedOutput.body;
|
|
1086
|
+
deserialized = deserializeAws_json1_1ThrottlingException(body, context);
|
|
1087
|
+
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1088
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1089
|
+
});
|
|
1090
|
+
}); };
|
|
1091
|
+
var deserializeAws_json1_1UnsupportedDocumentExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1092
|
+
var body, deserialized, exception;
|
|
1093
|
+
return __generator(this, function (_a) {
|
|
1094
|
+
body = parsedOutput.body;
|
|
1095
|
+
deserialized = deserializeAws_json1_1UnsupportedDocumentException(body, context);
|
|
1096
|
+
exception = new UnsupportedDocumentException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1097
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1098
|
+
});
|
|
1099
|
+
}); };
|
|
1100
|
+
var serializeAws_json1_1AnalyzeDocumentRequest = function (input, context) {
|
|
1101
|
+
return __assign(__assign(__assign(__assign({}, (input.Document != null && { Document: serializeAws_json1_1Document(input.Document, context) })), (input.FeatureTypes != null && { FeatureTypes: serializeAws_json1_1FeatureTypes(input.FeatureTypes, context) })), (input.HumanLoopConfig != null && {
|
|
1102
|
+
HumanLoopConfig: serializeAws_json1_1HumanLoopConfig(input.HumanLoopConfig, context),
|
|
1103
|
+
})), (input.QueriesConfig != null && {
|
|
1104
|
+
QueriesConfig: serializeAws_json1_1QueriesConfig(input.QueriesConfig, context),
|
|
1105
|
+
}));
|
|
1106
|
+
};
|
|
1107
|
+
var serializeAws_json1_1AnalyzeExpenseRequest = function (input, context) {
|
|
1108
|
+
return __assign({}, (input.Document != null && { Document: serializeAws_json1_1Document(input.Document, context) }));
|
|
1109
|
+
};
|
|
1110
|
+
var serializeAws_json1_1AnalyzeIDRequest = function (input, context) {
|
|
1111
|
+
return __assign({}, (input.DocumentPages != null && {
|
|
1112
|
+
DocumentPages: serializeAws_json1_1DocumentPages(input.DocumentPages, context),
|
|
1113
|
+
}));
|
|
1114
|
+
};
|
|
1115
|
+
var serializeAws_json1_1ContentClassifiers = function (input, context) {
|
|
837
1116
|
return input
|
|
838
|
-
.filter((e)
|
|
839
|
-
.map((entry)
|
|
1117
|
+
.filter(function (e) { return e != null; })
|
|
1118
|
+
.map(function (entry) {
|
|
840
1119
|
return entry;
|
|
841
1120
|
});
|
|
842
1121
|
};
|
|
843
|
-
|
|
844
|
-
return {
|
|
845
|
-
...(input.Document != null && { Document: serializeAws_json1_1Document(input.Document, context) }),
|
|
846
|
-
};
|
|
1122
|
+
var serializeAws_json1_1DetectDocumentTextRequest = function (input, context) {
|
|
1123
|
+
return __assign({}, (input.Document != null && { Document: serializeAws_json1_1Document(input.Document, context) }));
|
|
847
1124
|
};
|
|
848
|
-
|
|
849
|
-
return {
|
|
850
|
-
...(input.Bytes != null && { Bytes: context.base64Encoder(input.Bytes) }),
|
|
851
|
-
...(input.S3Object != null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }),
|
|
852
|
-
};
|
|
1125
|
+
var serializeAws_json1_1Document = function (input, context) {
|
|
1126
|
+
return __assign(__assign({}, (input.Bytes != null && { Bytes: context.base64Encoder(input.Bytes) })), (input.S3Object != null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }));
|
|
853
1127
|
};
|
|
854
|
-
|
|
855
|
-
return {
|
|
856
|
-
...(input.S3Object != null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }),
|
|
857
|
-
};
|
|
1128
|
+
var serializeAws_json1_1DocumentLocation = function (input, context) {
|
|
1129
|
+
return __assign({}, (input.S3Object != null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }));
|
|
858
1130
|
};
|
|
859
|
-
|
|
1131
|
+
var serializeAws_json1_1DocumentPages = function (input, context) {
|
|
860
1132
|
return input
|
|
861
|
-
.filter((e)
|
|
862
|
-
.map((entry)
|
|
1133
|
+
.filter(function (e) { return e != null; })
|
|
1134
|
+
.map(function (entry) {
|
|
863
1135
|
return serializeAws_json1_1Document(entry, context);
|
|
864
1136
|
});
|
|
865
1137
|
};
|
|
866
|
-
|
|
1138
|
+
var serializeAws_json1_1FeatureTypes = function (input, context) {
|
|
867
1139
|
return input
|
|
868
|
-
.filter((e)
|
|
869
|
-
.map((entry)
|
|
1140
|
+
.filter(function (e) { return e != null; })
|
|
1141
|
+
.map(function (entry) {
|
|
870
1142
|
return entry;
|
|
871
1143
|
});
|
|
872
1144
|
};
|
|
873
|
-
|
|
874
|
-
return {
|
|
875
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
876
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
877
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
878
|
-
};
|
|
1145
|
+
var serializeAws_json1_1GetDocumentAnalysisRequest = function (input, context) {
|
|
1146
|
+
return __assign(__assign(__assign({}, (input.JobId != null && { JobId: input.JobId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
|
|
879
1147
|
};
|
|
880
|
-
|
|
881
|
-
return {
|
|
882
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
883
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
884
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
885
|
-
};
|
|
1148
|
+
var serializeAws_json1_1GetDocumentTextDetectionRequest = function (input, context) {
|
|
1149
|
+
return __assign(__assign(__assign({}, (input.JobId != null && { JobId: input.JobId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
|
|
886
1150
|
};
|
|
887
|
-
|
|
888
|
-
return {
|
|
889
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
890
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
891
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
892
|
-
};
|
|
1151
|
+
var serializeAws_json1_1GetExpenseAnalysisRequest = function (input, context) {
|
|
1152
|
+
return __assign(__assign(__assign({}, (input.JobId != null && { JobId: input.JobId })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
|
|
893
1153
|
};
|
|
894
|
-
|
|
895
|
-
return {
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
}),
|
|
899
|
-
...(input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn }),
|
|
900
|
-
...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }),
|
|
901
|
-
};
|
|
1154
|
+
var serializeAws_json1_1HumanLoopConfig = function (input, context) {
|
|
1155
|
+
return __assign(__assign(__assign({}, (input.DataAttributes != null && {
|
|
1156
|
+
DataAttributes: serializeAws_json1_1HumanLoopDataAttributes(input.DataAttributes, context),
|
|
1157
|
+
})), (input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn })), (input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }));
|
|
902
1158
|
};
|
|
903
|
-
|
|
904
|
-
return {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
}),
|
|
908
|
-
};
|
|
1159
|
+
var serializeAws_json1_1HumanLoopDataAttributes = function (input, context) {
|
|
1160
|
+
return __assign({}, (input.ContentClassifiers != null && {
|
|
1161
|
+
ContentClassifiers: serializeAws_json1_1ContentClassifiers(input.ContentClassifiers, context),
|
|
1162
|
+
}));
|
|
909
1163
|
};
|
|
910
|
-
|
|
911
|
-
return {
|
|
912
|
-
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
913
|
-
...(input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }),
|
|
914
|
-
};
|
|
1164
|
+
var serializeAws_json1_1NotificationChannel = function (input, context) {
|
|
1165
|
+
return __assign(__assign({}, (input.RoleArn != null && { RoleArn: input.RoleArn })), (input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }));
|
|
915
1166
|
};
|
|
916
|
-
|
|
917
|
-
return {
|
|
918
|
-
...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
|
|
919
|
-
...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }),
|
|
920
|
-
};
|
|
1167
|
+
var serializeAws_json1_1OutputConfig = function (input, context) {
|
|
1168
|
+
return __assign(__assign({}, (input.S3Bucket != null && { S3Bucket: input.S3Bucket })), (input.S3Prefix != null && { S3Prefix: input.S3Prefix }));
|
|
921
1169
|
};
|
|
922
|
-
|
|
1170
|
+
var serializeAws_json1_1Queries = function (input, context) {
|
|
923
1171
|
return input
|
|
924
|
-
.filter((e)
|
|
925
|
-
.map((entry)
|
|
1172
|
+
.filter(function (e) { return e != null; })
|
|
1173
|
+
.map(function (entry) {
|
|
926
1174
|
return serializeAws_json1_1Query(entry, context);
|
|
927
1175
|
});
|
|
928
1176
|
};
|
|
929
|
-
|
|
930
|
-
return {
|
|
931
|
-
...(input.Queries != null && { Queries: serializeAws_json1_1Queries(input.Queries, context) }),
|
|
932
|
-
};
|
|
1177
|
+
var serializeAws_json1_1QueriesConfig = function (input, context) {
|
|
1178
|
+
return __assign({}, (input.Queries != null && { Queries: serializeAws_json1_1Queries(input.Queries, context) }));
|
|
933
1179
|
};
|
|
934
|
-
|
|
935
|
-
return {
|
|
936
|
-
...(input.Alias != null && { Alias: input.Alias }),
|
|
937
|
-
...(input.Pages != null && { Pages: serializeAws_json1_1QueryPages(input.Pages, context) }),
|
|
938
|
-
...(input.Text != null && { Text: input.Text }),
|
|
939
|
-
};
|
|
1180
|
+
var serializeAws_json1_1Query = function (input, context) {
|
|
1181
|
+
return __assign(__assign(__assign({}, (input.Alias != null && { Alias: input.Alias })), (input.Pages != null && { Pages: serializeAws_json1_1QueryPages(input.Pages, context) })), (input.Text != null && { Text: input.Text }));
|
|
940
1182
|
};
|
|
941
|
-
|
|
1183
|
+
var serializeAws_json1_1QueryPages = function (input, context) {
|
|
942
1184
|
return input
|
|
943
|
-
.filter((e)
|
|
944
|
-
.map((entry)
|
|
1185
|
+
.filter(function (e) { return e != null; })
|
|
1186
|
+
.map(function (entry) {
|
|
945
1187
|
return entry;
|
|
946
1188
|
});
|
|
947
1189
|
};
|
|
948
|
-
|
|
949
|
-
return {
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
};
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
976
|
-
...(input.DocumentLocation != null && {
|
|
977
|
-
DocumentLocation: serializeAws_json1_1DocumentLocation(input.DocumentLocation, context),
|
|
978
|
-
}),
|
|
979
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
980
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
981
|
-
...(input.NotificationChannel != null && {
|
|
982
|
-
NotificationChannel: serializeAws_json1_1NotificationChannel(input.NotificationChannel, context),
|
|
983
|
-
}),
|
|
984
|
-
...(input.OutputConfig != null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }),
|
|
985
|
-
};
|
|
986
|
-
};
|
|
987
|
-
const serializeAws_json1_1StartExpenseAnalysisRequest = (input, context) => {
|
|
988
|
-
return {
|
|
989
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
990
|
-
...(input.DocumentLocation != null && {
|
|
991
|
-
DocumentLocation: serializeAws_json1_1DocumentLocation(input.DocumentLocation, context),
|
|
992
|
-
}),
|
|
993
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
994
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
995
|
-
...(input.NotificationChannel != null && {
|
|
996
|
-
NotificationChannel: serializeAws_json1_1NotificationChannel(input.NotificationChannel, context),
|
|
997
|
-
}),
|
|
998
|
-
...(input.OutputConfig != null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }),
|
|
999
|
-
};
|
|
1000
|
-
};
|
|
1001
|
-
const deserializeAws_json1_1AccessDeniedException = (output, context) => {
|
|
1190
|
+
var serializeAws_json1_1S3Object = function (input, context) {
|
|
1191
|
+
return __assign(__assign(__assign({}, (input.Bucket != null && { Bucket: input.Bucket })), (input.Name != null && { Name: input.Name })), (input.Version != null && { Version: input.Version }));
|
|
1192
|
+
};
|
|
1193
|
+
var serializeAws_json1_1StartDocumentAnalysisRequest = function (input, context) {
|
|
1194
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken })), (input.DocumentLocation != null && {
|
|
1195
|
+
DocumentLocation: serializeAws_json1_1DocumentLocation(input.DocumentLocation, context),
|
|
1196
|
+
})), (input.FeatureTypes != null && { FeatureTypes: serializeAws_json1_1FeatureTypes(input.FeatureTypes, context) })), (input.JobTag != null && { JobTag: input.JobTag })), (input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId })), (input.NotificationChannel != null && {
|
|
1197
|
+
NotificationChannel: serializeAws_json1_1NotificationChannel(input.NotificationChannel, context),
|
|
1198
|
+
})), (input.OutputConfig != null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) })), (input.QueriesConfig != null && {
|
|
1199
|
+
QueriesConfig: serializeAws_json1_1QueriesConfig(input.QueriesConfig, context),
|
|
1200
|
+
}));
|
|
1201
|
+
};
|
|
1202
|
+
var serializeAws_json1_1StartDocumentTextDetectionRequest = function (input, context) {
|
|
1203
|
+
return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken })), (input.DocumentLocation != null && {
|
|
1204
|
+
DocumentLocation: serializeAws_json1_1DocumentLocation(input.DocumentLocation, context),
|
|
1205
|
+
})), (input.JobTag != null && { JobTag: input.JobTag })), (input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId })), (input.NotificationChannel != null && {
|
|
1206
|
+
NotificationChannel: serializeAws_json1_1NotificationChannel(input.NotificationChannel, context),
|
|
1207
|
+
})), (input.OutputConfig != null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }));
|
|
1208
|
+
};
|
|
1209
|
+
var serializeAws_json1_1StartExpenseAnalysisRequest = function (input, context) {
|
|
1210
|
+
return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken })), (input.DocumentLocation != null && {
|
|
1211
|
+
DocumentLocation: serializeAws_json1_1DocumentLocation(input.DocumentLocation, context),
|
|
1212
|
+
})), (input.JobTag != null && { JobTag: input.JobTag })), (input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId })), (input.NotificationChannel != null && {
|
|
1213
|
+
NotificationChannel: serializeAws_json1_1NotificationChannel(input.NotificationChannel, context),
|
|
1214
|
+
})), (input.OutputConfig != null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }));
|
|
1215
|
+
};
|
|
1216
|
+
var deserializeAws_json1_1AccessDeniedException = function (output, context) {
|
|
1002
1217
|
return {
|
|
1003
1218
|
Code: __expectString(output.Code),
|
|
1004
1219
|
Message: __expectString(output.Message),
|
|
1005
1220
|
};
|
|
1006
1221
|
};
|
|
1007
|
-
|
|
1222
|
+
var deserializeAws_json1_1AnalyzeDocumentResponse = function (output, context) {
|
|
1008
1223
|
return {
|
|
1009
1224
|
AnalyzeDocumentModelVersion: __expectString(output.AnalyzeDocumentModelVersion),
|
|
1010
1225
|
Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
|
|
@@ -1016,7 +1231,7 @@ const deserializeAws_json1_1AnalyzeDocumentResponse = (output, context) => {
|
|
|
1016
1231
|
: undefined,
|
|
1017
1232
|
};
|
|
1018
1233
|
};
|
|
1019
|
-
|
|
1234
|
+
var deserializeAws_json1_1AnalyzeExpenseResponse = function (output, context) {
|
|
1020
1235
|
return {
|
|
1021
1236
|
DocumentMetadata: output.DocumentMetadata != null
|
|
1022
1237
|
? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
|
|
@@ -1026,7 +1241,7 @@ const deserializeAws_json1_1AnalyzeExpenseResponse = (output, context) => {
|
|
|
1026
1241
|
: undefined,
|
|
1027
1242
|
};
|
|
1028
1243
|
};
|
|
1029
|
-
|
|
1244
|
+
var deserializeAws_json1_1AnalyzeIDDetections = function (output, context) {
|
|
1030
1245
|
return {
|
|
1031
1246
|
Confidence: __limitedParseFloat32(output.Confidence),
|
|
1032
1247
|
NormalizedValue: output.NormalizedValue != null
|
|
@@ -1035,7 +1250,7 @@ const deserializeAws_json1_1AnalyzeIDDetections = (output, context) => {
|
|
|
1035
1250
|
Text: __expectString(output.Text),
|
|
1036
1251
|
};
|
|
1037
1252
|
};
|
|
1038
|
-
|
|
1253
|
+
var deserializeAws_json1_1AnalyzeIDResponse = function (output, context) {
|
|
1039
1254
|
return {
|
|
1040
1255
|
AnalyzeIDModelVersion: __expectString(output.AnalyzeIDModelVersion),
|
|
1041
1256
|
DocumentMetadata: output.DocumentMetadata != null
|
|
@@ -1046,13 +1261,13 @@ const deserializeAws_json1_1AnalyzeIDResponse = (output, context) => {
|
|
|
1046
1261
|
: undefined,
|
|
1047
1262
|
};
|
|
1048
1263
|
};
|
|
1049
|
-
|
|
1264
|
+
var deserializeAws_json1_1BadDocumentException = function (output, context) {
|
|
1050
1265
|
return {
|
|
1051
1266
|
Code: __expectString(output.Code),
|
|
1052
1267
|
Message: __expectString(output.Message),
|
|
1053
1268
|
};
|
|
1054
1269
|
};
|
|
1055
|
-
|
|
1270
|
+
var deserializeAws_json1_1Block = function (output, context) {
|
|
1056
1271
|
return {
|
|
1057
1272
|
BlockType: __expectString(output.BlockType),
|
|
1058
1273
|
ColumnIndex: __expectInt32(output.ColumnIndex),
|
|
@@ -1071,10 +1286,10 @@ const deserializeAws_json1_1Block = (output, context) => {
|
|
|
1071
1286
|
TextType: __expectString(output.TextType),
|
|
1072
1287
|
};
|
|
1073
1288
|
};
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
.filter((e)
|
|
1077
|
-
.map((entry)
|
|
1289
|
+
var deserializeAws_json1_1BlockList = function (output, context) {
|
|
1290
|
+
var retVal = (output || [])
|
|
1291
|
+
.filter(function (e) { return e != null; })
|
|
1292
|
+
.map(function (entry) {
|
|
1078
1293
|
if (entry === null) {
|
|
1079
1294
|
return null;
|
|
1080
1295
|
}
|
|
@@ -1082,7 +1297,7 @@ const deserializeAws_json1_1BlockList = (output, context) => {
|
|
|
1082
1297
|
});
|
|
1083
1298
|
return retVal;
|
|
1084
1299
|
};
|
|
1085
|
-
|
|
1300
|
+
var deserializeAws_json1_1BoundingBox = function (output, context) {
|
|
1086
1301
|
return {
|
|
1087
1302
|
Height: __limitedParseFloat32(output.Height),
|
|
1088
1303
|
Left: __limitedParseFloat32(output.Left),
|
|
@@ -1090,7 +1305,7 @@ const deserializeAws_json1_1BoundingBox = (output, context) => {
|
|
|
1090
1305
|
Width: __limitedParseFloat32(output.Width),
|
|
1091
1306
|
};
|
|
1092
1307
|
};
|
|
1093
|
-
|
|
1308
|
+
var deserializeAws_json1_1DetectDocumentTextResponse = function (output, context) {
|
|
1094
1309
|
return {
|
|
1095
1310
|
Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
|
|
1096
1311
|
DetectDocumentTextModelVersion: __expectString(output.DetectDocumentTextModelVersion),
|
|
@@ -1099,21 +1314,21 @@ const deserializeAws_json1_1DetectDocumentTextResponse = (output, context) => {
|
|
|
1099
1314
|
: undefined,
|
|
1100
1315
|
};
|
|
1101
1316
|
};
|
|
1102
|
-
|
|
1317
|
+
var deserializeAws_json1_1DocumentMetadata = function (output, context) {
|
|
1103
1318
|
return {
|
|
1104
1319
|
Pages: __expectInt32(output.Pages),
|
|
1105
1320
|
};
|
|
1106
1321
|
};
|
|
1107
|
-
|
|
1322
|
+
var deserializeAws_json1_1DocumentTooLargeException = function (output, context) {
|
|
1108
1323
|
return {
|
|
1109
1324
|
Code: __expectString(output.Code),
|
|
1110
1325
|
Message: __expectString(output.Message),
|
|
1111
1326
|
};
|
|
1112
1327
|
};
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
.filter((e)
|
|
1116
|
-
.map((entry)
|
|
1328
|
+
var deserializeAws_json1_1EntityTypes = function (output, context) {
|
|
1329
|
+
var retVal = (output || [])
|
|
1330
|
+
.filter(function (e) { return e != null; })
|
|
1331
|
+
.map(function (entry) {
|
|
1117
1332
|
if (entry === null) {
|
|
1118
1333
|
return null;
|
|
1119
1334
|
}
|
|
@@ -1121,14 +1336,14 @@ const deserializeAws_json1_1EntityTypes = (output, context) => {
|
|
|
1121
1336
|
});
|
|
1122
1337
|
return retVal;
|
|
1123
1338
|
};
|
|
1124
|
-
|
|
1339
|
+
var deserializeAws_json1_1ExpenseDetection = function (output, context) {
|
|
1125
1340
|
return {
|
|
1126
1341
|
Confidence: __limitedParseFloat32(output.Confidence),
|
|
1127
1342
|
Geometry: output.Geometry != null ? deserializeAws_json1_1Geometry(output.Geometry, context) : undefined,
|
|
1128
1343
|
Text: __expectString(output.Text),
|
|
1129
1344
|
};
|
|
1130
1345
|
};
|
|
1131
|
-
|
|
1346
|
+
var deserializeAws_json1_1ExpenseDocument = function (output, context) {
|
|
1132
1347
|
return {
|
|
1133
1348
|
ExpenseIndex: __expectInt32(output.ExpenseIndex),
|
|
1134
1349
|
LineItemGroups: output.LineItemGroups != null
|
|
@@ -1137,10 +1352,10 @@ const deserializeAws_json1_1ExpenseDocument = (output, context) => {
|
|
|
1137
1352
|
SummaryFields: output.SummaryFields != null ? deserializeAws_json1_1ExpenseFieldList(output.SummaryFields, context) : undefined,
|
|
1138
1353
|
};
|
|
1139
1354
|
};
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
.filter((e)
|
|
1143
|
-
.map((entry)
|
|
1355
|
+
var deserializeAws_json1_1ExpenseDocumentList = function (output, context) {
|
|
1356
|
+
var retVal = (output || [])
|
|
1357
|
+
.filter(function (e) { return e != null; })
|
|
1358
|
+
.map(function (entry) {
|
|
1144
1359
|
if (entry === null) {
|
|
1145
1360
|
return null;
|
|
1146
1361
|
}
|
|
@@ -1148,7 +1363,7 @@ const deserializeAws_json1_1ExpenseDocumentList = (output, context) => {
|
|
|
1148
1363
|
});
|
|
1149
1364
|
return retVal;
|
|
1150
1365
|
};
|
|
1151
|
-
|
|
1366
|
+
var deserializeAws_json1_1ExpenseField = function (output, context) {
|
|
1152
1367
|
return {
|
|
1153
1368
|
LabelDetection: output.LabelDetection != null
|
|
1154
1369
|
? deserializeAws_json1_1ExpenseDetection(output.LabelDetection, context)
|
|
@@ -1160,10 +1375,10 @@ const deserializeAws_json1_1ExpenseField = (output, context) => {
|
|
|
1160
1375
|
: undefined,
|
|
1161
1376
|
};
|
|
1162
1377
|
};
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
.filter((e)
|
|
1166
|
-
.map((entry)
|
|
1378
|
+
var deserializeAws_json1_1ExpenseFieldList = function (output, context) {
|
|
1379
|
+
var retVal = (output || [])
|
|
1380
|
+
.filter(function (e) { return e != null; })
|
|
1381
|
+
.map(function (entry) {
|
|
1167
1382
|
if (entry === null) {
|
|
1168
1383
|
return null;
|
|
1169
1384
|
}
|
|
@@ -1171,19 +1386,19 @@ const deserializeAws_json1_1ExpenseFieldList = (output, context) => {
|
|
|
1171
1386
|
});
|
|
1172
1387
|
return retVal;
|
|
1173
1388
|
};
|
|
1174
|
-
|
|
1389
|
+
var deserializeAws_json1_1ExpenseType = function (output, context) {
|
|
1175
1390
|
return {
|
|
1176
1391
|
Confidence: __limitedParseFloat32(output.Confidence),
|
|
1177
1392
|
Text: __expectString(output.Text),
|
|
1178
1393
|
};
|
|
1179
1394
|
};
|
|
1180
|
-
|
|
1395
|
+
var deserializeAws_json1_1Geometry = function (output, context) {
|
|
1181
1396
|
return {
|
|
1182
1397
|
BoundingBox: output.BoundingBox != null ? deserializeAws_json1_1BoundingBox(output.BoundingBox, context) : undefined,
|
|
1183
1398
|
Polygon: output.Polygon != null ? deserializeAws_json1_1Polygon(output.Polygon, context) : undefined,
|
|
1184
1399
|
};
|
|
1185
1400
|
};
|
|
1186
|
-
|
|
1401
|
+
var deserializeAws_json1_1GetDocumentAnalysisResponse = function (output, context) {
|
|
1187
1402
|
return {
|
|
1188
1403
|
AnalyzeDocumentModelVersion: __expectString(output.AnalyzeDocumentModelVersion),
|
|
1189
1404
|
Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
|
|
@@ -1196,7 +1411,7 @@ const deserializeAws_json1_1GetDocumentAnalysisResponse = (output, context) => {
|
|
|
1196
1411
|
Warnings: output.Warnings != null ? deserializeAws_json1_1Warnings(output.Warnings, context) : undefined,
|
|
1197
1412
|
};
|
|
1198
1413
|
};
|
|
1199
|
-
|
|
1414
|
+
var deserializeAws_json1_1GetDocumentTextDetectionResponse = function (output, context) {
|
|
1200
1415
|
return {
|
|
1201
1416
|
Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
|
|
1202
1417
|
DetectDocumentTextModelVersion: __expectString(output.DetectDocumentTextModelVersion),
|
|
@@ -1209,7 +1424,7 @@ const deserializeAws_json1_1GetDocumentTextDetectionResponse = (output, context)
|
|
|
1209
1424
|
Warnings: output.Warnings != null ? deserializeAws_json1_1Warnings(output.Warnings, context) : undefined,
|
|
1210
1425
|
};
|
|
1211
1426
|
};
|
|
1212
|
-
|
|
1427
|
+
var deserializeAws_json1_1GetExpenseAnalysisResponse = function (output, context) {
|
|
1213
1428
|
return {
|
|
1214
1429
|
AnalyzeExpenseModelVersion: __expectString(output.AnalyzeExpenseModelVersion),
|
|
1215
1430
|
DocumentMetadata: output.DocumentMetadata != null
|
|
@@ -1224,7 +1439,7 @@ const deserializeAws_json1_1GetExpenseAnalysisResponse = (output, context) => {
|
|
|
1224
1439
|
Warnings: output.Warnings != null ? deserializeAws_json1_1Warnings(output.Warnings, context) : undefined,
|
|
1225
1440
|
};
|
|
1226
1441
|
};
|
|
1227
|
-
|
|
1442
|
+
var deserializeAws_json1_1HumanLoopActivationOutput = function (output, context) {
|
|
1228
1443
|
return {
|
|
1229
1444
|
HumanLoopActivationConditionsEvaluationResults: output.HumanLoopActivationConditionsEvaluationResults != null
|
|
1230
1445
|
? new __LazyJsonString(output.HumanLoopActivationConditionsEvaluationResults)
|
|
@@ -1235,10 +1450,10 @@ const deserializeAws_json1_1HumanLoopActivationOutput = (output, context) => {
|
|
|
1235
1450
|
HumanLoopArn: __expectString(output.HumanLoopArn),
|
|
1236
1451
|
};
|
|
1237
1452
|
};
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
.filter((e)
|
|
1241
|
-
.map((entry)
|
|
1453
|
+
var deserializeAws_json1_1HumanLoopActivationReasons = function (output, context) {
|
|
1454
|
+
var retVal = (output || [])
|
|
1455
|
+
.filter(function (e) { return e != null; })
|
|
1456
|
+
.map(function (entry) {
|
|
1242
1457
|
if (entry === null) {
|
|
1243
1458
|
return null;
|
|
1244
1459
|
}
|
|
@@ -1246,7 +1461,7 @@ const deserializeAws_json1_1HumanLoopActivationReasons = (output, context) => {
|
|
|
1246
1461
|
});
|
|
1247
1462
|
return retVal;
|
|
1248
1463
|
};
|
|
1249
|
-
|
|
1464
|
+
var deserializeAws_json1_1HumanLoopQuotaExceededException = function (output, context) {
|
|
1250
1465
|
return {
|
|
1251
1466
|
Code: __expectString(output.Code),
|
|
1252
1467
|
Message: __expectString(output.Message),
|
|
@@ -1255,13 +1470,13 @@ const deserializeAws_json1_1HumanLoopQuotaExceededException = (output, context)
|
|
|
1255
1470
|
ServiceCode: __expectString(output.ServiceCode),
|
|
1256
1471
|
};
|
|
1257
1472
|
};
|
|
1258
|
-
|
|
1473
|
+
var deserializeAws_json1_1IdempotentParameterMismatchException = function (output, context) {
|
|
1259
1474
|
return {
|
|
1260
1475
|
Code: __expectString(output.Code),
|
|
1261
1476
|
Message: __expectString(output.Message),
|
|
1262
1477
|
};
|
|
1263
1478
|
};
|
|
1264
|
-
|
|
1479
|
+
var deserializeAws_json1_1IdentityDocument = function (output, context) {
|
|
1265
1480
|
return {
|
|
1266
1481
|
DocumentIndex: __expectInt32(output.DocumentIndex),
|
|
1267
1482
|
IdentityDocumentFields: output.IdentityDocumentFields != null
|
|
@@ -1269,7 +1484,7 @@ const deserializeAws_json1_1IdentityDocument = (output, context) => {
|
|
|
1269
1484
|
: undefined,
|
|
1270
1485
|
};
|
|
1271
1486
|
};
|
|
1272
|
-
|
|
1487
|
+
var deserializeAws_json1_1IdentityDocumentField = function (output, context) {
|
|
1273
1488
|
return {
|
|
1274
1489
|
Type: output.Type != null ? deserializeAws_json1_1AnalyzeIDDetections(output.Type, context) : undefined,
|
|
1275
1490
|
ValueDetection: output.ValueDetection != null
|
|
@@ -1277,10 +1492,10 @@ const deserializeAws_json1_1IdentityDocumentField = (output, context) => {
|
|
|
1277
1492
|
: undefined,
|
|
1278
1493
|
};
|
|
1279
1494
|
};
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
.filter((e)
|
|
1283
|
-
.map((entry)
|
|
1495
|
+
var deserializeAws_json1_1IdentityDocumentFieldList = function (output, context) {
|
|
1496
|
+
var retVal = (output || [])
|
|
1497
|
+
.filter(function (e) { return e != null; })
|
|
1498
|
+
.map(function (entry) {
|
|
1284
1499
|
if (entry === null) {
|
|
1285
1500
|
return null;
|
|
1286
1501
|
}
|
|
@@ -1288,10 +1503,10 @@ const deserializeAws_json1_1IdentityDocumentFieldList = (output, context) => {
|
|
|
1288
1503
|
});
|
|
1289
1504
|
return retVal;
|
|
1290
1505
|
};
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
.filter((e)
|
|
1294
|
-
.map((entry)
|
|
1506
|
+
var deserializeAws_json1_1IdentityDocumentList = function (output, context) {
|
|
1507
|
+
var retVal = (output || [])
|
|
1508
|
+
.filter(function (e) { return e != null; })
|
|
1509
|
+
.map(function (entry) {
|
|
1295
1510
|
if (entry === null) {
|
|
1296
1511
|
return null;
|
|
1297
1512
|
}
|
|
@@ -1299,10 +1514,10 @@ const deserializeAws_json1_1IdentityDocumentList = (output, context) => {
|
|
|
1299
1514
|
});
|
|
1300
1515
|
return retVal;
|
|
1301
1516
|
};
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
.filter((e)
|
|
1305
|
-
.map((entry)
|
|
1517
|
+
var deserializeAws_json1_1IdList = function (output, context) {
|
|
1518
|
+
var retVal = (output || [])
|
|
1519
|
+
.filter(function (e) { return e != null; })
|
|
1520
|
+
.map(function (entry) {
|
|
1306
1521
|
if (entry === null) {
|
|
1307
1522
|
return null;
|
|
1308
1523
|
}
|
|
@@ -1310,59 +1525,59 @@ const deserializeAws_json1_1IdList = (output, context) => {
|
|
|
1310
1525
|
});
|
|
1311
1526
|
return retVal;
|
|
1312
1527
|
};
|
|
1313
|
-
|
|
1528
|
+
var deserializeAws_json1_1InternalServerError = function (output, context) {
|
|
1314
1529
|
return {
|
|
1315
1530
|
Code: __expectString(output.Code),
|
|
1316
1531
|
Message: __expectString(output.Message),
|
|
1317
1532
|
};
|
|
1318
1533
|
};
|
|
1319
|
-
|
|
1534
|
+
var deserializeAws_json1_1InvalidJobIdException = function (output, context) {
|
|
1320
1535
|
return {
|
|
1321
1536
|
Code: __expectString(output.Code),
|
|
1322
1537
|
Message: __expectString(output.Message),
|
|
1323
1538
|
};
|
|
1324
1539
|
};
|
|
1325
|
-
|
|
1540
|
+
var deserializeAws_json1_1InvalidKMSKeyException = function (output, context) {
|
|
1326
1541
|
return {
|
|
1327
1542
|
Code: __expectString(output.Code),
|
|
1328
1543
|
Message: __expectString(output.Message),
|
|
1329
1544
|
};
|
|
1330
1545
|
};
|
|
1331
|
-
|
|
1546
|
+
var deserializeAws_json1_1InvalidParameterException = function (output, context) {
|
|
1332
1547
|
return {
|
|
1333
1548
|
Code: __expectString(output.Code),
|
|
1334
1549
|
Message: __expectString(output.Message),
|
|
1335
1550
|
};
|
|
1336
1551
|
};
|
|
1337
|
-
|
|
1552
|
+
var deserializeAws_json1_1InvalidS3ObjectException = function (output, context) {
|
|
1338
1553
|
return {
|
|
1339
1554
|
Code: __expectString(output.Code),
|
|
1340
1555
|
Message: __expectString(output.Message),
|
|
1341
1556
|
};
|
|
1342
1557
|
};
|
|
1343
|
-
|
|
1558
|
+
var deserializeAws_json1_1LimitExceededException = function (output, context) {
|
|
1344
1559
|
return {
|
|
1345
1560
|
Code: __expectString(output.Code),
|
|
1346
1561
|
Message: __expectString(output.Message),
|
|
1347
1562
|
};
|
|
1348
1563
|
};
|
|
1349
|
-
|
|
1564
|
+
var deserializeAws_json1_1LineItemFields = function (output, context) {
|
|
1350
1565
|
return {
|
|
1351
1566
|
LineItemExpenseFields: output.LineItemExpenseFields != null
|
|
1352
1567
|
? deserializeAws_json1_1ExpenseFieldList(output.LineItemExpenseFields, context)
|
|
1353
1568
|
: undefined,
|
|
1354
1569
|
};
|
|
1355
1570
|
};
|
|
1356
|
-
|
|
1571
|
+
var deserializeAws_json1_1LineItemGroup = function (output, context) {
|
|
1357
1572
|
return {
|
|
1358
1573
|
LineItemGroupIndex: __expectInt32(output.LineItemGroupIndex),
|
|
1359
1574
|
LineItems: output.LineItems != null ? deserializeAws_json1_1LineItemList(output.LineItems, context) : undefined,
|
|
1360
1575
|
};
|
|
1361
1576
|
};
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
.filter((e)
|
|
1365
|
-
.map((entry)
|
|
1577
|
+
var deserializeAws_json1_1LineItemGroupList = function (output, context) {
|
|
1578
|
+
var retVal = (output || [])
|
|
1579
|
+
.filter(function (e) { return e != null; })
|
|
1580
|
+
.map(function (entry) {
|
|
1366
1581
|
if (entry === null) {
|
|
1367
1582
|
return null;
|
|
1368
1583
|
}
|
|
@@ -1370,10 +1585,10 @@ const deserializeAws_json1_1LineItemGroupList = (output, context) => {
|
|
|
1370
1585
|
});
|
|
1371
1586
|
return retVal;
|
|
1372
1587
|
};
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
.filter((e)
|
|
1376
|
-
.map((entry)
|
|
1588
|
+
var deserializeAws_json1_1LineItemList = function (output, context) {
|
|
1589
|
+
var retVal = (output || [])
|
|
1590
|
+
.filter(function (e) { return e != null; })
|
|
1591
|
+
.map(function (entry) {
|
|
1377
1592
|
if (entry === null) {
|
|
1378
1593
|
return null;
|
|
1379
1594
|
}
|
|
@@ -1381,16 +1596,16 @@ const deserializeAws_json1_1LineItemList = (output, context) => {
|
|
|
1381
1596
|
});
|
|
1382
1597
|
return retVal;
|
|
1383
1598
|
};
|
|
1384
|
-
|
|
1599
|
+
var deserializeAws_json1_1NormalizedValue = function (output, context) {
|
|
1385
1600
|
return {
|
|
1386
1601
|
Value: __expectString(output.Value),
|
|
1387
1602
|
ValueType: __expectString(output.ValueType),
|
|
1388
1603
|
};
|
|
1389
1604
|
};
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
.filter((e)
|
|
1393
|
-
.map((entry)
|
|
1605
|
+
var deserializeAws_json1_1Pages = function (output, context) {
|
|
1606
|
+
var retVal = (output || [])
|
|
1607
|
+
.filter(function (e) { return e != null; })
|
|
1608
|
+
.map(function (entry) {
|
|
1394
1609
|
if (entry === null) {
|
|
1395
1610
|
return null;
|
|
1396
1611
|
}
|
|
@@ -1398,16 +1613,16 @@ const deserializeAws_json1_1Pages = (output, context) => {
|
|
|
1398
1613
|
});
|
|
1399
1614
|
return retVal;
|
|
1400
1615
|
};
|
|
1401
|
-
|
|
1616
|
+
var deserializeAws_json1_1Point = function (output, context) {
|
|
1402
1617
|
return {
|
|
1403
1618
|
X: __limitedParseFloat32(output.X),
|
|
1404
1619
|
Y: __limitedParseFloat32(output.Y),
|
|
1405
1620
|
};
|
|
1406
1621
|
};
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
.filter((e)
|
|
1410
|
-
.map((entry)
|
|
1622
|
+
var deserializeAws_json1_1Polygon = function (output, context) {
|
|
1623
|
+
var retVal = (output || [])
|
|
1624
|
+
.filter(function (e) { return e != null; })
|
|
1625
|
+
.map(function (entry) {
|
|
1411
1626
|
if (entry === null) {
|
|
1412
1627
|
return null;
|
|
1413
1628
|
}
|
|
@@ -1415,23 +1630,23 @@ const deserializeAws_json1_1Polygon = (output, context) => {
|
|
|
1415
1630
|
});
|
|
1416
1631
|
return retVal;
|
|
1417
1632
|
};
|
|
1418
|
-
|
|
1633
|
+
var deserializeAws_json1_1ProvisionedThroughputExceededException = function (output, context) {
|
|
1419
1634
|
return {
|
|
1420
1635
|
Code: __expectString(output.Code),
|
|
1421
1636
|
Message: __expectString(output.Message),
|
|
1422
1637
|
};
|
|
1423
1638
|
};
|
|
1424
|
-
|
|
1639
|
+
var deserializeAws_json1_1Query = function (output, context) {
|
|
1425
1640
|
return {
|
|
1426
1641
|
Alias: __expectString(output.Alias),
|
|
1427
1642
|
Pages: output.Pages != null ? deserializeAws_json1_1QueryPages(output.Pages, context) : undefined,
|
|
1428
1643
|
Text: __expectString(output.Text),
|
|
1429
1644
|
};
|
|
1430
1645
|
};
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
.filter((e)
|
|
1434
|
-
.map((entry)
|
|
1646
|
+
var deserializeAws_json1_1QueryPages = function (output, context) {
|
|
1647
|
+
var retVal = (output || [])
|
|
1648
|
+
.filter(function (e) { return e != null; })
|
|
1649
|
+
.map(function (entry) {
|
|
1435
1650
|
if (entry === null) {
|
|
1436
1651
|
return null;
|
|
1437
1652
|
}
|
|
@@ -1439,16 +1654,16 @@ const deserializeAws_json1_1QueryPages = (output, context) => {
|
|
|
1439
1654
|
});
|
|
1440
1655
|
return retVal;
|
|
1441
1656
|
};
|
|
1442
|
-
|
|
1657
|
+
var deserializeAws_json1_1Relationship = function (output, context) {
|
|
1443
1658
|
return {
|
|
1444
1659
|
Ids: output.Ids != null ? deserializeAws_json1_1IdList(output.Ids, context) : undefined,
|
|
1445
1660
|
Type: __expectString(output.Type),
|
|
1446
1661
|
};
|
|
1447
1662
|
};
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
.filter((e)
|
|
1451
|
-
.map((entry)
|
|
1663
|
+
var deserializeAws_json1_1RelationshipList = function (output, context) {
|
|
1664
|
+
var retVal = (output || [])
|
|
1665
|
+
.filter(function (e) { return e != null; })
|
|
1666
|
+
.map(function (entry) {
|
|
1452
1667
|
if (entry === null) {
|
|
1453
1668
|
return null;
|
|
1454
1669
|
}
|
|
@@ -1456,43 +1671,43 @@ const deserializeAws_json1_1RelationshipList = (output, context) => {
|
|
|
1456
1671
|
});
|
|
1457
1672
|
return retVal;
|
|
1458
1673
|
};
|
|
1459
|
-
|
|
1674
|
+
var deserializeAws_json1_1StartDocumentAnalysisResponse = function (output, context) {
|
|
1460
1675
|
return {
|
|
1461
1676
|
JobId: __expectString(output.JobId),
|
|
1462
1677
|
};
|
|
1463
1678
|
};
|
|
1464
|
-
|
|
1679
|
+
var deserializeAws_json1_1StartDocumentTextDetectionResponse = function (output, context) {
|
|
1465
1680
|
return {
|
|
1466
1681
|
JobId: __expectString(output.JobId),
|
|
1467
1682
|
};
|
|
1468
1683
|
};
|
|
1469
|
-
|
|
1684
|
+
var deserializeAws_json1_1StartExpenseAnalysisResponse = function (output, context) {
|
|
1470
1685
|
return {
|
|
1471
1686
|
JobId: __expectString(output.JobId),
|
|
1472
1687
|
};
|
|
1473
1688
|
};
|
|
1474
|
-
|
|
1689
|
+
var deserializeAws_json1_1ThrottlingException = function (output, context) {
|
|
1475
1690
|
return {
|
|
1476
1691
|
Code: __expectString(output.Code),
|
|
1477
1692
|
Message: __expectString(output.Message),
|
|
1478
1693
|
};
|
|
1479
1694
|
};
|
|
1480
|
-
|
|
1695
|
+
var deserializeAws_json1_1UnsupportedDocumentException = function (output, context) {
|
|
1481
1696
|
return {
|
|
1482
1697
|
Code: __expectString(output.Code),
|
|
1483
1698
|
Message: __expectString(output.Message),
|
|
1484
1699
|
};
|
|
1485
1700
|
};
|
|
1486
|
-
|
|
1701
|
+
var deserializeAws_json1_1Warning = function (output, context) {
|
|
1487
1702
|
return {
|
|
1488
1703
|
ErrorCode: __expectString(output.ErrorCode),
|
|
1489
1704
|
Pages: output.Pages != null ? deserializeAws_json1_1Pages(output.Pages, context) : undefined,
|
|
1490
1705
|
};
|
|
1491
1706
|
};
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
.filter((e)
|
|
1495
|
-
.map((entry)
|
|
1707
|
+
var deserializeAws_json1_1Warnings = function (output, context) {
|
|
1708
|
+
var retVal = (output || [])
|
|
1709
|
+
.filter(function (e) { return e != null; })
|
|
1710
|
+
.map(function (entry) {
|
|
1496
1711
|
if (entry === null) {
|
|
1497
1712
|
return null;
|
|
1498
1713
|
}
|
|
@@ -1500,52 +1715,75 @@ const deserializeAws_json1_1Warnings = (output, context) => {
|
|
|
1500
1715
|
});
|
|
1501
1716
|
return retVal;
|
|
1502
1717
|
};
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1718
|
+
var deserializeMetadata = function (output) {
|
|
1719
|
+
var _a, _b;
|
|
1720
|
+
return ({
|
|
1721
|
+
httpStatusCode: output.statusCode,
|
|
1722
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
1723
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1724
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1725
|
+
});
|
|
1726
|
+
};
|
|
1727
|
+
var collectBody = function (streamBody, context) {
|
|
1728
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1510
1729
|
if (streamBody instanceof Uint8Array) {
|
|
1511
1730
|
return Promise.resolve(streamBody);
|
|
1512
1731
|
}
|
|
1513
1732
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1514
1733
|
};
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1734
|
+
var collectBodyString = function (streamBody, context) {
|
|
1735
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1736
|
+
};
|
|
1737
|
+
var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1738
|
+
var _a, hostname, _b, protocol, port, basePath, contents;
|
|
1739
|
+
return __generator(this, function (_c) {
|
|
1740
|
+
switch (_c.label) {
|
|
1741
|
+
case 0: return [4, context.endpoint()];
|
|
1742
|
+
case 1:
|
|
1743
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1744
|
+
contents = {
|
|
1745
|
+
protocol: protocol,
|
|
1746
|
+
hostname: hostname,
|
|
1747
|
+
port: port,
|
|
1748
|
+
method: "POST",
|
|
1749
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1750
|
+
headers: headers,
|
|
1751
|
+
};
|
|
1752
|
+
if (resolvedHostname !== undefined) {
|
|
1753
|
+
contents.hostname = resolvedHostname;
|
|
1754
|
+
}
|
|
1755
|
+
if (body !== undefined) {
|
|
1756
|
+
contents.body = body;
|
|
1757
|
+
}
|
|
1758
|
+
return [2, new __HttpRequest(contents)];
|
|
1759
|
+
}
|
|
1760
|
+
});
|
|
1761
|
+
}); };
|
|
1762
|
+
var parseBody = function (streamBody, context) {
|
|
1763
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1764
|
+
if (encoded.length) {
|
|
1765
|
+
return JSON.parse(encoded);
|
|
1766
|
+
}
|
|
1767
|
+
return {};
|
|
1768
|
+
});
|
|
1533
1769
|
};
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1770
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1771
|
+
var value;
|
|
1772
|
+
var _a;
|
|
1773
|
+
return __generator(this, function (_b) {
|
|
1774
|
+
switch (_b.label) {
|
|
1775
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1776
|
+
case 1:
|
|
1777
|
+
value = _b.sent();
|
|
1778
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1779
|
+
return [2, value];
|
|
1780
|
+
}
|
|
1781
|
+
});
|
|
1782
|
+
}); };
|
|
1783
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
1784
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1785
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
1786
|
+
var cleanValue = rawValue;
|
|
1549
1787
|
if (typeof cleanValue === "number") {
|
|
1550
1788
|
cleanValue = cleanValue.toString();
|
|
1551
1789
|
}
|
|
@@ -1560,7 +1798,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1560
1798
|
}
|
|
1561
1799
|
return cleanValue;
|
|
1562
1800
|
};
|
|
1563
|
-
|
|
1801
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1564
1802
|
if (headerKey !== undefined) {
|
|
1565
1803
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1566
1804
|
}
|