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