@aws-sdk/client-translate 3.503.1 → 3.507.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +65 -581
- package/dist-es/protocols/Aws_json1_1.js +57 -573
- package/package.json +3 -3
|
@@ -119,7 +119,7 @@ export const se_UpdateParallelDataCommand = async (input, context) => {
|
|
|
119
119
|
};
|
|
120
120
|
export const de_CreateParallelDataCommand = async (output, context) => {
|
|
121
121
|
if (output.statusCode >= 300) {
|
|
122
|
-
return
|
|
122
|
+
return de_CommandError(output, context);
|
|
123
123
|
}
|
|
124
124
|
const data = await parseBody(output.body, context);
|
|
125
125
|
let contents = {};
|
|
@@ -130,49 +130,9 @@ export const de_CreateParallelDataCommand = async (output, context) => {
|
|
|
130
130
|
};
|
|
131
131
|
return response;
|
|
132
132
|
};
|
|
133
|
-
const de_CreateParallelDataCommandError = async (output, context) => {
|
|
134
|
-
const parsedOutput = {
|
|
135
|
-
...output,
|
|
136
|
-
body: await parseErrorBody(output.body, context),
|
|
137
|
-
};
|
|
138
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
139
|
-
switch (errorCode) {
|
|
140
|
-
case "ConcurrentModificationException":
|
|
141
|
-
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
142
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
143
|
-
case "ConflictException":
|
|
144
|
-
case "com.amazonaws.translate#ConflictException":
|
|
145
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
146
|
-
case "InternalServerException":
|
|
147
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
148
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
149
|
-
case "InvalidParameterValueException":
|
|
150
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
151
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
152
|
-
case "InvalidRequestException":
|
|
153
|
-
case "com.amazonaws.translate#InvalidRequestException":
|
|
154
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
155
|
-
case "LimitExceededException":
|
|
156
|
-
case "com.amazonaws.translate#LimitExceededException":
|
|
157
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
158
|
-
case "TooManyRequestsException":
|
|
159
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
160
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
161
|
-
case "TooManyTagsException":
|
|
162
|
-
case "com.amazonaws.translate#TooManyTagsException":
|
|
163
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
164
|
-
default:
|
|
165
|
-
const parsedBody = parsedOutput.body;
|
|
166
|
-
return throwDefaultError({
|
|
167
|
-
output,
|
|
168
|
-
parsedBody,
|
|
169
|
-
errorCode,
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
133
|
export const de_DeleteParallelDataCommand = async (output, context) => {
|
|
174
134
|
if (output.statusCode >= 300) {
|
|
175
|
-
return
|
|
135
|
+
return de_CommandError(output, context);
|
|
176
136
|
}
|
|
177
137
|
const data = await parseBody(output.body, context);
|
|
178
138
|
let contents = {};
|
|
@@ -183,37 +143,9 @@ export const de_DeleteParallelDataCommand = async (output, context) => {
|
|
|
183
143
|
};
|
|
184
144
|
return response;
|
|
185
145
|
};
|
|
186
|
-
const de_DeleteParallelDataCommandError = async (output, context) => {
|
|
187
|
-
const parsedOutput = {
|
|
188
|
-
...output,
|
|
189
|
-
body: await parseErrorBody(output.body, context),
|
|
190
|
-
};
|
|
191
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
192
|
-
switch (errorCode) {
|
|
193
|
-
case "ConcurrentModificationException":
|
|
194
|
-
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
195
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
196
|
-
case "InternalServerException":
|
|
197
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
198
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
199
|
-
case "ResourceNotFoundException":
|
|
200
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
201
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
202
|
-
case "TooManyRequestsException":
|
|
203
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
204
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
205
|
-
default:
|
|
206
|
-
const parsedBody = parsedOutput.body;
|
|
207
|
-
return throwDefaultError({
|
|
208
|
-
output,
|
|
209
|
-
parsedBody,
|
|
210
|
-
errorCode,
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
146
|
export const de_DeleteTerminologyCommand = async (output, context) => {
|
|
215
147
|
if (output.statusCode >= 300) {
|
|
216
|
-
return
|
|
148
|
+
return de_CommandError(output, context);
|
|
217
149
|
}
|
|
218
150
|
await collectBody(output.body, context);
|
|
219
151
|
const response = {
|
|
@@ -221,37 +153,9 @@ export const de_DeleteTerminologyCommand = async (output, context) => {
|
|
|
221
153
|
};
|
|
222
154
|
return response;
|
|
223
155
|
};
|
|
224
|
-
const de_DeleteTerminologyCommandError = async (output, context) => {
|
|
225
|
-
const parsedOutput = {
|
|
226
|
-
...output,
|
|
227
|
-
body: await parseErrorBody(output.body, context),
|
|
228
|
-
};
|
|
229
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
230
|
-
switch (errorCode) {
|
|
231
|
-
case "InternalServerException":
|
|
232
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
233
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
234
|
-
case "InvalidParameterValueException":
|
|
235
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
236
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
237
|
-
case "ResourceNotFoundException":
|
|
238
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
239
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
240
|
-
case "TooManyRequestsException":
|
|
241
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
242
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
243
|
-
default:
|
|
244
|
-
const parsedBody = parsedOutput.body;
|
|
245
|
-
return throwDefaultError({
|
|
246
|
-
output,
|
|
247
|
-
parsedBody,
|
|
248
|
-
errorCode,
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
156
|
export const de_DescribeTextTranslationJobCommand = async (output, context) => {
|
|
253
157
|
if (output.statusCode >= 300) {
|
|
254
|
-
return
|
|
158
|
+
return de_CommandError(output, context);
|
|
255
159
|
}
|
|
256
160
|
const data = await parseBody(output.body, context);
|
|
257
161
|
let contents = {};
|
|
@@ -262,34 +166,9 @@ export const de_DescribeTextTranslationJobCommand = async (output, context) => {
|
|
|
262
166
|
};
|
|
263
167
|
return response;
|
|
264
168
|
};
|
|
265
|
-
const de_DescribeTextTranslationJobCommandError = async (output, context) => {
|
|
266
|
-
const parsedOutput = {
|
|
267
|
-
...output,
|
|
268
|
-
body: await parseErrorBody(output.body, context),
|
|
269
|
-
};
|
|
270
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
271
|
-
switch (errorCode) {
|
|
272
|
-
case "InternalServerException":
|
|
273
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
274
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
275
|
-
case "ResourceNotFoundException":
|
|
276
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
277
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
278
|
-
case "TooManyRequestsException":
|
|
279
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
280
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
281
|
-
default:
|
|
282
|
-
const parsedBody = parsedOutput.body;
|
|
283
|
-
return throwDefaultError({
|
|
284
|
-
output,
|
|
285
|
-
parsedBody,
|
|
286
|
-
errorCode,
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
169
|
export const de_GetParallelDataCommand = async (output, context) => {
|
|
291
170
|
if (output.statusCode >= 300) {
|
|
292
|
-
return
|
|
171
|
+
return de_CommandError(output, context);
|
|
293
172
|
}
|
|
294
173
|
const data = await parseBody(output.body, context);
|
|
295
174
|
let contents = {};
|
|
@@ -300,37 +179,9 @@ export const de_GetParallelDataCommand = async (output, context) => {
|
|
|
300
179
|
};
|
|
301
180
|
return response;
|
|
302
181
|
};
|
|
303
|
-
const de_GetParallelDataCommandError = async (output, context) => {
|
|
304
|
-
const parsedOutput = {
|
|
305
|
-
...output,
|
|
306
|
-
body: await parseErrorBody(output.body, context),
|
|
307
|
-
};
|
|
308
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
309
|
-
switch (errorCode) {
|
|
310
|
-
case "InternalServerException":
|
|
311
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
312
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
313
|
-
case "InvalidParameterValueException":
|
|
314
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
315
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
316
|
-
case "ResourceNotFoundException":
|
|
317
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
318
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
319
|
-
case "TooManyRequestsException":
|
|
320
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
321
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
322
|
-
default:
|
|
323
|
-
const parsedBody = parsedOutput.body;
|
|
324
|
-
return throwDefaultError({
|
|
325
|
-
output,
|
|
326
|
-
parsedBody,
|
|
327
|
-
errorCode,
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
182
|
export const de_GetTerminologyCommand = async (output, context) => {
|
|
332
183
|
if (output.statusCode >= 300) {
|
|
333
|
-
return
|
|
184
|
+
return de_CommandError(output, context);
|
|
334
185
|
}
|
|
335
186
|
const data = await parseBody(output.body, context);
|
|
336
187
|
let contents = {};
|
|
@@ -341,37 +192,9 @@ export const de_GetTerminologyCommand = async (output, context) => {
|
|
|
341
192
|
};
|
|
342
193
|
return response;
|
|
343
194
|
};
|
|
344
|
-
const de_GetTerminologyCommandError = async (output, context) => {
|
|
345
|
-
const parsedOutput = {
|
|
346
|
-
...output,
|
|
347
|
-
body: await parseErrorBody(output.body, context),
|
|
348
|
-
};
|
|
349
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
350
|
-
switch (errorCode) {
|
|
351
|
-
case "InternalServerException":
|
|
352
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
353
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
354
|
-
case "InvalidParameterValueException":
|
|
355
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
356
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
357
|
-
case "ResourceNotFoundException":
|
|
358
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
359
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
360
|
-
case "TooManyRequestsException":
|
|
361
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
362
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
363
|
-
default:
|
|
364
|
-
const parsedBody = parsedOutput.body;
|
|
365
|
-
return throwDefaultError({
|
|
366
|
-
output,
|
|
367
|
-
parsedBody,
|
|
368
|
-
errorCode,
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
};
|
|
372
195
|
export const de_ImportTerminologyCommand = async (output, context) => {
|
|
373
196
|
if (output.statusCode >= 300) {
|
|
374
|
-
return
|
|
197
|
+
return de_CommandError(output, context);
|
|
375
198
|
}
|
|
376
199
|
const data = await parseBody(output.body, context);
|
|
377
200
|
let contents = {};
|
|
@@ -382,43 +205,9 @@ export const de_ImportTerminologyCommand = async (output, context) => {
|
|
|
382
205
|
};
|
|
383
206
|
return response;
|
|
384
207
|
};
|
|
385
|
-
const de_ImportTerminologyCommandError = async (output, context) => {
|
|
386
|
-
const parsedOutput = {
|
|
387
|
-
...output,
|
|
388
|
-
body: await parseErrorBody(output.body, context),
|
|
389
|
-
};
|
|
390
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
391
|
-
switch (errorCode) {
|
|
392
|
-
case "ConcurrentModificationException":
|
|
393
|
-
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
394
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
395
|
-
case "InternalServerException":
|
|
396
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
397
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
398
|
-
case "InvalidParameterValueException":
|
|
399
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
400
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
401
|
-
case "LimitExceededException":
|
|
402
|
-
case "com.amazonaws.translate#LimitExceededException":
|
|
403
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
404
|
-
case "TooManyRequestsException":
|
|
405
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
406
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
407
|
-
case "TooManyTagsException":
|
|
408
|
-
case "com.amazonaws.translate#TooManyTagsException":
|
|
409
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
410
|
-
default:
|
|
411
|
-
const parsedBody = parsedOutput.body;
|
|
412
|
-
return throwDefaultError({
|
|
413
|
-
output,
|
|
414
|
-
parsedBody,
|
|
415
|
-
errorCode,
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
208
|
export const de_ListLanguagesCommand = async (output, context) => {
|
|
420
209
|
if (output.statusCode >= 300) {
|
|
421
|
-
return
|
|
210
|
+
return de_CommandError(output, context);
|
|
422
211
|
}
|
|
423
212
|
const data = await parseBody(output.body, context);
|
|
424
213
|
let contents = {};
|
|
@@ -429,37 +218,9 @@ export const de_ListLanguagesCommand = async (output, context) => {
|
|
|
429
218
|
};
|
|
430
219
|
return response;
|
|
431
220
|
};
|
|
432
|
-
const de_ListLanguagesCommandError = async (output, context) => {
|
|
433
|
-
const parsedOutput = {
|
|
434
|
-
...output,
|
|
435
|
-
body: await parseErrorBody(output.body, context),
|
|
436
|
-
};
|
|
437
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
438
|
-
switch (errorCode) {
|
|
439
|
-
case "InternalServerException":
|
|
440
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
441
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
442
|
-
case "InvalidParameterValueException":
|
|
443
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
444
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
445
|
-
case "TooManyRequestsException":
|
|
446
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
447
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
448
|
-
case "UnsupportedDisplayLanguageCodeException":
|
|
449
|
-
case "com.amazonaws.translate#UnsupportedDisplayLanguageCodeException":
|
|
450
|
-
throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context);
|
|
451
|
-
default:
|
|
452
|
-
const parsedBody = parsedOutput.body;
|
|
453
|
-
return throwDefaultError({
|
|
454
|
-
output,
|
|
455
|
-
parsedBody,
|
|
456
|
-
errorCode,
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
221
|
export const de_ListParallelDataCommand = async (output, context) => {
|
|
461
222
|
if (output.statusCode >= 300) {
|
|
462
|
-
return
|
|
223
|
+
return de_CommandError(output, context);
|
|
463
224
|
}
|
|
464
225
|
const data = await parseBody(output.body, context);
|
|
465
226
|
let contents = {};
|
|
@@ -470,34 +231,9 @@ export const de_ListParallelDataCommand = async (output, context) => {
|
|
|
470
231
|
};
|
|
471
232
|
return response;
|
|
472
233
|
};
|
|
473
|
-
const de_ListParallelDataCommandError = async (output, context) => {
|
|
474
|
-
const parsedOutput = {
|
|
475
|
-
...output,
|
|
476
|
-
body: await parseErrorBody(output.body, context),
|
|
477
|
-
};
|
|
478
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
479
|
-
switch (errorCode) {
|
|
480
|
-
case "InternalServerException":
|
|
481
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
482
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
483
|
-
case "InvalidParameterValueException":
|
|
484
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
485
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
486
|
-
case "TooManyRequestsException":
|
|
487
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
488
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
489
|
-
default:
|
|
490
|
-
const parsedBody = parsedOutput.body;
|
|
491
|
-
return throwDefaultError({
|
|
492
|
-
output,
|
|
493
|
-
parsedBody,
|
|
494
|
-
errorCode,
|
|
495
|
-
});
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
234
|
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
499
235
|
if (output.statusCode >= 300) {
|
|
500
|
-
return
|
|
236
|
+
return de_CommandError(output, context);
|
|
501
237
|
}
|
|
502
238
|
const data = await parseBody(output.body, context);
|
|
503
239
|
let contents = {};
|
|
@@ -505,75 +241,25 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
505
241
|
const response = {
|
|
506
242
|
$metadata: deserializeMetadata(output),
|
|
507
243
|
...contents,
|
|
508
|
-
};
|
|
509
|
-
return response;
|
|
510
|
-
};
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
body: await parseErrorBody(output.body, context),
|
|
515
|
-
};
|
|
516
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
517
|
-
switch (errorCode) {
|
|
518
|
-
case "InternalServerException":
|
|
519
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
520
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
521
|
-
case "InvalidParameterValueException":
|
|
522
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
523
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
524
|
-
case "ResourceNotFoundException":
|
|
525
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
526
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
527
|
-
default:
|
|
528
|
-
const parsedBody = parsedOutput.body;
|
|
529
|
-
return throwDefaultError({
|
|
530
|
-
output,
|
|
531
|
-
parsedBody,
|
|
532
|
-
errorCode,
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
};
|
|
536
|
-
export const de_ListTerminologiesCommand = async (output, context) => {
|
|
537
|
-
if (output.statusCode >= 300) {
|
|
538
|
-
return de_ListTerminologiesCommandError(output, context);
|
|
539
|
-
}
|
|
540
|
-
const data = await parseBody(output.body, context);
|
|
541
|
-
let contents = {};
|
|
542
|
-
contents = de_ListTerminologiesResponse(data, context);
|
|
543
|
-
const response = {
|
|
544
|
-
$metadata: deserializeMetadata(output),
|
|
545
|
-
...contents,
|
|
546
|
-
};
|
|
547
|
-
return response;
|
|
548
|
-
};
|
|
549
|
-
const de_ListTerminologiesCommandError = async (output, context) => {
|
|
550
|
-
const parsedOutput = {
|
|
551
|
-
...output,
|
|
552
|
-
body: await parseErrorBody(output.body, context),
|
|
553
|
-
};
|
|
554
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
555
|
-
switch (errorCode) {
|
|
556
|
-
case "InternalServerException":
|
|
557
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
558
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
559
|
-
case "InvalidParameterValueException":
|
|
560
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
561
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
562
|
-
case "TooManyRequestsException":
|
|
563
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
564
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
565
|
-
default:
|
|
566
|
-
const parsedBody = parsedOutput.body;
|
|
567
|
-
return throwDefaultError({
|
|
568
|
-
output,
|
|
569
|
-
parsedBody,
|
|
570
|
-
errorCode,
|
|
571
|
-
});
|
|
244
|
+
};
|
|
245
|
+
return response;
|
|
246
|
+
};
|
|
247
|
+
export const de_ListTerminologiesCommand = async (output, context) => {
|
|
248
|
+
if (output.statusCode >= 300) {
|
|
249
|
+
return de_CommandError(output, context);
|
|
572
250
|
}
|
|
251
|
+
const data = await parseBody(output.body, context);
|
|
252
|
+
let contents = {};
|
|
253
|
+
contents = de_ListTerminologiesResponse(data, context);
|
|
254
|
+
const response = {
|
|
255
|
+
$metadata: deserializeMetadata(output),
|
|
256
|
+
...contents,
|
|
257
|
+
};
|
|
258
|
+
return response;
|
|
573
259
|
};
|
|
574
260
|
export const de_ListTextTranslationJobsCommand = async (output, context) => {
|
|
575
261
|
if (output.statusCode >= 300) {
|
|
576
|
-
return
|
|
262
|
+
return de_CommandError(output, context);
|
|
577
263
|
}
|
|
578
264
|
const data = await parseBody(output.body, context);
|
|
579
265
|
let contents = {};
|
|
@@ -584,37 +270,9 @@ export const de_ListTextTranslationJobsCommand = async (output, context) => {
|
|
|
584
270
|
};
|
|
585
271
|
return response;
|
|
586
272
|
};
|
|
587
|
-
const de_ListTextTranslationJobsCommandError = async (output, context) => {
|
|
588
|
-
const parsedOutput = {
|
|
589
|
-
...output,
|
|
590
|
-
body: await parseErrorBody(output.body, context),
|
|
591
|
-
};
|
|
592
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
593
|
-
switch (errorCode) {
|
|
594
|
-
case "InternalServerException":
|
|
595
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
596
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
597
|
-
case "InvalidFilterException":
|
|
598
|
-
case "com.amazonaws.translate#InvalidFilterException":
|
|
599
|
-
throw await de_InvalidFilterExceptionRes(parsedOutput, context);
|
|
600
|
-
case "InvalidRequestException":
|
|
601
|
-
case "com.amazonaws.translate#InvalidRequestException":
|
|
602
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
603
|
-
case "TooManyRequestsException":
|
|
604
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
605
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
606
|
-
default:
|
|
607
|
-
const parsedBody = parsedOutput.body;
|
|
608
|
-
return throwDefaultError({
|
|
609
|
-
output,
|
|
610
|
-
parsedBody,
|
|
611
|
-
errorCode,
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
};
|
|
615
273
|
export const de_StartTextTranslationJobCommand = async (output, context) => {
|
|
616
274
|
if (output.statusCode >= 300) {
|
|
617
|
-
return
|
|
275
|
+
return de_CommandError(output, context);
|
|
618
276
|
}
|
|
619
277
|
const data = await parseBody(output.body, context);
|
|
620
278
|
let contents = {};
|
|
@@ -625,43 +283,9 @@ export const de_StartTextTranslationJobCommand = async (output, context) => {
|
|
|
625
283
|
};
|
|
626
284
|
return response;
|
|
627
285
|
};
|
|
628
|
-
const de_StartTextTranslationJobCommandError = async (output, context) => {
|
|
629
|
-
const parsedOutput = {
|
|
630
|
-
...output,
|
|
631
|
-
body: await parseErrorBody(output.body, context),
|
|
632
|
-
};
|
|
633
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
634
|
-
switch (errorCode) {
|
|
635
|
-
case "InternalServerException":
|
|
636
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
637
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
638
|
-
case "InvalidParameterValueException":
|
|
639
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
640
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
641
|
-
case "InvalidRequestException":
|
|
642
|
-
case "com.amazonaws.translate#InvalidRequestException":
|
|
643
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
644
|
-
case "ResourceNotFoundException":
|
|
645
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
646
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
647
|
-
case "TooManyRequestsException":
|
|
648
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
649
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
650
|
-
case "UnsupportedLanguagePairException":
|
|
651
|
-
case "com.amazonaws.translate#UnsupportedLanguagePairException":
|
|
652
|
-
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
653
|
-
default:
|
|
654
|
-
const parsedBody = parsedOutput.body;
|
|
655
|
-
return throwDefaultError({
|
|
656
|
-
output,
|
|
657
|
-
parsedBody,
|
|
658
|
-
errorCode,
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
286
|
export const de_StopTextTranslationJobCommand = async (output, context) => {
|
|
663
287
|
if (output.statusCode >= 300) {
|
|
664
|
-
return
|
|
288
|
+
return de_CommandError(output, context);
|
|
665
289
|
}
|
|
666
290
|
const data = await parseBody(output.body, context);
|
|
667
291
|
let contents = {};
|
|
@@ -672,34 +296,9 @@ export const de_StopTextTranslationJobCommand = async (output, context) => {
|
|
|
672
296
|
};
|
|
673
297
|
return response;
|
|
674
298
|
};
|
|
675
|
-
const de_StopTextTranslationJobCommandError = async (output, context) => {
|
|
676
|
-
const parsedOutput = {
|
|
677
|
-
...output,
|
|
678
|
-
body: await parseErrorBody(output.body, context),
|
|
679
|
-
};
|
|
680
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
681
|
-
switch (errorCode) {
|
|
682
|
-
case "InternalServerException":
|
|
683
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
684
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
685
|
-
case "ResourceNotFoundException":
|
|
686
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
687
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
688
|
-
case "TooManyRequestsException":
|
|
689
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
690
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
691
|
-
default:
|
|
692
|
-
const parsedBody = parsedOutput.body;
|
|
693
|
-
return throwDefaultError({
|
|
694
|
-
output,
|
|
695
|
-
parsedBody,
|
|
696
|
-
errorCode,
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
};
|
|
700
299
|
export const de_TagResourceCommand = async (output, context) => {
|
|
701
300
|
if (output.statusCode >= 300) {
|
|
702
|
-
return
|
|
301
|
+
return de_CommandError(output, context);
|
|
703
302
|
}
|
|
704
303
|
const data = await parseBody(output.body, context);
|
|
705
304
|
let contents = {};
|
|
@@ -710,40 +309,9 @@ export const de_TagResourceCommand = async (output, context) => {
|
|
|
710
309
|
};
|
|
711
310
|
return response;
|
|
712
311
|
};
|
|
713
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
714
|
-
const parsedOutput = {
|
|
715
|
-
...output,
|
|
716
|
-
body: await parseErrorBody(output.body, context),
|
|
717
|
-
};
|
|
718
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
719
|
-
switch (errorCode) {
|
|
720
|
-
case "ConcurrentModificationException":
|
|
721
|
-
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
722
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
723
|
-
case "InternalServerException":
|
|
724
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
725
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
726
|
-
case "InvalidParameterValueException":
|
|
727
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
728
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
729
|
-
case "ResourceNotFoundException":
|
|
730
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
731
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
732
|
-
case "TooManyTagsException":
|
|
733
|
-
case "com.amazonaws.translate#TooManyTagsException":
|
|
734
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
735
|
-
default:
|
|
736
|
-
const parsedBody = parsedOutput.body;
|
|
737
|
-
return throwDefaultError({
|
|
738
|
-
output,
|
|
739
|
-
parsedBody,
|
|
740
|
-
errorCode,
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
};
|
|
744
312
|
export const de_TranslateDocumentCommand = async (output, context) => {
|
|
745
313
|
if (output.statusCode >= 300) {
|
|
746
|
-
return
|
|
314
|
+
return de_CommandError(output, context);
|
|
747
315
|
}
|
|
748
316
|
const data = await parseBody(output.body, context);
|
|
749
317
|
let contents = {};
|
|
@@ -754,46 +322,9 @@ export const de_TranslateDocumentCommand = async (output, context) => {
|
|
|
754
322
|
};
|
|
755
323
|
return response;
|
|
756
324
|
};
|
|
757
|
-
const de_TranslateDocumentCommandError = async (output, context) => {
|
|
758
|
-
const parsedOutput = {
|
|
759
|
-
...output,
|
|
760
|
-
body: await parseErrorBody(output.body, context),
|
|
761
|
-
};
|
|
762
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
763
|
-
switch (errorCode) {
|
|
764
|
-
case "InternalServerException":
|
|
765
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
766
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
767
|
-
case "InvalidRequestException":
|
|
768
|
-
case "com.amazonaws.translate#InvalidRequestException":
|
|
769
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
770
|
-
case "LimitExceededException":
|
|
771
|
-
case "com.amazonaws.translate#LimitExceededException":
|
|
772
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
773
|
-
case "ResourceNotFoundException":
|
|
774
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
775
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
776
|
-
case "ServiceUnavailableException":
|
|
777
|
-
case "com.amazonaws.translate#ServiceUnavailableException":
|
|
778
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
779
|
-
case "TooManyRequestsException":
|
|
780
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
781
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
782
|
-
case "UnsupportedLanguagePairException":
|
|
783
|
-
case "com.amazonaws.translate#UnsupportedLanguagePairException":
|
|
784
|
-
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
785
|
-
default:
|
|
786
|
-
const parsedBody = parsedOutput.body;
|
|
787
|
-
return throwDefaultError({
|
|
788
|
-
output,
|
|
789
|
-
parsedBody,
|
|
790
|
-
errorCode,
|
|
791
|
-
});
|
|
792
|
-
}
|
|
793
|
-
};
|
|
794
325
|
export const de_TranslateTextCommand = async (output, context) => {
|
|
795
326
|
if (output.statusCode >= 300) {
|
|
796
|
-
return
|
|
327
|
+
return de_CommandError(output, context);
|
|
797
328
|
}
|
|
798
329
|
const data = await parseBody(output.body, context);
|
|
799
330
|
let contents = {};
|
|
@@ -804,49 +335,9 @@ export const de_TranslateTextCommand = async (output, context) => {
|
|
|
804
335
|
};
|
|
805
336
|
return response;
|
|
806
337
|
};
|
|
807
|
-
const de_TranslateTextCommandError = async (output, context) => {
|
|
808
|
-
const parsedOutput = {
|
|
809
|
-
...output,
|
|
810
|
-
body: await parseErrorBody(output.body, context),
|
|
811
|
-
};
|
|
812
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
813
|
-
switch (errorCode) {
|
|
814
|
-
case "DetectedLanguageLowConfidenceException":
|
|
815
|
-
case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
|
|
816
|
-
throw await de_DetectedLanguageLowConfidenceExceptionRes(parsedOutput, context);
|
|
817
|
-
case "InternalServerException":
|
|
818
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
819
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
820
|
-
case "InvalidRequestException":
|
|
821
|
-
case "com.amazonaws.translate#InvalidRequestException":
|
|
822
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
823
|
-
case "ResourceNotFoundException":
|
|
824
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
825
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
826
|
-
case "ServiceUnavailableException":
|
|
827
|
-
case "com.amazonaws.translate#ServiceUnavailableException":
|
|
828
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
829
|
-
case "TextSizeLimitExceededException":
|
|
830
|
-
case "com.amazonaws.translate#TextSizeLimitExceededException":
|
|
831
|
-
throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
|
|
832
|
-
case "TooManyRequestsException":
|
|
833
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
834
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
835
|
-
case "UnsupportedLanguagePairException":
|
|
836
|
-
case "com.amazonaws.translate#UnsupportedLanguagePairException":
|
|
837
|
-
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
838
|
-
default:
|
|
839
|
-
const parsedBody = parsedOutput.body;
|
|
840
|
-
return throwDefaultError({
|
|
841
|
-
output,
|
|
842
|
-
parsedBody,
|
|
843
|
-
errorCode,
|
|
844
|
-
});
|
|
845
|
-
}
|
|
846
|
-
};
|
|
847
338
|
export const de_UntagResourceCommand = async (output, context) => {
|
|
848
339
|
if (output.statusCode >= 300) {
|
|
849
|
-
return
|
|
340
|
+
return de_CommandError(output, context);
|
|
850
341
|
}
|
|
851
342
|
const data = await parseBody(output.body, context);
|
|
852
343
|
let contents = {};
|
|
@@ -857,37 +348,9 @@ export const de_UntagResourceCommand = async (output, context) => {
|
|
|
857
348
|
};
|
|
858
349
|
return response;
|
|
859
350
|
};
|
|
860
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
861
|
-
const parsedOutput = {
|
|
862
|
-
...output,
|
|
863
|
-
body: await parseErrorBody(output.body, context),
|
|
864
|
-
};
|
|
865
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
866
|
-
switch (errorCode) {
|
|
867
|
-
case "ConcurrentModificationException":
|
|
868
|
-
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
869
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
870
|
-
case "InternalServerException":
|
|
871
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
872
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
873
|
-
case "InvalidParameterValueException":
|
|
874
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
875
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
876
|
-
case "ResourceNotFoundException":
|
|
877
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
878
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
879
|
-
default:
|
|
880
|
-
const parsedBody = parsedOutput.body;
|
|
881
|
-
return throwDefaultError({
|
|
882
|
-
output,
|
|
883
|
-
parsedBody,
|
|
884
|
-
errorCode,
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
};
|
|
888
351
|
export const de_UpdateParallelDataCommand = async (output, context) => {
|
|
889
352
|
if (output.statusCode >= 300) {
|
|
890
|
-
return
|
|
353
|
+
return de_CommandError(output, context);
|
|
891
354
|
}
|
|
892
355
|
const data = await parseBody(output.body, context);
|
|
893
356
|
let contents = {};
|
|
@@ -898,7 +361,7 @@ export const de_UpdateParallelDataCommand = async (output, context) => {
|
|
|
898
361
|
};
|
|
899
362
|
return response;
|
|
900
363
|
};
|
|
901
|
-
const
|
|
364
|
+
const de_CommandError = async (output, context) => {
|
|
902
365
|
const parsedOutput = {
|
|
903
366
|
...output,
|
|
904
367
|
body: await parseErrorBody(output.body, context),
|
|
@@ -923,12 +386,33 @@ const de_UpdateParallelDataCommandError = async (output, context) => {
|
|
|
923
386
|
case "LimitExceededException":
|
|
924
387
|
case "com.amazonaws.translate#LimitExceededException":
|
|
925
388
|
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
926
|
-
case "ResourceNotFoundException":
|
|
927
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
928
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
929
389
|
case "TooManyRequestsException":
|
|
930
390
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
931
391
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
392
|
+
case "TooManyTagsException":
|
|
393
|
+
case "com.amazonaws.translate#TooManyTagsException":
|
|
394
|
+
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
395
|
+
case "ResourceNotFoundException":
|
|
396
|
+
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
397
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
398
|
+
case "UnsupportedDisplayLanguageCodeException":
|
|
399
|
+
case "com.amazonaws.translate#UnsupportedDisplayLanguageCodeException":
|
|
400
|
+
throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context);
|
|
401
|
+
case "InvalidFilterException":
|
|
402
|
+
case "com.amazonaws.translate#InvalidFilterException":
|
|
403
|
+
throw await de_InvalidFilterExceptionRes(parsedOutput, context);
|
|
404
|
+
case "UnsupportedLanguagePairException":
|
|
405
|
+
case "com.amazonaws.translate#UnsupportedLanguagePairException":
|
|
406
|
+
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
407
|
+
case "ServiceUnavailableException":
|
|
408
|
+
case "com.amazonaws.translate#ServiceUnavailableException":
|
|
409
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
410
|
+
case "DetectedLanguageLowConfidenceException":
|
|
411
|
+
case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
|
|
412
|
+
throw await de_DetectedLanguageLowConfidenceExceptionRes(parsedOutput, context);
|
|
413
|
+
case "TextSizeLimitExceededException":
|
|
414
|
+
case "com.amazonaws.translate#TextSizeLimitExceededException":
|
|
415
|
+
throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
|
|
932
416
|
default:
|
|
933
417
|
const parsedBody = parsedOutput.body;
|
|
934
418
|
return throwDefaultError({
|