@aws-sdk/client-translate 3.35.0 → 3.38.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 +47 -0
- package/dist-cjs/Translate.js +0 -5
- package/dist-cjs/TranslateClient.js +0 -10
- package/dist-cjs/commands/CreateParallelDataCommand.js +0 -28
- package/dist-cjs/commands/DeleteParallelDataCommand.js +0 -25
- package/dist-cjs/commands/DeleteTerminologyCommand.js +0 -25
- package/dist-cjs/commands/DescribeTextTranslationJobCommand.js +0 -26
- package/dist-cjs/commands/GetParallelDataCommand.js +0 -25
- package/dist-cjs/commands/GetTerminologyCommand.js +0 -25
- package/dist-cjs/commands/ImportTerminologyCommand.js +0 -32
- package/dist-cjs/commands/ListParallelDataCommand.js +0 -25
- package/dist-cjs/commands/ListTerminologiesCommand.js +0 -25
- package/dist-cjs/commands/ListTextTranslationJobsCommand.js +0 -25
- package/dist-cjs/commands/StartTextTranslationJobCommand.js +0 -32
- package/dist-cjs/commands/StopTextTranslationJobCommand.js +0 -31
- package/dist-cjs/commands/TranslateTextCommand.js +0 -26
- package/dist-cjs/commands/UpdateParallelDataCommand.js +0 -26
- package/dist-cjs/commands/index.js +17 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -21
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -163
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListParallelDataPaginator.js +0 -11
- package/dist-cjs/pagination/ListTerminologiesPaginator.js +0 -11
- package/dist-cjs/pagination/ListTextTranslationJobsPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_1.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/Translate.js +0 -1
- package/dist-es/TranslateClient.js +0 -1
- package/dist-es/commands/CreateParallelDataCommand.js +0 -1
- package/dist-es/commands/DeleteParallelDataCommand.js +0 -1
- package/dist-es/commands/DeleteTerminologyCommand.js +0 -1
- package/dist-es/commands/DescribeTextTranslationJobCommand.js +0 -1
- package/dist-es/commands/GetParallelDataCommand.js +0 -1
- package/dist-es/commands/GetTerminologyCommand.js +0 -1
- package/dist-es/commands/ImportTerminologyCommand.js +0 -1
- package/dist-es/commands/ListParallelDataCommand.js +0 -1
- package/dist-es/commands/ListTerminologiesCommand.js +0 -1
- package/dist-es/commands/ListTextTranslationJobsCommand.js +0 -1
- package/dist-es/commands/StartTextTranslationJobCommand.js +0 -1
- package/dist-es/commands/StopTextTranslationJobCommand.js +0 -1
- package/dist-es/commands/TranslateTextCommand.js +0 -1
- package/dist-es/commands/UpdateParallelDataCommand.js +0 -1
- package/dist-es/commands/index.js +14 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -21
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListParallelDataPaginator.js +0 -1
- package/dist-es/pagination/ListTerminologiesPaginator.js +0 -1
- package/dist-es/pagination/ListTextTranslationJobsPaginator.js +0 -1
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-types/commands/index.d.ts +14 -0
- package/dist-types/index.d.ts +4 -20
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/Translate.d.ts +15 -72
- package/dist-types/ts3.4/TranslateClient.d.ts +24 -90
- package/dist-types/ts3.4/commands/CreateParallelDataCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/DeleteParallelDataCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DeleteTerminologyCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeTextTranslationJobCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/GetParallelDataCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetTerminologyCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ImportTerminologyCommand.d.ts +2 -27
- package/dist-types/ts3.4/commands/ListParallelDataCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListTerminologiesCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListTextTranslationJobsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/StartTextTranslationJobCommand.d.ts +2 -27
- package/dist-types/ts3.4/commands/StopTextTranslationJobCommand.d.ts +2 -26
- package/dist-types/ts3.4/commands/TranslateTextCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/UpdateParallelDataCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/index.d.ts +14 -0
- package/dist-types/ts3.4/index.d.ts +4 -20
- package/dist-types/ts3.4/models/models_0.d.ts +220 -824
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +33 -30
- package/dist-cjs/Translate.js.map +0 -1
- package/dist-cjs/TranslateClient.js.map +0 -1
- package/dist-cjs/commands/CreateParallelDataCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteParallelDataCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteTerminologyCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeTextTranslationJobCommand.js.map +0 -1
- package/dist-cjs/commands/GetParallelDataCommand.js.map +0 -1
- package/dist-cjs/commands/GetTerminologyCommand.js.map +0 -1
- package/dist-cjs/commands/ImportTerminologyCommand.js.map +0 -1
- package/dist-cjs/commands/ListParallelDataCommand.js.map +0 -1
- package/dist-cjs/commands/ListTerminologiesCommand.js.map +0 -1
- package/dist-cjs/commands/ListTextTranslationJobsCommand.js.map +0 -1
- package/dist-cjs/commands/StartTextTranslationJobCommand.js.map +0 -1
- package/dist-cjs/commands/StopTextTranslationJobCommand.js.map +0 -1
- package/dist-cjs/commands/TranslateTextCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateParallelDataCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListParallelDataPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListTerminologiesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListTextTranslationJobsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/Translate.js.map +0 -1
- package/dist-es/TranslateClient.js.map +0 -1
- package/dist-es/commands/CreateParallelDataCommand.js.map +0 -1
- package/dist-es/commands/DeleteParallelDataCommand.js.map +0 -1
- package/dist-es/commands/DeleteTerminologyCommand.js.map +0 -1
- package/dist-es/commands/DescribeTextTranslationJobCommand.js.map +0 -1
- package/dist-es/commands/GetParallelDataCommand.js.map +0 -1
- package/dist-es/commands/GetTerminologyCommand.js.map +0 -1
- package/dist-es/commands/ImportTerminologyCommand.js.map +0 -1
- package/dist-es/commands/ListParallelDataCommand.js.map +0 -1
- package/dist-es/commands/ListTerminologiesCommand.js.map +0 -1
- package/dist-es/commands/ListTextTranslationJobsCommand.js.map +0 -1
- package/dist-es/commands/StartTextTranslationJobCommand.js.map +0 -1
- package/dist-es/commands/StopTextTranslationJobCommand.js.map +0 -1
- package/dist-es/commands/TranslateTextCommand.js.map +0 -1
- package/dist-es/commands/UpdateParallelDataCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListParallelDataPaginator.js.map +0 -1
- package/dist-es/pagination/ListTerminologiesPaginator.js.map +0 -1
- package/dist-es/pagination/ListTextTranslationJobsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_json1_1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/Translate.ts +0 -553
- package/src/TranslateClient.ts +0 -291
- package/src/commands/CreateParallelDataCommand.ts +0 -98
- package/src/commands/DeleteParallelDataCommand.ts +0 -95
- package/src/commands/DeleteTerminologyCommand.ts +0 -95
- package/src/commands/DescribeTextTranslationJobCommand.ts +0 -99
- package/src/commands/GetParallelDataCommand.ts +0 -95
- package/src/commands/GetTerminologyCommand.ts +0 -95
- package/src/commands/ImportTerminologyCommand.ts +0 -102
- package/src/commands/ListParallelDataCommand.ts +0 -95
- package/src/commands/ListTerminologiesCommand.ts +0 -95
- package/src/commands/ListTextTranslationJobsCommand.ts +0 -95
- package/src/commands/StartTextTranslationJobCommand.ts +0 -102
- package/src/commands/StopTextTranslationJobCommand.ts +0 -101
- package/src/commands/TranslateTextCommand.ts +0 -96
- package/src/commands/UpdateParallelDataCommand.ts +0 -96
- package/src/endpoints.ts +0 -77
- package/src/index.ts +0 -21
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1625
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListParallelDataPaginator.ts +0 -59
- package/src/pagination/ListTerminologiesPaginator.ts +0 -59
- package/src/pagination/ListTextTranslationJobsPaginator.ts +0 -59
- package/src/protocols/Aws_json1_1.ts +0 -2523
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
2
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
5
|
-
FinalizeHandlerArguments,
|
|
6
|
-
Handler,
|
|
7
|
-
HandlerExecutionContext,
|
|
8
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
9
|
-
MetadataBearer as __MetadataBearer,
|
|
10
|
-
MiddlewareStack,
|
|
11
|
-
SerdeContext as __SerdeContext,
|
|
12
|
-
} from "@aws-sdk/types";
|
|
13
|
-
|
|
14
|
-
import { StopTextTranslationJobRequest, StopTextTranslationJobResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1StopTextTranslationJobCommand,
|
|
17
|
-
serializeAws_json1_1StopTextTranslationJobCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface StopTextTranslationJobCommandInput extends StopTextTranslationJobRequest {}
|
|
22
|
-
export interface StopTextTranslationJobCommandOutput extends StopTextTranslationJobResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Stops an asynchronous batch translation job that is in progress.</p>
|
|
26
|
-
* <p>If the job's state is <code>IN_PROGRESS</code>, the job will be marked for termination and
|
|
27
|
-
* put into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped,
|
|
28
|
-
* it is put into the <code>COMPLETED</code> state. Otherwise, the job is put into the
|
|
29
|
-
* <code>STOPPED</code> state.</p>
|
|
30
|
-
* <p>Asynchronous batch translation jobs are started with the <a>StartTextTranslationJob</a> operation. You can use the <a>DescribeTextTranslationJob</a> or <a>ListTextTranslationJobs</a>
|
|
31
|
-
* operations to get a batch translation job's <code>JobId</code>.</p>
|
|
32
|
-
* @example
|
|
33
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
34
|
-
* ```javascript
|
|
35
|
-
* import { TranslateClient, StopTextTranslationJobCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
36
|
-
* // const { TranslateClient, StopTextTranslationJobCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
37
|
-
* const client = new TranslateClient(config);
|
|
38
|
-
* const command = new StopTextTranslationJobCommand(input);
|
|
39
|
-
* const response = await client.send(command);
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @see {@link StopTextTranslationJobCommandInput} for command's `input` shape.
|
|
43
|
-
* @see {@link StopTextTranslationJobCommandOutput} for command's `response` shape.
|
|
44
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
45
|
-
*
|
|
46
|
-
*/
|
|
47
|
-
export class StopTextTranslationJobCommand extends $Command<
|
|
48
|
-
StopTextTranslationJobCommandInput,
|
|
49
|
-
StopTextTranslationJobCommandOutput,
|
|
50
|
-
TranslateClientResolvedConfig
|
|
51
|
-
> {
|
|
52
|
-
// Start section: command_properties
|
|
53
|
-
// End section: command_properties
|
|
54
|
-
|
|
55
|
-
constructor(readonly input: StopTextTranslationJobCommandInput) {
|
|
56
|
-
// Start section: command_constructor
|
|
57
|
-
super();
|
|
58
|
-
// End section: command_constructor
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @internal
|
|
63
|
-
*/
|
|
64
|
-
resolveMiddleware(
|
|
65
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
66
|
-
configuration: TranslateClientResolvedConfig,
|
|
67
|
-
options?: __HttpHandlerOptions
|
|
68
|
-
): Handler<StopTextTranslationJobCommandInput, StopTextTranslationJobCommandOutput> {
|
|
69
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
70
|
-
|
|
71
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
72
|
-
|
|
73
|
-
const { logger } = configuration;
|
|
74
|
-
const clientName = "TranslateClient";
|
|
75
|
-
const commandName = "StopTextTranslationJobCommand";
|
|
76
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
77
|
-
logger,
|
|
78
|
-
clientName,
|
|
79
|
-
commandName,
|
|
80
|
-
inputFilterSensitiveLog: StopTextTranslationJobRequest.filterSensitiveLog,
|
|
81
|
-
outputFilterSensitiveLog: StopTextTranslationJobResponse.filterSensitiveLog,
|
|
82
|
-
};
|
|
83
|
-
const { requestHandler } = configuration;
|
|
84
|
-
return stack.resolve(
|
|
85
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
86
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
87
|
-
handlerExecutionContext
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
private serialize(input: StopTextTranslationJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
92
|
-
return serializeAws_json1_1StopTextTranslationJobCommand(input, context);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<StopTextTranslationJobCommandOutput> {
|
|
96
|
-
return deserializeAws_json1_1StopTextTranslationJobCommand(output, context);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Start section: command_body_extra
|
|
100
|
-
// End section: command_body_extra
|
|
101
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
2
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
5
|
-
FinalizeHandlerArguments,
|
|
6
|
-
Handler,
|
|
7
|
-
HandlerExecutionContext,
|
|
8
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
9
|
-
MetadataBearer as __MetadataBearer,
|
|
10
|
-
MiddlewareStack,
|
|
11
|
-
SerdeContext as __SerdeContext,
|
|
12
|
-
} from "@aws-sdk/types";
|
|
13
|
-
|
|
14
|
-
import { TranslateTextRequest, TranslateTextResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1TranslateTextCommand,
|
|
17
|
-
serializeAws_json1_1TranslateTextCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface TranslateTextCommandInput extends TranslateTextRequest {}
|
|
22
|
-
export interface TranslateTextCommandOutput extends TranslateTextResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Translates input text from the source language to the target language. For a list of
|
|
26
|
-
* available languages and language codes, see <a>what-is-languages</a>.</p>
|
|
27
|
-
* @example
|
|
28
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
29
|
-
* ```javascript
|
|
30
|
-
* import { TranslateClient, TranslateTextCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
31
|
-
* // const { TranslateClient, TranslateTextCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
32
|
-
* const client = new TranslateClient(config);
|
|
33
|
-
* const command = new TranslateTextCommand(input);
|
|
34
|
-
* const response = await client.send(command);
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @see {@link TranslateTextCommandInput} for command's `input` shape.
|
|
38
|
-
* @see {@link TranslateTextCommandOutput} for command's `response` shape.
|
|
39
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
export class TranslateTextCommand extends $Command<
|
|
43
|
-
TranslateTextCommandInput,
|
|
44
|
-
TranslateTextCommandOutput,
|
|
45
|
-
TranslateClientResolvedConfig
|
|
46
|
-
> {
|
|
47
|
-
// Start section: command_properties
|
|
48
|
-
// End section: command_properties
|
|
49
|
-
|
|
50
|
-
constructor(readonly input: TranslateTextCommandInput) {
|
|
51
|
-
// Start section: command_constructor
|
|
52
|
-
super();
|
|
53
|
-
// End section: command_constructor
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @internal
|
|
58
|
-
*/
|
|
59
|
-
resolveMiddleware(
|
|
60
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
61
|
-
configuration: TranslateClientResolvedConfig,
|
|
62
|
-
options?: __HttpHandlerOptions
|
|
63
|
-
): Handler<TranslateTextCommandInput, TranslateTextCommandOutput> {
|
|
64
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
65
|
-
|
|
66
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
67
|
-
|
|
68
|
-
const { logger } = configuration;
|
|
69
|
-
const clientName = "TranslateClient";
|
|
70
|
-
const commandName = "TranslateTextCommand";
|
|
71
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
72
|
-
logger,
|
|
73
|
-
clientName,
|
|
74
|
-
commandName,
|
|
75
|
-
inputFilterSensitiveLog: TranslateTextRequest.filterSensitiveLog,
|
|
76
|
-
outputFilterSensitiveLog: TranslateTextResponse.filterSensitiveLog,
|
|
77
|
-
};
|
|
78
|
-
const { requestHandler } = configuration;
|
|
79
|
-
return stack.resolve(
|
|
80
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
81
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
82
|
-
handlerExecutionContext
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
private serialize(input: TranslateTextCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
87
|
-
return serializeAws_json1_1TranslateTextCommand(input, context);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<TranslateTextCommandOutput> {
|
|
91
|
-
return deserializeAws_json1_1TranslateTextCommand(output, context);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Start section: command_body_extra
|
|
95
|
-
// End section: command_body_extra
|
|
96
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
2
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
5
|
-
FinalizeHandlerArguments,
|
|
6
|
-
Handler,
|
|
7
|
-
HandlerExecutionContext,
|
|
8
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
9
|
-
MetadataBearer as __MetadataBearer,
|
|
10
|
-
MiddlewareStack,
|
|
11
|
-
SerdeContext as __SerdeContext,
|
|
12
|
-
} from "@aws-sdk/types";
|
|
13
|
-
|
|
14
|
-
import { UpdateParallelDataRequest, UpdateParallelDataResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1UpdateParallelDataCommand,
|
|
17
|
-
serializeAws_json1_1UpdateParallelDataCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface UpdateParallelDataCommandInput extends UpdateParallelDataRequest {}
|
|
22
|
-
export interface UpdateParallelDataCommandOutput extends UpdateParallelDataResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Updates a previously created parallel data resource by importing a new input file from
|
|
26
|
-
* Amazon S3.</p>
|
|
27
|
-
* @example
|
|
28
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
29
|
-
* ```javascript
|
|
30
|
-
* import { TranslateClient, UpdateParallelDataCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
31
|
-
* // const { TranslateClient, UpdateParallelDataCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
32
|
-
* const client = new TranslateClient(config);
|
|
33
|
-
* const command = new UpdateParallelDataCommand(input);
|
|
34
|
-
* const response = await client.send(command);
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @see {@link UpdateParallelDataCommandInput} for command's `input` shape.
|
|
38
|
-
* @see {@link UpdateParallelDataCommandOutput} for command's `response` shape.
|
|
39
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
export class UpdateParallelDataCommand extends $Command<
|
|
43
|
-
UpdateParallelDataCommandInput,
|
|
44
|
-
UpdateParallelDataCommandOutput,
|
|
45
|
-
TranslateClientResolvedConfig
|
|
46
|
-
> {
|
|
47
|
-
// Start section: command_properties
|
|
48
|
-
// End section: command_properties
|
|
49
|
-
|
|
50
|
-
constructor(readonly input: UpdateParallelDataCommandInput) {
|
|
51
|
-
// Start section: command_constructor
|
|
52
|
-
super();
|
|
53
|
-
// End section: command_constructor
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @internal
|
|
58
|
-
*/
|
|
59
|
-
resolveMiddleware(
|
|
60
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
61
|
-
configuration: TranslateClientResolvedConfig,
|
|
62
|
-
options?: __HttpHandlerOptions
|
|
63
|
-
): Handler<UpdateParallelDataCommandInput, UpdateParallelDataCommandOutput> {
|
|
64
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
65
|
-
|
|
66
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
67
|
-
|
|
68
|
-
const { logger } = configuration;
|
|
69
|
-
const clientName = "TranslateClient";
|
|
70
|
-
const commandName = "UpdateParallelDataCommand";
|
|
71
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
72
|
-
logger,
|
|
73
|
-
clientName,
|
|
74
|
-
commandName,
|
|
75
|
-
inputFilterSensitiveLog: UpdateParallelDataRequest.filterSensitiveLog,
|
|
76
|
-
outputFilterSensitiveLog: UpdateParallelDataResponse.filterSensitiveLog,
|
|
77
|
-
};
|
|
78
|
-
const { requestHandler } = configuration;
|
|
79
|
-
return stack.resolve(
|
|
80
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
81
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
82
|
-
handlerExecutionContext
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
private serialize(input: UpdateParallelDataCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
87
|
-
return serializeAws_json1_1UpdateParallelDataCommand(input, context);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<UpdateParallelDataCommandOutput> {
|
|
91
|
-
return deserializeAws_json1_1UpdateParallelDataCommand(output, context);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Start section: command_body_extra
|
|
95
|
-
// End section: command_body_extra
|
|
96
|
-
}
|
package/src/endpoints.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver";
|
|
2
|
-
import { RegionInfoProvider } from "@aws-sdk/types";
|
|
3
|
-
|
|
4
|
-
const regionHash: RegionHash = {
|
|
5
|
-
"us-east-1-fips": {
|
|
6
|
-
hostname: "translate-fips.us-east-1.amazonaws.com",
|
|
7
|
-
signingRegion: "us-east-1",
|
|
8
|
-
},
|
|
9
|
-
"us-east-2-fips": {
|
|
10
|
-
hostname: "translate-fips.us-east-2.amazonaws.com",
|
|
11
|
-
signingRegion: "us-east-2",
|
|
12
|
-
},
|
|
13
|
-
"us-gov-west-1-fips": {
|
|
14
|
-
hostname: "translate-fips.us-gov-west-1.amazonaws.com",
|
|
15
|
-
signingRegion: "us-gov-west-1",
|
|
16
|
-
},
|
|
17
|
-
"us-west-2-fips": {
|
|
18
|
-
hostname: "translate-fips.us-west-2.amazonaws.com",
|
|
19
|
-
signingRegion: "us-west-2",
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const partitionHash: PartitionHash = {
|
|
24
|
-
aws: {
|
|
25
|
-
regions: [
|
|
26
|
-
"af-south-1",
|
|
27
|
-
"ap-east-1",
|
|
28
|
-
"ap-northeast-1",
|
|
29
|
-
"ap-northeast-2",
|
|
30
|
-
"ap-northeast-3",
|
|
31
|
-
"ap-south-1",
|
|
32
|
-
"ap-southeast-1",
|
|
33
|
-
"ap-southeast-2",
|
|
34
|
-
"ca-central-1",
|
|
35
|
-
"eu-central-1",
|
|
36
|
-
"eu-north-1",
|
|
37
|
-
"eu-south-1",
|
|
38
|
-
"eu-west-1",
|
|
39
|
-
"eu-west-2",
|
|
40
|
-
"eu-west-3",
|
|
41
|
-
"me-south-1",
|
|
42
|
-
"sa-east-1",
|
|
43
|
-
"us-east-1",
|
|
44
|
-
"us-east-1-fips",
|
|
45
|
-
"us-east-2",
|
|
46
|
-
"us-east-2-fips",
|
|
47
|
-
"us-west-1",
|
|
48
|
-
"us-west-2",
|
|
49
|
-
"us-west-2-fips",
|
|
50
|
-
],
|
|
51
|
-
hostname: "translate.{region}.amazonaws.com",
|
|
52
|
-
},
|
|
53
|
-
"aws-cn": {
|
|
54
|
-
regions: ["cn-north-1", "cn-northwest-1"],
|
|
55
|
-
hostname: "translate.{region}.amazonaws.com.cn",
|
|
56
|
-
},
|
|
57
|
-
"aws-iso": {
|
|
58
|
-
regions: ["us-iso-east-1"],
|
|
59
|
-
hostname: "translate.{region}.c2s.ic.gov",
|
|
60
|
-
},
|
|
61
|
-
"aws-iso-b": {
|
|
62
|
-
regions: ["us-isob-east-1"],
|
|
63
|
-
hostname: "translate.{region}.sc2s.sgov.gov",
|
|
64
|
-
},
|
|
65
|
-
"aws-us-gov": {
|
|
66
|
-
regions: ["us-gov-east-1", "us-gov-west-1", "us-gov-west-1-fips"],
|
|
67
|
-
hostname: "translate.{region}.amazonaws.com",
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) =>
|
|
72
|
-
getRegionInfo(region, {
|
|
73
|
-
...options,
|
|
74
|
-
signingService: "translate",
|
|
75
|
-
regionHash,
|
|
76
|
-
partitionHash,
|
|
77
|
-
});
|
package/src/index.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export * from "./TranslateClient";
|
|
2
|
-
export * from "./Translate";
|
|
3
|
-
export * from "./commands/CreateParallelDataCommand";
|
|
4
|
-
export * from "./commands/DeleteParallelDataCommand";
|
|
5
|
-
export * from "./commands/DeleteTerminologyCommand";
|
|
6
|
-
export * from "./commands/DescribeTextTranslationJobCommand";
|
|
7
|
-
export * from "./commands/GetParallelDataCommand";
|
|
8
|
-
export * from "./commands/GetTerminologyCommand";
|
|
9
|
-
export * from "./commands/ImportTerminologyCommand";
|
|
10
|
-
export * from "./commands/ListParallelDataCommand";
|
|
11
|
-
export * from "./pagination/ListParallelDataPaginator";
|
|
12
|
-
export * from "./commands/ListTerminologiesCommand";
|
|
13
|
-
export * from "./pagination/ListTerminologiesPaginator";
|
|
14
|
-
export * from "./commands/ListTextTranslationJobsCommand";
|
|
15
|
-
export * from "./pagination/ListTextTranslationJobsPaginator";
|
|
16
|
-
export * from "./commands/StartTextTranslationJobCommand";
|
|
17
|
-
export * from "./commands/StopTextTranslationJobCommand";
|
|
18
|
-
export * from "./commands/TranslateTextCommand";
|
|
19
|
-
export * from "./commands/UpdateParallelDataCommand";
|
|
20
|
-
export * from "./pagination/Interfaces";
|
|
21
|
-
export * from "./models/index";
|
package/src/models/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./models_0";
|