@aws-sdk/client-translate 3.179.0 → 3.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist-cjs/Translate.js +45 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +36 -0
- package/dist-cjs/commands/TagResourceCommand.js +36 -0
- package/dist-cjs/commands/UntagResourceCommand.js +36 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/models/models_0.js +50 -8
- package/dist-cjs/protocols/Aws_json1_1.js +275 -16
- package/dist-es/Translate.js +45 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +39 -0
- package/dist-es/commands/TagResourceCommand.js +39 -0
- package/dist-es/commands/UntagResourceCommand.js +39 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/models/models_0.js +29 -9
- package/dist-es/protocols/Aws_json1_1.js +378 -58
- package/dist-types/Translate.d.ts +12 -0
- package/dist-types/TranslateClient.d.ts +5 -2
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +18 -0
- package/dist-types/commands/TagResourceCommand.d.ts +18 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +18 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/models/models_0.d.ts +69 -8
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/Translate.d.ts +51 -0
- package/dist-types/ts3.4/TranslateClient.d.ts +18 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +36 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/models/models_0.d.ts +56 -7
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +36 -0
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_json1_1UpdateParallelDataCommand = exports.deserializeAws_json1_1TranslateTextCommand = exports.deserializeAws_json1_1StopTextTranslationJobCommand = exports.deserializeAws_json1_1StartTextTranslationJobCommand = exports.deserializeAws_json1_1ListTextTranslationJobsCommand = exports.deserializeAws_json1_1ListTerminologiesCommand = exports.deserializeAws_json1_1ListParallelDataCommand = exports.deserializeAws_json1_1ListLanguagesCommand = exports.deserializeAws_json1_1ImportTerminologyCommand = exports.deserializeAws_json1_1GetTerminologyCommand = exports.deserializeAws_json1_1GetParallelDataCommand = exports.deserializeAws_json1_1DescribeTextTranslationJobCommand = exports.deserializeAws_json1_1DeleteTerminologyCommand = exports.deserializeAws_json1_1DeleteParallelDataCommand = exports.deserializeAws_json1_1CreateParallelDataCommand = exports.serializeAws_json1_1UpdateParallelDataCommand = exports.serializeAws_json1_1TranslateTextCommand = exports.serializeAws_json1_1StopTextTranslationJobCommand = exports.serializeAws_json1_1StartTextTranslationJobCommand = exports.serializeAws_json1_1ListTextTranslationJobsCommand = exports.serializeAws_json1_1ListTerminologiesCommand = exports.serializeAws_json1_1ListParallelDataCommand = exports.serializeAws_json1_1ListLanguagesCommand = exports.serializeAws_json1_1ImportTerminologyCommand = exports.serializeAws_json1_1GetTerminologyCommand = exports.serializeAws_json1_1GetParallelDataCommand = exports.serializeAws_json1_1DescribeTextTranslationJobCommand = exports.serializeAws_json1_1DeleteTerminologyCommand = exports.serializeAws_json1_1DeleteParallelDataCommand = exports.serializeAws_json1_1CreateParallelDataCommand = void 0;
|
|
3
|
+
exports.deserializeAws_json1_1UpdateParallelDataCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TranslateTextCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1StopTextTranslationJobCommand = exports.deserializeAws_json1_1StartTextTranslationJobCommand = exports.deserializeAws_json1_1ListTextTranslationJobsCommand = exports.deserializeAws_json1_1ListTerminologiesCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1ListParallelDataCommand = exports.deserializeAws_json1_1ListLanguagesCommand = exports.deserializeAws_json1_1ImportTerminologyCommand = exports.deserializeAws_json1_1GetTerminologyCommand = exports.deserializeAws_json1_1GetParallelDataCommand = exports.deserializeAws_json1_1DescribeTextTranslationJobCommand = exports.deserializeAws_json1_1DeleteTerminologyCommand = exports.deserializeAws_json1_1DeleteParallelDataCommand = exports.deserializeAws_json1_1CreateParallelDataCommand = exports.serializeAws_json1_1UpdateParallelDataCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TranslateTextCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1StopTextTranslationJobCommand = exports.serializeAws_json1_1StartTextTranslationJobCommand = exports.serializeAws_json1_1ListTextTranslationJobsCommand = exports.serializeAws_json1_1ListTerminologiesCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1ListParallelDataCommand = exports.serializeAws_json1_1ListLanguagesCommand = exports.serializeAws_json1_1ImportTerminologyCommand = exports.serializeAws_json1_1GetTerminologyCommand = exports.serializeAws_json1_1GetParallelDataCommand = exports.serializeAws_json1_1DescribeTextTranslationJobCommand = exports.serializeAws_json1_1DeleteTerminologyCommand = exports.serializeAws_json1_1DeleteParallelDataCommand = exports.serializeAws_json1_1CreateParallelDataCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
@@ -96,6 +96,16 @@ const serializeAws_json1_1ListParallelDataCommand = async (input, context) => {
|
|
|
96
96
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
97
|
};
|
|
98
98
|
exports.serializeAws_json1_1ListParallelDataCommand = serializeAws_json1_1ListParallelDataCommand;
|
|
99
|
+
const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
|
|
100
|
+
const headers = {
|
|
101
|
+
"content-type": "application/x-amz-json-1.1",
|
|
102
|
+
"x-amz-target": "AWSShineFrontendService_20170701.ListTagsForResource",
|
|
103
|
+
};
|
|
104
|
+
let body;
|
|
105
|
+
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
|
|
106
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
107
|
+
};
|
|
108
|
+
exports.serializeAws_json1_1ListTagsForResourceCommand = serializeAws_json1_1ListTagsForResourceCommand;
|
|
99
109
|
const serializeAws_json1_1ListTerminologiesCommand = async (input, context) => {
|
|
100
110
|
const headers = {
|
|
101
111
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -136,6 +146,16 @@ const serializeAws_json1_1StopTextTranslationJobCommand = async (input, context)
|
|
|
136
146
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
137
147
|
};
|
|
138
148
|
exports.serializeAws_json1_1StopTextTranslationJobCommand = serializeAws_json1_1StopTextTranslationJobCommand;
|
|
149
|
+
const serializeAws_json1_1TagResourceCommand = async (input, context) => {
|
|
150
|
+
const headers = {
|
|
151
|
+
"content-type": "application/x-amz-json-1.1",
|
|
152
|
+
"x-amz-target": "AWSShineFrontendService_20170701.TagResource",
|
|
153
|
+
};
|
|
154
|
+
let body;
|
|
155
|
+
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
|
|
156
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
157
|
+
};
|
|
158
|
+
exports.serializeAws_json1_1TagResourceCommand = serializeAws_json1_1TagResourceCommand;
|
|
139
159
|
const serializeAws_json1_1TranslateTextCommand = async (input, context) => {
|
|
140
160
|
const headers = {
|
|
141
161
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -146,6 +166,16 @@ const serializeAws_json1_1TranslateTextCommand = async (input, context) => {
|
|
|
146
166
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
147
167
|
};
|
|
148
168
|
exports.serializeAws_json1_1TranslateTextCommand = serializeAws_json1_1TranslateTextCommand;
|
|
169
|
+
const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
|
|
170
|
+
const headers = {
|
|
171
|
+
"content-type": "application/x-amz-json-1.1",
|
|
172
|
+
"x-amz-target": "AWSShineFrontendService_20170701.UntagResource",
|
|
173
|
+
};
|
|
174
|
+
let body;
|
|
175
|
+
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
|
|
176
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
177
|
+
};
|
|
178
|
+
exports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand;
|
|
149
179
|
const serializeAws_json1_1UpdateParallelDataCommand = async (input, context) => {
|
|
150
180
|
const headers = {
|
|
151
181
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -173,10 +203,13 @@ exports.deserializeAws_json1_1CreateParallelDataCommand = deserializeAws_json1_1
|
|
|
173
203
|
const deserializeAws_json1_1CreateParallelDataCommandError = async (output, context) => {
|
|
174
204
|
const parsedOutput = {
|
|
175
205
|
...output,
|
|
176
|
-
body: await
|
|
206
|
+
body: await parseErrorBody(output.body, context),
|
|
177
207
|
};
|
|
178
208
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
179
209
|
switch (errorCode) {
|
|
210
|
+
case "ConcurrentModificationException":
|
|
211
|
+
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
212
|
+
throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
180
213
|
case "ConflictException":
|
|
181
214
|
case "com.amazonaws.translate#ConflictException":
|
|
182
215
|
throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
|
|
@@ -195,6 +228,9 @@ const deserializeAws_json1_1CreateParallelDataCommandError = async (output, cont
|
|
|
195
228
|
case "TooManyRequestsException":
|
|
196
229
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
197
230
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
231
|
+
case "TooManyTagsException":
|
|
232
|
+
case "com.amazonaws.translate#TooManyTagsException":
|
|
233
|
+
throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
198
234
|
default:
|
|
199
235
|
const parsedBody = parsedOutput.body;
|
|
200
236
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -222,7 +258,7 @@ exports.deserializeAws_json1_1DeleteParallelDataCommand = deserializeAws_json1_1
|
|
|
222
258
|
const deserializeAws_json1_1DeleteParallelDataCommandError = async (output, context) => {
|
|
223
259
|
const parsedOutput = {
|
|
224
260
|
...output,
|
|
225
|
-
body: await
|
|
261
|
+
body: await parseErrorBody(output.body, context),
|
|
226
262
|
};
|
|
227
263
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
228
264
|
switch (errorCode) {
|
|
@@ -262,7 +298,7 @@ exports.deserializeAws_json1_1DeleteTerminologyCommand = deserializeAws_json1_1D
|
|
|
262
298
|
const deserializeAws_json1_1DeleteTerminologyCommandError = async (output, context) => {
|
|
263
299
|
const parsedOutput = {
|
|
264
300
|
...output,
|
|
265
|
-
body: await
|
|
301
|
+
body: await parseErrorBody(output.body, context),
|
|
266
302
|
};
|
|
267
303
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
268
304
|
switch (errorCode) {
|
|
@@ -305,7 +341,7 @@ exports.deserializeAws_json1_1DescribeTextTranslationJobCommand = deserializeAws
|
|
|
305
341
|
const deserializeAws_json1_1DescribeTextTranslationJobCommandError = async (output, context) => {
|
|
306
342
|
const parsedOutput = {
|
|
307
343
|
...output,
|
|
308
|
-
body: await
|
|
344
|
+
body: await parseErrorBody(output.body, context),
|
|
309
345
|
};
|
|
310
346
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
311
347
|
switch (errorCode) {
|
|
@@ -345,7 +381,7 @@ exports.deserializeAws_json1_1GetParallelDataCommand = deserializeAws_json1_1Get
|
|
|
345
381
|
const deserializeAws_json1_1GetParallelDataCommandError = async (output, context) => {
|
|
346
382
|
const parsedOutput = {
|
|
347
383
|
...output,
|
|
348
|
-
body: await
|
|
384
|
+
body: await parseErrorBody(output.body, context),
|
|
349
385
|
};
|
|
350
386
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
351
387
|
switch (errorCode) {
|
|
@@ -388,7 +424,7 @@ exports.deserializeAws_json1_1GetTerminologyCommand = deserializeAws_json1_1GetT
|
|
|
388
424
|
const deserializeAws_json1_1GetTerminologyCommandError = async (output, context) => {
|
|
389
425
|
const parsedOutput = {
|
|
390
426
|
...output,
|
|
391
|
-
body: await
|
|
427
|
+
body: await parseErrorBody(output.body, context),
|
|
392
428
|
};
|
|
393
429
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
394
430
|
switch (errorCode) {
|
|
@@ -431,10 +467,13 @@ exports.deserializeAws_json1_1ImportTerminologyCommand = deserializeAws_json1_1I
|
|
|
431
467
|
const deserializeAws_json1_1ImportTerminologyCommandError = async (output, context) => {
|
|
432
468
|
const parsedOutput = {
|
|
433
469
|
...output,
|
|
434
|
-
body: await
|
|
470
|
+
body: await parseErrorBody(output.body, context),
|
|
435
471
|
};
|
|
436
472
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
437
473
|
switch (errorCode) {
|
|
474
|
+
case "ConcurrentModificationException":
|
|
475
|
+
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
476
|
+
throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
438
477
|
case "InternalServerException":
|
|
439
478
|
case "com.amazonaws.translate#InternalServerException":
|
|
440
479
|
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
@@ -447,6 +486,9 @@ const deserializeAws_json1_1ImportTerminologyCommandError = async (output, conte
|
|
|
447
486
|
case "TooManyRequestsException":
|
|
448
487
|
case "com.amazonaws.translate#TooManyRequestsException":
|
|
449
488
|
throw await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
489
|
+
case "TooManyTagsException":
|
|
490
|
+
case "com.amazonaws.translate#TooManyTagsException":
|
|
491
|
+
throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
450
492
|
default:
|
|
451
493
|
const parsedBody = parsedOutput.body;
|
|
452
494
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -474,7 +516,7 @@ exports.deserializeAws_json1_1ListLanguagesCommand = deserializeAws_json1_1ListL
|
|
|
474
516
|
const deserializeAws_json1_1ListLanguagesCommandError = async (output, context) => {
|
|
475
517
|
const parsedOutput = {
|
|
476
518
|
...output,
|
|
477
|
-
body: await
|
|
519
|
+
body: await parseErrorBody(output.body, context),
|
|
478
520
|
};
|
|
479
521
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
480
522
|
switch (errorCode) {
|
|
@@ -517,7 +559,7 @@ exports.deserializeAws_json1_1ListParallelDataCommand = deserializeAws_json1_1Li
|
|
|
517
559
|
const deserializeAws_json1_1ListParallelDataCommandError = async (output, context) => {
|
|
518
560
|
const parsedOutput = {
|
|
519
561
|
...output,
|
|
520
|
-
body: await
|
|
562
|
+
body: await parseErrorBody(output.body, context),
|
|
521
563
|
};
|
|
522
564
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
523
565
|
switch (errorCode) {
|
|
@@ -540,6 +582,46 @@ const deserializeAws_json1_1ListParallelDataCommandError = async (output, contex
|
|
|
540
582
|
});
|
|
541
583
|
}
|
|
542
584
|
};
|
|
585
|
+
const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
|
|
586
|
+
if (output.statusCode >= 300) {
|
|
587
|
+
return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
|
|
588
|
+
}
|
|
589
|
+
const data = await parseBody(output.body, context);
|
|
590
|
+
let contents = {};
|
|
591
|
+
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
|
|
592
|
+
const response = {
|
|
593
|
+
$metadata: deserializeMetadata(output),
|
|
594
|
+
...contents,
|
|
595
|
+
};
|
|
596
|
+
return Promise.resolve(response);
|
|
597
|
+
};
|
|
598
|
+
exports.deserializeAws_json1_1ListTagsForResourceCommand = deserializeAws_json1_1ListTagsForResourceCommand;
|
|
599
|
+
const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
|
|
600
|
+
const parsedOutput = {
|
|
601
|
+
...output,
|
|
602
|
+
body: await parseErrorBody(output.body, context),
|
|
603
|
+
};
|
|
604
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
605
|
+
switch (errorCode) {
|
|
606
|
+
case "InternalServerException":
|
|
607
|
+
case "com.amazonaws.translate#InternalServerException":
|
|
608
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
609
|
+
case "InvalidParameterValueException":
|
|
610
|
+
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
611
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
612
|
+
case "ResourceNotFoundException":
|
|
613
|
+
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
614
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
615
|
+
default:
|
|
616
|
+
const parsedBody = parsedOutput.body;
|
|
617
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
618
|
+
output,
|
|
619
|
+
parsedBody,
|
|
620
|
+
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
621
|
+
errorCode,
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
};
|
|
543
625
|
const deserializeAws_json1_1ListTerminologiesCommand = async (output, context) => {
|
|
544
626
|
if (output.statusCode >= 300) {
|
|
545
627
|
return deserializeAws_json1_1ListTerminologiesCommandError(output, context);
|
|
@@ -557,7 +639,7 @@ exports.deserializeAws_json1_1ListTerminologiesCommand = deserializeAws_json1_1L
|
|
|
557
639
|
const deserializeAws_json1_1ListTerminologiesCommandError = async (output, context) => {
|
|
558
640
|
const parsedOutput = {
|
|
559
641
|
...output,
|
|
560
|
-
body: await
|
|
642
|
+
body: await parseErrorBody(output.body, context),
|
|
561
643
|
};
|
|
562
644
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
563
645
|
switch (errorCode) {
|
|
@@ -597,7 +679,7 @@ exports.deserializeAws_json1_1ListTextTranslationJobsCommand = deserializeAws_js
|
|
|
597
679
|
const deserializeAws_json1_1ListTextTranslationJobsCommandError = async (output, context) => {
|
|
598
680
|
const parsedOutput = {
|
|
599
681
|
...output,
|
|
600
|
-
body: await
|
|
682
|
+
body: await parseErrorBody(output.body, context),
|
|
601
683
|
};
|
|
602
684
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
603
685
|
switch (errorCode) {
|
|
@@ -640,7 +722,7 @@ exports.deserializeAws_json1_1StartTextTranslationJobCommand = deserializeAws_js
|
|
|
640
722
|
const deserializeAws_json1_1StartTextTranslationJobCommandError = async (output, context) => {
|
|
641
723
|
const parsedOutput = {
|
|
642
724
|
...output,
|
|
643
|
-
body: await
|
|
725
|
+
body: await parseErrorBody(output.body, context),
|
|
644
726
|
};
|
|
645
727
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
646
728
|
switch (errorCode) {
|
|
@@ -689,7 +771,7 @@ exports.deserializeAws_json1_1StopTextTranslationJobCommand = deserializeAws_jso
|
|
|
689
771
|
const deserializeAws_json1_1StopTextTranslationJobCommandError = async (output, context) => {
|
|
690
772
|
const parsedOutput = {
|
|
691
773
|
...output,
|
|
692
|
-
body: await
|
|
774
|
+
body: await parseErrorBody(output.body, context),
|
|
693
775
|
};
|
|
694
776
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
695
777
|
switch (errorCode) {
|
|
@@ -712,6 +794,52 @@ const deserializeAws_json1_1StopTextTranslationJobCommandError = async (output,
|
|
|
712
794
|
});
|
|
713
795
|
}
|
|
714
796
|
};
|
|
797
|
+
const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
|
|
798
|
+
if (output.statusCode >= 300) {
|
|
799
|
+
return deserializeAws_json1_1TagResourceCommandError(output, context);
|
|
800
|
+
}
|
|
801
|
+
const data = await parseBody(output.body, context);
|
|
802
|
+
let contents = {};
|
|
803
|
+
contents = deserializeAws_json1_1TagResourceResponse(data, context);
|
|
804
|
+
const response = {
|
|
805
|
+
$metadata: deserializeMetadata(output),
|
|
806
|
+
...contents,
|
|
807
|
+
};
|
|
808
|
+
return Promise.resolve(response);
|
|
809
|
+
};
|
|
810
|
+
exports.deserializeAws_json1_1TagResourceCommand = deserializeAws_json1_1TagResourceCommand;
|
|
811
|
+
const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
|
|
812
|
+
const parsedOutput = {
|
|
813
|
+
...output,
|
|
814
|
+
body: await parseErrorBody(output.body, context),
|
|
815
|
+
};
|
|
816
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
817
|
+
switch (errorCode) {
|
|
818
|
+
case "ConcurrentModificationException":
|
|
819
|
+
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
820
|
+
throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
821
|
+
case "InternalServerException":
|
|
822
|
+
case "com.amazonaws.translate#InternalServerException":
|
|
823
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
824
|
+
case "InvalidParameterValueException":
|
|
825
|
+
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
826
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
827
|
+
case "ResourceNotFoundException":
|
|
828
|
+
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
829
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
830
|
+
case "TooManyTagsException":
|
|
831
|
+
case "com.amazonaws.translate#TooManyTagsException":
|
|
832
|
+
throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
833
|
+
default:
|
|
834
|
+
const parsedBody = parsedOutput.body;
|
|
835
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
836
|
+
output,
|
|
837
|
+
parsedBody,
|
|
838
|
+
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
839
|
+
errorCode,
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
};
|
|
715
843
|
const deserializeAws_json1_1TranslateTextCommand = async (output, context) => {
|
|
716
844
|
if (output.statusCode >= 300) {
|
|
717
845
|
return deserializeAws_json1_1TranslateTextCommandError(output, context);
|
|
@@ -729,7 +857,7 @@ exports.deserializeAws_json1_1TranslateTextCommand = deserializeAws_json1_1Trans
|
|
|
729
857
|
const deserializeAws_json1_1TranslateTextCommandError = async (output, context) => {
|
|
730
858
|
const parsedOutput = {
|
|
731
859
|
...output,
|
|
732
|
-
body: await
|
|
860
|
+
body: await parseErrorBody(output.body, context),
|
|
733
861
|
};
|
|
734
862
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
735
863
|
switch (errorCode) {
|
|
@@ -767,6 +895,49 @@ const deserializeAws_json1_1TranslateTextCommandError = async (output, context)
|
|
|
767
895
|
});
|
|
768
896
|
}
|
|
769
897
|
};
|
|
898
|
+
const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
|
|
899
|
+
if (output.statusCode >= 300) {
|
|
900
|
+
return deserializeAws_json1_1UntagResourceCommandError(output, context);
|
|
901
|
+
}
|
|
902
|
+
const data = await parseBody(output.body, context);
|
|
903
|
+
let contents = {};
|
|
904
|
+
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
|
|
905
|
+
const response = {
|
|
906
|
+
$metadata: deserializeMetadata(output),
|
|
907
|
+
...contents,
|
|
908
|
+
};
|
|
909
|
+
return Promise.resolve(response);
|
|
910
|
+
};
|
|
911
|
+
exports.deserializeAws_json1_1UntagResourceCommand = deserializeAws_json1_1UntagResourceCommand;
|
|
912
|
+
const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
|
|
913
|
+
const parsedOutput = {
|
|
914
|
+
...output,
|
|
915
|
+
body: await parseErrorBody(output.body, context),
|
|
916
|
+
};
|
|
917
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
918
|
+
switch (errorCode) {
|
|
919
|
+
case "ConcurrentModificationException":
|
|
920
|
+
case "com.amazonaws.translate#ConcurrentModificationException":
|
|
921
|
+
throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
922
|
+
case "InternalServerException":
|
|
923
|
+
case "com.amazonaws.translate#InternalServerException":
|
|
924
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
925
|
+
case "InvalidParameterValueException":
|
|
926
|
+
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
927
|
+
throw await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
928
|
+
case "ResourceNotFoundException":
|
|
929
|
+
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
930
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
931
|
+
default:
|
|
932
|
+
const parsedBody = parsedOutput.body;
|
|
933
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
934
|
+
output,
|
|
935
|
+
parsedBody,
|
|
936
|
+
exceptionCtor: TranslateServiceException_1.TranslateServiceException,
|
|
937
|
+
errorCode,
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
};
|
|
770
941
|
const deserializeAws_json1_1UpdateParallelDataCommand = async (output, context) => {
|
|
771
942
|
if (output.statusCode >= 300) {
|
|
772
943
|
return deserializeAws_json1_1UpdateParallelDataCommandError(output, context);
|
|
@@ -784,7 +955,7 @@ exports.deserializeAws_json1_1UpdateParallelDataCommand = deserializeAws_json1_1
|
|
|
784
955
|
const deserializeAws_json1_1UpdateParallelDataCommandError = async (output, context) => {
|
|
785
956
|
const parsedOutput = {
|
|
786
957
|
...output,
|
|
787
|
-
body: await
|
|
958
|
+
body: await parseErrorBody(output.body, context),
|
|
788
959
|
};
|
|
789
960
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
790
961
|
switch (errorCode) {
|
|
@@ -930,6 +1101,15 @@ const deserializeAws_json1_1TooManyRequestsExceptionResponse = async (parsedOutp
|
|
|
930
1101
|
});
|
|
931
1102
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
932
1103
|
};
|
|
1104
|
+
const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
|
|
1105
|
+
const body = parsedOutput.body;
|
|
1106
|
+
const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
|
|
1107
|
+
const exception = new models_0_1.TooManyTagsException({
|
|
1108
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1109
|
+
...deserialized,
|
|
1110
|
+
});
|
|
1111
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1112
|
+
};
|
|
933
1113
|
const deserializeAws_json1_1UnsupportedDisplayLanguageCodeExceptionResponse = async (parsedOutput, context) => {
|
|
934
1114
|
const body = parsedOutput.body;
|
|
935
1115
|
const deserialized = deserializeAws_json1_1UnsupportedDisplayLanguageCodeException(body, context);
|
|
@@ -960,6 +1140,7 @@ const serializeAws_json1_1CreateParallelDataRequest = (input, context) => {
|
|
|
960
1140
|
...(input.ParallelDataConfig != null && {
|
|
961
1141
|
ParallelDataConfig: serializeAws_json1_1ParallelDataConfig(input.ParallelDataConfig, context),
|
|
962
1142
|
}),
|
|
1143
|
+
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
963
1144
|
};
|
|
964
1145
|
};
|
|
965
1146
|
const serializeAws_json1_1DeleteParallelDataRequest = (input, context) => {
|
|
@@ -1002,6 +1183,7 @@ const serializeAws_json1_1ImportTerminologyRequest = (input, context) => {
|
|
|
1002
1183
|
}),
|
|
1003
1184
|
...(input.MergeStrategy != null && { MergeStrategy: input.MergeStrategy }),
|
|
1004
1185
|
...(input.Name != null && { Name: input.Name }),
|
|
1186
|
+
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
1005
1187
|
...(input.TerminologyData != null && {
|
|
1006
1188
|
TerminologyData: serializeAws_json1_1TerminologyData(input.TerminologyData, context),
|
|
1007
1189
|
}),
|
|
@@ -1026,6 +1208,11 @@ const serializeAws_json1_1ListParallelDataRequest = (input, context) => {
|
|
|
1026
1208
|
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1027
1209
|
};
|
|
1028
1210
|
};
|
|
1211
|
+
const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
|
|
1212
|
+
return {
|
|
1213
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1214
|
+
};
|
|
1215
|
+
};
|
|
1029
1216
|
const serializeAws_json1_1ListTerminologiesRequest = (input, context) => {
|
|
1030
1217
|
return {
|
|
1031
1218
|
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
@@ -1090,6 +1277,32 @@ const serializeAws_json1_1StopTextTranslationJobRequest = (input, context) => {
|
|
|
1090
1277
|
...(input.JobId != null && { JobId: input.JobId }),
|
|
1091
1278
|
};
|
|
1092
1279
|
};
|
|
1280
|
+
const serializeAws_json1_1Tag = (input, context) => {
|
|
1281
|
+
return {
|
|
1282
|
+
...(input.Key != null && { Key: input.Key }),
|
|
1283
|
+
...(input.Value != null && { Value: input.Value }),
|
|
1284
|
+
};
|
|
1285
|
+
};
|
|
1286
|
+
const serializeAws_json1_1TagKeyList = (input, context) => {
|
|
1287
|
+
return input
|
|
1288
|
+
.filter((e) => e != null)
|
|
1289
|
+
.map((entry) => {
|
|
1290
|
+
return entry;
|
|
1291
|
+
});
|
|
1292
|
+
};
|
|
1293
|
+
const serializeAws_json1_1TagList = (input, context) => {
|
|
1294
|
+
return input
|
|
1295
|
+
.filter((e) => e != null)
|
|
1296
|
+
.map((entry) => {
|
|
1297
|
+
return serializeAws_json1_1Tag(entry, context);
|
|
1298
|
+
});
|
|
1299
|
+
};
|
|
1300
|
+
const serializeAws_json1_1TagResourceRequest = (input, context) => {
|
|
1301
|
+
return {
|
|
1302
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1303
|
+
...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
|
|
1304
|
+
};
|
|
1305
|
+
};
|
|
1093
1306
|
const serializeAws_json1_1TargetLanguageCodeStringList = (input, context) => {
|
|
1094
1307
|
return input
|
|
1095
1308
|
.filter((e) => e != null)
|
|
@@ -1133,6 +1346,12 @@ const serializeAws_json1_1TranslationSettings = (input, context) => {
|
|
|
1133
1346
|
...(input.Profanity != null && { Profanity: input.Profanity }),
|
|
1134
1347
|
};
|
|
1135
1348
|
};
|
|
1349
|
+
const serializeAws_json1_1UntagResourceRequest = (input, context) => {
|
|
1350
|
+
return {
|
|
1351
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1352
|
+
...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
|
|
1353
|
+
};
|
|
1354
|
+
};
|
|
1136
1355
|
const serializeAws_json1_1UpdateParallelDataRequest = (input, context) => {
|
|
1137
1356
|
var _a;
|
|
1138
1357
|
return {
|
|
@@ -1322,6 +1541,11 @@ const deserializeAws_json1_1ListParallelDataResponse = (output, context) => {
|
|
|
1322
1541
|
: undefined,
|
|
1323
1542
|
};
|
|
1324
1543
|
};
|
|
1544
|
+
const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
|
|
1545
|
+
return {
|
|
1546
|
+
Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
|
|
1547
|
+
};
|
|
1548
|
+
};
|
|
1325
1549
|
const deserializeAws_json1_1ListTerminologiesResponse = (output, context) => {
|
|
1326
1550
|
return {
|
|
1327
1551
|
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
@@ -1429,6 +1653,26 @@ const deserializeAws_json1_1StopTextTranslationJobResponse = (output, context) =
|
|
|
1429
1653
|
JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
|
|
1430
1654
|
};
|
|
1431
1655
|
};
|
|
1656
|
+
const deserializeAws_json1_1Tag = (output, context) => {
|
|
1657
|
+
return {
|
|
1658
|
+
Key: (0, smithy_client_1.expectString)(output.Key),
|
|
1659
|
+
Value: (0, smithy_client_1.expectString)(output.Value),
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1662
|
+
const deserializeAws_json1_1TagList = (output, context) => {
|
|
1663
|
+
const retVal = (output || [])
|
|
1664
|
+
.filter((e) => e != null)
|
|
1665
|
+
.map((entry) => {
|
|
1666
|
+
if (entry === null) {
|
|
1667
|
+
return null;
|
|
1668
|
+
}
|
|
1669
|
+
return deserializeAws_json1_1Tag(entry, context);
|
|
1670
|
+
});
|
|
1671
|
+
return retVal;
|
|
1672
|
+
};
|
|
1673
|
+
const deserializeAws_json1_1TagResourceResponse = (output, context) => {
|
|
1674
|
+
return {};
|
|
1675
|
+
};
|
|
1432
1676
|
const deserializeAws_json1_1TargetLanguageCodeStringList = (output, context) => {
|
|
1433
1677
|
const retVal = (output || [])
|
|
1434
1678
|
.filter((e) => e != null)
|
|
@@ -1548,6 +1792,12 @@ const deserializeAws_json1_1TooManyRequestsException = (output, context) => {
|
|
|
1548
1792
|
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1549
1793
|
};
|
|
1550
1794
|
};
|
|
1795
|
+
const deserializeAws_json1_1TooManyTagsException = (output, context) => {
|
|
1796
|
+
return {
|
|
1797
|
+
ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
|
|
1798
|
+
message: (0, smithy_client_1.expectString)(output.message),
|
|
1799
|
+
};
|
|
1800
|
+
};
|
|
1551
1801
|
const deserializeAws_json1_1TranslateTextResponse = (output, context) => {
|
|
1552
1802
|
return {
|
|
1553
1803
|
AppliedSettings: output.AppliedSettings != null
|
|
@@ -1580,6 +1830,9 @@ const deserializeAws_json1_1UnsupportedLanguagePairException = (output, context)
|
|
|
1580
1830
|
TargetLanguageCode: (0, smithy_client_1.expectString)(output.TargetLanguageCode),
|
|
1581
1831
|
};
|
|
1582
1832
|
};
|
|
1833
|
+
const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
|
|
1834
|
+
return {};
|
|
1835
|
+
};
|
|
1583
1836
|
const deserializeAws_json1_1UpdateParallelDataResponse = (output, context) => {
|
|
1584
1837
|
return {
|
|
1585
1838
|
LatestUpdateAttemptAt: output.LatestUpdateAttemptAt != null
|
|
@@ -1630,6 +1883,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1630
1883
|
}
|
|
1631
1884
|
return {};
|
|
1632
1885
|
});
|
|
1886
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1887
|
+
var _a;
|
|
1888
|
+
const value = await parseBody(errorBody, context);
|
|
1889
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1890
|
+
return value;
|
|
1891
|
+
};
|
|
1633
1892
|
const loadRestJsonErrorCode = (output, data) => {
|
|
1634
1893
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1635
1894
|
const sanitizeErrorCode = (rawValue) => {
|
package/dist-es/Translate.js
CHANGED
|
@@ -8,11 +8,14 @@ import { GetTerminologyCommand, } from "./commands/GetTerminologyCommand";
|
|
|
8
8
|
import { ImportTerminologyCommand, } from "./commands/ImportTerminologyCommand";
|
|
9
9
|
import { ListLanguagesCommand, } from "./commands/ListLanguagesCommand";
|
|
10
10
|
import { ListParallelDataCommand, } from "./commands/ListParallelDataCommand";
|
|
11
|
+
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
11
12
|
import { ListTerminologiesCommand, } from "./commands/ListTerminologiesCommand";
|
|
12
13
|
import { ListTextTranslationJobsCommand, } from "./commands/ListTextTranslationJobsCommand";
|
|
13
14
|
import { StartTextTranslationJobCommand, } from "./commands/StartTextTranslationJobCommand";
|
|
14
15
|
import { StopTextTranslationJobCommand, } from "./commands/StopTextTranslationJobCommand";
|
|
16
|
+
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
15
17
|
import { TranslateTextCommand, } from "./commands/TranslateTextCommand";
|
|
18
|
+
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
16
19
|
import { UpdateParallelDataCommand, } from "./commands/UpdateParallelDataCommand";
|
|
17
20
|
import { TranslateClient } from "./TranslateClient";
|
|
18
21
|
var Translate = (function (_super) {
|
|
@@ -146,6 +149,20 @@ var Translate = (function (_super) {
|
|
|
146
149
|
return this.send(command, optionsOrCb);
|
|
147
150
|
}
|
|
148
151
|
};
|
|
152
|
+
Translate.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
|
|
153
|
+
var command = new ListTagsForResourceCommand(args);
|
|
154
|
+
if (typeof optionsOrCb === "function") {
|
|
155
|
+
this.send(command, optionsOrCb);
|
|
156
|
+
}
|
|
157
|
+
else if (typeof cb === "function") {
|
|
158
|
+
if (typeof optionsOrCb !== "object")
|
|
159
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
160
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
return this.send(command, optionsOrCb);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
149
166
|
Translate.prototype.listTerminologies = function (args, optionsOrCb, cb) {
|
|
150
167
|
var command = new ListTerminologiesCommand(args);
|
|
151
168
|
if (typeof optionsOrCb === "function") {
|
|
@@ -202,6 +219,20 @@ var Translate = (function (_super) {
|
|
|
202
219
|
return this.send(command, optionsOrCb);
|
|
203
220
|
}
|
|
204
221
|
};
|
|
222
|
+
Translate.prototype.tagResource = function (args, optionsOrCb, cb) {
|
|
223
|
+
var command = new TagResourceCommand(args);
|
|
224
|
+
if (typeof optionsOrCb === "function") {
|
|
225
|
+
this.send(command, optionsOrCb);
|
|
226
|
+
}
|
|
227
|
+
else if (typeof cb === "function") {
|
|
228
|
+
if (typeof optionsOrCb !== "object")
|
|
229
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
230
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
return this.send(command, optionsOrCb);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
205
236
|
Translate.prototype.translateText = function (args, optionsOrCb, cb) {
|
|
206
237
|
var command = new TranslateTextCommand(args);
|
|
207
238
|
if (typeof optionsOrCb === "function") {
|
|
@@ -216,6 +247,20 @@ var Translate = (function (_super) {
|
|
|
216
247
|
return this.send(command, optionsOrCb);
|
|
217
248
|
}
|
|
218
249
|
};
|
|
250
|
+
Translate.prototype.untagResource = function (args, optionsOrCb, cb) {
|
|
251
|
+
var command = new UntagResourceCommand(args);
|
|
252
|
+
if (typeof optionsOrCb === "function") {
|
|
253
|
+
this.send(command, optionsOrCb);
|
|
254
|
+
}
|
|
255
|
+
else if (typeof cb === "function") {
|
|
256
|
+
if (typeof optionsOrCb !== "object")
|
|
257
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
258
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
return this.send(command, optionsOrCb);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
219
264
|
Translate.prototype.updateParallelData = function (args, optionsOrCb, cb) {
|
|
220
265
|
var command = new UpdateParallelDataCommand(args);
|
|
221
266
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { ListTagsForResourceRequestFilterSensitiveLog, ListTagsForResourceResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1ListTagsForResourceCommand, serializeAws_json1_1ListTagsForResourceCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
var ListTagsForResourceCommand = (function (_super) {
|
|
7
|
+
__extends(ListTagsForResourceCommand, _super);
|
|
8
|
+
function ListTagsForResourceCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
ListTagsForResourceCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "TranslateClient";
|
|
18
|
+
var commandName = "ListTagsForResourceCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: ListTagsForResourceRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: ListTagsForResourceResponseFilterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
ListTagsForResourceCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_json1_1ListTagsForResourceCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
ListTagsForResourceCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_json1_1ListTagsForResourceCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return ListTagsForResourceCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { ListTagsForResourceCommand };
|