@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.
@@ -188,7 +188,7 @@ export var deserializeAws_json1_1CreateParallelDataCommand = function (output, c
188
188
  });
189
189
  }); };
190
190
  var deserializeAws_json1_1CreateParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
191
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
191
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
192
192
  var _c;
193
193
  return __generator(this, function (_d) {
194
194
  switch (_d.label) {
@@ -198,7 +198,6 @@ var deserializeAws_json1_1CreateParallelDataCommandError = function (output, con
198
198
  return [4, parseBody(output.body, context)];
199
199
  case 1:
200
200
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
201
- errorCode = "UnknownError";
202
201
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
203
202
  _b = errorCode;
204
203
  switch (_b) {
@@ -230,10 +229,12 @@ var deserializeAws_json1_1CreateParallelDataCommandError = function (output, con
230
229
  case 13: throw _d.sent();
231
230
  case 14:
232
231
  parsedBody = parsedOutput.body;
232
+ $metadata = deserializeMetadata(output);
233
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
233
234
  response = new __BaseException({
234
- name: parsedBody.code || parsedBody.Code || errorCode,
235
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
235
236
  $fault: "client",
236
- $metadata: deserializeMetadata(output),
237
+ $metadata: $metadata,
237
238
  });
238
239
  throw __decorateServiceException(response, parsedBody);
239
240
  }
@@ -258,7 +259,7 @@ export var deserializeAws_json1_1DeleteParallelDataCommand = function (output, c
258
259
  });
259
260
  }); };
260
261
  var deserializeAws_json1_1DeleteParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
261
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
262
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
262
263
  var _c;
263
264
  return __generator(this, function (_d) {
264
265
  switch (_d.label) {
@@ -268,7 +269,6 @@ var deserializeAws_json1_1DeleteParallelDataCommandError = function (output, con
268
269
  return [4, parseBody(output.body, context)];
269
270
  case 1:
270
271
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
271
- errorCode = "UnknownError";
272
272
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
273
273
  _b = errorCode;
274
274
  switch (_b) {
@@ -292,10 +292,12 @@ var deserializeAws_json1_1DeleteParallelDataCommandError = function (output, con
292
292
  case 9: throw _d.sent();
293
293
  case 10:
294
294
  parsedBody = parsedOutput.body;
295
+ $metadata = deserializeMetadata(output);
296
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
295
297
  response = new __BaseException({
296
- name: parsedBody.code || parsedBody.Code || errorCode,
298
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
297
299
  $fault: "client",
298
- $metadata: deserializeMetadata(output),
300
+ $metadata: $metadata,
299
301
  });
300
302
  throw __decorateServiceException(response, parsedBody);
301
303
  }
@@ -320,7 +322,7 @@ export var deserializeAws_json1_1DeleteTerminologyCommand = function (output, co
320
322
  });
321
323
  }); };
322
324
  var deserializeAws_json1_1DeleteTerminologyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
323
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
325
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
324
326
  var _c;
325
327
  return __generator(this, function (_d) {
326
328
  switch (_d.label) {
@@ -330,7 +332,6 @@ var deserializeAws_json1_1DeleteTerminologyCommandError = function (output, cont
330
332
  return [4, parseBody(output.body, context)];
331
333
  case 1:
332
334
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
333
- errorCode = "UnknownError";
334
335
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
335
336
  _b = errorCode;
336
337
  switch (_b) {
@@ -354,10 +355,12 @@ var deserializeAws_json1_1DeleteTerminologyCommandError = function (output, cont
354
355
  case 9: throw _d.sent();
355
356
  case 10:
356
357
  parsedBody = parsedOutput.body;
358
+ $metadata = deserializeMetadata(output);
359
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
357
360
  response = new __BaseException({
358
- name: parsedBody.code || parsedBody.Code || errorCode,
361
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
359
362
  $fault: "client",
360
- $metadata: deserializeMetadata(output),
363
+ $metadata: $metadata,
361
364
  });
362
365
  throw __decorateServiceException(response, parsedBody);
363
366
  }
@@ -382,7 +385,7 @@ export var deserializeAws_json1_1DescribeTextTranslationJobCommand = function (o
382
385
  });
383
386
  }); };
384
387
  var deserializeAws_json1_1DescribeTextTranslationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
385
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
388
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
386
389
  var _c;
387
390
  return __generator(this, function (_d) {
388
391
  switch (_d.label) {
@@ -392,7 +395,6 @@ var deserializeAws_json1_1DescribeTextTranslationJobCommandError = function (out
392
395
  return [4, parseBody(output.body, context)];
393
396
  case 1:
394
397
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
395
- errorCode = "UnknownError";
396
398
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
397
399
  _b = errorCode;
398
400
  switch (_b) {
@@ -412,10 +414,12 @@ var deserializeAws_json1_1DescribeTextTranslationJobCommandError = function (out
412
414
  case 7: throw _d.sent();
413
415
  case 8:
414
416
  parsedBody = parsedOutput.body;
417
+ $metadata = deserializeMetadata(output);
418
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
415
419
  response = new __BaseException({
416
- name: parsedBody.code || parsedBody.Code || errorCode,
420
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
417
421
  $fault: "client",
418
- $metadata: deserializeMetadata(output),
422
+ $metadata: $metadata,
419
423
  });
420
424
  throw __decorateServiceException(response, parsedBody);
421
425
  }
@@ -440,7 +444,7 @@ export var deserializeAws_json1_1GetParallelDataCommand = function (output, cont
440
444
  });
441
445
  }); };
442
446
  var deserializeAws_json1_1GetParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
443
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
447
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
444
448
  var _c;
445
449
  return __generator(this, function (_d) {
446
450
  switch (_d.label) {
@@ -450,7 +454,6 @@ var deserializeAws_json1_1GetParallelDataCommandError = function (output, contex
450
454
  return [4, parseBody(output.body, context)];
451
455
  case 1:
452
456
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
453
- errorCode = "UnknownError";
454
457
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
455
458
  _b = errorCode;
456
459
  switch (_b) {
@@ -474,10 +477,12 @@ var deserializeAws_json1_1GetParallelDataCommandError = function (output, contex
474
477
  case 9: throw _d.sent();
475
478
  case 10:
476
479
  parsedBody = parsedOutput.body;
480
+ $metadata = deserializeMetadata(output);
481
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
477
482
  response = new __BaseException({
478
- name: parsedBody.code || parsedBody.Code || errorCode,
483
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
479
484
  $fault: "client",
480
- $metadata: deserializeMetadata(output),
485
+ $metadata: $metadata,
481
486
  });
482
487
  throw __decorateServiceException(response, parsedBody);
483
488
  }
@@ -502,7 +507,7 @@ export var deserializeAws_json1_1GetTerminologyCommand = function (output, conte
502
507
  });
503
508
  }); };
504
509
  var deserializeAws_json1_1GetTerminologyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
505
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
510
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
506
511
  var _c;
507
512
  return __generator(this, function (_d) {
508
513
  switch (_d.label) {
@@ -512,7 +517,6 @@ var deserializeAws_json1_1GetTerminologyCommandError = function (output, context
512
517
  return [4, parseBody(output.body, context)];
513
518
  case 1:
514
519
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
515
- errorCode = "UnknownError";
516
520
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
517
521
  _b = errorCode;
518
522
  switch (_b) {
@@ -536,10 +540,12 @@ var deserializeAws_json1_1GetTerminologyCommandError = function (output, context
536
540
  case 9: throw _d.sent();
537
541
  case 10:
538
542
  parsedBody = parsedOutput.body;
543
+ $metadata = deserializeMetadata(output);
544
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
539
545
  response = new __BaseException({
540
- name: parsedBody.code || parsedBody.Code || errorCode,
546
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
541
547
  $fault: "client",
542
- $metadata: deserializeMetadata(output),
548
+ $metadata: $metadata,
543
549
  });
544
550
  throw __decorateServiceException(response, parsedBody);
545
551
  }
@@ -564,7 +570,7 @@ export var deserializeAws_json1_1ImportTerminologyCommand = function (output, co
564
570
  });
565
571
  }); };
566
572
  var deserializeAws_json1_1ImportTerminologyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
567
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
573
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
568
574
  var _c;
569
575
  return __generator(this, function (_d) {
570
576
  switch (_d.label) {
@@ -574,7 +580,6 @@ var deserializeAws_json1_1ImportTerminologyCommandError = function (output, cont
574
580
  return [4, parseBody(output.body, context)];
575
581
  case 1:
576
582
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
577
- errorCode = "UnknownError";
578
583
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
579
584
  _b = errorCode;
580
585
  switch (_b) {
@@ -598,10 +603,12 @@ var deserializeAws_json1_1ImportTerminologyCommandError = function (output, cont
598
603
  case 9: throw _d.sent();
599
604
  case 10:
600
605
  parsedBody = parsedOutput.body;
606
+ $metadata = deserializeMetadata(output);
607
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
601
608
  response = new __BaseException({
602
- name: parsedBody.code || parsedBody.Code || errorCode,
609
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
603
610
  $fault: "client",
604
- $metadata: deserializeMetadata(output),
611
+ $metadata: $metadata,
605
612
  });
606
613
  throw __decorateServiceException(response, parsedBody);
607
614
  }
@@ -626,7 +633,7 @@ export var deserializeAws_json1_1ListLanguagesCommand = function (output, contex
626
633
  });
627
634
  }); };
628
635
  var deserializeAws_json1_1ListLanguagesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
629
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
636
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
630
637
  var _c;
631
638
  return __generator(this, function (_d) {
632
639
  switch (_d.label) {
@@ -636,7 +643,6 @@ var deserializeAws_json1_1ListLanguagesCommandError = function (output, context)
636
643
  return [4, parseBody(output.body, context)];
637
644
  case 1:
638
645
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
639
- errorCode = "UnknownError";
640
646
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
641
647
  _b = errorCode;
642
648
  switch (_b) {
@@ -660,10 +666,12 @@ var deserializeAws_json1_1ListLanguagesCommandError = function (output, context)
660
666
  case 9: throw _d.sent();
661
667
  case 10:
662
668
  parsedBody = parsedOutput.body;
669
+ $metadata = deserializeMetadata(output);
670
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
663
671
  response = new __BaseException({
664
- name: parsedBody.code || parsedBody.Code || errorCode,
672
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
665
673
  $fault: "client",
666
- $metadata: deserializeMetadata(output),
674
+ $metadata: $metadata,
667
675
  });
668
676
  throw __decorateServiceException(response, parsedBody);
669
677
  }
@@ -688,7 +696,7 @@ export var deserializeAws_json1_1ListParallelDataCommand = function (output, con
688
696
  });
689
697
  }); };
690
698
  var deserializeAws_json1_1ListParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
691
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
699
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
692
700
  var _c;
693
701
  return __generator(this, function (_d) {
694
702
  switch (_d.label) {
@@ -698,7 +706,6 @@ var deserializeAws_json1_1ListParallelDataCommandError = function (output, conte
698
706
  return [4, parseBody(output.body, context)];
699
707
  case 1:
700
708
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
701
- errorCode = "UnknownError";
702
709
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
703
710
  _b = errorCode;
704
711
  switch (_b) {
@@ -718,10 +725,12 @@ var deserializeAws_json1_1ListParallelDataCommandError = function (output, conte
718
725
  case 7: throw _d.sent();
719
726
  case 8:
720
727
  parsedBody = parsedOutput.body;
728
+ $metadata = deserializeMetadata(output);
729
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
721
730
  response = new __BaseException({
722
- name: parsedBody.code || parsedBody.Code || errorCode,
731
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
723
732
  $fault: "client",
724
- $metadata: deserializeMetadata(output),
733
+ $metadata: $metadata,
725
734
  });
726
735
  throw __decorateServiceException(response, parsedBody);
727
736
  }
@@ -746,7 +755,7 @@ export var deserializeAws_json1_1ListTerminologiesCommand = function (output, co
746
755
  });
747
756
  }); };
748
757
  var deserializeAws_json1_1ListTerminologiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
749
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
758
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
750
759
  var _c;
751
760
  return __generator(this, function (_d) {
752
761
  switch (_d.label) {
@@ -756,7 +765,6 @@ var deserializeAws_json1_1ListTerminologiesCommandError = function (output, cont
756
765
  return [4, parseBody(output.body, context)];
757
766
  case 1:
758
767
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
759
- errorCode = "UnknownError";
760
768
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
761
769
  _b = errorCode;
762
770
  switch (_b) {
@@ -776,10 +784,12 @@ var deserializeAws_json1_1ListTerminologiesCommandError = function (output, cont
776
784
  case 7: throw _d.sent();
777
785
  case 8:
778
786
  parsedBody = parsedOutput.body;
787
+ $metadata = deserializeMetadata(output);
788
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
779
789
  response = new __BaseException({
780
- name: parsedBody.code || parsedBody.Code || errorCode,
790
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
781
791
  $fault: "client",
782
- $metadata: deserializeMetadata(output),
792
+ $metadata: $metadata,
783
793
  });
784
794
  throw __decorateServiceException(response, parsedBody);
785
795
  }
@@ -804,7 +814,7 @@ export var deserializeAws_json1_1ListTextTranslationJobsCommand = function (outp
804
814
  });
805
815
  }); };
806
816
  var deserializeAws_json1_1ListTextTranslationJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
807
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
817
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
808
818
  var _c;
809
819
  return __generator(this, function (_d) {
810
820
  switch (_d.label) {
@@ -814,7 +824,6 @@ var deserializeAws_json1_1ListTextTranslationJobsCommandError = function (output
814
824
  return [4, parseBody(output.body, context)];
815
825
  case 1:
816
826
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
817
- errorCode = "UnknownError";
818
827
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
819
828
  _b = errorCode;
820
829
  switch (_b) {
@@ -838,10 +847,12 @@ var deserializeAws_json1_1ListTextTranslationJobsCommandError = function (output
838
847
  case 9: throw _d.sent();
839
848
  case 10:
840
849
  parsedBody = parsedOutput.body;
850
+ $metadata = deserializeMetadata(output);
851
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
841
852
  response = new __BaseException({
842
- name: parsedBody.code || parsedBody.Code || errorCode,
853
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
843
854
  $fault: "client",
844
- $metadata: deserializeMetadata(output),
855
+ $metadata: $metadata,
845
856
  });
846
857
  throw __decorateServiceException(response, parsedBody);
847
858
  }
@@ -866,7 +877,7 @@ export var deserializeAws_json1_1StartTextTranslationJobCommand = function (outp
866
877
  });
867
878
  }); };
868
879
  var deserializeAws_json1_1StartTextTranslationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
869
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
880
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
870
881
  var _c;
871
882
  return __generator(this, function (_d) {
872
883
  switch (_d.label) {
@@ -876,7 +887,6 @@ var deserializeAws_json1_1StartTextTranslationJobCommandError = function (output
876
887
  return [4, parseBody(output.body, context)];
877
888
  case 1:
878
889
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
879
- errorCode = "UnknownError";
880
890
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
881
891
  _b = errorCode;
882
892
  switch (_b) {
@@ -908,10 +918,12 @@ var deserializeAws_json1_1StartTextTranslationJobCommandError = function (output
908
918
  case 13: throw _d.sent();
909
919
  case 14:
910
920
  parsedBody = parsedOutput.body;
921
+ $metadata = deserializeMetadata(output);
922
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
911
923
  response = new __BaseException({
912
- name: parsedBody.code || parsedBody.Code || errorCode,
924
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
913
925
  $fault: "client",
914
- $metadata: deserializeMetadata(output),
926
+ $metadata: $metadata,
915
927
  });
916
928
  throw __decorateServiceException(response, parsedBody);
917
929
  }
@@ -936,7 +948,7 @@ export var deserializeAws_json1_1StopTextTranslationJobCommand = function (outpu
936
948
  });
937
949
  }); };
938
950
  var deserializeAws_json1_1StopTextTranslationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
939
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
951
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
940
952
  var _c;
941
953
  return __generator(this, function (_d) {
942
954
  switch (_d.label) {
@@ -946,7 +958,6 @@ var deserializeAws_json1_1StopTextTranslationJobCommandError = function (output,
946
958
  return [4, parseBody(output.body, context)];
947
959
  case 1:
948
960
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
949
- errorCode = "UnknownError";
950
961
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
951
962
  _b = errorCode;
952
963
  switch (_b) {
@@ -966,10 +977,12 @@ var deserializeAws_json1_1StopTextTranslationJobCommandError = function (output,
966
977
  case 7: throw _d.sent();
967
978
  case 8:
968
979
  parsedBody = parsedOutput.body;
980
+ $metadata = deserializeMetadata(output);
981
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
969
982
  response = new __BaseException({
970
- name: parsedBody.code || parsedBody.Code || errorCode,
983
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
971
984
  $fault: "client",
972
- $metadata: deserializeMetadata(output),
985
+ $metadata: $metadata,
973
986
  });
974
987
  throw __decorateServiceException(response, parsedBody);
975
988
  }
@@ -994,7 +1007,7 @@ export var deserializeAws_json1_1TranslateTextCommand = function (output, contex
994
1007
  });
995
1008
  }); };
996
1009
  var deserializeAws_json1_1TranslateTextCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
997
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1010
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
998
1011
  var _c;
999
1012
  return __generator(this, function (_d) {
1000
1013
  switch (_d.label) {
@@ -1004,7 +1017,6 @@ var deserializeAws_json1_1TranslateTextCommandError = function (output, context)
1004
1017
  return [4, parseBody(output.body, context)];
1005
1018
  case 1:
1006
1019
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1007
- errorCode = "UnknownError";
1008
1020
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1009
1021
  _b = errorCode;
1010
1022
  switch (_b) {
@@ -1044,10 +1056,12 @@ var deserializeAws_json1_1TranslateTextCommandError = function (output, context)
1044
1056
  case 17: throw _d.sent();
1045
1057
  case 18:
1046
1058
  parsedBody = parsedOutput.body;
1059
+ $metadata = deserializeMetadata(output);
1060
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1047
1061
  response = new __BaseException({
1048
- name: parsedBody.code || parsedBody.Code || errorCode,
1062
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1049
1063
  $fault: "client",
1050
- $metadata: deserializeMetadata(output),
1064
+ $metadata: $metadata,
1051
1065
  });
1052
1066
  throw __decorateServiceException(response, parsedBody);
1053
1067
  }
@@ -1072,7 +1086,7 @@ export var deserializeAws_json1_1UpdateParallelDataCommand = function (output, c
1072
1086
  });
1073
1087
  }); };
1074
1088
  var deserializeAws_json1_1UpdateParallelDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1075
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1089
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1076
1090
  var _c;
1077
1091
  return __generator(this, function (_d) {
1078
1092
  switch (_d.label) {
@@ -1082,7 +1096,6 @@ var deserializeAws_json1_1UpdateParallelDataCommandError = function (output, con
1082
1096
  return [4, parseBody(output.body, context)];
1083
1097
  case 1:
1084
1098
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1085
- errorCode = "UnknownError";
1086
1099
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1087
1100
  _b = errorCode;
1088
1101
  switch (_b) {
@@ -1122,10 +1135,12 @@ var deserializeAws_json1_1UpdateParallelDataCommandError = function (output, con
1122
1135
  case 17: throw _d.sent();
1123
1136
  case 18:
1124
1137
  parsedBody = parsedOutput.body;
1138
+ $metadata = deserializeMetadata(output);
1139
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1125
1140
  response = new __BaseException({
1126
- name: parsedBody.code || parsedBody.Code || errorCode,
1141
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1127
1142
  $fault: "client",
1128
- $metadata: deserializeMetadata(output),
1143
+ $metadata: $metadata,
1129
1144
  });
1130
1145
  throw __decorateServiceException(response, parsedBody);
1131
1146
  }
@@ -1259,67 +1274,59 @@ var deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse = function (p
1259
1274
  }); };
1260
1275
  var serializeAws_json1_1CreateParallelDataRequest = function (input, context) {
1261
1276
  var _a;
1262
- return __assign(__assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.EncryptionKey !== undefined &&
1263
- input.EncryptionKey !== null && {
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 && {
1264
1278
  EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
1265
- })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.ParallelDataConfig !== undefined &&
1266
- input.ParallelDataConfig !== null && {
1279
+ })), (input.Name != null && { Name: input.Name })), (input.ParallelDataConfig != null && {
1267
1280
  ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
1268
1281
  }));
1269
1282
  };
1270
1283
  var serializeAws_json1_1DeleteParallelDataRequest = function (input, context) {
1271
- return __assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
1284
+ return __assign({}, (input.Name != null && { Name: input.Name }));
1272
1285
  };
1273
1286
  var serializeAws_json1_1DeleteTerminologyRequest = function (input, context) {
1274
- return __assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
1287
+ return __assign({}, (input.Name != null && { Name: input.Name }));
1275
1288
  };
1276
1289
  var serializeAws_json1_1DescribeTextTranslationJobRequest = function (input, context) {
1277
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
1290
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
1278
1291
  };
1279
1292
  var serializeAws_json1_1EncryptionKey = function (input, context) {
1280
- return __assign(__assign({}, (input.Id !== undefined && input.Id !== null && { Id: input.Id })), (input.Type !== undefined && input.Type !== null && { Type: input.Type }));
1293
+ return __assign(__assign({}, (input.Id != null && { Id: input.Id })), (input.Type != null && { Type: input.Type }));
1281
1294
  };
1282
1295
  var serializeAws_json1_1GetParallelDataRequest = function (input, context) {
1283
- return __assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
1296
+ return __assign({}, (input.Name != null && { Name: input.Name }));
1284
1297
  };
1285
1298
  var serializeAws_json1_1GetTerminologyRequest = function (input, context) {
1286
- return __assign(__assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.TerminologyDataFormat !== undefined &&
1287
- input.TerminologyDataFormat !== null && { TerminologyDataFormat: input.TerminologyDataFormat }));
1299
+ return __assign(__assign({}, (input.Name != null && { Name: input.Name })), (input.TerminologyDataFormat != null && { TerminologyDataFormat: input.TerminologyDataFormat }));
1288
1300
  };
1289
1301
  var serializeAws_json1_1ImportTerminologyRequest = function (input, context) {
1290
- return __assign(__assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.EncryptionKey !== undefined &&
1291
- input.EncryptionKey !== null && {
1302
+ return __assign(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.EncryptionKey != null && {
1292
1303
  EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
1293
- })), (input.MergeStrategy !== undefined && input.MergeStrategy !== null && { MergeStrategy: input.MergeStrategy })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.TerminologyData !== undefined &&
1294
- input.TerminologyData !== null && {
1304
+ })), (input.MergeStrategy != null && { MergeStrategy: input.MergeStrategy })), (input.Name != null && { Name: input.Name })), (input.TerminologyData != null && {
1295
1305
  TerminologyData: serializeAws_json1_1TerminologyData(input.TerminologyData, context),
1296
1306
  }));
1297
1307
  };
1298
1308
  var serializeAws_json1_1InputDataConfig = function (input, context) {
1299
- return __assign(__assign({}, (input.ContentType !== undefined && input.ContentType !== null && { ContentType: input.ContentType })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
1309
+ return __assign(__assign({}, (input.ContentType != null && { ContentType: input.ContentType })), (input.S3Uri != null && { S3Uri: input.S3Uri }));
1300
1310
  };
1301
1311
  var serializeAws_json1_1ListLanguagesRequest = function (input, context) {
1302
- return __assign(__assign(__assign({}, (input.DisplayLanguageCode !== undefined &&
1303
- input.DisplayLanguageCode !== null && { DisplayLanguageCode: input.DisplayLanguageCode })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
1312
+ return __assign(__assign(__assign({}, (input.DisplayLanguageCode != null && { DisplayLanguageCode: input.DisplayLanguageCode })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1304
1313
  };
1305
1314
  var serializeAws_json1_1ListParallelDataRequest = function (input, context) {
1306
- return __assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
1315
+ return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1307
1316
  };
1308
1317
  var serializeAws_json1_1ListTerminologiesRequest = function (input, context) {
1309
- return __assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
1318
+ return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1310
1319
  };
1311
1320
  var serializeAws_json1_1ListTextTranslationJobsRequest = function (input, context) {
1312
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
1313
- input.Filter !== null && { Filter: serializeAws_json1_1TextTranslationJobFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
1321
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1TextTranslationJobFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1314
1322
  };
1315
1323
  var serializeAws_json1_1OutputDataConfig = function (input, context) {
1316
- return __assign(__assign({}, (input.EncryptionKey !== undefined &&
1317
- input.EncryptionKey !== null && {
1324
+ return __assign(__assign({}, (input.EncryptionKey != null && {
1318
1325
  EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
1319
- })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
1326
+ })), (input.S3Uri != null && { S3Uri: input.S3Uri }));
1320
1327
  };
1321
1328
  var serializeAws_json1_1ParallelDataConfig = function (input, context) {
1322
- return __assign(__assign({}, (input.Format !== undefined && input.Format !== null && { Format: input.Format })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
1329
+ return __assign(__assign({}, (input.Format != null && { Format: input.Format })), (input.S3Uri != null && { S3Uri: input.S3Uri }));
1323
1330
  };
1324
1331
  var serializeAws_json1_1ResourceNameList = function (input, context) {
1325
1332
  return input
@@ -1333,28 +1340,20 @@ var serializeAws_json1_1ResourceNameList = function (input, context) {
1333
1340
  };
1334
1341
  var serializeAws_json1_1StartTextTranslationJobRequest = function (input, context) {
1335
1342
  var _a;
1336
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
1337
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig !== undefined &&
1338
- input.InputDataConfig !== null && {
1343
+ 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 && {
1339
1344
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
1340
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.OutputDataConfig !== undefined &&
1341
- input.OutputDataConfig !== null && {
1345
+ })), (input.JobName != null && { JobName: input.JobName })), (input.OutputDataConfig != null && {
1342
1346
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
1343
- })), (input.ParallelDataNames !== undefined &&
1344
- input.ParallelDataNames !== null && {
1347
+ })), (input.ParallelDataNames != null && {
1345
1348
  ParallelDataNames: serializeAws_json1_1ResourceNameList(input.ParallelDataNames, context),
1346
- })), (input.Settings !== undefined &&
1347
- input.Settings !== null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) })), (input.SourceLanguageCode !== undefined &&
1348
- input.SourceLanguageCode !== null && { SourceLanguageCode: input.SourceLanguageCode })), (input.TargetLanguageCodes !== undefined &&
1349
- input.TargetLanguageCodes !== null && {
1349
+ })), (input.Settings != null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) })), (input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode })), (input.TargetLanguageCodes != null && {
1350
1350
  TargetLanguageCodes: serializeAws_json1_1TargetLanguageCodeStringList(input.TargetLanguageCodes, context),
1351
- })), (input.TerminologyNames !== undefined &&
1352
- input.TerminologyNames !== null && {
1351
+ })), (input.TerminologyNames != null && {
1353
1352
  TerminologyNames: serializeAws_json1_1ResourceNameList(input.TerminologyNames, context),
1354
1353
  }));
1355
1354
  };
1356
1355
  var serializeAws_json1_1StopTextTranslationJobRequest = function (input, context) {
1357
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
1356
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
1358
1357
  };
1359
1358
  var serializeAws_json1_1TargetLanguageCodeStringList = function (input, context) {
1360
1359
  return input
@@ -1367,43 +1366,33 @@ var serializeAws_json1_1TargetLanguageCodeStringList = function (input, context)
1367
1366
  });
1368
1367
  };
1369
1368
  var serializeAws_json1_1TerminologyData = function (input, context) {
1370
- return __assign(__assign(__assign({}, (input.Directionality !== undefined &&
1371
- input.Directionality !== null && { Directionality: input.Directionality })), (input.File !== undefined && input.File !== null && { File: context.base64Encoder(input.File) })), (input.Format !== undefined && input.Format !== null && { Format: input.Format }));
1369
+ return __assign(__assign(__assign({}, (input.Directionality != null && { Directionality: input.Directionality })), (input.File != null && { File: context.base64Encoder(input.File) })), (input.Format != null && { Format: input.Format }));
1372
1370
  };
1373
1371
  var serializeAws_json1_1TextTranslationJobFilter = function (input, context) {
1374
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmittedAfterTime !== undefined &&
1375
- input.SubmittedAfterTime !== null && {
1372
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmittedAfterTime != null && {
1376
1373
  SubmittedAfterTime: Math.round(input.SubmittedAfterTime.getTime() / 1000),
1377
- })), (input.SubmittedBeforeTime !== undefined &&
1378
- input.SubmittedBeforeTime !== null && {
1374
+ })), (input.SubmittedBeforeTime != null && {
1379
1375
  SubmittedBeforeTime: Math.round(input.SubmittedBeforeTime.getTime() / 1000),
1380
1376
  }));
1381
1377
  };
1382
1378
  var serializeAws_json1_1TranslateTextRequest = function (input, context) {
1383
- return __assign(__assign(__assign(__assign(__assign({}, (input.Settings !== undefined &&
1384
- input.Settings !== null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) })), (input.SourceLanguageCode !== undefined &&
1385
- input.SourceLanguageCode !== null && { SourceLanguageCode: input.SourceLanguageCode })), (input.TargetLanguageCode !== undefined &&
1386
- input.TargetLanguageCode !== null && { TargetLanguageCode: input.TargetLanguageCode })), (input.TerminologyNames !== undefined &&
1387
- input.TerminologyNames !== null && {
1379
+ return __assign(__assign(__assign(__assign(__assign({}, (input.Settings != null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) })), (input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode })), (input.TargetLanguageCode != null && { TargetLanguageCode: input.TargetLanguageCode })), (input.TerminologyNames != null && {
1388
1380
  TerminologyNames: serializeAws_json1_1ResourceNameList(input.TerminologyNames, context),
1389
- })), (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
1381
+ })), (input.Text != null && { Text: input.Text }));
1390
1382
  };
1391
1383
  var serializeAws_json1_1TranslationSettings = function (input, context) {
1392
- return __assign(__assign({}, (input.Formality !== undefined && input.Formality !== null && { Formality: input.Formality })), (input.Profanity !== undefined && input.Profanity !== null && { Profanity: input.Profanity }));
1384
+ return __assign(__assign({}, (input.Formality != null && { Formality: input.Formality })), (input.Profanity != null && { Profanity: input.Profanity }));
1393
1385
  };
1394
1386
  var serializeAws_json1_1UpdateParallelDataRequest = function (input, context) {
1395
1387
  var _a;
1396
- return __assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.ParallelDataConfig !== undefined &&
1397
- input.ParallelDataConfig !== null && {
1388
+ return __assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.Description != null && { Description: input.Description })), (input.Name != null && { Name: input.Name })), (input.ParallelDataConfig != null && {
1398
1389
  ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
1399
1390
  }));
1400
1391
  };
1401
1392
  var deserializeAws_json1_1AppliedTerminology = function (output, context) {
1402
1393
  return {
1403
1394
  Name: __expectString(output.Name),
1404
- Terms: output.Terms !== undefined && output.Terms !== null
1405
- ? deserializeAws_json1_1TermList(output.Terms, context)
1406
- : undefined,
1395
+ Terms: output.Terms != null ? deserializeAws_json1_1TermList(output.Terms, context) : undefined,
1407
1396
  };
1408
1397
  };
1409
1398
  var deserializeAws_json1_1AppliedTerminologyList = function (output, context) {
@@ -1441,7 +1430,7 @@ var deserializeAws_json1_1DeleteParallelDataResponse = function (output, context
1441
1430
  };
1442
1431
  var deserializeAws_json1_1DescribeTextTranslationJobResponse = function (output, context) {
1443
1432
  return {
1444
- TextTranslationJobProperties: output.TextTranslationJobProperties !== undefined && output.TextTranslationJobProperties !== null
1433
+ TextTranslationJobProperties: output.TextTranslationJobProperties != null
1445
1434
  ? deserializeAws_json1_1TextTranslationJobProperties(output.TextTranslationJobProperties, context)
1446
1435
  : undefined,
1447
1436
  };
@@ -1460,40 +1449,39 @@ var deserializeAws_json1_1EncryptionKey = function (output, context) {
1460
1449
  };
1461
1450
  var deserializeAws_json1_1GetParallelDataResponse = function (output, context) {
1462
1451
  return {
1463
- AuxiliaryDataLocation: output.AuxiliaryDataLocation !== undefined && output.AuxiliaryDataLocation !== null
1452
+ AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
1464
1453
  ? deserializeAws_json1_1ParallelDataDataLocation(output.AuxiliaryDataLocation, context)
1465
1454
  : undefined,
1466
- DataLocation: output.DataLocation !== undefined && output.DataLocation !== null
1455
+ DataLocation: output.DataLocation != null
1467
1456
  ? deserializeAws_json1_1ParallelDataDataLocation(output.DataLocation, context)
1468
1457
  : undefined,
1469
- LatestUpdateAttemptAuxiliaryDataLocation: output.LatestUpdateAttemptAuxiliaryDataLocation !== undefined &&
1470
- output.LatestUpdateAttemptAuxiliaryDataLocation !== null
1458
+ LatestUpdateAttemptAuxiliaryDataLocation: output.LatestUpdateAttemptAuxiliaryDataLocation != null
1471
1459
  ? deserializeAws_json1_1ParallelDataDataLocation(output.LatestUpdateAttemptAuxiliaryDataLocation, context)
1472
1460
  : undefined,
1473
- ParallelDataProperties: output.ParallelDataProperties !== undefined && output.ParallelDataProperties !== null
1461
+ ParallelDataProperties: output.ParallelDataProperties != null
1474
1462
  ? deserializeAws_json1_1ParallelDataProperties(output.ParallelDataProperties, context)
1475
1463
  : undefined,
1476
1464
  };
1477
1465
  };
1478
1466
  var deserializeAws_json1_1GetTerminologyResponse = function (output, context) {
1479
1467
  return {
1480
- AuxiliaryDataLocation: output.AuxiliaryDataLocation !== undefined && output.AuxiliaryDataLocation !== null
1468
+ AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
1481
1469
  ? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
1482
1470
  : undefined,
1483
- TerminologyDataLocation: output.TerminologyDataLocation !== undefined && output.TerminologyDataLocation !== null
1471
+ TerminologyDataLocation: output.TerminologyDataLocation != null
1484
1472
  ? deserializeAws_json1_1TerminologyDataLocation(output.TerminologyDataLocation, context)
1485
1473
  : undefined,
1486
- TerminologyProperties: output.TerminologyProperties !== undefined && output.TerminologyProperties !== null
1474
+ TerminologyProperties: output.TerminologyProperties != null
1487
1475
  ? deserializeAws_json1_1TerminologyProperties(output.TerminologyProperties, context)
1488
1476
  : undefined,
1489
1477
  };
1490
1478
  };
1491
1479
  var deserializeAws_json1_1ImportTerminologyResponse = function (output, context) {
1492
1480
  return {
1493
- AuxiliaryDataLocation: output.AuxiliaryDataLocation !== undefined && output.AuxiliaryDataLocation !== null
1481
+ AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
1494
1482
  ? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
1495
1483
  : undefined,
1496
- TerminologyProperties: output.TerminologyProperties !== undefined && output.TerminologyProperties !== null
1484
+ TerminologyProperties: output.TerminologyProperties != null
1497
1485
  ? deserializeAws_json1_1TerminologyProperties(output.TerminologyProperties, context)
1498
1486
  : undefined,
1499
1487
  };
@@ -1567,16 +1555,14 @@ var deserializeAws_json1_1LimitExceededException = function (output, context) {
1567
1555
  var deserializeAws_json1_1ListLanguagesResponse = function (output, context) {
1568
1556
  return {
1569
1557
  DisplayLanguageCode: __expectString(output.DisplayLanguageCode),
1570
- Languages: output.Languages !== undefined && output.Languages !== null
1571
- ? deserializeAws_json1_1LanguagesList(output.Languages, context)
1572
- : undefined,
1558
+ Languages: output.Languages != null ? deserializeAws_json1_1LanguagesList(output.Languages, context) : undefined,
1573
1559
  NextToken: __expectString(output.NextToken),
1574
1560
  };
1575
1561
  };
1576
1562
  var deserializeAws_json1_1ListParallelDataResponse = function (output, context) {
1577
1563
  return {
1578
1564
  NextToken: __expectString(output.NextToken),
1579
- ParallelDataPropertiesList: output.ParallelDataPropertiesList !== undefined && output.ParallelDataPropertiesList !== null
1565
+ ParallelDataPropertiesList: output.ParallelDataPropertiesList != null
1580
1566
  ? deserializeAws_json1_1ParallelDataPropertiesList(output.ParallelDataPropertiesList, context)
1581
1567
  : undefined,
1582
1568
  };
@@ -1584,7 +1570,7 @@ var deserializeAws_json1_1ListParallelDataResponse = function (output, context)
1584
1570
  var deserializeAws_json1_1ListTerminologiesResponse = function (output, context) {
1585
1571
  return {
1586
1572
  NextToken: __expectString(output.NextToken),
1587
- TerminologyPropertiesList: output.TerminologyPropertiesList !== undefined && output.TerminologyPropertiesList !== null
1573
+ TerminologyPropertiesList: output.TerminologyPropertiesList != null
1588
1574
  ? deserializeAws_json1_1TerminologyPropertiesList(output.TerminologyPropertiesList, context)
1589
1575
  : undefined,
1590
1576
  };
@@ -1592,16 +1578,14 @@ var deserializeAws_json1_1ListTerminologiesResponse = function (output, context)
1592
1578
  var deserializeAws_json1_1ListTextTranslationJobsResponse = function (output, context) {
1593
1579
  return {
1594
1580
  NextToken: __expectString(output.NextToken),
1595
- TextTranslationJobPropertiesList: output.TextTranslationJobPropertiesList !== undefined && output.TextTranslationJobPropertiesList !== null
1581
+ TextTranslationJobPropertiesList: output.TextTranslationJobPropertiesList != null
1596
1582
  ? deserializeAws_json1_1TextTranslationJobPropertiesList(output.TextTranslationJobPropertiesList, context)
1597
1583
  : undefined,
1598
1584
  };
1599
1585
  };
1600
1586
  var deserializeAws_json1_1OutputDataConfig = function (output, context) {
1601
1587
  return {
1602
- EncryptionKey: output.EncryptionKey !== undefined && output.EncryptionKey !== null
1603
- ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
1604
- : undefined,
1588
+ EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
1605
1589
  S3Uri: __expectString(output.S3Uri),
1606
1590
  };
1607
1591
  };
@@ -1620,32 +1604,28 @@ var deserializeAws_json1_1ParallelDataDataLocation = function (output, context)
1620
1604
  var deserializeAws_json1_1ParallelDataProperties = function (output, context) {
1621
1605
  return {
1622
1606
  Arn: __expectString(output.Arn),
1623
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
1624
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
1625
- : undefined,
1607
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
1626
1608
  Description: __expectString(output.Description),
1627
- EncryptionKey: output.EncryptionKey !== undefined && output.EncryptionKey !== null
1628
- ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
1629
- : undefined,
1609
+ EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
1630
1610
  FailedRecordCount: __expectLong(output.FailedRecordCount),
1631
1611
  ImportedDataSize: __expectLong(output.ImportedDataSize),
1632
1612
  ImportedRecordCount: __expectLong(output.ImportedRecordCount),
1633
- LastUpdatedAt: output.LastUpdatedAt !== undefined && output.LastUpdatedAt !== null
1613
+ LastUpdatedAt: output.LastUpdatedAt != null
1634
1614
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt)))
1635
1615
  : undefined,
1636
- LatestUpdateAttemptAt: output.LatestUpdateAttemptAt !== undefined && output.LatestUpdateAttemptAt !== null
1616
+ LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
1637
1617
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestUpdateAttemptAt)))
1638
1618
  : undefined,
1639
1619
  LatestUpdateAttemptStatus: __expectString(output.LatestUpdateAttemptStatus),
1640
1620
  Message: __expectString(output.Message),
1641
1621
  Name: __expectString(output.Name),
1642
- ParallelDataConfig: output.ParallelDataConfig !== undefined && output.ParallelDataConfig !== null
1622
+ ParallelDataConfig: output.ParallelDataConfig != null
1643
1623
  ? deserializeAws_json1_1ParallelDataConfig(output.ParallelDataConfig, context)
1644
1624
  : undefined,
1645
1625
  SkippedRecordCount: __expectLong(output.SkippedRecordCount),
1646
1626
  SourceLanguageCode: __expectString(output.SourceLanguageCode),
1647
1627
  Status: __expectString(output.Status),
1648
- TargetLanguageCodes: output.TargetLanguageCodes !== undefined && output.TargetLanguageCodes !== null
1628
+ TargetLanguageCodes: output.TargetLanguageCodes != null
1649
1629
  ? deserializeAws_json1_1LanguageCodeStringList(output.TargetLanguageCodes, context)
1650
1630
  : undefined,
1651
1631
  };
@@ -1720,16 +1700,12 @@ var deserializeAws_json1_1TerminologyDataLocation = function (output, context) {
1720
1700
  var deserializeAws_json1_1TerminologyProperties = function (output, context) {
1721
1701
  return {
1722
1702
  Arn: __expectString(output.Arn),
1723
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
1724
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
1725
- : undefined,
1703
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
1726
1704
  Description: __expectString(output.Description),
1727
1705
  Directionality: __expectString(output.Directionality),
1728
- EncryptionKey: output.EncryptionKey !== undefined && output.EncryptionKey !== null
1729
- ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
1730
- : undefined,
1706
+ EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
1731
1707
  Format: __expectString(output.Format),
1732
- LastUpdatedAt: output.LastUpdatedAt !== undefined && output.LastUpdatedAt !== null
1708
+ LastUpdatedAt: output.LastUpdatedAt != null
1733
1709
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt)))
1734
1710
  : undefined,
1735
1711
  Message: __expectString(output.Message),
@@ -1737,7 +1713,7 @@ var deserializeAws_json1_1TerminologyProperties = function (output, context) {
1737
1713
  SizeBytes: __expectInt32(output.SizeBytes),
1738
1714
  SkippedTermCount: __expectInt32(output.SkippedTermCount),
1739
1715
  SourceLanguageCode: __expectString(output.SourceLanguageCode),
1740
- TargetLanguageCodes: output.TargetLanguageCodes !== undefined && output.TargetLanguageCodes !== null
1716
+ TargetLanguageCodes: output.TargetLanguageCodes != null
1741
1717
  ? deserializeAws_json1_1LanguageCodeStringList(output.TargetLanguageCodes, context)
1742
1718
  : undefined,
1743
1719
  TermCount: __expectInt32(output.TermCount),
@@ -1773,36 +1749,30 @@ var deserializeAws_json1_1TextSizeLimitExceededException = function (output, con
1773
1749
  var deserializeAws_json1_1TextTranslationJobProperties = function (output, context) {
1774
1750
  return {
1775
1751
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
1776
- EndTime: output.EndTime !== undefined && output.EndTime !== null
1777
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
1778
- : undefined,
1779
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
1752
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
1753
+ InputDataConfig: output.InputDataConfig != null
1780
1754
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
1781
1755
  : undefined,
1782
- JobDetails: output.JobDetails !== undefined && output.JobDetails !== null
1783
- ? deserializeAws_json1_1JobDetails(output.JobDetails, context)
1784
- : undefined,
1756
+ JobDetails: output.JobDetails != null ? deserializeAws_json1_1JobDetails(output.JobDetails, context) : undefined,
1785
1757
  JobId: __expectString(output.JobId),
1786
1758
  JobName: __expectString(output.JobName),
1787
1759
  JobStatus: __expectString(output.JobStatus),
1788
1760
  Message: __expectString(output.Message),
1789
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
1761
+ OutputDataConfig: output.OutputDataConfig != null
1790
1762
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
1791
1763
  : undefined,
1792
- ParallelDataNames: output.ParallelDataNames !== undefined && output.ParallelDataNames !== null
1764
+ ParallelDataNames: output.ParallelDataNames != null
1793
1765
  ? deserializeAws_json1_1ResourceNameList(output.ParallelDataNames, context)
1794
1766
  : undefined,
1795
- Settings: output.Settings !== undefined && output.Settings !== null
1796
- ? deserializeAws_json1_1TranslationSettings(output.Settings, context)
1797
- : undefined,
1767
+ Settings: output.Settings != null ? deserializeAws_json1_1TranslationSettings(output.Settings, context) : undefined,
1798
1768
  SourceLanguageCode: __expectString(output.SourceLanguageCode),
1799
- SubmittedTime: output.SubmittedTime !== undefined && output.SubmittedTime !== null
1769
+ SubmittedTime: output.SubmittedTime != null
1800
1770
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmittedTime)))
1801
1771
  : undefined,
1802
- TargetLanguageCodes: output.TargetLanguageCodes !== undefined && output.TargetLanguageCodes !== null
1772
+ TargetLanguageCodes: output.TargetLanguageCodes != null
1803
1773
  ? deserializeAws_json1_1TargetLanguageCodeStringList(output.TargetLanguageCodes, context)
1804
1774
  : undefined,
1805
- TerminologyNames: output.TerminologyNames !== undefined && output.TerminologyNames !== null
1775
+ TerminologyNames: output.TerminologyNames != null
1806
1776
  ? deserializeAws_json1_1ResourceNameList(output.TerminologyNames, context)
1807
1777
  : undefined,
1808
1778
  };
@@ -1825,10 +1795,10 @@ var deserializeAws_json1_1TooManyRequestsException = function (output, context)
1825
1795
  };
1826
1796
  var deserializeAws_json1_1TranslateTextResponse = function (output, context) {
1827
1797
  return {
1828
- AppliedSettings: output.AppliedSettings !== undefined && output.AppliedSettings !== null
1798
+ AppliedSettings: output.AppliedSettings != null
1829
1799
  ? deserializeAws_json1_1TranslationSettings(output.AppliedSettings, context)
1830
1800
  : undefined,
1831
- AppliedTerminologies: output.AppliedTerminologies !== undefined && output.AppliedTerminologies !== null
1801
+ AppliedTerminologies: output.AppliedTerminologies != null
1832
1802
  ? deserializeAws_json1_1AppliedTerminologyList(output.AppliedTerminologies, context)
1833
1803
  : undefined,
1834
1804
  SourceLanguageCode: __expectString(output.SourceLanguageCode),
@@ -1857,7 +1827,7 @@ var deserializeAws_json1_1UnsupportedLanguagePairException = function (output, c
1857
1827
  };
1858
1828
  var deserializeAws_json1_1UpdateParallelDataResponse = function (output, context) {
1859
1829
  return {
1860
- LatestUpdateAttemptAt: output.LatestUpdateAttemptAt !== undefined && output.LatestUpdateAttemptAt !== null
1830
+ LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
1861
1831
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestUpdateAttemptAt)))
1862
1832
  : undefined,
1863
1833
  LatestUpdateAttemptStatus: __expectString(output.LatestUpdateAttemptStatus),
@@ -1939,5 +1909,4 @@ var loadRestJsonErrorCode = function (output, data) {
1939
1909
  if (data["__type"] !== undefined) {
1940
1910
  return sanitizeErrorCode(data["__type"]);
1941
1911
  }
1942
- return "";
1943
1912
  };