@aws-sdk/client-translate 3.118.1 → 3.127.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist-cjs/Translate.js +15 -0
- package/dist-cjs/commands/ListLanguagesCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +48 -2
- package/dist-cjs/pagination/ListLanguagesPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_json1_1.js +267 -194
- package/dist-es/Translate.js +15 -0
- package/dist-es/commands/ListLanguagesCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +39 -0
- package/dist-es/pagination/ListLanguagesPaginator.js +75 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +254 -167
- package/dist-types/Translate.d.ts +15 -8
- package/dist-types/TranslateClient.d.ts +3 -2
- package/dist-types/commands/ImportTerminologyCommand.d.ts +8 -8
- package/dist-types/commands/ListLanguagesCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +144 -32
- package/dist-types/pagination/ListLanguagesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +3 -0
- package/dist-types/ts3.4/Translate.d.ts +5 -0
- package/dist-types/ts3.4/TranslateClient.d.ts +3 -2
- package/dist-types/ts3.4/commands/ListLanguagesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +58 -0
- package/dist-types/ts3.4/pagination/ListLanguagesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +3 -0
- package/package.json +26 -26
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_json1_1UpdateParallelDataCommand = exports.deserializeAws_json1_1TranslateTextCommand = exports.deserializeAws_json1_1StopTextTranslationJobCommand = exports.deserializeAws_json1_1StartTextTranslationJobCommand = exports.deserializeAws_json1_1ListTextTranslationJobsCommand = exports.deserializeAws_json1_1ListTerminologiesCommand = exports.deserializeAws_json1_1ListParallelDataCommand = exports.deserializeAws_json1_1ImportTerminologyCommand = exports.deserializeAws_json1_1GetTerminologyCommand = exports.deserializeAws_json1_1GetParallelDataCommand = exports.deserializeAws_json1_1DescribeTextTranslationJobCommand = exports.deserializeAws_json1_1DeleteTerminologyCommand = exports.deserializeAws_json1_1DeleteParallelDataCommand = exports.deserializeAws_json1_1CreateParallelDataCommand = exports.serializeAws_json1_1UpdateParallelDataCommand = exports.serializeAws_json1_1TranslateTextCommand = exports.serializeAws_json1_1StopTextTranslationJobCommand = exports.serializeAws_json1_1StartTextTranslationJobCommand = exports.serializeAws_json1_1ListTextTranslationJobsCommand = exports.serializeAws_json1_1ListTerminologiesCommand = exports.serializeAws_json1_1ListParallelDataCommand = exports.serializeAws_json1_1ImportTerminologyCommand = exports.serializeAws_json1_1GetTerminologyCommand = exports.serializeAws_json1_1GetParallelDataCommand = exports.serializeAws_json1_1DescribeTextTranslationJobCommand = exports.serializeAws_json1_1DeleteTerminologyCommand = exports.serializeAws_json1_1DeleteParallelDataCommand = exports.serializeAws_json1_1CreateParallelDataCommand = void 0;
|
|
3
|
+
exports.deserializeAws_json1_1UpdateParallelDataCommand = exports.deserializeAws_json1_1TranslateTextCommand = exports.deserializeAws_json1_1StopTextTranslationJobCommand = exports.deserializeAws_json1_1StartTextTranslationJobCommand = exports.deserializeAws_json1_1ListTextTranslationJobsCommand = exports.deserializeAws_json1_1ListTerminologiesCommand = exports.deserializeAws_json1_1ListParallelDataCommand = exports.deserializeAws_json1_1ListLanguagesCommand = exports.deserializeAws_json1_1ImportTerminologyCommand = exports.deserializeAws_json1_1GetTerminologyCommand = exports.deserializeAws_json1_1GetParallelDataCommand = exports.deserializeAws_json1_1DescribeTextTranslationJobCommand = exports.deserializeAws_json1_1DeleteTerminologyCommand = exports.deserializeAws_json1_1DeleteParallelDataCommand = exports.deserializeAws_json1_1CreateParallelDataCommand = exports.serializeAws_json1_1UpdateParallelDataCommand = exports.serializeAws_json1_1TranslateTextCommand = exports.serializeAws_json1_1StopTextTranslationJobCommand = exports.serializeAws_json1_1StartTextTranslationJobCommand = exports.serializeAws_json1_1ListTextTranslationJobsCommand = exports.serializeAws_json1_1ListTerminologiesCommand = exports.serializeAws_json1_1ListParallelDataCommand = exports.serializeAws_json1_1ListLanguagesCommand = exports.serializeAws_json1_1ImportTerminologyCommand = exports.serializeAws_json1_1GetTerminologyCommand = exports.serializeAws_json1_1GetParallelDataCommand = exports.serializeAws_json1_1DescribeTextTranslationJobCommand = exports.serializeAws_json1_1DeleteTerminologyCommand = exports.serializeAws_json1_1DeleteParallelDataCommand = exports.serializeAws_json1_1CreateParallelDataCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
@@ -76,6 +76,16 @@ const serializeAws_json1_1ImportTerminologyCommand = async (input, context) => {
|
|
|
76
76
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
77
|
};
|
|
78
78
|
exports.serializeAws_json1_1ImportTerminologyCommand = serializeAws_json1_1ImportTerminologyCommand;
|
|
79
|
+
const serializeAws_json1_1ListLanguagesCommand = async (input, context) => {
|
|
80
|
+
const headers = {
|
|
81
|
+
"content-type": "application/x-amz-json-1.1",
|
|
82
|
+
"x-amz-target": "AWSShineFrontendService_20170701.ListLanguages",
|
|
83
|
+
};
|
|
84
|
+
let body;
|
|
85
|
+
body = JSON.stringify(serializeAws_json1_1ListLanguagesRequest(input, context));
|
|
86
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
87
|
+
};
|
|
88
|
+
exports.serializeAws_json1_1ListLanguagesCommand = serializeAws_json1_1ListLanguagesCommand;
|
|
79
89
|
const serializeAws_json1_1ListParallelDataCommand = async (input, context) => {
|
|
80
90
|
const headers = {
|
|
81
91
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -166,8 +176,7 @@ const deserializeAws_json1_1CreateParallelDataCommandError = async (output, cont
|
|
|
166
176
|
body: await parseBody(output.body, context),
|
|
167
177
|
};
|
|
168
178
|
let response;
|
|
169
|
-
|
|
170
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
179
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
171
180
|
switch (errorCode) {
|
|
172
181
|
case "ConflictException":
|
|
173
182
|
case "com.amazonaws.translate#ConflictException":
|
|
@@ -189,10 +198,12 @@ const deserializeAws_json1_1CreateParallelDataCommandError = async (output, cont
|
|
|
189
198
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
190
199
|
default:
|
|
191
200
|
const parsedBody = parsedOutput.body;
|
|
201
|
+
const $metadata = deserializeMetadata(output);
|
|
202
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
192
203
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
193
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
204
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
194
205
|
$fault: "client",
|
|
195
|
-
$metadata
|
|
206
|
+
$metadata,
|
|
196
207
|
});
|
|
197
208
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
198
209
|
}
|
|
@@ -217,8 +228,7 @@ const deserializeAws_json1_1DeleteParallelDataCommandError = async (output, cont
|
|
|
217
228
|
body: await parseBody(output.body, context),
|
|
218
229
|
};
|
|
219
230
|
let response;
|
|
220
|
-
|
|
221
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
231
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
222
232
|
switch (errorCode) {
|
|
223
233
|
case "ConcurrentModificationException":
|
|
224
234
|
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
@@ -234,10 +244,12 @@ const deserializeAws_json1_1DeleteParallelDataCommandError = async (output, cont
|
|
|
234
244
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
235
245
|
default:
|
|
236
246
|
const parsedBody = parsedOutput.body;
|
|
247
|
+
const $metadata = deserializeMetadata(output);
|
|
248
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
237
249
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
238
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
250
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
239
251
|
$fault: "client",
|
|
240
|
-
$metadata
|
|
252
|
+
$metadata,
|
|
241
253
|
});
|
|
242
254
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
243
255
|
}
|
|
@@ -259,8 +271,7 @@ const deserializeAws_json1_1DeleteTerminologyCommandError = async (output, conte
|
|
|
259
271
|
body: await parseBody(output.body, context),
|
|
260
272
|
};
|
|
261
273
|
let response;
|
|
262
|
-
|
|
263
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
274
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
264
275
|
switch (errorCode) {
|
|
265
276
|
case "InternalServerException":
|
|
266
277
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -276,10 +287,12 @@ const deserializeAws_json1_1DeleteTerminologyCommandError = async (output, conte
|
|
|
276
287
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
277
288
|
default:
|
|
278
289
|
const parsedBody = parsedOutput.body;
|
|
290
|
+
const $metadata = deserializeMetadata(output);
|
|
291
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
279
292
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
280
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
293
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
281
294
|
$fault: "client",
|
|
282
|
-
$metadata
|
|
295
|
+
$metadata,
|
|
283
296
|
});
|
|
284
297
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
285
298
|
}
|
|
@@ -304,8 +317,7 @@ const deserializeAws_json1_1DescribeTextTranslationJobCommandError = async (outp
|
|
|
304
317
|
body: await parseBody(output.body, context),
|
|
305
318
|
};
|
|
306
319
|
let response;
|
|
307
|
-
|
|
308
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
320
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
309
321
|
switch (errorCode) {
|
|
310
322
|
case "InternalServerException":
|
|
311
323
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -318,10 +330,12 @@ const deserializeAws_json1_1DescribeTextTranslationJobCommandError = async (outp
|
|
|
318
330
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
319
331
|
default:
|
|
320
332
|
const parsedBody = parsedOutput.body;
|
|
333
|
+
const $metadata = deserializeMetadata(output);
|
|
334
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
321
335
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
322
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
336
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
323
337
|
$fault: "client",
|
|
324
|
-
$metadata
|
|
338
|
+
$metadata,
|
|
325
339
|
});
|
|
326
340
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
327
341
|
}
|
|
@@ -346,8 +360,7 @@ const deserializeAws_json1_1GetParallelDataCommandError = async (output, context
|
|
|
346
360
|
body: await parseBody(output.body, context),
|
|
347
361
|
};
|
|
348
362
|
let response;
|
|
349
|
-
|
|
350
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
363
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
351
364
|
switch (errorCode) {
|
|
352
365
|
case "InternalServerException":
|
|
353
366
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -363,10 +376,12 @@ const deserializeAws_json1_1GetParallelDataCommandError = async (output, context
|
|
|
363
376
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
364
377
|
default:
|
|
365
378
|
const parsedBody = parsedOutput.body;
|
|
379
|
+
const $metadata = deserializeMetadata(output);
|
|
380
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
366
381
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
367
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
382
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
368
383
|
$fault: "client",
|
|
369
|
-
$metadata
|
|
384
|
+
$metadata,
|
|
370
385
|
});
|
|
371
386
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
372
387
|
}
|
|
@@ -391,8 +406,7 @@ const deserializeAws_json1_1GetTerminologyCommandError = async (output, context)
|
|
|
391
406
|
body: await parseBody(output.body, context),
|
|
392
407
|
};
|
|
393
408
|
let response;
|
|
394
|
-
|
|
395
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
409
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
396
410
|
switch (errorCode) {
|
|
397
411
|
case "InternalServerException":
|
|
398
412
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -408,10 +422,12 @@ const deserializeAws_json1_1GetTerminologyCommandError = async (output, context)
|
|
|
408
422
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
409
423
|
default:
|
|
410
424
|
const parsedBody = parsedOutput.body;
|
|
425
|
+
const $metadata = deserializeMetadata(output);
|
|
426
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
411
427
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
412
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
428
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
413
429
|
$fault: "client",
|
|
414
|
-
$metadata
|
|
430
|
+
$metadata,
|
|
415
431
|
});
|
|
416
432
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
417
433
|
}
|
|
@@ -436,8 +452,7 @@ const deserializeAws_json1_1ImportTerminologyCommandError = async (output, conte
|
|
|
436
452
|
body: await parseBody(output.body, context),
|
|
437
453
|
};
|
|
438
454
|
let response;
|
|
439
|
-
|
|
440
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
455
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
441
456
|
switch (errorCode) {
|
|
442
457
|
case "InternalServerException":
|
|
443
458
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -453,10 +468,58 @@ const deserializeAws_json1_1ImportTerminologyCommandError = async (output, conte
|
|
|
453
468
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
454
469
|
default:
|
|
455
470
|
const parsedBody = parsedOutput.body;
|
|
471
|
+
const $metadata = deserializeMetadata(output);
|
|
472
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
473
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
474
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
475
|
+
$fault: "client",
|
|
476
|
+
$metadata,
|
|
477
|
+
});
|
|
478
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
const deserializeAws_json1_1ListLanguagesCommand = async (output, context) => {
|
|
482
|
+
if (output.statusCode >= 300) {
|
|
483
|
+
return deserializeAws_json1_1ListLanguagesCommandError(output, context);
|
|
484
|
+
}
|
|
485
|
+
const data = await parseBody(output.body, context);
|
|
486
|
+
let contents = {};
|
|
487
|
+
contents = deserializeAws_json1_1ListLanguagesResponse(data, context);
|
|
488
|
+
const response = {
|
|
489
|
+
$metadata: deserializeMetadata(output),
|
|
490
|
+
...contents,
|
|
491
|
+
};
|
|
492
|
+
return Promise.resolve(response);
|
|
493
|
+
};
|
|
494
|
+
exports.deserializeAws_json1_1ListLanguagesCommand = deserializeAws_json1_1ListLanguagesCommand;
|
|
495
|
+
const deserializeAws_json1_1ListLanguagesCommandError = async (output, context) => {
|
|
496
|
+
const parsedOutput = {
|
|
497
|
+
...output,
|
|
498
|
+
body: await parseBody(output.body, context),
|
|
499
|
+
};
|
|
500
|
+
let response;
|
|
501
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
502
|
+
switch (errorCode) {
|
|
503
|
+
case "InternalServerException":
|
|
504
|
+
case "com.amazonaws.translate#InternalServerException":
|
|
505
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
506
|
+
case "InvalidParameterValueException":
|
|
507
|
+
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
508
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
509
|
+
case "TooManyRequestsException":
|
|
510
|
+
case "com.amazonaws.translate#TooManyRequestsException":
|
|
511
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
512
|
+
case "UnsupportedDisplayLanguageCodeException":
|
|
513
|
+
case "com.amazonaws.translate#UnsupportedDisplayLanguageCodeException":
|
|
514
|
+
throw await deserializeAws_json1_1UnsupportedDisplayLanguageCodeExceptionResponse(parsedOutput, context);
|
|
515
|
+
default:
|
|
516
|
+
const parsedBody = parsedOutput.body;
|
|
517
|
+
const $metadata = deserializeMetadata(output);
|
|
518
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
456
519
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
457
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
520
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
458
521
|
$fault: "client",
|
|
459
|
-
$metadata
|
|
522
|
+
$metadata,
|
|
460
523
|
});
|
|
461
524
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
462
525
|
}
|
|
@@ -481,8 +544,7 @@ const deserializeAws_json1_1ListParallelDataCommandError = async (output, contex
|
|
|
481
544
|
body: await parseBody(output.body, context),
|
|
482
545
|
};
|
|
483
546
|
let response;
|
|
484
|
-
|
|
485
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
547
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
486
548
|
switch (errorCode) {
|
|
487
549
|
case "InternalServerException":
|
|
488
550
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -495,10 +557,12 @@ const deserializeAws_json1_1ListParallelDataCommandError = async (output, contex
|
|
|
495
557
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
496
558
|
default:
|
|
497
559
|
const parsedBody = parsedOutput.body;
|
|
560
|
+
const $metadata = deserializeMetadata(output);
|
|
561
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
498
562
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
499
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
563
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
500
564
|
$fault: "client",
|
|
501
|
-
$metadata
|
|
565
|
+
$metadata,
|
|
502
566
|
});
|
|
503
567
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
504
568
|
}
|
|
@@ -523,8 +587,7 @@ const deserializeAws_json1_1ListTerminologiesCommandError = async (output, conte
|
|
|
523
587
|
body: await parseBody(output.body, context),
|
|
524
588
|
};
|
|
525
589
|
let response;
|
|
526
|
-
|
|
527
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
590
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
528
591
|
switch (errorCode) {
|
|
529
592
|
case "InternalServerException":
|
|
530
593
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -537,10 +600,12 @@ const deserializeAws_json1_1ListTerminologiesCommandError = async (output, conte
|
|
|
537
600
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
538
601
|
default:
|
|
539
602
|
const parsedBody = parsedOutput.body;
|
|
603
|
+
const $metadata = deserializeMetadata(output);
|
|
604
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
540
605
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
541
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
606
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
542
607
|
$fault: "client",
|
|
543
|
-
$metadata
|
|
608
|
+
$metadata,
|
|
544
609
|
});
|
|
545
610
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
546
611
|
}
|
|
@@ -565,8 +630,7 @@ const deserializeAws_json1_1ListTextTranslationJobsCommandError = async (output,
|
|
|
565
630
|
body: await parseBody(output.body, context),
|
|
566
631
|
};
|
|
567
632
|
let response;
|
|
568
|
-
|
|
569
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
633
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
570
634
|
switch (errorCode) {
|
|
571
635
|
case "InternalServerException":
|
|
572
636
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -582,10 +646,12 @@ const deserializeAws_json1_1ListTextTranslationJobsCommandError = async (output,
|
|
|
582
646
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
583
647
|
default:
|
|
584
648
|
const parsedBody = parsedOutput.body;
|
|
649
|
+
const $metadata = deserializeMetadata(output);
|
|
650
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
585
651
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
586
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
652
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
587
653
|
$fault: "client",
|
|
588
|
-
$metadata
|
|
654
|
+
$metadata,
|
|
589
655
|
});
|
|
590
656
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
591
657
|
}
|
|
@@ -610,8 +676,7 @@ const deserializeAws_json1_1StartTextTranslationJobCommandError = async (output,
|
|
|
610
676
|
body: await parseBody(output.body, context),
|
|
611
677
|
};
|
|
612
678
|
let response;
|
|
613
|
-
|
|
614
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
679
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
615
680
|
switch (errorCode) {
|
|
616
681
|
case "InternalServerException":
|
|
617
682
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -633,10 +698,12 @@ const deserializeAws_json1_1StartTextTranslationJobCommandError = async (output,
|
|
|
633
698
|
throw await deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context);
|
|
634
699
|
default:
|
|
635
700
|
const parsedBody = parsedOutput.body;
|
|
701
|
+
const $metadata = deserializeMetadata(output);
|
|
702
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
636
703
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
637
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
704
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
638
705
|
$fault: "client",
|
|
639
|
-
$metadata
|
|
706
|
+
$metadata,
|
|
640
707
|
});
|
|
641
708
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
642
709
|
}
|
|
@@ -661,8 +728,7 @@ const deserializeAws_json1_1StopTextTranslationJobCommandError = async (output,
|
|
|
661
728
|
body: await parseBody(output.body, context),
|
|
662
729
|
};
|
|
663
730
|
let response;
|
|
664
|
-
|
|
665
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
731
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
666
732
|
switch (errorCode) {
|
|
667
733
|
case "InternalServerException":
|
|
668
734
|
case "com.amazonaws.translate#InternalServerException":
|
|
@@ -675,10 +741,12 @@ const deserializeAws_json1_1StopTextTranslationJobCommandError = async (output,
|
|
|
675
741
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
676
742
|
default:
|
|
677
743
|
const parsedBody = parsedOutput.body;
|
|
744
|
+
const $metadata = deserializeMetadata(output);
|
|
745
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
678
746
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
679
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
747
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
680
748
|
$fault: "client",
|
|
681
|
-
$metadata
|
|
749
|
+
$metadata,
|
|
682
750
|
});
|
|
683
751
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
684
752
|
}
|
|
@@ -703,8 +771,7 @@ const deserializeAws_json1_1TranslateTextCommandError = async (output, context)
|
|
|
703
771
|
body: await parseBody(output.body, context),
|
|
704
772
|
};
|
|
705
773
|
let response;
|
|
706
|
-
|
|
707
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
774
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
708
775
|
switch (errorCode) {
|
|
709
776
|
case "DetectedLanguageLowConfidenceException":
|
|
710
777
|
case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
|
|
@@ -732,10 +799,12 @@ const deserializeAws_json1_1TranslateTextCommandError = async (output, context)
|
|
|
732
799
|
throw await deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context);
|
|
733
800
|
default:
|
|
734
801
|
const parsedBody = parsedOutput.body;
|
|
802
|
+
const $metadata = deserializeMetadata(output);
|
|
803
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
735
804
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
736
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
805
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
737
806
|
$fault: "client",
|
|
738
|
-
$metadata
|
|
807
|
+
$metadata,
|
|
739
808
|
});
|
|
740
809
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
741
810
|
}
|
|
@@ -760,8 +829,7 @@ const deserializeAws_json1_1UpdateParallelDataCommandError = async (output, cont
|
|
|
760
829
|
body: await parseBody(output.body, context),
|
|
761
830
|
};
|
|
762
831
|
let response;
|
|
763
|
-
|
|
764
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
832
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
765
833
|
switch (errorCode) {
|
|
766
834
|
case "ConcurrentModificationException":
|
|
767
835
|
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
@@ -789,10 +857,12 @@ const deserializeAws_json1_1UpdateParallelDataCommandError = async (output, cont
|
|
|
789
857
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
790
858
|
default:
|
|
791
859
|
const parsedBody = parsedOutput.body;
|
|
860
|
+
const $metadata = deserializeMetadata(output);
|
|
861
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
792
862
|
response = new TranslateServiceException_1.TranslateServiceException({
|
|
793
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
863
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
794
864
|
$fault: "client",
|
|
795
|
-
$metadata
|
|
865
|
+
$metadata,
|
|
796
866
|
});
|
|
797
867
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
798
868
|
}
|
|
@@ -905,6 +975,15 @@ const deserializeAws_json1_1TooManyRequestsExceptionResponse = async (parsedOutp
|
|
|
905
975
|
});
|
|
906
976
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
907
977
|
};
|
|
978
|
+
const deserializeAws_json1_1UnsupportedDisplayLanguageCodeExceptionResponse = async (parsedOutput, context) => {
|
|
979
|
+
const body = parsedOutput.body;
|
|
980
|
+
const deserialized = deserializeAws_json1_1UnsupportedDisplayLanguageCodeException(body, context);
|
|
981
|
+
const exception = new models_0_1.UnsupportedDisplayLanguageCodeException({
|
|
982
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
983
|
+
...deserialized,
|
|
984
|
+
});
|
|
985
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
986
|
+
};
|
|
908
987
|
const deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse = async (parsedOutput, context) => {
|
|
909
988
|
const body = parsedOutput.body;
|
|
910
989
|
const deserialized = deserializeAws_json1_1UnsupportedLanguagePairException(body, context);
|
|
@@ -918,105 +997,105 @@ const serializeAws_json1_1CreateParallelDataRequest = (input, context) => {
|
|
|
918
997
|
var _a;
|
|
919
998
|
return {
|
|
920
999
|
ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
921
|
-
...(input.Description
|
|
922
|
-
...(input.EncryptionKey
|
|
923
|
-
input.EncryptionKey !== null && {
|
|
1000
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1001
|
+
...(input.EncryptionKey != null && {
|
|
924
1002
|
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
925
1003
|
}),
|
|
926
|
-
...(input.Name
|
|
927
|
-
...(input.ParallelDataConfig
|
|
928
|
-
input.ParallelDataConfig !== null && {
|
|
1004
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1005
|
+
...(input.ParallelDataConfig != null && {
|
|
929
1006
|
ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
|
|
930
1007
|
}),
|
|
931
1008
|
};
|
|
932
1009
|
};
|
|
933
1010
|
const serializeAws_json1_1DeleteParallelDataRequest = (input, context) => {
|
|
934
1011
|
return {
|
|
935
|
-
...(input.Name
|
|
1012
|
+
...(input.Name != null && { Name: input.Name }),
|
|
936
1013
|
};
|
|
937
1014
|
};
|
|
938
1015
|
const serializeAws_json1_1DeleteTerminologyRequest = (input, context) => {
|
|
939
1016
|
return {
|
|
940
|
-
...(input.Name
|
|
1017
|
+
...(input.Name != null && { Name: input.Name }),
|
|
941
1018
|
};
|
|
942
1019
|
};
|
|
943
1020
|
const serializeAws_json1_1DescribeTextTranslationJobRequest = (input, context) => {
|
|
944
1021
|
return {
|
|
945
|
-
...(input.JobId
|
|
1022
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
946
1023
|
};
|
|
947
1024
|
};
|
|
948
1025
|
const serializeAws_json1_1EncryptionKey = (input, context) => {
|
|
949
1026
|
return {
|
|
950
|
-
...(input.Id
|
|
951
|
-
...(input.Type
|
|
1027
|
+
...(input.Id != null && { Id: input.Id }),
|
|
1028
|
+
...(input.Type != null && { Type: input.Type }),
|
|
952
1029
|
};
|
|
953
1030
|
};
|
|
954
1031
|
const serializeAws_json1_1GetParallelDataRequest = (input, context) => {
|
|
955
1032
|
return {
|
|
956
|
-
...(input.Name
|
|
1033
|
+
...(input.Name != null && { Name: input.Name }),
|
|
957
1034
|
};
|
|
958
1035
|
};
|
|
959
1036
|
const serializeAws_json1_1GetTerminologyRequest = (input, context) => {
|
|
960
1037
|
return {
|
|
961
|
-
...(input.Name
|
|
962
|
-
...(input.TerminologyDataFormat
|
|
963
|
-
input.TerminologyDataFormat !== null && { TerminologyDataFormat: input.TerminologyDataFormat }),
|
|
1038
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1039
|
+
...(input.TerminologyDataFormat != null && { TerminologyDataFormat: input.TerminologyDataFormat }),
|
|
964
1040
|
};
|
|
965
1041
|
};
|
|
966
1042
|
const serializeAws_json1_1ImportTerminologyRequest = (input, context) => {
|
|
967
1043
|
return {
|
|
968
|
-
...(input.Description
|
|
969
|
-
...(input.EncryptionKey
|
|
970
|
-
input.EncryptionKey !== null && {
|
|
1044
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1045
|
+
...(input.EncryptionKey != null && {
|
|
971
1046
|
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
972
1047
|
}),
|
|
973
|
-
...(input.MergeStrategy
|
|
974
|
-
...(input.Name
|
|
975
|
-
...(input.TerminologyData
|
|
976
|
-
input.TerminologyData !== null && {
|
|
1048
|
+
...(input.MergeStrategy != null && { MergeStrategy: input.MergeStrategy }),
|
|
1049
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1050
|
+
...(input.TerminologyData != null && {
|
|
977
1051
|
TerminologyData: serializeAws_json1_1TerminologyData(input.TerminologyData, context),
|
|
978
1052
|
}),
|
|
979
1053
|
};
|
|
980
1054
|
};
|
|
981
1055
|
const serializeAws_json1_1InputDataConfig = (input, context) => {
|
|
982
1056
|
return {
|
|
983
|
-
...(input.ContentType
|
|
984
|
-
...(input.S3Uri
|
|
1057
|
+
...(input.ContentType != null && { ContentType: input.ContentType }),
|
|
1058
|
+
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1059
|
+
};
|
|
1060
|
+
};
|
|
1061
|
+
const serializeAws_json1_1ListLanguagesRequest = (input, context) => {
|
|
1062
|
+
return {
|
|
1063
|
+
...(input.DisplayLanguageCode != null && { DisplayLanguageCode: input.DisplayLanguageCode }),
|
|
1064
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1065
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
985
1066
|
};
|
|
986
1067
|
};
|
|
987
1068
|
const serializeAws_json1_1ListParallelDataRequest = (input, context) => {
|
|
988
1069
|
return {
|
|
989
|
-
...(input.MaxResults
|
|
990
|
-
...(input.NextToken
|
|
1070
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1071
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
991
1072
|
};
|
|
992
1073
|
};
|
|
993
1074
|
const serializeAws_json1_1ListTerminologiesRequest = (input, context) => {
|
|
994
1075
|
return {
|
|
995
|
-
...(input.MaxResults
|
|
996
|
-
...(input.NextToken
|
|
1076
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1077
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
997
1078
|
};
|
|
998
1079
|
};
|
|
999
1080
|
const serializeAws_json1_1ListTextTranslationJobsRequest = (input, context) => {
|
|
1000
1081
|
return {
|
|
1001
|
-
...(input.Filter
|
|
1002
|
-
|
|
1003
|
-
...(input.
|
|
1004
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1082
|
+
...(input.Filter != null && { Filter: serializeAws_json1_1TextTranslationJobFilter(input.Filter, context) }),
|
|
1083
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1084
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1005
1085
|
};
|
|
1006
1086
|
};
|
|
1007
1087
|
const serializeAws_json1_1OutputDataConfig = (input, context) => {
|
|
1008
1088
|
return {
|
|
1009
|
-
...(input.EncryptionKey
|
|
1010
|
-
input.EncryptionKey !== null && {
|
|
1089
|
+
...(input.EncryptionKey != null && {
|
|
1011
1090
|
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
1012
1091
|
}),
|
|
1013
|
-
...(input.S3Uri
|
|
1092
|
+
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1014
1093
|
};
|
|
1015
1094
|
};
|
|
1016
1095
|
const serializeAws_json1_1ParallelDataConfig = (input, context) => {
|
|
1017
1096
|
return {
|
|
1018
|
-
...(input.Format
|
|
1019
|
-
...(input.S3Uri
|
|
1097
|
+
...(input.Format != null && { Format: input.Format }),
|
|
1098
|
+
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1020
1099
|
};
|
|
1021
1100
|
};
|
|
1022
1101
|
const serializeAws_json1_1ResourceNameList = (input, context) => {
|
|
@@ -1033,38 +1112,30 @@ const serializeAws_json1_1StartTextTranslationJobRequest = (input, context) => {
|
|
|
1033
1112
|
var _a;
|
|
1034
1113
|
return {
|
|
1035
1114
|
ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
1036
|
-
...(input.DataAccessRoleArn
|
|
1037
|
-
|
|
1038
|
-
...(input.InputDataConfig !== undefined &&
|
|
1039
|
-
input.InputDataConfig !== null && {
|
|
1115
|
+
...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
|
|
1116
|
+
...(input.InputDataConfig != null && {
|
|
1040
1117
|
InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
|
|
1041
1118
|
}),
|
|
1042
|
-
...(input.JobName
|
|
1043
|
-
...(input.OutputDataConfig
|
|
1044
|
-
input.OutputDataConfig !== null && {
|
|
1119
|
+
...(input.JobName != null && { JobName: input.JobName }),
|
|
1120
|
+
...(input.OutputDataConfig != null && {
|
|
1045
1121
|
OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
|
|
1046
1122
|
}),
|
|
1047
|
-
...(input.ParallelDataNames
|
|
1048
|
-
input.ParallelDataNames !== null && {
|
|
1123
|
+
...(input.ParallelDataNames != null && {
|
|
1049
1124
|
ParallelDataNames: serializeAws_json1_1ResourceNameList(input.ParallelDataNames, context),
|
|
1050
1125
|
}),
|
|
1051
|
-
...(input.Settings
|
|
1052
|
-
|
|
1053
|
-
...(input.
|
|
1054
|
-
input.SourceLanguageCode !== null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1055
|
-
...(input.TargetLanguageCodes !== undefined &&
|
|
1056
|
-
input.TargetLanguageCodes !== null && {
|
|
1126
|
+
...(input.Settings != null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) }),
|
|
1127
|
+
...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1128
|
+
...(input.TargetLanguageCodes != null && {
|
|
1057
1129
|
TargetLanguageCodes: serializeAws_json1_1TargetLanguageCodeStringList(input.TargetLanguageCodes, context),
|
|
1058
1130
|
}),
|
|
1059
|
-
...(input.TerminologyNames
|
|
1060
|
-
input.TerminologyNames !== null && {
|
|
1131
|
+
...(input.TerminologyNames != null && {
|
|
1061
1132
|
TerminologyNames: serializeAws_json1_1ResourceNameList(input.TerminologyNames, context),
|
|
1062
1133
|
}),
|
|
1063
1134
|
};
|
|
1064
1135
|
};
|
|
1065
1136
|
const serializeAws_json1_1StopTextTranslationJobRequest = (input, context) => {
|
|
1066
1137
|
return {
|
|
1067
|
-
...(input.JobId
|
|
1138
|
+
...(input.JobId != null && { JobId: input.JobId }),
|
|
1068
1139
|
};
|
|
1069
1140
|
};
|
|
1070
1141
|
const serializeAws_json1_1TargetLanguageCodeStringList = (input, context) => {
|
|
@@ -1079,55 +1150,47 @@ const serializeAws_json1_1TargetLanguageCodeStringList = (input, context) => {
|
|
|
1079
1150
|
};
|
|
1080
1151
|
const serializeAws_json1_1TerminologyData = (input, context) => {
|
|
1081
1152
|
return {
|
|
1082
|
-
...(input.Directionality
|
|
1083
|
-
|
|
1084
|
-
...(input.
|
|
1085
|
-
...(input.Format !== undefined && input.Format !== null && { Format: input.Format }),
|
|
1153
|
+
...(input.Directionality != null && { Directionality: input.Directionality }),
|
|
1154
|
+
...(input.File != null && { File: context.base64Encoder(input.File) }),
|
|
1155
|
+
...(input.Format != null && { Format: input.Format }),
|
|
1086
1156
|
};
|
|
1087
1157
|
};
|
|
1088
1158
|
const serializeAws_json1_1TextTranslationJobFilter = (input, context) => {
|
|
1089
1159
|
return {
|
|
1090
|
-
...(input.JobName
|
|
1091
|
-
...(input.JobStatus
|
|
1092
|
-
...(input.SubmittedAfterTime
|
|
1093
|
-
input.SubmittedAfterTime !== null && {
|
|
1160
|
+
...(input.JobName != null && { JobName: input.JobName }),
|
|
1161
|
+
...(input.JobStatus != null && { JobStatus: input.JobStatus }),
|
|
1162
|
+
...(input.SubmittedAfterTime != null && {
|
|
1094
1163
|
SubmittedAfterTime: Math.round(input.SubmittedAfterTime.getTime() / 1000),
|
|
1095
1164
|
}),
|
|
1096
|
-
...(input.SubmittedBeforeTime
|
|
1097
|
-
input.SubmittedBeforeTime !== null && {
|
|
1165
|
+
...(input.SubmittedBeforeTime != null && {
|
|
1098
1166
|
SubmittedBeforeTime: Math.round(input.SubmittedBeforeTime.getTime() / 1000),
|
|
1099
1167
|
}),
|
|
1100
1168
|
};
|
|
1101
1169
|
};
|
|
1102
1170
|
const serializeAws_json1_1TranslateTextRequest = (input, context) => {
|
|
1103
1171
|
return {
|
|
1104
|
-
...(input.Settings
|
|
1105
|
-
|
|
1106
|
-
...(input.
|
|
1107
|
-
|
|
1108
|
-
...(input.TargetLanguageCode !== undefined &&
|
|
1109
|
-
input.TargetLanguageCode !== null && { TargetLanguageCode: input.TargetLanguageCode }),
|
|
1110
|
-
...(input.TerminologyNames !== undefined &&
|
|
1111
|
-
input.TerminologyNames !== null && {
|
|
1172
|
+
...(input.Settings != null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) }),
|
|
1173
|
+
...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1174
|
+
...(input.TargetLanguageCode != null && { TargetLanguageCode: input.TargetLanguageCode }),
|
|
1175
|
+
...(input.TerminologyNames != null && {
|
|
1112
1176
|
TerminologyNames: serializeAws_json1_1ResourceNameList(input.TerminologyNames, context),
|
|
1113
1177
|
}),
|
|
1114
|
-
...(input.Text
|
|
1178
|
+
...(input.Text != null && { Text: input.Text }),
|
|
1115
1179
|
};
|
|
1116
1180
|
};
|
|
1117
1181
|
const serializeAws_json1_1TranslationSettings = (input, context) => {
|
|
1118
1182
|
return {
|
|
1119
|
-
...(input.Formality
|
|
1120
|
-
...(input.Profanity
|
|
1183
|
+
...(input.Formality != null && { Formality: input.Formality }),
|
|
1184
|
+
...(input.Profanity != null && { Profanity: input.Profanity }),
|
|
1121
1185
|
};
|
|
1122
1186
|
};
|
|
1123
1187
|
const serializeAws_json1_1UpdateParallelDataRequest = (input, context) => {
|
|
1124
1188
|
var _a;
|
|
1125
1189
|
return {
|
|
1126
1190
|
ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
1127
|
-
...(input.Description
|
|
1128
|
-
...(input.Name
|
|
1129
|
-
...(input.ParallelDataConfig
|
|
1130
|
-
input.ParallelDataConfig !== null && {
|
|
1191
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1192
|
+
...(input.Name != null && { Name: input.Name }),
|
|
1193
|
+
...(input.ParallelDataConfig != null && {
|
|
1131
1194
|
ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
|
|
1132
1195
|
}),
|
|
1133
1196
|
};
|
|
@@ -1135,9 +1198,7 @@ const serializeAws_json1_1UpdateParallelDataRequest = (input, context) => {
|
|
|
1135
1198
|
const deserializeAws_json1_1AppliedTerminology = (output, context) => {
|
|
1136
1199
|
return {
|
|
1137
1200
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1138
|
-
Terms: output.Terms
|
|
1139
|
-
? deserializeAws_json1_1TermList(output.Terms, context)
|
|
1140
|
-
: undefined,
|
|
1201
|
+
Terms: output.Terms != null ? deserializeAws_json1_1TermList(output.Terms, context) : undefined,
|
|
1141
1202
|
};
|
|
1142
1203
|
};
|
|
1143
1204
|
const deserializeAws_json1_1AppliedTerminologyList = (output, context) => {
|
|
@@ -1175,7 +1236,7 @@ const deserializeAws_json1_1DeleteParallelDataResponse = (output, context) => {
|
|
|
1175
1236
|
};
|
|
1176
1237
|
const deserializeAws_json1_1DescribeTextTranslationJobResponse = (output, context) => {
|
|
1177
1238
|
return {
|
|
1178
|
-
TextTranslationJobProperties: output.TextTranslationJobProperties
|
|
1239
|
+
TextTranslationJobProperties: output.TextTranslationJobProperties != null
|
|
1179
1240
|
? deserializeAws_json1_1TextTranslationJobProperties(output.TextTranslationJobProperties, context)
|
|
1180
1241
|
: undefined,
|
|
1181
1242
|
};
|
|
@@ -1194,40 +1255,39 @@ const deserializeAws_json1_1EncryptionKey = (output, context) => {
|
|
|
1194
1255
|
};
|
|
1195
1256
|
const deserializeAws_json1_1GetParallelDataResponse = (output, context) => {
|
|
1196
1257
|
return {
|
|
1197
|
-
AuxiliaryDataLocation: output.AuxiliaryDataLocation
|
|
1258
|
+
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1198
1259
|
? deserializeAws_json1_1ParallelDataDataLocation(output.AuxiliaryDataLocation, context)
|
|
1199
1260
|
: undefined,
|
|
1200
|
-
DataLocation: output.DataLocation
|
|
1261
|
+
DataLocation: output.DataLocation != null
|
|
1201
1262
|
? deserializeAws_json1_1ParallelDataDataLocation(output.DataLocation, context)
|
|
1202
1263
|
: undefined,
|
|
1203
|
-
LatestUpdateAttemptAuxiliaryDataLocation: output.LatestUpdateAttemptAuxiliaryDataLocation
|
|
1204
|
-
output.LatestUpdateAttemptAuxiliaryDataLocation !== null
|
|
1264
|
+
LatestUpdateAttemptAuxiliaryDataLocation: output.LatestUpdateAttemptAuxiliaryDataLocation != null
|
|
1205
1265
|
? deserializeAws_json1_1ParallelDataDataLocation(output.LatestUpdateAttemptAuxiliaryDataLocation, context)
|
|
1206
1266
|
: undefined,
|
|
1207
|
-
ParallelDataProperties: output.ParallelDataProperties
|
|
1267
|
+
ParallelDataProperties: output.ParallelDataProperties != null
|
|
1208
1268
|
? deserializeAws_json1_1ParallelDataProperties(output.ParallelDataProperties, context)
|
|
1209
1269
|
: undefined,
|
|
1210
1270
|
};
|
|
1211
1271
|
};
|
|
1212
1272
|
const deserializeAws_json1_1GetTerminologyResponse = (output, context) => {
|
|
1213
1273
|
return {
|
|
1214
|
-
AuxiliaryDataLocation: output.AuxiliaryDataLocation
|
|
1274
|
+
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1215
1275
|
? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
1216
1276
|
: undefined,
|
|
1217
|
-
TerminologyDataLocation: output.TerminologyDataLocation
|
|
1277
|
+
TerminologyDataLocation: output.TerminologyDataLocation != null
|
|
1218
1278
|
? deserializeAws_json1_1TerminologyDataLocation(output.TerminologyDataLocation, context)
|
|
1219
1279
|
: undefined,
|
|
1220
|
-
TerminologyProperties: output.TerminologyProperties
|
|
1280
|
+
TerminologyProperties: output.TerminologyProperties != null
|
|
1221
1281
|
? deserializeAws_json1_1TerminologyProperties(output.TerminologyProperties, context)
|
|
1222
1282
|
: undefined,
|
|
1223
1283
|
};
|
|
1224
1284
|
};
|
|
1225
1285
|
const deserializeAws_json1_1ImportTerminologyResponse = (output, context) => {
|
|
1226
1286
|
return {
|
|
1227
|
-
AuxiliaryDataLocation: output.AuxiliaryDataLocation
|
|
1287
|
+
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1228
1288
|
? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
1229
1289
|
: undefined,
|
|
1230
|
-
TerminologyProperties: output.TerminologyProperties
|
|
1290
|
+
TerminologyProperties: output.TerminologyProperties != null
|
|
1231
1291
|
? deserializeAws_json1_1TerminologyProperties(output.TerminologyProperties, context)
|
|
1232
1292
|
: undefined,
|
|
1233
1293
|
};
|
|
@@ -1265,6 +1325,12 @@ const deserializeAws_json1_1JobDetails = (output, context) => {
|
|
|
1265
1325
|
TranslatedDocumentsCount: (0, smithy_client_1.expectInt32)(output.TranslatedDocumentsCount),
|
|
1266
1326
|
};
|
|
1267
1327
|
};
|
|
1328
|
+
const deserializeAws_json1_1Language = (output, context) => {
|
|
1329
|
+
return {
|
|
1330
|
+
LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
|
|
1331
|
+
LanguageName: (0, smithy_client_1.expectString)(output.LanguageName),
|
|
1332
|
+
};
|
|
1333
|
+
};
|
|
1268
1334
|
const deserializeAws_json1_1LanguageCodeStringList = (output, context) => {
|
|
1269
1335
|
const retVal = (output || [])
|
|
1270
1336
|
.filter((e) => e != null)
|
|
@@ -1276,15 +1342,33 @@ const deserializeAws_json1_1LanguageCodeStringList = (output, context) => {
|
|
|
1276
1342
|
});
|
|
1277
1343
|
return retVal;
|
|
1278
1344
|
};
|
|
1345
|
+
const deserializeAws_json1_1LanguagesList = (output, context) => {
|
|
1346
|
+
const retVal = (output || [])
|
|
1347
|
+
.filter((e) => e != null)
|
|
1348
|
+
.map((entry) => {
|
|
1349
|
+
if (entry === null) {
|
|
1350
|
+
return null;
|
|
1351
|
+
}
|
|
1352
|
+
return deserializeAws_json1_1Language(entry, context);
|
|
1353
|
+
});
|
|
1354
|
+
return retVal;
|
|
1355
|
+
};
|
|
1279
1356
|
const deserializeAws_json1_1LimitExceededException = (output, context) => {
|
|
1280
1357
|
return {
|
|
1281
1358
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1282
1359
|
};
|
|
1283
1360
|
};
|
|
1361
|
+
const deserializeAws_json1_1ListLanguagesResponse = (output, context) => {
|
|
1362
|
+
return {
|
|
1363
|
+
DisplayLanguageCode: (0, smithy_client_1.expectString)(output.DisplayLanguageCode),
|
|
1364
|
+
Languages: output.Languages != null ? deserializeAws_json1_1LanguagesList(output.Languages, context) : undefined,
|
|
1365
|
+
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1284
1368
|
const deserializeAws_json1_1ListParallelDataResponse = (output, context) => {
|
|
1285
1369
|
return {
|
|
1286
1370
|
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1287
|
-
ParallelDataPropertiesList: output.ParallelDataPropertiesList
|
|
1371
|
+
ParallelDataPropertiesList: output.ParallelDataPropertiesList != null
|
|
1288
1372
|
? deserializeAws_json1_1ParallelDataPropertiesList(output.ParallelDataPropertiesList, context)
|
|
1289
1373
|
: undefined,
|
|
1290
1374
|
};
|
|
@@ -1292,7 +1376,7 @@ const deserializeAws_json1_1ListParallelDataResponse = (output, context) => {
|
|
|
1292
1376
|
const deserializeAws_json1_1ListTerminologiesResponse = (output, context) => {
|
|
1293
1377
|
return {
|
|
1294
1378
|
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1295
|
-
TerminologyPropertiesList: output.TerminologyPropertiesList
|
|
1379
|
+
TerminologyPropertiesList: output.TerminologyPropertiesList != null
|
|
1296
1380
|
? deserializeAws_json1_1TerminologyPropertiesList(output.TerminologyPropertiesList, context)
|
|
1297
1381
|
: undefined,
|
|
1298
1382
|
};
|
|
@@ -1300,16 +1384,14 @@ const deserializeAws_json1_1ListTerminologiesResponse = (output, context) => {
|
|
|
1300
1384
|
const deserializeAws_json1_1ListTextTranslationJobsResponse = (output, context) => {
|
|
1301
1385
|
return {
|
|
1302
1386
|
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1303
|
-
TextTranslationJobPropertiesList: output.TextTranslationJobPropertiesList
|
|
1387
|
+
TextTranslationJobPropertiesList: output.TextTranslationJobPropertiesList != null
|
|
1304
1388
|
? deserializeAws_json1_1TextTranslationJobPropertiesList(output.TextTranslationJobPropertiesList, context)
|
|
1305
1389
|
: undefined,
|
|
1306
1390
|
};
|
|
1307
1391
|
};
|
|
1308
1392
|
const deserializeAws_json1_1OutputDataConfig = (output, context) => {
|
|
1309
1393
|
return {
|
|
1310
|
-
EncryptionKey: output.EncryptionKey
|
|
1311
|
-
? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
|
|
1312
|
-
: undefined,
|
|
1394
|
+
EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
|
|
1313
1395
|
S3Uri: (0, smithy_client_1.expectString)(output.S3Uri),
|
|
1314
1396
|
};
|
|
1315
1397
|
};
|
|
@@ -1328,32 +1410,28 @@ const deserializeAws_json1_1ParallelDataDataLocation = (output, context) => {
|
|
|
1328
1410
|
const deserializeAws_json1_1ParallelDataProperties = (output, context) => {
|
|
1329
1411
|
return {
|
|
1330
1412
|
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1331
|
-
CreatedAt: output.CreatedAt
|
|
1332
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
|
|
1333
|
-
: undefined,
|
|
1413
|
+
CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
|
|
1334
1414
|
Description: (0, smithy_client_1.expectString)(output.Description),
|
|
1335
|
-
EncryptionKey: output.EncryptionKey
|
|
1336
|
-
? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
|
|
1337
|
-
: undefined,
|
|
1415
|
+
EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
|
|
1338
1416
|
FailedRecordCount: (0, smithy_client_1.expectLong)(output.FailedRecordCount),
|
|
1339
1417
|
ImportedDataSize: (0, smithy_client_1.expectLong)(output.ImportedDataSize),
|
|
1340
1418
|
ImportedRecordCount: (0, smithy_client_1.expectLong)(output.ImportedRecordCount),
|
|
1341
|
-
LastUpdatedAt: output.LastUpdatedAt
|
|
1419
|
+
LastUpdatedAt: output.LastUpdatedAt != null
|
|
1342
1420
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
|
|
1343
1421
|
: undefined,
|
|
1344
|
-
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt
|
|
1422
|
+
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
|
|
1345
1423
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LatestUpdateAttemptAt)))
|
|
1346
1424
|
: undefined,
|
|
1347
1425
|
LatestUpdateAttemptStatus: (0, smithy_client_1.expectString)(output.LatestUpdateAttemptStatus),
|
|
1348
1426
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1349
1427
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1350
|
-
ParallelDataConfig: output.ParallelDataConfig
|
|
1428
|
+
ParallelDataConfig: output.ParallelDataConfig != null
|
|
1351
1429
|
? deserializeAws_json1_1ParallelDataConfig(output.ParallelDataConfig, context)
|
|
1352
1430
|
: undefined,
|
|
1353
1431
|
SkippedRecordCount: (0, smithy_client_1.expectLong)(output.SkippedRecordCount),
|
|
1354
1432
|
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
1355
1433
|
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1356
|
-
TargetLanguageCodes: output.TargetLanguageCodes
|
|
1434
|
+
TargetLanguageCodes: output.TargetLanguageCodes != null
|
|
1357
1435
|
? deserializeAws_json1_1LanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
1358
1436
|
: undefined,
|
|
1359
1437
|
};
|
|
@@ -1428,16 +1506,12 @@ const deserializeAws_json1_1TerminologyDataLocation = (output, context) => {
|
|
|
1428
1506
|
const deserializeAws_json1_1TerminologyProperties = (output, context) => {
|
|
1429
1507
|
return {
|
|
1430
1508
|
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1431
|
-
CreatedAt: output.CreatedAt
|
|
1432
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
|
|
1433
|
-
: undefined,
|
|
1509
|
+
CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
|
|
1434
1510
|
Description: (0, smithy_client_1.expectString)(output.Description),
|
|
1435
1511
|
Directionality: (0, smithy_client_1.expectString)(output.Directionality),
|
|
1436
|
-
EncryptionKey: output.EncryptionKey
|
|
1437
|
-
? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
|
|
1438
|
-
: undefined,
|
|
1512
|
+
EncryptionKey: output.EncryptionKey != null ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) : undefined,
|
|
1439
1513
|
Format: (0, smithy_client_1.expectString)(output.Format),
|
|
1440
|
-
LastUpdatedAt: output.LastUpdatedAt
|
|
1514
|
+
LastUpdatedAt: output.LastUpdatedAt != null
|
|
1441
1515
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedAt)))
|
|
1442
1516
|
: undefined,
|
|
1443
1517
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
@@ -1445,7 +1519,7 @@ const deserializeAws_json1_1TerminologyProperties = (output, context) => {
|
|
|
1445
1519
|
SizeBytes: (0, smithy_client_1.expectInt32)(output.SizeBytes),
|
|
1446
1520
|
SkippedTermCount: (0, smithy_client_1.expectInt32)(output.SkippedTermCount),
|
|
1447
1521
|
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
1448
|
-
TargetLanguageCodes: output.TargetLanguageCodes
|
|
1522
|
+
TargetLanguageCodes: output.TargetLanguageCodes != null
|
|
1449
1523
|
? deserializeAws_json1_1LanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
1450
1524
|
: undefined,
|
|
1451
1525
|
TermCount: (0, smithy_client_1.expectInt32)(output.TermCount),
|
|
@@ -1481,36 +1555,30 @@ const deserializeAws_json1_1TextSizeLimitExceededException = (output, context) =
|
|
|
1481
1555
|
const deserializeAws_json1_1TextTranslationJobProperties = (output, context) => {
|
|
1482
1556
|
return {
|
|
1483
1557
|
DataAccessRoleArn: (0, smithy_client_1.expectString)(output.DataAccessRoleArn),
|
|
1484
|
-
EndTime: output.EndTime
|
|
1485
|
-
|
|
1486
|
-
: undefined,
|
|
1487
|
-
InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
|
|
1558
|
+
EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
|
|
1559
|
+
InputDataConfig: output.InputDataConfig != null
|
|
1488
1560
|
? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
|
|
1489
1561
|
: undefined,
|
|
1490
|
-
JobDetails: output.JobDetails
|
|
1491
|
-
? deserializeAws_json1_1JobDetails(output.JobDetails, context)
|
|
1492
|
-
: undefined,
|
|
1562
|
+
JobDetails: output.JobDetails != null ? deserializeAws_json1_1JobDetails(output.JobDetails, context) : undefined,
|
|
1493
1563
|
JobId: (0, smithy_client_1.expectString)(output.JobId),
|
|
1494
1564
|
JobName: (0, smithy_client_1.expectString)(output.JobName),
|
|
1495
1565
|
JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
|
|
1496
1566
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1497
|
-
OutputDataConfig: output.OutputDataConfig
|
|
1567
|
+
OutputDataConfig: output.OutputDataConfig != null
|
|
1498
1568
|
? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
|
|
1499
1569
|
: undefined,
|
|
1500
|
-
ParallelDataNames: output.ParallelDataNames
|
|
1570
|
+
ParallelDataNames: output.ParallelDataNames != null
|
|
1501
1571
|
? deserializeAws_json1_1ResourceNameList(output.ParallelDataNames, context)
|
|
1502
1572
|
: undefined,
|
|
1503
|
-
Settings: output.Settings
|
|
1504
|
-
? deserializeAws_json1_1TranslationSettings(output.Settings, context)
|
|
1505
|
-
: undefined,
|
|
1573
|
+
Settings: output.Settings != null ? deserializeAws_json1_1TranslationSettings(output.Settings, context) : undefined,
|
|
1506
1574
|
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
1507
|
-
SubmittedTime: output.SubmittedTime
|
|
1575
|
+
SubmittedTime: output.SubmittedTime != null
|
|
1508
1576
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.SubmittedTime)))
|
|
1509
1577
|
: undefined,
|
|
1510
|
-
TargetLanguageCodes: output.TargetLanguageCodes
|
|
1578
|
+
TargetLanguageCodes: output.TargetLanguageCodes != null
|
|
1511
1579
|
? deserializeAws_json1_1TargetLanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
1512
1580
|
: undefined,
|
|
1513
|
-
TerminologyNames: output.TerminologyNames
|
|
1581
|
+
TerminologyNames: output.TerminologyNames != null
|
|
1514
1582
|
? deserializeAws_json1_1ResourceNameList(output.TerminologyNames, context)
|
|
1515
1583
|
: undefined,
|
|
1516
1584
|
};
|
|
@@ -1533,10 +1601,10 @@ const deserializeAws_json1_1TooManyRequestsException = (output, context) => {
|
|
|
1533
1601
|
};
|
|
1534
1602
|
const deserializeAws_json1_1TranslateTextResponse = (output, context) => {
|
|
1535
1603
|
return {
|
|
1536
|
-
AppliedSettings: output.AppliedSettings
|
|
1604
|
+
AppliedSettings: output.AppliedSettings != null
|
|
1537
1605
|
? deserializeAws_json1_1TranslationSettings(output.AppliedSettings, context)
|
|
1538
1606
|
: undefined,
|
|
1539
|
-
AppliedTerminologies: output.AppliedTerminologies
|
|
1607
|
+
AppliedTerminologies: output.AppliedTerminologies != null
|
|
1540
1608
|
? deserializeAws_json1_1AppliedTerminologyList(output.AppliedTerminologies, context)
|
|
1541
1609
|
: undefined,
|
|
1542
1610
|
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
@@ -1550,6 +1618,12 @@ const deserializeAws_json1_1TranslationSettings = (output, context) => {
|
|
|
1550
1618
|
Profanity: (0, smithy_client_1.expectString)(output.Profanity),
|
|
1551
1619
|
};
|
|
1552
1620
|
};
|
|
1621
|
+
const deserializeAws_json1_1UnsupportedDisplayLanguageCodeException = (output, context) => {
|
|
1622
|
+
return {
|
|
1623
|
+
DisplayLanguageCode: (0, smithy_client_1.expectString)(output.DisplayLanguageCode),
|
|
1624
|
+
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1625
|
+
};
|
|
1626
|
+
};
|
|
1553
1627
|
const deserializeAws_json1_1UnsupportedLanguagePairException = (output, context) => {
|
|
1554
1628
|
return {
|
|
1555
1629
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
@@ -1559,7 +1633,7 @@ const deserializeAws_json1_1UnsupportedLanguagePairException = (output, context)
|
|
|
1559
1633
|
};
|
|
1560
1634
|
const deserializeAws_json1_1UpdateParallelDataResponse = (output, context) => {
|
|
1561
1635
|
return {
|
|
1562
|
-
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt
|
|
1636
|
+
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
|
|
1563
1637
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LatestUpdateAttemptAt)))
|
|
1564
1638
|
: undefined,
|
|
1565
1639
|
LatestUpdateAttemptStatus: (0, smithy_client_1.expectString)(output.LatestUpdateAttemptStatus),
|
|
@@ -1629,5 +1703,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1629
1703
|
if (data["__type"] !== undefined) {
|
|
1630
1704
|
return sanitizeErrorCode(data["__type"]);
|
|
1631
1705
|
}
|
|
1632
|
-
return "";
|
|
1633
1706
|
};
|