@aws-sdk/client-translate 3.183.0 → 3.186.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist-cjs/protocols/Aws_json1_1.js +2 -2
- package/dist-es/Translate.js +81 -74
- package/dist-es/TranslateClient.js +28 -22
- package/dist-es/commands/CreateParallelDataCommand.js +28 -21
- package/dist-es/commands/DeleteParallelDataCommand.js +28 -21
- package/dist-es/commands/DeleteTerminologyCommand.js +29 -22
- package/dist-es/commands/DescribeTextTranslationJobCommand.js +28 -21
- package/dist-es/commands/GetParallelDataCommand.js +28 -21
- package/dist-es/commands/GetTerminologyCommand.js +28 -21
- package/dist-es/commands/ImportTerminologyCommand.js +28 -21
- package/dist-es/commands/ListLanguagesCommand.js +28 -21
- package/dist-es/commands/ListParallelDataCommand.js +28 -21
- package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
- package/dist-es/commands/ListTerminologiesCommand.js +28 -21
- package/dist-es/commands/ListTextTranslationJobsCommand.js +28 -21
- package/dist-es/commands/StartTextTranslationJobCommand.js +28 -21
- package/dist-es/commands/StopTextTranslationJobCommand.js +28 -21
- package/dist-es/commands/TagResourceCommand.js +28 -21
- package/dist-es/commands/TranslateTextCommand.js +28 -21
- package/dist-es/commands/UntagResourceCommand.js +28 -21
- package/dist-es/commands/UpdateParallelDataCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/TranslateServiceException.js +10 -5
- package/dist-es/models/models_0.js +237 -342
- package/dist-es/pagination/ListLanguagesPaginator.js +68 -25
- package/dist-es/pagination/ListParallelDataPaginator.js +68 -25
- package/dist-es/pagination/ListTerminologiesPaginator.js +68 -25
- package/dist-es/pagination/ListTextTranslationJobsPaginator.js +68 -25
- package/dist-es/protocols/Aws_json1_1.js +1765 -1407
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +33 -33
|
@@ -1,1336 +1,1671 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
5
|
import { ConcurrentModificationException, ConflictException, DetectedLanguageLowConfidenceException, InternalServerException, InvalidFilterException, InvalidParameterValueException, InvalidRequestException, LimitExceededException, ResourceNotFoundException, ServiceUnavailableException, TextSizeLimitExceededException, TooManyRequestsException, TooManyTagsException, UnsupportedDisplayLanguageCodeException, UnsupportedLanguagePairException, } from "../models/models_0";
|
|
5
6
|
import { TranslateServiceException as __BaseException } from "../models/TranslateServiceException";
|
|
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
|
-
export
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
};
|
|
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
|
-
|
|
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
|
-
output,
|
|
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
|
-
throw
|
|
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
|
-
throw
|
|
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
|
-
throw
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
};
|
|
594
|
-
export
|
|
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
|
-
return
|
|
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
|
-
throw
|
|
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
|
-
errorCode
|
|
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
|
-
output,
|
|
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
|
-
throw
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
output,
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
throw
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
};
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
};
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
};
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
};
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
7
|
+
export var serializeAws_json1_1CreateParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8
|
+
var headers, body;
|
|
9
|
+
return __generator(this, function (_a) {
|
|
10
|
+
headers = {
|
|
11
|
+
"content-type": "application/x-amz-json-1.1",
|
|
12
|
+
"x-amz-target": "AWSShineFrontendService_20170701.CreateParallelData",
|
|
13
|
+
};
|
|
14
|
+
body = JSON.stringify(serializeAws_json1_1CreateParallelDataRequest(input, context));
|
|
15
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
16
|
+
});
|
|
17
|
+
}); };
|
|
18
|
+
export var serializeAws_json1_1DeleteParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
19
|
+
var headers, body;
|
|
20
|
+
return __generator(this, function (_a) {
|
|
21
|
+
headers = {
|
|
22
|
+
"content-type": "application/x-amz-json-1.1",
|
|
23
|
+
"x-amz-target": "AWSShineFrontendService_20170701.DeleteParallelData",
|
|
24
|
+
};
|
|
25
|
+
body = JSON.stringify(serializeAws_json1_1DeleteParallelDataRequest(input, context));
|
|
26
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
27
|
+
});
|
|
28
|
+
}); };
|
|
29
|
+
export var serializeAws_json1_1DeleteTerminologyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30
|
+
var headers, body;
|
|
31
|
+
return __generator(this, function (_a) {
|
|
32
|
+
headers = {
|
|
33
|
+
"content-type": "application/x-amz-json-1.1",
|
|
34
|
+
"x-amz-target": "AWSShineFrontendService_20170701.DeleteTerminology",
|
|
35
|
+
};
|
|
36
|
+
body = JSON.stringify(serializeAws_json1_1DeleteTerminologyRequest(input, context));
|
|
37
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
38
|
+
});
|
|
39
|
+
}); };
|
|
40
|
+
export var serializeAws_json1_1DescribeTextTranslationJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
+
var headers, body;
|
|
42
|
+
return __generator(this, function (_a) {
|
|
43
|
+
headers = {
|
|
44
|
+
"content-type": "application/x-amz-json-1.1",
|
|
45
|
+
"x-amz-target": "AWSShineFrontendService_20170701.DescribeTextTranslationJob",
|
|
46
|
+
};
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_1DescribeTextTranslationJobRequest(input, context));
|
|
48
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
49
|
+
});
|
|
50
|
+
}); };
|
|
51
|
+
export var serializeAws_json1_1GetParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
52
|
+
var headers, body;
|
|
53
|
+
return __generator(this, function (_a) {
|
|
54
|
+
headers = {
|
|
55
|
+
"content-type": "application/x-amz-json-1.1",
|
|
56
|
+
"x-amz-target": "AWSShineFrontendService_20170701.GetParallelData",
|
|
57
|
+
};
|
|
58
|
+
body = JSON.stringify(serializeAws_json1_1GetParallelDataRequest(input, context));
|
|
59
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
60
|
+
});
|
|
61
|
+
}); };
|
|
62
|
+
export var serializeAws_json1_1GetTerminologyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
63
|
+
var headers, body;
|
|
64
|
+
return __generator(this, function (_a) {
|
|
65
|
+
headers = {
|
|
66
|
+
"content-type": "application/x-amz-json-1.1",
|
|
67
|
+
"x-amz-target": "AWSShineFrontendService_20170701.GetTerminology",
|
|
68
|
+
};
|
|
69
|
+
body = JSON.stringify(serializeAws_json1_1GetTerminologyRequest(input, context));
|
|
70
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
71
|
+
});
|
|
72
|
+
}); };
|
|
73
|
+
export var serializeAws_json1_1ImportTerminologyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
74
|
+
var headers, body;
|
|
75
|
+
return __generator(this, function (_a) {
|
|
76
|
+
headers = {
|
|
77
|
+
"content-type": "application/x-amz-json-1.1",
|
|
78
|
+
"x-amz-target": "AWSShineFrontendService_20170701.ImportTerminology",
|
|
79
|
+
};
|
|
80
|
+
body = JSON.stringify(serializeAws_json1_1ImportTerminologyRequest(input, context));
|
|
81
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
82
|
+
});
|
|
83
|
+
}); };
|
|
84
|
+
export var serializeAws_json1_1ListLanguagesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
85
|
+
var headers, body;
|
|
86
|
+
return __generator(this, function (_a) {
|
|
87
|
+
headers = {
|
|
88
|
+
"content-type": "application/x-amz-json-1.1",
|
|
89
|
+
"x-amz-target": "AWSShineFrontendService_20170701.ListLanguages",
|
|
90
|
+
};
|
|
91
|
+
body = JSON.stringify(serializeAws_json1_1ListLanguagesRequest(input, context));
|
|
92
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
93
|
+
});
|
|
94
|
+
}); };
|
|
95
|
+
export var serializeAws_json1_1ListParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
96
|
+
var headers, body;
|
|
97
|
+
return __generator(this, function (_a) {
|
|
98
|
+
headers = {
|
|
99
|
+
"content-type": "application/x-amz-json-1.1",
|
|
100
|
+
"x-amz-target": "AWSShineFrontendService_20170701.ListParallelData",
|
|
101
|
+
};
|
|
102
|
+
body = JSON.stringify(serializeAws_json1_1ListParallelDataRequest(input, context));
|
|
103
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
104
|
+
});
|
|
105
|
+
}); };
|
|
106
|
+
export var serializeAws_json1_1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
107
|
+
var headers, body;
|
|
108
|
+
return __generator(this, function (_a) {
|
|
109
|
+
headers = {
|
|
110
|
+
"content-type": "application/x-amz-json-1.1",
|
|
111
|
+
"x-amz-target": "AWSShineFrontendService_20170701.ListTagsForResource",
|
|
112
|
+
};
|
|
113
|
+
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
|
|
114
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
115
|
+
});
|
|
116
|
+
}); };
|
|
117
|
+
export var serializeAws_json1_1ListTerminologiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
118
|
+
var headers, body;
|
|
119
|
+
return __generator(this, function (_a) {
|
|
120
|
+
headers = {
|
|
121
|
+
"content-type": "application/x-amz-json-1.1",
|
|
122
|
+
"x-amz-target": "AWSShineFrontendService_20170701.ListTerminologies",
|
|
123
|
+
};
|
|
124
|
+
body = JSON.stringify(serializeAws_json1_1ListTerminologiesRequest(input, context));
|
|
125
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
126
|
+
});
|
|
127
|
+
}); };
|
|
128
|
+
export var serializeAws_json1_1ListTextTranslationJobsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
129
|
+
var headers, body;
|
|
130
|
+
return __generator(this, function (_a) {
|
|
131
|
+
headers = {
|
|
132
|
+
"content-type": "application/x-amz-json-1.1",
|
|
133
|
+
"x-amz-target": "AWSShineFrontendService_20170701.ListTextTranslationJobs",
|
|
134
|
+
};
|
|
135
|
+
body = JSON.stringify(serializeAws_json1_1ListTextTranslationJobsRequest(input, context));
|
|
136
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
137
|
+
});
|
|
138
|
+
}); };
|
|
139
|
+
export var serializeAws_json1_1StartTextTranslationJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
140
|
+
var headers, body;
|
|
141
|
+
return __generator(this, function (_a) {
|
|
142
|
+
headers = {
|
|
143
|
+
"content-type": "application/x-amz-json-1.1",
|
|
144
|
+
"x-amz-target": "AWSShineFrontendService_20170701.StartTextTranslationJob",
|
|
145
|
+
};
|
|
146
|
+
body = JSON.stringify(serializeAws_json1_1StartTextTranslationJobRequest(input, context));
|
|
147
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
148
|
+
});
|
|
149
|
+
}); };
|
|
150
|
+
export var serializeAws_json1_1StopTextTranslationJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
151
|
+
var headers, body;
|
|
152
|
+
return __generator(this, function (_a) {
|
|
153
|
+
headers = {
|
|
154
|
+
"content-type": "application/x-amz-json-1.1",
|
|
155
|
+
"x-amz-target": "AWSShineFrontendService_20170701.StopTextTranslationJob",
|
|
156
|
+
};
|
|
157
|
+
body = JSON.stringify(serializeAws_json1_1StopTextTranslationJobRequest(input, context));
|
|
158
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
159
|
+
});
|
|
160
|
+
}); };
|
|
161
|
+
export var serializeAws_json1_1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
162
|
+
var headers, body;
|
|
163
|
+
return __generator(this, function (_a) {
|
|
164
|
+
headers = {
|
|
165
|
+
"content-type": "application/x-amz-json-1.1",
|
|
166
|
+
"x-amz-target": "AWSShineFrontendService_20170701.TagResource",
|
|
167
|
+
};
|
|
168
|
+
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
|
|
169
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
170
|
+
});
|
|
171
|
+
}); };
|
|
172
|
+
export var serializeAws_json1_1TranslateTextCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
173
|
+
var headers, body;
|
|
174
|
+
return __generator(this, function (_a) {
|
|
175
|
+
headers = {
|
|
176
|
+
"content-type": "application/x-amz-json-1.1",
|
|
177
|
+
"x-amz-target": "AWSShineFrontendService_20170701.TranslateText",
|
|
178
|
+
};
|
|
179
|
+
body = JSON.stringify(serializeAws_json1_1TranslateTextRequest(input, context));
|
|
180
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
181
|
+
});
|
|
182
|
+
}); };
|
|
183
|
+
export var serializeAws_json1_1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
184
|
+
var headers, body;
|
|
185
|
+
return __generator(this, function (_a) {
|
|
186
|
+
headers = {
|
|
187
|
+
"content-type": "application/x-amz-json-1.1",
|
|
188
|
+
"x-amz-target": "AWSShineFrontendService_20170701.UntagResource",
|
|
189
|
+
};
|
|
190
|
+
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
|
|
191
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
192
|
+
});
|
|
193
|
+
}); };
|
|
194
|
+
export var serializeAws_json1_1UpdateParallelDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
195
|
+
var headers, body;
|
|
196
|
+
return __generator(this, function (_a) {
|
|
197
|
+
headers = {
|
|
198
|
+
"content-type": "application/x-amz-json-1.1",
|
|
199
|
+
"x-amz-target": "AWSShineFrontendService_20170701.UpdateParallelData",
|
|
200
|
+
};
|
|
201
|
+
body = JSON.stringify(serializeAws_json1_1UpdateParallelDataRequest(input, context));
|
|
202
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
203
|
+
});
|
|
204
|
+
}); };
|
|
205
|
+
export var deserializeAws_json1_1CreateParallelDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
206
|
+
var data, contents, response;
|
|
207
|
+
return __generator(this, function (_a) {
|
|
208
|
+
switch (_a.label) {
|
|
209
|
+
case 0:
|
|
210
|
+
if (output.statusCode >= 300) {
|
|
211
|
+
return [2, deserializeAws_json1_1CreateParallelDataCommandError(output, context)];
|
|
212
|
+
}
|
|
213
|
+
return [4, parseBody(output.body, context)];
|
|
214
|
+
case 1:
|
|
215
|
+
data = _a.sent();
|
|
216
|
+
contents = {};
|
|
217
|
+
contents = deserializeAws_json1_1CreateParallelDataResponse(data, context);
|
|
218
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
219
|
+
return [2, Promise.resolve(response)];
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}); };
|
|
223
|
+
var deserializeAws_json1_1CreateParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
224
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
225
|
+
var _c;
|
|
226
|
+
return __generator(this, function (_d) {
|
|
227
|
+
switch (_d.label) {
|
|
228
|
+
case 0:
|
|
229
|
+
_a = [__assign({}, output)];
|
|
230
|
+
_c = {};
|
|
231
|
+
return [4, parseErrorBody(output.body, context)];
|
|
232
|
+
case 1:
|
|
233
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
234
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
235
|
+
_b = errorCode;
|
|
236
|
+
switch (_b) {
|
|
237
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
238
|
+
case "com.amazonaws.translate#ConcurrentModificationException": return [3, 2];
|
|
239
|
+
case "ConflictException": return [3, 4];
|
|
240
|
+
case "com.amazonaws.translate#ConflictException": return [3, 4];
|
|
241
|
+
case "InternalServerException": return [3, 6];
|
|
242
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 6];
|
|
243
|
+
case "InvalidParameterValueException": return [3, 8];
|
|
244
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 8];
|
|
245
|
+
case "InvalidRequestException": return [3, 10];
|
|
246
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 10];
|
|
247
|
+
case "LimitExceededException": return [3, 12];
|
|
248
|
+
case "com.amazonaws.translate#LimitExceededException": return [3, 12];
|
|
249
|
+
case "TooManyRequestsException": return [3, 14];
|
|
250
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 14];
|
|
251
|
+
case "TooManyTagsException": return [3, 16];
|
|
252
|
+
case "com.amazonaws.translate#TooManyTagsException": return [3, 16];
|
|
253
|
+
}
|
|
254
|
+
return [3, 18];
|
|
255
|
+
case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
256
|
+
case 3: throw _d.sent();
|
|
257
|
+
case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
|
|
258
|
+
case 5: throw _d.sent();
|
|
259
|
+
case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
260
|
+
case 7: throw _d.sent();
|
|
261
|
+
case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
262
|
+
case 9: throw _d.sent();
|
|
263
|
+
case 10: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
264
|
+
case 11: throw _d.sent();
|
|
265
|
+
case 12: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
266
|
+
case 13: throw _d.sent();
|
|
267
|
+
case 14: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
268
|
+
case 15: throw _d.sent();
|
|
269
|
+
case 16: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
|
|
270
|
+
case 17: throw _d.sent();
|
|
271
|
+
case 18:
|
|
272
|
+
parsedBody = parsedOutput.body;
|
|
273
|
+
throwDefaultError({
|
|
274
|
+
output: output,
|
|
275
|
+
parsedBody: parsedBody,
|
|
276
|
+
exceptionCtor: __BaseException,
|
|
277
|
+
errorCode: errorCode,
|
|
278
|
+
});
|
|
279
|
+
_d.label = 19;
|
|
280
|
+
case 19: return [2];
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}); };
|
|
284
|
+
export var deserializeAws_json1_1DeleteParallelDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
285
|
+
var data, contents, response;
|
|
286
|
+
return __generator(this, function (_a) {
|
|
287
|
+
switch (_a.label) {
|
|
288
|
+
case 0:
|
|
289
|
+
if (output.statusCode >= 300) {
|
|
290
|
+
return [2, deserializeAws_json1_1DeleteParallelDataCommandError(output, context)];
|
|
291
|
+
}
|
|
292
|
+
return [4, parseBody(output.body, context)];
|
|
293
|
+
case 1:
|
|
294
|
+
data = _a.sent();
|
|
295
|
+
contents = {};
|
|
296
|
+
contents = deserializeAws_json1_1DeleteParallelDataResponse(data, context);
|
|
297
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
298
|
+
return [2, Promise.resolve(response)];
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}); };
|
|
302
|
+
var deserializeAws_json1_1DeleteParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
303
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
304
|
+
var _c;
|
|
305
|
+
return __generator(this, function (_d) {
|
|
306
|
+
switch (_d.label) {
|
|
307
|
+
case 0:
|
|
308
|
+
_a = [__assign({}, output)];
|
|
309
|
+
_c = {};
|
|
310
|
+
return [4, parseErrorBody(output.body, context)];
|
|
311
|
+
case 1:
|
|
312
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
313
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
314
|
+
_b = errorCode;
|
|
315
|
+
switch (_b) {
|
|
316
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
317
|
+
case "com.amazonaws.translate#ConcurrentModificationException": return [3, 2];
|
|
318
|
+
case "InternalServerException": return [3, 4];
|
|
319
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 4];
|
|
320
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
321
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
322
|
+
case "TooManyRequestsException": return [3, 8];
|
|
323
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
324
|
+
}
|
|
325
|
+
return [3, 10];
|
|
326
|
+
case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
327
|
+
case 3: throw _d.sent();
|
|
328
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
329
|
+
case 5: throw _d.sent();
|
|
330
|
+
case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
331
|
+
case 7: throw _d.sent();
|
|
332
|
+
case 8: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
333
|
+
case 9: throw _d.sent();
|
|
334
|
+
case 10:
|
|
335
|
+
parsedBody = parsedOutput.body;
|
|
336
|
+
throwDefaultError({
|
|
337
|
+
output: output,
|
|
338
|
+
parsedBody: parsedBody,
|
|
339
|
+
exceptionCtor: __BaseException,
|
|
340
|
+
errorCode: errorCode,
|
|
341
|
+
});
|
|
342
|
+
_d.label = 11;
|
|
343
|
+
case 11: return [2];
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}); };
|
|
347
|
+
export var deserializeAws_json1_1DeleteTerminologyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
348
|
+
var response;
|
|
349
|
+
return __generator(this, function (_a) {
|
|
350
|
+
switch (_a.label) {
|
|
351
|
+
case 0:
|
|
352
|
+
if (output.statusCode >= 300) {
|
|
353
|
+
return [2, deserializeAws_json1_1DeleteTerminologyCommandError(output, context)];
|
|
354
|
+
}
|
|
355
|
+
return [4, collectBody(output.body, context)];
|
|
356
|
+
case 1:
|
|
357
|
+
_a.sent();
|
|
358
|
+
response = {
|
|
359
|
+
$metadata: deserializeMetadata(output),
|
|
360
|
+
};
|
|
361
|
+
return [2, Promise.resolve(response)];
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
}); };
|
|
365
|
+
var deserializeAws_json1_1DeleteTerminologyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
366
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
367
|
+
var _c;
|
|
368
|
+
return __generator(this, function (_d) {
|
|
369
|
+
switch (_d.label) {
|
|
370
|
+
case 0:
|
|
371
|
+
_a = [__assign({}, output)];
|
|
372
|
+
_c = {};
|
|
373
|
+
return [4, parseErrorBody(output.body, context)];
|
|
374
|
+
case 1:
|
|
375
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
376
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
377
|
+
_b = errorCode;
|
|
378
|
+
switch (_b) {
|
|
379
|
+
case "InternalServerException": return [3, 2];
|
|
380
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
381
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
382
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
383
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
384
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
385
|
+
case "TooManyRequestsException": return [3, 8];
|
|
386
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
387
|
+
}
|
|
388
|
+
return [3, 10];
|
|
389
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
390
|
+
case 3: throw _d.sent();
|
|
391
|
+
case 4: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
392
|
+
case 5: throw _d.sent();
|
|
393
|
+
case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
394
|
+
case 7: throw _d.sent();
|
|
395
|
+
case 8: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
396
|
+
case 9: throw _d.sent();
|
|
397
|
+
case 10:
|
|
398
|
+
parsedBody = parsedOutput.body;
|
|
399
|
+
throwDefaultError({
|
|
400
|
+
output: output,
|
|
401
|
+
parsedBody: parsedBody,
|
|
402
|
+
exceptionCtor: __BaseException,
|
|
403
|
+
errorCode: errorCode,
|
|
404
|
+
});
|
|
405
|
+
_d.label = 11;
|
|
406
|
+
case 11: return [2];
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
}); };
|
|
410
|
+
export var deserializeAws_json1_1DescribeTextTranslationJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
411
|
+
var data, contents, response;
|
|
412
|
+
return __generator(this, function (_a) {
|
|
413
|
+
switch (_a.label) {
|
|
414
|
+
case 0:
|
|
415
|
+
if (output.statusCode >= 300) {
|
|
416
|
+
return [2, deserializeAws_json1_1DescribeTextTranslationJobCommandError(output, context)];
|
|
417
|
+
}
|
|
418
|
+
return [4, parseBody(output.body, context)];
|
|
419
|
+
case 1:
|
|
420
|
+
data = _a.sent();
|
|
421
|
+
contents = {};
|
|
422
|
+
contents = deserializeAws_json1_1DescribeTextTranslationJobResponse(data, context);
|
|
423
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
424
|
+
return [2, Promise.resolve(response)];
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
}); };
|
|
428
|
+
var deserializeAws_json1_1DescribeTextTranslationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
429
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
430
|
+
var _c;
|
|
431
|
+
return __generator(this, function (_d) {
|
|
432
|
+
switch (_d.label) {
|
|
433
|
+
case 0:
|
|
434
|
+
_a = [__assign({}, output)];
|
|
435
|
+
_c = {};
|
|
436
|
+
return [4, parseErrorBody(output.body, context)];
|
|
437
|
+
case 1:
|
|
438
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
439
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
440
|
+
_b = errorCode;
|
|
441
|
+
switch (_b) {
|
|
442
|
+
case "InternalServerException": return [3, 2];
|
|
443
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
444
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
445
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 4];
|
|
446
|
+
case "TooManyRequestsException": return [3, 6];
|
|
447
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 6];
|
|
448
|
+
}
|
|
449
|
+
return [3, 8];
|
|
450
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
451
|
+
case 3: throw _d.sent();
|
|
452
|
+
case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
453
|
+
case 5: throw _d.sent();
|
|
454
|
+
case 6: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
455
|
+
case 7: throw _d.sent();
|
|
456
|
+
case 8:
|
|
457
|
+
parsedBody = parsedOutput.body;
|
|
458
|
+
throwDefaultError({
|
|
459
|
+
output: output,
|
|
460
|
+
parsedBody: parsedBody,
|
|
461
|
+
exceptionCtor: __BaseException,
|
|
462
|
+
errorCode: errorCode,
|
|
463
|
+
});
|
|
464
|
+
_d.label = 9;
|
|
465
|
+
case 9: return [2];
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
}); };
|
|
469
|
+
export var deserializeAws_json1_1GetParallelDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
470
|
+
var data, contents, response;
|
|
471
|
+
return __generator(this, function (_a) {
|
|
472
|
+
switch (_a.label) {
|
|
473
|
+
case 0:
|
|
474
|
+
if (output.statusCode >= 300) {
|
|
475
|
+
return [2, deserializeAws_json1_1GetParallelDataCommandError(output, context)];
|
|
476
|
+
}
|
|
477
|
+
return [4, parseBody(output.body, context)];
|
|
478
|
+
case 1:
|
|
479
|
+
data = _a.sent();
|
|
480
|
+
contents = {};
|
|
481
|
+
contents = deserializeAws_json1_1GetParallelDataResponse(data, context);
|
|
482
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
483
|
+
return [2, Promise.resolve(response)];
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
}); };
|
|
487
|
+
var deserializeAws_json1_1GetParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
488
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
489
|
+
var _c;
|
|
490
|
+
return __generator(this, function (_d) {
|
|
491
|
+
switch (_d.label) {
|
|
492
|
+
case 0:
|
|
493
|
+
_a = [__assign({}, output)];
|
|
494
|
+
_c = {};
|
|
495
|
+
return [4, parseErrorBody(output.body, context)];
|
|
496
|
+
case 1:
|
|
497
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
498
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
499
|
+
_b = errorCode;
|
|
500
|
+
switch (_b) {
|
|
501
|
+
case "InternalServerException": return [3, 2];
|
|
502
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
503
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
504
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
505
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
506
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
507
|
+
case "TooManyRequestsException": return [3, 8];
|
|
508
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
509
|
+
}
|
|
510
|
+
return [3, 10];
|
|
511
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
512
|
+
case 3: throw _d.sent();
|
|
513
|
+
case 4: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
514
|
+
case 5: throw _d.sent();
|
|
515
|
+
case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
516
|
+
case 7: throw _d.sent();
|
|
517
|
+
case 8: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
518
|
+
case 9: throw _d.sent();
|
|
519
|
+
case 10:
|
|
520
|
+
parsedBody = parsedOutput.body;
|
|
521
|
+
throwDefaultError({
|
|
522
|
+
output: output,
|
|
523
|
+
parsedBody: parsedBody,
|
|
524
|
+
exceptionCtor: __BaseException,
|
|
525
|
+
errorCode: errorCode,
|
|
526
|
+
});
|
|
527
|
+
_d.label = 11;
|
|
528
|
+
case 11: return [2];
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
}); };
|
|
532
|
+
export var deserializeAws_json1_1GetTerminologyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
533
|
+
var data, contents, response;
|
|
534
|
+
return __generator(this, function (_a) {
|
|
535
|
+
switch (_a.label) {
|
|
536
|
+
case 0:
|
|
537
|
+
if (output.statusCode >= 300) {
|
|
538
|
+
return [2, deserializeAws_json1_1GetTerminologyCommandError(output, context)];
|
|
539
|
+
}
|
|
540
|
+
return [4, parseBody(output.body, context)];
|
|
541
|
+
case 1:
|
|
542
|
+
data = _a.sent();
|
|
543
|
+
contents = {};
|
|
544
|
+
contents = deserializeAws_json1_1GetTerminologyResponse(data, context);
|
|
545
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
546
|
+
return [2, Promise.resolve(response)];
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
}); };
|
|
550
|
+
var deserializeAws_json1_1GetTerminologyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
551
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
552
|
+
var _c;
|
|
553
|
+
return __generator(this, function (_d) {
|
|
554
|
+
switch (_d.label) {
|
|
555
|
+
case 0:
|
|
556
|
+
_a = [__assign({}, output)];
|
|
557
|
+
_c = {};
|
|
558
|
+
return [4, parseErrorBody(output.body, context)];
|
|
559
|
+
case 1:
|
|
560
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
561
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
562
|
+
_b = errorCode;
|
|
563
|
+
switch (_b) {
|
|
564
|
+
case "InternalServerException": return [3, 2];
|
|
565
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
566
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
567
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
568
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
569
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
570
|
+
case "TooManyRequestsException": return [3, 8];
|
|
571
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
572
|
+
}
|
|
573
|
+
return [3, 10];
|
|
574
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
575
|
+
case 3: throw _d.sent();
|
|
576
|
+
case 4: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
577
|
+
case 5: throw _d.sent();
|
|
578
|
+
case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
579
|
+
case 7: throw _d.sent();
|
|
580
|
+
case 8: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
581
|
+
case 9: throw _d.sent();
|
|
582
|
+
case 10:
|
|
583
|
+
parsedBody = parsedOutput.body;
|
|
584
|
+
throwDefaultError({
|
|
585
|
+
output: output,
|
|
586
|
+
parsedBody: parsedBody,
|
|
587
|
+
exceptionCtor: __BaseException,
|
|
588
|
+
errorCode: errorCode,
|
|
589
|
+
});
|
|
590
|
+
_d.label = 11;
|
|
591
|
+
case 11: return [2];
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
}); };
|
|
595
|
+
export var deserializeAws_json1_1ImportTerminologyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
596
|
+
var data, contents, response;
|
|
597
|
+
return __generator(this, function (_a) {
|
|
598
|
+
switch (_a.label) {
|
|
599
|
+
case 0:
|
|
600
|
+
if (output.statusCode >= 300) {
|
|
601
|
+
return [2, deserializeAws_json1_1ImportTerminologyCommandError(output, context)];
|
|
602
|
+
}
|
|
603
|
+
return [4, parseBody(output.body, context)];
|
|
604
|
+
case 1:
|
|
605
|
+
data = _a.sent();
|
|
606
|
+
contents = {};
|
|
607
|
+
contents = deserializeAws_json1_1ImportTerminologyResponse(data, context);
|
|
608
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
609
|
+
return [2, Promise.resolve(response)];
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
}); };
|
|
613
|
+
var deserializeAws_json1_1ImportTerminologyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
614
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
615
|
+
var _c;
|
|
616
|
+
return __generator(this, function (_d) {
|
|
617
|
+
switch (_d.label) {
|
|
618
|
+
case 0:
|
|
619
|
+
_a = [__assign({}, output)];
|
|
620
|
+
_c = {};
|
|
621
|
+
return [4, parseErrorBody(output.body, context)];
|
|
622
|
+
case 1:
|
|
623
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
624
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
625
|
+
_b = errorCode;
|
|
626
|
+
switch (_b) {
|
|
627
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
628
|
+
case "com.amazonaws.translate#ConcurrentModificationException": return [3, 2];
|
|
629
|
+
case "InternalServerException": return [3, 4];
|
|
630
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 4];
|
|
631
|
+
case "InvalidParameterValueException": return [3, 6];
|
|
632
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 6];
|
|
633
|
+
case "LimitExceededException": return [3, 8];
|
|
634
|
+
case "com.amazonaws.translate#LimitExceededException": return [3, 8];
|
|
635
|
+
case "TooManyRequestsException": return [3, 10];
|
|
636
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 10];
|
|
637
|
+
case "TooManyTagsException": return [3, 12];
|
|
638
|
+
case "com.amazonaws.translate#TooManyTagsException": return [3, 12];
|
|
639
|
+
}
|
|
640
|
+
return [3, 14];
|
|
641
|
+
case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
642
|
+
case 3: throw _d.sent();
|
|
643
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
644
|
+
case 5: throw _d.sent();
|
|
645
|
+
case 6: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
646
|
+
case 7: throw _d.sent();
|
|
647
|
+
case 8: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
648
|
+
case 9: throw _d.sent();
|
|
649
|
+
case 10: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
650
|
+
case 11: throw _d.sent();
|
|
651
|
+
case 12: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
|
|
652
|
+
case 13: throw _d.sent();
|
|
653
|
+
case 14:
|
|
654
|
+
parsedBody = parsedOutput.body;
|
|
655
|
+
throwDefaultError({
|
|
656
|
+
output: output,
|
|
657
|
+
parsedBody: parsedBody,
|
|
658
|
+
exceptionCtor: __BaseException,
|
|
659
|
+
errorCode: errorCode,
|
|
660
|
+
});
|
|
661
|
+
_d.label = 15;
|
|
662
|
+
case 15: return [2];
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
}); };
|
|
666
|
+
export var deserializeAws_json1_1ListLanguagesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
667
|
+
var data, contents, response;
|
|
668
|
+
return __generator(this, function (_a) {
|
|
669
|
+
switch (_a.label) {
|
|
670
|
+
case 0:
|
|
671
|
+
if (output.statusCode >= 300) {
|
|
672
|
+
return [2, deserializeAws_json1_1ListLanguagesCommandError(output, context)];
|
|
673
|
+
}
|
|
674
|
+
return [4, parseBody(output.body, context)];
|
|
675
|
+
case 1:
|
|
676
|
+
data = _a.sent();
|
|
677
|
+
contents = {};
|
|
678
|
+
contents = deserializeAws_json1_1ListLanguagesResponse(data, context);
|
|
679
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
680
|
+
return [2, Promise.resolve(response)];
|
|
681
|
+
}
|
|
682
|
+
});
|
|
683
|
+
}); };
|
|
684
|
+
var deserializeAws_json1_1ListLanguagesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
685
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
686
|
+
var _c;
|
|
687
|
+
return __generator(this, function (_d) {
|
|
688
|
+
switch (_d.label) {
|
|
689
|
+
case 0:
|
|
690
|
+
_a = [__assign({}, output)];
|
|
691
|
+
_c = {};
|
|
692
|
+
return [4, parseErrorBody(output.body, context)];
|
|
693
|
+
case 1:
|
|
694
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
695
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
696
|
+
_b = errorCode;
|
|
697
|
+
switch (_b) {
|
|
698
|
+
case "InternalServerException": return [3, 2];
|
|
699
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
700
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
701
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
702
|
+
case "TooManyRequestsException": return [3, 6];
|
|
703
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 6];
|
|
704
|
+
case "UnsupportedDisplayLanguageCodeException": return [3, 8];
|
|
705
|
+
case "com.amazonaws.translate#UnsupportedDisplayLanguageCodeException": return [3, 8];
|
|
706
|
+
}
|
|
707
|
+
return [3, 10];
|
|
708
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
709
|
+
case 3: throw _d.sent();
|
|
710
|
+
case 4: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
711
|
+
case 5: throw _d.sent();
|
|
712
|
+
case 6: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
713
|
+
case 7: throw _d.sent();
|
|
714
|
+
case 8: return [4, deserializeAws_json1_1UnsupportedDisplayLanguageCodeExceptionResponse(parsedOutput, context)];
|
|
715
|
+
case 9: throw _d.sent();
|
|
716
|
+
case 10:
|
|
717
|
+
parsedBody = parsedOutput.body;
|
|
718
|
+
throwDefaultError({
|
|
719
|
+
output: output,
|
|
720
|
+
parsedBody: parsedBody,
|
|
721
|
+
exceptionCtor: __BaseException,
|
|
722
|
+
errorCode: errorCode,
|
|
723
|
+
});
|
|
724
|
+
_d.label = 11;
|
|
725
|
+
case 11: return [2];
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
}); };
|
|
729
|
+
export var deserializeAws_json1_1ListParallelDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
730
|
+
var data, contents, response;
|
|
731
|
+
return __generator(this, function (_a) {
|
|
732
|
+
switch (_a.label) {
|
|
733
|
+
case 0:
|
|
734
|
+
if (output.statusCode >= 300) {
|
|
735
|
+
return [2, deserializeAws_json1_1ListParallelDataCommandError(output, context)];
|
|
736
|
+
}
|
|
737
|
+
return [4, parseBody(output.body, context)];
|
|
738
|
+
case 1:
|
|
739
|
+
data = _a.sent();
|
|
740
|
+
contents = {};
|
|
741
|
+
contents = deserializeAws_json1_1ListParallelDataResponse(data, context);
|
|
742
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
743
|
+
return [2, Promise.resolve(response)];
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
}); };
|
|
747
|
+
var deserializeAws_json1_1ListParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
748
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
749
|
+
var _c;
|
|
750
|
+
return __generator(this, function (_d) {
|
|
751
|
+
switch (_d.label) {
|
|
752
|
+
case 0:
|
|
753
|
+
_a = [__assign({}, output)];
|
|
754
|
+
_c = {};
|
|
755
|
+
return [4, parseErrorBody(output.body, context)];
|
|
756
|
+
case 1:
|
|
757
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
758
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
759
|
+
_b = errorCode;
|
|
760
|
+
switch (_b) {
|
|
761
|
+
case "InternalServerException": return [3, 2];
|
|
762
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
763
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
764
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
765
|
+
case "TooManyRequestsException": return [3, 6];
|
|
766
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 6];
|
|
767
|
+
}
|
|
768
|
+
return [3, 8];
|
|
769
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
770
|
+
case 3: throw _d.sent();
|
|
771
|
+
case 4: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
772
|
+
case 5: throw _d.sent();
|
|
773
|
+
case 6: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
774
|
+
case 7: throw _d.sent();
|
|
775
|
+
case 8:
|
|
776
|
+
parsedBody = parsedOutput.body;
|
|
777
|
+
throwDefaultError({
|
|
778
|
+
output: output,
|
|
779
|
+
parsedBody: parsedBody,
|
|
780
|
+
exceptionCtor: __BaseException,
|
|
781
|
+
errorCode: errorCode,
|
|
782
|
+
});
|
|
783
|
+
_d.label = 9;
|
|
784
|
+
case 9: return [2];
|
|
785
|
+
}
|
|
786
|
+
});
|
|
787
|
+
}); };
|
|
788
|
+
export var deserializeAws_json1_1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
789
|
+
var data, contents, response;
|
|
790
|
+
return __generator(this, function (_a) {
|
|
791
|
+
switch (_a.label) {
|
|
792
|
+
case 0:
|
|
793
|
+
if (output.statusCode >= 300) {
|
|
794
|
+
return [2, deserializeAws_json1_1ListTagsForResourceCommandError(output, context)];
|
|
795
|
+
}
|
|
796
|
+
return [4, parseBody(output.body, context)];
|
|
797
|
+
case 1:
|
|
798
|
+
data = _a.sent();
|
|
799
|
+
contents = {};
|
|
800
|
+
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
|
|
801
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
802
|
+
return [2, Promise.resolve(response)];
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
}); };
|
|
806
|
+
var deserializeAws_json1_1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
807
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
808
|
+
var _c;
|
|
809
|
+
return __generator(this, function (_d) {
|
|
810
|
+
switch (_d.label) {
|
|
811
|
+
case 0:
|
|
812
|
+
_a = [__assign({}, output)];
|
|
813
|
+
_c = {};
|
|
814
|
+
return [4, parseErrorBody(output.body, context)];
|
|
815
|
+
case 1:
|
|
816
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
817
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
818
|
+
_b = errorCode;
|
|
819
|
+
switch (_b) {
|
|
820
|
+
case "InternalServerException": return [3, 2];
|
|
821
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
822
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
823
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
824
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
825
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 6];
|
|
826
|
+
}
|
|
827
|
+
return [3, 8];
|
|
828
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
829
|
+
case 3: throw _d.sent();
|
|
830
|
+
case 4: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
831
|
+
case 5: throw _d.sent();
|
|
832
|
+
case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
833
|
+
case 7: throw _d.sent();
|
|
834
|
+
case 8:
|
|
835
|
+
parsedBody = parsedOutput.body;
|
|
836
|
+
throwDefaultError({
|
|
837
|
+
output: output,
|
|
838
|
+
parsedBody: parsedBody,
|
|
839
|
+
exceptionCtor: __BaseException,
|
|
840
|
+
errorCode: errorCode,
|
|
841
|
+
});
|
|
842
|
+
_d.label = 9;
|
|
843
|
+
case 9: return [2];
|
|
844
|
+
}
|
|
845
|
+
});
|
|
846
|
+
}); };
|
|
847
|
+
export var deserializeAws_json1_1ListTerminologiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
848
|
+
var data, contents, response;
|
|
849
|
+
return __generator(this, function (_a) {
|
|
850
|
+
switch (_a.label) {
|
|
851
|
+
case 0:
|
|
852
|
+
if (output.statusCode >= 300) {
|
|
853
|
+
return [2, deserializeAws_json1_1ListTerminologiesCommandError(output, context)];
|
|
854
|
+
}
|
|
855
|
+
return [4, parseBody(output.body, context)];
|
|
856
|
+
case 1:
|
|
857
|
+
data = _a.sent();
|
|
858
|
+
contents = {};
|
|
859
|
+
contents = deserializeAws_json1_1ListTerminologiesResponse(data, context);
|
|
860
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
861
|
+
return [2, Promise.resolve(response)];
|
|
862
|
+
}
|
|
863
|
+
});
|
|
864
|
+
}); };
|
|
865
|
+
var deserializeAws_json1_1ListTerminologiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
866
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
867
|
+
var _c;
|
|
868
|
+
return __generator(this, function (_d) {
|
|
869
|
+
switch (_d.label) {
|
|
870
|
+
case 0:
|
|
871
|
+
_a = [__assign({}, output)];
|
|
872
|
+
_c = {};
|
|
873
|
+
return [4, parseErrorBody(output.body, context)];
|
|
874
|
+
case 1:
|
|
875
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
876
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
877
|
+
_b = errorCode;
|
|
878
|
+
switch (_b) {
|
|
879
|
+
case "InternalServerException": return [3, 2];
|
|
880
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
881
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
882
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
883
|
+
case "TooManyRequestsException": return [3, 6];
|
|
884
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 6];
|
|
885
|
+
}
|
|
886
|
+
return [3, 8];
|
|
887
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
888
|
+
case 3: throw _d.sent();
|
|
889
|
+
case 4: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
890
|
+
case 5: throw _d.sent();
|
|
891
|
+
case 6: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
892
|
+
case 7: throw _d.sent();
|
|
893
|
+
case 8:
|
|
894
|
+
parsedBody = parsedOutput.body;
|
|
895
|
+
throwDefaultError({
|
|
896
|
+
output: output,
|
|
897
|
+
parsedBody: parsedBody,
|
|
898
|
+
exceptionCtor: __BaseException,
|
|
899
|
+
errorCode: errorCode,
|
|
900
|
+
});
|
|
901
|
+
_d.label = 9;
|
|
902
|
+
case 9: return [2];
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
}); };
|
|
906
|
+
export var deserializeAws_json1_1ListTextTranslationJobsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
907
|
+
var data, contents, response;
|
|
908
|
+
return __generator(this, function (_a) {
|
|
909
|
+
switch (_a.label) {
|
|
910
|
+
case 0:
|
|
911
|
+
if (output.statusCode >= 300) {
|
|
912
|
+
return [2, deserializeAws_json1_1ListTextTranslationJobsCommandError(output, context)];
|
|
913
|
+
}
|
|
914
|
+
return [4, parseBody(output.body, context)];
|
|
915
|
+
case 1:
|
|
916
|
+
data = _a.sent();
|
|
917
|
+
contents = {};
|
|
918
|
+
contents = deserializeAws_json1_1ListTextTranslationJobsResponse(data, context);
|
|
919
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
920
|
+
return [2, Promise.resolve(response)];
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
}); };
|
|
924
|
+
var deserializeAws_json1_1ListTextTranslationJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
925
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
926
|
+
var _c;
|
|
927
|
+
return __generator(this, function (_d) {
|
|
928
|
+
switch (_d.label) {
|
|
929
|
+
case 0:
|
|
930
|
+
_a = [__assign({}, output)];
|
|
931
|
+
_c = {};
|
|
932
|
+
return [4, parseErrorBody(output.body, context)];
|
|
933
|
+
case 1:
|
|
934
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
935
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
936
|
+
_b = errorCode;
|
|
937
|
+
switch (_b) {
|
|
938
|
+
case "InternalServerException": return [3, 2];
|
|
939
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
940
|
+
case "InvalidFilterException": return [3, 4];
|
|
941
|
+
case "com.amazonaws.translate#InvalidFilterException": return [3, 4];
|
|
942
|
+
case "InvalidRequestException": return [3, 6];
|
|
943
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 6];
|
|
944
|
+
case "TooManyRequestsException": return [3, 8];
|
|
945
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 8];
|
|
946
|
+
}
|
|
947
|
+
return [3, 10];
|
|
948
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
949
|
+
case 3: throw _d.sent();
|
|
950
|
+
case 4: return [4, deserializeAws_json1_1InvalidFilterExceptionResponse(parsedOutput, context)];
|
|
951
|
+
case 5: throw _d.sent();
|
|
952
|
+
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
953
|
+
case 7: throw _d.sent();
|
|
954
|
+
case 8: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
955
|
+
case 9: throw _d.sent();
|
|
956
|
+
case 10:
|
|
957
|
+
parsedBody = parsedOutput.body;
|
|
958
|
+
throwDefaultError({
|
|
959
|
+
output: output,
|
|
960
|
+
parsedBody: parsedBody,
|
|
961
|
+
exceptionCtor: __BaseException,
|
|
962
|
+
errorCode: errorCode,
|
|
963
|
+
});
|
|
964
|
+
_d.label = 11;
|
|
965
|
+
case 11: return [2];
|
|
966
|
+
}
|
|
967
|
+
});
|
|
968
|
+
}); };
|
|
969
|
+
export var deserializeAws_json1_1StartTextTranslationJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
970
|
+
var data, contents, response;
|
|
971
|
+
return __generator(this, function (_a) {
|
|
972
|
+
switch (_a.label) {
|
|
973
|
+
case 0:
|
|
974
|
+
if (output.statusCode >= 300) {
|
|
975
|
+
return [2, deserializeAws_json1_1StartTextTranslationJobCommandError(output, context)];
|
|
976
|
+
}
|
|
977
|
+
return [4, parseBody(output.body, context)];
|
|
978
|
+
case 1:
|
|
979
|
+
data = _a.sent();
|
|
980
|
+
contents = {};
|
|
981
|
+
contents = deserializeAws_json1_1StartTextTranslationJobResponse(data, context);
|
|
982
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
983
|
+
return [2, Promise.resolve(response)];
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
}); };
|
|
987
|
+
var deserializeAws_json1_1StartTextTranslationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
988
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
989
|
+
var _c;
|
|
990
|
+
return __generator(this, function (_d) {
|
|
991
|
+
switch (_d.label) {
|
|
992
|
+
case 0:
|
|
993
|
+
_a = [__assign({}, output)];
|
|
994
|
+
_c = {};
|
|
995
|
+
return [4, parseErrorBody(output.body, context)];
|
|
996
|
+
case 1:
|
|
997
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
998
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
999
|
+
_b = errorCode;
|
|
1000
|
+
switch (_b) {
|
|
1001
|
+
case "InternalServerException": return [3, 2];
|
|
1002
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
1003
|
+
case "InvalidParameterValueException": return [3, 4];
|
|
1004
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 4];
|
|
1005
|
+
case "InvalidRequestException": return [3, 6];
|
|
1006
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 6];
|
|
1007
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1008
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 8];
|
|
1009
|
+
case "TooManyRequestsException": return [3, 10];
|
|
1010
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 10];
|
|
1011
|
+
case "UnsupportedLanguagePairException": return [3, 12];
|
|
1012
|
+
case "com.amazonaws.translate#UnsupportedLanguagePairException": return [3, 12];
|
|
1013
|
+
}
|
|
1014
|
+
return [3, 14];
|
|
1015
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1016
|
+
case 3: throw _d.sent();
|
|
1017
|
+
case 4: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
1018
|
+
case 5: throw _d.sent();
|
|
1019
|
+
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1020
|
+
case 7: throw _d.sent();
|
|
1021
|
+
case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1022
|
+
case 9: throw _d.sent();
|
|
1023
|
+
case 10: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1024
|
+
case 11: throw _d.sent();
|
|
1025
|
+
case 12: return [4, deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context)];
|
|
1026
|
+
case 13: throw _d.sent();
|
|
1027
|
+
case 14:
|
|
1028
|
+
parsedBody = parsedOutput.body;
|
|
1029
|
+
throwDefaultError({
|
|
1030
|
+
output: output,
|
|
1031
|
+
parsedBody: parsedBody,
|
|
1032
|
+
exceptionCtor: __BaseException,
|
|
1033
|
+
errorCode: errorCode,
|
|
1034
|
+
});
|
|
1035
|
+
_d.label = 15;
|
|
1036
|
+
case 15: return [2];
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
}); };
|
|
1040
|
+
export var deserializeAws_json1_1StopTextTranslationJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1041
|
+
var data, contents, response;
|
|
1042
|
+
return __generator(this, function (_a) {
|
|
1043
|
+
switch (_a.label) {
|
|
1044
|
+
case 0:
|
|
1045
|
+
if (output.statusCode >= 300) {
|
|
1046
|
+
return [2, deserializeAws_json1_1StopTextTranslationJobCommandError(output, context)];
|
|
1047
|
+
}
|
|
1048
|
+
return [4, parseBody(output.body, context)];
|
|
1049
|
+
case 1:
|
|
1050
|
+
data = _a.sent();
|
|
1051
|
+
contents = {};
|
|
1052
|
+
contents = deserializeAws_json1_1StopTextTranslationJobResponse(data, context);
|
|
1053
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1054
|
+
return [2, Promise.resolve(response)];
|
|
1055
|
+
}
|
|
1056
|
+
});
|
|
1057
|
+
}); };
|
|
1058
|
+
var deserializeAws_json1_1StopTextTranslationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1059
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1060
|
+
var _c;
|
|
1061
|
+
return __generator(this, function (_d) {
|
|
1062
|
+
switch (_d.label) {
|
|
1063
|
+
case 0:
|
|
1064
|
+
_a = [__assign({}, output)];
|
|
1065
|
+
_c = {};
|
|
1066
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1067
|
+
case 1:
|
|
1068
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1069
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1070
|
+
_b = errorCode;
|
|
1071
|
+
switch (_b) {
|
|
1072
|
+
case "InternalServerException": return [3, 2];
|
|
1073
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 2];
|
|
1074
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
1075
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 4];
|
|
1076
|
+
case "TooManyRequestsException": return [3, 6];
|
|
1077
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 6];
|
|
1078
|
+
}
|
|
1079
|
+
return [3, 8];
|
|
1080
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1081
|
+
case 3: throw _d.sent();
|
|
1082
|
+
case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1083
|
+
case 5: throw _d.sent();
|
|
1084
|
+
case 6: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1085
|
+
case 7: throw _d.sent();
|
|
1086
|
+
case 8:
|
|
1087
|
+
parsedBody = parsedOutput.body;
|
|
1088
|
+
throwDefaultError({
|
|
1089
|
+
output: output,
|
|
1090
|
+
parsedBody: parsedBody,
|
|
1091
|
+
exceptionCtor: __BaseException,
|
|
1092
|
+
errorCode: errorCode,
|
|
1093
|
+
});
|
|
1094
|
+
_d.label = 9;
|
|
1095
|
+
case 9: return [2];
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
}); };
|
|
1099
|
+
export var deserializeAws_json1_1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1100
|
+
var data, contents, response;
|
|
1101
|
+
return __generator(this, function (_a) {
|
|
1102
|
+
switch (_a.label) {
|
|
1103
|
+
case 0:
|
|
1104
|
+
if (output.statusCode >= 300) {
|
|
1105
|
+
return [2, deserializeAws_json1_1TagResourceCommandError(output, context)];
|
|
1106
|
+
}
|
|
1107
|
+
return [4, parseBody(output.body, context)];
|
|
1108
|
+
case 1:
|
|
1109
|
+
data = _a.sent();
|
|
1110
|
+
contents = {};
|
|
1111
|
+
contents = deserializeAws_json1_1TagResourceResponse(data, context);
|
|
1112
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1113
|
+
return [2, Promise.resolve(response)];
|
|
1114
|
+
}
|
|
1115
|
+
});
|
|
1116
|
+
}); };
|
|
1117
|
+
var deserializeAws_json1_1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1118
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1119
|
+
var _c;
|
|
1120
|
+
return __generator(this, function (_d) {
|
|
1121
|
+
switch (_d.label) {
|
|
1122
|
+
case 0:
|
|
1123
|
+
_a = [__assign({}, output)];
|
|
1124
|
+
_c = {};
|
|
1125
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1126
|
+
case 1:
|
|
1127
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1128
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1129
|
+
_b = errorCode;
|
|
1130
|
+
switch (_b) {
|
|
1131
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
1132
|
+
case "com.amazonaws.translate#ConcurrentModificationException": return [3, 2];
|
|
1133
|
+
case "InternalServerException": return [3, 4];
|
|
1134
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 4];
|
|
1135
|
+
case "InvalidParameterValueException": return [3, 6];
|
|
1136
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 6];
|
|
1137
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1138
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 8];
|
|
1139
|
+
case "TooManyTagsException": return [3, 10];
|
|
1140
|
+
case "com.amazonaws.translate#TooManyTagsException": return [3, 10];
|
|
1141
|
+
}
|
|
1142
|
+
return [3, 12];
|
|
1143
|
+
case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
1144
|
+
case 3: throw _d.sent();
|
|
1145
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1146
|
+
case 5: throw _d.sent();
|
|
1147
|
+
case 6: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
1148
|
+
case 7: throw _d.sent();
|
|
1149
|
+
case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1150
|
+
case 9: throw _d.sent();
|
|
1151
|
+
case 10: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
|
|
1152
|
+
case 11: throw _d.sent();
|
|
1153
|
+
case 12:
|
|
1154
|
+
parsedBody = parsedOutput.body;
|
|
1155
|
+
throwDefaultError({
|
|
1156
|
+
output: output,
|
|
1157
|
+
parsedBody: parsedBody,
|
|
1158
|
+
exceptionCtor: __BaseException,
|
|
1159
|
+
errorCode: errorCode,
|
|
1160
|
+
});
|
|
1161
|
+
_d.label = 13;
|
|
1162
|
+
case 13: return [2];
|
|
1163
|
+
}
|
|
1164
|
+
});
|
|
1165
|
+
}); };
|
|
1166
|
+
export var deserializeAws_json1_1TranslateTextCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1167
|
+
var data, contents, response;
|
|
1168
|
+
return __generator(this, function (_a) {
|
|
1169
|
+
switch (_a.label) {
|
|
1170
|
+
case 0:
|
|
1171
|
+
if (output.statusCode >= 300) {
|
|
1172
|
+
return [2, deserializeAws_json1_1TranslateTextCommandError(output, context)];
|
|
1173
|
+
}
|
|
1174
|
+
return [4, parseBody(output.body, context)];
|
|
1175
|
+
case 1:
|
|
1176
|
+
data = _a.sent();
|
|
1177
|
+
contents = {};
|
|
1178
|
+
contents = deserializeAws_json1_1TranslateTextResponse(data, context);
|
|
1179
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1180
|
+
return [2, Promise.resolve(response)];
|
|
1181
|
+
}
|
|
1182
|
+
});
|
|
1183
|
+
}); };
|
|
1184
|
+
var deserializeAws_json1_1TranslateTextCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1185
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1186
|
+
var _c;
|
|
1187
|
+
return __generator(this, function (_d) {
|
|
1188
|
+
switch (_d.label) {
|
|
1189
|
+
case 0:
|
|
1190
|
+
_a = [__assign({}, output)];
|
|
1191
|
+
_c = {};
|
|
1192
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1193
|
+
case 1:
|
|
1194
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1195
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1196
|
+
_b = errorCode;
|
|
1197
|
+
switch (_b) {
|
|
1198
|
+
case "DetectedLanguageLowConfidenceException": return [3, 2];
|
|
1199
|
+
case "com.amazonaws.translate#DetectedLanguageLowConfidenceException": return [3, 2];
|
|
1200
|
+
case "InternalServerException": return [3, 4];
|
|
1201
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 4];
|
|
1202
|
+
case "InvalidRequestException": return [3, 6];
|
|
1203
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 6];
|
|
1204
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1205
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 8];
|
|
1206
|
+
case "ServiceUnavailableException": return [3, 10];
|
|
1207
|
+
case "com.amazonaws.translate#ServiceUnavailableException": return [3, 10];
|
|
1208
|
+
case "TextSizeLimitExceededException": return [3, 12];
|
|
1209
|
+
case "com.amazonaws.translate#TextSizeLimitExceededException": return [3, 12];
|
|
1210
|
+
case "TooManyRequestsException": return [3, 14];
|
|
1211
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 14];
|
|
1212
|
+
case "UnsupportedLanguagePairException": return [3, 16];
|
|
1213
|
+
case "com.amazonaws.translate#UnsupportedLanguagePairException": return [3, 16];
|
|
1214
|
+
}
|
|
1215
|
+
return [3, 18];
|
|
1216
|
+
case 2: return [4, deserializeAws_json1_1DetectedLanguageLowConfidenceExceptionResponse(parsedOutput, context)];
|
|
1217
|
+
case 3: throw _d.sent();
|
|
1218
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1219
|
+
case 5: throw _d.sent();
|
|
1220
|
+
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1221
|
+
case 7: throw _d.sent();
|
|
1222
|
+
case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1223
|
+
case 9: throw _d.sent();
|
|
1224
|
+
case 10: return [4, deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1225
|
+
case 11: throw _d.sent();
|
|
1226
|
+
case 12: return [4, deserializeAws_json1_1TextSizeLimitExceededExceptionResponse(parsedOutput, context)];
|
|
1227
|
+
case 13: throw _d.sent();
|
|
1228
|
+
case 14: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1229
|
+
case 15: throw _d.sent();
|
|
1230
|
+
case 16: return [4, deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context)];
|
|
1231
|
+
case 17: throw _d.sent();
|
|
1232
|
+
case 18:
|
|
1233
|
+
parsedBody = parsedOutput.body;
|
|
1234
|
+
throwDefaultError({
|
|
1235
|
+
output: output,
|
|
1236
|
+
parsedBody: parsedBody,
|
|
1237
|
+
exceptionCtor: __BaseException,
|
|
1238
|
+
errorCode: errorCode,
|
|
1239
|
+
});
|
|
1240
|
+
_d.label = 19;
|
|
1241
|
+
case 19: return [2];
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
}); };
|
|
1245
|
+
export var deserializeAws_json1_1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1246
|
+
var data, contents, response;
|
|
1247
|
+
return __generator(this, function (_a) {
|
|
1248
|
+
switch (_a.label) {
|
|
1249
|
+
case 0:
|
|
1250
|
+
if (output.statusCode >= 300) {
|
|
1251
|
+
return [2, deserializeAws_json1_1UntagResourceCommandError(output, context)];
|
|
1252
|
+
}
|
|
1253
|
+
return [4, parseBody(output.body, context)];
|
|
1254
|
+
case 1:
|
|
1255
|
+
data = _a.sent();
|
|
1256
|
+
contents = {};
|
|
1257
|
+
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
|
|
1258
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1259
|
+
return [2, Promise.resolve(response)];
|
|
1260
|
+
}
|
|
1261
|
+
});
|
|
1262
|
+
}); };
|
|
1263
|
+
var deserializeAws_json1_1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1264
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1265
|
+
var _c;
|
|
1266
|
+
return __generator(this, function (_d) {
|
|
1267
|
+
switch (_d.label) {
|
|
1268
|
+
case 0:
|
|
1269
|
+
_a = [__assign({}, output)];
|
|
1270
|
+
_c = {};
|
|
1271
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1272
|
+
case 1:
|
|
1273
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1274
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1275
|
+
_b = errorCode;
|
|
1276
|
+
switch (_b) {
|
|
1277
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
1278
|
+
case "com.amazonaws.translate#ConcurrentModificationException": return [3, 2];
|
|
1279
|
+
case "InternalServerException": return [3, 4];
|
|
1280
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 4];
|
|
1281
|
+
case "InvalidParameterValueException": return [3, 6];
|
|
1282
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 6];
|
|
1283
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1284
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 8];
|
|
1285
|
+
}
|
|
1286
|
+
return [3, 10];
|
|
1287
|
+
case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
1288
|
+
case 3: throw _d.sent();
|
|
1289
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1290
|
+
case 5: throw _d.sent();
|
|
1291
|
+
case 6: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
1292
|
+
case 7: throw _d.sent();
|
|
1293
|
+
case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1294
|
+
case 9: throw _d.sent();
|
|
1295
|
+
case 10:
|
|
1296
|
+
parsedBody = parsedOutput.body;
|
|
1297
|
+
throwDefaultError({
|
|
1298
|
+
output: output,
|
|
1299
|
+
parsedBody: parsedBody,
|
|
1300
|
+
exceptionCtor: __BaseException,
|
|
1301
|
+
errorCode: errorCode,
|
|
1302
|
+
});
|
|
1303
|
+
_d.label = 11;
|
|
1304
|
+
case 11: return [2];
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
}); };
|
|
1308
|
+
export var deserializeAws_json1_1UpdateParallelDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1309
|
+
var data, contents, response;
|
|
1310
|
+
return __generator(this, function (_a) {
|
|
1311
|
+
switch (_a.label) {
|
|
1312
|
+
case 0:
|
|
1313
|
+
if (output.statusCode >= 300) {
|
|
1314
|
+
return [2, deserializeAws_json1_1UpdateParallelDataCommandError(output, context)];
|
|
1315
|
+
}
|
|
1316
|
+
return [4, parseBody(output.body, context)];
|
|
1317
|
+
case 1:
|
|
1318
|
+
data = _a.sent();
|
|
1319
|
+
contents = {};
|
|
1320
|
+
contents = deserializeAws_json1_1UpdateParallelDataResponse(data, context);
|
|
1321
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1322
|
+
return [2, Promise.resolve(response)];
|
|
1323
|
+
}
|
|
1324
|
+
});
|
|
1325
|
+
}); };
|
|
1326
|
+
var deserializeAws_json1_1UpdateParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1327
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1328
|
+
var _c;
|
|
1329
|
+
return __generator(this, function (_d) {
|
|
1330
|
+
switch (_d.label) {
|
|
1331
|
+
case 0:
|
|
1332
|
+
_a = [__assign({}, output)];
|
|
1333
|
+
_c = {};
|
|
1334
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1335
|
+
case 1:
|
|
1336
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1337
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1338
|
+
_b = errorCode;
|
|
1339
|
+
switch (_b) {
|
|
1340
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
1341
|
+
case "com.amazonaws.translate#ConcurrentModificationException": return [3, 2];
|
|
1342
|
+
case "ConflictException": return [3, 4];
|
|
1343
|
+
case "com.amazonaws.translate#ConflictException": return [3, 4];
|
|
1344
|
+
case "InternalServerException": return [3, 6];
|
|
1345
|
+
case "com.amazonaws.translate#InternalServerException": return [3, 6];
|
|
1346
|
+
case "InvalidParameterValueException": return [3, 8];
|
|
1347
|
+
case "com.amazonaws.translate#InvalidParameterValueException": return [3, 8];
|
|
1348
|
+
case "InvalidRequestException": return [3, 10];
|
|
1349
|
+
case "com.amazonaws.translate#InvalidRequestException": return [3, 10];
|
|
1350
|
+
case "LimitExceededException": return [3, 12];
|
|
1351
|
+
case "com.amazonaws.translate#LimitExceededException": return [3, 12];
|
|
1352
|
+
case "ResourceNotFoundException": return [3, 14];
|
|
1353
|
+
case "com.amazonaws.translate#ResourceNotFoundException": return [3, 14];
|
|
1354
|
+
case "TooManyRequestsException": return [3, 16];
|
|
1355
|
+
case "com.amazonaws.translate#TooManyRequestsException": return [3, 16];
|
|
1356
|
+
}
|
|
1357
|
+
return [3, 18];
|
|
1358
|
+
case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
1359
|
+
case 3: throw _d.sent();
|
|
1360
|
+
case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
|
|
1361
|
+
case 5: throw _d.sent();
|
|
1362
|
+
case 6: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1363
|
+
case 7: throw _d.sent();
|
|
1364
|
+
case 8: return [4, deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
1365
|
+
case 9: throw _d.sent();
|
|
1366
|
+
case 10: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1367
|
+
case 11: throw _d.sent();
|
|
1368
|
+
case 12: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
1369
|
+
case 13: throw _d.sent();
|
|
1370
|
+
case 14: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1371
|
+
case 15: throw _d.sent();
|
|
1372
|
+
case 16: return [4, deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1373
|
+
case 17: throw _d.sent();
|
|
1374
|
+
case 18:
|
|
1375
|
+
parsedBody = parsedOutput.body;
|
|
1376
|
+
throwDefaultError({
|
|
1377
|
+
output: output,
|
|
1378
|
+
parsedBody: parsedBody,
|
|
1379
|
+
exceptionCtor: __BaseException,
|
|
1380
|
+
errorCode: errorCode,
|
|
1381
|
+
});
|
|
1382
|
+
_d.label = 19;
|
|
1383
|
+
case 19: return [2];
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
}); };
|
|
1387
|
+
var deserializeAws_json1_1ConcurrentModificationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1388
|
+
var body, deserialized, exception;
|
|
1389
|
+
return __generator(this, function (_a) {
|
|
1390
|
+
body = parsedOutput.body;
|
|
1391
|
+
deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context);
|
|
1392
|
+
exception = new ConcurrentModificationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1393
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1394
|
+
});
|
|
1395
|
+
}); };
|
|
1396
|
+
var deserializeAws_json1_1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1397
|
+
var body, deserialized, exception;
|
|
1398
|
+
return __generator(this, function (_a) {
|
|
1399
|
+
body = parsedOutput.body;
|
|
1400
|
+
deserialized = deserializeAws_json1_1ConflictException(body, context);
|
|
1401
|
+
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1402
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1403
|
+
});
|
|
1404
|
+
}); };
|
|
1405
|
+
var deserializeAws_json1_1DetectedLanguageLowConfidenceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1406
|
+
var body, deserialized, exception;
|
|
1407
|
+
return __generator(this, function (_a) {
|
|
1408
|
+
body = parsedOutput.body;
|
|
1409
|
+
deserialized = deserializeAws_json1_1DetectedLanguageLowConfidenceException(body, context);
|
|
1410
|
+
exception = new DetectedLanguageLowConfidenceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1411
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1412
|
+
});
|
|
1413
|
+
}); };
|
|
1414
|
+
var deserializeAws_json1_1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1415
|
+
var body, deserialized, exception;
|
|
1416
|
+
return __generator(this, function (_a) {
|
|
1417
|
+
body = parsedOutput.body;
|
|
1418
|
+
deserialized = deserializeAws_json1_1InternalServerException(body, context);
|
|
1419
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1420
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1421
|
+
});
|
|
1422
|
+
}); };
|
|
1423
|
+
var deserializeAws_json1_1InvalidFilterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1424
|
+
var body, deserialized, exception;
|
|
1425
|
+
return __generator(this, function (_a) {
|
|
1426
|
+
body = parsedOutput.body;
|
|
1427
|
+
deserialized = deserializeAws_json1_1InvalidFilterException(body, context);
|
|
1428
|
+
exception = new InvalidFilterException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1429
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1430
|
+
});
|
|
1431
|
+
}); };
|
|
1432
|
+
var deserializeAws_json1_1InvalidParameterValueExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1433
|
+
var body, deserialized, exception;
|
|
1434
|
+
return __generator(this, function (_a) {
|
|
1435
|
+
body = parsedOutput.body;
|
|
1436
|
+
deserialized = deserializeAws_json1_1InvalidParameterValueException(body, context);
|
|
1437
|
+
exception = new InvalidParameterValueException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1438
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1439
|
+
});
|
|
1440
|
+
}); };
|
|
1441
|
+
var deserializeAws_json1_1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1442
|
+
var body, deserialized, exception;
|
|
1443
|
+
return __generator(this, function (_a) {
|
|
1444
|
+
body = parsedOutput.body;
|
|
1445
|
+
deserialized = deserializeAws_json1_1InvalidRequestException(body, context);
|
|
1446
|
+
exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1447
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1448
|
+
});
|
|
1449
|
+
}); };
|
|
1450
|
+
var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1451
|
+
var body, deserialized, exception;
|
|
1452
|
+
return __generator(this, function (_a) {
|
|
1453
|
+
body = parsedOutput.body;
|
|
1454
|
+
deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
1455
|
+
exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1456
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1457
|
+
});
|
|
1458
|
+
}); };
|
|
1459
|
+
var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1460
|
+
var body, deserialized, exception;
|
|
1461
|
+
return __generator(this, function (_a) {
|
|
1462
|
+
body = parsedOutput.body;
|
|
1463
|
+
deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
1464
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1465
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1466
|
+
});
|
|
1467
|
+
}); };
|
|
1468
|
+
var deserializeAws_json1_1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1469
|
+
var body, deserialized, exception;
|
|
1470
|
+
return __generator(this, function (_a) {
|
|
1471
|
+
body = parsedOutput.body;
|
|
1472
|
+
deserialized = deserializeAws_json1_1ServiceUnavailableException(body, context);
|
|
1473
|
+
exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1474
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1475
|
+
});
|
|
1476
|
+
}); };
|
|
1477
|
+
var deserializeAws_json1_1TextSizeLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1478
|
+
var body, deserialized, exception;
|
|
1479
|
+
return __generator(this, function (_a) {
|
|
1480
|
+
body = parsedOutput.body;
|
|
1481
|
+
deserialized = deserializeAws_json1_1TextSizeLimitExceededException(body, context);
|
|
1482
|
+
exception = new TextSizeLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1483
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1484
|
+
});
|
|
1485
|
+
}); };
|
|
1486
|
+
var deserializeAws_json1_1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1487
|
+
var body, deserialized, exception;
|
|
1488
|
+
return __generator(this, function (_a) {
|
|
1489
|
+
body = parsedOutput.body;
|
|
1490
|
+
deserialized = deserializeAws_json1_1TooManyRequestsException(body, context);
|
|
1491
|
+
exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1492
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1493
|
+
});
|
|
1494
|
+
}); };
|
|
1495
|
+
var deserializeAws_json1_1TooManyTagsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1496
|
+
var body, deserialized, exception;
|
|
1497
|
+
return __generator(this, function (_a) {
|
|
1498
|
+
body = parsedOutput.body;
|
|
1499
|
+
deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
|
|
1500
|
+
exception = new TooManyTagsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1501
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1502
|
+
});
|
|
1503
|
+
}); };
|
|
1504
|
+
var deserializeAws_json1_1UnsupportedDisplayLanguageCodeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1505
|
+
var body, deserialized, exception;
|
|
1506
|
+
return __generator(this, function (_a) {
|
|
1507
|
+
body = parsedOutput.body;
|
|
1508
|
+
deserialized = deserializeAws_json1_1UnsupportedDisplayLanguageCodeException(body, context);
|
|
1509
|
+
exception = new UnsupportedDisplayLanguageCodeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1510
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1511
|
+
});
|
|
1512
|
+
}); };
|
|
1513
|
+
var deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1514
|
+
var body, deserialized, exception;
|
|
1515
|
+
return __generator(this, function (_a) {
|
|
1516
|
+
body = parsedOutput.body;
|
|
1517
|
+
deserialized = deserializeAws_json1_1UnsupportedLanguagePairException(body, context);
|
|
1518
|
+
exception = new UnsupportedLanguagePairException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1519
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1520
|
+
});
|
|
1521
|
+
}); };
|
|
1522
|
+
var serializeAws_json1_1CreateParallelDataRequest = function (input, context) {
|
|
1523
|
+
var _a;
|
|
1524
|
+
return __assign(__assign(__assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.Description != null && { Description: input.Description })), (input.EncryptionKey != null && {
|
|
1525
|
+
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
1526
|
+
})), (input.Name != null && { Name: input.Name })), (input.ParallelDataConfig != null && {
|
|
1527
|
+
ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
|
|
1528
|
+
})), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
|
|
1105
1529
|
};
|
|
1106
|
-
|
|
1107
|
-
return {
|
|
1108
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1109
|
-
};
|
|
1530
|
+
var serializeAws_json1_1DeleteParallelDataRequest = function (input, context) {
|
|
1531
|
+
return __assign({}, (input.Name != null && { Name: input.Name }));
|
|
1110
1532
|
};
|
|
1111
|
-
|
|
1112
|
-
return {
|
|
1113
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1114
|
-
};
|
|
1533
|
+
var serializeAws_json1_1DeleteTerminologyRequest = function (input, context) {
|
|
1534
|
+
return __assign({}, (input.Name != null && { Name: input.Name }));
|
|
1115
1535
|
};
|
|
1116
|
-
|
|
1117
|
-
return {
|
|
1118
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1119
|
-
};
|
|
1536
|
+
var serializeAws_json1_1DescribeTextTranslationJobRequest = function (input, context) {
|
|
1537
|
+
return __assign({}, (input.JobId != null && { JobId: input.JobId }));
|
|
1120
1538
|
};
|
|
1121
|
-
|
|
1122
|
-
return {
|
|
1123
|
-
...(input.Id != null && { Id: input.Id }),
|
|
1124
|
-
...(input.Type != null && { Type: input.Type }),
|
|
1125
|
-
};
|
|
1539
|
+
var serializeAws_json1_1EncryptionKey = function (input, context) {
|
|
1540
|
+
return __assign(__assign({}, (input.Id != null && { Id: input.Id })), (input.Type != null && { Type: input.Type }));
|
|
1126
1541
|
};
|
|
1127
|
-
|
|
1128
|
-
return {
|
|
1129
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1130
|
-
};
|
|
1542
|
+
var serializeAws_json1_1GetParallelDataRequest = function (input, context) {
|
|
1543
|
+
return __assign({}, (input.Name != null && { Name: input.Name }));
|
|
1131
1544
|
};
|
|
1132
|
-
|
|
1133
|
-
return {
|
|
1134
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1135
|
-
...(input.TerminologyDataFormat != null && { TerminologyDataFormat: input.TerminologyDataFormat }),
|
|
1136
|
-
};
|
|
1545
|
+
var serializeAws_json1_1GetTerminologyRequest = function (input, context) {
|
|
1546
|
+
return __assign(__assign({}, (input.Name != null && { Name: input.Name })), (input.TerminologyDataFormat != null && { TerminologyDataFormat: input.TerminologyDataFormat }));
|
|
1137
1547
|
};
|
|
1138
|
-
|
|
1139
|
-
return {
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
...(input.MergeStrategy != null && { MergeStrategy: input.MergeStrategy }),
|
|
1145
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1146
|
-
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
1147
|
-
...(input.TerminologyData != null && {
|
|
1148
|
-
TerminologyData: serializeAws_json1_1TerminologyData(input.TerminologyData, context),
|
|
1149
|
-
}),
|
|
1150
|
-
};
|
|
1548
|
+
var serializeAws_json1_1ImportTerminologyRequest = function (input, context) {
|
|
1549
|
+
return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.EncryptionKey != null && {
|
|
1550
|
+
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
1551
|
+
})), (input.MergeStrategy != null && { MergeStrategy: input.MergeStrategy })), (input.Name != null && { Name: input.Name })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.TerminologyData != null && {
|
|
1552
|
+
TerminologyData: serializeAws_json1_1TerminologyData(input.TerminologyData, context),
|
|
1553
|
+
}));
|
|
1151
1554
|
};
|
|
1152
|
-
|
|
1153
|
-
return {
|
|
1154
|
-
...(input.ContentType != null && { ContentType: input.ContentType }),
|
|
1155
|
-
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1156
|
-
};
|
|
1555
|
+
var serializeAws_json1_1InputDataConfig = function (input, context) {
|
|
1556
|
+
return __assign(__assign({}, (input.ContentType != null && { ContentType: input.ContentType })), (input.S3Uri != null && { S3Uri: input.S3Uri }));
|
|
1157
1557
|
};
|
|
1158
|
-
|
|
1159
|
-
return {
|
|
1160
|
-
...(input.DisplayLanguageCode != null && { DisplayLanguageCode: input.DisplayLanguageCode }),
|
|
1161
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1162
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1163
|
-
};
|
|
1558
|
+
var serializeAws_json1_1ListLanguagesRequest = function (input, context) {
|
|
1559
|
+
return __assign(__assign(__assign({}, (input.DisplayLanguageCode != null && { DisplayLanguageCode: input.DisplayLanguageCode })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
|
|
1164
1560
|
};
|
|
1165
|
-
|
|
1166
|
-
return {
|
|
1167
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1168
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1169
|
-
};
|
|
1561
|
+
var serializeAws_json1_1ListParallelDataRequest = function (input, context) {
|
|
1562
|
+
return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
|
|
1170
1563
|
};
|
|
1171
|
-
|
|
1172
|
-
return {
|
|
1173
|
-
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1174
|
-
};
|
|
1564
|
+
var serializeAws_json1_1ListTagsForResourceRequest = function (input, context) {
|
|
1565
|
+
return __assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn }));
|
|
1175
1566
|
};
|
|
1176
|
-
|
|
1177
|
-
return {
|
|
1178
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1179
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1180
|
-
};
|
|
1567
|
+
var serializeAws_json1_1ListTerminologiesRequest = function (input, context) {
|
|
1568
|
+
return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
|
|
1181
1569
|
};
|
|
1182
|
-
|
|
1183
|
-
return {
|
|
1184
|
-
...(input.Filter != null && { Filter: serializeAws_json1_1TextTranslationJobFilter(input.Filter, context) }),
|
|
1185
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1186
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1187
|
-
};
|
|
1570
|
+
var serializeAws_json1_1ListTextTranslationJobsRequest = function (input, context) {
|
|
1571
|
+
return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1TextTranslationJobFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
|
|
1188
1572
|
};
|
|
1189
|
-
|
|
1190
|
-
return {
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
}),
|
|
1194
|
-
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1195
|
-
};
|
|
1573
|
+
var serializeAws_json1_1OutputDataConfig = function (input, context) {
|
|
1574
|
+
return __assign(__assign({}, (input.EncryptionKey != null && {
|
|
1575
|
+
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
1576
|
+
})), (input.S3Uri != null && { S3Uri: input.S3Uri }));
|
|
1196
1577
|
};
|
|
1197
|
-
|
|
1198
|
-
return {
|
|
1199
|
-
...(input.Format != null && { Format: input.Format }),
|
|
1200
|
-
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1201
|
-
};
|
|
1578
|
+
var serializeAws_json1_1ParallelDataConfig = function (input, context) {
|
|
1579
|
+
return __assign(__assign({}, (input.Format != null && { Format: input.Format })), (input.S3Uri != null && { S3Uri: input.S3Uri }));
|
|
1202
1580
|
};
|
|
1203
|
-
|
|
1581
|
+
var serializeAws_json1_1ResourceNameList = function (input, context) {
|
|
1204
1582
|
return input
|
|
1205
|
-
.filter((e)
|
|
1206
|
-
.map((entry)
|
|
1583
|
+
.filter(function (e) { return e != null; })
|
|
1584
|
+
.map(function (entry) {
|
|
1207
1585
|
return entry;
|
|
1208
1586
|
});
|
|
1209
1587
|
};
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
}),
|
|
1232
|
-
};
|
|
1233
|
-
};
|
|
1234
|
-
const serializeAws_json1_1StopTextTranslationJobRequest = (input, context) => {
|
|
1235
|
-
return {
|
|
1236
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1237
|
-
};
|
|
1238
|
-
};
|
|
1239
|
-
const serializeAws_json1_1Tag = (input, context) => {
|
|
1240
|
-
return {
|
|
1241
|
-
...(input.Key != null && { Key: input.Key }),
|
|
1242
|
-
...(input.Value != null && { Value: input.Value }),
|
|
1243
|
-
};
|
|
1244
|
-
};
|
|
1245
|
-
const serializeAws_json1_1TagKeyList = (input, context) => {
|
|
1588
|
+
var serializeAws_json1_1StartTextTranslationJobRequest = function (input, context) {
|
|
1589
|
+
var _a;
|
|
1590
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig != null && {
|
|
1591
|
+
InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
|
|
1592
|
+
})), (input.JobName != null && { JobName: input.JobName })), (input.OutputDataConfig != null && {
|
|
1593
|
+
OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
|
|
1594
|
+
})), (input.ParallelDataNames != null && {
|
|
1595
|
+
ParallelDataNames: serializeAws_json1_1ResourceNameList(input.ParallelDataNames, context),
|
|
1596
|
+
})), (input.Settings != null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) })), (input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode })), (input.TargetLanguageCodes != null && {
|
|
1597
|
+
TargetLanguageCodes: serializeAws_json1_1TargetLanguageCodeStringList(input.TargetLanguageCodes, context),
|
|
1598
|
+
})), (input.TerminologyNames != null && {
|
|
1599
|
+
TerminologyNames: serializeAws_json1_1ResourceNameList(input.TerminologyNames, context),
|
|
1600
|
+
}));
|
|
1601
|
+
};
|
|
1602
|
+
var serializeAws_json1_1StopTextTranslationJobRequest = function (input, context) {
|
|
1603
|
+
return __assign({}, (input.JobId != null && { JobId: input.JobId }));
|
|
1604
|
+
};
|
|
1605
|
+
var serializeAws_json1_1Tag = function (input, context) {
|
|
1606
|
+
return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
|
|
1607
|
+
};
|
|
1608
|
+
var serializeAws_json1_1TagKeyList = function (input, context) {
|
|
1246
1609
|
return input
|
|
1247
|
-
.filter((e)
|
|
1248
|
-
.map((entry)
|
|
1610
|
+
.filter(function (e) { return e != null; })
|
|
1611
|
+
.map(function (entry) {
|
|
1249
1612
|
return entry;
|
|
1250
1613
|
});
|
|
1251
1614
|
};
|
|
1252
|
-
|
|
1615
|
+
var serializeAws_json1_1TagList = function (input, context) {
|
|
1253
1616
|
return input
|
|
1254
|
-
.filter((e)
|
|
1255
|
-
.map((entry)
|
|
1617
|
+
.filter(function (e) { return e != null; })
|
|
1618
|
+
.map(function (entry) {
|
|
1256
1619
|
return serializeAws_json1_1Tag(entry, context);
|
|
1257
1620
|
});
|
|
1258
1621
|
};
|
|
1259
|
-
|
|
1260
|
-
return {
|
|
1261
|
-
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1262
|
-
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
1263
|
-
};
|
|
1622
|
+
var serializeAws_json1_1TagResourceRequest = function (input, context) {
|
|
1623
|
+
return __assign(__assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
|
|
1264
1624
|
};
|
|
1265
|
-
|
|
1625
|
+
var serializeAws_json1_1TargetLanguageCodeStringList = function (input, context) {
|
|
1266
1626
|
return input
|
|
1267
|
-
.filter((e)
|
|
1268
|
-
.map((entry)
|
|
1627
|
+
.filter(function (e) { return e != null; })
|
|
1628
|
+
.map(function (entry) {
|
|
1269
1629
|
return entry;
|
|
1270
1630
|
});
|
|
1271
1631
|
};
|
|
1272
|
-
|
|
1273
|
-
return {
|
|
1274
|
-
...(input.Directionality != null && { Directionality: input.Directionality }),
|
|
1275
|
-
...(input.File != null && { File: context.base64Encoder(input.File) }),
|
|
1276
|
-
...(input.Format != null && { Format: input.Format }),
|
|
1277
|
-
};
|
|
1632
|
+
var serializeAws_json1_1TerminologyData = function (input, context) {
|
|
1633
|
+
return __assign(__assign(__assign({}, (input.Directionality != null && { Directionality: input.Directionality })), (input.File != null && { File: context.base64Encoder(input.File) })), (input.Format != null && { Format: input.Format }));
|
|
1278
1634
|
};
|
|
1279
|
-
|
|
1280
|
-
return {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
}),
|
|
1286
|
-
...(input.SubmittedBeforeTime != null && {
|
|
1287
|
-
SubmittedBeforeTime: Math.round(input.SubmittedBeforeTime.getTime() / 1000),
|
|
1288
|
-
}),
|
|
1289
|
-
};
|
|
1635
|
+
var serializeAws_json1_1TextTranslationJobFilter = function (input, context) {
|
|
1636
|
+
return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmittedAfterTime != null && {
|
|
1637
|
+
SubmittedAfterTime: Math.round(input.SubmittedAfterTime.getTime() / 1000),
|
|
1638
|
+
})), (input.SubmittedBeforeTime != null && {
|
|
1639
|
+
SubmittedBeforeTime: Math.round(input.SubmittedBeforeTime.getTime() / 1000),
|
|
1640
|
+
}));
|
|
1290
1641
|
};
|
|
1291
|
-
|
|
1292
|
-
return {
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
...(input.TargetLanguageCode != null && { TargetLanguageCode: input.TargetLanguageCode }),
|
|
1296
|
-
...(input.TerminologyNames != null && {
|
|
1297
|
-
TerminologyNames: serializeAws_json1_1ResourceNameList(input.TerminologyNames, context),
|
|
1298
|
-
}),
|
|
1299
|
-
...(input.Text != null && { Text: input.Text }),
|
|
1300
|
-
};
|
|
1642
|
+
var serializeAws_json1_1TranslateTextRequest = function (input, context) {
|
|
1643
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.Settings != null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) })), (input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode })), (input.TargetLanguageCode != null && { TargetLanguageCode: input.TargetLanguageCode })), (input.TerminologyNames != null && {
|
|
1644
|
+
TerminologyNames: serializeAws_json1_1ResourceNameList(input.TerminologyNames, context),
|
|
1645
|
+
})), (input.Text != null && { Text: input.Text }));
|
|
1301
1646
|
};
|
|
1302
|
-
|
|
1303
|
-
return {
|
|
1304
|
-
...(input.Formality != null && { Formality: input.Formality }),
|
|
1305
|
-
...(input.Profanity != null && { Profanity: input.Profanity }),
|
|
1306
|
-
};
|
|
1647
|
+
var serializeAws_json1_1TranslationSettings = function (input, context) {
|
|
1648
|
+
return __assign(__assign({}, (input.Formality != null && { Formality: input.Formality })), (input.Profanity != null && { Profanity: input.Profanity }));
|
|
1307
1649
|
};
|
|
1308
|
-
|
|
1309
|
-
return {
|
|
1310
|
-
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1311
|
-
...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
|
|
1312
|
-
};
|
|
1650
|
+
var serializeAws_json1_1UntagResourceRequest = function (input, context) {
|
|
1651
|
+
return __assign(__assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn })), (input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }));
|
|
1313
1652
|
};
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
...(input.ParallelDataConfig != null && {
|
|
1320
|
-
ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
|
|
1321
|
-
}),
|
|
1322
|
-
};
|
|
1653
|
+
var serializeAws_json1_1UpdateParallelDataRequest = function (input, context) {
|
|
1654
|
+
var _a;
|
|
1655
|
+
return __assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.Description != null && { Description: input.Description })), (input.Name != null && { Name: input.Name })), (input.ParallelDataConfig != null && {
|
|
1656
|
+
ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
|
|
1657
|
+
}));
|
|
1323
1658
|
};
|
|
1324
|
-
|
|
1659
|
+
var deserializeAws_json1_1AppliedTerminology = function (output, context) {
|
|
1325
1660
|
return {
|
|
1326
1661
|
Name: __expectString(output.Name),
|
|
1327
1662
|
Terms: output.Terms != null ? deserializeAws_json1_1TermList(output.Terms, context) : undefined,
|
|
1328
1663
|
};
|
|
1329
1664
|
};
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
.filter((e)
|
|
1333
|
-
.map((entry)
|
|
1665
|
+
var deserializeAws_json1_1AppliedTerminologyList = function (output, context) {
|
|
1666
|
+
var retVal = (output || [])
|
|
1667
|
+
.filter(function (e) { return e != null; })
|
|
1668
|
+
.map(function (entry) {
|
|
1334
1669
|
if (entry === null) {
|
|
1335
1670
|
return null;
|
|
1336
1671
|
}
|
|
@@ -1338,48 +1673,48 @@ const deserializeAws_json1_1AppliedTerminologyList = (output, context) => {
|
|
|
1338
1673
|
});
|
|
1339
1674
|
return retVal;
|
|
1340
1675
|
};
|
|
1341
|
-
|
|
1676
|
+
var deserializeAws_json1_1ConcurrentModificationException = function (output, context) {
|
|
1342
1677
|
return {
|
|
1343
1678
|
Message: __expectString(output.Message),
|
|
1344
1679
|
};
|
|
1345
1680
|
};
|
|
1346
|
-
|
|
1681
|
+
var deserializeAws_json1_1ConflictException = function (output, context) {
|
|
1347
1682
|
return {
|
|
1348
1683
|
Message: __expectString(output.Message),
|
|
1349
1684
|
};
|
|
1350
1685
|
};
|
|
1351
|
-
|
|
1686
|
+
var deserializeAws_json1_1CreateParallelDataResponse = function (output, context) {
|
|
1352
1687
|
return {
|
|
1353
1688
|
Name: __expectString(output.Name),
|
|
1354
1689
|
Status: __expectString(output.Status),
|
|
1355
1690
|
};
|
|
1356
1691
|
};
|
|
1357
|
-
|
|
1692
|
+
var deserializeAws_json1_1DeleteParallelDataResponse = function (output, context) {
|
|
1358
1693
|
return {
|
|
1359
1694
|
Name: __expectString(output.Name),
|
|
1360
1695
|
Status: __expectString(output.Status),
|
|
1361
1696
|
};
|
|
1362
1697
|
};
|
|
1363
|
-
|
|
1698
|
+
var deserializeAws_json1_1DescribeTextTranslationJobResponse = function (output, context) {
|
|
1364
1699
|
return {
|
|
1365
1700
|
TextTranslationJobProperties: output.TextTranslationJobProperties != null
|
|
1366
1701
|
? deserializeAws_json1_1TextTranslationJobProperties(output.TextTranslationJobProperties, context)
|
|
1367
1702
|
: undefined,
|
|
1368
1703
|
};
|
|
1369
1704
|
};
|
|
1370
|
-
|
|
1705
|
+
var deserializeAws_json1_1DetectedLanguageLowConfidenceException = function (output, context) {
|
|
1371
1706
|
return {
|
|
1372
1707
|
DetectedLanguageCode: __expectString(output.DetectedLanguageCode),
|
|
1373
1708
|
Message: __expectString(output.Message),
|
|
1374
1709
|
};
|
|
1375
1710
|
};
|
|
1376
|
-
|
|
1711
|
+
var deserializeAws_json1_1EncryptionKey = function (output, context) {
|
|
1377
1712
|
return {
|
|
1378
1713
|
Id: __expectString(output.Id),
|
|
1379
1714
|
Type: __expectString(output.Type),
|
|
1380
1715
|
};
|
|
1381
1716
|
};
|
|
1382
|
-
|
|
1717
|
+
var deserializeAws_json1_1GetParallelDataResponse = function (output, context) {
|
|
1383
1718
|
return {
|
|
1384
1719
|
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1385
1720
|
? deserializeAws_json1_1ParallelDataDataLocation(output.AuxiliaryDataLocation, context)
|
|
@@ -1395,7 +1730,7 @@ const deserializeAws_json1_1GetParallelDataResponse = (output, context) => {
|
|
|
1395
1730
|
: undefined,
|
|
1396
1731
|
};
|
|
1397
1732
|
};
|
|
1398
|
-
|
|
1733
|
+
var deserializeAws_json1_1GetTerminologyResponse = function (output, context) {
|
|
1399
1734
|
return {
|
|
1400
1735
|
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1401
1736
|
? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
@@ -1408,7 +1743,7 @@ const deserializeAws_json1_1GetTerminologyResponse = (output, context) => {
|
|
|
1408
1743
|
: undefined,
|
|
1409
1744
|
};
|
|
1410
1745
|
};
|
|
1411
|
-
|
|
1746
|
+
var deserializeAws_json1_1ImportTerminologyResponse = function (output, context) {
|
|
1412
1747
|
return {
|
|
1413
1748
|
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1414
1749
|
? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
@@ -1418,49 +1753,49 @@ const deserializeAws_json1_1ImportTerminologyResponse = (output, context) => {
|
|
|
1418
1753
|
: undefined,
|
|
1419
1754
|
};
|
|
1420
1755
|
};
|
|
1421
|
-
|
|
1756
|
+
var deserializeAws_json1_1InputDataConfig = function (output, context) {
|
|
1422
1757
|
return {
|
|
1423
1758
|
ContentType: __expectString(output.ContentType),
|
|
1424
1759
|
S3Uri: __expectString(output.S3Uri),
|
|
1425
1760
|
};
|
|
1426
1761
|
};
|
|
1427
|
-
|
|
1762
|
+
var deserializeAws_json1_1InternalServerException = function (output, context) {
|
|
1428
1763
|
return {
|
|
1429
1764
|
Message: __expectString(output.Message),
|
|
1430
1765
|
};
|
|
1431
1766
|
};
|
|
1432
|
-
|
|
1767
|
+
var deserializeAws_json1_1InvalidFilterException = function (output, context) {
|
|
1433
1768
|
return {
|
|
1434
1769
|
Message: __expectString(output.Message),
|
|
1435
1770
|
};
|
|
1436
1771
|
};
|
|
1437
|
-
|
|
1772
|
+
var deserializeAws_json1_1InvalidParameterValueException = function (output, context) {
|
|
1438
1773
|
return {
|
|
1439
1774
|
Message: __expectString(output.Message),
|
|
1440
1775
|
};
|
|
1441
1776
|
};
|
|
1442
|
-
|
|
1777
|
+
var deserializeAws_json1_1InvalidRequestException = function (output, context) {
|
|
1443
1778
|
return {
|
|
1444
1779
|
Message: __expectString(output.Message),
|
|
1445
1780
|
};
|
|
1446
1781
|
};
|
|
1447
|
-
|
|
1782
|
+
var deserializeAws_json1_1JobDetails = function (output, context) {
|
|
1448
1783
|
return {
|
|
1449
1784
|
DocumentsWithErrorsCount: __expectInt32(output.DocumentsWithErrorsCount),
|
|
1450
1785
|
InputDocumentsCount: __expectInt32(output.InputDocumentsCount),
|
|
1451
1786
|
TranslatedDocumentsCount: __expectInt32(output.TranslatedDocumentsCount),
|
|
1452
1787
|
};
|
|
1453
1788
|
};
|
|
1454
|
-
|
|
1789
|
+
var deserializeAws_json1_1Language = function (output, context) {
|
|
1455
1790
|
return {
|
|
1456
1791
|
LanguageCode: __expectString(output.LanguageCode),
|
|
1457
1792
|
LanguageName: __expectString(output.LanguageName),
|
|
1458
1793
|
};
|
|
1459
1794
|
};
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
.filter((e)
|
|
1463
|
-
.map((entry)
|
|
1795
|
+
var deserializeAws_json1_1LanguageCodeStringList = function (output, context) {
|
|
1796
|
+
var retVal = (output || [])
|
|
1797
|
+
.filter(function (e) { return e != null; })
|
|
1798
|
+
.map(function (entry) {
|
|
1464
1799
|
if (entry === null) {
|
|
1465
1800
|
return null;
|
|
1466
1801
|
}
|
|
@@ -1468,10 +1803,10 @@ const deserializeAws_json1_1LanguageCodeStringList = (output, context) => {
|
|
|
1468
1803
|
});
|
|
1469
1804
|
return retVal;
|
|
1470
1805
|
};
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
.filter((e)
|
|
1474
|
-
.map((entry)
|
|
1806
|
+
var deserializeAws_json1_1LanguagesList = function (output, context) {
|
|
1807
|
+
var retVal = (output || [])
|
|
1808
|
+
.filter(function (e) { return e != null; })
|
|
1809
|
+
.map(function (entry) {
|
|
1475
1810
|
if (entry === null) {
|
|
1476
1811
|
return null;
|
|
1477
1812
|
}
|
|
@@ -1479,19 +1814,19 @@ const deserializeAws_json1_1LanguagesList = (output, context) => {
|
|
|
1479
1814
|
});
|
|
1480
1815
|
return retVal;
|
|
1481
1816
|
};
|
|
1482
|
-
|
|
1817
|
+
var deserializeAws_json1_1LimitExceededException = function (output, context) {
|
|
1483
1818
|
return {
|
|
1484
1819
|
Message: __expectString(output.Message),
|
|
1485
1820
|
};
|
|
1486
1821
|
};
|
|
1487
|
-
|
|
1822
|
+
var deserializeAws_json1_1ListLanguagesResponse = function (output, context) {
|
|
1488
1823
|
return {
|
|
1489
1824
|
DisplayLanguageCode: __expectString(output.DisplayLanguageCode),
|
|
1490
1825
|
Languages: output.Languages != null ? deserializeAws_json1_1LanguagesList(output.Languages, context) : undefined,
|
|
1491
1826
|
NextToken: __expectString(output.NextToken),
|
|
1492
1827
|
};
|
|
1493
1828
|
};
|
|
1494
|
-
|
|
1829
|
+
var deserializeAws_json1_1ListParallelDataResponse = function (output, context) {
|
|
1495
1830
|
return {
|
|
1496
1831
|
NextToken: __expectString(output.NextToken),
|
|
1497
1832
|
ParallelDataPropertiesList: output.ParallelDataPropertiesList != null
|
|
@@ -1499,12 +1834,12 @@ const deserializeAws_json1_1ListParallelDataResponse = (output, context) => {
|
|
|
1499
1834
|
: undefined,
|
|
1500
1835
|
};
|
|
1501
1836
|
};
|
|
1502
|
-
|
|
1837
|
+
var deserializeAws_json1_1ListTagsForResourceResponse = function (output, context) {
|
|
1503
1838
|
return {
|
|
1504
1839
|
Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
|
|
1505
1840
|
};
|
|
1506
1841
|
};
|
|
1507
|
-
|
|
1842
|
+
var deserializeAws_json1_1ListTerminologiesResponse = function (output, context) {
|
|
1508
1843
|
return {
|
|
1509
1844
|
NextToken: __expectString(output.NextToken),
|
|
1510
1845
|
TerminologyPropertiesList: output.TerminologyPropertiesList != null
|
|
@@ -1512,7 +1847,7 @@ const deserializeAws_json1_1ListTerminologiesResponse = (output, context) => {
|
|
|
1512
1847
|
: undefined,
|
|
1513
1848
|
};
|
|
1514
1849
|
};
|
|
1515
|
-
|
|
1850
|
+
var deserializeAws_json1_1ListTextTranslationJobsResponse = function (output, context) {
|
|
1516
1851
|
return {
|
|
1517
1852
|
NextToken: __expectString(output.NextToken),
|
|
1518
1853
|
TextTranslationJobPropertiesList: output.TextTranslationJobPropertiesList != null
|
|
@@ -1520,25 +1855,25 @@ const deserializeAws_json1_1ListTextTranslationJobsResponse = (output, context)
|
|
|
1520
1855
|
: undefined,
|
|
1521
1856
|
};
|
|
1522
1857
|
};
|
|
1523
|
-
|
|
1858
|
+
var deserializeAws_json1_1OutputDataConfig = function (output, context) {
|
|
1524
1859
|
return {
|
|
1525
1860
|
EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
|
|
1526
1861
|
S3Uri: __expectString(output.S3Uri),
|
|
1527
1862
|
};
|
|
1528
1863
|
};
|
|
1529
|
-
|
|
1864
|
+
var deserializeAws_json1_1ParallelDataConfig = function (output, context) {
|
|
1530
1865
|
return {
|
|
1531
1866
|
Format: __expectString(output.Format),
|
|
1532
1867
|
S3Uri: __expectString(output.S3Uri),
|
|
1533
1868
|
};
|
|
1534
1869
|
};
|
|
1535
|
-
|
|
1870
|
+
var deserializeAws_json1_1ParallelDataDataLocation = function (output, context) {
|
|
1536
1871
|
return {
|
|
1537
1872
|
Location: __expectString(output.Location),
|
|
1538
1873
|
RepositoryType: __expectString(output.RepositoryType),
|
|
1539
1874
|
};
|
|
1540
1875
|
};
|
|
1541
|
-
|
|
1876
|
+
var deserializeAws_json1_1ParallelDataProperties = function (output, context) {
|
|
1542
1877
|
return {
|
|
1543
1878
|
Arn: __expectString(output.Arn),
|
|
1544
1879
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
@@ -1567,10 +1902,10 @@ const deserializeAws_json1_1ParallelDataProperties = (output, context) => {
|
|
|
1567
1902
|
: undefined,
|
|
1568
1903
|
};
|
|
1569
1904
|
};
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
.filter((e)
|
|
1573
|
-
.map((entry)
|
|
1905
|
+
var deserializeAws_json1_1ParallelDataPropertiesList = function (output, context) {
|
|
1906
|
+
var retVal = (output || [])
|
|
1907
|
+
.filter(function (e) { return e != null; })
|
|
1908
|
+
.map(function (entry) {
|
|
1574
1909
|
if (entry === null) {
|
|
1575
1910
|
return null;
|
|
1576
1911
|
}
|
|
@@ -1578,10 +1913,10 @@ const deserializeAws_json1_1ParallelDataPropertiesList = (output, context) => {
|
|
|
1578
1913
|
});
|
|
1579
1914
|
return retVal;
|
|
1580
1915
|
};
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
.filter((e)
|
|
1584
|
-
.map((entry)
|
|
1916
|
+
var deserializeAws_json1_1ResourceNameList = function (output, context) {
|
|
1917
|
+
var retVal = (output || [])
|
|
1918
|
+
.filter(function (e) { return e != null; })
|
|
1919
|
+
.map(function (entry) {
|
|
1585
1920
|
if (entry === null) {
|
|
1586
1921
|
return null;
|
|
1587
1922
|
}
|
|
@@ -1589,38 +1924,38 @@ const deserializeAws_json1_1ResourceNameList = (output, context) => {
|
|
|
1589
1924
|
});
|
|
1590
1925
|
return retVal;
|
|
1591
1926
|
};
|
|
1592
|
-
|
|
1927
|
+
var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
|
|
1593
1928
|
return {
|
|
1594
1929
|
Message: __expectString(output.Message),
|
|
1595
1930
|
};
|
|
1596
1931
|
};
|
|
1597
|
-
|
|
1932
|
+
var deserializeAws_json1_1ServiceUnavailableException = function (output, context) {
|
|
1598
1933
|
return {
|
|
1599
1934
|
Message: __expectString(output.Message),
|
|
1600
1935
|
};
|
|
1601
1936
|
};
|
|
1602
|
-
|
|
1937
|
+
var deserializeAws_json1_1StartTextTranslationJobResponse = function (output, context) {
|
|
1603
1938
|
return {
|
|
1604
1939
|
JobId: __expectString(output.JobId),
|
|
1605
1940
|
JobStatus: __expectString(output.JobStatus),
|
|
1606
1941
|
};
|
|
1607
1942
|
};
|
|
1608
|
-
|
|
1943
|
+
var deserializeAws_json1_1StopTextTranslationJobResponse = function (output, context) {
|
|
1609
1944
|
return {
|
|
1610
1945
|
JobId: __expectString(output.JobId),
|
|
1611
1946
|
JobStatus: __expectString(output.JobStatus),
|
|
1612
1947
|
};
|
|
1613
1948
|
};
|
|
1614
|
-
|
|
1949
|
+
var deserializeAws_json1_1Tag = function (output, context) {
|
|
1615
1950
|
return {
|
|
1616
1951
|
Key: __expectString(output.Key),
|
|
1617
1952
|
Value: __expectString(output.Value),
|
|
1618
1953
|
};
|
|
1619
1954
|
};
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
.filter((e)
|
|
1623
|
-
.map((entry)
|
|
1955
|
+
var deserializeAws_json1_1TagList = function (output, context) {
|
|
1956
|
+
var retVal = (output || [])
|
|
1957
|
+
.filter(function (e) { return e != null; })
|
|
1958
|
+
.map(function (entry) {
|
|
1624
1959
|
if (entry === null) {
|
|
1625
1960
|
return null;
|
|
1626
1961
|
}
|
|
@@ -1628,13 +1963,13 @@ const deserializeAws_json1_1TagList = (output, context) => {
|
|
|
1628
1963
|
});
|
|
1629
1964
|
return retVal;
|
|
1630
1965
|
};
|
|
1631
|
-
|
|
1966
|
+
var deserializeAws_json1_1TagResourceResponse = function (output, context) {
|
|
1632
1967
|
return {};
|
|
1633
1968
|
};
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
.filter((e)
|
|
1637
|
-
.map((entry)
|
|
1969
|
+
var deserializeAws_json1_1TargetLanguageCodeStringList = function (output, context) {
|
|
1970
|
+
var retVal = (output || [])
|
|
1971
|
+
.filter(function (e) { return e != null; })
|
|
1972
|
+
.map(function (entry) {
|
|
1638
1973
|
if (entry === null) {
|
|
1639
1974
|
return null;
|
|
1640
1975
|
}
|
|
@@ -1642,19 +1977,19 @@ const deserializeAws_json1_1TargetLanguageCodeStringList = (output, context) =>
|
|
|
1642
1977
|
});
|
|
1643
1978
|
return retVal;
|
|
1644
1979
|
};
|
|
1645
|
-
|
|
1980
|
+
var deserializeAws_json1_1Term = function (output, context) {
|
|
1646
1981
|
return {
|
|
1647
1982
|
SourceText: __expectString(output.SourceText),
|
|
1648
1983
|
TargetText: __expectString(output.TargetText),
|
|
1649
1984
|
};
|
|
1650
1985
|
};
|
|
1651
|
-
|
|
1986
|
+
var deserializeAws_json1_1TerminologyDataLocation = function (output, context) {
|
|
1652
1987
|
return {
|
|
1653
1988
|
Location: __expectString(output.Location),
|
|
1654
1989
|
RepositoryType: __expectString(output.RepositoryType),
|
|
1655
1990
|
};
|
|
1656
1991
|
};
|
|
1657
|
-
|
|
1992
|
+
var deserializeAws_json1_1TerminologyProperties = function (output, context) {
|
|
1658
1993
|
return {
|
|
1659
1994
|
Arn: __expectString(output.Arn),
|
|
1660
1995
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
@@ -1676,10 +2011,10 @@ const deserializeAws_json1_1TerminologyProperties = (output, context) => {
|
|
|
1676
2011
|
TermCount: __expectInt32(output.TermCount),
|
|
1677
2012
|
};
|
|
1678
2013
|
};
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
.filter((e)
|
|
1682
|
-
.map((entry)
|
|
2014
|
+
var deserializeAws_json1_1TerminologyPropertiesList = function (output, context) {
|
|
2015
|
+
var retVal = (output || [])
|
|
2016
|
+
.filter(function (e) { return e != null; })
|
|
2017
|
+
.map(function (entry) {
|
|
1683
2018
|
if (entry === null) {
|
|
1684
2019
|
return null;
|
|
1685
2020
|
}
|
|
@@ -1687,10 +2022,10 @@ const deserializeAws_json1_1TerminologyPropertiesList = (output, context) => {
|
|
|
1687
2022
|
});
|
|
1688
2023
|
return retVal;
|
|
1689
2024
|
};
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
.filter((e)
|
|
1693
|
-
.map((entry)
|
|
2025
|
+
var deserializeAws_json1_1TermList = function (output, context) {
|
|
2026
|
+
var retVal = (output || [])
|
|
2027
|
+
.filter(function (e) { return e != null; })
|
|
2028
|
+
.map(function (entry) {
|
|
1694
2029
|
if (entry === null) {
|
|
1695
2030
|
return null;
|
|
1696
2031
|
}
|
|
@@ -1698,12 +2033,12 @@ const deserializeAws_json1_1TermList = (output, context) => {
|
|
|
1698
2033
|
});
|
|
1699
2034
|
return retVal;
|
|
1700
2035
|
};
|
|
1701
|
-
|
|
2036
|
+
var deserializeAws_json1_1TextSizeLimitExceededException = function (output, context) {
|
|
1702
2037
|
return {
|
|
1703
2038
|
Message: __expectString(output.Message),
|
|
1704
2039
|
};
|
|
1705
2040
|
};
|
|
1706
|
-
|
|
2041
|
+
var deserializeAws_json1_1TextTranslationJobProperties = function (output, context) {
|
|
1707
2042
|
return {
|
|
1708
2043
|
DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
|
|
1709
2044
|
EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
|
|
@@ -1734,10 +2069,10 @@ const deserializeAws_json1_1TextTranslationJobProperties = (output, context) =>
|
|
|
1734
2069
|
: undefined,
|
|
1735
2070
|
};
|
|
1736
2071
|
};
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
.filter((e)
|
|
1740
|
-
.map((entry)
|
|
2072
|
+
var deserializeAws_json1_1TextTranslationJobPropertiesList = function (output, context) {
|
|
2073
|
+
var retVal = (output || [])
|
|
2074
|
+
.filter(function (e) { return e != null; })
|
|
2075
|
+
.map(function (entry) {
|
|
1741
2076
|
if (entry === null) {
|
|
1742
2077
|
return null;
|
|
1743
2078
|
}
|
|
@@ -1745,18 +2080,18 @@ const deserializeAws_json1_1TextTranslationJobPropertiesList = (output, context)
|
|
|
1745
2080
|
});
|
|
1746
2081
|
return retVal;
|
|
1747
2082
|
};
|
|
1748
|
-
|
|
2083
|
+
var deserializeAws_json1_1TooManyRequestsException = function (output, context) {
|
|
1749
2084
|
return {
|
|
1750
2085
|
Message: __expectString(output.Message),
|
|
1751
2086
|
};
|
|
1752
2087
|
};
|
|
1753
|
-
|
|
2088
|
+
var deserializeAws_json1_1TooManyTagsException = function (output, context) {
|
|
1754
2089
|
return {
|
|
1755
2090
|
ResourceArn: __expectString(output.ResourceArn),
|
|
1756
2091
|
message: __expectString(output.message),
|
|
1757
2092
|
};
|
|
1758
2093
|
};
|
|
1759
|
-
|
|
2094
|
+
var deserializeAws_json1_1TranslateTextResponse = function (output, context) {
|
|
1760
2095
|
return {
|
|
1761
2096
|
AppliedSettings: output.AppliedSettings != null
|
|
1762
2097
|
? deserializeAws_json1_1TranslationSettings(output.AppliedSettings, context)
|
|
@@ -1769,29 +2104,29 @@ const deserializeAws_json1_1TranslateTextResponse = (output, context) => {
|
|
|
1769
2104
|
TranslatedText: __expectString(output.TranslatedText),
|
|
1770
2105
|
};
|
|
1771
2106
|
};
|
|
1772
|
-
|
|
2107
|
+
var deserializeAws_json1_1TranslationSettings = function (output, context) {
|
|
1773
2108
|
return {
|
|
1774
2109
|
Formality: __expectString(output.Formality),
|
|
1775
2110
|
Profanity: __expectString(output.Profanity),
|
|
1776
2111
|
};
|
|
1777
2112
|
};
|
|
1778
|
-
|
|
2113
|
+
var deserializeAws_json1_1UnsupportedDisplayLanguageCodeException = function (output, context) {
|
|
1779
2114
|
return {
|
|
1780
2115
|
DisplayLanguageCode: __expectString(output.DisplayLanguageCode),
|
|
1781
2116
|
Message: __expectString(output.Message),
|
|
1782
2117
|
};
|
|
1783
2118
|
};
|
|
1784
|
-
|
|
2119
|
+
var deserializeAws_json1_1UnsupportedLanguagePairException = function (output, context) {
|
|
1785
2120
|
return {
|
|
1786
2121
|
Message: __expectString(output.Message),
|
|
1787
2122
|
SourceLanguageCode: __expectString(output.SourceLanguageCode),
|
|
1788
2123
|
TargetLanguageCode: __expectString(output.TargetLanguageCode),
|
|
1789
2124
|
};
|
|
1790
2125
|
};
|
|
1791
|
-
|
|
2126
|
+
var deserializeAws_json1_1UntagResourceResponse = function (output, context) {
|
|
1792
2127
|
return {};
|
|
1793
2128
|
};
|
|
1794
|
-
|
|
2129
|
+
var deserializeAws_json1_1UpdateParallelDataResponse = function (output, context) {
|
|
1795
2130
|
return {
|
|
1796
2131
|
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
|
|
1797
2132
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestUpdateAttemptAt)))
|
|
@@ -1801,52 +2136,75 @@ const deserializeAws_json1_1UpdateParallelDataResponse = (output, context) => {
|
|
|
1801
2136
|
Status: __expectString(output.Status),
|
|
1802
2137
|
};
|
|
1803
2138
|
};
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
2139
|
+
var deserializeMetadata = function (output) {
|
|
2140
|
+
var _a, _b;
|
|
2141
|
+
return ({
|
|
2142
|
+
httpStatusCode: output.statusCode,
|
|
2143
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
2144
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2145
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
2146
|
+
});
|
|
2147
|
+
};
|
|
2148
|
+
var collectBody = function (streamBody, context) {
|
|
2149
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1811
2150
|
if (streamBody instanceof Uint8Array) {
|
|
1812
2151
|
return Promise.resolve(streamBody);
|
|
1813
2152
|
}
|
|
1814
2153
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1815
2154
|
};
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
2155
|
+
var collectBodyString = function (streamBody, context) {
|
|
2156
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
2157
|
+
};
|
|
2158
|
+
var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2159
|
+
var _a, hostname, _b, protocol, port, basePath, contents;
|
|
2160
|
+
return __generator(this, function (_c) {
|
|
2161
|
+
switch (_c.label) {
|
|
2162
|
+
case 0: return [4, context.endpoint()];
|
|
2163
|
+
case 1:
|
|
2164
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2165
|
+
contents = {
|
|
2166
|
+
protocol: protocol,
|
|
2167
|
+
hostname: hostname,
|
|
2168
|
+
port: port,
|
|
2169
|
+
method: "POST",
|
|
2170
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
2171
|
+
headers: headers,
|
|
2172
|
+
};
|
|
2173
|
+
if (resolvedHostname !== undefined) {
|
|
2174
|
+
contents.hostname = resolvedHostname;
|
|
2175
|
+
}
|
|
2176
|
+
if (body !== undefined) {
|
|
2177
|
+
contents.body = body;
|
|
2178
|
+
}
|
|
2179
|
+
return [2, new __HttpRequest(contents)];
|
|
2180
|
+
}
|
|
2181
|
+
});
|
|
2182
|
+
}); };
|
|
2183
|
+
var parseBody = function (streamBody, context) {
|
|
2184
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
2185
|
+
if (encoded.length) {
|
|
2186
|
+
return JSON.parse(encoded);
|
|
2187
|
+
}
|
|
2188
|
+
return {};
|
|
2189
|
+
});
|
|
1834
2190
|
};
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
2191
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2192
|
+
var value;
|
|
2193
|
+
var _a;
|
|
2194
|
+
return __generator(this, function (_b) {
|
|
2195
|
+
switch (_b.label) {
|
|
2196
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
2197
|
+
case 1:
|
|
2198
|
+
value = _b.sent();
|
|
2199
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2200
|
+
return [2, value];
|
|
2201
|
+
}
|
|
2202
|
+
});
|
|
2203
|
+
}); };
|
|
2204
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
2205
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2206
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
2207
|
+
var cleanValue = rawValue;
|
|
1850
2208
|
if (typeof cleanValue === "number") {
|
|
1851
2209
|
cleanValue = cleanValue.toString();
|
|
1852
2210
|
}
|
|
@@ -1861,7 +2219,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1861
2219
|
}
|
|
1862
2220
|
return cleanValue;
|
|
1863
2221
|
};
|
|
1864
|
-
|
|
2222
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1865
2223
|
if (headerKey !== undefined) {
|
|
1866
2224
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1867
2225
|
}
|