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