@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,95 +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 { GetParallelDataRequest, GetParallelDataResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1GetParallelDataCommand,
|
|
17
|
-
serializeAws_json1_1GetParallelDataCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface GetParallelDataCommandInput extends GetParallelDataRequest {}
|
|
22
|
-
export interface GetParallelDataCommandOutput extends GetParallelDataResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Provides information about a parallel data resource.</p>
|
|
26
|
-
* @example
|
|
27
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
-
* ```javascript
|
|
29
|
-
* import { TranslateClient, GetParallelDataCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
30
|
-
* // const { TranslateClient, GetParallelDataCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
31
|
-
* const client = new TranslateClient(config);
|
|
32
|
-
* const command = new GetParallelDataCommand(input);
|
|
33
|
-
* const response = await client.send(command);
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @see {@link GetParallelDataCommandInput} for command's `input` shape.
|
|
37
|
-
* @see {@link GetParallelDataCommandOutput} for command's `response` shape.
|
|
38
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
export class GetParallelDataCommand extends $Command<
|
|
42
|
-
GetParallelDataCommandInput,
|
|
43
|
-
GetParallelDataCommandOutput,
|
|
44
|
-
TranslateClientResolvedConfig
|
|
45
|
-
> {
|
|
46
|
-
// Start section: command_properties
|
|
47
|
-
// End section: command_properties
|
|
48
|
-
|
|
49
|
-
constructor(readonly input: GetParallelDataCommandInput) {
|
|
50
|
-
// Start section: command_constructor
|
|
51
|
-
super();
|
|
52
|
-
// End section: command_constructor
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
resolveMiddleware(
|
|
59
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
60
|
-
configuration: TranslateClientResolvedConfig,
|
|
61
|
-
options?: __HttpHandlerOptions
|
|
62
|
-
): Handler<GetParallelDataCommandInput, GetParallelDataCommandOutput> {
|
|
63
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
64
|
-
|
|
65
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
66
|
-
|
|
67
|
-
const { logger } = configuration;
|
|
68
|
-
const clientName = "TranslateClient";
|
|
69
|
-
const commandName = "GetParallelDataCommand";
|
|
70
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
71
|
-
logger,
|
|
72
|
-
clientName,
|
|
73
|
-
commandName,
|
|
74
|
-
inputFilterSensitiveLog: GetParallelDataRequest.filterSensitiveLog,
|
|
75
|
-
outputFilterSensitiveLog: GetParallelDataResponse.filterSensitiveLog,
|
|
76
|
-
};
|
|
77
|
-
const { requestHandler } = configuration;
|
|
78
|
-
return stack.resolve(
|
|
79
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
80
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
81
|
-
handlerExecutionContext
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private serialize(input: GetParallelDataCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
86
|
-
return serializeAws_json1_1GetParallelDataCommand(input, context);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetParallelDataCommandOutput> {
|
|
90
|
-
return deserializeAws_json1_1GetParallelDataCommand(output, context);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Start section: command_body_extra
|
|
94
|
-
// End section: command_body_extra
|
|
95
|
-
}
|
|
@@ -1,95 +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 { GetTerminologyRequest, GetTerminologyResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1GetTerminologyCommand,
|
|
17
|
-
serializeAws_json1_1GetTerminologyCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface GetTerminologyCommandInput extends GetTerminologyRequest {}
|
|
22
|
-
export interface GetTerminologyCommandOutput extends GetTerminologyResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Retrieves a custom terminology.</p>
|
|
26
|
-
* @example
|
|
27
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
-
* ```javascript
|
|
29
|
-
* import { TranslateClient, GetTerminologyCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
30
|
-
* // const { TranslateClient, GetTerminologyCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
31
|
-
* const client = new TranslateClient(config);
|
|
32
|
-
* const command = new GetTerminologyCommand(input);
|
|
33
|
-
* const response = await client.send(command);
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @see {@link GetTerminologyCommandInput} for command's `input` shape.
|
|
37
|
-
* @see {@link GetTerminologyCommandOutput} for command's `response` shape.
|
|
38
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
export class GetTerminologyCommand extends $Command<
|
|
42
|
-
GetTerminologyCommandInput,
|
|
43
|
-
GetTerminologyCommandOutput,
|
|
44
|
-
TranslateClientResolvedConfig
|
|
45
|
-
> {
|
|
46
|
-
// Start section: command_properties
|
|
47
|
-
// End section: command_properties
|
|
48
|
-
|
|
49
|
-
constructor(readonly input: GetTerminologyCommandInput) {
|
|
50
|
-
// Start section: command_constructor
|
|
51
|
-
super();
|
|
52
|
-
// End section: command_constructor
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
resolveMiddleware(
|
|
59
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
60
|
-
configuration: TranslateClientResolvedConfig,
|
|
61
|
-
options?: __HttpHandlerOptions
|
|
62
|
-
): Handler<GetTerminologyCommandInput, GetTerminologyCommandOutput> {
|
|
63
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
64
|
-
|
|
65
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
66
|
-
|
|
67
|
-
const { logger } = configuration;
|
|
68
|
-
const clientName = "TranslateClient";
|
|
69
|
-
const commandName = "GetTerminologyCommand";
|
|
70
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
71
|
-
logger,
|
|
72
|
-
clientName,
|
|
73
|
-
commandName,
|
|
74
|
-
inputFilterSensitiveLog: GetTerminologyRequest.filterSensitiveLog,
|
|
75
|
-
outputFilterSensitiveLog: GetTerminologyResponse.filterSensitiveLog,
|
|
76
|
-
};
|
|
77
|
-
const { requestHandler } = configuration;
|
|
78
|
-
return stack.resolve(
|
|
79
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
80
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
81
|
-
handlerExecutionContext
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private serialize(input: GetTerminologyCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
86
|
-
return serializeAws_json1_1GetTerminologyCommand(input, context);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetTerminologyCommandOutput> {
|
|
90
|
-
return deserializeAws_json1_1GetTerminologyCommand(output, context);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Start section: command_body_extra
|
|
94
|
-
// End section: command_body_extra
|
|
95
|
-
}
|
|
@@ -1,102 +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 { ImportTerminologyRequest, ImportTerminologyResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1ImportTerminologyCommand,
|
|
17
|
-
serializeAws_json1_1ImportTerminologyCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface ImportTerminologyCommandInput extends ImportTerminologyRequest {}
|
|
22
|
-
export interface ImportTerminologyCommandOutput extends ImportTerminologyResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Creates or updates a custom terminology, depending on whether or not one already exists
|
|
26
|
-
* for the given terminology name. Importing a terminology with the same name as an existing one
|
|
27
|
-
* will merge the terminologies based on the chosen merge strategy. Currently, the only supported
|
|
28
|
-
* merge strategy is OVERWRITE, and so the imported terminology will overwrite an existing
|
|
29
|
-
* terminology of the same name.</p>
|
|
30
|
-
* <p>If you import a terminology that overwrites an existing one, the new terminology take up
|
|
31
|
-
* to 10 minutes to fully propagate and be available for use in a translation due to cache
|
|
32
|
-
* policies with the DataPlane service that performs the translations.</p>
|
|
33
|
-
* @example
|
|
34
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
35
|
-
* ```javascript
|
|
36
|
-
* import { TranslateClient, ImportTerminologyCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
37
|
-
* // const { TranslateClient, ImportTerminologyCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
38
|
-
* const client = new TranslateClient(config);
|
|
39
|
-
* const command = new ImportTerminologyCommand(input);
|
|
40
|
-
* const response = await client.send(command);
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* @see {@link ImportTerminologyCommandInput} for command's `input` shape.
|
|
44
|
-
* @see {@link ImportTerminologyCommandOutput} for command's `response` shape.
|
|
45
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
export class ImportTerminologyCommand extends $Command<
|
|
49
|
-
ImportTerminologyCommandInput,
|
|
50
|
-
ImportTerminologyCommandOutput,
|
|
51
|
-
TranslateClientResolvedConfig
|
|
52
|
-
> {
|
|
53
|
-
// Start section: command_properties
|
|
54
|
-
// End section: command_properties
|
|
55
|
-
|
|
56
|
-
constructor(readonly input: ImportTerminologyCommandInput) {
|
|
57
|
-
// Start section: command_constructor
|
|
58
|
-
super();
|
|
59
|
-
// End section: command_constructor
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @internal
|
|
64
|
-
*/
|
|
65
|
-
resolveMiddleware(
|
|
66
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
67
|
-
configuration: TranslateClientResolvedConfig,
|
|
68
|
-
options?: __HttpHandlerOptions
|
|
69
|
-
): Handler<ImportTerminologyCommandInput, ImportTerminologyCommandOutput> {
|
|
70
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
71
|
-
|
|
72
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
73
|
-
|
|
74
|
-
const { logger } = configuration;
|
|
75
|
-
const clientName = "TranslateClient";
|
|
76
|
-
const commandName = "ImportTerminologyCommand";
|
|
77
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
78
|
-
logger,
|
|
79
|
-
clientName,
|
|
80
|
-
commandName,
|
|
81
|
-
inputFilterSensitiveLog: ImportTerminologyRequest.filterSensitiveLog,
|
|
82
|
-
outputFilterSensitiveLog: ImportTerminologyResponse.filterSensitiveLog,
|
|
83
|
-
};
|
|
84
|
-
const { requestHandler } = configuration;
|
|
85
|
-
return stack.resolve(
|
|
86
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
87
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
88
|
-
handlerExecutionContext
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
private serialize(input: ImportTerminologyCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
93
|
-
return serializeAws_json1_1ImportTerminologyCommand(input, context);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ImportTerminologyCommandOutput> {
|
|
97
|
-
return deserializeAws_json1_1ImportTerminologyCommand(output, context);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Start section: command_body_extra
|
|
101
|
-
// End section: command_body_extra
|
|
102
|
-
}
|
|
@@ -1,95 +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 { ListParallelDataRequest, ListParallelDataResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1ListParallelDataCommand,
|
|
17
|
-
serializeAws_json1_1ListParallelDataCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface ListParallelDataCommandInput extends ListParallelDataRequest {}
|
|
22
|
-
export interface ListParallelDataCommandOutput extends ListParallelDataResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Provides a list of your parallel data resources in Amazon Translate.</p>
|
|
26
|
-
* @example
|
|
27
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
-
* ```javascript
|
|
29
|
-
* import { TranslateClient, ListParallelDataCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
30
|
-
* // const { TranslateClient, ListParallelDataCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
31
|
-
* const client = new TranslateClient(config);
|
|
32
|
-
* const command = new ListParallelDataCommand(input);
|
|
33
|
-
* const response = await client.send(command);
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @see {@link ListParallelDataCommandInput} for command's `input` shape.
|
|
37
|
-
* @see {@link ListParallelDataCommandOutput} for command's `response` shape.
|
|
38
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
export class ListParallelDataCommand extends $Command<
|
|
42
|
-
ListParallelDataCommandInput,
|
|
43
|
-
ListParallelDataCommandOutput,
|
|
44
|
-
TranslateClientResolvedConfig
|
|
45
|
-
> {
|
|
46
|
-
// Start section: command_properties
|
|
47
|
-
// End section: command_properties
|
|
48
|
-
|
|
49
|
-
constructor(readonly input: ListParallelDataCommandInput) {
|
|
50
|
-
// Start section: command_constructor
|
|
51
|
-
super();
|
|
52
|
-
// End section: command_constructor
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
resolveMiddleware(
|
|
59
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
60
|
-
configuration: TranslateClientResolvedConfig,
|
|
61
|
-
options?: __HttpHandlerOptions
|
|
62
|
-
): Handler<ListParallelDataCommandInput, ListParallelDataCommandOutput> {
|
|
63
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
64
|
-
|
|
65
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
66
|
-
|
|
67
|
-
const { logger } = configuration;
|
|
68
|
-
const clientName = "TranslateClient";
|
|
69
|
-
const commandName = "ListParallelDataCommand";
|
|
70
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
71
|
-
logger,
|
|
72
|
-
clientName,
|
|
73
|
-
commandName,
|
|
74
|
-
inputFilterSensitiveLog: ListParallelDataRequest.filterSensitiveLog,
|
|
75
|
-
outputFilterSensitiveLog: ListParallelDataResponse.filterSensitiveLog,
|
|
76
|
-
};
|
|
77
|
-
const { requestHandler } = configuration;
|
|
78
|
-
return stack.resolve(
|
|
79
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
80
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
81
|
-
handlerExecutionContext
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private serialize(input: ListParallelDataCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
86
|
-
return serializeAws_json1_1ListParallelDataCommand(input, context);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListParallelDataCommandOutput> {
|
|
90
|
-
return deserializeAws_json1_1ListParallelDataCommand(output, context);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Start section: command_body_extra
|
|
94
|
-
// End section: command_body_extra
|
|
95
|
-
}
|
|
@@ -1,95 +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 { ListTerminologiesRequest, ListTerminologiesResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1ListTerminologiesCommand,
|
|
17
|
-
serializeAws_json1_1ListTerminologiesCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface ListTerminologiesCommandInput extends ListTerminologiesRequest {}
|
|
22
|
-
export interface ListTerminologiesCommandOutput extends ListTerminologiesResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Provides a list of custom terminologies associated with your account.</p>
|
|
26
|
-
* @example
|
|
27
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
-
* ```javascript
|
|
29
|
-
* import { TranslateClient, ListTerminologiesCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
30
|
-
* // const { TranslateClient, ListTerminologiesCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
31
|
-
* const client = new TranslateClient(config);
|
|
32
|
-
* const command = new ListTerminologiesCommand(input);
|
|
33
|
-
* const response = await client.send(command);
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @see {@link ListTerminologiesCommandInput} for command's `input` shape.
|
|
37
|
-
* @see {@link ListTerminologiesCommandOutput} for command's `response` shape.
|
|
38
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
export class ListTerminologiesCommand extends $Command<
|
|
42
|
-
ListTerminologiesCommandInput,
|
|
43
|
-
ListTerminologiesCommandOutput,
|
|
44
|
-
TranslateClientResolvedConfig
|
|
45
|
-
> {
|
|
46
|
-
// Start section: command_properties
|
|
47
|
-
// End section: command_properties
|
|
48
|
-
|
|
49
|
-
constructor(readonly input: ListTerminologiesCommandInput) {
|
|
50
|
-
// Start section: command_constructor
|
|
51
|
-
super();
|
|
52
|
-
// End section: command_constructor
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
resolveMiddleware(
|
|
59
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
60
|
-
configuration: TranslateClientResolvedConfig,
|
|
61
|
-
options?: __HttpHandlerOptions
|
|
62
|
-
): Handler<ListTerminologiesCommandInput, ListTerminologiesCommandOutput> {
|
|
63
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
64
|
-
|
|
65
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
66
|
-
|
|
67
|
-
const { logger } = configuration;
|
|
68
|
-
const clientName = "TranslateClient";
|
|
69
|
-
const commandName = "ListTerminologiesCommand";
|
|
70
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
71
|
-
logger,
|
|
72
|
-
clientName,
|
|
73
|
-
commandName,
|
|
74
|
-
inputFilterSensitiveLog: ListTerminologiesRequest.filterSensitiveLog,
|
|
75
|
-
outputFilterSensitiveLog: ListTerminologiesResponse.filterSensitiveLog,
|
|
76
|
-
};
|
|
77
|
-
const { requestHandler } = configuration;
|
|
78
|
-
return stack.resolve(
|
|
79
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
80
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
81
|
-
handlerExecutionContext
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private serialize(input: ListTerminologiesCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
86
|
-
return serializeAws_json1_1ListTerminologiesCommand(input, context);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListTerminologiesCommandOutput> {
|
|
90
|
-
return deserializeAws_json1_1ListTerminologiesCommand(output, context);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Start section: command_body_extra
|
|
94
|
-
// End section: command_body_extra
|
|
95
|
-
}
|
|
@@ -1,95 +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 { ListTextTranslationJobsRequest, ListTextTranslationJobsResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1ListTextTranslationJobsCommand,
|
|
17
|
-
serializeAws_json1_1ListTextTranslationJobsCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface ListTextTranslationJobsCommandInput extends ListTextTranslationJobsRequest {}
|
|
22
|
-
export interface ListTextTranslationJobsCommandOutput extends ListTextTranslationJobsResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Gets a list of the batch translation jobs that you have submitted.</p>
|
|
26
|
-
* @example
|
|
27
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
-
* ```javascript
|
|
29
|
-
* import { TranslateClient, ListTextTranslationJobsCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
30
|
-
* // const { TranslateClient, ListTextTranslationJobsCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
31
|
-
* const client = new TranslateClient(config);
|
|
32
|
-
* const command = new ListTextTranslationJobsCommand(input);
|
|
33
|
-
* const response = await client.send(command);
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @see {@link ListTextTranslationJobsCommandInput} for command's `input` shape.
|
|
37
|
-
* @see {@link ListTextTranslationJobsCommandOutput} for command's `response` shape.
|
|
38
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
export class ListTextTranslationJobsCommand extends $Command<
|
|
42
|
-
ListTextTranslationJobsCommandInput,
|
|
43
|
-
ListTextTranslationJobsCommandOutput,
|
|
44
|
-
TranslateClientResolvedConfig
|
|
45
|
-
> {
|
|
46
|
-
// Start section: command_properties
|
|
47
|
-
// End section: command_properties
|
|
48
|
-
|
|
49
|
-
constructor(readonly input: ListTextTranslationJobsCommandInput) {
|
|
50
|
-
// Start section: command_constructor
|
|
51
|
-
super();
|
|
52
|
-
// End section: command_constructor
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
resolveMiddleware(
|
|
59
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
60
|
-
configuration: TranslateClientResolvedConfig,
|
|
61
|
-
options?: __HttpHandlerOptions
|
|
62
|
-
): Handler<ListTextTranslationJobsCommandInput, ListTextTranslationJobsCommandOutput> {
|
|
63
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
64
|
-
|
|
65
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
66
|
-
|
|
67
|
-
const { logger } = configuration;
|
|
68
|
-
const clientName = "TranslateClient";
|
|
69
|
-
const commandName = "ListTextTranslationJobsCommand";
|
|
70
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
71
|
-
logger,
|
|
72
|
-
clientName,
|
|
73
|
-
commandName,
|
|
74
|
-
inputFilterSensitiveLog: ListTextTranslationJobsRequest.filterSensitiveLog,
|
|
75
|
-
outputFilterSensitiveLog: ListTextTranslationJobsResponse.filterSensitiveLog,
|
|
76
|
-
};
|
|
77
|
-
const { requestHandler } = configuration;
|
|
78
|
-
return stack.resolve(
|
|
79
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
80
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
81
|
-
handlerExecutionContext
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private serialize(input: ListTextTranslationJobsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
86
|
-
return serializeAws_json1_1ListTextTranslationJobsCommand(input, context);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListTextTranslationJobsCommandOutput> {
|
|
90
|
-
return deserializeAws_json1_1ListTextTranslationJobsCommand(output, context);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Start section: command_body_extra
|
|
94
|
-
// End section: command_body_extra
|
|
95
|
-
}
|
|
@@ -1,102 +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 { StartTextTranslationJobRequest, StartTextTranslationJobResponse } from "../models/models_0";
|
|
15
|
-
import {
|
|
16
|
-
deserializeAws_json1_1StartTextTranslationJobCommand,
|
|
17
|
-
serializeAws_json1_1StartTextTranslationJobCommand,
|
|
18
|
-
} from "../protocols/Aws_json1_1";
|
|
19
|
-
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
20
|
-
|
|
21
|
-
export interface StartTextTranslationJobCommandInput extends StartTextTranslationJobRequest {}
|
|
22
|
-
export interface StartTextTranslationJobCommandOutput extends StartTextTranslationJobResponse, __MetadataBearer {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>Starts an asynchronous batch translation job. Batch translation jobs can be used to
|
|
26
|
-
* translate large volumes of text across multiple documents at once. For more information, see
|
|
27
|
-
* <a>async</a>.</p>
|
|
28
|
-
*
|
|
29
|
-
* <p>Batch translation jobs can be described with the <a>DescribeTextTranslationJob</a> operation, listed with the <a>ListTextTranslationJobs</a> operation, and stopped with the <a>StopTextTranslationJob</a> operation.</p>
|
|
30
|
-
* <note>
|
|
31
|
-
* <p>Amazon Translate does not support batch translation of multiple source languages at once.</p>
|
|
32
|
-
* </note>
|
|
33
|
-
* @example
|
|
34
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
35
|
-
* ```javascript
|
|
36
|
-
* import { TranslateClient, StartTextTranslationJobCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
37
|
-
* // const { TranslateClient, StartTextTranslationJobCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
38
|
-
* const client = new TranslateClient(config);
|
|
39
|
-
* const command = new StartTextTranslationJobCommand(input);
|
|
40
|
-
* const response = await client.send(command);
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* @see {@link StartTextTranslationJobCommandInput} for command's `input` shape.
|
|
44
|
-
* @see {@link StartTextTranslationJobCommandOutput} for command's `response` shape.
|
|
45
|
-
* @see {@link TranslateClientResolvedConfig | config} for command's `input` shape.
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
export class StartTextTranslationJobCommand extends $Command<
|
|
49
|
-
StartTextTranslationJobCommandInput,
|
|
50
|
-
StartTextTranslationJobCommandOutput,
|
|
51
|
-
TranslateClientResolvedConfig
|
|
52
|
-
> {
|
|
53
|
-
// Start section: command_properties
|
|
54
|
-
// End section: command_properties
|
|
55
|
-
|
|
56
|
-
constructor(readonly input: StartTextTranslationJobCommandInput) {
|
|
57
|
-
// Start section: command_constructor
|
|
58
|
-
super();
|
|
59
|
-
// End section: command_constructor
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @internal
|
|
64
|
-
*/
|
|
65
|
-
resolveMiddleware(
|
|
66
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
67
|
-
configuration: TranslateClientResolvedConfig,
|
|
68
|
-
options?: __HttpHandlerOptions
|
|
69
|
-
): Handler<StartTextTranslationJobCommandInput, StartTextTranslationJobCommandOutput> {
|
|
70
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
71
|
-
|
|
72
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
73
|
-
|
|
74
|
-
const { logger } = configuration;
|
|
75
|
-
const clientName = "TranslateClient";
|
|
76
|
-
const commandName = "StartTextTranslationJobCommand";
|
|
77
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
78
|
-
logger,
|
|
79
|
-
clientName,
|
|
80
|
-
commandName,
|
|
81
|
-
inputFilterSensitiveLog: StartTextTranslationJobRequest.filterSensitiveLog,
|
|
82
|
-
outputFilterSensitiveLog: StartTextTranslationJobResponse.filterSensitiveLog,
|
|
83
|
-
};
|
|
84
|
-
const { requestHandler } = configuration;
|
|
85
|
-
return stack.resolve(
|
|
86
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
87
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
88
|
-
handlerExecutionContext
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
private serialize(input: StartTextTranslationJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
93
|
-
return serializeAws_json1_1StartTextTranslationJobCommand(input, context);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<StartTextTranslationJobCommandOutput> {
|
|
97
|
-
return deserializeAws_json1_1StartTextTranslationJobCommand(output, context);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Start section: command_body_extra
|
|
101
|
-
// End section: command_body_extra
|
|
102
|
-
}
|