@aws-sdk/client-translate 3.51.0 → 3.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/TranslateServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +193 -1
- package/dist-cjs/protocols/Aws_json1_1.js +179 -597
- package/dist-es/index.js +1 -0
- package/dist-es/models/TranslateServiceException.js +12 -0
- package/dist-es/models/models_0.js +179 -1
- package/dist-es/protocols/Aws_json1_1.js +356 -629
- package/dist-types/TranslateClient.d.ts +2 -2
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/TranslateServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +98 -40
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/TranslateClient.d.ts +2 -2
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/TranslateServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +72 -40
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/package.json +33 -33
|
@@ -4,6 +4,8 @@ exports.deserializeAws_json1_1UpdateParallelDataCommand = exports.deserializeAws
|
|
|
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");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const TranslateServiceException_1 = require("../models/TranslateServiceException");
|
|
7
9
|
const serializeAws_json1_1CreateParallelDataCommand = async (input, context) => {
|
|
8
10
|
const headers = {
|
|
9
11
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -169,67 +171,31 @@ const deserializeAws_json1_1CreateParallelDataCommandError = async (output, cont
|
|
|
169
171
|
switch (errorCode) {
|
|
170
172
|
case "ConflictException":
|
|
171
173
|
case "com.amazonaws.translate#ConflictException":
|
|
172
|
-
|
|
173
|
-
...(await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)),
|
|
174
|
-
name: errorCode,
|
|
175
|
-
$metadata: deserializeMetadata(output),
|
|
176
|
-
};
|
|
177
|
-
break;
|
|
174
|
+
throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
|
|
178
175
|
case "InternalServerException":
|
|
179
176
|
case "com.amazonaws.translate#InternalServerException":
|
|
180
|
-
|
|
181
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
182
|
-
name: errorCode,
|
|
183
|
-
$metadata: deserializeMetadata(output),
|
|
184
|
-
};
|
|
185
|
-
break;
|
|
177
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
186
178
|
case "InvalidParameterValueException":
|
|
187
179
|
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
188
|
-
|
|
189
|
-
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
190
|
-
name: errorCode,
|
|
191
|
-
$metadata: deserializeMetadata(output),
|
|
192
|
-
};
|
|
193
|
-
break;
|
|
180
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
194
181
|
case "InvalidRequestException":
|
|
195
182
|
case "com.amazonaws.translate#InvalidRequestException":
|
|
196
|
-
|
|
197
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
198
|
-
name: errorCode,
|
|
199
|
-
$metadata: deserializeMetadata(output),
|
|
200
|
-
};
|
|
201
|
-
break;
|
|
183
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
202
184
|
case "LimitExceededException":
|
|
203
185
|
case "com.amazonaws.translate#LimitExceededException":
|
|
204
|
-
|
|
205
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
206
|
-
name: errorCode,
|
|
207
|
-
$metadata: deserializeMetadata(output),
|
|
208
|
-
};
|
|
209
|
-
break;
|
|
186
|
+
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
210
187
|
case "TooManyRequestsException":
|
|
211
188
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
212
|
-
|
|
213
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
214
|
-
name: errorCode,
|
|
215
|
-
$metadata: deserializeMetadata(output),
|
|
216
|
-
};
|
|
217
|
-
break;
|
|
189
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
218
190
|
default:
|
|
219
191
|
const parsedBody = parsedOutput.body;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
...parsedBody,
|
|
223
|
-
name: `${errorCode}`,
|
|
224
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
192
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
193
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
225
194
|
$fault: "client",
|
|
226
195
|
$metadata: deserializeMetadata(output),
|
|
227
|
-
};
|
|
196
|
+
});
|
|
197
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
228
198
|
}
|
|
229
|
-
const message = response.message || response.Message || errorCode;
|
|
230
|
-
response.message = message;
|
|
231
|
-
delete response.Message;
|
|
232
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
233
199
|
};
|
|
234
200
|
const deserializeAws_json1_1DeleteParallelDataCommand = async (output, context) => {
|
|
235
201
|
if (output.statusCode >= 300) {
|
|
@@ -256,51 +222,25 @@ const deserializeAws_json1_1DeleteParallelDataCommandError = async (output, cont
|
|
|
256
222
|
switch (errorCode) {
|
|
257
223
|
case "ConcurrentModificationException":
|
|
258
224
|
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
259
|
-
|
|
260
|
-
...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
261
|
-
name: errorCode,
|
|
262
|
-
$metadata: deserializeMetadata(output),
|
|
263
|
-
};
|
|
264
|
-
break;
|
|
225
|
+
throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
265
226
|
case "InternalServerException":
|
|
266
227
|
case "com.amazonaws.translate#InternalServerException":
|
|
267
|
-
|
|
268
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
269
|
-
name: errorCode,
|
|
270
|
-
$metadata: deserializeMetadata(output),
|
|
271
|
-
};
|
|
272
|
-
break;
|
|
228
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
273
229
|
case "ResourceNotFoundException":
|
|
274
230
|
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
275
|
-
|
|
276
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
277
|
-
name: errorCode,
|
|
278
|
-
$metadata: deserializeMetadata(output),
|
|
279
|
-
};
|
|
280
|
-
break;
|
|
231
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
281
232
|
case "TooManyRequestsException":
|
|
282
233
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
283
|
-
|
|
284
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
285
|
-
name: errorCode,
|
|
286
|
-
$metadata: deserializeMetadata(output),
|
|
287
|
-
};
|
|
288
|
-
break;
|
|
234
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
289
235
|
default:
|
|
290
236
|
const parsedBody = parsedOutput.body;
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
...parsedBody,
|
|
294
|
-
name: `${errorCode}`,
|
|
295
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
237
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
238
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
296
239
|
$fault: "client",
|
|
297
240
|
$metadata: deserializeMetadata(output),
|
|
298
|
-
};
|
|
241
|
+
});
|
|
242
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
299
243
|
}
|
|
300
|
-
const message = response.message || response.Message || errorCode;
|
|
301
|
-
response.message = message;
|
|
302
|
-
delete response.Message;
|
|
303
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
304
244
|
};
|
|
305
245
|
const deserializeAws_json1_1DeleteTerminologyCommand = async (output, context) => {
|
|
306
246
|
if (output.statusCode >= 300) {
|
|
@@ -324,51 +264,25 @@ const deserializeAws_json1_1DeleteTerminologyCommandError = async (output, conte
|
|
|
324
264
|
switch (errorCode) {
|
|
325
265
|
case "InternalServerException":
|
|
326
266
|
case "com.amazonaws.translate#InternalServerException":
|
|
327
|
-
|
|
328
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
329
|
-
name: errorCode,
|
|
330
|
-
$metadata: deserializeMetadata(output),
|
|
331
|
-
};
|
|
332
|
-
break;
|
|
267
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
333
268
|
case "InvalidParameterValueException":
|
|
334
269
|
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
335
|
-
|
|
336
|
-
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
337
|
-
name: errorCode,
|
|
338
|
-
$metadata: deserializeMetadata(output),
|
|
339
|
-
};
|
|
340
|
-
break;
|
|
270
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
341
271
|
case "ResourceNotFoundException":
|
|
342
272
|
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
343
|
-
|
|
344
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
345
|
-
name: errorCode,
|
|
346
|
-
$metadata: deserializeMetadata(output),
|
|
347
|
-
};
|
|
348
|
-
break;
|
|
273
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
349
274
|
case "TooManyRequestsException":
|
|
350
275
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
351
|
-
|
|
352
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
353
|
-
name: errorCode,
|
|
354
|
-
$metadata: deserializeMetadata(output),
|
|
355
|
-
};
|
|
356
|
-
break;
|
|
276
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
357
277
|
default:
|
|
358
278
|
const parsedBody = parsedOutput.body;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
...parsedBody,
|
|
362
|
-
name: `${errorCode}`,
|
|
363
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
279
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
280
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
364
281
|
$fault: "client",
|
|
365
282
|
$metadata: deserializeMetadata(output),
|
|
366
|
-
};
|
|
283
|
+
});
|
|
284
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
367
285
|
}
|
|
368
|
-
const message = response.message || response.Message || errorCode;
|
|
369
|
-
response.message = message;
|
|
370
|
-
delete response.Message;
|
|
371
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
372
286
|
};
|
|
373
287
|
const deserializeAws_json1_1DescribeTextTranslationJobCommand = async (output, context) => {
|
|
374
288
|
if (output.statusCode >= 300) {
|
|
@@ -395,43 +309,22 @@ const deserializeAws_json1_1DescribeTextTranslationJobCommandError = async (outp
|
|
|
395
309
|
switch (errorCode) {
|
|
396
310
|
case "InternalServerException":
|
|
397
311
|
case "com.amazonaws.translate#InternalServerException":
|
|
398
|
-
|
|
399
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
400
|
-
name: errorCode,
|
|
401
|
-
$metadata: deserializeMetadata(output),
|
|
402
|
-
};
|
|
403
|
-
break;
|
|
312
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
404
313
|
case "ResourceNotFoundException":
|
|
405
314
|
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
406
|
-
|
|
407
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
408
|
-
name: errorCode,
|
|
409
|
-
$metadata: deserializeMetadata(output),
|
|
410
|
-
};
|
|
411
|
-
break;
|
|
315
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
412
316
|
case "TooManyRequestsException":
|
|
413
317
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
414
|
-
|
|
415
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
416
|
-
name: errorCode,
|
|
417
|
-
$metadata: deserializeMetadata(output),
|
|
418
|
-
};
|
|
419
|
-
break;
|
|
318
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
420
319
|
default:
|
|
421
320
|
const parsedBody = parsedOutput.body;
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
...parsedBody,
|
|
425
|
-
name: `${errorCode}`,
|
|
426
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
321
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
322
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
427
323
|
$fault: "client",
|
|
428
324
|
$metadata: deserializeMetadata(output),
|
|
429
|
-
};
|
|
325
|
+
});
|
|
326
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
430
327
|
}
|
|
431
|
-
const message = response.message || response.Message || errorCode;
|
|
432
|
-
response.message = message;
|
|
433
|
-
delete response.Message;
|
|
434
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
435
328
|
};
|
|
436
329
|
const deserializeAws_json1_1GetParallelDataCommand = async (output, context) => {
|
|
437
330
|
if (output.statusCode >= 300) {
|
|
@@ -458,51 +351,25 @@ const deserializeAws_json1_1GetParallelDataCommandError = async (output, context
|
|
|
458
351
|
switch (errorCode) {
|
|
459
352
|
case "InternalServerException":
|
|
460
353
|
case "com.amazonaws.translate#InternalServerException":
|
|
461
|
-
|
|
462
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
463
|
-
name: errorCode,
|
|
464
|
-
$metadata: deserializeMetadata(output),
|
|
465
|
-
};
|
|
466
|
-
break;
|
|
354
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
467
355
|
case "InvalidParameterValueException":
|
|
468
356
|
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
469
|
-
|
|
470
|
-
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
471
|
-
name: errorCode,
|
|
472
|
-
$metadata: deserializeMetadata(output),
|
|
473
|
-
};
|
|
474
|
-
break;
|
|
357
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
475
358
|
case "ResourceNotFoundException":
|
|
476
359
|
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
477
|
-
|
|
478
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
479
|
-
name: errorCode,
|
|
480
|
-
$metadata: deserializeMetadata(output),
|
|
481
|
-
};
|
|
482
|
-
break;
|
|
360
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
483
361
|
case "TooManyRequestsException":
|
|
484
362
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
485
|
-
|
|
486
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
487
|
-
name: errorCode,
|
|
488
|
-
$metadata: deserializeMetadata(output),
|
|
489
|
-
};
|
|
490
|
-
break;
|
|
363
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
491
364
|
default:
|
|
492
365
|
const parsedBody = parsedOutput.body;
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
...parsedBody,
|
|
496
|
-
name: `${errorCode}`,
|
|
497
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
366
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
367
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
498
368
|
$fault: "client",
|
|
499
369
|
$metadata: deserializeMetadata(output),
|
|
500
|
-
};
|
|
370
|
+
});
|
|
371
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
501
372
|
}
|
|
502
|
-
const message = response.message || response.Message || errorCode;
|
|
503
|
-
response.message = message;
|
|
504
|
-
delete response.Message;
|
|
505
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
506
373
|
};
|
|
507
374
|
const deserializeAws_json1_1GetTerminologyCommand = async (output, context) => {
|
|
508
375
|
if (output.statusCode >= 300) {
|
|
@@ -529,51 +396,25 @@ const deserializeAws_json1_1GetTerminologyCommandError = async (output, context)
|
|
|
529
396
|
switch (errorCode) {
|
|
530
397
|
case "InternalServerException":
|
|
531
398
|
case "com.amazonaws.translate#InternalServerException":
|
|
532
|
-
|
|
533
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
534
|
-
name: errorCode,
|
|
535
|
-
$metadata: deserializeMetadata(output),
|
|
536
|
-
};
|
|
537
|
-
break;
|
|
399
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
538
400
|
case "InvalidParameterValueException":
|
|
539
401
|
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
540
|
-
|
|
541
|
-
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
542
|
-
name: errorCode,
|
|
543
|
-
$metadata: deserializeMetadata(output),
|
|
544
|
-
};
|
|
545
|
-
break;
|
|
402
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
546
403
|
case "ResourceNotFoundException":
|
|
547
404
|
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
548
|
-
|
|
549
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
550
|
-
name: errorCode,
|
|
551
|
-
$metadata: deserializeMetadata(output),
|
|
552
|
-
};
|
|
553
|
-
break;
|
|
405
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
554
406
|
case "TooManyRequestsException":
|
|
555
407
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
556
|
-
|
|
557
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
558
|
-
name: errorCode,
|
|
559
|
-
$metadata: deserializeMetadata(output),
|
|
560
|
-
};
|
|
561
|
-
break;
|
|
408
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
562
409
|
default:
|
|
563
410
|
const parsedBody = parsedOutput.body;
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
...parsedBody,
|
|
567
|
-
name: `${errorCode}`,
|
|
568
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
411
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
412
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
569
413
|
$fault: "client",
|
|
570
414
|
$metadata: deserializeMetadata(output),
|
|
571
|
-
};
|
|
415
|
+
});
|
|
416
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
572
417
|
}
|
|
573
|
-
const message = response.message || response.Message || errorCode;
|
|
574
|
-
response.message = message;
|
|
575
|
-
delete response.Message;
|
|
576
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
577
418
|
};
|
|
578
419
|
const deserializeAws_json1_1ImportTerminologyCommand = async (output, context) => {
|
|
579
420
|
if (output.statusCode >= 300) {
|
|
@@ -600,51 +441,25 @@ const deserializeAws_json1_1ImportTerminologyCommandError = async (output, conte
|
|
|
600
441
|
switch (errorCode) {
|
|
601
442
|
case "InternalServerException":
|
|
602
443
|
case "com.amazonaws.translate#InternalServerException":
|
|
603
|
-
|
|
604
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
605
|
-
name: errorCode,
|
|
606
|
-
$metadata: deserializeMetadata(output),
|
|
607
|
-
};
|
|
608
|
-
break;
|
|
444
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
609
445
|
case "InvalidParameterValueException":
|
|
610
446
|
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
611
|
-
|
|
612
|
-
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
613
|
-
name: errorCode,
|
|
614
|
-
$metadata: deserializeMetadata(output),
|
|
615
|
-
};
|
|
616
|
-
break;
|
|
447
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
617
448
|
case "LimitExceededException":
|
|
618
449
|
case "com.amazonaws.translate#LimitExceededException":
|
|
619
|
-
|
|
620
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
621
|
-
name: errorCode,
|
|
622
|
-
$metadata: deserializeMetadata(output),
|
|
623
|
-
};
|
|
624
|
-
break;
|
|
450
|
+
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
625
451
|
case "TooManyRequestsException":
|
|
626
452
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
627
|
-
|
|
628
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
629
|
-
name: errorCode,
|
|
630
|
-
$metadata: deserializeMetadata(output),
|
|
631
|
-
};
|
|
632
|
-
break;
|
|
453
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
633
454
|
default:
|
|
634
455
|
const parsedBody = parsedOutput.body;
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
...parsedBody,
|
|
638
|
-
name: `${errorCode}`,
|
|
639
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
456
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
457
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
640
458
|
$fault: "client",
|
|
641
459
|
$metadata: deserializeMetadata(output),
|
|
642
|
-
};
|
|
460
|
+
});
|
|
461
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
643
462
|
}
|
|
644
|
-
const message = response.message || response.Message || errorCode;
|
|
645
|
-
response.message = message;
|
|
646
|
-
delete response.Message;
|
|
647
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
648
463
|
};
|
|
649
464
|
const deserializeAws_json1_1ListParallelDataCommand = async (output, context) => {
|
|
650
465
|
if (output.statusCode >= 300) {
|
|
@@ -671,43 +486,22 @@ const deserializeAws_json1_1ListParallelDataCommandError = async (output, contex
|
|
|
671
486
|
switch (errorCode) {
|
|
672
487
|
case "InternalServerException":
|
|
673
488
|
case "com.amazonaws.translate#InternalServerException":
|
|
674
|
-
|
|
675
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
676
|
-
name: errorCode,
|
|
677
|
-
$metadata: deserializeMetadata(output),
|
|
678
|
-
};
|
|
679
|
-
break;
|
|
489
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
680
490
|
case "InvalidParameterValueException":
|
|
681
491
|
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
682
|
-
|
|
683
|
-
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
684
|
-
name: errorCode,
|
|
685
|
-
$metadata: deserializeMetadata(output),
|
|
686
|
-
};
|
|
687
|
-
break;
|
|
492
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
688
493
|
case "TooManyRequestsException":
|
|
689
494
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
690
|
-
|
|
691
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
692
|
-
name: errorCode,
|
|
693
|
-
$metadata: deserializeMetadata(output),
|
|
694
|
-
};
|
|
695
|
-
break;
|
|
495
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
696
496
|
default:
|
|
697
497
|
const parsedBody = parsedOutput.body;
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
...parsedBody,
|
|
701
|
-
name: `${errorCode}`,
|
|
702
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
498
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
499
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
703
500
|
$fault: "client",
|
|
704
501
|
$metadata: deserializeMetadata(output),
|
|
705
|
-
};
|
|
502
|
+
});
|
|
503
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
706
504
|
}
|
|
707
|
-
const message = response.message || response.Message || errorCode;
|
|
708
|
-
response.message = message;
|
|
709
|
-
delete response.Message;
|
|
710
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
711
505
|
};
|
|
712
506
|
const deserializeAws_json1_1ListTerminologiesCommand = async (output, context) => {
|
|
713
507
|
if (output.statusCode >= 300) {
|
|
@@ -734,43 +528,22 @@ const deserializeAws_json1_1ListTerminologiesCommandError = async (output, conte
|
|
|
734
528
|
switch (errorCode) {
|
|
735
529
|
case "InternalServerException":
|
|
736
530
|
case "com.amazonaws.translate#InternalServerException":
|
|
737
|
-
|
|
738
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
739
|
-
name: errorCode,
|
|
740
|
-
$metadata: deserializeMetadata(output),
|
|
741
|
-
};
|
|
742
|
-
break;
|
|
531
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
743
532
|
case "InvalidParameterValueException":
|
|
744
533
|
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
745
|
-
|
|
746
|
-
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
747
|
-
name: errorCode,
|
|
748
|
-
$metadata: deserializeMetadata(output),
|
|
749
|
-
};
|
|
750
|
-
break;
|
|
534
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
751
535
|
case "TooManyRequestsException":
|
|
752
536
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
753
|
-
|
|
754
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
755
|
-
name: errorCode,
|
|
756
|
-
$metadata: deserializeMetadata(output),
|
|
757
|
-
};
|
|
758
|
-
break;
|
|
537
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
759
538
|
default:
|
|
760
539
|
const parsedBody = parsedOutput.body;
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
...parsedBody,
|
|
764
|
-
name: `${errorCode}`,
|
|
765
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
540
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
541
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
766
542
|
$fault: "client",
|
|
767
543
|
$metadata: deserializeMetadata(output),
|
|
768
|
-
};
|
|
544
|
+
});
|
|
545
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
769
546
|
}
|
|
770
|
-
const message = response.message || response.Message || errorCode;
|
|
771
|
-
response.message = message;
|
|
772
|
-
delete response.Message;
|
|
773
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
774
547
|
};
|
|
775
548
|
const deserializeAws_json1_1ListTextTranslationJobsCommand = async (output, context) => {
|
|
776
549
|
if (output.statusCode >= 300) {
|
|
@@ -797,51 +570,25 @@ const deserializeAws_json1_1ListTextTranslationJobsCommandError = async (output,
|
|
|
797
570
|
switch (errorCode) {
|
|
798
571
|
case "InternalServerException":
|
|
799
572
|
case "com.amazonaws.translate#InternalServerException":
|
|
800
|
-
|
|
801
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
802
|
-
name: errorCode,
|
|
803
|
-
$metadata: deserializeMetadata(output),
|
|
804
|
-
};
|
|
805
|
-
break;
|
|
573
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
806
574
|
case "InvalidFilterException":
|
|
807
575
|
case "com.amazonaws.translate#InvalidFilterException":
|
|
808
|
-
|
|
809
|
-
...(await deserializeAws_json1_1InvalidFilterExceptionResponse(parsedOutput, context)),
|
|
810
|
-
name: errorCode,
|
|
811
|
-
$metadata: deserializeMetadata(output),
|
|
812
|
-
};
|
|
813
|
-
break;
|
|
576
|
+
throw await deserializeAws_json1_1InvalidFilterExceptionResponse(parsedOutput, context);
|
|
814
577
|
case "InvalidRequestException":
|
|
815
578
|
case "com.amazonaws.translate#InvalidRequestException":
|
|
816
|
-
|
|
817
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
818
|
-
name: errorCode,
|
|
819
|
-
$metadata: deserializeMetadata(output),
|
|
820
|
-
};
|
|
821
|
-
break;
|
|
579
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
822
580
|
case "TooManyRequestsException":
|
|
823
581
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
824
|
-
|
|
825
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
826
|
-
name: errorCode,
|
|
827
|
-
$metadata: deserializeMetadata(output),
|
|
828
|
-
};
|
|
829
|
-
break;
|
|
582
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
830
583
|
default:
|
|
831
584
|
const parsedBody = parsedOutput.body;
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
...parsedBody,
|
|
835
|
-
name: `${errorCode}`,
|
|
836
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
585
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
586
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
837
587
|
$fault: "client",
|
|
838
588
|
$metadata: deserializeMetadata(output),
|
|
839
|
-
};
|
|
589
|
+
});
|
|
590
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
840
591
|
}
|
|
841
|
-
const message = response.message || response.Message || errorCode;
|
|
842
|
-
response.message = message;
|
|
843
|
-
delete response.Message;
|
|
844
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
845
592
|
};
|
|
846
593
|
const deserializeAws_json1_1StartTextTranslationJobCommand = async (output, context) => {
|
|
847
594
|
if (output.statusCode >= 300) {
|
|
@@ -868,67 +615,31 @@ const deserializeAws_json1_1StartTextTranslationJobCommandError = async (output,
|
|
|
868
615
|
switch (errorCode) {
|
|
869
616
|
case "InternalServerException":
|
|
870
617
|
case "com.amazonaws.translate#InternalServerException":
|
|
871
|
-
|
|
872
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
873
|
-
name: errorCode,
|
|
874
|
-
$metadata: deserializeMetadata(output),
|
|
875
|
-
};
|
|
876
|
-
break;
|
|
618
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
877
619
|
case "InvalidParameterValueException":
|
|
878
620
|
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
879
|
-
|
|
880
|
-
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
881
|
-
name: errorCode,
|
|
882
|
-
$metadata: deserializeMetadata(output),
|
|
883
|
-
};
|
|
884
|
-
break;
|
|
621
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
885
622
|
case "InvalidRequestException":
|
|
886
623
|
case "com.amazonaws.translate#InvalidRequestException":
|
|
887
|
-
|
|
888
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
889
|
-
name: errorCode,
|
|
890
|
-
$metadata: deserializeMetadata(output),
|
|
891
|
-
};
|
|
892
|
-
break;
|
|
624
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
893
625
|
case "ResourceNotFoundException":
|
|
894
626
|
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
895
|
-
|
|
896
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
897
|
-
name: errorCode,
|
|
898
|
-
$metadata: deserializeMetadata(output),
|
|
899
|
-
};
|
|
900
|
-
break;
|
|
627
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
901
628
|
case "TooManyRequestsException":
|
|
902
629
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
903
|
-
|
|
904
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
905
|
-
name: errorCode,
|
|
906
|
-
$metadata: deserializeMetadata(output),
|
|
907
|
-
};
|
|
908
|
-
break;
|
|
630
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
909
631
|
case "UnsupportedLanguagePairException":
|
|
910
632
|
case "com.amazonaws.translate#UnsupportedLanguagePairException":
|
|
911
|
-
|
|
912
|
-
...(await deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context)),
|
|
913
|
-
name: errorCode,
|
|
914
|
-
$metadata: deserializeMetadata(output),
|
|
915
|
-
};
|
|
916
|
-
break;
|
|
633
|
+
throw await deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context);
|
|
917
634
|
default:
|
|
918
635
|
const parsedBody = parsedOutput.body;
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
...parsedBody,
|
|
922
|
-
name: `${errorCode}`,
|
|
923
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
636
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
637
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
924
638
|
$fault: "client",
|
|
925
639
|
$metadata: deserializeMetadata(output),
|
|
926
|
-
};
|
|
640
|
+
});
|
|
641
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
927
642
|
}
|
|
928
|
-
const message = response.message || response.Message || errorCode;
|
|
929
|
-
response.message = message;
|
|
930
|
-
delete response.Message;
|
|
931
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
932
643
|
};
|
|
933
644
|
const deserializeAws_json1_1StopTextTranslationJobCommand = async (output, context) => {
|
|
934
645
|
if (output.statusCode >= 300) {
|
|
@@ -955,43 +666,22 @@ const deserializeAws_json1_1StopTextTranslationJobCommandError = async (output,
|
|
|
955
666
|
switch (errorCode) {
|
|
956
667
|
case "InternalServerException":
|
|
957
668
|
case "com.amazonaws.translate#InternalServerException":
|
|
958
|
-
|
|
959
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
960
|
-
name: errorCode,
|
|
961
|
-
$metadata: deserializeMetadata(output),
|
|
962
|
-
};
|
|
963
|
-
break;
|
|
669
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
964
670
|
case "ResourceNotFoundException":
|
|
965
671
|
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
966
|
-
|
|
967
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
968
|
-
name: errorCode,
|
|
969
|
-
$metadata: deserializeMetadata(output),
|
|
970
|
-
};
|
|
971
|
-
break;
|
|
672
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
972
673
|
case "TooManyRequestsException":
|
|
973
674
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
974
|
-
|
|
975
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
976
|
-
name: errorCode,
|
|
977
|
-
$metadata: deserializeMetadata(output),
|
|
978
|
-
};
|
|
979
|
-
break;
|
|
675
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
980
676
|
default:
|
|
981
677
|
const parsedBody = parsedOutput.body;
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
...parsedBody,
|
|
985
|
-
name: `${errorCode}`,
|
|
986
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
678
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
679
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
987
680
|
$fault: "client",
|
|
988
681
|
$metadata: deserializeMetadata(output),
|
|
989
|
-
};
|
|
682
|
+
});
|
|
683
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
990
684
|
}
|
|
991
|
-
const message = response.message || response.Message || errorCode;
|
|
992
|
-
response.message = message;
|
|
993
|
-
delete response.Message;
|
|
994
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
995
685
|
};
|
|
996
686
|
const deserializeAws_json1_1TranslateTextCommand = async (output, context) => {
|
|
997
687
|
if (output.statusCode >= 300) {
|
|
@@ -1018,83 +708,37 @@ const deserializeAws_json1_1TranslateTextCommandError = async (output, context)
|
|
|
1018
708
|
switch (errorCode) {
|
|
1019
709
|
case "DetectedLanguageLowConfidenceException":
|
|
1020
710
|
case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
|
|
1021
|
-
|
|
1022
|
-
...(await deserializeAws_json1_1DetectedLanguageLowConfidenceExceptionResponse(parsedOutput, context)),
|
|
1023
|
-
name: errorCode,
|
|
1024
|
-
$metadata: deserializeMetadata(output),
|
|
1025
|
-
};
|
|
1026
|
-
break;
|
|
711
|
+
throw await deserializeAws_json1_1DetectedLanguageLowConfidenceExceptionResponse(parsedOutput, context);
|
|
1027
712
|
case "InternalServerException":
|
|
1028
713
|
case "com.amazonaws.translate#InternalServerException":
|
|
1029
|
-
|
|
1030
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1031
|
-
name: errorCode,
|
|
1032
|
-
$metadata: deserializeMetadata(output),
|
|
1033
|
-
};
|
|
1034
|
-
break;
|
|
714
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1035
715
|
case "InvalidRequestException":
|
|
1036
716
|
case "com.amazonaws.translate#InvalidRequestException":
|
|
1037
|
-
|
|
1038
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1039
|
-
name: errorCode,
|
|
1040
|
-
$metadata: deserializeMetadata(output),
|
|
1041
|
-
};
|
|
1042
|
-
break;
|
|
717
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1043
718
|
case "ResourceNotFoundException":
|
|
1044
719
|
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
1045
|
-
|
|
1046
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1047
|
-
name: errorCode,
|
|
1048
|
-
$metadata: deserializeMetadata(output),
|
|
1049
|
-
};
|
|
1050
|
-
break;
|
|
720
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1051
721
|
case "ServiceUnavailableException":
|
|
1052
722
|
case "com.amazonaws.translate#ServiceUnavailableException":
|
|
1053
|
-
|
|
1054
|
-
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1055
|
-
name: errorCode,
|
|
1056
|
-
$metadata: deserializeMetadata(output),
|
|
1057
|
-
};
|
|
1058
|
-
break;
|
|
723
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1059
724
|
case "TextSizeLimitExceededException":
|
|
1060
725
|
case "com.amazonaws.translate#TextSizeLimitExceededException":
|
|
1061
|
-
|
|
1062
|
-
...(await deserializeAws_json1_1TextSizeLimitExceededExceptionResponse(parsedOutput, context)),
|
|
1063
|
-
name: errorCode,
|
|
1064
|
-
$metadata: deserializeMetadata(output),
|
|
1065
|
-
};
|
|
1066
|
-
break;
|
|
726
|
+
throw await deserializeAws_json1_1TextSizeLimitExceededExceptionResponse(parsedOutput, context);
|
|
1067
727
|
case "TooManyRequestsException":
|
|
1068
728
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
1069
|
-
|
|
1070
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1071
|
-
name: errorCode,
|
|
1072
|
-
$metadata: deserializeMetadata(output),
|
|
1073
|
-
};
|
|
1074
|
-
break;
|
|
729
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1075
730
|
case "UnsupportedLanguagePairException":
|
|
1076
731
|
case "com.amazonaws.translate#UnsupportedLanguagePairException":
|
|
1077
|
-
|
|
1078
|
-
...(await deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context)),
|
|
1079
|
-
name: errorCode,
|
|
1080
|
-
$metadata: deserializeMetadata(output),
|
|
1081
|
-
};
|
|
1082
|
-
break;
|
|
732
|
+
throw await deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse(parsedOutput, context);
|
|
1083
733
|
default:
|
|
1084
734
|
const parsedBody = parsedOutput.body;
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
...parsedBody,
|
|
1088
|
-
name: `${errorCode}`,
|
|
1089
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
735
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
736
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1090
737
|
$fault: "client",
|
|
1091
738
|
$metadata: deserializeMetadata(output),
|
|
1092
|
-
};
|
|
739
|
+
});
|
|
740
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1093
741
|
}
|
|
1094
|
-
const message = response.message || response.Message || errorCode;
|
|
1095
|
-
response.message = message;
|
|
1096
|
-
delete response.Message;
|
|
1097
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1098
742
|
};
|
|
1099
743
|
const deserializeAws_json1_1UpdateParallelDataCommand = async (output, context) => {
|
|
1100
744
|
if (output.statusCode >= 300) {
|
|
@@ -1121,226 +765,154 @@ const deserializeAws_json1_1UpdateParallelDataCommandError = async (output, cont
|
|
|
1121
765
|
switch (errorCode) {
|
|
1122
766
|
case "ConcurrentModificationException":
|
|
1123
767
|
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
1124
|
-
|
|
1125
|
-
...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
1126
|
-
name: errorCode,
|
|
1127
|
-
$metadata: deserializeMetadata(output),
|
|
1128
|
-
};
|
|
1129
|
-
break;
|
|
768
|
+
throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
1130
769
|
case "ConflictException":
|
|
1131
770
|
case "com.amazonaws.translate#ConflictException":
|
|
1132
|
-
|
|
1133
|
-
...(await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)),
|
|
1134
|
-
name: errorCode,
|
|
1135
|
-
$metadata: deserializeMetadata(output),
|
|
1136
|
-
};
|
|
1137
|
-
break;
|
|
771
|
+
throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
|
|
1138
772
|
case "InternalServerException":
|
|
1139
773
|
case "com.amazonaws.translate#InternalServerException":
|
|
1140
|
-
|
|
1141
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1142
|
-
name: errorCode,
|
|
1143
|
-
$metadata: deserializeMetadata(output),
|
|
1144
|
-
};
|
|
1145
|
-
break;
|
|
774
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
1146
775
|
case "InvalidParameterValueException":
|
|
1147
776
|
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
1148
|
-
|
|
1149
|
-
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
1150
|
-
name: errorCode,
|
|
1151
|
-
$metadata: deserializeMetadata(output),
|
|
1152
|
-
};
|
|
1153
|
-
break;
|
|
777
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
1154
778
|
case "InvalidRequestException":
|
|
1155
779
|
case "com.amazonaws.translate#InvalidRequestException":
|
|
1156
|
-
|
|
1157
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1158
|
-
name: errorCode,
|
|
1159
|
-
$metadata: deserializeMetadata(output),
|
|
1160
|
-
};
|
|
1161
|
-
break;
|
|
780
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
1162
781
|
case "LimitExceededException":
|
|
1163
782
|
case "com.amazonaws.translate#LimitExceededException":
|
|
1164
|
-
|
|
1165
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
1166
|
-
name: errorCode,
|
|
1167
|
-
$metadata: deserializeMetadata(output),
|
|
1168
|
-
};
|
|
1169
|
-
break;
|
|
783
|
+
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1170
784
|
case "ResourceNotFoundException":
|
|
1171
785
|
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
1172
|
-
|
|
1173
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1174
|
-
name: errorCode,
|
|
1175
|
-
$metadata: deserializeMetadata(output),
|
|
1176
|
-
};
|
|
1177
|
-
break;
|
|
786
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1178
787
|
case "TooManyRequestsException":
|
|
1179
788
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
1180
|
-
|
|
1181
|
-
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1182
|
-
name: errorCode,
|
|
1183
|
-
$metadata: deserializeMetadata(output),
|
|
1184
|
-
};
|
|
1185
|
-
break;
|
|
789
|
+
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1186
790
|
default:
|
|
1187
791
|
const parsedBody = parsedOutput.body;
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
...parsedBody,
|
|
1191
|
-
name: `${errorCode}`,
|
|
1192
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
792
|
+
response = new TranslateServiceException_1.TranslateServiceException({
|
|
793
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1193
794
|
$fault: "client",
|
|
1194
795
|
$metadata: deserializeMetadata(output),
|
|
1195
|
-
};
|
|
796
|
+
});
|
|
797
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1196
798
|
}
|
|
1197
|
-
const message = response.message || response.Message || errorCode;
|
|
1198
|
-
response.message = message;
|
|
1199
|
-
delete response.Message;
|
|
1200
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1201
799
|
};
|
|
1202
800
|
const deserializeAws_json1_1ConcurrentModificationExceptionResponse = async (parsedOutput, context) => {
|
|
1203
801
|
const body = parsedOutput.body;
|
|
1204
802
|
const deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context);
|
|
1205
|
-
const
|
|
1206
|
-
name: "ConcurrentModificationException",
|
|
1207
|
-
$fault: "client",
|
|
803
|
+
const exception = new models_0_1.ConcurrentModificationException({
|
|
1208
804
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1209
805
|
...deserialized,
|
|
1210
|
-
};
|
|
1211
|
-
return
|
|
806
|
+
});
|
|
807
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1212
808
|
};
|
|
1213
809
|
const deserializeAws_json1_1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1214
810
|
const body = parsedOutput.body;
|
|
1215
811
|
const deserialized = deserializeAws_json1_1ConflictException(body, context);
|
|
1216
|
-
const
|
|
1217
|
-
name: "ConflictException",
|
|
1218
|
-
$fault: "client",
|
|
812
|
+
const exception = new models_0_1.ConflictException({
|
|
1219
813
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1220
814
|
...deserialized,
|
|
1221
|
-
};
|
|
1222
|
-
return
|
|
815
|
+
});
|
|
816
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1223
817
|
};
|
|
1224
818
|
const deserializeAws_json1_1DetectedLanguageLowConfidenceExceptionResponse = async (parsedOutput, context) => {
|
|
1225
819
|
const body = parsedOutput.body;
|
|
1226
820
|
const deserialized = deserializeAws_json1_1DetectedLanguageLowConfidenceException(body, context);
|
|
1227
|
-
const
|
|
1228
|
-
name: "DetectedLanguageLowConfidenceException",
|
|
1229
|
-
$fault: "client",
|
|
821
|
+
const exception = new models_0_1.DetectedLanguageLowConfidenceException({
|
|
1230
822
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1231
823
|
...deserialized,
|
|
1232
|
-
};
|
|
1233
|
-
return
|
|
824
|
+
});
|
|
825
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1234
826
|
};
|
|
1235
827
|
const deserializeAws_json1_1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
1236
828
|
const body = parsedOutput.body;
|
|
1237
829
|
const deserialized = deserializeAws_json1_1InternalServerException(body, context);
|
|
1238
|
-
const
|
|
1239
|
-
name: "InternalServerException",
|
|
1240
|
-
$fault: "server",
|
|
830
|
+
const exception = new models_0_1.InternalServerException({
|
|
1241
831
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1242
832
|
...deserialized,
|
|
1243
|
-
};
|
|
1244
|
-
return
|
|
833
|
+
});
|
|
834
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1245
835
|
};
|
|
1246
836
|
const deserializeAws_json1_1InvalidFilterExceptionResponse = async (parsedOutput, context) => {
|
|
1247
837
|
const body = parsedOutput.body;
|
|
1248
838
|
const deserialized = deserializeAws_json1_1InvalidFilterException(body, context);
|
|
1249
|
-
const
|
|
1250
|
-
name: "InvalidFilterException",
|
|
1251
|
-
$fault: "client",
|
|
839
|
+
const exception = new models_0_1.InvalidFilterException({
|
|
1252
840
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1253
841
|
...deserialized,
|
|
1254
|
-
};
|
|
1255
|
-
return
|
|
842
|
+
});
|
|
843
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1256
844
|
};
|
|
1257
845
|
const deserializeAws_json1_1InvalidParameterValueExceptionResponse = async (parsedOutput, context) => {
|
|
1258
846
|
const body = parsedOutput.body;
|
|
1259
847
|
const deserialized = deserializeAws_json1_1InvalidParameterValueException(body, context);
|
|
1260
|
-
const
|
|
1261
|
-
name: "InvalidParameterValueException",
|
|
1262
|
-
$fault: "client",
|
|
848
|
+
const exception = new models_0_1.InvalidParameterValueException({
|
|
1263
849
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1264
850
|
...deserialized,
|
|
1265
|
-
};
|
|
1266
|
-
return
|
|
851
|
+
});
|
|
852
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1267
853
|
};
|
|
1268
854
|
const deserializeAws_json1_1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
1269
855
|
const body = parsedOutput.body;
|
|
1270
856
|
const deserialized = deserializeAws_json1_1InvalidRequestException(body, context);
|
|
1271
|
-
const
|
|
1272
|
-
name: "InvalidRequestException",
|
|
1273
|
-
$fault: "client",
|
|
857
|
+
const exception = new models_0_1.InvalidRequestException({
|
|
1274
858
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1275
859
|
...deserialized,
|
|
1276
|
-
};
|
|
1277
|
-
return
|
|
860
|
+
});
|
|
861
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1278
862
|
};
|
|
1279
863
|
const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1280
864
|
const body = parsedOutput.body;
|
|
1281
865
|
const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
1282
|
-
const
|
|
1283
|
-
name: "LimitExceededException",
|
|
1284
|
-
$fault: "client",
|
|
866
|
+
const exception = new models_0_1.LimitExceededException({
|
|
1285
867
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1286
868
|
...deserialized,
|
|
1287
|
-
};
|
|
1288
|
-
return
|
|
869
|
+
});
|
|
870
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1289
871
|
};
|
|
1290
872
|
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1291
873
|
const body = parsedOutput.body;
|
|
1292
874
|
const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
1293
|
-
const
|
|
1294
|
-
name: "ResourceNotFoundException",
|
|
1295
|
-
$fault: "client",
|
|
875
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
1296
876
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1297
877
|
...deserialized,
|
|
1298
|
-
};
|
|
1299
|
-
return
|
|
878
|
+
});
|
|
879
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1300
880
|
};
|
|
1301
881
|
const deserializeAws_json1_1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
1302
882
|
const body = parsedOutput.body;
|
|
1303
883
|
const deserialized = deserializeAws_json1_1ServiceUnavailableException(body, context);
|
|
1304
|
-
const
|
|
1305
|
-
name: "ServiceUnavailableException",
|
|
1306
|
-
$fault: "server",
|
|
884
|
+
const exception = new models_0_1.ServiceUnavailableException({
|
|
1307
885
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1308
886
|
...deserialized,
|
|
1309
|
-
};
|
|
1310
|
-
return
|
|
887
|
+
});
|
|
888
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1311
889
|
};
|
|
1312
890
|
const deserializeAws_json1_1TextSizeLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1313
891
|
const body = parsedOutput.body;
|
|
1314
892
|
const deserialized = deserializeAws_json1_1TextSizeLimitExceededException(body, context);
|
|
1315
|
-
const
|
|
1316
|
-
name: "TextSizeLimitExceededException",
|
|
1317
|
-
$fault: "client",
|
|
893
|
+
const exception = new models_0_1.TextSizeLimitExceededException({
|
|
1318
894
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1319
895
|
...deserialized,
|
|
1320
|
-
};
|
|
1321
|
-
return
|
|
896
|
+
});
|
|
897
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1322
898
|
};
|
|
1323
899
|
const deserializeAws_json1_1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
1324
900
|
const body = parsedOutput.body;
|
|
1325
901
|
const deserialized = deserializeAws_json1_1TooManyRequestsException(body, context);
|
|
1326
|
-
const
|
|
1327
|
-
name: "TooManyRequestsException",
|
|
1328
|
-
$fault: "client",
|
|
902
|
+
const exception = new models_0_1.TooManyRequestsException({
|
|
1329
903
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1330
904
|
...deserialized,
|
|
1331
|
-
};
|
|
1332
|
-
return
|
|
905
|
+
});
|
|
906
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1333
907
|
};
|
|
1334
908
|
const deserializeAws_json1_1UnsupportedLanguagePairExceptionResponse = async (parsedOutput, context) => {
|
|
1335
909
|
const body = parsedOutput.body;
|
|
1336
910
|
const deserialized = deserializeAws_json1_1UnsupportedLanguagePairException(body, context);
|
|
1337
|
-
const
|
|
1338
|
-
name: "UnsupportedLanguagePairException",
|
|
1339
|
-
$fault: "client",
|
|
911
|
+
const exception = new models_0_1.UnsupportedLanguagePairException({
|
|
1340
912
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1341
913
|
...deserialized,
|
|
1342
|
-
};
|
|
1343
|
-
return
|
|
914
|
+
});
|
|
915
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1344
916
|
};
|
|
1345
917
|
const serializeAws_json1_1CreateParallelDataRequest = (input, context) => {
|
|
1346
918
|
var _a;
|
|
@@ -1544,6 +1116,7 @@ const serializeAws_json1_1TranslateTextRequest = (input, context) => {
|
|
|
1544
1116
|
};
|
|
1545
1117
|
const serializeAws_json1_1TranslationSettings = (input, context) => {
|
|
1546
1118
|
return {
|
|
1119
|
+
...(input.Formality !== undefined && input.Formality !== null && { Formality: input.Formality }),
|
|
1547
1120
|
...(input.Profanity !== undefined && input.Profanity !== null && { Profanity: input.Profanity }),
|
|
1548
1121
|
};
|
|
1549
1122
|
};
|
|
@@ -1568,7 +1141,7 @@ const deserializeAws_json1_1AppliedTerminology = (output, context) => {
|
|
|
1568
1141
|
};
|
|
1569
1142
|
};
|
|
1570
1143
|
const deserializeAws_json1_1AppliedTerminologyList = (output, context) => {
|
|
1571
|
-
|
|
1144
|
+
const retVal = (output || [])
|
|
1572
1145
|
.filter((e) => e != null)
|
|
1573
1146
|
.map((entry) => {
|
|
1574
1147
|
if (entry === null) {
|
|
@@ -1576,6 +1149,7 @@ const deserializeAws_json1_1AppliedTerminologyList = (output, context) => {
|
|
|
1576
1149
|
}
|
|
1577
1150
|
return deserializeAws_json1_1AppliedTerminology(entry, context);
|
|
1578
1151
|
});
|
|
1152
|
+
return retVal;
|
|
1579
1153
|
};
|
|
1580
1154
|
const deserializeAws_json1_1ConcurrentModificationException = (output, context) => {
|
|
1581
1155
|
return {
|
|
@@ -1692,7 +1266,7 @@ const deserializeAws_json1_1JobDetails = (output, context) => {
|
|
|
1692
1266
|
};
|
|
1693
1267
|
};
|
|
1694
1268
|
const deserializeAws_json1_1LanguageCodeStringList = (output, context) => {
|
|
1695
|
-
|
|
1269
|
+
const retVal = (output || [])
|
|
1696
1270
|
.filter((e) => e != null)
|
|
1697
1271
|
.map((entry) => {
|
|
1698
1272
|
if (entry === null) {
|
|
@@ -1700,6 +1274,7 @@ const deserializeAws_json1_1LanguageCodeStringList = (output, context) => {
|
|
|
1700
1274
|
}
|
|
1701
1275
|
return smithy_client_1.expectString(entry);
|
|
1702
1276
|
});
|
|
1277
|
+
return retVal;
|
|
1703
1278
|
};
|
|
1704
1279
|
const deserializeAws_json1_1LimitExceededException = (output, context) => {
|
|
1705
1280
|
return {
|
|
@@ -1784,7 +1359,7 @@ const deserializeAws_json1_1ParallelDataProperties = (output, context) => {
|
|
|
1784
1359
|
};
|
|
1785
1360
|
};
|
|
1786
1361
|
const deserializeAws_json1_1ParallelDataPropertiesList = (output, context) => {
|
|
1787
|
-
|
|
1362
|
+
const retVal = (output || [])
|
|
1788
1363
|
.filter((e) => e != null)
|
|
1789
1364
|
.map((entry) => {
|
|
1790
1365
|
if (entry === null) {
|
|
@@ -1792,9 +1367,10 @@ const deserializeAws_json1_1ParallelDataPropertiesList = (output, context) => {
|
|
|
1792
1367
|
}
|
|
1793
1368
|
return deserializeAws_json1_1ParallelDataProperties(entry, context);
|
|
1794
1369
|
});
|
|
1370
|
+
return retVal;
|
|
1795
1371
|
};
|
|
1796
1372
|
const deserializeAws_json1_1ResourceNameList = (output, context) => {
|
|
1797
|
-
|
|
1373
|
+
const retVal = (output || [])
|
|
1798
1374
|
.filter((e) => e != null)
|
|
1799
1375
|
.map((entry) => {
|
|
1800
1376
|
if (entry === null) {
|
|
@@ -1802,6 +1378,7 @@ const deserializeAws_json1_1ResourceNameList = (output, context) => {
|
|
|
1802
1378
|
}
|
|
1803
1379
|
return smithy_client_1.expectString(entry);
|
|
1804
1380
|
});
|
|
1381
|
+
return retVal;
|
|
1805
1382
|
};
|
|
1806
1383
|
const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
|
|
1807
1384
|
return {
|
|
@@ -1826,7 +1403,7 @@ const deserializeAws_json1_1StopTextTranslationJobResponse = (output, context) =
|
|
|
1826
1403
|
};
|
|
1827
1404
|
};
|
|
1828
1405
|
const deserializeAws_json1_1TargetLanguageCodeStringList = (output, context) => {
|
|
1829
|
-
|
|
1406
|
+
const retVal = (output || [])
|
|
1830
1407
|
.filter((e) => e != null)
|
|
1831
1408
|
.map((entry) => {
|
|
1832
1409
|
if (entry === null) {
|
|
@@ -1834,6 +1411,7 @@ const deserializeAws_json1_1TargetLanguageCodeStringList = (output, context) =>
|
|
|
1834
1411
|
}
|
|
1835
1412
|
return smithy_client_1.expectString(entry);
|
|
1836
1413
|
});
|
|
1414
|
+
return retVal;
|
|
1837
1415
|
};
|
|
1838
1416
|
const deserializeAws_json1_1Term = (output, context) => {
|
|
1839
1417
|
return {
|
|
@@ -1874,7 +1452,7 @@ const deserializeAws_json1_1TerminologyProperties = (output, context) => {
|
|
|
1874
1452
|
};
|
|
1875
1453
|
};
|
|
1876
1454
|
const deserializeAws_json1_1TerminologyPropertiesList = (output, context) => {
|
|
1877
|
-
|
|
1455
|
+
const retVal = (output || [])
|
|
1878
1456
|
.filter((e) => e != null)
|
|
1879
1457
|
.map((entry) => {
|
|
1880
1458
|
if (entry === null) {
|
|
@@ -1882,9 +1460,10 @@ const deserializeAws_json1_1TerminologyPropertiesList = (output, context) => {
|
|
|
1882
1460
|
}
|
|
1883
1461
|
return deserializeAws_json1_1TerminologyProperties(entry, context);
|
|
1884
1462
|
});
|
|
1463
|
+
return retVal;
|
|
1885
1464
|
};
|
|
1886
1465
|
const deserializeAws_json1_1TermList = (output, context) => {
|
|
1887
|
-
|
|
1466
|
+
const retVal = (output || [])
|
|
1888
1467
|
.filter((e) => e != null)
|
|
1889
1468
|
.map((entry) => {
|
|
1890
1469
|
if (entry === null) {
|
|
@@ -1892,6 +1471,7 @@ const deserializeAws_json1_1TermList = (output, context) => {
|
|
|
1892
1471
|
}
|
|
1893
1472
|
return deserializeAws_json1_1Term(entry, context);
|
|
1894
1473
|
});
|
|
1474
|
+
return retVal;
|
|
1895
1475
|
};
|
|
1896
1476
|
const deserializeAws_json1_1TextSizeLimitExceededException = (output, context) => {
|
|
1897
1477
|
return {
|
|
@@ -1936,7 +1516,7 @@ const deserializeAws_json1_1TextTranslationJobProperties = (output, context) =>
|
|
|
1936
1516
|
};
|
|
1937
1517
|
};
|
|
1938
1518
|
const deserializeAws_json1_1TextTranslationJobPropertiesList = (output, context) => {
|
|
1939
|
-
|
|
1519
|
+
const retVal = (output || [])
|
|
1940
1520
|
.filter((e) => e != null)
|
|
1941
1521
|
.map((entry) => {
|
|
1942
1522
|
if (entry === null) {
|
|
@@ -1944,6 +1524,7 @@ const deserializeAws_json1_1TextTranslationJobPropertiesList = (output, context)
|
|
|
1944
1524
|
}
|
|
1945
1525
|
return deserializeAws_json1_1TextTranslationJobProperties(entry, context);
|
|
1946
1526
|
});
|
|
1527
|
+
return retVal;
|
|
1947
1528
|
};
|
|
1948
1529
|
const deserializeAws_json1_1TooManyRequestsException = (output, context) => {
|
|
1949
1530
|
return {
|
|
@@ -1965,6 +1546,7 @@ const deserializeAws_json1_1TranslateTextResponse = (output, context) => {
|
|
|
1965
1546
|
};
|
|
1966
1547
|
const deserializeAws_json1_1TranslationSettings = (output, context) => {
|
|
1967
1548
|
return {
|
|
1549
|
+
Formality: smithy_client_1.expectString(output.Formality),
|
|
1968
1550
|
Profanity: smithy_client_1.expectString(output.Profanity),
|
|
1969
1551
|
};
|
|
1970
1552
|
};
|