@aws-sdk/client-translate 3.926.0 → 3.928.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +822 -1023
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/TranslateClient.js +2 -0
- package/dist-es/commands/CreateParallelDataCommand.js +3 -9
- package/dist-es/commands/DeleteParallelDataCommand.js +3 -9
- package/dist-es/commands/DeleteTerminologyCommand.js +3 -9
- package/dist-es/commands/DescribeTextTranslationJobCommand.js +3 -9
- package/dist-es/commands/GetParallelDataCommand.js +3 -9
- package/dist-es/commands/GetTerminologyCommand.js +3 -9
- package/dist-es/commands/ImportTerminologyCommand.js +3 -10
- package/dist-es/commands/ListLanguagesCommand.js +3 -9
- package/dist-es/commands/ListParallelDataCommand.js +3 -9
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
- package/dist-es/commands/ListTerminologiesCommand.js +3 -9
- package/dist-es/commands/ListTextTranslationJobsCommand.js +3 -9
- package/dist-es/commands/StartTextTranslationJobCommand.js +3 -9
- package/dist-es/commands/StopTextTranslationJobCommand.js +3 -9
- package/dist-es/commands/TagResourceCommand.js +3 -9
- package/dist-es/commands/TranslateDocumentCommand.js +3 -10
- package/dist-es/commands/TranslateTextCommand.js +3 -9
- package/dist-es/commands/UntagResourceCommand.js +3 -9
- package/dist-es/commands/UpdateParallelDataCommand.js +3 -9
- package/dist-es/models/models_0.js +0 -25
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +741 -0
- package/dist-types/TranslateClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -24
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +2 -5
- package/dist-types/schemas/schemas_0.d.ts +107 -0
- package/dist-types/ts3.4/TranslateClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -16
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +113 -0
- package/package.json +5 -6
- package/dist-es/protocols/Aws_json1_1.js +0 -819
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -173
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -233
|
@@ -1,819 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { v4 as generateIdempotencyToken } from "@smithy/uuid";
|
|
5
|
-
import { ConcurrentModificationException, ConflictException, DetectedLanguageLowConfidenceException, InternalServerException, InvalidFilterException, InvalidParameterValueException, InvalidRequestException, LimitExceededException, ResourceNotFoundException, ServiceUnavailableException, TextSizeLimitExceededException, TooManyRequestsException, TooManyTagsException, UnsupportedDisplayLanguageCodeException, UnsupportedLanguagePairException, } from "../models/models_0";
|
|
6
|
-
import { TranslateServiceException as __BaseException } from "../models/TranslateServiceException";
|
|
7
|
-
export const se_CreateParallelDataCommand = async (input, context) => {
|
|
8
|
-
const headers = sharedHeaders("CreateParallelData");
|
|
9
|
-
let body;
|
|
10
|
-
body = JSON.stringify(se_CreateParallelDataRequest(input, context));
|
|
11
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
12
|
-
};
|
|
13
|
-
export const se_DeleteParallelDataCommand = async (input, context) => {
|
|
14
|
-
const headers = sharedHeaders("DeleteParallelData");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify(_json(input));
|
|
17
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
18
|
-
};
|
|
19
|
-
export const se_DeleteTerminologyCommand = async (input, context) => {
|
|
20
|
-
const headers = sharedHeaders("DeleteTerminology");
|
|
21
|
-
let body;
|
|
22
|
-
body = JSON.stringify(_json(input));
|
|
23
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
24
|
-
};
|
|
25
|
-
export const se_DescribeTextTranslationJobCommand = async (input, context) => {
|
|
26
|
-
const headers = sharedHeaders("DescribeTextTranslationJob");
|
|
27
|
-
let body;
|
|
28
|
-
body = JSON.stringify(_json(input));
|
|
29
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
30
|
-
};
|
|
31
|
-
export const se_GetParallelDataCommand = async (input, context) => {
|
|
32
|
-
const headers = sharedHeaders("GetParallelData");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify(_json(input));
|
|
35
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
-
};
|
|
37
|
-
export const se_GetTerminologyCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("GetTerminology");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify(_json(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
-
};
|
|
43
|
-
export const se_ImportTerminologyCommand = async (input, context) => {
|
|
44
|
-
const headers = sharedHeaders("ImportTerminology");
|
|
45
|
-
let body;
|
|
46
|
-
body = JSON.stringify(se_ImportTerminologyRequest(input, context));
|
|
47
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
-
};
|
|
49
|
-
export const se_ListLanguagesCommand = async (input, context) => {
|
|
50
|
-
const headers = sharedHeaders("ListLanguages");
|
|
51
|
-
let body;
|
|
52
|
-
body = JSON.stringify(_json(input));
|
|
53
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
54
|
-
};
|
|
55
|
-
export const se_ListParallelDataCommand = async (input, context) => {
|
|
56
|
-
const headers = sharedHeaders("ListParallelData");
|
|
57
|
-
let body;
|
|
58
|
-
body = JSON.stringify(_json(input));
|
|
59
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
60
|
-
};
|
|
61
|
-
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
62
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
63
|
-
let body;
|
|
64
|
-
body = JSON.stringify(_json(input));
|
|
65
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
|
-
};
|
|
67
|
-
export const se_ListTerminologiesCommand = async (input, context) => {
|
|
68
|
-
const headers = sharedHeaders("ListTerminologies");
|
|
69
|
-
let body;
|
|
70
|
-
body = JSON.stringify(_json(input));
|
|
71
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
72
|
-
};
|
|
73
|
-
export const se_ListTextTranslationJobsCommand = async (input, context) => {
|
|
74
|
-
const headers = sharedHeaders("ListTextTranslationJobs");
|
|
75
|
-
let body;
|
|
76
|
-
body = JSON.stringify(se_ListTextTranslationJobsRequest(input, context));
|
|
77
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
-
};
|
|
79
|
-
export const se_StartTextTranslationJobCommand = async (input, context) => {
|
|
80
|
-
const headers = sharedHeaders("StartTextTranslationJob");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify(se_StartTextTranslationJobRequest(input, context));
|
|
83
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
84
|
-
};
|
|
85
|
-
export const se_StopTextTranslationJobCommand = async (input, context) => {
|
|
86
|
-
const headers = sharedHeaders("StopTextTranslationJob");
|
|
87
|
-
let body;
|
|
88
|
-
body = JSON.stringify(_json(input));
|
|
89
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
-
};
|
|
91
|
-
export const se_TagResourceCommand = async (input, context) => {
|
|
92
|
-
const headers = sharedHeaders("TagResource");
|
|
93
|
-
let body;
|
|
94
|
-
body = JSON.stringify(_json(input));
|
|
95
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
96
|
-
};
|
|
97
|
-
export const se_TranslateDocumentCommand = async (input, context) => {
|
|
98
|
-
const headers = sharedHeaders("TranslateDocument");
|
|
99
|
-
let body;
|
|
100
|
-
body = JSON.stringify(se_TranslateDocumentRequest(input, context));
|
|
101
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
102
|
-
};
|
|
103
|
-
export const se_TranslateTextCommand = async (input, context) => {
|
|
104
|
-
const headers = sharedHeaders("TranslateText");
|
|
105
|
-
let body;
|
|
106
|
-
body = JSON.stringify(_json(input));
|
|
107
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
108
|
-
};
|
|
109
|
-
export const se_UntagResourceCommand = async (input, context) => {
|
|
110
|
-
const headers = sharedHeaders("UntagResource");
|
|
111
|
-
let body;
|
|
112
|
-
body = JSON.stringify(_json(input));
|
|
113
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
114
|
-
};
|
|
115
|
-
export const se_UpdateParallelDataCommand = async (input, context) => {
|
|
116
|
-
const headers = sharedHeaders("UpdateParallelData");
|
|
117
|
-
let body;
|
|
118
|
-
body = JSON.stringify(se_UpdateParallelDataRequest(input, context));
|
|
119
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
120
|
-
};
|
|
121
|
-
export const de_CreateParallelDataCommand = async (output, context) => {
|
|
122
|
-
if (output.statusCode >= 300) {
|
|
123
|
-
return de_CommandError(output, context);
|
|
124
|
-
}
|
|
125
|
-
const data = await parseBody(output.body, context);
|
|
126
|
-
let contents = {};
|
|
127
|
-
contents = _json(data);
|
|
128
|
-
const response = {
|
|
129
|
-
$metadata: deserializeMetadata(output),
|
|
130
|
-
...contents,
|
|
131
|
-
};
|
|
132
|
-
return response;
|
|
133
|
-
};
|
|
134
|
-
export const de_DeleteParallelDataCommand = async (output, context) => {
|
|
135
|
-
if (output.statusCode >= 300) {
|
|
136
|
-
return de_CommandError(output, context);
|
|
137
|
-
}
|
|
138
|
-
const data = await parseBody(output.body, context);
|
|
139
|
-
let contents = {};
|
|
140
|
-
contents = _json(data);
|
|
141
|
-
const response = {
|
|
142
|
-
$metadata: deserializeMetadata(output),
|
|
143
|
-
...contents,
|
|
144
|
-
};
|
|
145
|
-
return response;
|
|
146
|
-
};
|
|
147
|
-
export const de_DeleteTerminologyCommand = async (output, context) => {
|
|
148
|
-
if (output.statusCode >= 300) {
|
|
149
|
-
return de_CommandError(output, context);
|
|
150
|
-
}
|
|
151
|
-
await collectBody(output.body, context);
|
|
152
|
-
const response = {
|
|
153
|
-
$metadata: deserializeMetadata(output),
|
|
154
|
-
};
|
|
155
|
-
return response;
|
|
156
|
-
};
|
|
157
|
-
export const de_DescribeTextTranslationJobCommand = async (output, context) => {
|
|
158
|
-
if (output.statusCode >= 300) {
|
|
159
|
-
return de_CommandError(output, context);
|
|
160
|
-
}
|
|
161
|
-
const data = await parseBody(output.body, context);
|
|
162
|
-
let contents = {};
|
|
163
|
-
contents = de_DescribeTextTranslationJobResponse(data, context);
|
|
164
|
-
const response = {
|
|
165
|
-
$metadata: deserializeMetadata(output),
|
|
166
|
-
...contents,
|
|
167
|
-
};
|
|
168
|
-
return response;
|
|
169
|
-
};
|
|
170
|
-
export const de_GetParallelDataCommand = async (output, context) => {
|
|
171
|
-
if (output.statusCode >= 300) {
|
|
172
|
-
return de_CommandError(output, context);
|
|
173
|
-
}
|
|
174
|
-
const data = await parseBody(output.body, context);
|
|
175
|
-
let contents = {};
|
|
176
|
-
contents = de_GetParallelDataResponse(data, context);
|
|
177
|
-
const response = {
|
|
178
|
-
$metadata: deserializeMetadata(output),
|
|
179
|
-
...contents,
|
|
180
|
-
};
|
|
181
|
-
return response;
|
|
182
|
-
};
|
|
183
|
-
export const de_GetTerminologyCommand = async (output, context) => {
|
|
184
|
-
if (output.statusCode >= 300) {
|
|
185
|
-
return de_CommandError(output, context);
|
|
186
|
-
}
|
|
187
|
-
const data = await parseBody(output.body, context);
|
|
188
|
-
let contents = {};
|
|
189
|
-
contents = de_GetTerminologyResponse(data, context);
|
|
190
|
-
const response = {
|
|
191
|
-
$metadata: deserializeMetadata(output),
|
|
192
|
-
...contents,
|
|
193
|
-
};
|
|
194
|
-
return response;
|
|
195
|
-
};
|
|
196
|
-
export const de_ImportTerminologyCommand = async (output, context) => {
|
|
197
|
-
if (output.statusCode >= 300) {
|
|
198
|
-
return de_CommandError(output, context);
|
|
199
|
-
}
|
|
200
|
-
const data = await parseBody(output.body, context);
|
|
201
|
-
let contents = {};
|
|
202
|
-
contents = de_ImportTerminologyResponse(data, context);
|
|
203
|
-
const response = {
|
|
204
|
-
$metadata: deserializeMetadata(output),
|
|
205
|
-
...contents,
|
|
206
|
-
};
|
|
207
|
-
return response;
|
|
208
|
-
};
|
|
209
|
-
export const de_ListLanguagesCommand = async (output, context) => {
|
|
210
|
-
if (output.statusCode >= 300) {
|
|
211
|
-
return de_CommandError(output, context);
|
|
212
|
-
}
|
|
213
|
-
const data = await parseBody(output.body, context);
|
|
214
|
-
let contents = {};
|
|
215
|
-
contents = _json(data);
|
|
216
|
-
const response = {
|
|
217
|
-
$metadata: deserializeMetadata(output),
|
|
218
|
-
...contents,
|
|
219
|
-
};
|
|
220
|
-
return response;
|
|
221
|
-
};
|
|
222
|
-
export const de_ListParallelDataCommand = async (output, context) => {
|
|
223
|
-
if (output.statusCode >= 300) {
|
|
224
|
-
return de_CommandError(output, context);
|
|
225
|
-
}
|
|
226
|
-
const data = await parseBody(output.body, context);
|
|
227
|
-
let contents = {};
|
|
228
|
-
contents = de_ListParallelDataResponse(data, context);
|
|
229
|
-
const response = {
|
|
230
|
-
$metadata: deserializeMetadata(output),
|
|
231
|
-
...contents,
|
|
232
|
-
};
|
|
233
|
-
return response;
|
|
234
|
-
};
|
|
235
|
-
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
236
|
-
if (output.statusCode >= 300) {
|
|
237
|
-
return de_CommandError(output, context);
|
|
238
|
-
}
|
|
239
|
-
const data = await parseBody(output.body, context);
|
|
240
|
-
let contents = {};
|
|
241
|
-
contents = _json(data);
|
|
242
|
-
const response = {
|
|
243
|
-
$metadata: deserializeMetadata(output),
|
|
244
|
-
...contents,
|
|
245
|
-
};
|
|
246
|
-
return response;
|
|
247
|
-
};
|
|
248
|
-
export const de_ListTerminologiesCommand = async (output, context) => {
|
|
249
|
-
if (output.statusCode >= 300) {
|
|
250
|
-
return de_CommandError(output, context);
|
|
251
|
-
}
|
|
252
|
-
const data = await parseBody(output.body, context);
|
|
253
|
-
let contents = {};
|
|
254
|
-
contents = de_ListTerminologiesResponse(data, context);
|
|
255
|
-
const response = {
|
|
256
|
-
$metadata: deserializeMetadata(output),
|
|
257
|
-
...contents,
|
|
258
|
-
};
|
|
259
|
-
return response;
|
|
260
|
-
};
|
|
261
|
-
export const de_ListTextTranslationJobsCommand = async (output, context) => {
|
|
262
|
-
if (output.statusCode >= 300) {
|
|
263
|
-
return de_CommandError(output, context);
|
|
264
|
-
}
|
|
265
|
-
const data = await parseBody(output.body, context);
|
|
266
|
-
let contents = {};
|
|
267
|
-
contents = de_ListTextTranslationJobsResponse(data, context);
|
|
268
|
-
const response = {
|
|
269
|
-
$metadata: deserializeMetadata(output),
|
|
270
|
-
...contents,
|
|
271
|
-
};
|
|
272
|
-
return response;
|
|
273
|
-
};
|
|
274
|
-
export const de_StartTextTranslationJobCommand = async (output, context) => {
|
|
275
|
-
if (output.statusCode >= 300) {
|
|
276
|
-
return de_CommandError(output, context);
|
|
277
|
-
}
|
|
278
|
-
const data = await parseBody(output.body, context);
|
|
279
|
-
let contents = {};
|
|
280
|
-
contents = _json(data);
|
|
281
|
-
const response = {
|
|
282
|
-
$metadata: deserializeMetadata(output),
|
|
283
|
-
...contents,
|
|
284
|
-
};
|
|
285
|
-
return response;
|
|
286
|
-
};
|
|
287
|
-
export const de_StopTextTranslationJobCommand = async (output, context) => {
|
|
288
|
-
if (output.statusCode >= 300) {
|
|
289
|
-
return de_CommandError(output, context);
|
|
290
|
-
}
|
|
291
|
-
const data = await parseBody(output.body, context);
|
|
292
|
-
let contents = {};
|
|
293
|
-
contents = _json(data);
|
|
294
|
-
const response = {
|
|
295
|
-
$metadata: deserializeMetadata(output),
|
|
296
|
-
...contents,
|
|
297
|
-
};
|
|
298
|
-
return response;
|
|
299
|
-
};
|
|
300
|
-
export const de_TagResourceCommand = async (output, context) => {
|
|
301
|
-
if (output.statusCode >= 300) {
|
|
302
|
-
return de_CommandError(output, context);
|
|
303
|
-
}
|
|
304
|
-
const data = await parseBody(output.body, context);
|
|
305
|
-
let contents = {};
|
|
306
|
-
contents = _json(data);
|
|
307
|
-
const response = {
|
|
308
|
-
$metadata: deserializeMetadata(output),
|
|
309
|
-
...contents,
|
|
310
|
-
};
|
|
311
|
-
return response;
|
|
312
|
-
};
|
|
313
|
-
export const de_TranslateDocumentCommand = async (output, context) => {
|
|
314
|
-
if (output.statusCode >= 300) {
|
|
315
|
-
return de_CommandError(output, context);
|
|
316
|
-
}
|
|
317
|
-
const data = await parseBody(output.body, context);
|
|
318
|
-
let contents = {};
|
|
319
|
-
contents = de_TranslateDocumentResponse(data, context);
|
|
320
|
-
const response = {
|
|
321
|
-
$metadata: deserializeMetadata(output),
|
|
322
|
-
...contents,
|
|
323
|
-
};
|
|
324
|
-
return response;
|
|
325
|
-
};
|
|
326
|
-
export const de_TranslateTextCommand = async (output, context) => {
|
|
327
|
-
if (output.statusCode >= 300) {
|
|
328
|
-
return de_CommandError(output, context);
|
|
329
|
-
}
|
|
330
|
-
const data = await parseBody(output.body, context);
|
|
331
|
-
let contents = {};
|
|
332
|
-
contents = _json(data);
|
|
333
|
-
const response = {
|
|
334
|
-
$metadata: deserializeMetadata(output),
|
|
335
|
-
...contents,
|
|
336
|
-
};
|
|
337
|
-
return response;
|
|
338
|
-
};
|
|
339
|
-
export const de_UntagResourceCommand = async (output, context) => {
|
|
340
|
-
if (output.statusCode >= 300) {
|
|
341
|
-
return de_CommandError(output, context);
|
|
342
|
-
}
|
|
343
|
-
const data = await parseBody(output.body, context);
|
|
344
|
-
let contents = {};
|
|
345
|
-
contents = _json(data);
|
|
346
|
-
const response = {
|
|
347
|
-
$metadata: deserializeMetadata(output),
|
|
348
|
-
...contents,
|
|
349
|
-
};
|
|
350
|
-
return response;
|
|
351
|
-
};
|
|
352
|
-
export const de_UpdateParallelDataCommand = async (output, context) => {
|
|
353
|
-
if (output.statusCode >= 300) {
|
|
354
|
-
return de_CommandError(output, context);
|
|
355
|
-
}
|
|
356
|
-
const data = await parseBody(output.body, context);
|
|
357
|
-
let contents = {};
|
|
358
|
-
contents = de_UpdateParallelDataResponse(data, context);
|
|
359
|
-
const response = {
|
|
360
|
-
$metadata: deserializeMetadata(output),
|
|
361
|
-
...contents,
|
|
362
|
-
};
|
|
363
|
-
return response;
|
|
364
|
-
};
|
|
365
|
-
const de_CommandError = async (output, context) => {
|
|
366
|
-
const parsedOutput = {
|
|
367
|
-
...output,
|
|
368
|
-
body: await parseErrorBody(output.body, context),
|
|
369
|
-
};
|
|
370
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
371
|
-
switch (errorCode) {
|
|
372
|
-
case "ConcurrentModificationException":
|
|
373
|
-
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
374
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
375
|
-
case "ConflictException":
|
|
376
|
-
case "com.amazonaws.translate#ConflictException":
|
|
377
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
378
|
-
case "InternalServerException":
|
|
379
|
-
case "com.amazonaws.translate#InternalServerException":
|
|
380
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
381
|
-
case "InvalidParameterValueException":
|
|
382
|
-
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
383
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
384
|
-
case "InvalidRequestException":
|
|
385
|
-
case "com.amazonaws.translate#InvalidRequestException":
|
|
386
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
387
|
-
case "LimitExceededException":
|
|
388
|
-
case "com.amazonaws.translate#LimitExceededException":
|
|
389
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
390
|
-
case "TooManyRequestsException":
|
|
391
|
-
case "com.amazonaws.translate#TooManyRequestsException":
|
|
392
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
393
|
-
case "TooManyTagsException":
|
|
394
|
-
case "com.amazonaws.translate#TooManyTagsException":
|
|
395
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
396
|
-
case "ResourceNotFoundException":
|
|
397
|
-
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
398
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
399
|
-
case "UnsupportedDisplayLanguageCodeException":
|
|
400
|
-
case "com.amazonaws.translate#UnsupportedDisplayLanguageCodeException":
|
|
401
|
-
throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context);
|
|
402
|
-
case "InvalidFilterException":
|
|
403
|
-
case "com.amazonaws.translate#InvalidFilterException":
|
|
404
|
-
throw await de_InvalidFilterExceptionRes(parsedOutput, context);
|
|
405
|
-
case "UnsupportedLanguagePairException":
|
|
406
|
-
case "com.amazonaws.translate#UnsupportedLanguagePairException":
|
|
407
|
-
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
408
|
-
case "ServiceUnavailableException":
|
|
409
|
-
case "com.amazonaws.translate#ServiceUnavailableException":
|
|
410
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
411
|
-
case "DetectedLanguageLowConfidenceException":
|
|
412
|
-
case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
|
|
413
|
-
throw await de_DetectedLanguageLowConfidenceExceptionRes(parsedOutput, context);
|
|
414
|
-
case "TextSizeLimitExceededException":
|
|
415
|
-
case "com.amazonaws.translate#TextSizeLimitExceededException":
|
|
416
|
-
throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
|
|
417
|
-
default:
|
|
418
|
-
const parsedBody = parsedOutput.body;
|
|
419
|
-
return throwDefaultError({
|
|
420
|
-
output,
|
|
421
|
-
parsedBody,
|
|
422
|
-
errorCode,
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
};
|
|
426
|
-
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
427
|
-
const body = parsedOutput.body;
|
|
428
|
-
const deserialized = _json(body);
|
|
429
|
-
const exception = new ConcurrentModificationException({
|
|
430
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
431
|
-
...deserialized,
|
|
432
|
-
});
|
|
433
|
-
return __decorateServiceException(exception, body);
|
|
434
|
-
};
|
|
435
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
436
|
-
const body = parsedOutput.body;
|
|
437
|
-
const deserialized = _json(body);
|
|
438
|
-
const exception = new ConflictException({
|
|
439
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
440
|
-
...deserialized,
|
|
441
|
-
});
|
|
442
|
-
return __decorateServiceException(exception, body);
|
|
443
|
-
};
|
|
444
|
-
const de_DetectedLanguageLowConfidenceExceptionRes = async (parsedOutput, context) => {
|
|
445
|
-
const body = parsedOutput.body;
|
|
446
|
-
const deserialized = _json(body);
|
|
447
|
-
const exception = new DetectedLanguageLowConfidenceException({
|
|
448
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
449
|
-
...deserialized,
|
|
450
|
-
});
|
|
451
|
-
return __decorateServiceException(exception, body);
|
|
452
|
-
};
|
|
453
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
454
|
-
const body = parsedOutput.body;
|
|
455
|
-
const deserialized = _json(body);
|
|
456
|
-
const exception = new InternalServerException({
|
|
457
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
458
|
-
...deserialized,
|
|
459
|
-
});
|
|
460
|
-
return __decorateServiceException(exception, body);
|
|
461
|
-
};
|
|
462
|
-
const de_InvalidFilterExceptionRes = async (parsedOutput, context) => {
|
|
463
|
-
const body = parsedOutput.body;
|
|
464
|
-
const deserialized = _json(body);
|
|
465
|
-
const exception = new InvalidFilterException({
|
|
466
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
467
|
-
...deserialized,
|
|
468
|
-
});
|
|
469
|
-
return __decorateServiceException(exception, body);
|
|
470
|
-
};
|
|
471
|
-
const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
|
|
472
|
-
const body = parsedOutput.body;
|
|
473
|
-
const deserialized = _json(body);
|
|
474
|
-
const exception = new InvalidParameterValueException({
|
|
475
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
476
|
-
...deserialized,
|
|
477
|
-
});
|
|
478
|
-
return __decorateServiceException(exception, body);
|
|
479
|
-
};
|
|
480
|
-
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
481
|
-
const body = parsedOutput.body;
|
|
482
|
-
const deserialized = _json(body);
|
|
483
|
-
const exception = new InvalidRequestException({
|
|
484
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
485
|
-
...deserialized,
|
|
486
|
-
});
|
|
487
|
-
return __decorateServiceException(exception, body);
|
|
488
|
-
};
|
|
489
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
490
|
-
const body = parsedOutput.body;
|
|
491
|
-
const deserialized = _json(body);
|
|
492
|
-
const exception = new LimitExceededException({
|
|
493
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
494
|
-
...deserialized,
|
|
495
|
-
});
|
|
496
|
-
return __decorateServiceException(exception, body);
|
|
497
|
-
};
|
|
498
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
499
|
-
const body = parsedOutput.body;
|
|
500
|
-
const deserialized = _json(body);
|
|
501
|
-
const exception = new ResourceNotFoundException({
|
|
502
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
503
|
-
...deserialized,
|
|
504
|
-
});
|
|
505
|
-
return __decorateServiceException(exception, body);
|
|
506
|
-
};
|
|
507
|
-
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
508
|
-
const body = parsedOutput.body;
|
|
509
|
-
const deserialized = _json(body);
|
|
510
|
-
const exception = new ServiceUnavailableException({
|
|
511
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
512
|
-
...deserialized,
|
|
513
|
-
});
|
|
514
|
-
return __decorateServiceException(exception, body);
|
|
515
|
-
};
|
|
516
|
-
const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
517
|
-
const body = parsedOutput.body;
|
|
518
|
-
const deserialized = _json(body);
|
|
519
|
-
const exception = new TextSizeLimitExceededException({
|
|
520
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
521
|
-
...deserialized,
|
|
522
|
-
});
|
|
523
|
-
return __decorateServiceException(exception, body);
|
|
524
|
-
};
|
|
525
|
-
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
526
|
-
const body = parsedOutput.body;
|
|
527
|
-
const deserialized = _json(body);
|
|
528
|
-
const exception = new TooManyRequestsException({
|
|
529
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
530
|
-
...deserialized,
|
|
531
|
-
});
|
|
532
|
-
return __decorateServiceException(exception, body);
|
|
533
|
-
};
|
|
534
|
-
const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
535
|
-
const body = parsedOutput.body;
|
|
536
|
-
const deserialized = _json(body);
|
|
537
|
-
const exception = new TooManyTagsException({
|
|
538
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
539
|
-
...deserialized,
|
|
540
|
-
});
|
|
541
|
-
return __decorateServiceException(exception, body);
|
|
542
|
-
};
|
|
543
|
-
const de_UnsupportedDisplayLanguageCodeExceptionRes = async (parsedOutput, context) => {
|
|
544
|
-
const body = parsedOutput.body;
|
|
545
|
-
const deserialized = _json(body);
|
|
546
|
-
const exception = new UnsupportedDisplayLanguageCodeException({
|
|
547
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
548
|
-
...deserialized,
|
|
549
|
-
});
|
|
550
|
-
return __decorateServiceException(exception, body);
|
|
551
|
-
};
|
|
552
|
-
const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) => {
|
|
553
|
-
const body = parsedOutput.body;
|
|
554
|
-
const deserialized = _json(body);
|
|
555
|
-
const exception = new UnsupportedLanguagePairException({
|
|
556
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
557
|
-
...deserialized,
|
|
558
|
-
});
|
|
559
|
-
return __decorateServiceException(exception, body);
|
|
560
|
-
};
|
|
561
|
-
const se_CreateParallelDataRequest = (input, context) => {
|
|
562
|
-
return take(input, {
|
|
563
|
-
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
564
|
-
Description: [],
|
|
565
|
-
EncryptionKey: _json,
|
|
566
|
-
Name: [],
|
|
567
|
-
ParallelDataConfig: _json,
|
|
568
|
-
Tags: _json,
|
|
569
|
-
});
|
|
570
|
-
};
|
|
571
|
-
const se_Document = (input, context) => {
|
|
572
|
-
return take(input, {
|
|
573
|
-
Content: context.base64Encoder,
|
|
574
|
-
ContentType: [],
|
|
575
|
-
});
|
|
576
|
-
};
|
|
577
|
-
const se_ImportTerminologyRequest = (input, context) => {
|
|
578
|
-
return take(input, {
|
|
579
|
-
Description: [],
|
|
580
|
-
EncryptionKey: _json,
|
|
581
|
-
MergeStrategy: [],
|
|
582
|
-
Name: [],
|
|
583
|
-
Tags: _json,
|
|
584
|
-
TerminologyData: (_) => se_TerminologyData(_, context),
|
|
585
|
-
});
|
|
586
|
-
};
|
|
587
|
-
const se_ListTextTranslationJobsRequest = (input, context) => {
|
|
588
|
-
return take(input, {
|
|
589
|
-
Filter: (_) => se_TextTranslationJobFilter(_, context),
|
|
590
|
-
MaxResults: [],
|
|
591
|
-
NextToken: [],
|
|
592
|
-
});
|
|
593
|
-
};
|
|
594
|
-
const se_StartTextTranslationJobRequest = (input, context) => {
|
|
595
|
-
return take(input, {
|
|
596
|
-
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
597
|
-
DataAccessRoleArn: [],
|
|
598
|
-
InputDataConfig: _json,
|
|
599
|
-
JobName: [],
|
|
600
|
-
OutputDataConfig: _json,
|
|
601
|
-
ParallelDataNames: _json,
|
|
602
|
-
Settings: _json,
|
|
603
|
-
SourceLanguageCode: [],
|
|
604
|
-
TargetLanguageCodes: _json,
|
|
605
|
-
TerminologyNames: _json,
|
|
606
|
-
});
|
|
607
|
-
};
|
|
608
|
-
const se_TerminologyData = (input, context) => {
|
|
609
|
-
return take(input, {
|
|
610
|
-
Directionality: [],
|
|
611
|
-
File: context.base64Encoder,
|
|
612
|
-
Format: [],
|
|
613
|
-
});
|
|
614
|
-
};
|
|
615
|
-
const se_TextTranslationJobFilter = (input, context) => {
|
|
616
|
-
return take(input, {
|
|
617
|
-
JobName: [],
|
|
618
|
-
JobStatus: [],
|
|
619
|
-
SubmittedAfterTime: (_) => _.getTime() / 1_000,
|
|
620
|
-
SubmittedBeforeTime: (_) => _.getTime() / 1_000,
|
|
621
|
-
});
|
|
622
|
-
};
|
|
623
|
-
const se_TranslateDocumentRequest = (input, context) => {
|
|
624
|
-
return take(input, {
|
|
625
|
-
Document: (_) => se_Document(_, context),
|
|
626
|
-
Settings: _json,
|
|
627
|
-
SourceLanguageCode: [],
|
|
628
|
-
TargetLanguageCode: [],
|
|
629
|
-
TerminologyNames: _json,
|
|
630
|
-
});
|
|
631
|
-
};
|
|
632
|
-
const se_UpdateParallelDataRequest = (input, context) => {
|
|
633
|
-
return take(input, {
|
|
634
|
-
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
635
|
-
Description: [],
|
|
636
|
-
Name: [],
|
|
637
|
-
ParallelDataConfig: _json,
|
|
638
|
-
});
|
|
639
|
-
};
|
|
640
|
-
const de_DescribeTextTranslationJobResponse = (output, context) => {
|
|
641
|
-
return take(output, {
|
|
642
|
-
TextTranslationJobProperties: (_) => de_TextTranslationJobProperties(_, context),
|
|
643
|
-
});
|
|
644
|
-
};
|
|
645
|
-
const de_GetParallelDataResponse = (output, context) => {
|
|
646
|
-
return take(output, {
|
|
647
|
-
AuxiliaryDataLocation: _json,
|
|
648
|
-
DataLocation: _json,
|
|
649
|
-
LatestUpdateAttemptAuxiliaryDataLocation: _json,
|
|
650
|
-
ParallelDataProperties: (_) => de_ParallelDataProperties(_, context),
|
|
651
|
-
});
|
|
652
|
-
};
|
|
653
|
-
const de_GetTerminologyResponse = (output, context) => {
|
|
654
|
-
return take(output, {
|
|
655
|
-
AuxiliaryDataLocation: _json,
|
|
656
|
-
TerminologyDataLocation: _json,
|
|
657
|
-
TerminologyProperties: (_) => de_TerminologyProperties(_, context),
|
|
658
|
-
});
|
|
659
|
-
};
|
|
660
|
-
const de_ImportTerminologyResponse = (output, context) => {
|
|
661
|
-
return take(output, {
|
|
662
|
-
AuxiliaryDataLocation: _json,
|
|
663
|
-
TerminologyProperties: (_) => de_TerminologyProperties(_, context),
|
|
664
|
-
});
|
|
665
|
-
};
|
|
666
|
-
const de_ListParallelDataResponse = (output, context) => {
|
|
667
|
-
return take(output, {
|
|
668
|
-
NextToken: __expectString,
|
|
669
|
-
ParallelDataPropertiesList: (_) => de_ParallelDataPropertiesList(_, context),
|
|
670
|
-
});
|
|
671
|
-
};
|
|
672
|
-
const de_ListTerminologiesResponse = (output, context) => {
|
|
673
|
-
return take(output, {
|
|
674
|
-
NextToken: __expectString,
|
|
675
|
-
TerminologyPropertiesList: (_) => de_TerminologyPropertiesList(_, context),
|
|
676
|
-
});
|
|
677
|
-
};
|
|
678
|
-
const de_ListTextTranslationJobsResponse = (output, context) => {
|
|
679
|
-
return take(output, {
|
|
680
|
-
NextToken: __expectString,
|
|
681
|
-
TextTranslationJobPropertiesList: (_) => de_TextTranslationJobPropertiesList(_, context),
|
|
682
|
-
});
|
|
683
|
-
};
|
|
684
|
-
const de_ParallelDataProperties = (output, context) => {
|
|
685
|
-
return take(output, {
|
|
686
|
-
Arn: __expectString,
|
|
687
|
-
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
688
|
-
Description: __expectString,
|
|
689
|
-
EncryptionKey: _json,
|
|
690
|
-
FailedRecordCount: __expectLong,
|
|
691
|
-
ImportedDataSize: __expectLong,
|
|
692
|
-
ImportedRecordCount: __expectLong,
|
|
693
|
-
LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
694
|
-
LatestUpdateAttemptAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
695
|
-
LatestUpdateAttemptStatus: __expectString,
|
|
696
|
-
Message: __expectString,
|
|
697
|
-
Name: __expectString,
|
|
698
|
-
ParallelDataConfig: _json,
|
|
699
|
-
SkippedRecordCount: __expectLong,
|
|
700
|
-
SourceLanguageCode: __expectString,
|
|
701
|
-
Status: __expectString,
|
|
702
|
-
TargetLanguageCodes: _json,
|
|
703
|
-
});
|
|
704
|
-
};
|
|
705
|
-
const de_ParallelDataPropertiesList = (output, context) => {
|
|
706
|
-
const retVal = (output || [])
|
|
707
|
-
.filter((e) => e != null)
|
|
708
|
-
.map((entry) => {
|
|
709
|
-
return de_ParallelDataProperties(entry, context);
|
|
710
|
-
});
|
|
711
|
-
return retVal;
|
|
712
|
-
};
|
|
713
|
-
const de_TerminologyProperties = (output, context) => {
|
|
714
|
-
return take(output, {
|
|
715
|
-
Arn: __expectString,
|
|
716
|
-
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
717
|
-
Description: __expectString,
|
|
718
|
-
Directionality: __expectString,
|
|
719
|
-
EncryptionKey: _json,
|
|
720
|
-
Format: __expectString,
|
|
721
|
-
LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
722
|
-
Message: __expectString,
|
|
723
|
-
Name: __expectString,
|
|
724
|
-
SizeBytes: __expectInt32,
|
|
725
|
-
SkippedTermCount: __expectInt32,
|
|
726
|
-
SourceLanguageCode: __expectString,
|
|
727
|
-
TargetLanguageCodes: _json,
|
|
728
|
-
TermCount: __expectInt32,
|
|
729
|
-
});
|
|
730
|
-
};
|
|
731
|
-
const de_TerminologyPropertiesList = (output, context) => {
|
|
732
|
-
const retVal = (output || [])
|
|
733
|
-
.filter((e) => e != null)
|
|
734
|
-
.map((entry) => {
|
|
735
|
-
return de_TerminologyProperties(entry, context);
|
|
736
|
-
});
|
|
737
|
-
return retVal;
|
|
738
|
-
};
|
|
739
|
-
const de_TextTranslationJobProperties = (output, context) => {
|
|
740
|
-
return take(output, {
|
|
741
|
-
DataAccessRoleArn: __expectString,
|
|
742
|
-
EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
743
|
-
InputDataConfig: _json,
|
|
744
|
-
JobDetails: _json,
|
|
745
|
-
JobId: __expectString,
|
|
746
|
-
JobName: __expectString,
|
|
747
|
-
JobStatus: __expectString,
|
|
748
|
-
Message: __expectString,
|
|
749
|
-
OutputDataConfig: _json,
|
|
750
|
-
ParallelDataNames: _json,
|
|
751
|
-
Settings: _json,
|
|
752
|
-
SourceLanguageCode: __expectString,
|
|
753
|
-
SubmittedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
754
|
-
TargetLanguageCodes: _json,
|
|
755
|
-
TerminologyNames: _json,
|
|
756
|
-
});
|
|
757
|
-
};
|
|
758
|
-
const de_TextTranslationJobPropertiesList = (output, context) => {
|
|
759
|
-
const retVal = (output || [])
|
|
760
|
-
.filter((e) => e != null)
|
|
761
|
-
.map((entry) => {
|
|
762
|
-
return de_TextTranslationJobProperties(entry, context);
|
|
763
|
-
});
|
|
764
|
-
return retVal;
|
|
765
|
-
};
|
|
766
|
-
const de_TranslatedDocument = (output, context) => {
|
|
767
|
-
return take(output, {
|
|
768
|
-
Content: context.base64Decoder,
|
|
769
|
-
});
|
|
770
|
-
};
|
|
771
|
-
const de_TranslateDocumentResponse = (output, context) => {
|
|
772
|
-
return take(output, {
|
|
773
|
-
AppliedSettings: _json,
|
|
774
|
-
AppliedTerminologies: _json,
|
|
775
|
-
SourceLanguageCode: __expectString,
|
|
776
|
-
TargetLanguageCode: __expectString,
|
|
777
|
-
TranslatedDocument: (_) => de_TranslatedDocument(_, context),
|
|
778
|
-
});
|
|
779
|
-
};
|
|
780
|
-
const de_UpdateParallelDataResponse = (output, context) => {
|
|
781
|
-
return take(output, {
|
|
782
|
-
LatestUpdateAttemptAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
783
|
-
LatestUpdateAttemptStatus: __expectString,
|
|
784
|
-
Name: __expectString,
|
|
785
|
-
Status: __expectString,
|
|
786
|
-
});
|
|
787
|
-
};
|
|
788
|
-
const deserializeMetadata = (output) => ({
|
|
789
|
-
httpStatusCode: output.statusCode,
|
|
790
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
791
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
792
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
793
|
-
});
|
|
794
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
795
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
796
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
797
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
798
|
-
const contents = {
|
|
799
|
-
protocol,
|
|
800
|
-
hostname,
|
|
801
|
-
port,
|
|
802
|
-
method: "POST",
|
|
803
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
804
|
-
headers,
|
|
805
|
-
};
|
|
806
|
-
if (resolvedHostname !== undefined) {
|
|
807
|
-
contents.hostname = resolvedHostname;
|
|
808
|
-
}
|
|
809
|
-
if (body !== undefined) {
|
|
810
|
-
contents.body = body;
|
|
811
|
-
}
|
|
812
|
-
return new __HttpRequest(contents);
|
|
813
|
-
};
|
|
814
|
-
function sharedHeaders(operation) {
|
|
815
|
-
return {
|
|
816
|
-
"content-type": "application/x-amz-json-1.1",
|
|
817
|
-
"x-amz-target": `AWSShineFrontendService_20170701.${operation}`,
|
|
818
|
-
};
|
|
819
|
-
}
|