@aws-sdk/client-translate 3.310.0 → 3.315.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/protocols/Aws_json1_1.js +232 -775
- package/dist-es/protocols/Aws_json1_1.js +233 -776
- package/package.json +6 -6
|
@@ -7,180 +7,126 @@ const uuid_1 = require("uuid");
|
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const TranslateServiceException_1 = require("../models/TranslateServiceException");
|
|
9
9
|
const se_CreateParallelDataCommand = async (input, context) => {
|
|
10
|
-
const headers =
|
|
11
|
-
"content-type": "application/x-amz-json-1.1",
|
|
12
|
-
"x-amz-target": "AWSShineFrontendService_20170701.CreateParallelData",
|
|
13
|
-
};
|
|
10
|
+
const headers = sharedHeaders("CreateParallelData");
|
|
14
11
|
let body;
|
|
15
12
|
body = JSON.stringify(se_CreateParallelDataRequest(input, context));
|
|
16
13
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
14
|
};
|
|
18
15
|
exports.se_CreateParallelDataCommand = se_CreateParallelDataCommand;
|
|
19
16
|
const se_DeleteParallelDataCommand = async (input, context) => {
|
|
20
|
-
const headers =
|
|
21
|
-
"content-type": "application/x-amz-json-1.1",
|
|
22
|
-
"x-amz-target": "AWSShineFrontendService_20170701.DeleteParallelData",
|
|
23
|
-
};
|
|
17
|
+
const headers = sharedHeaders("DeleteParallelData");
|
|
24
18
|
let body;
|
|
25
|
-
body = JSON.stringify(
|
|
19
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
26
20
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
21
|
};
|
|
28
22
|
exports.se_DeleteParallelDataCommand = se_DeleteParallelDataCommand;
|
|
29
23
|
const se_DeleteTerminologyCommand = async (input, context) => {
|
|
30
|
-
const headers =
|
|
31
|
-
"content-type": "application/x-amz-json-1.1",
|
|
32
|
-
"x-amz-target": "AWSShineFrontendService_20170701.DeleteTerminology",
|
|
33
|
-
};
|
|
24
|
+
const headers = sharedHeaders("DeleteTerminology");
|
|
34
25
|
let body;
|
|
35
|
-
body = JSON.stringify(
|
|
26
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
36
27
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
37
28
|
};
|
|
38
29
|
exports.se_DeleteTerminologyCommand = se_DeleteTerminologyCommand;
|
|
39
30
|
const se_DescribeTextTranslationJobCommand = async (input, context) => {
|
|
40
|
-
const headers =
|
|
41
|
-
"content-type": "application/x-amz-json-1.1",
|
|
42
|
-
"x-amz-target": "AWSShineFrontendService_20170701.DescribeTextTranslationJob",
|
|
43
|
-
};
|
|
31
|
+
const headers = sharedHeaders("DescribeTextTranslationJob");
|
|
44
32
|
let body;
|
|
45
|
-
body = JSON.stringify(
|
|
33
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
46
34
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
47
35
|
};
|
|
48
36
|
exports.se_DescribeTextTranslationJobCommand = se_DescribeTextTranslationJobCommand;
|
|
49
37
|
const se_GetParallelDataCommand = async (input, context) => {
|
|
50
|
-
const headers =
|
|
51
|
-
"content-type": "application/x-amz-json-1.1",
|
|
52
|
-
"x-amz-target": "AWSShineFrontendService_20170701.GetParallelData",
|
|
53
|
-
};
|
|
38
|
+
const headers = sharedHeaders("GetParallelData");
|
|
54
39
|
let body;
|
|
55
|
-
body = JSON.stringify(
|
|
40
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
56
41
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
42
|
};
|
|
58
43
|
exports.se_GetParallelDataCommand = se_GetParallelDataCommand;
|
|
59
44
|
const se_GetTerminologyCommand = async (input, context) => {
|
|
60
|
-
const headers =
|
|
61
|
-
"content-type": "application/x-amz-json-1.1",
|
|
62
|
-
"x-amz-target": "AWSShineFrontendService_20170701.GetTerminology",
|
|
63
|
-
};
|
|
45
|
+
const headers = sharedHeaders("GetTerminology");
|
|
64
46
|
let body;
|
|
65
|
-
body = JSON.stringify(
|
|
47
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
66
48
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
49
|
};
|
|
68
50
|
exports.se_GetTerminologyCommand = se_GetTerminologyCommand;
|
|
69
51
|
const se_ImportTerminologyCommand = async (input, context) => {
|
|
70
|
-
const headers =
|
|
71
|
-
"content-type": "application/x-amz-json-1.1",
|
|
72
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ImportTerminology",
|
|
73
|
-
};
|
|
52
|
+
const headers = sharedHeaders("ImportTerminology");
|
|
74
53
|
let body;
|
|
75
54
|
body = JSON.stringify(se_ImportTerminologyRequest(input, context));
|
|
76
55
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
56
|
};
|
|
78
57
|
exports.se_ImportTerminologyCommand = se_ImportTerminologyCommand;
|
|
79
58
|
const se_ListLanguagesCommand = async (input, context) => {
|
|
80
|
-
const headers =
|
|
81
|
-
"content-type": "application/x-amz-json-1.1",
|
|
82
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListLanguages",
|
|
83
|
-
};
|
|
59
|
+
const headers = sharedHeaders("ListLanguages");
|
|
84
60
|
let body;
|
|
85
|
-
body = JSON.stringify(
|
|
61
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
86
62
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
87
63
|
};
|
|
88
64
|
exports.se_ListLanguagesCommand = se_ListLanguagesCommand;
|
|
89
65
|
const se_ListParallelDataCommand = async (input, context) => {
|
|
90
|
-
const headers =
|
|
91
|
-
"content-type": "application/x-amz-json-1.1",
|
|
92
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListParallelData",
|
|
93
|
-
};
|
|
66
|
+
const headers = sharedHeaders("ListParallelData");
|
|
94
67
|
let body;
|
|
95
|
-
body = JSON.stringify(
|
|
68
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
96
69
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
70
|
};
|
|
98
71
|
exports.se_ListParallelDataCommand = se_ListParallelDataCommand;
|
|
99
72
|
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
100
|
-
const headers =
|
|
101
|
-
"content-type": "application/x-amz-json-1.1",
|
|
102
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListTagsForResource",
|
|
103
|
-
};
|
|
73
|
+
const headers = sharedHeaders("ListTagsForResource");
|
|
104
74
|
let body;
|
|
105
|
-
body = JSON.stringify(
|
|
75
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
106
76
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
107
77
|
};
|
|
108
78
|
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
109
79
|
const se_ListTerminologiesCommand = async (input, context) => {
|
|
110
|
-
const headers =
|
|
111
|
-
"content-type": "application/x-amz-json-1.1",
|
|
112
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListTerminologies",
|
|
113
|
-
};
|
|
80
|
+
const headers = sharedHeaders("ListTerminologies");
|
|
114
81
|
let body;
|
|
115
|
-
body = JSON.stringify(
|
|
82
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
116
83
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
117
84
|
};
|
|
118
85
|
exports.se_ListTerminologiesCommand = se_ListTerminologiesCommand;
|
|
119
86
|
const se_ListTextTranslationJobsCommand = async (input, context) => {
|
|
120
|
-
const headers =
|
|
121
|
-
"content-type": "application/x-amz-json-1.1",
|
|
122
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListTextTranslationJobs",
|
|
123
|
-
};
|
|
87
|
+
const headers = sharedHeaders("ListTextTranslationJobs");
|
|
124
88
|
let body;
|
|
125
89
|
body = JSON.stringify(se_ListTextTranslationJobsRequest(input, context));
|
|
126
90
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
127
91
|
};
|
|
128
92
|
exports.se_ListTextTranslationJobsCommand = se_ListTextTranslationJobsCommand;
|
|
129
93
|
const se_StartTextTranslationJobCommand = async (input, context) => {
|
|
130
|
-
const headers =
|
|
131
|
-
"content-type": "application/x-amz-json-1.1",
|
|
132
|
-
"x-amz-target": "AWSShineFrontendService_20170701.StartTextTranslationJob",
|
|
133
|
-
};
|
|
94
|
+
const headers = sharedHeaders("StartTextTranslationJob");
|
|
134
95
|
let body;
|
|
135
96
|
body = JSON.stringify(se_StartTextTranslationJobRequest(input, context));
|
|
136
97
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
137
98
|
};
|
|
138
99
|
exports.se_StartTextTranslationJobCommand = se_StartTextTranslationJobCommand;
|
|
139
100
|
const se_StopTextTranslationJobCommand = async (input, context) => {
|
|
140
|
-
const headers =
|
|
141
|
-
"content-type": "application/x-amz-json-1.1",
|
|
142
|
-
"x-amz-target": "AWSShineFrontendService_20170701.StopTextTranslationJob",
|
|
143
|
-
};
|
|
101
|
+
const headers = sharedHeaders("StopTextTranslationJob");
|
|
144
102
|
let body;
|
|
145
|
-
body = JSON.stringify(
|
|
103
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
146
104
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
147
105
|
};
|
|
148
106
|
exports.se_StopTextTranslationJobCommand = se_StopTextTranslationJobCommand;
|
|
149
107
|
const se_TagResourceCommand = async (input, context) => {
|
|
150
|
-
const headers =
|
|
151
|
-
"content-type": "application/x-amz-json-1.1",
|
|
152
|
-
"x-amz-target": "AWSShineFrontendService_20170701.TagResource",
|
|
153
|
-
};
|
|
108
|
+
const headers = sharedHeaders("TagResource");
|
|
154
109
|
let body;
|
|
155
|
-
body = JSON.stringify(
|
|
110
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
156
111
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
157
112
|
};
|
|
158
113
|
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
159
114
|
const se_TranslateTextCommand = async (input, context) => {
|
|
160
|
-
const headers =
|
|
161
|
-
"content-type": "application/x-amz-json-1.1",
|
|
162
|
-
"x-amz-target": "AWSShineFrontendService_20170701.TranslateText",
|
|
163
|
-
};
|
|
115
|
+
const headers = sharedHeaders("TranslateText");
|
|
164
116
|
let body;
|
|
165
|
-
body = JSON.stringify(
|
|
117
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
166
118
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
167
119
|
};
|
|
168
120
|
exports.se_TranslateTextCommand = se_TranslateTextCommand;
|
|
169
121
|
const se_UntagResourceCommand = async (input, context) => {
|
|
170
|
-
const headers =
|
|
171
|
-
"content-type": "application/x-amz-json-1.1",
|
|
172
|
-
"x-amz-target": "AWSShineFrontendService_20170701.UntagResource",
|
|
173
|
-
};
|
|
122
|
+
const headers = sharedHeaders("UntagResource");
|
|
174
123
|
let body;
|
|
175
|
-
body = JSON.stringify(
|
|
124
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
176
125
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
177
126
|
};
|
|
178
127
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
179
128
|
const se_UpdateParallelDataCommand = async (input, context) => {
|
|
180
|
-
const headers =
|
|
181
|
-
"content-type": "application/x-amz-json-1.1",
|
|
182
|
-
"x-amz-target": "AWSShineFrontendService_20170701.UpdateParallelData",
|
|
183
|
-
};
|
|
129
|
+
const headers = sharedHeaders("UpdateParallelData");
|
|
184
130
|
let body;
|
|
185
131
|
body = JSON.stringify(se_UpdateParallelDataRequest(input, context));
|
|
186
132
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
@@ -192,12 +138,12 @@ const de_CreateParallelDataCommand = async (output, context) => {
|
|
|
192
138
|
}
|
|
193
139
|
const data = await parseBody(output.body, context);
|
|
194
140
|
let contents = {};
|
|
195
|
-
contents =
|
|
141
|
+
contents = (0, smithy_client_1._json)(data);
|
|
196
142
|
const response = {
|
|
197
143
|
$metadata: deserializeMetadata(output),
|
|
198
144
|
...contents,
|
|
199
145
|
};
|
|
200
|
-
return
|
|
146
|
+
return response;
|
|
201
147
|
};
|
|
202
148
|
exports.de_CreateParallelDataCommand = de_CreateParallelDataCommand;
|
|
203
149
|
const de_CreateParallelDataCommandError = async (output, context) => {
|
|
@@ -233,10 +179,9 @@ const de_CreateParallelDataCommandError = async (output, context) => {
|
|
|
233
179
|
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
234
180
|
default:
|
|
235
181
|
const parsedBody = parsedOutput.body;
|
|
236
|
-
|
|
182
|
+
return throwDefaultError({
|
|
237
183
|
output,
|
|
238
184
|
parsedBody,
|
|
239
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
240
185
|
errorCode,
|
|
241
186
|
});
|
|
242
187
|
}
|
|
@@ -247,12 +192,12 @@ const de_DeleteParallelDataCommand = async (output, context) => {
|
|
|
247
192
|
}
|
|
248
193
|
const data = await parseBody(output.body, context);
|
|
249
194
|
let contents = {};
|
|
250
|
-
contents =
|
|
195
|
+
contents = (0, smithy_client_1._json)(data);
|
|
251
196
|
const response = {
|
|
252
197
|
$metadata: deserializeMetadata(output),
|
|
253
198
|
...contents,
|
|
254
199
|
};
|
|
255
|
-
return
|
|
200
|
+
return response;
|
|
256
201
|
};
|
|
257
202
|
exports.de_DeleteParallelDataCommand = de_DeleteParallelDataCommand;
|
|
258
203
|
const de_DeleteParallelDataCommandError = async (output, context) => {
|
|
@@ -276,10 +221,9 @@ const de_DeleteParallelDataCommandError = async (output, context) => {
|
|
|
276
221
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
277
222
|
default:
|
|
278
223
|
const parsedBody = parsedOutput.body;
|
|
279
|
-
|
|
224
|
+
return throwDefaultError({
|
|
280
225
|
output,
|
|
281
226
|
parsedBody,
|
|
282
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
283
227
|
errorCode,
|
|
284
228
|
});
|
|
285
229
|
}
|
|
@@ -292,7 +236,7 @@ const de_DeleteTerminologyCommand = async (output, context) => {
|
|
|
292
236
|
const response = {
|
|
293
237
|
$metadata: deserializeMetadata(output),
|
|
294
238
|
};
|
|
295
|
-
return
|
|
239
|
+
return response;
|
|
296
240
|
};
|
|
297
241
|
exports.de_DeleteTerminologyCommand = de_DeleteTerminologyCommand;
|
|
298
242
|
const de_DeleteTerminologyCommandError = async (output, context) => {
|
|
@@ -316,10 +260,9 @@ const de_DeleteTerminologyCommandError = async (output, context) => {
|
|
|
316
260
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
317
261
|
default:
|
|
318
262
|
const parsedBody = parsedOutput.body;
|
|
319
|
-
|
|
263
|
+
return throwDefaultError({
|
|
320
264
|
output,
|
|
321
265
|
parsedBody,
|
|
322
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
323
266
|
errorCode,
|
|
324
267
|
});
|
|
325
268
|
}
|
|
@@ -335,7 +278,7 @@ const de_DescribeTextTranslationJobCommand = async (output, context) => {
|
|
|
335
278
|
$metadata: deserializeMetadata(output),
|
|
336
279
|
...contents,
|
|
337
280
|
};
|
|
338
|
-
return
|
|
281
|
+
return response;
|
|
339
282
|
};
|
|
340
283
|
exports.de_DescribeTextTranslationJobCommand = de_DescribeTextTranslationJobCommand;
|
|
341
284
|
const de_DescribeTextTranslationJobCommandError = async (output, context) => {
|
|
@@ -356,10 +299,9 @@ const de_DescribeTextTranslationJobCommandError = async (output, context) => {
|
|
|
356
299
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
357
300
|
default:
|
|
358
301
|
const parsedBody = parsedOutput.body;
|
|
359
|
-
|
|
302
|
+
return throwDefaultError({
|
|
360
303
|
output,
|
|
361
304
|
parsedBody,
|
|
362
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
363
305
|
errorCode,
|
|
364
306
|
});
|
|
365
307
|
}
|
|
@@ -375,7 +317,7 @@ const de_GetParallelDataCommand = async (output, context) => {
|
|
|
375
317
|
$metadata: deserializeMetadata(output),
|
|
376
318
|
...contents,
|
|
377
319
|
};
|
|
378
|
-
return
|
|
320
|
+
return response;
|
|
379
321
|
};
|
|
380
322
|
exports.de_GetParallelDataCommand = de_GetParallelDataCommand;
|
|
381
323
|
const de_GetParallelDataCommandError = async (output, context) => {
|
|
@@ -399,10 +341,9 @@ const de_GetParallelDataCommandError = async (output, context) => {
|
|
|
399
341
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
400
342
|
default:
|
|
401
343
|
const parsedBody = parsedOutput.body;
|
|
402
|
-
|
|
344
|
+
return throwDefaultError({
|
|
403
345
|
output,
|
|
404
346
|
parsedBody,
|
|
405
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
406
347
|
errorCode,
|
|
407
348
|
});
|
|
408
349
|
}
|
|
@@ -418,7 +359,7 @@ const de_GetTerminologyCommand = async (output, context) => {
|
|
|
418
359
|
$metadata: deserializeMetadata(output),
|
|
419
360
|
...contents,
|
|
420
361
|
};
|
|
421
|
-
return
|
|
362
|
+
return response;
|
|
422
363
|
};
|
|
423
364
|
exports.de_GetTerminologyCommand = de_GetTerminologyCommand;
|
|
424
365
|
const de_GetTerminologyCommandError = async (output, context) => {
|
|
@@ -442,10 +383,9 @@ const de_GetTerminologyCommandError = async (output, context) => {
|
|
|
442
383
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
443
384
|
default:
|
|
444
385
|
const parsedBody = parsedOutput.body;
|
|
445
|
-
|
|
386
|
+
return throwDefaultError({
|
|
446
387
|
output,
|
|
447
388
|
parsedBody,
|
|
448
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
449
389
|
errorCode,
|
|
450
390
|
});
|
|
451
391
|
}
|
|
@@ -461,7 +401,7 @@ const de_ImportTerminologyCommand = async (output, context) => {
|
|
|
461
401
|
$metadata: deserializeMetadata(output),
|
|
462
402
|
...contents,
|
|
463
403
|
};
|
|
464
|
-
return
|
|
404
|
+
return response;
|
|
465
405
|
};
|
|
466
406
|
exports.de_ImportTerminologyCommand = de_ImportTerminologyCommand;
|
|
467
407
|
const de_ImportTerminologyCommandError = async (output, context) => {
|
|
@@ -491,10 +431,9 @@ const de_ImportTerminologyCommandError = async (output, context) => {
|
|
|
491
431
|
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
492
432
|
default:
|
|
493
433
|
const parsedBody = parsedOutput.body;
|
|
494
|
-
|
|
434
|
+
return throwDefaultError({
|
|
495
435
|
output,
|
|
496
436
|
parsedBody,
|
|
497
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
498
437
|
errorCode,
|
|
499
438
|
});
|
|
500
439
|
}
|
|
@@ -505,12 +444,12 @@ const de_ListLanguagesCommand = async (output, context) => {
|
|
|
505
444
|
}
|
|
506
445
|
const data = await parseBody(output.body, context);
|
|
507
446
|
let contents = {};
|
|
508
|
-
contents =
|
|
447
|
+
contents = (0, smithy_client_1._json)(data);
|
|
509
448
|
const response = {
|
|
510
449
|
$metadata: deserializeMetadata(output),
|
|
511
450
|
...contents,
|
|
512
451
|
};
|
|
513
|
-
return
|
|
452
|
+
return response;
|
|
514
453
|
};
|
|
515
454
|
exports.de_ListLanguagesCommand = de_ListLanguagesCommand;
|
|
516
455
|
const de_ListLanguagesCommandError = async (output, context) => {
|
|
@@ -534,10 +473,9 @@ const de_ListLanguagesCommandError = async (output, context) => {
|
|
|
534
473
|
throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context);
|
|
535
474
|
default:
|
|
536
475
|
const parsedBody = parsedOutput.body;
|
|
537
|
-
|
|
476
|
+
return throwDefaultError({
|
|
538
477
|
output,
|
|
539
478
|
parsedBody,
|
|
540
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
541
479
|
errorCode,
|
|
542
480
|
});
|
|
543
481
|
}
|
|
@@ -553,7 +491,7 @@ const de_ListParallelDataCommand = async (output, context) => {
|
|
|
553
491
|
$metadata: deserializeMetadata(output),
|
|
554
492
|
...contents,
|
|
555
493
|
};
|
|
556
|
-
return
|
|
494
|
+
return response;
|
|
557
495
|
};
|
|
558
496
|
exports.de_ListParallelDataCommand = de_ListParallelDataCommand;
|
|
559
497
|
const de_ListParallelDataCommandError = async (output, context) => {
|
|
@@ -574,10 +512,9 @@ const de_ListParallelDataCommandError = async (output, context) => {
|
|
|
574
512
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
575
513
|
default:
|
|
576
514
|
const parsedBody = parsedOutput.body;
|
|
577
|
-
|
|
515
|
+
return throwDefaultError({
|
|
578
516
|
output,
|
|
579
517
|
parsedBody,
|
|
580
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
581
518
|
errorCode,
|
|
582
519
|
});
|
|
583
520
|
}
|
|
@@ -588,12 +525,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
588
525
|
}
|
|
589
526
|
const data = await parseBody(output.body, context);
|
|
590
527
|
let contents = {};
|
|
591
|
-
contents =
|
|
528
|
+
contents = (0, smithy_client_1._json)(data);
|
|
592
529
|
const response = {
|
|
593
530
|
$metadata: deserializeMetadata(output),
|
|
594
531
|
...contents,
|
|
595
532
|
};
|
|
596
|
-
return
|
|
533
|
+
return response;
|
|
597
534
|
};
|
|
598
535
|
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
599
536
|
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
@@ -614,10 +551,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
|
614
551
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
615
552
|
default:
|
|
616
553
|
const parsedBody = parsedOutput.body;
|
|
617
|
-
|
|
554
|
+
return throwDefaultError({
|
|
618
555
|
output,
|
|
619
556
|
parsedBody,
|
|
620
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
621
557
|
errorCode,
|
|
622
558
|
});
|
|
623
559
|
}
|
|
@@ -633,7 +569,7 @@ const de_ListTerminologiesCommand = async (output, context) => {
|
|
|
633
569
|
$metadata: deserializeMetadata(output),
|
|
634
570
|
...contents,
|
|
635
571
|
};
|
|
636
|
-
return
|
|
572
|
+
return response;
|
|
637
573
|
};
|
|
638
574
|
exports.de_ListTerminologiesCommand = de_ListTerminologiesCommand;
|
|
639
575
|
const de_ListTerminologiesCommandError = async (output, context) => {
|
|
@@ -654,10 +590,9 @@ const de_ListTerminologiesCommandError = async (output, context) => {
|
|
|
654
590
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
655
591
|
default:
|
|
656
592
|
const parsedBody = parsedOutput.body;
|
|
657
|
-
|
|
593
|
+
return throwDefaultError({
|
|
658
594
|
output,
|
|
659
595
|
parsedBody,
|
|
660
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
661
596
|
errorCode,
|
|
662
597
|
});
|
|
663
598
|
}
|
|
@@ -673,7 +608,7 @@ const de_ListTextTranslationJobsCommand = async (output, context) => {
|
|
|
673
608
|
$metadata: deserializeMetadata(output),
|
|
674
609
|
...contents,
|
|
675
610
|
};
|
|
676
|
-
return
|
|
611
|
+
return response;
|
|
677
612
|
};
|
|
678
613
|
exports.de_ListTextTranslationJobsCommand = de_ListTextTranslationJobsCommand;
|
|
679
614
|
const de_ListTextTranslationJobsCommandError = async (output, context) => {
|
|
@@ -697,10 +632,9 @@ const de_ListTextTranslationJobsCommandError = async (output, context) => {
|
|
|
697
632
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
698
633
|
default:
|
|
699
634
|
const parsedBody = parsedOutput.body;
|
|
700
|
-
|
|
635
|
+
return throwDefaultError({
|
|
701
636
|
output,
|
|
702
637
|
parsedBody,
|
|
703
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
704
638
|
errorCode,
|
|
705
639
|
});
|
|
706
640
|
}
|
|
@@ -711,12 +645,12 @@ const de_StartTextTranslationJobCommand = async (output, context) => {
|
|
|
711
645
|
}
|
|
712
646
|
const data = await parseBody(output.body, context);
|
|
713
647
|
let contents = {};
|
|
714
|
-
contents =
|
|
648
|
+
contents = (0, smithy_client_1._json)(data);
|
|
715
649
|
const response = {
|
|
716
650
|
$metadata: deserializeMetadata(output),
|
|
717
651
|
...contents,
|
|
718
652
|
};
|
|
719
|
-
return
|
|
653
|
+
return response;
|
|
720
654
|
};
|
|
721
655
|
exports.de_StartTextTranslationJobCommand = de_StartTextTranslationJobCommand;
|
|
722
656
|
const de_StartTextTranslationJobCommandError = async (output, context) => {
|
|
@@ -746,10 +680,9 @@ const de_StartTextTranslationJobCommandError = async (output, context) => {
|
|
|
746
680
|
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
747
681
|
default:
|
|
748
682
|
const parsedBody = parsedOutput.body;
|
|
749
|
-
|
|
683
|
+
return throwDefaultError({
|
|
750
684
|
output,
|
|
751
685
|
parsedBody,
|
|
752
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
753
686
|
errorCode,
|
|
754
687
|
});
|
|
755
688
|
}
|
|
@@ -760,12 +693,12 @@ const de_StopTextTranslationJobCommand = async (output, context) => {
|
|
|
760
693
|
}
|
|
761
694
|
const data = await parseBody(output.body, context);
|
|
762
695
|
let contents = {};
|
|
763
|
-
contents =
|
|
696
|
+
contents = (0, smithy_client_1._json)(data);
|
|
764
697
|
const response = {
|
|
765
698
|
$metadata: deserializeMetadata(output),
|
|
766
699
|
...contents,
|
|
767
700
|
};
|
|
768
|
-
return
|
|
701
|
+
return response;
|
|
769
702
|
};
|
|
770
703
|
exports.de_StopTextTranslationJobCommand = de_StopTextTranslationJobCommand;
|
|
771
704
|
const de_StopTextTranslationJobCommandError = async (output, context) => {
|
|
@@ -786,10 +719,9 @@ const de_StopTextTranslationJobCommandError = async (output, context) => {
|
|
|
786
719
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
787
720
|
default:
|
|
788
721
|
const parsedBody = parsedOutput.body;
|
|
789
|
-
|
|
722
|
+
return throwDefaultError({
|
|
790
723
|
output,
|
|
791
724
|
parsedBody,
|
|
792
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
793
725
|
errorCode,
|
|
794
726
|
});
|
|
795
727
|
}
|
|
@@ -800,12 +732,12 @@ const de_TagResourceCommand = async (output, context) => {
|
|
|
800
732
|
}
|
|
801
733
|
const data = await parseBody(output.body, context);
|
|
802
734
|
let contents = {};
|
|
803
|
-
contents =
|
|
735
|
+
contents = (0, smithy_client_1._json)(data);
|
|
804
736
|
const response = {
|
|
805
737
|
$metadata: deserializeMetadata(output),
|
|
806
738
|
...contents,
|
|
807
739
|
};
|
|
808
|
-
return
|
|
740
|
+
return response;
|
|
809
741
|
};
|
|
810
742
|
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
811
743
|
const de_TagResourceCommandError = async (output, context) => {
|
|
@@ -832,10 +764,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
832
764
|
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
833
765
|
default:
|
|
834
766
|
const parsedBody = parsedOutput.body;
|
|
835
|
-
|
|
767
|
+
return throwDefaultError({
|
|
836
768
|
output,
|
|
837
769
|
parsedBody,
|
|
838
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
839
770
|
errorCode,
|
|
840
771
|
});
|
|
841
772
|
}
|
|
@@ -846,12 +777,12 @@ const de_TranslateTextCommand = async (output, context) => {
|
|
|
846
777
|
}
|
|
847
778
|
const data = await parseBody(output.body, context);
|
|
848
779
|
let contents = {};
|
|
849
|
-
contents =
|
|
780
|
+
contents = (0, smithy_client_1._json)(data);
|
|
850
781
|
const response = {
|
|
851
782
|
$metadata: deserializeMetadata(output),
|
|
852
783
|
...contents,
|
|
853
784
|
};
|
|
854
|
-
return
|
|
785
|
+
return response;
|
|
855
786
|
};
|
|
856
787
|
exports.de_TranslateTextCommand = de_TranslateTextCommand;
|
|
857
788
|
const de_TranslateTextCommandError = async (output, context) => {
|
|
@@ -887,10 +818,9 @@ const de_TranslateTextCommandError = async (output, context) => {
|
|
|
887
818
|
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
888
819
|
default:
|
|
889
820
|
const parsedBody = parsedOutput.body;
|
|
890
|
-
|
|
821
|
+
return throwDefaultError({
|
|
891
822
|
output,
|
|
892
823
|
parsedBody,
|
|
893
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
894
824
|
errorCode,
|
|
895
825
|
});
|
|
896
826
|
}
|
|
@@ -901,12 +831,12 @@ const de_UntagResourceCommand = async (output, context) => {
|
|
|
901
831
|
}
|
|
902
832
|
const data = await parseBody(output.body, context);
|
|
903
833
|
let contents = {};
|
|
904
|
-
contents =
|
|
834
|
+
contents = (0, smithy_client_1._json)(data);
|
|
905
835
|
const response = {
|
|
906
836
|
$metadata: deserializeMetadata(output),
|
|
907
837
|
...contents,
|
|
908
838
|
};
|
|
909
|
-
return
|
|
839
|
+
return response;
|
|
910
840
|
};
|
|
911
841
|
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
912
842
|
const de_UntagResourceCommandError = async (output, context) => {
|
|
@@ -930,10 +860,9 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
930
860
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
931
861
|
default:
|
|
932
862
|
const parsedBody = parsedOutput.body;
|
|
933
|
-
|
|
863
|
+
return throwDefaultError({
|
|
934
864
|
output,
|
|
935
865
|
parsedBody,
|
|
936
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
937
866
|
errorCode,
|
|
938
867
|
});
|
|
939
868
|
}
|
|
@@ -949,7 +878,7 @@ const de_UpdateParallelDataCommand = async (output, context) => {
|
|
|
949
878
|
$metadata: deserializeMetadata(output),
|
|
950
879
|
...contents,
|
|
951
880
|
};
|
|
952
|
-
return
|
|
881
|
+
return response;
|
|
953
882
|
};
|
|
954
883
|
exports.de_UpdateParallelDataCommand = de_UpdateParallelDataCommand;
|
|
955
884
|
const de_UpdateParallelDataCommandError = async (output, context) => {
|
|
@@ -985,17 +914,16 @@ const de_UpdateParallelDataCommandError = async (output, context) => {
|
|
|
985
914
|
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
986
915
|
default:
|
|
987
916
|
const parsedBody = parsedOutput.body;
|
|
988
|
-
|
|
917
|
+
return throwDefaultError({
|
|
989
918
|
output,
|
|
990
919
|
parsedBody,
|
|
991
|
-
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
992
920
|
errorCode,
|
|
993
921
|
});
|
|
994
922
|
}
|
|
995
923
|
};
|
|
996
924
|
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
997
925
|
const body = parsedOutput.body;
|
|
998
|
-
const deserialized =
|
|
926
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
999
927
|
const exception = new models_0_1.ConcurrentModificationException({
|
|
1000
928
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1001
929
|
...deserialized,
|
|
@@ -1004,7 +932,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
|
1004
932
|
};
|
|
1005
933
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1006
934
|
const body = parsedOutput.body;
|
|
1007
|
-
const deserialized =
|
|
935
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1008
936
|
const exception = new models_0_1.ConflictException({
|
|
1009
937
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1010
938
|
...deserialized,
|
|
@@ -1013,7 +941,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
1013
941
|
};
|
|
1014
942
|
const de_DetectedLanguageLowConfidenceExceptionRes = async (parsedOutput, context) => {
|
|
1015
943
|
const body = parsedOutput.body;
|
|
1016
|
-
const deserialized =
|
|
944
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1017
945
|
const exception = new models_0_1.DetectedLanguageLowConfidenceException({
|
|
1018
946
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1019
947
|
...deserialized,
|
|
@@ -1022,7 +950,7 @@ const de_DetectedLanguageLowConfidenceExceptionRes = async (parsedOutput, contex
|
|
|
1022
950
|
};
|
|
1023
951
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1024
952
|
const body = parsedOutput.body;
|
|
1025
|
-
const deserialized =
|
|
953
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1026
954
|
const exception = new models_0_1.InternalServerException({
|
|
1027
955
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1028
956
|
...deserialized,
|
|
@@ -1031,7 +959,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
1031
959
|
};
|
|
1032
960
|
const de_InvalidFilterExceptionRes = async (parsedOutput, context) => {
|
|
1033
961
|
const body = parsedOutput.body;
|
|
1034
|
-
const deserialized =
|
|
962
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1035
963
|
const exception = new models_0_1.InvalidFilterException({
|
|
1036
964
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1037
965
|
...deserialized,
|
|
@@ -1040,7 +968,7 @@ const de_InvalidFilterExceptionRes = async (parsedOutput, context) => {
|
|
|
1040
968
|
};
|
|
1041
969
|
const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
|
|
1042
970
|
const body = parsedOutput.body;
|
|
1043
|
-
const deserialized =
|
|
971
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1044
972
|
const exception = new models_0_1.InvalidParameterValueException({
|
|
1045
973
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1046
974
|
...deserialized,
|
|
@@ -1049,7 +977,7 @@ const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
|
|
|
1049
977
|
};
|
|
1050
978
|
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
1051
979
|
const body = parsedOutput.body;
|
|
1052
|
-
const deserialized =
|
|
980
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1053
981
|
const exception = new models_0_1.InvalidRequestException({
|
|
1054
982
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1055
983
|
...deserialized,
|
|
@@ -1058,7 +986,7 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
|
1058
986
|
};
|
|
1059
987
|
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
1060
988
|
const body = parsedOutput.body;
|
|
1061
|
-
const deserialized =
|
|
989
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1062
990
|
const exception = new models_0_1.LimitExceededException({
|
|
1063
991
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1064
992
|
...deserialized,
|
|
@@ -1067,7 +995,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
1067
995
|
};
|
|
1068
996
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1069
997
|
const body = parsedOutput.body;
|
|
1070
|
-
const deserialized =
|
|
998
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1071
999
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
1072
1000
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1073
1001
|
...deserialized,
|
|
@@ -1076,7 +1004,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
1076
1004
|
};
|
|
1077
1005
|
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
1078
1006
|
const body = parsedOutput.body;
|
|
1079
|
-
const deserialized =
|
|
1007
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1080
1008
|
const exception = new models_0_1.ServiceUnavailableException({
|
|
1081
1009
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1082
1010
|
...deserialized,
|
|
@@ -1085,7 +1013,7 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
|
1085
1013
|
};
|
|
1086
1014
|
const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
1087
1015
|
const body = parsedOutput.body;
|
|
1088
|
-
const deserialized =
|
|
1016
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1089
1017
|
const exception = new models_0_1.TextSizeLimitExceededException({
|
|
1090
1018
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1091
1019
|
...deserialized,
|
|
@@ -1094,7 +1022,7 @@ const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
1094
1022
|
};
|
|
1095
1023
|
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
1096
1024
|
const body = parsedOutput.body;
|
|
1097
|
-
const deserialized =
|
|
1025
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1098
1026
|
const exception = new models_0_1.TooManyRequestsException({
|
|
1099
1027
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1100
1028
|
...deserialized,
|
|
@@ -1103,7 +1031,7 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
|
1103
1031
|
};
|
|
1104
1032
|
const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
1105
1033
|
const body = parsedOutput.body;
|
|
1106
|
-
const deserialized =
|
|
1034
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1107
1035
|
const exception = new models_0_1.TooManyTagsException({
|
|
1108
1036
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1109
1037
|
...deserialized,
|
|
@@ -1112,7 +1040,7 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
|
1112
1040
|
};
|
|
1113
1041
|
const de_UnsupportedDisplayLanguageCodeExceptionRes = async (parsedOutput, context) => {
|
|
1114
1042
|
const body = parsedOutput.body;
|
|
1115
|
-
const deserialized =
|
|
1043
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1116
1044
|
const exception = new models_0_1.UnsupportedDisplayLanguageCodeException({
|
|
1117
1045
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1118
1046
|
...deserialized,
|
|
@@ -1121,7 +1049,7 @@ const de_UnsupportedDisplayLanguageCodeExceptionRes = async (parsedOutput, conte
|
|
|
1121
1049
|
};
|
|
1122
1050
|
const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) => {
|
|
1123
1051
|
const body = parsedOutput.body;
|
|
1124
|
-
const deserialized =
|
|
1052
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1125
1053
|
const exception = new models_0_1.UnsupportedLanguagePairException({
|
|
1126
1054
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1127
1055
|
...deserialized,
|
|
@@ -1129,680 +1057,202 @@ const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) =>
|
|
|
1129
1057
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1130
1058
|
};
|
|
1131
1059
|
const se_CreateParallelDataRequest = (input, context) => {
|
|
1132
|
-
return {
|
|
1133
|
-
ClientToken:
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
|
|
1141
|
-
};
|
|
1142
|
-
};
|
|
1143
|
-
const se_DeleteParallelDataRequest = (input, context) => {
|
|
1144
|
-
return {
|
|
1145
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1146
|
-
};
|
|
1147
|
-
};
|
|
1148
|
-
const se_DeleteTerminologyRequest = (input, context) => {
|
|
1149
|
-
return {
|
|
1150
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1151
|
-
};
|
|
1152
|
-
};
|
|
1153
|
-
const se_DescribeTextTranslationJobRequest = (input, context) => {
|
|
1154
|
-
return {
|
|
1155
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1156
|
-
};
|
|
1157
|
-
};
|
|
1158
|
-
const se_EncryptionKey = (input, context) => {
|
|
1159
|
-
return {
|
|
1160
|
-
...(input.Id != null && { Id: input.Id }),
|
|
1161
|
-
...(input.Type != null && { Type: input.Type }),
|
|
1162
|
-
};
|
|
1163
|
-
};
|
|
1164
|
-
const se_GetParallelDataRequest = (input, context) => {
|
|
1165
|
-
return {
|
|
1166
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1167
|
-
};
|
|
1168
|
-
};
|
|
1169
|
-
const se_GetTerminologyRequest = (input, context) => {
|
|
1170
|
-
return {
|
|
1171
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1172
|
-
...(input.TerminologyDataFormat != null && { TerminologyDataFormat: input.TerminologyDataFormat }),
|
|
1173
|
-
};
|
|
1060
|
+
return (0, smithy_client_1.take)(input, {
|
|
1061
|
+
ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
1062
|
+
Description: [],
|
|
1063
|
+
EncryptionKey: smithy_client_1._json,
|
|
1064
|
+
Name: [],
|
|
1065
|
+
ParallelDataConfig: smithy_client_1._json,
|
|
1066
|
+
Tags: smithy_client_1._json,
|
|
1067
|
+
});
|
|
1174
1068
|
};
|
|
1175
1069
|
const se_ImportTerminologyRequest = (input, context) => {
|
|
1176
|
-
return {
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
};
|
|
1184
|
-
};
|
|
1185
|
-
const se_InputDataConfig = (input, context) => {
|
|
1186
|
-
return {
|
|
1187
|
-
...(input.ContentType != null && { ContentType: input.ContentType }),
|
|
1188
|
-
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1189
|
-
};
|
|
1190
|
-
};
|
|
1191
|
-
const se_ListLanguagesRequest = (input, context) => {
|
|
1192
|
-
return {
|
|
1193
|
-
...(input.DisplayLanguageCode != null && { DisplayLanguageCode: input.DisplayLanguageCode }),
|
|
1194
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1195
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1196
|
-
};
|
|
1197
|
-
};
|
|
1198
|
-
const se_ListParallelDataRequest = (input, context) => {
|
|
1199
|
-
return {
|
|
1200
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1201
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1202
|
-
};
|
|
1203
|
-
};
|
|
1204
|
-
const se_ListTagsForResourceRequest = (input, context) => {
|
|
1205
|
-
return {
|
|
1206
|
-
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1207
|
-
};
|
|
1208
|
-
};
|
|
1209
|
-
const se_ListTerminologiesRequest = (input, context) => {
|
|
1210
|
-
return {
|
|
1211
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1212
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1213
|
-
};
|
|
1070
|
+
return (0, smithy_client_1.take)(input, {
|
|
1071
|
+
Description: [],
|
|
1072
|
+
EncryptionKey: smithy_client_1._json,
|
|
1073
|
+
MergeStrategy: [],
|
|
1074
|
+
Name: [],
|
|
1075
|
+
Tags: smithy_client_1._json,
|
|
1076
|
+
TerminologyData: (_) => se_TerminologyData(_, context),
|
|
1077
|
+
});
|
|
1214
1078
|
};
|
|
1215
1079
|
const se_ListTextTranslationJobsRequest = (input, context) => {
|
|
1216
|
-
return {
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
};
|
|
1221
|
-
};
|
|
1222
|
-
const se_OutputDataConfig = (input, context) => {
|
|
1223
|
-
return {
|
|
1224
|
-
...(input.EncryptionKey != null && { EncryptionKey: se_EncryptionKey(input.EncryptionKey, context) }),
|
|
1225
|
-
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1226
|
-
};
|
|
1227
|
-
};
|
|
1228
|
-
const se_ParallelDataConfig = (input, context) => {
|
|
1229
|
-
return {
|
|
1230
|
-
...(input.Format != null && { Format: input.Format }),
|
|
1231
|
-
...(input.S3Uri != null && { S3Uri: input.S3Uri }),
|
|
1232
|
-
};
|
|
1233
|
-
};
|
|
1234
|
-
const se_ResourceNameList = (input, context) => {
|
|
1235
|
-
return input
|
|
1236
|
-
.filter((e) => e != null)
|
|
1237
|
-
.map((entry) => {
|
|
1238
|
-
return entry;
|
|
1080
|
+
return (0, smithy_client_1.take)(input, {
|
|
1081
|
+
Filter: (_) => se_TextTranslationJobFilter(_, context),
|
|
1082
|
+
MaxResults: [],
|
|
1083
|
+
NextToken: [],
|
|
1239
1084
|
});
|
|
1240
1085
|
};
|
|
1241
1086
|
const se_StartTextTranslationJobRequest = (input, context) => {
|
|
1242
|
-
return {
|
|
1243
|
-
ClientToken:
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
...(input.TargetLanguageCodes != null && {
|
|
1254
|
-
TargetLanguageCodes: se_TargetLanguageCodeStringList(input.TargetLanguageCodes, context),
|
|
1255
|
-
}),
|
|
1256
|
-
...(input.TerminologyNames != null && { TerminologyNames: se_ResourceNameList(input.TerminologyNames, context) }),
|
|
1257
|
-
};
|
|
1258
|
-
};
|
|
1259
|
-
const se_StopTextTranslationJobRequest = (input, context) => {
|
|
1260
|
-
return {
|
|
1261
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1262
|
-
};
|
|
1263
|
-
};
|
|
1264
|
-
const se_Tag = (input, context) => {
|
|
1265
|
-
return {
|
|
1266
|
-
...(input.Key != null && { Key: input.Key }),
|
|
1267
|
-
...(input.Value != null && { Value: input.Value }),
|
|
1268
|
-
};
|
|
1269
|
-
};
|
|
1270
|
-
const se_TagKeyList = (input, context) => {
|
|
1271
|
-
return input
|
|
1272
|
-
.filter((e) => e != null)
|
|
1273
|
-
.map((entry) => {
|
|
1274
|
-
return entry;
|
|
1275
|
-
});
|
|
1276
|
-
};
|
|
1277
|
-
const se_TagList = (input, context) => {
|
|
1278
|
-
return input
|
|
1279
|
-
.filter((e) => e != null)
|
|
1280
|
-
.map((entry) => {
|
|
1281
|
-
return se_Tag(entry, context);
|
|
1282
|
-
});
|
|
1283
|
-
};
|
|
1284
|
-
const se_TagResourceRequest = (input, context) => {
|
|
1285
|
-
return {
|
|
1286
|
-
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1287
|
-
...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
|
|
1288
|
-
};
|
|
1289
|
-
};
|
|
1290
|
-
const se_TargetLanguageCodeStringList = (input, context) => {
|
|
1291
|
-
return input
|
|
1292
|
-
.filter((e) => e != null)
|
|
1293
|
-
.map((entry) => {
|
|
1294
|
-
return entry;
|
|
1087
|
+
return (0, smithy_client_1.take)(input, {
|
|
1088
|
+
ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
1089
|
+
DataAccessRoleArn: [],
|
|
1090
|
+
InputDataConfig: smithy_client_1._json,
|
|
1091
|
+
JobName: [],
|
|
1092
|
+
OutputDataConfig: smithy_client_1._json,
|
|
1093
|
+
ParallelDataNames: smithy_client_1._json,
|
|
1094
|
+
Settings: smithy_client_1._json,
|
|
1095
|
+
SourceLanguageCode: [],
|
|
1096
|
+
TargetLanguageCodes: smithy_client_1._json,
|
|
1097
|
+
TerminologyNames: smithy_client_1._json,
|
|
1295
1098
|
});
|
|
1296
1099
|
};
|
|
1297
1100
|
const se_TerminologyData = (input, context) => {
|
|
1298
|
-
return {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
};
|
|
1101
|
+
return (0, smithy_client_1.take)(input, {
|
|
1102
|
+
Directionality: [],
|
|
1103
|
+
File: context.base64Encoder,
|
|
1104
|
+
Format: [],
|
|
1105
|
+
});
|
|
1303
1106
|
};
|
|
1304
1107
|
const se_TextTranslationJobFilter = (input, context) => {
|
|
1305
|
-
return {
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
...(input.SubmittedBeforeTime != null && {
|
|
1312
|
-
SubmittedBeforeTime: Math.round(input.SubmittedBeforeTime.getTime() / 1000),
|
|
1313
|
-
}),
|
|
1314
|
-
};
|
|
1315
|
-
};
|
|
1316
|
-
const se_TranslateTextRequest = (input, context) => {
|
|
1317
|
-
return {
|
|
1318
|
-
...(input.Settings != null && { Settings: se_TranslationSettings(input.Settings, context) }),
|
|
1319
|
-
...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1320
|
-
...(input.TargetLanguageCode != null && { TargetLanguageCode: input.TargetLanguageCode }),
|
|
1321
|
-
...(input.TerminologyNames != null && { TerminologyNames: se_ResourceNameList(input.TerminologyNames, context) }),
|
|
1322
|
-
...(input.Text != null && { Text: input.Text }),
|
|
1323
|
-
};
|
|
1324
|
-
};
|
|
1325
|
-
const se_TranslationSettings = (input, context) => {
|
|
1326
|
-
return {
|
|
1327
|
-
...(input.Formality != null && { Formality: input.Formality }),
|
|
1328
|
-
...(input.Profanity != null && { Profanity: input.Profanity }),
|
|
1329
|
-
};
|
|
1330
|
-
};
|
|
1331
|
-
const se_UntagResourceRequest = (input, context) => {
|
|
1332
|
-
return {
|
|
1333
|
-
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1334
|
-
...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
|
|
1335
|
-
};
|
|
1108
|
+
return (0, smithy_client_1.take)(input, {
|
|
1109
|
+
JobName: [],
|
|
1110
|
+
JobStatus: [],
|
|
1111
|
+
SubmittedAfterTime: (_) => Math.round(_.getTime() / 1000),
|
|
1112
|
+
SubmittedBeforeTime: (_) => Math.round(_.getTime() / 1000),
|
|
1113
|
+
});
|
|
1336
1114
|
};
|
|
1337
1115
|
const se_UpdateParallelDataRequest = (input, context) => {
|
|
1338
|
-
return {
|
|
1339
|
-
ClientToken:
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
ParallelDataConfig: se_ParallelDataConfig(input.ParallelDataConfig, context),
|
|
1344
|
-
}),
|
|
1345
|
-
};
|
|
1346
|
-
};
|
|
1347
|
-
const de_AppliedTerminology = (output, context) => {
|
|
1348
|
-
return {
|
|
1349
|
-
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1350
|
-
Terms: output.Terms != null ? de_TermList(output.Terms, context) : undefined,
|
|
1351
|
-
};
|
|
1352
|
-
};
|
|
1353
|
-
const de_AppliedTerminologyList = (output, context) => {
|
|
1354
|
-
const retVal = (output || [])
|
|
1355
|
-
.filter((e) => e != null)
|
|
1356
|
-
.map((entry) => {
|
|
1357
|
-
if (entry === null) {
|
|
1358
|
-
return null;
|
|
1359
|
-
}
|
|
1360
|
-
return de_AppliedTerminology(entry, context);
|
|
1116
|
+
return (0, smithy_client_1.take)(input, {
|
|
1117
|
+
ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
1118
|
+
Description: [],
|
|
1119
|
+
Name: [],
|
|
1120
|
+
ParallelDataConfig: smithy_client_1._json,
|
|
1361
1121
|
});
|
|
1362
|
-
return retVal;
|
|
1363
|
-
};
|
|
1364
|
-
const de_ConcurrentModificationException = (output, context) => {
|
|
1365
|
-
return {
|
|
1366
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1367
|
-
};
|
|
1368
|
-
};
|
|
1369
|
-
const de_ConflictException = (output, context) => {
|
|
1370
|
-
return {
|
|
1371
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1372
|
-
};
|
|
1373
|
-
};
|
|
1374
|
-
const de_CreateParallelDataResponse = (output, context) => {
|
|
1375
|
-
return {
|
|
1376
|
-
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1377
|
-
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1378
|
-
};
|
|
1379
|
-
};
|
|
1380
|
-
const de_DeleteParallelDataResponse = (output, context) => {
|
|
1381
|
-
return {
|
|
1382
|
-
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1383
|
-
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1384
|
-
};
|
|
1385
1122
|
};
|
|
1386
1123
|
const de_DescribeTextTranslationJobResponse = (output, context) => {
|
|
1387
|
-
return {
|
|
1388
|
-
TextTranslationJobProperties:
|
|
1389
|
-
|
|
1390
|
-
: undefined,
|
|
1391
|
-
};
|
|
1392
|
-
};
|
|
1393
|
-
const de_DetectedLanguageLowConfidenceException = (output, context) => {
|
|
1394
|
-
return {
|
|
1395
|
-
DetectedLanguageCode: (0, smithy_client_1.expectString)(output.DetectedLanguageCode),
|
|
1396
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1397
|
-
};
|
|
1398
|
-
};
|
|
1399
|
-
const de_EncryptionKey = (output, context) => {
|
|
1400
|
-
return {
|
|
1401
|
-
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1402
|
-
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
1403
|
-
};
|
|
1124
|
+
return (0, smithy_client_1.take)(output, {
|
|
1125
|
+
TextTranslationJobProperties: (_) => de_TextTranslationJobProperties(_, context),
|
|
1126
|
+
});
|
|
1404
1127
|
};
|
|
1405
1128
|
const de_GetParallelDataResponse = (output, context) => {
|
|
1406
|
-
return {
|
|
1407
|
-
AuxiliaryDataLocation:
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
? de_ParallelDataDataLocation(output.LatestUpdateAttemptAuxiliaryDataLocation, context)
|
|
1413
|
-
: undefined,
|
|
1414
|
-
ParallelDataProperties: output.ParallelDataProperties != null
|
|
1415
|
-
? de_ParallelDataProperties(output.ParallelDataProperties, context)
|
|
1416
|
-
: undefined,
|
|
1417
|
-
};
|
|
1129
|
+
return (0, smithy_client_1.take)(output, {
|
|
1130
|
+
AuxiliaryDataLocation: smithy_client_1._json,
|
|
1131
|
+
DataLocation: smithy_client_1._json,
|
|
1132
|
+
LatestUpdateAttemptAuxiliaryDataLocation: smithy_client_1._json,
|
|
1133
|
+
ParallelDataProperties: (_) => de_ParallelDataProperties(_, context),
|
|
1134
|
+
});
|
|
1418
1135
|
};
|
|
1419
1136
|
const de_GetTerminologyResponse = (output, context) => {
|
|
1420
|
-
return {
|
|
1421
|
-
AuxiliaryDataLocation:
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
TerminologyDataLocation: output.TerminologyDataLocation != null
|
|
1425
|
-
? de_TerminologyDataLocation(output.TerminologyDataLocation, context)
|
|
1426
|
-
: undefined,
|
|
1427
|
-
TerminologyProperties: output.TerminologyProperties != null
|
|
1428
|
-
? de_TerminologyProperties(output.TerminologyProperties, context)
|
|
1429
|
-
: undefined,
|
|
1430
|
-
};
|
|
1431
|
-
};
|
|
1432
|
-
const de_ImportTerminologyResponse = (output, context) => {
|
|
1433
|
-
return {
|
|
1434
|
-
AuxiliaryDataLocation: output.AuxiliaryDataLocation != null
|
|
1435
|
-
? de_TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
1436
|
-
: undefined,
|
|
1437
|
-
TerminologyProperties: output.TerminologyProperties != null
|
|
1438
|
-
? de_TerminologyProperties(output.TerminologyProperties, context)
|
|
1439
|
-
: undefined,
|
|
1440
|
-
};
|
|
1441
|
-
};
|
|
1442
|
-
const de_InputDataConfig = (output, context) => {
|
|
1443
|
-
return {
|
|
1444
|
-
ContentType: (0, smithy_client_1.expectString)(output.ContentType),
|
|
1445
|
-
S3Uri: (0, smithy_client_1.expectString)(output.S3Uri),
|
|
1446
|
-
};
|
|
1447
|
-
};
|
|
1448
|
-
const de_InternalServerException = (output, context) => {
|
|
1449
|
-
return {
|
|
1450
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1451
|
-
};
|
|
1452
|
-
};
|
|
1453
|
-
const de_InvalidFilterException = (output, context) => {
|
|
1454
|
-
return {
|
|
1455
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1456
|
-
};
|
|
1457
|
-
};
|
|
1458
|
-
const de_InvalidParameterValueException = (output, context) => {
|
|
1459
|
-
return {
|
|
1460
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1461
|
-
};
|
|
1462
|
-
};
|
|
1463
|
-
const de_InvalidRequestException = (output, context) => {
|
|
1464
|
-
return {
|
|
1465
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1466
|
-
};
|
|
1467
|
-
};
|
|
1468
|
-
const de_JobDetails = (output, context) => {
|
|
1469
|
-
return {
|
|
1470
|
-
DocumentsWithErrorsCount: (0, smithy_client_1.expectInt32)(output.DocumentsWithErrorsCount),
|
|
1471
|
-
InputDocumentsCount: (0, smithy_client_1.expectInt32)(output.InputDocumentsCount),
|
|
1472
|
-
TranslatedDocumentsCount: (0, smithy_client_1.expectInt32)(output.TranslatedDocumentsCount),
|
|
1473
|
-
};
|
|
1474
|
-
};
|
|
1475
|
-
const de_Language = (output, context) => {
|
|
1476
|
-
return {
|
|
1477
|
-
LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
|
|
1478
|
-
LanguageName: (0, smithy_client_1.expectString)(output.LanguageName),
|
|
1479
|
-
};
|
|
1480
|
-
};
|
|
1481
|
-
const de_LanguageCodeStringList = (output, context) => {
|
|
1482
|
-
const retVal = (output || [])
|
|
1483
|
-
.filter((e) => e != null)
|
|
1484
|
-
.map((entry) => {
|
|
1485
|
-
if (entry === null) {
|
|
1486
|
-
return null;
|
|
1487
|
-
}
|
|
1488
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1137
|
+
return (0, smithy_client_1.take)(output, {
|
|
1138
|
+
AuxiliaryDataLocation: smithy_client_1._json,
|
|
1139
|
+
TerminologyDataLocation: smithy_client_1._json,
|
|
1140
|
+
TerminologyProperties: (_) => de_TerminologyProperties(_, context),
|
|
1489
1141
|
});
|
|
1490
|
-
return retVal;
|
|
1491
1142
|
};
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
.
|
|
1495
|
-
|
|
1496
|
-
if (entry === null) {
|
|
1497
|
-
return null;
|
|
1498
|
-
}
|
|
1499
|
-
return de_Language(entry, context);
|
|
1143
|
+
const de_ImportTerminologyResponse = (output, context) => {
|
|
1144
|
+
return (0, smithy_client_1.take)(output, {
|
|
1145
|
+
AuxiliaryDataLocation: smithy_client_1._json,
|
|
1146
|
+
TerminologyProperties: (_) => de_TerminologyProperties(_, context),
|
|
1500
1147
|
});
|
|
1501
|
-
return retVal;
|
|
1502
|
-
};
|
|
1503
|
-
const de_LimitExceededException = (output, context) => {
|
|
1504
|
-
return {
|
|
1505
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1506
|
-
};
|
|
1507
|
-
};
|
|
1508
|
-
const de_ListLanguagesResponse = (output, context) => {
|
|
1509
|
-
return {
|
|
1510
|
-
DisplayLanguageCode: (0, smithy_client_1.expectString)(output.DisplayLanguageCode),
|
|
1511
|
-
Languages: output.Languages != null ? de_LanguagesList(output.Languages, context) : undefined,
|
|
1512
|
-
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1513
|
-
};
|
|
1514
1148
|
};
|
|
1515
1149
|
const de_ListParallelDataResponse = (output, context) => {
|
|
1516
|
-
return {
|
|
1517
|
-
NextToken:
|
|
1518
|
-
ParallelDataPropertiesList:
|
|
1519
|
-
|
|
1520
|
-
: undefined,
|
|
1521
|
-
};
|
|
1522
|
-
};
|
|
1523
|
-
const de_ListTagsForResourceResponse = (output, context) => {
|
|
1524
|
-
return {
|
|
1525
|
-
Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
|
|
1526
|
-
};
|
|
1150
|
+
return (0, smithy_client_1.take)(output, {
|
|
1151
|
+
NextToken: smithy_client_1.expectString,
|
|
1152
|
+
ParallelDataPropertiesList: (_) => de_ParallelDataPropertiesList(_, context),
|
|
1153
|
+
});
|
|
1527
1154
|
};
|
|
1528
1155
|
const de_ListTerminologiesResponse = (output, context) => {
|
|
1529
|
-
return {
|
|
1530
|
-
NextToken:
|
|
1531
|
-
TerminologyPropertiesList:
|
|
1532
|
-
|
|
1533
|
-
: undefined,
|
|
1534
|
-
};
|
|
1156
|
+
return (0, smithy_client_1.take)(output, {
|
|
1157
|
+
NextToken: smithy_client_1.expectString,
|
|
1158
|
+
TerminologyPropertiesList: (_) => de_TerminologyPropertiesList(_, context),
|
|
1159
|
+
});
|
|
1535
1160
|
};
|
|
1536
1161
|
const de_ListTextTranslationJobsResponse = (output, context) => {
|
|
1537
|
-
return {
|
|
1538
|
-
NextToken:
|
|
1539
|
-
TextTranslationJobPropertiesList:
|
|
1540
|
-
|
|
1541
|
-
: undefined,
|
|
1542
|
-
};
|
|
1543
|
-
};
|
|
1544
|
-
const de_OutputDataConfig = (output, context) => {
|
|
1545
|
-
return {
|
|
1546
|
-
EncryptionKey: output.EncryptionKey != null ? de_EncryptionKey(output.EncryptionKey, context) : undefined,
|
|
1547
|
-
S3Uri: (0, smithy_client_1.expectString)(output.S3Uri),
|
|
1548
|
-
};
|
|
1549
|
-
};
|
|
1550
|
-
const de_ParallelDataConfig = (output, context) => {
|
|
1551
|
-
return {
|
|
1552
|
-
Format: (0, smithy_client_1.expectString)(output.Format),
|
|
1553
|
-
S3Uri: (0, smithy_client_1.expectString)(output.S3Uri),
|
|
1554
|
-
};
|
|
1555
|
-
};
|
|
1556
|
-
const de_ParallelDataDataLocation = (output, context) => {
|
|
1557
|
-
return {
|
|
1558
|
-
Location: (0, smithy_client_1.expectString)(output.Location),
|
|
1559
|
-
RepositoryType: (0, smithy_client_1.expectString)(output.RepositoryType),
|
|
1560
|
-
};
|
|
1162
|
+
return (0, smithy_client_1.take)(output, {
|
|
1163
|
+
NextToken: smithy_client_1.expectString,
|
|
1164
|
+
TextTranslationJobPropertiesList: (_) => de_TextTranslationJobPropertiesList(_, context),
|
|
1165
|
+
});
|
|
1561
1166
|
};
|
|
1562
1167
|
const de_ParallelDataProperties = (output, context) => {
|
|
1563
|
-
return {
|
|
1564
|
-
Arn:
|
|
1565
|
-
CreatedAt:
|
|
1566
|
-
Description:
|
|
1567
|
-
EncryptionKey:
|
|
1568
|
-
FailedRecordCount:
|
|
1569
|
-
ImportedDataSize:
|
|
1570
|
-
ImportedRecordCount:
|
|
1571
|
-
LastUpdatedAt:
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
1583
|
-
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1584
|
-
TargetLanguageCodes: output.TargetLanguageCodes != null ? de_LanguageCodeStringList(output.TargetLanguageCodes, context) : undefined,
|
|
1585
|
-
};
|
|
1168
|
+
return (0, smithy_client_1.take)(output, {
|
|
1169
|
+
Arn: smithy_client_1.expectString,
|
|
1170
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1171
|
+
Description: smithy_client_1.expectString,
|
|
1172
|
+
EncryptionKey: smithy_client_1._json,
|
|
1173
|
+
FailedRecordCount: smithy_client_1.expectLong,
|
|
1174
|
+
ImportedDataSize: smithy_client_1.expectLong,
|
|
1175
|
+
ImportedRecordCount: smithy_client_1.expectLong,
|
|
1176
|
+
LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1177
|
+
LatestUpdateAttemptAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1178
|
+
LatestUpdateAttemptStatus: smithy_client_1.expectString,
|
|
1179
|
+
Message: smithy_client_1.expectString,
|
|
1180
|
+
Name: smithy_client_1.expectString,
|
|
1181
|
+
ParallelDataConfig: smithy_client_1._json,
|
|
1182
|
+
SkippedRecordCount: smithy_client_1.expectLong,
|
|
1183
|
+
SourceLanguageCode: smithy_client_1.expectString,
|
|
1184
|
+
Status: smithy_client_1.expectString,
|
|
1185
|
+
TargetLanguageCodes: smithy_client_1._json,
|
|
1186
|
+
});
|
|
1586
1187
|
};
|
|
1587
1188
|
const de_ParallelDataPropertiesList = (output, context) => {
|
|
1588
1189
|
const retVal = (output || [])
|
|
1589
1190
|
.filter((e) => e != null)
|
|
1590
1191
|
.map((entry) => {
|
|
1591
|
-
if (entry === null) {
|
|
1592
|
-
return null;
|
|
1593
|
-
}
|
|
1594
1192
|
return de_ParallelDataProperties(entry, context);
|
|
1595
1193
|
});
|
|
1596
1194
|
return retVal;
|
|
1597
1195
|
};
|
|
1598
|
-
const de_ResourceNameList = (output, context) => {
|
|
1599
|
-
const retVal = (output || [])
|
|
1600
|
-
.filter((e) => e != null)
|
|
1601
|
-
.map((entry) => {
|
|
1602
|
-
if (entry === null) {
|
|
1603
|
-
return null;
|
|
1604
|
-
}
|
|
1605
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1606
|
-
});
|
|
1607
|
-
return retVal;
|
|
1608
|
-
};
|
|
1609
|
-
const de_ResourceNotFoundException = (output, context) => {
|
|
1610
|
-
return {
|
|
1611
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1612
|
-
};
|
|
1613
|
-
};
|
|
1614
|
-
const de_ServiceUnavailableException = (output, context) => {
|
|
1615
|
-
return {
|
|
1616
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1617
|
-
};
|
|
1618
|
-
};
|
|
1619
|
-
const de_StartTextTranslationJobResponse = (output, context) => {
|
|
1620
|
-
return {
|
|
1621
|
-
JobId: (0, smithy_client_1.expectString)(output.JobId),
|
|
1622
|
-
JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
|
|
1623
|
-
};
|
|
1624
|
-
};
|
|
1625
|
-
const de_StopTextTranslationJobResponse = (output, context) => {
|
|
1626
|
-
return {
|
|
1627
|
-
JobId: (0, smithy_client_1.expectString)(output.JobId),
|
|
1628
|
-
JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
|
|
1629
|
-
};
|
|
1630
|
-
};
|
|
1631
|
-
const de_Tag = (output, context) => {
|
|
1632
|
-
return {
|
|
1633
|
-
Key: (0, smithy_client_1.expectString)(output.Key),
|
|
1634
|
-
Value: (0, smithy_client_1.expectString)(output.Value),
|
|
1635
|
-
};
|
|
1636
|
-
};
|
|
1637
|
-
const de_TagList = (output, context) => {
|
|
1638
|
-
const retVal = (output || [])
|
|
1639
|
-
.filter((e) => e != null)
|
|
1640
|
-
.map((entry) => {
|
|
1641
|
-
if (entry === null) {
|
|
1642
|
-
return null;
|
|
1643
|
-
}
|
|
1644
|
-
return de_Tag(entry, context);
|
|
1645
|
-
});
|
|
1646
|
-
return retVal;
|
|
1647
|
-
};
|
|
1648
|
-
const de_TagResourceResponse = (output, context) => {
|
|
1649
|
-
return {};
|
|
1650
|
-
};
|
|
1651
|
-
const de_TargetLanguageCodeStringList = (output, context) => {
|
|
1652
|
-
const retVal = (output || [])
|
|
1653
|
-
.filter((e) => e != null)
|
|
1654
|
-
.map((entry) => {
|
|
1655
|
-
if (entry === null) {
|
|
1656
|
-
return null;
|
|
1657
|
-
}
|
|
1658
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1659
|
-
});
|
|
1660
|
-
return retVal;
|
|
1661
|
-
};
|
|
1662
|
-
const de_Term = (output, context) => {
|
|
1663
|
-
return {
|
|
1664
|
-
SourceText: (0, smithy_client_1.expectString)(output.SourceText),
|
|
1665
|
-
TargetText: (0, smithy_client_1.expectString)(output.TargetText),
|
|
1666
|
-
};
|
|
1667
|
-
};
|
|
1668
|
-
const de_TerminologyDataLocation = (output, context) => {
|
|
1669
|
-
return {
|
|
1670
|
-
Location: (0, smithy_client_1.expectString)(output.Location),
|
|
1671
|
-
RepositoryType: (0, smithy_client_1.expectString)(output.RepositoryType),
|
|
1672
|
-
};
|
|
1673
|
-
};
|
|
1674
1196
|
const de_TerminologyProperties = (output, context) => {
|
|
1675
|
-
return {
|
|
1676
|
-
Arn:
|
|
1677
|
-
CreatedAt:
|
|
1678
|
-
Description:
|
|
1679
|
-
Directionality:
|
|
1680
|
-
EncryptionKey:
|
|
1681
|
-
Format:
|
|
1682
|
-
LastUpdatedAt:
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
TermCount: (0, smithy_client_1.expectInt32)(output.TermCount),
|
|
1692
|
-
};
|
|
1197
|
+
return (0, smithy_client_1.take)(output, {
|
|
1198
|
+
Arn: smithy_client_1.expectString,
|
|
1199
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1200
|
+
Description: smithy_client_1.expectString,
|
|
1201
|
+
Directionality: smithy_client_1.expectString,
|
|
1202
|
+
EncryptionKey: smithy_client_1._json,
|
|
1203
|
+
Format: smithy_client_1.expectString,
|
|
1204
|
+
LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1205
|
+
Message: smithy_client_1.expectString,
|
|
1206
|
+
Name: smithy_client_1.expectString,
|
|
1207
|
+
SizeBytes: smithy_client_1.expectInt32,
|
|
1208
|
+
SkippedTermCount: smithy_client_1.expectInt32,
|
|
1209
|
+
SourceLanguageCode: smithy_client_1.expectString,
|
|
1210
|
+
TargetLanguageCodes: smithy_client_1._json,
|
|
1211
|
+
TermCount: smithy_client_1.expectInt32,
|
|
1212
|
+
});
|
|
1693
1213
|
};
|
|
1694
1214
|
const de_TerminologyPropertiesList = (output, context) => {
|
|
1695
1215
|
const retVal = (output || [])
|
|
1696
1216
|
.filter((e) => e != null)
|
|
1697
1217
|
.map((entry) => {
|
|
1698
|
-
if (entry === null) {
|
|
1699
|
-
return null;
|
|
1700
|
-
}
|
|
1701
1218
|
return de_TerminologyProperties(entry, context);
|
|
1702
1219
|
});
|
|
1703
1220
|
return retVal;
|
|
1704
1221
|
};
|
|
1705
|
-
const de_TermList = (output, context) => {
|
|
1706
|
-
const retVal = (output || [])
|
|
1707
|
-
.filter((e) => e != null)
|
|
1708
|
-
.map((entry) => {
|
|
1709
|
-
if (entry === null) {
|
|
1710
|
-
return null;
|
|
1711
|
-
}
|
|
1712
|
-
return de_Term(entry, context);
|
|
1713
|
-
});
|
|
1714
|
-
return retVal;
|
|
1715
|
-
};
|
|
1716
|
-
const de_TextSizeLimitExceededException = (output, context) => {
|
|
1717
|
-
return {
|
|
1718
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1719
|
-
};
|
|
1720
|
-
};
|
|
1721
1222
|
const de_TextTranslationJobProperties = (output, context) => {
|
|
1722
|
-
return {
|
|
1723
|
-
DataAccessRoleArn:
|
|
1724
|
-
EndTime:
|
|
1725
|
-
InputDataConfig:
|
|
1726
|
-
JobDetails:
|
|
1727
|
-
JobId:
|
|
1728
|
-
JobName:
|
|
1729
|
-
JobStatus:
|
|
1730
|
-
Message:
|
|
1731
|
-
OutputDataConfig:
|
|
1732
|
-
ParallelDataNames:
|
|
1733
|
-
Settings:
|
|
1734
|
-
SourceLanguageCode:
|
|
1735
|
-
SubmittedTime:
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
? de_TargetLanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
1740
|
-
: undefined,
|
|
1741
|
-
TerminologyNames: output.TerminologyNames != null ? de_ResourceNameList(output.TerminologyNames, context) : undefined,
|
|
1742
|
-
};
|
|
1223
|
+
return (0, smithy_client_1.take)(output, {
|
|
1224
|
+
DataAccessRoleArn: smithy_client_1.expectString,
|
|
1225
|
+
EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1226
|
+
InputDataConfig: smithy_client_1._json,
|
|
1227
|
+
JobDetails: smithy_client_1._json,
|
|
1228
|
+
JobId: smithy_client_1.expectString,
|
|
1229
|
+
JobName: smithy_client_1.expectString,
|
|
1230
|
+
JobStatus: smithy_client_1.expectString,
|
|
1231
|
+
Message: smithy_client_1.expectString,
|
|
1232
|
+
OutputDataConfig: smithy_client_1._json,
|
|
1233
|
+
ParallelDataNames: smithy_client_1._json,
|
|
1234
|
+
Settings: smithy_client_1._json,
|
|
1235
|
+
SourceLanguageCode: smithy_client_1.expectString,
|
|
1236
|
+
SubmittedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1237
|
+
TargetLanguageCodes: smithy_client_1._json,
|
|
1238
|
+
TerminologyNames: smithy_client_1._json,
|
|
1239
|
+
});
|
|
1743
1240
|
};
|
|
1744
1241
|
const de_TextTranslationJobPropertiesList = (output, context) => {
|
|
1745
1242
|
const retVal = (output || [])
|
|
1746
1243
|
.filter((e) => e != null)
|
|
1747
1244
|
.map((entry) => {
|
|
1748
|
-
if (entry === null) {
|
|
1749
|
-
return null;
|
|
1750
|
-
}
|
|
1751
1245
|
return de_TextTranslationJobProperties(entry, context);
|
|
1752
1246
|
});
|
|
1753
1247
|
return retVal;
|
|
1754
1248
|
};
|
|
1755
|
-
const de_TooManyRequestsException = (output, context) => {
|
|
1756
|
-
return {
|
|
1757
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1758
|
-
};
|
|
1759
|
-
};
|
|
1760
|
-
const de_TooManyTagsException = (output, context) => {
|
|
1761
|
-
return {
|
|
1762
|
-
ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
|
|
1763
|
-
message: (0, smithy_client_1.expectString)(output.message),
|
|
1764
|
-
};
|
|
1765
|
-
};
|
|
1766
|
-
const de_TranslateTextResponse = (output, context) => {
|
|
1767
|
-
return {
|
|
1768
|
-
AppliedSettings: output.AppliedSettings != null ? de_TranslationSettings(output.AppliedSettings, context) : undefined,
|
|
1769
|
-
AppliedTerminologies: output.AppliedTerminologies != null ? de_AppliedTerminologyList(output.AppliedTerminologies, context) : undefined,
|
|
1770
|
-
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
1771
|
-
TargetLanguageCode: (0, smithy_client_1.expectString)(output.TargetLanguageCode),
|
|
1772
|
-
TranslatedText: (0, smithy_client_1.expectString)(output.TranslatedText),
|
|
1773
|
-
};
|
|
1774
|
-
};
|
|
1775
|
-
const de_TranslationSettings = (output, context) => {
|
|
1776
|
-
return {
|
|
1777
|
-
Formality: (0, smithy_client_1.expectString)(output.Formality),
|
|
1778
|
-
Profanity: (0, smithy_client_1.expectString)(output.Profanity),
|
|
1779
|
-
};
|
|
1780
|
-
};
|
|
1781
|
-
const de_UnsupportedDisplayLanguageCodeException = (output, context) => {
|
|
1782
|
-
return {
|
|
1783
|
-
DisplayLanguageCode: (0, smithy_client_1.expectString)(output.DisplayLanguageCode),
|
|
1784
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1785
|
-
};
|
|
1786
|
-
};
|
|
1787
|
-
const de_UnsupportedLanguagePairException = (output, context) => {
|
|
1788
|
-
return {
|
|
1789
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1790
|
-
SourceLanguageCode: (0, smithy_client_1.expectString)(output.SourceLanguageCode),
|
|
1791
|
-
TargetLanguageCode: (0, smithy_client_1.expectString)(output.TargetLanguageCode),
|
|
1792
|
-
};
|
|
1793
|
-
};
|
|
1794
|
-
const de_UntagResourceResponse = (output, context) => {
|
|
1795
|
-
return {};
|
|
1796
|
-
};
|
|
1797
1249
|
const de_UpdateParallelDataResponse = (output, context) => {
|
|
1798
|
-
return {
|
|
1799
|
-
LatestUpdateAttemptAt:
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1805
|
-
};
|
|
1250
|
+
return (0, smithy_client_1.take)(output, {
|
|
1251
|
+
LatestUpdateAttemptAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1252
|
+
LatestUpdateAttemptStatus: smithy_client_1.expectString,
|
|
1253
|
+
Name: smithy_client_1.expectString,
|
|
1254
|
+
Status: smithy_client_1.expectString,
|
|
1255
|
+
});
|
|
1806
1256
|
};
|
|
1807
1257
|
const deserializeMetadata = (output) => ({
|
|
1808
1258
|
httpStatusCode: output.statusCode,
|
|
@@ -1817,6 +1267,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
1817
1267
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1818
1268
|
};
|
|
1819
1269
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1270
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(TranslateServiceException_1.TranslateServiceException);
|
|
1820
1271
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1821
1272
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1822
1273
|
const contents = {
|
|
@@ -1835,6 +1286,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
1835
1286
|
}
|
|
1836
1287
|
return new protocol_http_1.HttpRequest(contents);
|
|
1837
1288
|
};
|
|
1289
|
+
function sharedHeaders(operation) {
|
|
1290
|
+
return {
|
|
1291
|
+
"content-type": "application/x-amz-json-1.1",
|
|
1292
|
+
"x-amz-target": `AWSShineFrontendService_20170701.${operation}`,
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1838
1295
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1839
1296
|
if (encoded.length) {
|
|
1840
1297
|
return JSON.parse(encoded);
|