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