@aws-sdk/client-translate 3.312.0 → 3.315.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.
@@ -16,35 +16,35 @@ exports.se_CreateParallelDataCommand = se_CreateParallelDataCommand;
16
16
  const se_DeleteParallelDataCommand = async (input, context) => {
17
17
  const headers = sharedHeaders("DeleteParallelData");
18
18
  let body;
19
- body = JSON.stringify(se_DeleteParallelDataRequest(input, context));
19
+ body = JSON.stringify((0, smithy_client_1._json)(input));
20
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
21
  };
22
22
  exports.se_DeleteParallelDataCommand = se_DeleteParallelDataCommand;
23
23
  const se_DeleteTerminologyCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("DeleteTerminology");
25
25
  let body;
26
- body = JSON.stringify(se_DeleteTerminologyRequest(input, context));
26
+ body = JSON.stringify((0, smithy_client_1._json)(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  exports.se_DeleteTerminologyCommand = se_DeleteTerminologyCommand;
30
30
  const se_DescribeTextTranslationJobCommand = async (input, context) => {
31
31
  const headers = sharedHeaders("DescribeTextTranslationJob");
32
32
  let body;
33
- body = JSON.stringify(se_DescribeTextTranslationJobRequest(input, context));
33
+ body = JSON.stringify((0, smithy_client_1._json)(input));
34
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
35
  };
36
36
  exports.se_DescribeTextTranslationJobCommand = se_DescribeTextTranslationJobCommand;
37
37
  const se_GetParallelDataCommand = async (input, context) => {
38
38
  const headers = sharedHeaders("GetParallelData");
39
39
  let body;
40
- body = JSON.stringify(se_GetParallelDataRequest(input, context));
40
+ body = JSON.stringify((0, smithy_client_1._json)(input));
41
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
42
  };
43
43
  exports.se_GetParallelDataCommand = se_GetParallelDataCommand;
44
44
  const se_GetTerminologyCommand = async (input, context) => {
45
45
  const headers = sharedHeaders("GetTerminology");
46
46
  let body;
47
- body = JSON.stringify(se_GetTerminologyRequest(input, context));
47
+ body = JSON.stringify((0, smithy_client_1._json)(input));
48
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
49
  };
50
50
  exports.se_GetTerminologyCommand = se_GetTerminologyCommand;
@@ -58,28 +58,28 @@ exports.se_ImportTerminologyCommand = se_ImportTerminologyCommand;
58
58
  const se_ListLanguagesCommand = async (input, context) => {
59
59
  const headers = sharedHeaders("ListLanguages");
60
60
  let body;
61
- body = JSON.stringify(se_ListLanguagesRequest(input, context));
61
+ body = JSON.stringify((0, smithy_client_1._json)(input));
62
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
63
  };
64
64
  exports.se_ListLanguagesCommand = se_ListLanguagesCommand;
65
65
  const se_ListParallelDataCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("ListParallelData");
67
67
  let body;
68
- body = JSON.stringify(se_ListParallelDataRequest(input, context));
68
+ body = JSON.stringify((0, smithy_client_1._json)(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  exports.se_ListParallelDataCommand = se_ListParallelDataCommand;
72
72
  const se_ListTagsForResourceCommand = async (input, context) => {
73
73
  const headers = sharedHeaders("ListTagsForResource");
74
74
  let body;
75
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
75
+ body = JSON.stringify((0, smithy_client_1._json)(input));
76
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
77
  };
78
78
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
79
79
  const se_ListTerminologiesCommand = async (input, context) => {
80
80
  const headers = sharedHeaders("ListTerminologies");
81
81
  let body;
82
- body = JSON.stringify(se_ListTerminologiesRequest(input, context));
82
+ body = JSON.stringify((0, smithy_client_1._json)(input));
83
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
84
  };
85
85
  exports.se_ListTerminologiesCommand = se_ListTerminologiesCommand;
@@ -100,28 +100,28 @@ exports.se_StartTextTranslationJobCommand = se_StartTextTranslationJobCommand;
100
100
  const se_StopTextTranslationJobCommand = async (input, context) => {
101
101
  const headers = sharedHeaders("StopTextTranslationJob");
102
102
  let body;
103
- body = JSON.stringify(se_StopTextTranslationJobRequest(input, context));
103
+ body = JSON.stringify((0, smithy_client_1._json)(input));
104
104
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
105
  };
106
106
  exports.se_StopTextTranslationJobCommand = se_StopTextTranslationJobCommand;
107
107
  const se_TagResourceCommand = async (input, context) => {
108
108
  const headers = sharedHeaders("TagResource");
109
109
  let body;
110
- body = JSON.stringify(se_TagResourceRequest(input, context));
110
+ body = JSON.stringify((0, smithy_client_1._json)(input));
111
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
112
  };
113
113
  exports.se_TagResourceCommand = se_TagResourceCommand;
114
114
  const se_TranslateTextCommand = async (input, context) => {
115
115
  const headers = sharedHeaders("TranslateText");
116
116
  let body;
117
- body = JSON.stringify(se_TranslateTextRequest(input, context));
117
+ body = JSON.stringify((0, smithy_client_1._json)(input));
118
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
119
  };
120
120
  exports.se_TranslateTextCommand = se_TranslateTextCommand;
121
121
  const se_UntagResourceCommand = async (input, context) => {
122
122
  const headers = sharedHeaders("UntagResource");
123
123
  let body;
124
- body = JSON.stringify(se_UntagResourceRequest(input, context));
124
+ body = JSON.stringify((0, smithy_client_1._json)(input));
125
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
126
  };
127
127
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
@@ -138,12 +138,12 @@ const de_CreateParallelDataCommand = async (output, context) => {
138
138
  }
139
139
  const data = await parseBody(output.body, context);
140
140
  let contents = {};
141
- contents = de_CreateParallelDataResponse(data, context);
141
+ contents = (0, smithy_client_1._json)(data);
142
142
  const response = {
143
143
  $metadata: deserializeMetadata(output),
144
144
  ...contents,
145
145
  };
146
- return Promise.resolve(response);
146
+ return response;
147
147
  };
148
148
  exports.de_CreateParallelDataCommand = de_CreateParallelDataCommand;
149
149
  const de_CreateParallelDataCommandError = async (output, context) => {
@@ -179,10 +179,9 @@ const de_CreateParallelDataCommandError = async (output, context) => {
179
179
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
180
180
  default:
181
181
  const parsedBody = parsedOutput.body;
182
- (0, smithy_client_1.throwDefaultError)({
182
+ return throwDefaultError({
183
183
  output,
184
184
  parsedBody,
185
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
186
185
  errorCode,
187
186
  });
188
187
  }
@@ -193,12 +192,12 @@ const de_DeleteParallelDataCommand = async (output, context) => {
193
192
  }
194
193
  const data = await parseBody(output.body, context);
195
194
  let contents = {};
196
- contents = de_DeleteParallelDataResponse(data, context);
195
+ contents = (0, smithy_client_1._json)(data);
197
196
  const response = {
198
197
  $metadata: deserializeMetadata(output),
199
198
  ...contents,
200
199
  };
201
- return Promise.resolve(response);
200
+ return response;
202
201
  };
203
202
  exports.de_DeleteParallelDataCommand = de_DeleteParallelDataCommand;
204
203
  const de_DeleteParallelDataCommandError = async (output, context) => {
@@ -222,10 +221,9 @@ const de_DeleteParallelDataCommandError = async (output, context) => {
222
221
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
223
222
  default:
224
223
  const parsedBody = parsedOutput.body;
225
- (0, smithy_client_1.throwDefaultError)({
224
+ return throwDefaultError({
226
225
  output,
227
226
  parsedBody,
228
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
229
227
  errorCode,
230
228
  });
231
229
  }
@@ -238,7 +236,7 @@ const de_DeleteTerminologyCommand = async (output, context) => {
238
236
  const response = {
239
237
  $metadata: deserializeMetadata(output),
240
238
  };
241
- return Promise.resolve(response);
239
+ return response;
242
240
  };
243
241
  exports.de_DeleteTerminologyCommand = de_DeleteTerminologyCommand;
244
242
  const de_DeleteTerminologyCommandError = async (output, context) => {
@@ -262,10 +260,9 @@ const de_DeleteTerminologyCommandError = async (output, context) => {
262
260
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
263
261
  default:
264
262
  const parsedBody = parsedOutput.body;
265
- (0, smithy_client_1.throwDefaultError)({
263
+ return throwDefaultError({
266
264
  output,
267
265
  parsedBody,
268
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
269
266
  errorCode,
270
267
  });
271
268
  }
@@ -281,7 +278,7 @@ const de_DescribeTextTranslationJobCommand = async (output, context) => {
281
278
  $metadata: deserializeMetadata(output),
282
279
  ...contents,
283
280
  };
284
- return Promise.resolve(response);
281
+ return response;
285
282
  };
286
283
  exports.de_DescribeTextTranslationJobCommand = de_DescribeTextTranslationJobCommand;
287
284
  const de_DescribeTextTranslationJobCommandError = async (output, context) => {
@@ -302,10 +299,9 @@ const de_DescribeTextTranslationJobCommandError = async (output, context) => {
302
299
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
303
300
  default:
304
301
  const parsedBody = parsedOutput.body;
305
- (0, smithy_client_1.throwDefaultError)({
302
+ return throwDefaultError({
306
303
  output,
307
304
  parsedBody,
308
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
309
305
  errorCode,
310
306
  });
311
307
  }
@@ -321,7 +317,7 @@ const de_GetParallelDataCommand = async (output, context) => {
321
317
  $metadata: deserializeMetadata(output),
322
318
  ...contents,
323
319
  };
324
- return Promise.resolve(response);
320
+ return response;
325
321
  };
326
322
  exports.de_GetParallelDataCommand = de_GetParallelDataCommand;
327
323
  const de_GetParallelDataCommandError = async (output, context) => {
@@ -345,10 +341,9 @@ const de_GetParallelDataCommandError = async (output, context) => {
345
341
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
346
342
  default:
347
343
  const parsedBody = parsedOutput.body;
348
- (0, smithy_client_1.throwDefaultError)({
344
+ return throwDefaultError({
349
345
  output,
350
346
  parsedBody,
351
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
352
347
  errorCode,
353
348
  });
354
349
  }
@@ -364,7 +359,7 @@ const de_GetTerminologyCommand = async (output, context) => {
364
359
  $metadata: deserializeMetadata(output),
365
360
  ...contents,
366
361
  };
367
- return Promise.resolve(response);
362
+ return response;
368
363
  };
369
364
  exports.de_GetTerminologyCommand = de_GetTerminologyCommand;
370
365
  const de_GetTerminologyCommandError = async (output, context) => {
@@ -388,10 +383,9 @@ const de_GetTerminologyCommandError = async (output, context) => {
388
383
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
389
384
  default:
390
385
  const parsedBody = parsedOutput.body;
391
- (0, smithy_client_1.throwDefaultError)({
386
+ return throwDefaultError({
392
387
  output,
393
388
  parsedBody,
394
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
395
389
  errorCode,
396
390
  });
397
391
  }
@@ -407,7 +401,7 @@ const de_ImportTerminologyCommand = async (output, context) => {
407
401
  $metadata: deserializeMetadata(output),
408
402
  ...contents,
409
403
  };
410
- return Promise.resolve(response);
404
+ return response;
411
405
  };
412
406
  exports.de_ImportTerminologyCommand = de_ImportTerminologyCommand;
413
407
  const de_ImportTerminologyCommandError = async (output, context) => {
@@ -437,10 +431,9 @@ const de_ImportTerminologyCommandError = async (output, context) => {
437
431
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
438
432
  default:
439
433
  const parsedBody = parsedOutput.body;
440
- (0, smithy_client_1.throwDefaultError)({
434
+ return throwDefaultError({
441
435
  output,
442
436
  parsedBody,
443
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
444
437
  errorCode,
445
438
  });
446
439
  }
@@ -451,12 +444,12 @@ const de_ListLanguagesCommand = async (output, context) => {
451
444
  }
452
445
  const data = await parseBody(output.body, context);
453
446
  let contents = {};
454
- contents = de_ListLanguagesResponse(data, context);
447
+ contents = (0, smithy_client_1._json)(data);
455
448
  const response = {
456
449
  $metadata: deserializeMetadata(output),
457
450
  ...contents,
458
451
  };
459
- return Promise.resolve(response);
452
+ return response;
460
453
  };
461
454
  exports.de_ListLanguagesCommand = de_ListLanguagesCommand;
462
455
  const de_ListLanguagesCommandError = async (output, context) => {
@@ -480,10 +473,9 @@ const de_ListLanguagesCommandError = async (output, context) => {
480
473
  throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context);
481
474
  default:
482
475
  const parsedBody = parsedOutput.body;
483
- (0, smithy_client_1.throwDefaultError)({
476
+ return throwDefaultError({
484
477
  output,
485
478
  parsedBody,
486
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
487
479
  errorCode,
488
480
  });
489
481
  }
@@ -499,7 +491,7 @@ const de_ListParallelDataCommand = async (output, context) => {
499
491
  $metadata: deserializeMetadata(output),
500
492
  ...contents,
501
493
  };
502
- return Promise.resolve(response);
494
+ return response;
503
495
  };
504
496
  exports.de_ListParallelDataCommand = de_ListParallelDataCommand;
505
497
  const de_ListParallelDataCommandError = async (output, context) => {
@@ -520,10 +512,9 @@ const de_ListParallelDataCommandError = async (output, context) => {
520
512
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
521
513
  default:
522
514
  const parsedBody = parsedOutput.body;
523
- (0, smithy_client_1.throwDefaultError)({
515
+ return throwDefaultError({
524
516
  output,
525
517
  parsedBody,
526
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
527
518
  errorCode,
528
519
  });
529
520
  }
@@ -534,12 +525,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
534
525
  }
535
526
  const data = await parseBody(output.body, context);
536
527
  let contents = {};
537
- contents = de_ListTagsForResourceResponse(data, context);
528
+ contents = (0, smithy_client_1._json)(data);
538
529
  const response = {
539
530
  $metadata: deserializeMetadata(output),
540
531
  ...contents,
541
532
  };
542
- return Promise.resolve(response);
533
+ return response;
543
534
  };
544
535
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
545
536
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -560,10 +551,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
560
551
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
561
552
  default:
562
553
  const parsedBody = parsedOutput.body;
563
- (0, smithy_client_1.throwDefaultError)({
554
+ return throwDefaultError({
564
555
  output,
565
556
  parsedBody,
566
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
567
557
  errorCode,
568
558
  });
569
559
  }
@@ -579,7 +569,7 @@ const de_ListTerminologiesCommand = async (output, context) => {
579
569
  $metadata: deserializeMetadata(output),
580
570
  ...contents,
581
571
  };
582
- return Promise.resolve(response);
572
+ return response;
583
573
  };
584
574
  exports.de_ListTerminologiesCommand = de_ListTerminologiesCommand;
585
575
  const de_ListTerminologiesCommandError = async (output, context) => {
@@ -600,10 +590,9 @@ const de_ListTerminologiesCommandError = async (output, context) => {
600
590
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
601
591
  default:
602
592
  const parsedBody = parsedOutput.body;
603
- (0, smithy_client_1.throwDefaultError)({
593
+ return throwDefaultError({
604
594
  output,
605
595
  parsedBody,
606
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
607
596
  errorCode,
608
597
  });
609
598
  }
@@ -619,7 +608,7 @@ const de_ListTextTranslationJobsCommand = async (output, context) => {
619
608
  $metadata: deserializeMetadata(output),
620
609
  ...contents,
621
610
  };
622
- return Promise.resolve(response);
611
+ return response;
623
612
  };
624
613
  exports.de_ListTextTranslationJobsCommand = de_ListTextTranslationJobsCommand;
625
614
  const de_ListTextTranslationJobsCommandError = async (output, context) => {
@@ -643,10 +632,9 @@ const de_ListTextTranslationJobsCommandError = async (output, context) => {
643
632
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
644
633
  default:
645
634
  const parsedBody = parsedOutput.body;
646
- (0, smithy_client_1.throwDefaultError)({
635
+ return throwDefaultError({
647
636
  output,
648
637
  parsedBody,
649
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
650
638
  errorCode,
651
639
  });
652
640
  }
@@ -657,12 +645,12 @@ const de_StartTextTranslationJobCommand = async (output, context) => {
657
645
  }
658
646
  const data = await parseBody(output.body, context);
659
647
  let contents = {};
660
- contents = de_StartTextTranslationJobResponse(data, context);
648
+ contents = (0, smithy_client_1._json)(data);
661
649
  const response = {
662
650
  $metadata: deserializeMetadata(output),
663
651
  ...contents,
664
652
  };
665
- return Promise.resolve(response);
653
+ return response;
666
654
  };
667
655
  exports.de_StartTextTranslationJobCommand = de_StartTextTranslationJobCommand;
668
656
  const de_StartTextTranslationJobCommandError = async (output, context) => {
@@ -692,10 +680,9 @@ const de_StartTextTranslationJobCommandError = async (output, context) => {
692
680
  throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
693
681
  default:
694
682
  const parsedBody = parsedOutput.body;
695
- (0, smithy_client_1.throwDefaultError)({
683
+ return throwDefaultError({
696
684
  output,
697
685
  parsedBody,
698
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
699
686
  errorCode,
700
687
  });
701
688
  }
@@ -706,12 +693,12 @@ const de_StopTextTranslationJobCommand = async (output, context) => {
706
693
  }
707
694
  const data = await parseBody(output.body, context);
708
695
  let contents = {};
709
- contents = de_StopTextTranslationJobResponse(data, context);
696
+ contents = (0, smithy_client_1._json)(data);
710
697
  const response = {
711
698
  $metadata: deserializeMetadata(output),
712
699
  ...contents,
713
700
  };
714
- return Promise.resolve(response);
701
+ return response;
715
702
  };
716
703
  exports.de_StopTextTranslationJobCommand = de_StopTextTranslationJobCommand;
717
704
  const de_StopTextTranslationJobCommandError = async (output, context) => {
@@ -732,10 +719,9 @@ const de_StopTextTranslationJobCommandError = async (output, context) => {
732
719
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
733
720
  default:
734
721
  const parsedBody = parsedOutput.body;
735
- (0, smithy_client_1.throwDefaultError)({
722
+ return throwDefaultError({
736
723
  output,
737
724
  parsedBody,
738
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
739
725
  errorCode,
740
726
  });
741
727
  }
@@ -746,12 +732,12 @@ const de_TagResourceCommand = async (output, context) => {
746
732
  }
747
733
  const data = await parseBody(output.body, context);
748
734
  let contents = {};
749
- contents = de_TagResourceResponse(data, context);
735
+ contents = (0, smithy_client_1._json)(data);
750
736
  const response = {
751
737
  $metadata: deserializeMetadata(output),
752
738
  ...contents,
753
739
  };
754
- return Promise.resolve(response);
740
+ return response;
755
741
  };
756
742
  exports.de_TagResourceCommand = de_TagResourceCommand;
757
743
  const de_TagResourceCommandError = async (output, context) => {
@@ -778,10 +764,9 @@ const de_TagResourceCommandError = async (output, context) => {
778
764
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
779
765
  default:
780
766
  const parsedBody = parsedOutput.body;
781
- (0, smithy_client_1.throwDefaultError)({
767
+ return throwDefaultError({
782
768
  output,
783
769
  parsedBody,
784
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
785
770
  errorCode,
786
771
  });
787
772
  }
@@ -792,12 +777,12 @@ const de_TranslateTextCommand = async (output, context) => {
792
777
  }
793
778
  const data = await parseBody(output.body, context);
794
779
  let contents = {};
795
- contents = de_TranslateTextResponse(data, context);
780
+ contents = (0, smithy_client_1._json)(data);
796
781
  const response = {
797
782
  $metadata: deserializeMetadata(output),
798
783
  ...contents,
799
784
  };
800
- return Promise.resolve(response);
785
+ return response;
801
786
  };
802
787
  exports.de_TranslateTextCommand = de_TranslateTextCommand;
803
788
  const de_TranslateTextCommandError = async (output, context) => {
@@ -833,10 +818,9 @@ const de_TranslateTextCommandError = async (output, context) => {
833
818
  throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
834
819
  default:
835
820
  const parsedBody = parsedOutput.body;
836
- (0, smithy_client_1.throwDefaultError)({
821
+ return throwDefaultError({
837
822
  output,
838
823
  parsedBody,
839
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
840
824
  errorCode,
841
825
  });
842
826
  }
@@ -847,12 +831,12 @@ const de_UntagResourceCommand = async (output, context) => {
847
831
  }
848
832
  const data = await parseBody(output.body, context);
849
833
  let contents = {};
850
- contents = de_UntagResourceResponse(data, context);
834
+ contents = (0, smithy_client_1._json)(data);
851
835
  const response = {
852
836
  $metadata: deserializeMetadata(output),
853
837
  ...contents,
854
838
  };
855
- return Promise.resolve(response);
839
+ return response;
856
840
  };
857
841
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
858
842
  const de_UntagResourceCommandError = async (output, context) => {
@@ -876,10 +860,9 @@ const de_UntagResourceCommandError = async (output, context) => {
876
860
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
877
861
  default:
878
862
  const parsedBody = parsedOutput.body;
879
- (0, smithy_client_1.throwDefaultError)({
863
+ return throwDefaultError({
880
864
  output,
881
865
  parsedBody,
882
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
883
866
  errorCode,
884
867
  });
885
868
  }
@@ -895,7 +878,7 @@ const de_UpdateParallelDataCommand = async (output, context) => {
895
878
  $metadata: deserializeMetadata(output),
896
879
  ...contents,
897
880
  };
898
- return Promise.resolve(response);
881
+ return response;
899
882
  };
900
883
  exports.de_UpdateParallelDataCommand = de_UpdateParallelDataCommand;
901
884
  const de_UpdateParallelDataCommandError = async (output, context) => {
@@ -931,17 +914,16 @@ const de_UpdateParallelDataCommandError = async (output, context) => {
931
914
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
932
915
  default:
933
916
  const parsedBody = parsedOutput.body;
934
- (0, smithy_client_1.throwDefaultError)({
917
+ return throwDefaultError({
935
918
  output,
936
919
  parsedBody,
937
- exceptionCtor: TranslateServiceException_1.TranslateServiceException,
938
920
  errorCode,
939
921
  });
940
922
  }
941
923
  };
942
924
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
943
925
  const body = parsedOutput.body;
944
- const deserialized = de_ConcurrentModificationException(body, context);
926
+ const deserialized = (0, smithy_client_1._json)(body);
945
927
  const exception = new models_0_1.ConcurrentModificationException({
946
928
  $metadata: deserializeMetadata(parsedOutput),
947
929
  ...deserialized,
@@ -950,7 +932,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
950
932
  };
951
933
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
952
934
  const body = parsedOutput.body;
953
- const deserialized = de_ConflictException(body, context);
935
+ const deserialized = (0, smithy_client_1._json)(body);
954
936
  const exception = new models_0_1.ConflictException({
955
937
  $metadata: deserializeMetadata(parsedOutput),
956
938
  ...deserialized,
@@ -959,7 +941,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
959
941
  };
960
942
  const de_DetectedLanguageLowConfidenceExceptionRes = async (parsedOutput, context) => {
961
943
  const body = parsedOutput.body;
962
- const deserialized = de_DetectedLanguageLowConfidenceException(body, context);
944
+ const deserialized = (0, smithy_client_1._json)(body);
963
945
  const exception = new models_0_1.DetectedLanguageLowConfidenceException({
964
946
  $metadata: deserializeMetadata(parsedOutput),
965
947
  ...deserialized,
@@ -968,7 +950,7 @@ const de_DetectedLanguageLowConfidenceExceptionRes = async (parsedOutput, contex
968
950
  };
969
951
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
970
952
  const body = parsedOutput.body;
971
- const deserialized = de_InternalServerException(body, context);
953
+ const deserialized = (0, smithy_client_1._json)(body);
972
954
  const exception = new models_0_1.InternalServerException({
973
955
  $metadata: deserializeMetadata(parsedOutput),
974
956
  ...deserialized,
@@ -977,7 +959,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
977
959
  };
978
960
  const de_InvalidFilterExceptionRes = async (parsedOutput, context) => {
979
961
  const body = parsedOutput.body;
980
- const deserialized = de_InvalidFilterException(body, context);
962
+ const deserialized = (0, smithy_client_1._json)(body);
981
963
  const exception = new models_0_1.InvalidFilterException({
982
964
  $metadata: deserializeMetadata(parsedOutput),
983
965
  ...deserialized,
@@ -986,7 +968,7 @@ const de_InvalidFilterExceptionRes = async (parsedOutput, context) => {
986
968
  };
987
969
  const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
988
970
  const body = parsedOutput.body;
989
- const deserialized = de_InvalidParameterValueException(body, context);
971
+ const deserialized = (0, smithy_client_1._json)(body);
990
972
  const exception = new models_0_1.InvalidParameterValueException({
991
973
  $metadata: deserializeMetadata(parsedOutput),
992
974
  ...deserialized,
@@ -995,7 +977,7 @@ const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
995
977
  };
996
978
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
997
979
  const body = parsedOutput.body;
998
- const deserialized = de_InvalidRequestException(body, context);
980
+ const deserialized = (0, smithy_client_1._json)(body);
999
981
  const exception = new models_0_1.InvalidRequestException({
1000
982
  $metadata: deserializeMetadata(parsedOutput),
1001
983
  ...deserialized,
@@ -1004,7 +986,7 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1004
986
  };
1005
987
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1006
988
  const body = parsedOutput.body;
1007
- const deserialized = de_LimitExceededException(body, context);
989
+ const deserialized = (0, smithy_client_1._json)(body);
1008
990
  const exception = new models_0_1.LimitExceededException({
1009
991
  $metadata: deserializeMetadata(parsedOutput),
1010
992
  ...deserialized,
@@ -1013,7 +995,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1013
995
  };
1014
996
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1015
997
  const body = parsedOutput.body;
1016
- const deserialized = de_ResourceNotFoundException(body, context);
998
+ const deserialized = (0, smithy_client_1._json)(body);
1017
999
  const exception = new models_0_1.ResourceNotFoundException({
1018
1000
  $metadata: deserializeMetadata(parsedOutput),
1019
1001
  ...deserialized,
@@ -1022,7 +1004,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1022
1004
  };
1023
1005
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1024
1006
  const body = parsedOutput.body;
1025
- const deserialized = de_ServiceUnavailableException(body, context);
1007
+ const deserialized = (0, smithy_client_1._json)(body);
1026
1008
  const exception = new models_0_1.ServiceUnavailableException({
1027
1009
  $metadata: deserializeMetadata(parsedOutput),
1028
1010
  ...deserialized,
@@ -1031,7 +1013,7 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1031
1013
  };
1032
1014
  const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
1033
1015
  const body = parsedOutput.body;
1034
- const deserialized = de_TextSizeLimitExceededException(body, context);
1016
+ const deserialized = (0, smithy_client_1._json)(body);
1035
1017
  const exception = new models_0_1.TextSizeLimitExceededException({
1036
1018
  $metadata: deserializeMetadata(parsedOutput),
1037
1019
  ...deserialized,
@@ -1040,7 +1022,7 @@ const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
1040
1022
  };
1041
1023
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1042
1024
  const body = parsedOutput.body;
1043
- const deserialized = de_TooManyRequestsException(body, context);
1025
+ const deserialized = (0, smithy_client_1._json)(body);
1044
1026
  const exception = new models_0_1.TooManyRequestsException({
1045
1027
  $metadata: deserializeMetadata(parsedOutput),
1046
1028
  ...deserialized,
@@ -1049,7 +1031,7 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1049
1031
  };
1050
1032
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1051
1033
  const body = parsedOutput.body;
1052
- const deserialized = de_TooManyTagsException(body, context);
1034
+ const deserialized = (0, smithy_client_1._json)(body);
1053
1035
  const exception = new models_0_1.TooManyTagsException({
1054
1036
  $metadata: deserializeMetadata(parsedOutput),
1055
1037
  ...deserialized,
@@ -1058,7 +1040,7 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1058
1040
  };
1059
1041
  const de_UnsupportedDisplayLanguageCodeExceptionRes = async (parsedOutput, context) => {
1060
1042
  const body = parsedOutput.body;
1061
- const deserialized = de_UnsupportedDisplayLanguageCodeException(body, context);
1043
+ const deserialized = (0, smithy_client_1._json)(body);
1062
1044
  const exception = new models_0_1.UnsupportedDisplayLanguageCodeException({
1063
1045
  $metadata: deserializeMetadata(parsedOutput),
1064
1046
  ...deserialized,
@@ -1067,7 +1049,7 @@ const de_UnsupportedDisplayLanguageCodeExceptionRes = async (parsedOutput, conte
1067
1049
  };
1068
1050
  const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) => {
1069
1051
  const body = parsedOutput.body;
1070
- const deserialized = de_UnsupportedLanguagePairException(body, context);
1052
+ const deserialized = (0, smithy_client_1._json)(body);
1071
1053
  const exception = new models_0_1.UnsupportedLanguagePairException({
1072
1054
  $metadata: deserializeMetadata(parsedOutput),
1073
1055
  ...deserialized,
@@ -1075,680 +1057,202 @@ const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) =>
1075
1057
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1076
1058
  };
1077
1059
  const se_CreateParallelDataRequest = (input, context) => {
1078
- return {
1079
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
1080
- ...(input.Description != null && { Description: input.Description }),
1081
- ...(input.EncryptionKey != null && { EncryptionKey: se_EncryptionKey(input.EncryptionKey, context) }),
1082
- ...(input.Name != null && { Name: input.Name }),
1083
- ...(input.ParallelDataConfig != null && {
1084
- ParallelDataConfig: se_ParallelDataConfig(input.ParallelDataConfig, context),
1085
- }),
1086
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1087
- };
1088
- };
1089
- const se_DeleteParallelDataRequest = (input, context) => {
1090
- return {
1091
- ...(input.Name != null && { Name: input.Name }),
1092
- };
1093
- };
1094
- const se_DeleteTerminologyRequest = (input, context) => {
1095
- return {
1096
- ...(input.Name != null && { Name: input.Name }),
1097
- };
1098
- };
1099
- const se_DescribeTextTranslationJobRequest = (input, context) => {
1100
- return {
1101
- ...(input.JobId != null && { JobId: input.JobId }),
1102
- };
1103
- };
1104
- const se_EncryptionKey = (input, context) => {
1105
- return {
1106
- ...(input.Id != null && { Id: input.Id }),
1107
- ...(input.Type != null && { Type: input.Type }),
1108
- };
1109
- };
1110
- const se_GetParallelDataRequest = (input, context) => {
1111
- return {
1112
- ...(input.Name != null && { Name: input.Name }),
1113
- };
1114
- };
1115
- const se_GetTerminologyRequest = (input, context) => {
1116
- return {
1117
- ...(input.Name != null && { Name: input.Name }),
1118
- ...(input.TerminologyDataFormat != null && { TerminologyDataFormat: input.TerminologyDataFormat }),
1119
- };
1060
+ return (0, smithy_client_1.take)(input, {
1061
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
1062
+ Description: [],
1063
+ EncryptionKey: smithy_client_1._json,
1064
+ Name: [],
1065
+ ParallelDataConfig: smithy_client_1._json,
1066
+ Tags: smithy_client_1._json,
1067
+ });
1120
1068
  };
1121
1069
  const se_ImportTerminologyRequest = (input, context) => {
1122
- return {
1123
- ...(input.Description != null && { Description: input.Description }),
1124
- ...(input.EncryptionKey != null && { EncryptionKey: se_EncryptionKey(input.EncryptionKey, context) }),
1125
- ...(input.MergeStrategy != null && { MergeStrategy: input.MergeStrategy }),
1126
- ...(input.Name != null && { Name: input.Name }),
1127
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1128
- ...(input.TerminologyData != null && { TerminologyData: se_TerminologyData(input.TerminologyData, context) }),
1129
- };
1130
- };
1131
- const se_InputDataConfig = (input, context) => {
1132
- return {
1133
- ...(input.ContentType != null && { ContentType: input.ContentType }),
1134
- ...(input.S3Uri != null && { S3Uri: input.S3Uri }),
1135
- };
1136
- };
1137
- const se_ListLanguagesRequest = (input, context) => {
1138
- return {
1139
- ...(input.DisplayLanguageCode != null && { DisplayLanguageCode: input.DisplayLanguageCode }),
1140
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1141
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1142
- };
1143
- };
1144
- const se_ListParallelDataRequest = (input, context) => {
1145
- return {
1146
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1147
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1148
- };
1149
- };
1150
- const se_ListTagsForResourceRequest = (input, context) => {
1151
- return {
1152
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1153
- };
1154
- };
1155
- const se_ListTerminologiesRequest = (input, context) => {
1156
- return {
1157
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1158
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1159
- };
1070
+ return (0, smithy_client_1.take)(input, {
1071
+ Description: [],
1072
+ EncryptionKey: smithy_client_1._json,
1073
+ MergeStrategy: [],
1074
+ Name: [],
1075
+ Tags: smithy_client_1._json,
1076
+ TerminologyData: (_) => se_TerminologyData(_, context),
1077
+ });
1160
1078
  };
1161
1079
  const se_ListTextTranslationJobsRequest = (input, context) => {
1162
- return {
1163
- ...(input.Filter != null && { Filter: se_TextTranslationJobFilter(input.Filter, context) }),
1164
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1165
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1166
- };
1167
- };
1168
- const se_OutputDataConfig = (input, context) => {
1169
- return {
1170
- ...(input.EncryptionKey != null && { EncryptionKey: se_EncryptionKey(input.EncryptionKey, context) }),
1171
- ...(input.S3Uri != null && { S3Uri: input.S3Uri }),
1172
- };
1173
- };
1174
- const se_ParallelDataConfig = (input, context) => {
1175
- return {
1176
- ...(input.Format != null && { Format: input.Format }),
1177
- ...(input.S3Uri != null && { S3Uri: input.S3Uri }),
1178
- };
1179
- };
1180
- const se_ResourceNameList = (input, context) => {
1181
- return input
1182
- .filter((e) => e != null)
1183
- .map((entry) => {
1184
- return entry;
1080
+ return (0, smithy_client_1.take)(input, {
1081
+ Filter: (_) => se_TextTranslationJobFilter(_, context),
1082
+ MaxResults: [],
1083
+ NextToken: [],
1185
1084
  });
1186
1085
  };
1187
1086
  const se_StartTextTranslationJobRequest = (input, context) => {
1188
- return {
1189
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
1190
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1191
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1192
- ...(input.JobName != null && { JobName: input.JobName }),
1193
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1194
- ...(input.ParallelDataNames != null && {
1195
- ParallelDataNames: se_ResourceNameList(input.ParallelDataNames, context),
1196
- }),
1197
- ...(input.Settings != null && { Settings: se_TranslationSettings(input.Settings, context) }),
1198
- ...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }),
1199
- ...(input.TargetLanguageCodes != null && {
1200
- TargetLanguageCodes: se_TargetLanguageCodeStringList(input.TargetLanguageCodes, context),
1201
- }),
1202
- ...(input.TerminologyNames != null && { TerminologyNames: se_ResourceNameList(input.TerminologyNames, context) }),
1203
- };
1204
- };
1205
- const se_StopTextTranslationJobRequest = (input, context) => {
1206
- return {
1207
- ...(input.JobId != null && { JobId: input.JobId }),
1208
- };
1209
- };
1210
- const se_Tag = (input, context) => {
1211
- return {
1212
- ...(input.Key != null && { Key: input.Key }),
1213
- ...(input.Value != null && { Value: input.Value }),
1214
- };
1215
- };
1216
- const se_TagKeyList = (input, context) => {
1217
- return input
1218
- .filter((e) => e != null)
1219
- .map((entry) => {
1220
- return entry;
1221
- });
1222
- };
1223
- const se_TagList = (input, context) => {
1224
- return input
1225
- .filter((e) => e != null)
1226
- .map((entry) => {
1227
- return se_Tag(entry, context);
1228
- });
1229
- };
1230
- const se_TagResourceRequest = (input, context) => {
1231
- return {
1232
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1233
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1234
- };
1235
- };
1236
- const se_TargetLanguageCodeStringList = (input, context) => {
1237
- return input
1238
- .filter((e) => e != null)
1239
- .map((entry) => {
1240
- return entry;
1087
+ return (0, smithy_client_1.take)(input, {
1088
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
1089
+ DataAccessRoleArn: [],
1090
+ InputDataConfig: smithy_client_1._json,
1091
+ JobName: [],
1092
+ OutputDataConfig: smithy_client_1._json,
1093
+ ParallelDataNames: smithy_client_1._json,
1094
+ Settings: smithy_client_1._json,
1095
+ SourceLanguageCode: [],
1096
+ TargetLanguageCodes: smithy_client_1._json,
1097
+ TerminologyNames: smithy_client_1._json,
1241
1098
  });
1242
1099
  };
1243
1100
  const se_TerminologyData = (input, context) => {
1244
- return {
1245
- ...(input.Directionality != null && { Directionality: input.Directionality }),
1246
- ...(input.File != null && { File: context.base64Encoder(input.File) }),
1247
- ...(input.Format != null && { Format: input.Format }),
1248
- };
1101
+ return (0, smithy_client_1.take)(input, {
1102
+ Directionality: [],
1103
+ File: context.base64Encoder,
1104
+ Format: [],
1105
+ });
1249
1106
  };
1250
1107
  const se_TextTranslationJobFilter = (input, context) => {
1251
- return {
1252
- ...(input.JobName != null && { JobName: input.JobName }),
1253
- ...(input.JobStatus != null && { JobStatus: input.JobStatus }),
1254
- ...(input.SubmittedAfterTime != null && {
1255
- SubmittedAfterTime: Math.round(input.SubmittedAfterTime.getTime() / 1000),
1256
- }),
1257
- ...(input.SubmittedBeforeTime != null && {
1258
- SubmittedBeforeTime: Math.round(input.SubmittedBeforeTime.getTime() / 1000),
1259
- }),
1260
- };
1261
- };
1262
- const se_TranslateTextRequest = (input, context) => {
1263
- return {
1264
- ...(input.Settings != null && { Settings: se_TranslationSettings(input.Settings, context) }),
1265
- ...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }),
1266
- ...(input.TargetLanguageCode != null && { TargetLanguageCode: input.TargetLanguageCode }),
1267
- ...(input.TerminologyNames != null && { TerminologyNames: se_ResourceNameList(input.TerminologyNames, context) }),
1268
- ...(input.Text != null && { Text: input.Text }),
1269
- };
1270
- };
1271
- const se_TranslationSettings = (input, context) => {
1272
- return {
1273
- ...(input.Formality != null && { Formality: input.Formality }),
1274
- ...(input.Profanity != null && { Profanity: input.Profanity }),
1275
- };
1276
- };
1277
- const se_UntagResourceRequest = (input, context) => {
1278
- return {
1279
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1280
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1281
- };
1108
+ return (0, smithy_client_1.take)(input, {
1109
+ JobName: [],
1110
+ JobStatus: [],
1111
+ SubmittedAfterTime: (_) => Math.round(_.getTime() / 1000),
1112
+ SubmittedBeforeTime: (_) => Math.round(_.getTime() / 1000),
1113
+ });
1282
1114
  };
1283
1115
  const se_UpdateParallelDataRequest = (input, context) => {
1284
- return {
1285
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
1286
- ...(input.Description != null && { Description: input.Description }),
1287
- ...(input.Name != null && { Name: input.Name }),
1288
- ...(input.ParallelDataConfig != null && {
1289
- ParallelDataConfig: se_ParallelDataConfig(input.ParallelDataConfig, context),
1290
- }),
1291
- };
1292
- };
1293
- const de_AppliedTerminology = (output, context) => {
1294
- return {
1295
- Name: (0, smithy_client_1.expectString)(output.Name),
1296
- Terms: output.Terms != null ? de_TermList(output.Terms, context) : undefined,
1297
- };
1298
- };
1299
- const de_AppliedTerminologyList = (output, context) => {
1300
- const retVal = (output || [])
1301
- .filter((e) => e != null)
1302
- .map((entry) => {
1303
- if (entry === null) {
1304
- return null;
1305
- }
1306
- return de_AppliedTerminology(entry, context);
1116
+ return (0, smithy_client_1.take)(input, {
1117
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
1118
+ Description: [],
1119
+ Name: [],
1120
+ ParallelDataConfig: smithy_client_1._json,
1307
1121
  });
1308
- return retVal;
1309
- };
1310
- const de_ConcurrentModificationException = (output, context) => {
1311
- return {
1312
- Message: (0, smithy_client_1.expectString)(output.Message),
1313
- };
1314
- };
1315
- const de_ConflictException = (output, context) => {
1316
- return {
1317
- Message: (0, smithy_client_1.expectString)(output.Message),
1318
- };
1319
- };
1320
- const de_CreateParallelDataResponse = (output, context) => {
1321
- return {
1322
- Name: (0, smithy_client_1.expectString)(output.Name),
1323
- Status: (0, smithy_client_1.expectString)(output.Status),
1324
- };
1325
- };
1326
- const de_DeleteParallelDataResponse = (output, context) => {
1327
- return {
1328
- Name: (0, smithy_client_1.expectString)(output.Name),
1329
- Status: (0, smithy_client_1.expectString)(output.Status),
1330
- };
1331
1122
  };
1332
1123
  const de_DescribeTextTranslationJobResponse = (output, context) => {
1333
- return {
1334
- TextTranslationJobProperties: output.TextTranslationJobProperties != null
1335
- ? de_TextTranslationJobProperties(output.TextTranslationJobProperties, context)
1336
- : undefined,
1337
- };
1338
- };
1339
- const de_DetectedLanguageLowConfidenceException = (output, context) => {
1340
- return {
1341
- DetectedLanguageCode: (0, smithy_client_1.expectString)(output.DetectedLanguageCode),
1342
- Message: (0, smithy_client_1.expectString)(output.Message),
1343
- };
1344
- };
1345
- const de_EncryptionKey = (output, context) => {
1346
- return {
1347
- Id: (0, smithy_client_1.expectString)(output.Id),
1348
- Type: (0, smithy_client_1.expectString)(output.Type),
1349
- };
1124
+ return (0, smithy_client_1.take)(output, {
1125
+ TextTranslationJobProperties: (_) => de_TextTranslationJobProperties(_, context),
1126
+ });
1350
1127
  };
1351
1128
  const de_GetParallelDataResponse = (output, context) => {
1352
- return {
1353
- AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
1354
- ? de_ParallelDataDataLocation(output.AuxiliaryDataLocation, context)
1355
- : undefined,
1356
- DataLocation: output.DataLocation != null ? de_ParallelDataDataLocation(output.DataLocation, context) : undefined,
1357
- LatestUpdateAttemptAuxiliaryDataLocation: output.LatestUpdateAttemptAuxiliaryDataLocation != null
1358
- ? de_ParallelDataDataLocation(output.LatestUpdateAttemptAuxiliaryDataLocation, context)
1359
- : undefined,
1360
- ParallelDataProperties: output.ParallelDataProperties != null
1361
- ? de_ParallelDataProperties(output.ParallelDataProperties, context)
1362
- : undefined,
1363
- };
1129
+ return (0, smithy_client_1.take)(output, {
1130
+ AuxiliaryDataLocation: smithy_client_1._json,
1131
+ DataLocation: smithy_client_1._json,
1132
+ LatestUpdateAttemptAuxiliaryDataLocation: smithy_client_1._json,
1133
+ ParallelDataProperties: (_) => de_ParallelDataProperties(_, context),
1134
+ });
1364
1135
  };
1365
1136
  const de_GetTerminologyResponse = (output, context) => {
1366
- return {
1367
- AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
1368
- ? de_TerminologyDataLocation(output.AuxiliaryDataLocation, context)
1369
- : undefined,
1370
- TerminologyDataLocation: output.TerminologyDataLocation != null
1371
- ? de_TerminologyDataLocation(output.TerminologyDataLocation, context)
1372
- : undefined,
1373
- TerminologyProperties: output.TerminologyProperties != null
1374
- ? de_TerminologyProperties(output.TerminologyProperties, context)
1375
- : undefined,
1376
- };
1377
- };
1378
- const de_ImportTerminologyResponse = (output, context) => {
1379
- return {
1380
- AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
1381
- ? de_TerminologyDataLocation(output.AuxiliaryDataLocation, context)
1382
- : undefined,
1383
- TerminologyProperties: output.TerminologyProperties != null
1384
- ? de_TerminologyProperties(output.TerminologyProperties, context)
1385
- : undefined,
1386
- };
1387
- };
1388
- const de_InputDataConfig = (output, context) => {
1389
- return {
1390
- ContentType: (0, smithy_client_1.expectString)(output.ContentType),
1391
- S3Uri: (0, smithy_client_1.expectString)(output.S3Uri),
1392
- };
1393
- };
1394
- const de_InternalServerException = (output, context) => {
1395
- return {
1396
- Message: (0, smithy_client_1.expectString)(output.Message),
1397
- };
1398
- };
1399
- const de_InvalidFilterException = (output, context) => {
1400
- return {
1401
- Message: (0, smithy_client_1.expectString)(output.Message),
1402
- };
1403
- };
1404
- const de_InvalidParameterValueException = (output, context) => {
1405
- return {
1406
- Message: (0, smithy_client_1.expectString)(output.Message),
1407
- };
1408
- };
1409
- const de_InvalidRequestException = (output, context) => {
1410
- return {
1411
- Message: (0, smithy_client_1.expectString)(output.Message),
1412
- };
1413
- };
1414
- const de_JobDetails = (output, context) => {
1415
- return {
1416
- DocumentsWithErrorsCount: (0, smithy_client_1.expectInt32)(output.DocumentsWithErrorsCount),
1417
- InputDocumentsCount: (0, smithy_client_1.expectInt32)(output.InputDocumentsCount),
1418
- TranslatedDocumentsCount: (0, smithy_client_1.expectInt32)(output.TranslatedDocumentsCount),
1419
- };
1420
- };
1421
- const de_Language = (output, context) => {
1422
- return {
1423
- LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
1424
- LanguageName: (0, smithy_client_1.expectString)(output.LanguageName),
1425
- };
1426
- };
1427
- const de_LanguageCodeStringList = (output, context) => {
1428
- const retVal = (output || [])
1429
- .filter((e) => e != null)
1430
- .map((entry) => {
1431
- if (entry === null) {
1432
- return null;
1433
- }
1434
- return (0, smithy_client_1.expectString)(entry);
1137
+ return (0, smithy_client_1.take)(output, {
1138
+ AuxiliaryDataLocation: smithy_client_1._json,
1139
+ TerminologyDataLocation: smithy_client_1._json,
1140
+ TerminologyProperties: (_) => de_TerminologyProperties(_, context),
1435
1141
  });
1436
- return retVal;
1437
1142
  };
1438
- const de_LanguagesList = (output, context) => {
1439
- const retVal = (output || [])
1440
- .filter((e) => e != null)
1441
- .map((entry) => {
1442
- if (entry === null) {
1443
- return null;
1444
- }
1445
- return de_Language(entry, context);
1143
+ const de_ImportTerminologyResponse = (output, context) => {
1144
+ return (0, smithy_client_1.take)(output, {
1145
+ AuxiliaryDataLocation: smithy_client_1._json,
1146
+ TerminologyProperties: (_) => de_TerminologyProperties(_, context),
1446
1147
  });
1447
- return retVal;
1448
- };
1449
- const de_LimitExceededException = (output, context) => {
1450
- return {
1451
- Message: (0, smithy_client_1.expectString)(output.Message),
1452
- };
1453
- };
1454
- const de_ListLanguagesResponse = (output, context) => {
1455
- return {
1456
- DisplayLanguageCode: (0, smithy_client_1.expectString)(output.DisplayLanguageCode),
1457
- Languages: output.Languages != null ? de_LanguagesList(output.Languages, context) : undefined,
1458
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1459
- };
1460
1148
  };
1461
1149
  const de_ListParallelDataResponse = (output, context) => {
1462
- return {
1463
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1464
- ParallelDataPropertiesList: output.ParallelDataPropertiesList != null
1465
- ? de_ParallelDataPropertiesList(output.ParallelDataPropertiesList, context)
1466
- : undefined,
1467
- };
1468
- };
1469
- const de_ListTagsForResourceResponse = (output, context) => {
1470
- return {
1471
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1472
- };
1150
+ return (0, smithy_client_1.take)(output, {
1151
+ NextToken: smithy_client_1.expectString,
1152
+ ParallelDataPropertiesList: (_) => de_ParallelDataPropertiesList(_, context),
1153
+ });
1473
1154
  };
1474
1155
  const de_ListTerminologiesResponse = (output, context) => {
1475
- return {
1476
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1477
- TerminologyPropertiesList: output.TerminologyPropertiesList != null
1478
- ? de_TerminologyPropertiesList(output.TerminologyPropertiesList, context)
1479
- : undefined,
1480
- };
1156
+ return (0, smithy_client_1.take)(output, {
1157
+ NextToken: smithy_client_1.expectString,
1158
+ TerminologyPropertiesList: (_) => de_TerminologyPropertiesList(_, context),
1159
+ });
1481
1160
  };
1482
1161
  const de_ListTextTranslationJobsResponse = (output, context) => {
1483
- return {
1484
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1485
- TextTranslationJobPropertiesList: output.TextTranslationJobPropertiesList != null
1486
- ? de_TextTranslationJobPropertiesList(output.TextTranslationJobPropertiesList, context)
1487
- : undefined,
1488
- };
1489
- };
1490
- const de_OutputDataConfig = (output, context) => {
1491
- return {
1492
- EncryptionKey: output.EncryptionKey != null ? de_EncryptionKey(output.EncryptionKey, context) : undefined,
1493
- S3Uri: (0, smithy_client_1.expectString)(output.S3Uri),
1494
- };
1495
- };
1496
- const de_ParallelDataConfig = (output, context) => {
1497
- return {
1498
- Format: (0, smithy_client_1.expectString)(output.Format),
1499
- S3Uri: (0, smithy_client_1.expectString)(output.S3Uri),
1500
- };
1501
- };
1502
- const de_ParallelDataDataLocation = (output, context) => {
1503
- return {
1504
- Location: (0, smithy_client_1.expectString)(output.Location),
1505
- RepositoryType: (0, smithy_client_1.expectString)(output.RepositoryType),
1506
- };
1162
+ return (0, smithy_client_1.take)(output, {
1163
+ NextToken: smithy_client_1.expectString,
1164
+ TextTranslationJobPropertiesList: (_) => de_TextTranslationJobPropertiesList(_, context),
1165
+ });
1507
1166
  };
1508
1167
  const de_ParallelDataProperties = (output, context) => {
1509
- return {
1510
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1511
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1512
- Description: (0, smithy_client_1.expectString)(output.Description),
1513
- EncryptionKey: output.EncryptionKey != null ? de_EncryptionKey(output.EncryptionKey, context) : undefined,
1514
- FailedRecordCount: (0, smithy_client_1.expectLong)(output.FailedRecordCount),
1515
- ImportedDataSize: (0, smithy_client_1.expectLong)(output.ImportedDataSize),
1516
- ImportedRecordCount: (0, smithy_client_1.expectLong)(output.ImportedRecordCount),
1517
- LastUpdatedAt: output.LastUpdatedAt != null
1518
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
1519
- : undefined,
1520
- LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
1521
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LatestUpdateAttemptAt)))
1522
- : undefined,
1523
- LatestUpdateAttemptStatus: (0, smithy_client_1.expectString)(output.LatestUpdateAttemptStatus),
1524
- Message: (0, smithy_client_1.expectString)(output.Message),
1525
- Name: (0, smithy_client_1.expectString)(output.Name),
1526
- ParallelDataConfig: output.ParallelDataConfig != null ? de_ParallelDataConfig(output.ParallelDataConfig, context) : undefined,
1527
- SkippedRecordCount: (0, smithy_client_1.expectLong)(output.SkippedRecordCount),
1528
- SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
1529
- Status: (0, smithy_client_1.expectString)(output.Status),
1530
- TargetLanguageCodes: output.TargetLanguageCodes != null ? de_LanguageCodeStringList(output.TargetLanguageCodes, context) : undefined,
1531
- };
1168
+ return (0, smithy_client_1.take)(output, {
1169
+ Arn: smithy_client_1.expectString,
1170
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1171
+ Description: smithy_client_1.expectString,
1172
+ EncryptionKey: smithy_client_1._json,
1173
+ FailedRecordCount: smithy_client_1.expectLong,
1174
+ ImportedDataSize: smithy_client_1.expectLong,
1175
+ ImportedRecordCount: smithy_client_1.expectLong,
1176
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1177
+ LatestUpdateAttemptAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1178
+ LatestUpdateAttemptStatus: smithy_client_1.expectString,
1179
+ Message: smithy_client_1.expectString,
1180
+ Name: smithy_client_1.expectString,
1181
+ ParallelDataConfig: smithy_client_1._json,
1182
+ SkippedRecordCount: smithy_client_1.expectLong,
1183
+ SourceLanguageCode: smithy_client_1.expectString,
1184
+ Status: smithy_client_1.expectString,
1185
+ TargetLanguageCodes: smithy_client_1._json,
1186
+ });
1532
1187
  };
1533
1188
  const de_ParallelDataPropertiesList = (output, context) => {
1534
1189
  const retVal = (output || [])
1535
1190
  .filter((e) => e != null)
1536
1191
  .map((entry) => {
1537
- if (entry === null) {
1538
- return null;
1539
- }
1540
1192
  return de_ParallelDataProperties(entry, context);
1541
1193
  });
1542
1194
  return retVal;
1543
1195
  };
1544
- const de_ResourceNameList = (output, context) => {
1545
- const retVal = (output || [])
1546
- .filter((e) => e != null)
1547
- .map((entry) => {
1548
- if (entry === null) {
1549
- return null;
1550
- }
1551
- return (0, smithy_client_1.expectString)(entry);
1552
- });
1553
- return retVal;
1554
- };
1555
- const de_ResourceNotFoundException = (output, context) => {
1556
- return {
1557
- Message: (0, smithy_client_1.expectString)(output.Message),
1558
- };
1559
- };
1560
- const de_ServiceUnavailableException = (output, context) => {
1561
- return {
1562
- Message: (0, smithy_client_1.expectString)(output.Message),
1563
- };
1564
- };
1565
- const de_StartTextTranslationJobResponse = (output, context) => {
1566
- return {
1567
- JobId: (0, smithy_client_1.expectString)(output.JobId),
1568
- JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
1569
- };
1570
- };
1571
- const de_StopTextTranslationJobResponse = (output, context) => {
1572
- return {
1573
- JobId: (0, smithy_client_1.expectString)(output.JobId),
1574
- JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
1575
- };
1576
- };
1577
- const de_Tag = (output, context) => {
1578
- return {
1579
- Key: (0, smithy_client_1.expectString)(output.Key),
1580
- Value: (0, smithy_client_1.expectString)(output.Value),
1581
- };
1582
- };
1583
- const de_TagList = (output, context) => {
1584
- const retVal = (output || [])
1585
- .filter((e) => e != null)
1586
- .map((entry) => {
1587
- if (entry === null) {
1588
- return null;
1589
- }
1590
- return de_Tag(entry, context);
1591
- });
1592
- return retVal;
1593
- };
1594
- const de_TagResourceResponse = (output, context) => {
1595
- return {};
1596
- };
1597
- const de_TargetLanguageCodeStringList = (output, context) => {
1598
- const retVal = (output || [])
1599
- .filter((e) => e != null)
1600
- .map((entry) => {
1601
- if (entry === null) {
1602
- return null;
1603
- }
1604
- return (0, smithy_client_1.expectString)(entry);
1605
- });
1606
- return retVal;
1607
- };
1608
- const de_Term = (output, context) => {
1609
- return {
1610
- SourceText: (0, smithy_client_1.expectString)(output.SourceText),
1611
- TargetText: (0, smithy_client_1.expectString)(output.TargetText),
1612
- };
1613
- };
1614
- const de_TerminologyDataLocation = (output, context) => {
1615
- return {
1616
- Location: (0, smithy_client_1.expectString)(output.Location),
1617
- RepositoryType: (0, smithy_client_1.expectString)(output.RepositoryType),
1618
- };
1619
- };
1620
1196
  const de_TerminologyProperties = (output, context) => {
1621
- return {
1622
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1623
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1624
- Description: (0, smithy_client_1.expectString)(output.Description),
1625
- Directionality: (0, smithy_client_1.expectString)(output.Directionality),
1626
- EncryptionKey: output.EncryptionKey != null ? de_EncryptionKey(output.EncryptionKey, context) : undefined,
1627
- Format: (0, smithy_client_1.expectString)(output.Format),
1628
- LastUpdatedAt: output.LastUpdatedAt != null
1629
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
1630
- : undefined,
1631
- Message: (0, smithy_client_1.expectString)(output.Message),
1632
- Name: (0, smithy_client_1.expectString)(output.Name),
1633
- SizeBytes: (0, smithy_client_1.expectInt32)(output.SizeBytes),
1634
- SkippedTermCount: (0, smithy_client_1.expectInt32)(output.SkippedTermCount),
1635
- SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
1636
- TargetLanguageCodes: output.TargetLanguageCodes != null ? de_LanguageCodeStringList(output.TargetLanguageCodes, context) : undefined,
1637
- TermCount: (0, smithy_client_1.expectInt32)(output.TermCount),
1638
- };
1197
+ return (0, smithy_client_1.take)(output, {
1198
+ Arn: smithy_client_1.expectString,
1199
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1200
+ Description: smithy_client_1.expectString,
1201
+ Directionality: smithy_client_1.expectString,
1202
+ EncryptionKey: smithy_client_1._json,
1203
+ Format: smithy_client_1.expectString,
1204
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1205
+ Message: smithy_client_1.expectString,
1206
+ Name: smithy_client_1.expectString,
1207
+ SizeBytes: smithy_client_1.expectInt32,
1208
+ SkippedTermCount: smithy_client_1.expectInt32,
1209
+ SourceLanguageCode: smithy_client_1.expectString,
1210
+ TargetLanguageCodes: smithy_client_1._json,
1211
+ TermCount: smithy_client_1.expectInt32,
1212
+ });
1639
1213
  };
1640
1214
  const de_TerminologyPropertiesList = (output, context) => {
1641
1215
  const retVal = (output || [])
1642
1216
  .filter((e) => e != null)
1643
1217
  .map((entry) => {
1644
- if (entry === null) {
1645
- return null;
1646
- }
1647
1218
  return de_TerminologyProperties(entry, context);
1648
1219
  });
1649
1220
  return retVal;
1650
1221
  };
1651
- const de_TermList = (output, context) => {
1652
- const retVal = (output || [])
1653
- .filter((e) => e != null)
1654
- .map((entry) => {
1655
- if (entry === null) {
1656
- return null;
1657
- }
1658
- return de_Term(entry, context);
1659
- });
1660
- return retVal;
1661
- };
1662
- const de_TextSizeLimitExceededException = (output, context) => {
1663
- return {
1664
- Message: (0, smithy_client_1.expectString)(output.Message),
1665
- };
1666
- };
1667
1222
  const de_TextTranslationJobProperties = (output, context) => {
1668
- return {
1669
- DataAccessRoleArn: (0, smithy_client_1.expectString)(output.DataAccessRoleArn),
1670
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
1671
- InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined,
1672
- JobDetails: output.JobDetails != null ? de_JobDetails(output.JobDetails, context) : undefined,
1673
- JobId: (0, smithy_client_1.expectString)(output.JobId),
1674
- JobName: (0, smithy_client_1.expectString)(output.JobName),
1675
- JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
1676
- Message: (0, smithy_client_1.expectString)(output.Message),
1677
- OutputDataConfig: output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined,
1678
- ParallelDataNames: output.ParallelDataNames != null ? de_ResourceNameList(output.ParallelDataNames, context) : undefined,
1679
- Settings: output.Settings != null ? de_TranslationSettings(output.Settings, context) : undefined,
1680
- SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
1681
- SubmittedTime: output.SubmittedTime != null
1682
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.SubmittedTime)))
1683
- : undefined,
1684
- TargetLanguageCodes: output.TargetLanguageCodes != null
1685
- ? de_TargetLanguageCodeStringList(output.TargetLanguageCodes, context)
1686
- : undefined,
1687
- TerminologyNames: output.TerminologyNames != null ? de_ResourceNameList(output.TerminologyNames, context) : undefined,
1688
- };
1223
+ return (0, smithy_client_1.take)(output, {
1224
+ DataAccessRoleArn: smithy_client_1.expectString,
1225
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1226
+ InputDataConfig: smithy_client_1._json,
1227
+ JobDetails: smithy_client_1._json,
1228
+ JobId: smithy_client_1.expectString,
1229
+ JobName: smithy_client_1.expectString,
1230
+ JobStatus: smithy_client_1.expectString,
1231
+ Message: smithy_client_1.expectString,
1232
+ OutputDataConfig: smithy_client_1._json,
1233
+ ParallelDataNames: smithy_client_1._json,
1234
+ Settings: smithy_client_1._json,
1235
+ SourceLanguageCode: smithy_client_1.expectString,
1236
+ SubmittedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1237
+ TargetLanguageCodes: smithy_client_1._json,
1238
+ TerminologyNames: smithy_client_1._json,
1239
+ });
1689
1240
  };
1690
1241
  const de_TextTranslationJobPropertiesList = (output, context) => {
1691
1242
  const retVal = (output || [])
1692
1243
  .filter((e) => e != null)
1693
1244
  .map((entry) => {
1694
- if (entry === null) {
1695
- return null;
1696
- }
1697
1245
  return de_TextTranslationJobProperties(entry, context);
1698
1246
  });
1699
1247
  return retVal;
1700
1248
  };
1701
- const de_TooManyRequestsException = (output, context) => {
1702
- return {
1703
- Message: (0, smithy_client_1.expectString)(output.Message),
1704
- };
1705
- };
1706
- const de_TooManyTagsException = (output, context) => {
1707
- return {
1708
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
1709
- message: (0, smithy_client_1.expectString)(output.message),
1710
- };
1711
- };
1712
- const de_TranslateTextResponse = (output, context) => {
1713
- return {
1714
- AppliedSettings: output.AppliedSettings != null ? de_TranslationSettings(output.AppliedSettings, context) : undefined,
1715
- AppliedTerminologies: output.AppliedTerminologies != null ? de_AppliedTerminologyList(output.AppliedTerminologies, context) : undefined,
1716
- SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
1717
- TargetLanguageCode: (0, smithy_client_1.expectString)(output.TargetLanguageCode),
1718
- TranslatedText: (0, smithy_client_1.expectString)(output.TranslatedText),
1719
- };
1720
- };
1721
- const de_TranslationSettings = (output, context) => {
1722
- return {
1723
- Formality: (0, smithy_client_1.expectString)(output.Formality),
1724
- Profanity: (0, smithy_client_1.expectString)(output.Profanity),
1725
- };
1726
- };
1727
- const de_UnsupportedDisplayLanguageCodeException = (output, context) => {
1728
- return {
1729
- DisplayLanguageCode: (0, smithy_client_1.expectString)(output.DisplayLanguageCode),
1730
- Message: (0, smithy_client_1.expectString)(output.Message),
1731
- };
1732
- };
1733
- const de_UnsupportedLanguagePairException = (output, context) => {
1734
- return {
1735
- Message: (0, smithy_client_1.expectString)(output.Message),
1736
- SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
1737
- TargetLanguageCode: (0, smithy_client_1.expectString)(output.TargetLanguageCode),
1738
- };
1739
- };
1740
- const de_UntagResourceResponse = (output, context) => {
1741
- return {};
1742
- };
1743
1249
  const de_UpdateParallelDataResponse = (output, context) => {
1744
- return {
1745
- LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
1746
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LatestUpdateAttemptAt)))
1747
- : undefined,
1748
- LatestUpdateAttemptStatus: (0, smithy_client_1.expectString)(output.LatestUpdateAttemptStatus),
1749
- Name: (0, smithy_client_1.expectString)(output.Name),
1750
- Status: (0, smithy_client_1.expectString)(output.Status),
1751
- };
1250
+ return (0, smithy_client_1.take)(output, {
1251
+ LatestUpdateAttemptAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1252
+ LatestUpdateAttemptStatus: smithy_client_1.expectString,
1253
+ Name: smithy_client_1.expectString,
1254
+ Status: smithy_client_1.expectString,
1255
+ });
1752
1256
  };
1753
1257
  const deserializeMetadata = (output) => ({
1754
1258
  httpStatusCode: output.statusCode,
@@ -1763,6 +1267,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1763
1267
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1764
1268
  };
1765
1269
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1270
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(TranslateServiceException_1.TranslateServiceException);
1766
1271
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1767
1272
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1768
1273
  const contents = {