@aws-sdk/client-translate 3.120.0 → 3.128.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 +28 -0
- package/dist-cjs/protocols/Aws_json1_1.js +173 -204
- package/dist-es/protocols/Aws_json1_1.js +144 -175
- package/package.json +26 -26
|
@@ -176,8 +176,7 @@ const deserializeAws_json1_1CreateParallelDataCommandError = async (output, cont
|
|
|
176
176
|
body: await parseBody(output.body, context),
|
|
177
177
|
};
|
|
178
178
|
let response;
|
|
179
|
-
|
|
180
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
179
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
181
180
|
switch (errorCode) {
|
|
182
181
|
case "ConflictException":
|
|
183
182
|
case "com.amazonaws.translate#ConflictException":
|
|
@@ -199,10 +198,12 @@ const deserializeAws_json1_1CreateParallelDataCommandError = async (output, cont
|
|
|
199
198
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
200
199
|
default:
|
|
201
200
|
const parsedBody = parsedOutput.body;
|
|
201
|
+
const $metadata = deserializeMetadata(output);
|
|
202
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
202
203
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
203
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
204
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
204
205
|
$fault: "client",
|
|
205
|
-
$metadata
|
|
206
|
+
$metadata,
|
|
206
207
|
});
|
|
207
208
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
208
209
|
}
|
|
@@ -227,8 +228,7 @@ const deserializeAws_json1_1DeleteParallelDataCommandError = async (output, cont
|
|
|
227
228
|
body: await parseBody(output.body, context),
|
|
228
229
|
};
|
|
229
230
|
let response;
|
|
230
|
-
|
|
231
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
231
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
232
232
|
switch (errorCode) {
|
|
233
233
|
case "ConcurrentModificationException":
|
|
234
234
|
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
@@ -244,10 +244,12 @@ const deserializeAws_json1_1DeleteParallelDataCommandError = async (output, cont
|
|
|
244
244
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
245
245
|
default:
|
|
246
246
|
const parsedBody = parsedOutput.body;
|
|
247
|
+
const $metadata = deserializeMetadata(output);
|
|
248
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
247
249
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
248
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
250
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
249
251
|
$fault: "client",
|
|
250
|
-
$metadata
|
|
252
|
+
$metadata,
|
|
251
253
|
});
|
|
252
254
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
253
255
|
}
|
|
@@ -269,8 +271,7 @@ const deserializeAws_json1_1DeleteTerminologyCommandError = async (output, conte
|
|
|
269
271
|
body: await parseBody(output.body, context),
|
|
270
272
|
};
|
|
271
273
|
let response;
|
|
272
|
-
|
|
273
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
274
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
274
275
|
switch (errorCode) {
|
|
275
276
|
case "InternalServerException":
|
|
276
277
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -286,10 +287,12 @@ const deserializeAws_json1_1DeleteTerminologyCommandError = async (output, conte
|
|
|
286
287
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
287
288
|
default:
|
|
288
289
|
const parsedBody = parsedOutput.body;
|
|
290
|
+
const $metadata = deserializeMetadata(output);
|
|
291
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
289
292
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
290
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
293
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
291
294
|
$fault: "client",
|
|
292
|
-
$metadata
|
|
295
|
+
$metadata,
|
|
293
296
|
});
|
|
294
297
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
295
298
|
}
|
|
@@ -314,8 +317,7 @@ const deserializeAws_json1_1DescribeTextTranslationJobCommandError = async (outp
|
|
|
314
317
|
body: await parseBody(output.body, context),
|
|
315
318
|
};
|
|
316
319
|
let response;
|
|
317
|
-
|
|
318
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
320
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
319
321
|
switch (errorCode) {
|
|
320
322
|
case "InternalServerException":
|
|
321
323
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -328,10 +330,12 @@ const deserializeAws_json1_1DescribeTextTranslationJobCommandError = async (outp
|
|
|
328
330
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
329
331
|
default:
|
|
330
332
|
const parsedBody = parsedOutput.body;
|
|
333
|
+
const $metadata = deserializeMetadata(output);
|
|
334
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
331
335
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
332
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
336
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
333
337
|
$fault: "client",
|
|
334
|
-
$metadata
|
|
338
|
+
$metadata,
|
|
335
339
|
});
|
|
336
340
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
337
341
|
}
|
|
@@ -356,8 +360,7 @@ const deserializeAws_json1_1GetParallelDataCommandError = async (output, context
|
|
|
356
360
|
body: await parseBody(output.body, context),
|
|
357
361
|
};
|
|
358
362
|
let response;
|
|
359
|
-
|
|
360
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
363
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
361
364
|
switch (errorCode) {
|
|
362
365
|
case "InternalServerException":
|
|
363
366
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -373,10 +376,12 @@ const deserializeAws_json1_1GetParallelDataCommandError = async (output, context
|
|
|
373
376
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
374
377
|
default:
|
|
375
378
|
const parsedBody = parsedOutput.body;
|
|
379
|
+
const $metadata = deserializeMetadata(output);
|
|
380
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
376
381
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
377
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
382
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
378
383
|
$fault: "client",
|
|
379
|
-
$metadata
|
|
384
|
+
$metadata,
|
|
380
385
|
});
|
|
381
386
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
382
387
|
}
|
|
@@ -401,8 +406,7 @@ const deserializeAws_json1_1GetTerminologyCommandError = async (output, context)
|
|
|
401
406
|
body: await parseBody(output.body, context),
|
|
402
407
|
};
|
|
403
408
|
let response;
|
|
404
|
-
|
|
405
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
409
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
406
410
|
switch (errorCode) {
|
|
407
411
|
case "InternalServerException":
|
|
408
412
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -418,10 +422,12 @@ const deserializeAws_json1_1GetTerminologyCommandError = async (output, context)
|
|
|
418
422
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
419
423
|
default:
|
|
420
424
|
const parsedBody = parsedOutput.body;
|
|
425
|
+
const $metadata = deserializeMetadata(output);
|
|
426
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
421
427
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
422
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
428
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
423
429
|
$fault: "client",
|
|
424
|
-
$metadata
|
|
430
|
+
$metadata,
|
|
425
431
|
});
|
|
426
432
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
427
433
|
}
|
|
@@ -446,8 +452,7 @@ const deserializeAws_json1_1ImportTerminologyCommandError = async (output, conte
|
|
|
446
452
|
body: await parseBody(output.body, context),
|
|
447
453
|
};
|
|
448
454
|
let response;
|
|
449
|
-
|
|
450
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
455
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
451
456
|
switch (errorCode) {
|
|
452
457
|
case "InternalServerException":
|
|
453
458
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -463,10 +468,12 @@ const deserializeAws_json1_1ImportTerminologyCommandError = async (output, conte
|
|
|
463
468
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
464
469
|
default:
|
|
465
470
|
const parsedBody = parsedOutput.body;
|
|
471
|
+
const $metadata = deserializeMetadata(output);
|
|
472
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
466
473
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
467
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
474
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
468
475
|
$fault: "client",
|
|
469
|
-
$metadata
|
|
476
|
+
$metadata,
|
|
470
477
|
});
|
|
471
478
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
472
479
|
}
|
|
@@ -491,8 +498,7 @@ const deserializeAws_json1_1ListLanguagesCommandError = async (output, context)
|
|
|
491
498
|
body: await parseBody(output.body, context),
|
|
492
499
|
};
|
|
493
500
|
let response;
|
|
494
|
-
|
|
495
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
501
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
496
502
|
switch (errorCode) {
|
|
497
503
|
case "InternalServerException":
|
|
498
504
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -508,10 +514,12 @@ const deserializeAws_json1_1ListLanguagesCommandError = async (output, context)
|
|
|
508
514
|
throw await deserializeAws_json1_1UnsupportedDisplayLanguageCodeExceptionResponse(parsedOutput, context);
|
|
509
515
|
default:
|
|
510
516
|
const parsedBody = parsedOutput.body;
|
|
517
|
+
const $metadata = deserializeMetadata(output);
|
|
518
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
511
519
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
512
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
520
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
513
521
|
$fault: "client",
|
|
514
|
-
$metadata
|
|
522
|
+
$metadata,
|
|
515
523
|
});
|
|
516
524
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
517
525
|
}
|
|
@@ -536,8 +544,7 @@ const deserializeAws_json1_1ListParallelDataCommandError = async (output, contex
|
|
|
536
544
|
body: await parseBody(output.body, context),
|
|
537
545
|
};
|
|
538
546
|
let response;
|
|
539
|
-
|
|
540
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
547
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
541
548
|
switch (errorCode) {
|
|
542
549
|
case "InternalServerException":
|
|
543
550
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -550,10 +557,12 @@ const deserializeAws_json1_1ListParallelDataCommandError = async (output, contex
|
|
|
550
557
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
551
558
|
default:
|
|
552
559
|
const parsedBody = parsedOutput.body;
|
|
560
|
+
const $metadata = deserializeMetadata(output);
|
|
561
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
553
562
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
554
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
563
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
555
564
|
$fault: "client",
|
|
556
|
-
$metadata
|
|
565
|
+
$metadata,
|
|
557
566
|
});
|
|
558
567
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
559
568
|
}
|
|
@@ -578,8 +587,7 @@ const deserializeAws_json1_1ListTerminologiesCommandError = async (output, conte
|
|
|
578
587
|
body: await parseBody(output.body, context),
|
|
579
588
|
};
|
|
580
589
|
let response;
|
|
581
|
-
|
|
582
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
590
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
583
591
|
switch (errorCode) {
|
|
584
592
|
case "InternalServerException":
|
|
585
593
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -592,10 +600,12 @@ const deserializeAws_json1_1ListTerminologiesCommandError = async (output, conte
|
|
|
592
600
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
593
601
|
default:
|
|
594
602
|
const parsedBody = parsedOutput.body;
|
|
603
|
+
const $metadata = deserializeMetadata(output);
|
|
604
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
595
605
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
596
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
606
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
597
607
|
$fault: "client",
|
|
598
|
-
$metadata
|
|
608
|
+
$metadata,
|
|
599
609
|
});
|
|
600
610
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
601
611
|
}
|
|
@@ -620,8 +630,7 @@ const deserializeAws_json1_1ListTextTranslationJobsCommandError = async (output,
|
|
|
620
630
|
body: await parseBody(output.body, context),
|
|
621
631
|
};
|
|
622
632
|
let response;
|
|
623
|
-
|
|
624
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
633
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
625
634
|
switch (errorCode) {
|
|
626
635
|
case "InternalServerException":
|
|
627
636
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -637,10 +646,12 @@ const deserializeAws_json1_1ListTextTranslationJobsCommandError = async (output,
|
|
|
637
646
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
638
647
|
default:
|
|
639
648
|
const parsedBody = parsedOutput.body;
|
|
649
|
+
const $metadata = deserializeMetadata(output);
|
|
650
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
640
651
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
641
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
652
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
642
653
|
$fault: "client",
|
|
643
|
-
$metadata
|
|
654
|
+
$metadata,
|
|
644
655
|
});
|
|
645
656
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
646
657
|
}
|
|
@@ -665,8 +676,7 @@ const deserializeAws_json1_1StartTextTranslationJobCommandError = async (output,
|
|
|
665
676
|
body: await parseBody(output.body, context),
|
|
666
677
|
};
|
|
667
678
|
let response;
|
|
668
|
-
|
|
669
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
679
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
670
680
|
switch (errorCode) {
|
|
671
681
|
case "InternalServerException":
|
|
672
682
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -688,10 +698,12 @@ const deserializeAws_json1_1StartTextTranslationJobCommandError = async (output,
|
|
|
688
698
|
throw await deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context);
|
|
689
699
|
default:
|
|
690
700
|
const parsedBody = parsedOutput.body;
|
|
701
|
+
const $metadata = deserializeMetadata(output);
|
|
702
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
691
703
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
692
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
704
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
693
705
|
$fault: "client",
|
|
694
|
-
$metadata
|
|
706
|
+
$metadata,
|
|
695
707
|
});
|
|
696
708
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
697
709
|
}
|
|
@@ -716,8 +728,7 @@ const deserializeAws_json1_1StopTextTranslationJobCommandError = async (output,
|
|
|
716
728
|
body: await parseBody(output.body, context),
|
|
717
729
|
};
|
|
718
730
|
let response;
|
|
719
|
-
|
|
720
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
731
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
721
732
|
switch (errorCode) {
|
|
722
733
|
case "InternalServerException":
|
|
723
734
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -730,10 +741,12 @@ const deserializeAws_json1_1StopTextTranslationJobCommandError = async (output,
|
|
|
730
741
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
731
742
|
default:
|
|
732
743
|
const parsedBody = parsedOutput.body;
|
|
744
|
+
const $metadata = deserializeMetadata(output);
|
|
745
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
733
746
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
734
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
747
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
735
748
|
$fault: "client",
|
|
736
|
-
$metadata
|
|
749
|
+
$metadata,
|
|
737
750
|
});
|
|
738
751
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
739
752
|
}
|
|
@@ -758,8 +771,7 @@ const deserializeAws_json1_1TranslateTextCommandError = async (output, context)
|
|
|
758
771
|
body: await parseBody(output.body, context),
|
|
759
772
|
};
|
|
760
773
|
let response;
|
|
761
|
-
|
|
762
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
774
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
763
775
|
switch (errorCode) {
|
|
764
776
|
case "DetectedLanguageLowConfidenceException":
|
|
765
777
|
case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
|
|
@@ -787,10 +799,12 @@ const deserializeAws_json1_1TranslateTextCommandError = async (output, context)
|
|
|
787
799
|
throw await deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context);
|
|
788
800
|
default:
|
|
789
801
|
const parsedBody = parsedOutput.body;
|
|
802
|
+
const $metadata = deserializeMetadata(output);
|
|
803
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
790
804
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
791
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
805
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
792
806
|
$fault: "client",
|
|
793
|
-
$metadata
|
|
807
|
+
$metadata,
|
|
794
808
|
});
|
|
795
809
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
796
810
|
}
|
|
@@ -815,8 +829,7 @@ const deserializeAws_json1_1UpdateParallelDataCommandError = async (output, cont
|
|
|
815
829
|
body: await parseBody(output.body, context),
|
|
816
830
|
};
|
|
817
831
|
let response;
|
|
818
|
-
|
|
819
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
832
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
820
833
|
switch (errorCode) {
|
|
821
834
|
case "ConcurrentModificationException":
|
|
822
835
|
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
@@ -844,10 +857,12 @@ const deserializeAws_json1_1UpdateParallelDataCommandError = async (output, cont
|
|
|
844
857
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
845
858
|
default:
|
|
846
859
|
const parsedBody = parsedOutput.body;
|
|
860
|
+
const $metadata = deserializeMetadata(output);
|
|
861
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
847
862
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
848
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
863
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
849
864
|
$fault: "client",
|
|
850
|
-
$metadata
|
|
865
|
+
$metadata,
|
|
851
866
|
});
|
|
852
867
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
853
868
|
}
|
|
@@ -982,113 +997,105 @@ const serializeAws_json1_1CreateParallelDataRequest = (input, context) => {
|
|
|
982
997
|
var _a;
|
|
983
998
|
return {
|
|
984
999
|
ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
985
|
-
...(input.Description
|
|
986
|
-
...(input.EncryptionKey
|
|
987
|
-
input.EncryptionKey !== null && {
|
|
1000
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1001
|
+
...(input.EncryptionKey != null && {
|
|
988
1002
|
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
989
1003
|
}),
|
|
990
|
-
...(input.Name
|
|
991
|
-
...(input.ParallelDataConfig
|
|
992
|
-
input.ParallelDataConfig !== null && {
|
|
1004
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1005
|
+
...(input.ParallelDataConfig != null && {
|
|
993
1006
|
ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
|
|
994
1007
|
}),
|
|
995
1008
|
};
|
|
996
1009
|
};
|
|
997
1010
|
const serializeAws_json1_1DeleteParallelDataRequest = (input, context) => {
|
|
998
1011
|
return {
|
|
999
|
-
...(input.Name
|
|
1012
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1000
1013
|
};
|
|
1001
1014
|
};
|
|
1002
1015
|
const serializeAws_json1_1DeleteTerminologyRequest = (input, context) => {
|
|
1003
1016
|
return {
|
|
1004
|
-
...(input.Name
|
|
1017
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1005
1018
|
};
|
|
1006
1019
|
};
|
|
1007
1020
|
const serializeAws_json1_1DescribeTextTranslationJobRequest = (input, context) => {
|
|
1008
1021
|
return {
|
|
1009
|
-
...(input.JobId
|
|
1022
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1010
1023
|
};
|
|
1011
1024
|
};
|
|
1012
1025
|
const serializeAws_json1_1EncryptionKey = (input, context) => {
|
|
1013
1026
|
return {
|
|
1014
|
-
...(input.Id
|
|
1015
|
-
...(input.Type
|
|
1027
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1028
|
+
...(input.Type != null && { Type: input.Type }),
|
|
1016
1029
|
};
|
|
1017
1030
|
};
|
|
1018
1031
|
const serializeAws_json1_1GetParallelDataRequest = (input, context) => {
|
|
1019
1032
|
return {
|
|
1020
|
-
...(input.Name
|
|
1033
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1021
1034
|
};
|
|
1022
1035
|
};
|
|
1023
1036
|
const serializeAws_json1_1GetTerminologyRequest = (input, context) => {
|
|
1024
1037
|
return {
|
|
1025
|
-
...(input.Name
|
|
1026
|
-
...(input.TerminologyDataFormat
|
|
1027
|
-
input.TerminologyDataFormat !== null && { TerminologyDataFormat: input.TerminologyDataFormat }),
|
|
1038
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1039
|
+
...(input.TerminologyDataFormat != null && { TerminologyDataFormat: input.TerminologyDataFormat }),
|
|
1028
1040
|
};
|
|
1029
1041
|
};
|
|
1030
1042
|
const serializeAws_json1_1ImportTerminologyRequest = (input, context) => {
|
|
1031
1043
|
return {
|
|
1032
|
-
...(input.Description
|
|
1033
|
-
...(input.EncryptionKey
|
|
1034
|
-
input.EncryptionKey !== null && {
|
|
1044
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1045
|
+
...(input.EncryptionKey != null && {
|
|
1035
1046
|
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
1036
1047
|
}),
|
|
1037
|
-
...(input.MergeStrategy
|
|
1038
|
-
...(input.Name
|
|
1039
|
-
...(input.TerminologyData
|
|
1040
|
-
input.TerminologyData !== null && {
|
|
1048
|
+
...(input.MergeStrategy != null && { MergeStrategy: input.MergeStrategy }),
|
|
1049
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1050
|
+
...(input.TerminologyData != null && {
|
|
1041
1051
|
TerminologyData: serializeAws_json1_1TerminologyData(input.TerminologyData, context),
|
|
1042
1052
|
}),
|
|
1043
1053
|
};
|
|
1044
1054
|
};
|
|
1045
1055
|
const serializeAws_json1_1InputDataConfig = (input, context) => {
|
|
1046
1056
|
return {
|
|
1047
|
-
...(input.ContentType
|
|
1048
|
-
...(input.S3Uri
|
|
1057
|
+
...(input.ContentType != null && { ContentType: input.ContentType }),
|
|
1058
|
+
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1049
1059
|
};
|
|
1050
1060
|
};
|
|
1051
1061
|
const serializeAws_json1_1ListLanguagesRequest = (input, context) => {
|
|
1052
1062
|
return {
|
|
1053
|
-
...(input.DisplayLanguageCode
|
|
1054
|
-
|
|
1055
|
-
...(input.
|
|
1056
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1063
|
+
...(input.DisplayLanguageCode != null && { DisplayLanguageCode: input.DisplayLanguageCode }),
|
|
1064
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1065
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1057
1066
|
};
|
|
1058
1067
|
};
|
|
1059
1068
|
const serializeAws_json1_1ListParallelDataRequest = (input, context) => {
|
|
1060
1069
|
return {
|
|
1061
|
-
...(input.MaxResults
|
|
1062
|
-
...(input.NextToken
|
|
1070
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1071
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1063
1072
|
};
|
|
1064
1073
|
};
|
|
1065
1074
|
const serializeAws_json1_1ListTerminologiesRequest = (input, context) => {
|
|
1066
1075
|
return {
|
|
1067
|
-
...(input.MaxResults
|
|
1068
|
-
...(input.NextToken
|
|
1076
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1077
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1069
1078
|
};
|
|
1070
1079
|
};
|
|
1071
1080
|
const serializeAws_json1_1ListTextTranslationJobsRequest = (input, context) => {
|
|
1072
1081
|
return {
|
|
1073
|
-
...(input.Filter
|
|
1074
|
-
|
|
1075
|
-
...(input.
|
|
1076
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1082
|
+
...(input.Filter != null && { Filter: serializeAws_json1_1TextTranslationJobFilter(input.Filter, context) }),
|
|
1083
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1084
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1077
1085
|
};
|
|
1078
1086
|
};
|
|
1079
1087
|
const serializeAws_json1_1OutputDataConfig = (input, context) => {
|
|
1080
1088
|
return {
|
|
1081
|
-
...(input.EncryptionKey
|
|
1082
|
-
input.EncryptionKey !== null && {
|
|
1089
|
+
...(input.EncryptionKey != null && {
|
|
1083
1090
|
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
1084
1091
|
}),
|
|
1085
|
-
...(input.S3Uri
|
|
1092
|
+
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1086
1093
|
};
|
|
1087
1094
|
};
|
|
1088
1095
|
const serializeAws_json1_1ParallelDataConfig = (input, context) => {
|
|
1089
1096
|
return {
|
|
1090
|
-
...(input.Format
|
|
1091
|
-
...(input.S3Uri
|
|
1097
|
+
...(input.Format != null && { Format: input.Format }),
|
|
1098
|
+
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1092
1099
|
};
|
|
1093
1100
|
};
|
|
1094
1101
|
const serializeAws_json1_1ResourceNameList = (input, context) => {
|
|
@@ -1105,38 +1112,30 @@ const serializeAws_json1_1StartTextTranslationJobRequest = (input, context) => {
|
|
|
1105
1112
|
var _a;
|
|
1106
1113
|
return {
|
|
1107
1114
|
ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
1108
|
-
...(input.DataAccessRoleArn
|
|
1109
|
-
|
|
1110
|
-
...(input.InputDataConfig !== undefined &&
|
|
1111
|
-
input.InputDataConfig !== null && {
|
|
1115
|
+
...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
|
|
1116
|
+
...(input.InputDataConfig != null && {
|
|
1112
1117
|
InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
|
|
1113
1118
|
}),
|
|
1114
|
-
...(input.JobName
|
|
1115
|
-
...(input.OutputDataConfig
|
|
1116
|
-
input.OutputDataConfig !== null && {
|
|
1119
|
+
...(input.JobName != null && { JobName: input.JobName }),
|
|
1120
|
+
...(input.OutputDataConfig != null && {
|
|
1117
1121
|
OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
|
|
1118
1122
|
}),
|
|
1119
|
-
...(input.ParallelDataNames
|
|
1120
|
-
input.ParallelDataNames !== null && {
|
|
1123
|
+
...(input.ParallelDataNames != null && {
|
|
1121
1124
|
ParallelDataNames: serializeAws_json1_1ResourceNameList(input.ParallelDataNames, context),
|
|
1122
1125
|
}),
|
|
1123
|
-
...(input.Settings
|
|
1124
|
-
|
|
1125
|
-
...(input.
|
|
1126
|
-
input.SourceLanguageCode !== null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1127
|
-
...(input.TargetLanguageCodes !== undefined &&
|
|
1128
|
-
input.TargetLanguageCodes !== null && {
|
|
1126
|
+
...(input.Settings != null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) }),
|
|
1127
|
+
...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1128
|
+
...(input.TargetLanguageCodes != null && {
|
|
1129
1129
|
TargetLanguageCodes: serializeAws_json1_1TargetLanguageCodeStringList(input.TargetLanguageCodes, context),
|
|
1130
1130
|
}),
|
|
1131
|
-
...(input.TerminologyNames
|
|
1132
|
-
input.TerminologyNames !== null && {
|
|
1131
|
+
...(input.TerminologyNames != null && {
|
|
1133
1132
|
TerminologyNames: serializeAws_json1_1ResourceNameList(input.TerminologyNames, context),
|
|
1134
1133
|
}),
|
|
1135
1134
|
};
|
|
1136
1135
|
};
|
|
1137
1136
|
const serializeAws_json1_1StopTextTranslationJobRequest = (input, context) => {
|
|
1138
1137
|
return {
|
|
1139
|
-
...(input.JobId
|
|
1138
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1140
1139
|
};
|
|
1141
1140
|
};
|
|
1142
1141
|
const serializeAws_json1_1TargetLanguageCodeStringList = (input, context) => {
|
|
@@ -1151,55 +1150,47 @@ const serializeAws_json1_1TargetLanguageCodeStringList = (input, context) => {
|
|
|
1151
1150
|
};
|
|
1152
1151
|
const serializeAws_json1_1TerminologyData = (input, context) => {
|
|
1153
1152
|
return {
|
|
1154
|
-
...(input.Directionality
|
|
1155
|
-
|
|
1156
|
-
...(input.
|
|
1157
|
-
...(input.Format !== undefined && input.Format !== null && { Format: input.Format }),
|
|
1153
|
+
...(input.Directionality != null && { Directionality: input.Directionality }),
|
|
1154
|
+
...(input.File != null && { File: context.base64Encoder(input.File) }),
|
|
1155
|
+
...(input.Format != null && { Format: input.Format }),
|
|
1158
1156
|
};
|
|
1159
1157
|
};
|
|
1160
1158
|
const serializeAws_json1_1TextTranslationJobFilter = (input, context) => {
|
|
1161
1159
|
return {
|
|
1162
|
-
...(input.JobName
|
|
1163
|
-
...(input.JobStatus
|
|
1164
|
-
...(input.SubmittedAfterTime
|
|
1165
|
-
input.SubmittedAfterTime !== null && {
|
|
1160
|
+
...(input.JobName != null && { JobName: input.JobName }),
|
|
1161
|
+
...(input.JobStatus != null && { JobStatus: input.JobStatus }),
|
|
1162
|
+
...(input.SubmittedAfterTime != null && {
|
|
1166
1163
|
SubmittedAfterTime: Math.round(input.SubmittedAfterTime.getTime() / 1000),
|
|
1167
1164
|
}),
|
|
1168
|
-
...(input.SubmittedBeforeTime
|
|
1169
|
-
input.SubmittedBeforeTime !== null && {
|
|
1165
|
+
...(input.SubmittedBeforeTime != null && {
|
|
1170
1166
|
SubmittedBeforeTime: Math.round(input.SubmittedBeforeTime.getTime() / 1000),
|
|
1171
1167
|
}),
|
|
1172
1168
|
};
|
|
1173
1169
|
};
|
|
1174
1170
|
const serializeAws_json1_1TranslateTextRequest = (input, context) => {
|
|
1175
1171
|
return {
|
|
1176
|
-
...(input.Settings
|
|
1177
|
-
|
|
1178
|
-
...(input.
|
|
1179
|
-
|
|
1180
|
-
...(input.TargetLanguageCode !== undefined &&
|
|
1181
|
-
input.TargetLanguageCode !== null && { TargetLanguageCode: input.TargetLanguageCode }),
|
|
1182
|
-
...(input.TerminologyNames !== undefined &&
|
|
1183
|
-
input.TerminologyNames !== null && {
|
|
1172
|
+
...(input.Settings != null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) }),
|
|
1173
|
+
...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1174
|
+
...(input.TargetLanguageCode != null && { TargetLanguageCode: input.TargetLanguageCode }),
|
|
1175
|
+
...(input.TerminologyNames != null && {
|
|
1184
1176
|
TerminologyNames: serializeAws_json1_1ResourceNameList(input.TerminologyNames, context),
|
|
1185
1177
|
}),
|
|
1186
|
-
...(input.Text
|
|
1178
|
+
...(input.Text != null && { Text: input.Text }),
|
|
1187
1179
|
};
|
|
1188
1180
|
};
|
|
1189
1181
|
const serializeAws_json1_1TranslationSettings = (input, context) => {
|
|
1190
1182
|
return {
|
|
1191
|
-
...(input.Formality
|
|
1192
|
-
...(input.Profanity
|
|
1183
|
+
...(input.Formality != null && { Formality: input.Formality }),
|
|
1184
|
+
...(input.Profanity != null && { Profanity: input.Profanity }),
|
|
1193
1185
|
};
|
|
1194
1186
|
};
|
|
1195
1187
|
const serializeAws_json1_1UpdateParallelDataRequest = (input, context) => {
|
|
1196
1188
|
var _a;
|
|
1197
1189
|
return {
|
|
1198
1190
|
ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
1199
|
-
...(input.Description
|
|
1200
|
-
...(input.Name
|
|
1201
|
-
...(input.ParallelDataConfig
|
|
1202
|
-
input.ParallelDataConfig !== null && {
|
|
1191
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1192
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1193
|
+
...(input.ParallelDataConfig != null && {
|
|
1203
1194
|
ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
|
|
1204
1195
|
}),
|
|
1205
1196
|
};
|
|
@@ -1207,9 +1198,7 @@ const serializeAws_json1_1UpdateParallelDataRequest = (input, context) => {
|
|
|
1207
1198
|
const deserializeAws_json1_1AppliedTerminology = (output, context) => {
|
|
1208
1199
|
return {
|
|
1209
1200
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1210
|
-
Terms: output.Terms
|
|
1211
|
-
? deserializeAws_json1_1TermList(output.Terms, context)
|
|
1212
|
-
: undefined,
|
|
1201
|
+
Terms: output.Terms != null ? deserializeAws_json1_1TermList(output.Terms, context) : undefined,
|
|
1213
1202
|
};
|
|
1214
1203
|
};
|
|
1215
1204
|
const deserializeAws_json1_1AppliedTerminologyList = (output, context) => {
|
|
@@ -1247,7 +1236,7 @@ const deserializeAws_json1_1DeleteParallelDataResponse = (output, context) => {
|
|
|
1247
1236
|
};
|
|
1248
1237
|
const deserializeAws_json1_1DescribeTextTranslationJobResponse = (output, context) => {
|
|
1249
1238
|
return {
|
|
1250
|
-
TextTranslationJobProperties: output.TextTranslationJobProperties
|
|
1239
|
+
TextTranslationJobProperties: output.TextTranslationJobProperties != null
|
|
1251
1240
|
? deserializeAws_json1_1TextTranslationJobProperties(output.TextTranslationJobProperties, context)
|
|
1252
1241
|
: undefined,
|
|
1253
1242
|
};
|
|
@@ -1266,40 +1255,39 @@ const deserializeAws_json1_1EncryptionKey = (output, context) => {
|
|
|
1266
1255
|
};
|
|
1267
1256
|
const deserializeAws_json1_1GetParallelDataResponse = (output, context) => {
|
|
1268
1257
|
return {
|
|
1269
|
-
AuxiliaryDataLocation: output.AuxiliaryDataLocation
|
|
1258
|
+
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1270
1259
|
? deserializeAws_json1_1ParallelDataDataLocation(output.AuxiliaryDataLocation, context)
|
|
1271
1260
|
: undefined,
|
|
1272
|
-
DataLocation: output.DataLocation
|
|
1261
|
+
DataLocation: output.DataLocation != null
|
|
1273
1262
|
? deserializeAws_json1_1ParallelDataDataLocation(output.DataLocation, context)
|
|
1274
1263
|
: undefined,
|
|
1275
|
-
LatestUpdateAttemptAuxiliaryDataLocation: output.LatestUpdateAttemptAuxiliaryDataLocation
|
|
1276
|
-
output.LatestUpdateAttemptAuxiliaryDataLocation !== null
|
|
1264
|
+
LatestUpdateAttemptAuxiliaryDataLocation: output.LatestUpdateAttemptAuxiliaryDataLocation != null
|
|
1277
1265
|
? deserializeAws_json1_1ParallelDataDataLocation(output.LatestUpdateAttemptAuxiliaryDataLocation, context)
|
|
1278
1266
|
: undefined,
|
|
1279
|
-
ParallelDataProperties: output.ParallelDataProperties
|
|
1267
|
+
ParallelDataProperties: output.ParallelDataProperties != null
|
|
1280
1268
|
? deserializeAws_json1_1ParallelDataProperties(output.ParallelDataProperties, context)
|
|
1281
1269
|
: undefined,
|
|
1282
1270
|
};
|
|
1283
1271
|
};
|
|
1284
1272
|
const deserializeAws_json1_1GetTerminologyResponse = (output, context) => {
|
|
1285
1273
|
return {
|
|
1286
|
-
AuxiliaryDataLocation: output.AuxiliaryDataLocation
|
|
1274
|
+
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1287
1275
|
? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
1288
1276
|
: undefined,
|
|
1289
|
-
TerminologyDataLocation: output.TerminologyDataLocation
|
|
1277
|
+
TerminologyDataLocation: output.TerminologyDataLocation != null
|
|
1290
1278
|
? deserializeAws_json1_1TerminologyDataLocation(output.TerminologyDataLocation, context)
|
|
1291
1279
|
: undefined,
|
|
1292
|
-
TerminologyProperties: output.TerminologyProperties
|
|
1280
|
+
TerminologyProperties: output.TerminologyProperties != null
|
|
1293
1281
|
? deserializeAws_json1_1TerminologyProperties(output.TerminologyProperties, context)
|
|
1294
1282
|
: undefined,
|
|
1295
1283
|
};
|
|
1296
1284
|
};
|
|
1297
1285
|
const deserializeAws_json1_1ImportTerminologyResponse = (output, context) => {
|
|
1298
1286
|
return {
|
|
1299
|
-
AuxiliaryDataLocation: output.AuxiliaryDataLocation
|
|
1287
|
+
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1300
1288
|
? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
1301
1289
|
: undefined,
|
|
1302
|
-
TerminologyProperties: output.TerminologyProperties
|
|
1290
|
+
TerminologyProperties: output.TerminologyProperties != null
|
|
1303
1291
|
? deserializeAws_json1_1TerminologyProperties(output.TerminologyProperties, context)
|
|
1304
1292
|
: undefined,
|
|
1305
1293
|
};
|
|
@@ -1373,16 +1361,14 @@ const deserializeAws_json1_1LimitExceededException = (output, context) => {
|
|
|
1373
1361
|
const deserializeAws_json1_1ListLanguagesResponse = (output, context) => {
|
|
1374
1362
|
return {
|
|
1375
1363
|
DisplayLanguageCode: (0, smithy_client_1.expectString)(output.DisplayLanguageCode),
|
|
1376
|
-
Languages: output.Languages
|
|
1377
|
-
? deserializeAws_json1_1LanguagesList(output.Languages, context)
|
|
1378
|
-
: undefined,
|
|
1364
|
+
Languages: output.Languages != null ? deserializeAws_json1_1LanguagesList(output.Languages, context) : undefined,
|
|
1379
1365
|
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1380
1366
|
};
|
|
1381
1367
|
};
|
|
1382
1368
|
const deserializeAws_json1_1ListParallelDataResponse = (output, context) => {
|
|
1383
1369
|
return {
|
|
1384
1370
|
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1385
|
-
ParallelDataPropertiesList: output.ParallelDataPropertiesList
|
|
1371
|
+
ParallelDataPropertiesList: output.ParallelDataPropertiesList != null
|
|
1386
1372
|
? deserializeAws_json1_1ParallelDataPropertiesList(output.ParallelDataPropertiesList, context)
|
|
1387
1373
|
: undefined,
|
|
1388
1374
|
};
|
|
@@ -1390,7 +1376,7 @@ const deserializeAws_json1_1ListParallelDataResponse = (output, context) => {
|
|
|
1390
1376
|
const deserializeAws_json1_1ListTerminologiesResponse = (output, context) => {
|
|
1391
1377
|
return {
|
|
1392
1378
|
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1393
|
-
TerminologyPropertiesList: output.TerminologyPropertiesList
|
|
1379
|
+
TerminologyPropertiesList: output.TerminologyPropertiesList != null
|
|
1394
1380
|
? deserializeAws_json1_1TerminologyPropertiesList(output.TerminologyPropertiesList, context)
|
|
1395
1381
|
: undefined,
|
|
1396
1382
|
};
|
|
@@ -1398,16 +1384,14 @@ const deserializeAws_json1_1ListTerminologiesResponse = (output, context) => {
|
|
|
1398
1384
|
const deserializeAws_json1_1ListTextTranslationJobsResponse = (output, context) => {
|
|
1399
1385
|
return {
|
|
1400
1386
|
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1401
|
-
TextTranslationJobPropertiesList: output.TextTranslationJobPropertiesList
|
|
1387
|
+
TextTranslationJobPropertiesList: output.TextTranslationJobPropertiesList != null
|
|
1402
1388
|
? deserializeAws_json1_1TextTranslationJobPropertiesList(output.TextTranslationJobPropertiesList, context)
|
|
1403
1389
|
: undefined,
|
|
1404
1390
|
};
|
|
1405
1391
|
};
|
|
1406
1392
|
const deserializeAws_json1_1OutputDataConfig = (output, context) => {
|
|
1407
1393
|
return {
|
|
1408
|
-
EncryptionKey: output.EncryptionKey
|
|
1409
|
-
? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
|
|
1410
|
-
: undefined,
|
|
1394
|
+
EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
|
|
1411
1395
|
S3Uri: (0, smithy_client_1.expectString)(output.S3Uri),
|
|
1412
1396
|
};
|
|
1413
1397
|
};
|
|
@@ -1426,32 +1410,28 @@ const deserializeAws_json1_1ParallelDataDataLocation = (output, context) => {
|
|
|
1426
1410
|
const deserializeAws_json1_1ParallelDataProperties = (output, context) => {
|
|
1427
1411
|
return {
|
|
1428
1412
|
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1429
|
-
CreatedAt: output.CreatedAt
|
|
1430
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
|
|
1431
|
-
: undefined,
|
|
1413
|
+
CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
|
|
1432
1414
|
Description: (0, smithy_client_1.expectString)(output.Description),
|
|
1433
|
-
EncryptionKey: output.EncryptionKey
|
|
1434
|
-
? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
|
|
1435
|
-
: undefined,
|
|
1415
|
+
EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
|
|
1436
1416
|
FailedRecordCount: (0, smithy_client_1.expectLong)(output.FailedRecordCount),
|
|
1437
1417
|
ImportedDataSize: (0, smithy_client_1.expectLong)(output.ImportedDataSize),
|
|
1438
1418
|
ImportedRecordCount: (0, smithy_client_1.expectLong)(output.ImportedRecordCount),
|
|
1439
|
-
LastUpdatedAt: output.LastUpdatedAt
|
|
1419
|
+
LastUpdatedAt: output.LastUpdatedAt != null
|
|
1440
1420
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
|
|
1441
1421
|
: undefined,
|
|
1442
|
-
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt
|
|
1422
|
+
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
|
|
1443
1423
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LatestUpdateAttemptAt)))
|
|
1444
1424
|
: undefined,
|
|
1445
1425
|
LatestUpdateAttemptStatus: (0, smithy_client_1.expectString)(output.LatestUpdateAttemptStatus),
|
|
1446
1426
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1447
1427
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1448
|
-
ParallelDataConfig: output.ParallelDataConfig
|
|
1428
|
+
ParallelDataConfig: output.ParallelDataConfig != null
|
|
1449
1429
|
? deserializeAws_json1_1ParallelDataConfig(output.ParallelDataConfig, context)
|
|
1450
1430
|
: undefined,
|
|
1451
1431
|
SkippedRecordCount: (0, smithy_client_1.expectLong)(output.SkippedRecordCount),
|
|
1452
1432
|
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
1453
1433
|
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1454
|
-
TargetLanguageCodes: output.TargetLanguageCodes
|
|
1434
|
+
TargetLanguageCodes: output.TargetLanguageCodes != null
|
|
1455
1435
|
? deserializeAws_json1_1LanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
1456
1436
|
: undefined,
|
|
1457
1437
|
};
|
|
@@ -1526,16 +1506,12 @@ const deserializeAws_json1_1TerminologyDataLocation = (output, context) => {
|
|
|
1526
1506
|
const deserializeAws_json1_1TerminologyProperties = (output, context) => {
|
|
1527
1507
|
return {
|
|
1528
1508
|
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1529
|
-
CreatedAt: output.CreatedAt
|
|
1530
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
|
|
1531
|
-
: undefined,
|
|
1509
|
+
CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
|
|
1532
1510
|
Description: (0, smithy_client_1.expectString)(output.Description),
|
|
1533
1511
|
Directionality: (0, smithy_client_1.expectString)(output.Directionality),
|
|
1534
|
-
EncryptionKey: output.EncryptionKey
|
|
1535
|
-
? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
|
|
1536
|
-
: undefined,
|
|
1512
|
+
EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
|
|
1537
1513
|
Format: (0, smithy_client_1.expectString)(output.Format),
|
|
1538
|
-
LastUpdatedAt: output.LastUpdatedAt
|
|
1514
|
+
LastUpdatedAt: output.LastUpdatedAt != null
|
|
1539
1515
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
|
|
1540
1516
|
: undefined,
|
|
1541
1517
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
@@ -1543,7 +1519,7 @@ const deserializeAws_json1_1TerminologyProperties = (output, context) => {
|
|
|
1543
1519
|
SizeBytes: (0, smithy_client_1.expectInt32)(output.SizeBytes),
|
|
1544
1520
|
SkippedTermCount: (0, smithy_client_1.expectInt32)(output.SkippedTermCount),
|
|
1545
1521
|
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
1546
|
-
TargetLanguageCodes: output.TargetLanguageCodes
|
|
1522
|
+
TargetLanguageCodes: output.TargetLanguageCodes != null
|
|
1547
1523
|
? deserializeAws_json1_1LanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
1548
1524
|
: undefined,
|
|
1549
1525
|
TermCount: (0, smithy_client_1.expectInt32)(output.TermCount),
|
|
@@ -1579,36 +1555,30 @@ const deserializeAws_json1_1TextSizeLimitExceededException = (output, context) =
|
|
|
1579
1555
|
const deserializeAws_json1_1TextTranslationJobProperties = (output, context) => {
|
|
1580
1556
|
return {
|
|
1581
1557
|
DataAccessRoleArn: (0, smithy_client_1.expectString)(output.DataAccessRoleArn),
|
|
1582
|
-
EndTime: output.EndTime
|
|
1583
|
-
|
|
1584
|
-
: undefined,
|
|
1585
|
-
InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
|
|
1558
|
+
EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
|
|
1559
|
+
InputDataConfig: output.InputDataConfig != null
|
|
1586
1560
|
? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
|
|
1587
1561
|
: undefined,
|
|
1588
|
-
JobDetails: output.JobDetails
|
|
1589
|
-
? deserializeAws_json1_1JobDetails(output.JobDetails, context)
|
|
1590
|
-
: undefined,
|
|
1562
|
+
JobDetails: output.JobDetails != null ? deserializeAws_json1_1JobDetails(output.JobDetails, context) : undefined,
|
|
1591
1563
|
JobId: (0, smithy_client_1.expectString)(output.JobId),
|
|
1592
1564
|
JobName: (0, smithy_client_1.expectString)(output.JobName),
|
|
1593
1565
|
JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
|
|
1594
1566
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1595
|
-
OutputDataConfig: output.OutputDataConfig
|
|
1567
|
+
OutputDataConfig: output.OutputDataConfig != null
|
|
1596
1568
|
? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
|
|
1597
1569
|
: undefined,
|
|
1598
|
-
ParallelDataNames: output.ParallelDataNames
|
|
1570
|
+
ParallelDataNames: output.ParallelDataNames != null
|
|
1599
1571
|
? deserializeAws_json1_1ResourceNameList(output.ParallelDataNames, context)
|
|
1600
1572
|
: undefined,
|
|
1601
|
-
Settings: output.Settings
|
|
1602
|
-
? deserializeAws_json1_1TranslationSettings(output.Settings, context)
|
|
1603
|
-
: undefined,
|
|
1573
|
+
Settings: output.Settings != null ? deserializeAws_json1_1TranslationSettings(output.Settings, context) : undefined,
|
|
1604
1574
|
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
1605
|
-
SubmittedTime: output.SubmittedTime
|
|
1575
|
+
SubmittedTime: output.SubmittedTime != null
|
|
1606
1576
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.SubmittedTime)))
|
|
1607
1577
|
: undefined,
|
|
1608
|
-
TargetLanguageCodes: output.TargetLanguageCodes
|
|
1578
|
+
TargetLanguageCodes: output.TargetLanguageCodes != null
|
|
1609
1579
|
? deserializeAws_json1_1TargetLanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
1610
1580
|
: undefined,
|
|
1611
|
-
TerminologyNames: output.TerminologyNames
|
|
1581
|
+
TerminologyNames: output.TerminologyNames != null
|
|
1612
1582
|
? deserializeAws_json1_1ResourceNameList(output.TerminologyNames, context)
|
|
1613
1583
|
: undefined,
|
|
1614
1584
|
};
|
|
@@ -1631,10 +1601,10 @@ const deserializeAws_json1_1TooManyRequestsException = (output, context) => {
|
|
|
1631
1601
|
};
|
|
1632
1602
|
const deserializeAws_json1_1TranslateTextResponse = (output, context) => {
|
|
1633
1603
|
return {
|
|
1634
|
-
AppliedSettings: output.AppliedSettings
|
|
1604
|
+
AppliedSettings: output.AppliedSettings != null
|
|
1635
1605
|
? deserializeAws_json1_1TranslationSettings(output.AppliedSettings, context)
|
|
1636
1606
|
: undefined,
|
|
1637
|
-
AppliedTerminologies: output.AppliedTerminologies
|
|
1607
|
+
AppliedTerminologies: output.AppliedTerminologies != null
|
|
1638
1608
|
? deserializeAws_json1_1AppliedTerminologyList(output.AppliedTerminologies, context)
|
|
1639
1609
|
: undefined,
|
|
1640
1610
|
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
@@ -1663,7 +1633,7 @@ const deserializeAws_json1_1UnsupportedLanguagePairException = (output, context)
|
|
|
1663
1633
|
};
|
|
1664
1634
|
const deserializeAws_json1_1UpdateParallelDataResponse = (output, context) => {
|
|
1665
1635
|
return {
|
|
1666
|
-
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt
|
|
1636
|
+
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
|
|
1667
1637
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LatestUpdateAttemptAt)))
|
|
1668
1638
|
: undefined,
|
|
1669
1639
|
LatestUpdateAttemptStatus: (0, smithy_client_1.expectString)(output.LatestUpdateAttemptStatus),
|
|
@@ -1733,5 +1703,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1733
1703
|
if (data["__type"] !== undefined) {
|
|
1734
1704
|
return sanitizeErrorCode(data["__type"]);
|
|
1735
1705
|
}
|
|
1736
|
-
return "";
|
|
1737
1706
|
};
|