@aws-sdk/client-translate 3.312.0 → 3.316.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/Translate.js +22 -252
- package/dist-cjs/protocols/Aws_json1_1.js +208 -703
- package/dist-es/Translate.js +22 -252
- package/dist-es/protocols/Aws_json1_1.js +209 -704
- package/dist-types/Translate.d.ts +25 -75
- package/dist-types/ts3.4/Translate.d.ts +2 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp,
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { ConcurrentModificationException, ConflictException, DetectedLanguageLowConfidenceException, InternalServerException, InvalidFilterException, InvalidParameterValueException, InvalidRequestException, LimitExceededException, ResourceNotFoundException, ServiceUnavailableException, TextSizeLimitExceededException, TooManyRequestsException, TooManyTagsException, UnsupportedDisplayLanguageCodeException, UnsupportedLanguagePairException, } from "../models/models_0";
|
|
5
5
|
import { TranslateServiceException as __BaseException } from "../models/TranslateServiceException";
|
|
@@ -12,31 +12,31 @@ export const se_CreateParallelDataCommand = async (input, context) => {
|
|
|
12
12
|
export const se_DeleteParallelDataCommand = async (input, context) => {
|
|
13
13
|
const headers = sharedHeaders("DeleteParallelData");
|
|
14
14
|
let body;
|
|
15
|
-
body = JSON.stringify(
|
|
15
|
+
body = JSON.stringify(_json(input));
|
|
16
16
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
17
|
};
|
|
18
18
|
export const se_DeleteTerminologyCommand = async (input, context) => {
|
|
19
19
|
const headers = sharedHeaders("DeleteTerminology");
|
|
20
20
|
let body;
|
|
21
|
-
body = JSON.stringify(
|
|
21
|
+
body = JSON.stringify(_json(input));
|
|
22
22
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
23
23
|
};
|
|
24
24
|
export const se_DescribeTextTranslationJobCommand = async (input, context) => {
|
|
25
25
|
const headers = sharedHeaders("DescribeTextTranslationJob");
|
|
26
26
|
let body;
|
|
27
|
-
body = JSON.stringify(
|
|
27
|
+
body = JSON.stringify(_json(input));
|
|
28
28
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
29
|
};
|
|
30
30
|
export const se_GetParallelDataCommand = async (input, context) => {
|
|
31
31
|
const headers = sharedHeaders("GetParallelData");
|
|
32
32
|
let body;
|
|
33
|
-
body = JSON.stringify(
|
|
33
|
+
body = JSON.stringify(_json(input));
|
|
34
34
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
35
|
};
|
|
36
36
|
export const se_GetTerminologyCommand = async (input, context) => {
|
|
37
37
|
const headers = sharedHeaders("GetTerminology");
|
|
38
38
|
let body;
|
|
39
|
-
body = JSON.stringify(
|
|
39
|
+
body = JSON.stringify(_json(input));
|
|
40
40
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
41
|
};
|
|
42
42
|
export const se_ImportTerminologyCommand = async (input, context) => {
|
|
@@ -48,25 +48,25 @@ export const se_ImportTerminologyCommand = async (input, context) => {
|
|
|
48
48
|
export const se_ListLanguagesCommand = async (input, context) => {
|
|
49
49
|
const headers = sharedHeaders("ListLanguages");
|
|
50
50
|
let body;
|
|
51
|
-
body = JSON.stringify(
|
|
51
|
+
body = JSON.stringify(_json(input));
|
|
52
52
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
53
53
|
};
|
|
54
54
|
export const se_ListParallelDataCommand = async (input, context) => {
|
|
55
55
|
const headers = sharedHeaders("ListParallelData");
|
|
56
56
|
let body;
|
|
57
|
-
body = JSON.stringify(
|
|
57
|
+
body = JSON.stringify(_json(input));
|
|
58
58
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
59
59
|
};
|
|
60
60
|
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
61
61
|
const headers = sharedHeaders("ListTagsForResource");
|
|
62
62
|
let body;
|
|
63
|
-
body = JSON.stringify(
|
|
63
|
+
body = JSON.stringify(_json(input));
|
|
64
64
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
65
65
|
};
|
|
66
66
|
export const se_ListTerminologiesCommand = async (input, context) => {
|
|
67
67
|
const headers = sharedHeaders("ListTerminologies");
|
|
68
68
|
let body;
|
|
69
|
-
body = JSON.stringify(
|
|
69
|
+
body = JSON.stringify(_json(input));
|
|
70
70
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
71
71
|
};
|
|
72
72
|
export const se_ListTextTranslationJobsCommand = async (input, context) => {
|
|
@@ -84,25 +84,25 @@ export const se_StartTextTranslationJobCommand = async (input, context) => {
|
|
|
84
84
|
export const se_StopTextTranslationJobCommand = async (input, context) => {
|
|
85
85
|
const headers = sharedHeaders("StopTextTranslationJob");
|
|
86
86
|
let body;
|
|
87
|
-
body = JSON.stringify(
|
|
87
|
+
body = JSON.stringify(_json(input));
|
|
88
88
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
89
89
|
};
|
|
90
90
|
export const se_TagResourceCommand = async (input, context) => {
|
|
91
91
|
const headers = sharedHeaders("TagResource");
|
|
92
92
|
let body;
|
|
93
|
-
body = JSON.stringify(
|
|
93
|
+
body = JSON.stringify(_json(input));
|
|
94
94
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
95
95
|
};
|
|
96
96
|
export const se_TranslateTextCommand = async (input, context) => {
|
|
97
97
|
const headers = sharedHeaders("TranslateText");
|
|
98
98
|
let body;
|
|
99
|
-
body = JSON.stringify(
|
|
99
|
+
body = JSON.stringify(_json(input));
|
|
100
100
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
101
101
|
};
|
|
102
102
|
export const se_UntagResourceCommand = async (input, context) => {
|
|
103
103
|
const headers = sharedHeaders("UntagResource");
|
|
104
104
|
let body;
|
|
105
|
-
body = JSON.stringify(
|
|
105
|
+
body = JSON.stringify(_json(input));
|
|
106
106
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
107
107
|
};
|
|
108
108
|
export const se_UpdateParallelDataCommand = async (input, context) => {
|
|
@@ -117,12 +117,12 @@ export const de_CreateParallelDataCommand = async (output, context) => {
|
|
|
117
117
|
}
|
|
118
118
|
const data = await parseBody(output.body, context);
|
|
119
119
|
let contents = {};
|
|
120
|
-
contents =
|
|
120
|
+
contents = _json(data);
|
|
121
121
|
const response = {
|
|
122
122
|
$metadata: deserializeMetadata(output),
|
|
123
123
|
...contents,
|
|
124
124
|
};
|
|
125
|
-
return
|
|
125
|
+
return response;
|
|
126
126
|
};
|
|
127
127
|
const de_CreateParallelDataCommandError = async (output, context) => {
|
|
128
128
|
const parsedOutput = {
|
|
@@ -157,10 +157,9 @@ const de_CreateParallelDataCommandError = async (output, context) => {
|
|
|
157
157
|
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
158
158
|
default:
|
|
159
159
|
const parsedBody = parsedOutput.body;
|
|
160
|
-
throwDefaultError({
|
|
160
|
+
return throwDefaultError({
|
|
161
161
|
output,
|
|
162
162
|
parsedBody,
|
|
163
|
-
exceptionCtor: __BaseException,
|
|
164
163
|
errorCode,
|
|
165
164
|
});
|
|
166
165
|
}
|
|
@@ -171,12 +170,12 @@ export const de_DeleteParallelDataCommand = async (output, context) => {
|
|
|
171
170
|
}
|
|
172
171
|
const data = await parseBody(output.body, context);
|
|
173
172
|
let contents = {};
|
|
174
|
-
contents =
|
|
173
|
+
contents = _json(data);
|
|
175
174
|
const response = {
|
|
176
175
|
$metadata: deserializeMetadata(output),
|
|
177
176
|
...contents,
|
|
178
177
|
};
|
|
179
|
-
return
|
|
178
|
+
return response;
|
|
180
179
|
};
|
|
181
180
|
const de_DeleteParallelDataCommandError = async (output, context) => {
|
|
182
181
|
const parsedOutput = {
|
|
@@ -199,10 +198,9 @@ const de_DeleteParallelDataCommandError = async (output, context) => {
|
|
|
199
198
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
200
199
|
default:
|
|
201
200
|
const parsedBody = parsedOutput.body;
|
|
202
|
-
throwDefaultError({
|
|
201
|
+
return throwDefaultError({
|
|
203
202
|
output,
|
|
204
203
|
parsedBody,
|
|
205
|
-
exceptionCtor: __BaseException,
|
|
206
204
|
errorCode,
|
|
207
205
|
});
|
|
208
206
|
}
|
|
@@ -215,7 +213,7 @@ export const de_DeleteTerminologyCommand = async (output, context) => {
|
|
|
215
213
|
const response = {
|
|
216
214
|
$metadata: deserializeMetadata(output),
|
|
217
215
|
};
|
|
218
|
-
return
|
|
216
|
+
return response;
|
|
219
217
|
};
|
|
220
218
|
const de_DeleteTerminologyCommandError = async (output, context) => {
|
|
221
219
|
const parsedOutput = {
|
|
@@ -238,10 +236,9 @@ const de_DeleteTerminologyCommandError = async (output, context) => {
|
|
|
238
236
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
239
237
|
default:
|
|
240
238
|
const parsedBody = parsedOutput.body;
|
|
241
|
-
throwDefaultError({
|
|
239
|
+
return throwDefaultError({
|
|
242
240
|
output,
|
|
243
241
|
parsedBody,
|
|
244
|
-
exceptionCtor: __BaseException,
|
|
245
242
|
errorCode,
|
|
246
243
|
});
|
|
247
244
|
}
|
|
@@ -257,7 +254,7 @@ export const de_DescribeTextTranslationJobCommand = async (output, context) => {
|
|
|
257
254
|
$metadata: deserializeMetadata(output),
|
|
258
255
|
...contents,
|
|
259
256
|
};
|
|
260
|
-
return
|
|
257
|
+
return response;
|
|
261
258
|
};
|
|
262
259
|
const de_DescribeTextTranslationJobCommandError = async (output, context) => {
|
|
263
260
|
const parsedOutput = {
|
|
@@ -277,10 +274,9 @@ const de_DescribeTextTranslationJobCommandError = async (output, context) => {
|
|
|
277
274
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
278
275
|
default:
|
|
279
276
|
const parsedBody = parsedOutput.body;
|
|
280
|
-
throwDefaultError({
|
|
277
|
+
return throwDefaultError({
|
|
281
278
|
output,
|
|
282
279
|
parsedBody,
|
|
283
|
-
exceptionCtor: __BaseException,
|
|
284
280
|
errorCode,
|
|
285
281
|
});
|
|
286
282
|
}
|
|
@@ -296,7 +292,7 @@ export const de_GetParallelDataCommand = async (output, context) => {
|
|
|
296
292
|
$metadata: deserializeMetadata(output),
|
|
297
293
|
...contents,
|
|
298
294
|
};
|
|
299
|
-
return
|
|
295
|
+
return response;
|
|
300
296
|
};
|
|
301
297
|
const de_GetParallelDataCommandError = async (output, context) => {
|
|
302
298
|
const parsedOutput = {
|
|
@@ -319,10 +315,9 @@ const de_GetParallelDataCommandError = async (output, context) => {
|
|
|
319
315
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
320
316
|
default:
|
|
321
317
|
const parsedBody = parsedOutput.body;
|
|
322
|
-
throwDefaultError({
|
|
318
|
+
return throwDefaultError({
|
|
323
319
|
output,
|
|
324
320
|
parsedBody,
|
|
325
|
-
exceptionCtor: __BaseException,
|
|
326
321
|
errorCode,
|
|
327
322
|
});
|
|
328
323
|
}
|
|
@@ -338,7 +333,7 @@ export const de_GetTerminologyCommand = async (output, context) => {
|
|
|
338
333
|
$metadata: deserializeMetadata(output),
|
|
339
334
|
...contents,
|
|
340
335
|
};
|
|
341
|
-
return
|
|
336
|
+
return response;
|
|
342
337
|
};
|
|
343
338
|
const de_GetTerminologyCommandError = async (output, context) => {
|
|
344
339
|
const parsedOutput = {
|
|
@@ -361,10 +356,9 @@ const de_GetTerminologyCommandError = async (output, context) => {
|
|
|
361
356
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
362
357
|
default:
|
|
363
358
|
const parsedBody = parsedOutput.body;
|
|
364
|
-
throwDefaultError({
|
|
359
|
+
return throwDefaultError({
|
|
365
360
|
output,
|
|
366
361
|
parsedBody,
|
|
367
|
-
exceptionCtor: __BaseException,
|
|
368
362
|
errorCode,
|
|
369
363
|
});
|
|
370
364
|
}
|
|
@@ -380,7 +374,7 @@ export const de_ImportTerminologyCommand = async (output, context) => {
|
|
|
380
374
|
$metadata: deserializeMetadata(output),
|
|
381
375
|
...contents,
|
|
382
376
|
};
|
|
383
|
-
return
|
|
377
|
+
return response;
|
|
384
378
|
};
|
|
385
379
|
const de_ImportTerminologyCommandError = async (output, context) => {
|
|
386
380
|
const parsedOutput = {
|
|
@@ -409,10 +403,9 @@ const de_ImportTerminologyCommandError = async (output, context) => {
|
|
|
409
403
|
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
410
404
|
default:
|
|
411
405
|
const parsedBody = parsedOutput.body;
|
|
412
|
-
throwDefaultError({
|
|
406
|
+
return throwDefaultError({
|
|
413
407
|
output,
|
|
414
408
|
parsedBody,
|
|
415
|
-
exceptionCtor: __BaseException,
|
|
416
409
|
errorCode,
|
|
417
410
|
});
|
|
418
411
|
}
|
|
@@ -423,12 +416,12 @@ export const de_ListLanguagesCommand = async (output, context) => {
|
|
|
423
416
|
}
|
|
424
417
|
const data = await parseBody(output.body, context);
|
|
425
418
|
let contents = {};
|
|
426
|
-
contents =
|
|
419
|
+
contents = _json(data);
|
|
427
420
|
const response = {
|
|
428
421
|
$metadata: deserializeMetadata(output),
|
|
429
422
|
...contents,
|
|
430
423
|
};
|
|
431
|
-
return
|
|
424
|
+
return response;
|
|
432
425
|
};
|
|
433
426
|
const de_ListLanguagesCommandError = async (output, context) => {
|
|
434
427
|
const parsedOutput = {
|
|
@@ -451,10 +444,9 @@ const de_ListLanguagesCommandError = async (output, context) => {
|
|
|
451
444
|
throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context);
|
|
452
445
|
default:
|
|
453
446
|
const parsedBody = parsedOutput.body;
|
|
454
|
-
throwDefaultError({
|
|
447
|
+
return throwDefaultError({
|
|
455
448
|
output,
|
|
456
449
|
parsedBody,
|
|
457
|
-
exceptionCtor: __BaseException,
|
|
458
450
|
errorCode,
|
|
459
451
|
});
|
|
460
452
|
}
|
|
@@ -470,7 +462,7 @@ export const de_ListParallelDataCommand = async (output, context) => {
|
|
|
470
462
|
$metadata: deserializeMetadata(output),
|
|
471
463
|
...contents,
|
|
472
464
|
};
|
|
473
|
-
return
|
|
465
|
+
return response;
|
|
474
466
|
};
|
|
475
467
|
const de_ListParallelDataCommandError = async (output, context) => {
|
|
476
468
|
const parsedOutput = {
|
|
@@ -490,10 +482,9 @@ const de_ListParallelDataCommandError = async (output, context) => {
|
|
|
490
482
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
491
483
|
default:
|
|
492
484
|
const parsedBody = parsedOutput.body;
|
|
493
|
-
throwDefaultError({
|
|
485
|
+
return throwDefaultError({
|
|
494
486
|
output,
|
|
495
487
|
parsedBody,
|
|
496
|
-
exceptionCtor: __BaseException,
|
|
497
488
|
errorCode,
|
|
498
489
|
});
|
|
499
490
|
}
|
|
@@ -504,12 +495,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
504
495
|
}
|
|
505
496
|
const data = await parseBody(output.body, context);
|
|
506
497
|
let contents = {};
|
|
507
|
-
contents =
|
|
498
|
+
contents = _json(data);
|
|
508
499
|
const response = {
|
|
509
500
|
$metadata: deserializeMetadata(output),
|
|
510
501
|
...contents,
|
|
511
502
|
};
|
|
512
|
-
return
|
|
503
|
+
return response;
|
|
513
504
|
};
|
|
514
505
|
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
515
506
|
const parsedOutput = {
|
|
@@ -529,10 +520,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
|
529
520
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
530
521
|
default:
|
|
531
522
|
const parsedBody = parsedOutput.body;
|
|
532
|
-
throwDefaultError({
|
|
523
|
+
return throwDefaultError({
|
|
533
524
|
output,
|
|
534
525
|
parsedBody,
|
|
535
|
-
exceptionCtor: __BaseException,
|
|
536
526
|
errorCode,
|
|
537
527
|
});
|
|
538
528
|
}
|
|
@@ -548,7 +538,7 @@ export const de_ListTerminologiesCommand = async (output, context) => {
|
|
|
548
538
|
$metadata: deserializeMetadata(output),
|
|
549
539
|
...contents,
|
|
550
540
|
};
|
|
551
|
-
return
|
|
541
|
+
return response;
|
|
552
542
|
};
|
|
553
543
|
const de_ListTerminologiesCommandError = async (output, context) => {
|
|
554
544
|
const parsedOutput = {
|
|
@@ -568,10 +558,9 @@ const de_ListTerminologiesCommandError = async (output, context) => {
|
|
|
568
558
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
569
559
|
default:
|
|
570
560
|
const parsedBody = parsedOutput.body;
|
|
571
|
-
throwDefaultError({
|
|
561
|
+
return throwDefaultError({
|
|
572
562
|
output,
|
|
573
563
|
parsedBody,
|
|
574
|
-
exceptionCtor: __BaseException,
|
|
575
564
|
errorCode,
|
|
576
565
|
});
|
|
577
566
|
}
|
|
@@ -587,7 +576,7 @@ export const de_ListTextTranslationJobsCommand = async (output, context) => {
|
|
|
587
576
|
$metadata: deserializeMetadata(output),
|
|
588
577
|
...contents,
|
|
589
578
|
};
|
|
590
|
-
return
|
|
579
|
+
return response;
|
|
591
580
|
};
|
|
592
581
|
const de_ListTextTranslationJobsCommandError = async (output, context) => {
|
|
593
582
|
const parsedOutput = {
|
|
@@ -610,10 +599,9 @@ const de_ListTextTranslationJobsCommandError = async (output, context) => {
|
|
|
610
599
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
611
600
|
default:
|
|
612
601
|
const parsedBody = parsedOutput.body;
|
|
613
|
-
throwDefaultError({
|
|
602
|
+
return throwDefaultError({
|
|
614
603
|
output,
|
|
615
604
|
parsedBody,
|
|
616
|
-
exceptionCtor: __BaseException,
|
|
617
605
|
errorCode,
|
|
618
606
|
});
|
|
619
607
|
}
|
|
@@ -624,12 +612,12 @@ export const de_StartTextTranslationJobCommand = async (output, context) => {
|
|
|
624
612
|
}
|
|
625
613
|
const data = await parseBody(output.body, context);
|
|
626
614
|
let contents = {};
|
|
627
|
-
contents =
|
|
615
|
+
contents = _json(data);
|
|
628
616
|
const response = {
|
|
629
617
|
$metadata: deserializeMetadata(output),
|
|
630
618
|
...contents,
|
|
631
619
|
};
|
|
632
|
-
return
|
|
620
|
+
return response;
|
|
633
621
|
};
|
|
634
622
|
const de_StartTextTranslationJobCommandError = async (output, context) => {
|
|
635
623
|
const parsedOutput = {
|
|
@@ -658,10 +646,9 @@ const de_StartTextTranslationJobCommandError = async (output, context) => {
|
|
|
658
646
|
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
659
647
|
default:
|
|
660
648
|
const parsedBody = parsedOutput.body;
|
|
661
|
-
throwDefaultError({
|
|
649
|
+
return throwDefaultError({
|
|
662
650
|
output,
|
|
663
651
|
parsedBody,
|
|
664
|
-
exceptionCtor: __BaseException,
|
|
665
652
|
errorCode,
|
|
666
653
|
});
|
|
667
654
|
}
|
|
@@ -672,12 +659,12 @@ export const de_StopTextTranslationJobCommand = async (output, context) => {
|
|
|
672
659
|
}
|
|
673
660
|
const data = await parseBody(output.body, context);
|
|
674
661
|
let contents = {};
|
|
675
|
-
contents =
|
|
662
|
+
contents = _json(data);
|
|
676
663
|
const response = {
|
|
677
664
|
$metadata: deserializeMetadata(output),
|
|
678
665
|
...contents,
|
|
679
666
|
};
|
|
680
|
-
return
|
|
667
|
+
return response;
|
|
681
668
|
};
|
|
682
669
|
const de_StopTextTranslationJobCommandError = async (output, context) => {
|
|
683
670
|
const parsedOutput = {
|
|
@@ -697,10 +684,9 @@ const de_StopTextTranslationJobCommandError = async (output, context) => {
|
|
|
697
684
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
698
685
|
default:
|
|
699
686
|
const parsedBody = parsedOutput.body;
|
|
700
|
-
throwDefaultError({
|
|
687
|
+
return throwDefaultError({
|
|
701
688
|
output,
|
|
702
689
|
parsedBody,
|
|
703
|
-
exceptionCtor: __BaseException,
|
|
704
690
|
errorCode,
|
|
705
691
|
});
|
|
706
692
|
}
|
|
@@ -711,12 +697,12 @@ export const de_TagResourceCommand = async (output, context) => {
|
|
|
711
697
|
}
|
|
712
698
|
const data = await parseBody(output.body, context);
|
|
713
699
|
let contents = {};
|
|
714
|
-
contents =
|
|
700
|
+
contents = _json(data);
|
|
715
701
|
const response = {
|
|
716
702
|
$metadata: deserializeMetadata(output),
|
|
717
703
|
...contents,
|
|
718
704
|
};
|
|
719
|
-
return
|
|
705
|
+
return response;
|
|
720
706
|
};
|
|
721
707
|
const de_TagResourceCommandError = async (output, context) => {
|
|
722
708
|
const parsedOutput = {
|
|
@@ -742,10 +728,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
742
728
|
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
743
729
|
default:
|
|
744
730
|
const parsedBody = parsedOutput.body;
|
|
745
|
-
throwDefaultError({
|
|
731
|
+
return throwDefaultError({
|
|
746
732
|
output,
|
|
747
733
|
parsedBody,
|
|
748
|
-
exceptionCtor: __BaseException,
|
|
749
734
|
errorCode,
|
|
750
735
|
});
|
|
751
736
|
}
|
|
@@ -756,12 +741,12 @@ export const de_TranslateTextCommand = async (output, context) => {
|
|
|
756
741
|
}
|
|
757
742
|
const data = await parseBody(output.body, context);
|
|
758
743
|
let contents = {};
|
|
759
|
-
contents =
|
|
744
|
+
contents = _json(data);
|
|
760
745
|
const response = {
|
|
761
746
|
$metadata: deserializeMetadata(output),
|
|
762
747
|
...contents,
|
|
763
748
|
};
|
|
764
|
-
return
|
|
749
|
+
return response;
|
|
765
750
|
};
|
|
766
751
|
const de_TranslateTextCommandError = async (output, context) => {
|
|
767
752
|
const parsedOutput = {
|
|
@@ -796,10 +781,9 @@ const de_TranslateTextCommandError = async (output, context) => {
|
|
|
796
781
|
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
797
782
|
default:
|
|
798
783
|
const parsedBody = parsedOutput.body;
|
|
799
|
-
throwDefaultError({
|
|
784
|
+
return throwDefaultError({
|
|
800
785
|
output,
|
|
801
786
|
parsedBody,
|
|
802
|
-
exceptionCtor: __BaseException,
|
|
803
787
|
errorCode,
|
|
804
788
|
});
|
|
805
789
|
}
|
|
@@ -810,12 +794,12 @@ export const de_UntagResourceCommand = async (output, context) => {
|
|
|
810
794
|
}
|
|
811
795
|
const data = await parseBody(output.body, context);
|
|
812
796
|
let contents = {};
|
|
813
|
-
contents =
|
|
797
|
+
contents = _json(data);
|
|
814
798
|
const response = {
|
|
815
799
|
$metadata: deserializeMetadata(output),
|
|
816
800
|
...contents,
|
|
817
801
|
};
|
|
818
|
-
return
|
|
802
|
+
return response;
|
|
819
803
|
};
|
|
820
804
|
const de_UntagResourceCommandError = async (output, context) => {
|
|
821
805
|
const parsedOutput = {
|
|
@@ -838,10 +822,9 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
838
822
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
839
823
|
default:
|
|
840
824
|
const parsedBody = parsedOutput.body;
|
|
841
|
-
throwDefaultError({
|
|
825
|
+
return throwDefaultError({
|
|
842
826
|
output,
|
|
843
827
|
parsedBody,
|
|
844
|
-
exceptionCtor: __BaseException,
|
|
845
828
|
errorCode,
|
|
846
829
|
});
|
|
847
830
|
}
|
|
@@ -857,7 +840,7 @@ export const de_UpdateParallelDataCommand = async (output, context) => {
|
|
|
857
840
|
$metadata: deserializeMetadata(output),
|
|
858
841
|
...contents,
|
|
859
842
|
};
|
|
860
|
-
return
|
|
843
|
+
return response;
|
|
861
844
|
};
|
|
862
845
|
const de_UpdateParallelDataCommandError = async (output, context) => {
|
|
863
846
|
const parsedOutput = {
|
|
@@ -892,17 +875,16 @@ const de_UpdateParallelDataCommandError = async (output, context) => {
|
|
|
892
875
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
893
876
|
default:
|
|
894
877
|
const parsedBody = parsedOutput.body;
|
|
895
|
-
throwDefaultError({
|
|
878
|
+
return throwDefaultError({
|
|
896
879
|
output,
|
|
897
880
|
parsedBody,
|
|
898
|
-
exceptionCtor: __BaseException,
|
|
899
881
|
errorCode,
|
|
900
882
|
});
|
|
901
883
|
}
|
|
902
884
|
};
|
|
903
885
|
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
904
886
|
const body = parsedOutput.body;
|
|
905
|
-
const deserialized =
|
|
887
|
+
const deserialized = _json(body);
|
|
906
888
|
const exception = new ConcurrentModificationException({
|
|
907
889
|
$metadata: deserializeMetadata(parsedOutput),
|
|
908
890
|
...deserialized,
|
|
@@ -911,7 +893,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
|
911
893
|
};
|
|
912
894
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
913
895
|
const body = parsedOutput.body;
|
|
914
|
-
const deserialized =
|
|
896
|
+
const deserialized = _json(body);
|
|
915
897
|
const exception = new ConflictException({
|
|
916
898
|
$metadata: deserializeMetadata(parsedOutput),
|
|
917
899
|
...deserialized,
|
|
@@ -920,7 +902,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
920
902
|
};
|
|
921
903
|
const de_DetectedLanguageLowConfidenceExceptionRes = async (parsedOutput, context) => {
|
|
922
904
|
const body = parsedOutput.body;
|
|
923
|
-
const deserialized =
|
|
905
|
+
const deserialized = _json(body);
|
|
924
906
|
const exception = new DetectedLanguageLowConfidenceException({
|
|
925
907
|
$metadata: deserializeMetadata(parsedOutput),
|
|
926
908
|
...deserialized,
|
|
@@ -929,7 +911,7 @@ const de_DetectedLanguageLowConfidenceExceptionRes = async (parsedOutput, contex
|
|
|
929
911
|
};
|
|
930
912
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
931
913
|
const body = parsedOutput.body;
|
|
932
|
-
const deserialized =
|
|
914
|
+
const deserialized = _json(body);
|
|
933
915
|
const exception = new InternalServerException({
|
|
934
916
|
$metadata: deserializeMetadata(parsedOutput),
|
|
935
917
|
...deserialized,
|
|
@@ -938,7 +920,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
938
920
|
};
|
|
939
921
|
const de_InvalidFilterExceptionRes = async (parsedOutput, context) => {
|
|
940
922
|
const body = parsedOutput.body;
|
|
941
|
-
const deserialized =
|
|
923
|
+
const deserialized = _json(body);
|
|
942
924
|
const exception = new InvalidFilterException({
|
|
943
925
|
$metadata: deserializeMetadata(parsedOutput),
|
|
944
926
|
...deserialized,
|
|
@@ -947,7 +929,7 @@ const de_InvalidFilterExceptionRes = async (parsedOutput, context) => {
|
|
|
947
929
|
};
|
|
948
930
|
const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
|
|
949
931
|
const body = parsedOutput.body;
|
|
950
|
-
const deserialized =
|
|
932
|
+
const deserialized = _json(body);
|
|
951
933
|
const exception = new InvalidParameterValueException({
|
|
952
934
|
$metadata: deserializeMetadata(parsedOutput),
|
|
953
935
|
...deserialized,
|
|
@@ -956,7 +938,7 @@ const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
|
|
|
956
938
|
};
|
|
957
939
|
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
958
940
|
const body = parsedOutput.body;
|
|
959
|
-
const deserialized =
|
|
941
|
+
const deserialized = _json(body);
|
|
960
942
|
const exception = new InvalidRequestException({
|
|
961
943
|
$metadata: deserializeMetadata(parsedOutput),
|
|
962
944
|
...deserialized,
|
|
@@ -965,7 +947,7 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
|
965
947
|
};
|
|
966
948
|
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
967
949
|
const body = parsedOutput.body;
|
|
968
|
-
const deserialized =
|
|
950
|
+
const deserialized = _json(body);
|
|
969
951
|
const exception = new LimitExceededException({
|
|
970
952
|
$metadata: deserializeMetadata(parsedOutput),
|
|
971
953
|
...deserialized,
|
|
@@ -974,7 +956,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
974
956
|
};
|
|
975
957
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
976
958
|
const body = parsedOutput.body;
|
|
977
|
-
const deserialized =
|
|
959
|
+
const deserialized = _json(body);
|
|
978
960
|
const exception = new ResourceNotFoundException({
|
|
979
961
|
$metadata: deserializeMetadata(parsedOutput),
|
|
980
962
|
...deserialized,
|
|
@@ -983,7 +965,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
983
965
|
};
|
|
984
966
|
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
985
967
|
const body = parsedOutput.body;
|
|
986
|
-
const deserialized =
|
|
968
|
+
const deserialized = _json(body);
|
|
987
969
|
const exception = new ServiceUnavailableException({
|
|
988
970
|
$metadata: deserializeMetadata(parsedOutput),
|
|
989
971
|
...deserialized,
|
|
@@ -992,7 +974,7 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
|
992
974
|
};
|
|
993
975
|
const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
994
976
|
const body = parsedOutput.body;
|
|
995
|
-
const deserialized =
|
|
977
|
+
const deserialized = _json(body);
|
|
996
978
|
const exception = new TextSizeLimitExceededException({
|
|
997
979
|
$metadata: deserializeMetadata(parsedOutput),
|
|
998
980
|
...deserialized,
|
|
@@ -1001,7 +983,7 @@ const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
1001
983
|
};
|
|
1002
984
|
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
1003
985
|
const body = parsedOutput.body;
|
|
1004
|
-
const deserialized =
|
|
986
|
+
const deserialized = _json(body);
|
|
1005
987
|
const exception = new TooManyRequestsException({
|
|
1006
988
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1007
989
|
...deserialized,
|
|
@@ -1010,7 +992,7 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
|
1010
992
|
};
|
|
1011
993
|
const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
1012
994
|
const body = parsedOutput.body;
|
|
1013
|
-
const deserialized =
|
|
995
|
+
const deserialized = _json(body);
|
|
1014
996
|
const exception = new TooManyTagsException({
|
|
1015
997
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1016
998
|
...deserialized,
|
|
@@ -1019,7 +1001,7 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
|
1019
1001
|
};
|
|
1020
1002
|
const de_UnsupportedDisplayLanguageCodeExceptionRes = async (parsedOutput, context) => {
|
|
1021
1003
|
const body = parsedOutput.body;
|
|
1022
|
-
const deserialized =
|
|
1004
|
+
const deserialized = _json(body);
|
|
1023
1005
|
const exception = new UnsupportedDisplayLanguageCodeException({
|
|
1024
1006
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1025
1007
|
...deserialized,
|
|
@@ -1028,7 +1010,7 @@ const de_UnsupportedDisplayLanguageCodeExceptionRes = async (parsedOutput, conte
|
|
|
1028
1010
|
};
|
|
1029
1011
|
const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) => {
|
|
1030
1012
|
const body = parsedOutput.body;
|
|
1031
|
-
const deserialized =
|
|
1013
|
+
const deserialized = _json(body);
|
|
1032
1014
|
const exception = new UnsupportedLanguagePairException({
|
|
1033
1015
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1034
1016
|
...deserialized,
|
|
@@ -1036,680 +1018,202 @@ const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) =>
|
|
|
1036
1018
|
return __decorateServiceException(exception, body);
|
|
1037
1019
|
};
|
|
1038
1020
|
const se_CreateParallelDataRequest = (input, context) => {
|
|
1039
|
-
return {
|
|
1040
|
-
ClientToken:
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
|
|
1048
|
-
};
|
|
1049
|
-
};
|
|
1050
|
-
const se_DeleteParallelDataRequest = (input, context) => {
|
|
1051
|
-
return {
|
|
1052
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1053
|
-
};
|
|
1054
|
-
};
|
|
1055
|
-
const se_DeleteTerminologyRequest = (input, context) => {
|
|
1056
|
-
return {
|
|
1057
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1058
|
-
};
|
|
1059
|
-
};
|
|
1060
|
-
const se_DescribeTextTranslationJobRequest = (input, context) => {
|
|
1061
|
-
return {
|
|
1062
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1063
|
-
};
|
|
1064
|
-
};
|
|
1065
|
-
const se_EncryptionKey = (input, context) => {
|
|
1066
|
-
return {
|
|
1067
|
-
...(input.Id != null && { Id: input.Id }),
|
|
1068
|
-
...(input.Type != null && { Type: input.Type }),
|
|
1069
|
-
};
|
|
1070
|
-
};
|
|
1071
|
-
const se_GetParallelDataRequest = (input, context) => {
|
|
1072
|
-
return {
|
|
1073
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1074
|
-
};
|
|
1075
|
-
};
|
|
1076
|
-
const se_GetTerminologyRequest = (input, context) => {
|
|
1077
|
-
return {
|
|
1078
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1079
|
-
...(input.TerminologyDataFormat != null && { TerminologyDataFormat: input.TerminologyDataFormat }),
|
|
1080
|
-
};
|
|
1021
|
+
return take(input, {
|
|
1022
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
1023
|
+
Description: [],
|
|
1024
|
+
EncryptionKey: _json,
|
|
1025
|
+
Name: [],
|
|
1026
|
+
ParallelDataConfig: _json,
|
|
1027
|
+
Tags: _json,
|
|
1028
|
+
});
|
|
1081
1029
|
};
|
|
1082
1030
|
const se_ImportTerminologyRequest = (input, context) => {
|
|
1083
|
-
return {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
};
|
|
1091
|
-
};
|
|
1092
|
-
const se_InputDataConfig = (input, context) => {
|
|
1093
|
-
return {
|
|
1094
|
-
...(input.ContentType != null && { ContentType: input.ContentType }),
|
|
1095
|
-
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1096
|
-
};
|
|
1097
|
-
};
|
|
1098
|
-
const se_ListLanguagesRequest = (input, context) => {
|
|
1099
|
-
return {
|
|
1100
|
-
...(input.DisplayLanguageCode != null && { DisplayLanguageCode: input.DisplayLanguageCode }),
|
|
1101
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1102
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1103
|
-
};
|
|
1104
|
-
};
|
|
1105
|
-
const se_ListParallelDataRequest = (input, context) => {
|
|
1106
|
-
return {
|
|
1107
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1108
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1109
|
-
};
|
|
1110
|
-
};
|
|
1111
|
-
const se_ListTagsForResourceRequest = (input, context) => {
|
|
1112
|
-
return {
|
|
1113
|
-
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1114
|
-
};
|
|
1115
|
-
};
|
|
1116
|
-
const se_ListTerminologiesRequest = (input, context) => {
|
|
1117
|
-
return {
|
|
1118
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1119
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1120
|
-
};
|
|
1031
|
+
return take(input, {
|
|
1032
|
+
Description: [],
|
|
1033
|
+
EncryptionKey: _json,
|
|
1034
|
+
MergeStrategy: [],
|
|
1035
|
+
Name: [],
|
|
1036
|
+
Tags: _json,
|
|
1037
|
+
TerminologyData: (_) => se_TerminologyData(_, context),
|
|
1038
|
+
});
|
|
1121
1039
|
};
|
|
1122
1040
|
const se_ListTextTranslationJobsRequest = (input, context) => {
|
|
1123
|
-
return {
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
};
|
|
1128
|
-
};
|
|
1129
|
-
const se_OutputDataConfig = (input, context) => {
|
|
1130
|
-
return {
|
|
1131
|
-
...(input.EncryptionKey != null && { EncryptionKey: se_EncryptionKey(input.EncryptionKey, context) }),
|
|
1132
|
-
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1133
|
-
};
|
|
1134
|
-
};
|
|
1135
|
-
const se_ParallelDataConfig = (input, context) => {
|
|
1136
|
-
return {
|
|
1137
|
-
...(input.Format != null && { Format: input.Format }),
|
|
1138
|
-
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1139
|
-
};
|
|
1140
|
-
};
|
|
1141
|
-
const se_ResourceNameList = (input, context) => {
|
|
1142
|
-
return input
|
|
1143
|
-
.filter((e) => e != null)
|
|
1144
|
-
.map((entry) => {
|
|
1145
|
-
return entry;
|
|
1041
|
+
return take(input, {
|
|
1042
|
+
Filter: (_) => se_TextTranslationJobFilter(_, context),
|
|
1043
|
+
MaxResults: [],
|
|
1044
|
+
NextToken: [],
|
|
1146
1045
|
});
|
|
1147
1046
|
};
|
|
1148
1047
|
const se_StartTextTranslationJobRequest = (input, context) => {
|
|
1149
|
-
return {
|
|
1150
|
-
ClientToken:
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
...(input.TargetLanguageCodes != null && {
|
|
1161
|
-
TargetLanguageCodes: se_TargetLanguageCodeStringList(input.TargetLanguageCodes, context),
|
|
1162
|
-
}),
|
|
1163
|
-
...(input.TerminologyNames != null && { TerminologyNames: se_ResourceNameList(input.TerminologyNames, context) }),
|
|
1164
|
-
};
|
|
1165
|
-
};
|
|
1166
|
-
const se_StopTextTranslationJobRequest = (input, context) => {
|
|
1167
|
-
return {
|
|
1168
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1169
|
-
};
|
|
1170
|
-
};
|
|
1171
|
-
const se_Tag = (input, context) => {
|
|
1172
|
-
return {
|
|
1173
|
-
...(input.Key != null && { Key: input.Key }),
|
|
1174
|
-
...(input.Value != null && { Value: input.Value }),
|
|
1175
|
-
};
|
|
1176
|
-
};
|
|
1177
|
-
const se_TagKeyList = (input, context) => {
|
|
1178
|
-
return input
|
|
1179
|
-
.filter((e) => e != null)
|
|
1180
|
-
.map((entry) => {
|
|
1181
|
-
return entry;
|
|
1182
|
-
});
|
|
1183
|
-
};
|
|
1184
|
-
const se_TagList = (input, context) => {
|
|
1185
|
-
return input
|
|
1186
|
-
.filter((e) => e != null)
|
|
1187
|
-
.map((entry) => {
|
|
1188
|
-
return se_Tag(entry, context);
|
|
1189
|
-
});
|
|
1190
|
-
};
|
|
1191
|
-
const se_TagResourceRequest = (input, context) => {
|
|
1192
|
-
return {
|
|
1193
|
-
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1194
|
-
...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
|
|
1195
|
-
};
|
|
1196
|
-
};
|
|
1197
|
-
const se_TargetLanguageCodeStringList = (input, context) => {
|
|
1198
|
-
return input
|
|
1199
|
-
.filter((e) => e != null)
|
|
1200
|
-
.map((entry) => {
|
|
1201
|
-
return entry;
|
|
1048
|
+
return take(input, {
|
|
1049
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
1050
|
+
DataAccessRoleArn: [],
|
|
1051
|
+
InputDataConfig: _json,
|
|
1052
|
+
JobName: [],
|
|
1053
|
+
OutputDataConfig: _json,
|
|
1054
|
+
ParallelDataNames: _json,
|
|
1055
|
+
Settings: _json,
|
|
1056
|
+
SourceLanguageCode: [],
|
|
1057
|
+
TargetLanguageCodes: _json,
|
|
1058
|
+
TerminologyNames: _json,
|
|
1202
1059
|
});
|
|
1203
1060
|
};
|
|
1204
1061
|
const se_TerminologyData = (input, context) => {
|
|
1205
|
-
return {
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
};
|
|
1062
|
+
return take(input, {
|
|
1063
|
+
Directionality: [],
|
|
1064
|
+
File: context.base64Encoder,
|
|
1065
|
+
Format: [],
|
|
1066
|
+
});
|
|
1210
1067
|
};
|
|
1211
1068
|
const se_TextTranslationJobFilter = (input, context) => {
|
|
1212
|
-
return {
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
...(input.SubmittedBeforeTime != null && {
|
|
1219
|
-
SubmittedBeforeTime: Math.round(input.SubmittedBeforeTime.getTime() / 1000),
|
|
1220
|
-
}),
|
|
1221
|
-
};
|
|
1222
|
-
};
|
|
1223
|
-
const se_TranslateTextRequest = (input, context) => {
|
|
1224
|
-
return {
|
|
1225
|
-
...(input.Settings != null && { Settings: se_TranslationSettings(input.Settings, context) }),
|
|
1226
|
-
...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1227
|
-
...(input.TargetLanguageCode != null && { TargetLanguageCode: input.TargetLanguageCode }),
|
|
1228
|
-
...(input.TerminologyNames != null && { TerminologyNames: se_ResourceNameList(input.TerminologyNames, context) }),
|
|
1229
|
-
...(input.Text != null && { Text: input.Text }),
|
|
1230
|
-
};
|
|
1231
|
-
};
|
|
1232
|
-
const se_TranslationSettings = (input, context) => {
|
|
1233
|
-
return {
|
|
1234
|
-
...(input.Formality != null && { Formality: input.Formality }),
|
|
1235
|
-
...(input.Profanity != null && { Profanity: input.Profanity }),
|
|
1236
|
-
};
|
|
1237
|
-
};
|
|
1238
|
-
const se_UntagResourceRequest = (input, context) => {
|
|
1239
|
-
return {
|
|
1240
|
-
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1241
|
-
...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
|
|
1242
|
-
};
|
|
1069
|
+
return take(input, {
|
|
1070
|
+
JobName: [],
|
|
1071
|
+
JobStatus: [],
|
|
1072
|
+
SubmittedAfterTime: (_) => Math.round(_.getTime() / 1000),
|
|
1073
|
+
SubmittedBeforeTime: (_) => Math.round(_.getTime() / 1000),
|
|
1074
|
+
});
|
|
1243
1075
|
};
|
|
1244
1076
|
const se_UpdateParallelDataRequest = (input, context) => {
|
|
1245
|
-
return {
|
|
1246
|
-
ClientToken:
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
ParallelDataConfig: se_ParallelDataConfig(input.ParallelDataConfig, context),
|
|
1251
|
-
}),
|
|
1252
|
-
};
|
|
1253
|
-
};
|
|
1254
|
-
const de_AppliedTerminology = (output, context) => {
|
|
1255
|
-
return {
|
|
1256
|
-
Name: __expectString(output.Name),
|
|
1257
|
-
Terms: output.Terms != null ? de_TermList(output.Terms, context) : undefined,
|
|
1258
|
-
};
|
|
1259
|
-
};
|
|
1260
|
-
const de_AppliedTerminologyList = (output, context) => {
|
|
1261
|
-
const retVal = (output || [])
|
|
1262
|
-
.filter((e) => e != null)
|
|
1263
|
-
.map((entry) => {
|
|
1264
|
-
if (entry === null) {
|
|
1265
|
-
return null;
|
|
1266
|
-
}
|
|
1267
|
-
return de_AppliedTerminology(entry, context);
|
|
1077
|
+
return take(input, {
|
|
1078
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
1079
|
+
Description: [],
|
|
1080
|
+
Name: [],
|
|
1081
|
+
ParallelDataConfig: _json,
|
|
1268
1082
|
});
|
|
1269
|
-
return retVal;
|
|
1270
|
-
};
|
|
1271
|
-
const de_ConcurrentModificationException = (output, context) => {
|
|
1272
|
-
return {
|
|
1273
|
-
Message: __expectString(output.Message),
|
|
1274
|
-
};
|
|
1275
|
-
};
|
|
1276
|
-
const de_ConflictException = (output, context) => {
|
|
1277
|
-
return {
|
|
1278
|
-
Message: __expectString(output.Message),
|
|
1279
|
-
};
|
|
1280
|
-
};
|
|
1281
|
-
const de_CreateParallelDataResponse = (output, context) => {
|
|
1282
|
-
return {
|
|
1283
|
-
Name: __expectString(output.Name),
|
|
1284
|
-
Status: __expectString(output.Status),
|
|
1285
|
-
};
|
|
1286
|
-
};
|
|
1287
|
-
const de_DeleteParallelDataResponse = (output, context) => {
|
|
1288
|
-
return {
|
|
1289
|
-
Name: __expectString(output.Name),
|
|
1290
|
-
Status: __expectString(output.Status),
|
|
1291
|
-
};
|
|
1292
1083
|
};
|
|
1293
1084
|
const de_DescribeTextTranslationJobResponse = (output, context) => {
|
|
1294
|
-
return {
|
|
1295
|
-
TextTranslationJobProperties:
|
|
1296
|
-
|
|
1297
|
-
: undefined,
|
|
1298
|
-
};
|
|
1299
|
-
};
|
|
1300
|
-
const de_DetectedLanguageLowConfidenceException = (output, context) => {
|
|
1301
|
-
return {
|
|
1302
|
-
DetectedLanguageCode: __expectString(output.DetectedLanguageCode),
|
|
1303
|
-
Message: __expectString(output.Message),
|
|
1304
|
-
};
|
|
1305
|
-
};
|
|
1306
|
-
const de_EncryptionKey = (output, context) => {
|
|
1307
|
-
return {
|
|
1308
|
-
Id: __expectString(output.Id),
|
|
1309
|
-
Type: __expectString(output.Type),
|
|
1310
|
-
};
|
|
1085
|
+
return take(output, {
|
|
1086
|
+
TextTranslationJobProperties: (_) => de_TextTranslationJobProperties(_, context),
|
|
1087
|
+
});
|
|
1311
1088
|
};
|
|
1312
1089
|
const de_GetParallelDataResponse = (output, context) => {
|
|
1313
|
-
return {
|
|
1314
|
-
AuxiliaryDataLocation:
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
? de_ParallelDataDataLocation(output.LatestUpdateAttemptAuxiliaryDataLocation, context)
|
|
1320
|
-
: undefined,
|
|
1321
|
-
ParallelDataProperties: output.ParallelDataProperties != null
|
|
1322
|
-
? de_ParallelDataProperties(output.ParallelDataProperties, context)
|
|
1323
|
-
: undefined,
|
|
1324
|
-
};
|
|
1090
|
+
return take(output, {
|
|
1091
|
+
AuxiliaryDataLocation: _json,
|
|
1092
|
+
DataLocation: _json,
|
|
1093
|
+
LatestUpdateAttemptAuxiliaryDataLocation: _json,
|
|
1094
|
+
ParallelDataProperties: (_) => de_ParallelDataProperties(_, context),
|
|
1095
|
+
});
|
|
1325
1096
|
};
|
|
1326
1097
|
const de_GetTerminologyResponse = (output, context) => {
|
|
1327
|
-
return {
|
|
1328
|
-
AuxiliaryDataLocation:
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
TerminologyDataLocation: output.TerminologyDataLocation != null
|
|
1332
|
-
? de_TerminologyDataLocation(output.TerminologyDataLocation, context)
|
|
1333
|
-
: undefined,
|
|
1334
|
-
TerminologyProperties: output.TerminologyProperties != null
|
|
1335
|
-
? de_TerminologyProperties(output.TerminologyProperties, context)
|
|
1336
|
-
: undefined,
|
|
1337
|
-
};
|
|
1338
|
-
};
|
|
1339
|
-
const de_ImportTerminologyResponse = (output, context) => {
|
|
1340
|
-
return {
|
|
1341
|
-
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1342
|
-
? de_TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
1343
|
-
: undefined,
|
|
1344
|
-
TerminologyProperties: output.TerminologyProperties != null
|
|
1345
|
-
? de_TerminologyProperties(output.TerminologyProperties, context)
|
|
1346
|
-
: undefined,
|
|
1347
|
-
};
|
|
1348
|
-
};
|
|
1349
|
-
const de_InputDataConfig = (output, context) => {
|
|
1350
|
-
return {
|
|
1351
|
-
ContentType: __expectString(output.ContentType),
|
|
1352
|
-
S3Uri: __expectString(output.S3Uri),
|
|
1353
|
-
};
|
|
1354
|
-
};
|
|
1355
|
-
const de_InternalServerException = (output, context) => {
|
|
1356
|
-
return {
|
|
1357
|
-
Message: __expectString(output.Message),
|
|
1358
|
-
};
|
|
1359
|
-
};
|
|
1360
|
-
const de_InvalidFilterException = (output, context) => {
|
|
1361
|
-
return {
|
|
1362
|
-
Message: __expectString(output.Message),
|
|
1363
|
-
};
|
|
1364
|
-
};
|
|
1365
|
-
const de_InvalidParameterValueException = (output, context) => {
|
|
1366
|
-
return {
|
|
1367
|
-
Message: __expectString(output.Message),
|
|
1368
|
-
};
|
|
1369
|
-
};
|
|
1370
|
-
const de_InvalidRequestException = (output, context) => {
|
|
1371
|
-
return {
|
|
1372
|
-
Message: __expectString(output.Message),
|
|
1373
|
-
};
|
|
1374
|
-
};
|
|
1375
|
-
const de_JobDetails = (output, context) => {
|
|
1376
|
-
return {
|
|
1377
|
-
DocumentsWithErrorsCount: __expectInt32(output.DocumentsWithErrorsCount),
|
|
1378
|
-
InputDocumentsCount: __expectInt32(output.InputDocumentsCount),
|
|
1379
|
-
TranslatedDocumentsCount: __expectInt32(output.TranslatedDocumentsCount),
|
|
1380
|
-
};
|
|
1381
|
-
};
|
|
1382
|
-
const de_Language = (output, context) => {
|
|
1383
|
-
return {
|
|
1384
|
-
LanguageCode: __expectString(output.LanguageCode),
|
|
1385
|
-
LanguageName: __expectString(output.LanguageName),
|
|
1386
|
-
};
|
|
1387
|
-
};
|
|
1388
|
-
const de_LanguageCodeStringList = (output, context) => {
|
|
1389
|
-
const retVal = (output || [])
|
|
1390
|
-
.filter((e) => e != null)
|
|
1391
|
-
.map((entry) => {
|
|
1392
|
-
if (entry === null) {
|
|
1393
|
-
return null;
|
|
1394
|
-
}
|
|
1395
|
-
return __expectString(entry);
|
|
1098
|
+
return take(output, {
|
|
1099
|
+
AuxiliaryDataLocation: _json,
|
|
1100
|
+
TerminologyDataLocation: _json,
|
|
1101
|
+
TerminologyProperties: (_) => de_TerminologyProperties(_, context),
|
|
1396
1102
|
});
|
|
1397
|
-
return retVal;
|
|
1398
1103
|
};
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
if (entry === null) {
|
|
1404
|
-
return null;
|
|
1405
|
-
}
|
|
1406
|
-
return de_Language(entry, context);
|
|
1104
|
+
const de_ImportTerminologyResponse = (output, context) => {
|
|
1105
|
+
return take(output, {
|
|
1106
|
+
AuxiliaryDataLocation: _json,
|
|
1107
|
+
TerminologyProperties: (_) => de_TerminologyProperties(_, context),
|
|
1407
1108
|
});
|
|
1408
|
-
return retVal;
|
|
1409
|
-
};
|
|
1410
|
-
const de_LimitExceededException = (output, context) => {
|
|
1411
|
-
return {
|
|
1412
|
-
Message: __expectString(output.Message),
|
|
1413
|
-
};
|
|
1414
|
-
};
|
|
1415
|
-
const de_ListLanguagesResponse = (output, context) => {
|
|
1416
|
-
return {
|
|
1417
|
-
DisplayLanguageCode: __expectString(output.DisplayLanguageCode),
|
|
1418
|
-
Languages: output.Languages != null ? de_LanguagesList(output.Languages, context) : undefined,
|
|
1419
|
-
NextToken: __expectString(output.NextToken),
|
|
1420
|
-
};
|
|
1421
1109
|
};
|
|
1422
1110
|
const de_ListParallelDataResponse = (output, context) => {
|
|
1423
|
-
return {
|
|
1424
|
-
NextToken: __expectString
|
|
1425
|
-
ParallelDataPropertiesList:
|
|
1426
|
-
|
|
1427
|
-
: undefined,
|
|
1428
|
-
};
|
|
1429
|
-
};
|
|
1430
|
-
const de_ListTagsForResourceResponse = (output, context) => {
|
|
1431
|
-
return {
|
|
1432
|
-
Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
|
|
1433
|
-
};
|
|
1111
|
+
return take(output, {
|
|
1112
|
+
NextToken: __expectString,
|
|
1113
|
+
ParallelDataPropertiesList: (_) => de_ParallelDataPropertiesList(_, context),
|
|
1114
|
+
});
|
|
1434
1115
|
};
|
|
1435
1116
|
const de_ListTerminologiesResponse = (output, context) => {
|
|
1436
|
-
return {
|
|
1437
|
-
NextToken: __expectString
|
|
1438
|
-
TerminologyPropertiesList:
|
|
1439
|
-
|
|
1440
|
-
: undefined,
|
|
1441
|
-
};
|
|
1117
|
+
return take(output, {
|
|
1118
|
+
NextToken: __expectString,
|
|
1119
|
+
TerminologyPropertiesList: (_) => de_TerminologyPropertiesList(_, context),
|
|
1120
|
+
});
|
|
1442
1121
|
};
|
|
1443
1122
|
const de_ListTextTranslationJobsResponse = (output, context) => {
|
|
1444
|
-
return {
|
|
1445
|
-
NextToken: __expectString
|
|
1446
|
-
TextTranslationJobPropertiesList:
|
|
1447
|
-
|
|
1448
|
-
: undefined,
|
|
1449
|
-
};
|
|
1450
|
-
};
|
|
1451
|
-
const de_OutputDataConfig = (output, context) => {
|
|
1452
|
-
return {
|
|
1453
|
-
EncryptionKey: output.EncryptionKey != null ? de_EncryptionKey(output.EncryptionKey, context) : undefined,
|
|
1454
|
-
S3Uri: __expectString(output.S3Uri),
|
|
1455
|
-
};
|
|
1456
|
-
};
|
|
1457
|
-
const de_ParallelDataConfig = (output, context) => {
|
|
1458
|
-
return {
|
|
1459
|
-
Format: __expectString(output.Format),
|
|
1460
|
-
S3Uri: __expectString(output.S3Uri),
|
|
1461
|
-
};
|
|
1462
|
-
};
|
|
1463
|
-
const de_ParallelDataDataLocation = (output, context) => {
|
|
1464
|
-
return {
|
|
1465
|
-
Location: __expectString(output.Location),
|
|
1466
|
-
RepositoryType: __expectString(output.RepositoryType),
|
|
1467
|
-
};
|
|
1123
|
+
return take(output, {
|
|
1124
|
+
NextToken: __expectString,
|
|
1125
|
+
TextTranslationJobPropertiesList: (_) => de_TextTranslationJobPropertiesList(_, context),
|
|
1126
|
+
});
|
|
1468
1127
|
};
|
|
1469
1128
|
const de_ParallelDataProperties = (output, context) => {
|
|
1470
|
-
return {
|
|
1471
|
-
Arn: __expectString
|
|
1472
|
-
CreatedAt:
|
|
1473
|
-
Description: __expectString
|
|
1474
|
-
EncryptionKey:
|
|
1475
|
-
FailedRecordCount: __expectLong
|
|
1476
|
-
ImportedDataSize: __expectLong
|
|
1477
|
-
ImportedRecordCount: __expectLong
|
|
1478
|
-
LastUpdatedAt:
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
SourceLanguageCode: __expectString(output.SourceLanguageCode),
|
|
1490
|
-
Status: __expectString(output.Status),
|
|
1491
|
-
TargetLanguageCodes: output.TargetLanguageCodes != null ? de_LanguageCodeStringList(output.TargetLanguageCodes, context) : undefined,
|
|
1492
|
-
};
|
|
1129
|
+
return take(output, {
|
|
1130
|
+
Arn: __expectString,
|
|
1131
|
+
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1132
|
+
Description: __expectString,
|
|
1133
|
+
EncryptionKey: _json,
|
|
1134
|
+
FailedRecordCount: __expectLong,
|
|
1135
|
+
ImportedDataSize: __expectLong,
|
|
1136
|
+
ImportedRecordCount: __expectLong,
|
|
1137
|
+
LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1138
|
+
LatestUpdateAttemptAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1139
|
+
LatestUpdateAttemptStatus: __expectString,
|
|
1140
|
+
Message: __expectString,
|
|
1141
|
+
Name: __expectString,
|
|
1142
|
+
ParallelDataConfig: _json,
|
|
1143
|
+
SkippedRecordCount: __expectLong,
|
|
1144
|
+
SourceLanguageCode: __expectString,
|
|
1145
|
+
Status: __expectString,
|
|
1146
|
+
TargetLanguageCodes: _json,
|
|
1147
|
+
});
|
|
1493
1148
|
};
|
|
1494
1149
|
const de_ParallelDataPropertiesList = (output, context) => {
|
|
1495
1150
|
const retVal = (output || [])
|
|
1496
1151
|
.filter((e) => e != null)
|
|
1497
1152
|
.map((entry) => {
|
|
1498
|
-
if (entry === null) {
|
|
1499
|
-
return null;
|
|
1500
|
-
}
|
|
1501
1153
|
return de_ParallelDataProperties(entry, context);
|
|
1502
1154
|
});
|
|
1503
1155
|
return retVal;
|
|
1504
1156
|
};
|
|
1505
|
-
const de_ResourceNameList = (output, context) => {
|
|
1506
|
-
const retVal = (output || [])
|
|
1507
|
-
.filter((e) => e != null)
|
|
1508
|
-
.map((entry) => {
|
|
1509
|
-
if (entry === null) {
|
|
1510
|
-
return null;
|
|
1511
|
-
}
|
|
1512
|
-
return __expectString(entry);
|
|
1513
|
-
});
|
|
1514
|
-
return retVal;
|
|
1515
|
-
};
|
|
1516
|
-
const de_ResourceNotFoundException = (output, context) => {
|
|
1517
|
-
return {
|
|
1518
|
-
Message: __expectString(output.Message),
|
|
1519
|
-
};
|
|
1520
|
-
};
|
|
1521
|
-
const de_ServiceUnavailableException = (output, context) => {
|
|
1522
|
-
return {
|
|
1523
|
-
Message: __expectString(output.Message),
|
|
1524
|
-
};
|
|
1525
|
-
};
|
|
1526
|
-
const de_StartTextTranslationJobResponse = (output, context) => {
|
|
1527
|
-
return {
|
|
1528
|
-
JobId: __expectString(output.JobId),
|
|
1529
|
-
JobStatus: __expectString(output.JobStatus),
|
|
1530
|
-
};
|
|
1531
|
-
};
|
|
1532
|
-
const de_StopTextTranslationJobResponse = (output, context) => {
|
|
1533
|
-
return {
|
|
1534
|
-
JobId: __expectString(output.JobId),
|
|
1535
|
-
JobStatus: __expectString(output.JobStatus),
|
|
1536
|
-
};
|
|
1537
|
-
};
|
|
1538
|
-
const de_Tag = (output, context) => {
|
|
1539
|
-
return {
|
|
1540
|
-
Key: __expectString(output.Key),
|
|
1541
|
-
Value: __expectString(output.Value),
|
|
1542
|
-
};
|
|
1543
|
-
};
|
|
1544
|
-
const de_TagList = (output, context) => {
|
|
1545
|
-
const retVal = (output || [])
|
|
1546
|
-
.filter((e) => e != null)
|
|
1547
|
-
.map((entry) => {
|
|
1548
|
-
if (entry === null) {
|
|
1549
|
-
return null;
|
|
1550
|
-
}
|
|
1551
|
-
return de_Tag(entry, context);
|
|
1552
|
-
});
|
|
1553
|
-
return retVal;
|
|
1554
|
-
};
|
|
1555
|
-
const de_TagResourceResponse = (output, context) => {
|
|
1556
|
-
return {};
|
|
1557
|
-
};
|
|
1558
|
-
const de_TargetLanguageCodeStringList = (output, context) => {
|
|
1559
|
-
const retVal = (output || [])
|
|
1560
|
-
.filter((e) => e != null)
|
|
1561
|
-
.map((entry) => {
|
|
1562
|
-
if (entry === null) {
|
|
1563
|
-
return null;
|
|
1564
|
-
}
|
|
1565
|
-
return __expectString(entry);
|
|
1566
|
-
});
|
|
1567
|
-
return retVal;
|
|
1568
|
-
};
|
|
1569
|
-
const de_Term = (output, context) => {
|
|
1570
|
-
return {
|
|
1571
|
-
SourceText: __expectString(output.SourceText),
|
|
1572
|
-
TargetText: __expectString(output.TargetText),
|
|
1573
|
-
};
|
|
1574
|
-
};
|
|
1575
|
-
const de_TerminologyDataLocation = (output, context) => {
|
|
1576
|
-
return {
|
|
1577
|
-
Location: __expectString(output.Location),
|
|
1578
|
-
RepositoryType: __expectString(output.RepositoryType),
|
|
1579
|
-
};
|
|
1580
|
-
};
|
|
1581
1157
|
const de_TerminologyProperties = (output, context) => {
|
|
1582
|
-
return {
|
|
1583
|
-
Arn: __expectString
|
|
1584
|
-
CreatedAt:
|
|
1585
|
-
Description: __expectString
|
|
1586
|
-
Directionality: __expectString
|
|
1587
|
-
EncryptionKey:
|
|
1588
|
-
Format: __expectString
|
|
1589
|
-
LastUpdatedAt:
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
TermCount: __expectInt32(output.TermCount),
|
|
1599
|
-
};
|
|
1158
|
+
return take(output, {
|
|
1159
|
+
Arn: __expectString,
|
|
1160
|
+
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1161
|
+
Description: __expectString,
|
|
1162
|
+
Directionality: __expectString,
|
|
1163
|
+
EncryptionKey: _json,
|
|
1164
|
+
Format: __expectString,
|
|
1165
|
+
LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1166
|
+
Message: __expectString,
|
|
1167
|
+
Name: __expectString,
|
|
1168
|
+
SizeBytes: __expectInt32,
|
|
1169
|
+
SkippedTermCount: __expectInt32,
|
|
1170
|
+
SourceLanguageCode: __expectString,
|
|
1171
|
+
TargetLanguageCodes: _json,
|
|
1172
|
+
TermCount: __expectInt32,
|
|
1173
|
+
});
|
|
1600
1174
|
};
|
|
1601
1175
|
const de_TerminologyPropertiesList = (output, context) => {
|
|
1602
1176
|
const retVal = (output || [])
|
|
1603
1177
|
.filter((e) => e != null)
|
|
1604
1178
|
.map((entry) => {
|
|
1605
|
-
if (entry === null) {
|
|
1606
|
-
return null;
|
|
1607
|
-
}
|
|
1608
1179
|
return de_TerminologyProperties(entry, context);
|
|
1609
1180
|
});
|
|
1610
1181
|
return retVal;
|
|
1611
1182
|
};
|
|
1612
|
-
const de_TermList = (output, context) => {
|
|
1613
|
-
const retVal = (output || [])
|
|
1614
|
-
.filter((e) => e != null)
|
|
1615
|
-
.map((entry) => {
|
|
1616
|
-
if (entry === null) {
|
|
1617
|
-
return null;
|
|
1618
|
-
}
|
|
1619
|
-
return de_Term(entry, context);
|
|
1620
|
-
});
|
|
1621
|
-
return retVal;
|
|
1622
|
-
};
|
|
1623
|
-
const de_TextSizeLimitExceededException = (output, context) => {
|
|
1624
|
-
return {
|
|
1625
|
-
Message: __expectString(output.Message),
|
|
1626
|
-
};
|
|
1627
|
-
};
|
|
1628
1183
|
const de_TextTranslationJobProperties = (output, context) => {
|
|
1629
|
-
return {
|
|
1630
|
-
DataAccessRoleArn: __expectString
|
|
1631
|
-
EndTime:
|
|
1632
|
-
InputDataConfig:
|
|
1633
|
-
JobDetails:
|
|
1634
|
-
JobId: __expectString
|
|
1635
|
-
JobName: __expectString
|
|
1636
|
-
JobStatus: __expectString
|
|
1637
|
-
Message: __expectString
|
|
1638
|
-
OutputDataConfig:
|
|
1639
|
-
ParallelDataNames:
|
|
1640
|
-
Settings:
|
|
1641
|
-
SourceLanguageCode: __expectString
|
|
1642
|
-
SubmittedTime:
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
? de_TargetLanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
1647
|
-
: undefined,
|
|
1648
|
-
TerminologyNames: output.TerminologyNames != null ? de_ResourceNameList(output.TerminologyNames, context) : undefined,
|
|
1649
|
-
};
|
|
1184
|
+
return take(output, {
|
|
1185
|
+
DataAccessRoleArn: __expectString,
|
|
1186
|
+
EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1187
|
+
InputDataConfig: _json,
|
|
1188
|
+
JobDetails: _json,
|
|
1189
|
+
JobId: __expectString,
|
|
1190
|
+
JobName: __expectString,
|
|
1191
|
+
JobStatus: __expectString,
|
|
1192
|
+
Message: __expectString,
|
|
1193
|
+
OutputDataConfig: _json,
|
|
1194
|
+
ParallelDataNames: _json,
|
|
1195
|
+
Settings: _json,
|
|
1196
|
+
SourceLanguageCode: __expectString,
|
|
1197
|
+
SubmittedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1198
|
+
TargetLanguageCodes: _json,
|
|
1199
|
+
TerminologyNames: _json,
|
|
1200
|
+
});
|
|
1650
1201
|
};
|
|
1651
1202
|
const de_TextTranslationJobPropertiesList = (output, context) => {
|
|
1652
1203
|
const retVal = (output || [])
|
|
1653
1204
|
.filter((e) => e != null)
|
|
1654
1205
|
.map((entry) => {
|
|
1655
|
-
if (entry === null) {
|
|
1656
|
-
return null;
|
|
1657
|
-
}
|
|
1658
1206
|
return de_TextTranslationJobProperties(entry, context);
|
|
1659
1207
|
});
|
|
1660
1208
|
return retVal;
|
|
1661
1209
|
};
|
|
1662
|
-
const de_TooManyRequestsException = (output, context) => {
|
|
1663
|
-
return {
|
|
1664
|
-
Message: __expectString(output.Message),
|
|
1665
|
-
};
|
|
1666
|
-
};
|
|
1667
|
-
const de_TooManyTagsException = (output, context) => {
|
|
1668
|
-
return {
|
|
1669
|
-
ResourceArn: __expectString(output.ResourceArn),
|
|
1670
|
-
message: __expectString(output.message),
|
|
1671
|
-
};
|
|
1672
|
-
};
|
|
1673
|
-
const de_TranslateTextResponse = (output, context) => {
|
|
1674
|
-
return {
|
|
1675
|
-
AppliedSettings: output.AppliedSettings != null ? de_TranslationSettings(output.AppliedSettings, context) : undefined,
|
|
1676
|
-
AppliedTerminologies: output.AppliedTerminologies != null ? de_AppliedTerminologyList(output.AppliedTerminologies, context) : undefined,
|
|
1677
|
-
SourceLanguageCode: __expectString(output.SourceLanguageCode),
|
|
1678
|
-
TargetLanguageCode: __expectString(output.TargetLanguageCode),
|
|
1679
|
-
TranslatedText: __expectString(output.TranslatedText),
|
|
1680
|
-
};
|
|
1681
|
-
};
|
|
1682
|
-
const de_TranslationSettings = (output, context) => {
|
|
1683
|
-
return {
|
|
1684
|
-
Formality: __expectString(output.Formality),
|
|
1685
|
-
Profanity: __expectString(output.Profanity),
|
|
1686
|
-
};
|
|
1687
|
-
};
|
|
1688
|
-
const de_UnsupportedDisplayLanguageCodeException = (output, context) => {
|
|
1689
|
-
return {
|
|
1690
|
-
DisplayLanguageCode: __expectString(output.DisplayLanguageCode),
|
|
1691
|
-
Message: __expectString(output.Message),
|
|
1692
|
-
};
|
|
1693
|
-
};
|
|
1694
|
-
const de_UnsupportedLanguagePairException = (output, context) => {
|
|
1695
|
-
return {
|
|
1696
|
-
Message: __expectString(output.Message),
|
|
1697
|
-
SourceLanguageCode: __expectString(output.SourceLanguageCode),
|
|
1698
|
-
TargetLanguageCode: __expectString(output.TargetLanguageCode),
|
|
1699
|
-
};
|
|
1700
|
-
};
|
|
1701
|
-
const de_UntagResourceResponse = (output, context) => {
|
|
1702
|
-
return {};
|
|
1703
|
-
};
|
|
1704
1210
|
const de_UpdateParallelDataResponse = (output, context) => {
|
|
1705
|
-
return {
|
|
1706
|
-
LatestUpdateAttemptAt:
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
Status: __expectString(output.Status),
|
|
1712
|
-
};
|
|
1211
|
+
return take(output, {
|
|
1212
|
+
LatestUpdateAttemptAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1213
|
+
LatestUpdateAttemptStatus: __expectString,
|
|
1214
|
+
Name: __expectString,
|
|
1215
|
+
Status: __expectString,
|
|
1216
|
+
});
|
|
1713
1217
|
};
|
|
1714
1218
|
const deserializeMetadata = (output) => ({
|
|
1715
1219
|
httpStatusCode: output.statusCode,
|
|
@@ -1724,6 +1228,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
1724
1228
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1725
1229
|
};
|
|
1726
1230
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1231
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
1727
1232
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1728
1233
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1729
1234
|
const contents = {
|