@aws-sdk/client-translate 3.477.0 → 3.481.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/commands/CreateParallelDataCommand.js +18 -41
- package/dist-cjs/commands/DeleteParallelDataCommand.js +18 -41
- package/dist-cjs/commands/DeleteTerminologyCommand.js +18 -41
- package/dist-cjs/commands/DescribeTextTranslationJobCommand.js +18 -41
- package/dist-cjs/commands/GetParallelDataCommand.js +18 -41
- package/dist-cjs/commands/GetTerminologyCommand.js +18 -41
- package/dist-cjs/commands/ImportTerminologyCommand.js +18 -41
- package/dist-cjs/commands/ListLanguagesCommand.js +18 -41
- package/dist-cjs/commands/ListParallelDataCommand.js +18 -41
- package/dist-cjs/commands/ListTagsForResourceCommand.js +18 -41
- package/dist-cjs/commands/ListTerminologiesCommand.js +18 -41
- package/dist-cjs/commands/ListTextTranslationJobsCommand.js +18 -41
- package/dist-cjs/commands/StartTextTranslationJobCommand.js +18 -41
- package/dist-cjs/commands/StopTextTranslationJobCommand.js +18 -41
- package/dist-cjs/commands/TagResourceCommand.js +18 -41
- package/dist-cjs/commands/TranslateDocumentCommand.js +18 -41
- package/dist-cjs/commands/TranslateTextCommand.js +18 -41
- package/dist-cjs/commands/UntagResourceCommand.js +18 -41
- package/dist-cjs/commands/UpdateParallelDataCommand.js +18 -41
- package/dist-cjs/endpoint/EndpointParameters.js +7 -1
- package/dist-cjs/pagination/ListLanguagesPaginator.js +2 -24
- package/dist-cjs/pagination/ListParallelDataPaginator.js +2 -24
- package/dist-cjs/pagination/ListTerminologiesPaginator.js +2 -24
- package/dist-cjs/pagination/ListTextTranslationJobsPaginator.js +2 -24
- package/dist-es/commands/CreateParallelDataCommand.js +18 -41
- package/dist-es/commands/DeleteParallelDataCommand.js +18 -41
- package/dist-es/commands/DeleteTerminologyCommand.js +18 -41
- package/dist-es/commands/DescribeTextTranslationJobCommand.js +18 -41
- package/dist-es/commands/GetParallelDataCommand.js +18 -41
- package/dist-es/commands/GetTerminologyCommand.js +18 -41
- package/dist-es/commands/ImportTerminologyCommand.js +18 -41
- package/dist-es/commands/ListLanguagesCommand.js +18 -41
- package/dist-es/commands/ListParallelDataCommand.js +18 -41
- package/dist-es/commands/ListTagsForResourceCommand.js +18 -41
- package/dist-es/commands/ListTerminologiesCommand.js +18 -41
- package/dist-es/commands/ListTextTranslationJobsCommand.js +18 -41
- package/dist-es/commands/StartTextTranslationJobCommand.js +18 -41
- package/dist-es/commands/StopTextTranslationJobCommand.js +18 -41
- package/dist-es/commands/TagResourceCommand.js +18 -41
- package/dist-es/commands/TranslateDocumentCommand.js +18 -41
- package/dist-es/commands/TranslateTextCommand.js +18 -41
- package/dist-es/commands/UntagResourceCommand.js +18 -41
- package/dist-es/commands/UpdateParallelDataCommand.js +18 -41
- package/dist-es/endpoint/EndpointParameters.js +6 -0
- package/dist-es/pagination/ListLanguagesPaginator.js +2 -23
- package/dist-es/pagination/ListParallelDataPaginator.js +2 -23
- package/dist-es/pagination/ListTerminologiesPaginator.js +2 -23
- package/dist-es/pagination/ListTextTranslationJobsPaginator.js +2 -23
- package/dist-types/commands/CreateParallelDataCommand.d.ts +6 -21
- package/dist-types/commands/DeleteParallelDataCommand.d.ts +6 -21
- package/dist-types/commands/DeleteTerminologyCommand.d.ts +6 -21
- package/dist-types/commands/DescribeTextTranslationJobCommand.d.ts +6 -21
- package/dist-types/commands/GetParallelDataCommand.d.ts +6 -21
- package/dist-types/commands/GetTerminologyCommand.d.ts +6 -21
- package/dist-types/commands/ImportTerminologyCommand.d.ts +6 -21
- package/dist-types/commands/ListLanguagesCommand.d.ts +6 -21
- package/dist-types/commands/ListParallelDataCommand.d.ts +6 -21
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +6 -21
- package/dist-types/commands/ListTerminologiesCommand.d.ts +6 -21
- package/dist-types/commands/ListTextTranslationJobsCommand.d.ts +6 -21
- package/dist-types/commands/StartTextTranslationJobCommand.d.ts +6 -21
- package/dist-types/commands/StopTextTranslationJobCommand.d.ts +6 -21
- package/dist-types/commands/TagResourceCommand.d.ts +6 -21
- package/dist-types/commands/TranslateDocumentCommand.d.ts +6 -21
- package/dist-types/commands/TranslateTextCommand.d.ts +6 -21
- package/dist-types/commands/UntagResourceCommand.d.ts +6 -21
- package/dist-types/commands/UpdateParallelDataCommand.d.ts +6 -21
- package/dist-types/endpoint/EndpointParameters.d.ts +18 -0
- package/dist-types/pagination/ListLanguagesPaginator.d.ts +1 -1
- package/dist-types/pagination/ListParallelDataPaginator.d.ts +1 -1
- package/dist-types/pagination/ListTerminologiesPaginator.d.ts +1 -1
- package/dist-types/pagination/ListTextTranslationJobsPaginator.d.ts +1 -1
- package/dist-types/ts3.4/commands/CreateParallelDataCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/DeleteParallelDataCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/DeleteTerminologyCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/DescribeTextTranslationJobCommand.d.ts +12 -24
- package/dist-types/ts3.4/commands/GetParallelDataCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/GetTerminologyCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/ImportTerminologyCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/ListLanguagesCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/ListParallelDataCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/ListTerminologiesCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/ListTextTranslationJobsCommand.d.ts +12 -24
- package/dist-types/ts3.4/commands/StartTextTranslationJobCommand.d.ts +12 -24
- package/dist-types/ts3.4/commands/StopTextTranslationJobCommand.d.ts +12 -24
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/TranslateDocumentCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/TranslateTextCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +14 -23
- package/dist-types/ts3.4/commands/UpdateParallelDataCommand.d.ts +14 -23
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +18 -0
- package/dist-types/ts3.4/pagination/ListLanguagesPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListParallelDataPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListTerminologiesPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListTextTranslationJobsPaginator.d.ts +3 -3
- package/package.json +11 -10
|
@@ -1,48 +1,25 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
5
|
import { TranslateDocumentRequestFilterSensitiveLog, TranslateDocumentResponseFilterSensitiveLog, } from "../models/models_0";
|
|
6
6
|
import { de_TranslateDocumentCommand, se_TranslateDocumentCommand } from "../protocols/Aws_json1_1";
|
|
7
7
|
export { $Command };
|
|
8
|
-
export class TranslateDocumentCommand extends $Command
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const { logger } = configuration;
|
|
26
|
-
const clientName = "TranslateClient";
|
|
27
|
-
const commandName = "TranslateDocumentCommand";
|
|
28
|
-
const handlerExecutionContext = {
|
|
29
|
-
logger,
|
|
30
|
-
clientName,
|
|
31
|
-
commandName,
|
|
32
|
-
inputFilterSensitiveLog: TranslateDocumentRequestFilterSensitiveLog,
|
|
33
|
-
outputFilterSensitiveLog: TranslateDocumentResponseFilterSensitiveLog,
|
|
34
|
-
[SMITHY_CONTEXT_KEY]: {
|
|
35
|
-
service: "AWSShineFrontendService_20170701",
|
|
36
|
-
operation: "TranslateDocument",
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
const { requestHandler } = configuration;
|
|
40
|
-
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
41
|
-
}
|
|
42
|
-
serialize(input, context) {
|
|
43
|
-
return se_TranslateDocumentCommand(input, context);
|
|
44
|
-
}
|
|
45
|
-
deserialize(output, context) {
|
|
46
|
-
return de_TranslateDocumentCommand(output, context);
|
|
47
|
-
}
|
|
8
|
+
export class TranslateDocumentCommand extends $Command
|
|
9
|
+
.classBuilder()
|
|
10
|
+
.ep({
|
|
11
|
+
...commonParams,
|
|
12
|
+
})
|
|
13
|
+
.m(function (Command, cs, config, o) {
|
|
14
|
+
return [
|
|
15
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
16
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
17
|
+
];
|
|
18
|
+
})
|
|
19
|
+
.s("AWSShineFrontendService_20170701", "TranslateDocument", {})
|
|
20
|
+
.n("TranslateClient", "TranslateDocumentCommand")
|
|
21
|
+
.f(TranslateDocumentRequestFilterSensitiveLog, TranslateDocumentResponseFilterSensitiveLog)
|
|
22
|
+
.ser(se_TranslateDocumentCommand)
|
|
23
|
+
.de(de_TranslateDocumentCommand)
|
|
24
|
+
.build() {
|
|
48
25
|
}
|
|
@@ -1,47 +1,24 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
5
|
import { de_TranslateTextCommand, se_TranslateTextCommand } from "../protocols/Aws_json1_1";
|
|
6
6
|
export { $Command };
|
|
7
|
-
export class TranslateTextCommand extends $Command
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const { logger } = configuration;
|
|
25
|
-
const clientName = "TranslateClient";
|
|
26
|
-
const commandName = "TranslateTextCommand";
|
|
27
|
-
const handlerExecutionContext = {
|
|
28
|
-
logger,
|
|
29
|
-
clientName,
|
|
30
|
-
commandName,
|
|
31
|
-
inputFilterSensitiveLog: (_) => _,
|
|
32
|
-
outputFilterSensitiveLog: (_) => _,
|
|
33
|
-
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
-
service: "AWSShineFrontendService_20170701",
|
|
35
|
-
operation: "TranslateText",
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
const { requestHandler } = configuration;
|
|
39
|
-
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
-
}
|
|
41
|
-
serialize(input, context) {
|
|
42
|
-
return se_TranslateTextCommand(input, context);
|
|
43
|
-
}
|
|
44
|
-
deserialize(output, context) {
|
|
45
|
-
return de_TranslateTextCommand(output, context);
|
|
46
|
-
}
|
|
7
|
+
export class TranslateTextCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep({
|
|
10
|
+
...commonParams,
|
|
11
|
+
})
|
|
12
|
+
.m(function (Command, cs, config, o) {
|
|
13
|
+
return [
|
|
14
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
15
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
16
|
+
];
|
|
17
|
+
})
|
|
18
|
+
.s("AWSShineFrontendService_20170701", "TranslateText", {})
|
|
19
|
+
.n("TranslateClient", "TranslateTextCommand")
|
|
20
|
+
.f(void 0, void 0)
|
|
21
|
+
.ser(se_TranslateTextCommand)
|
|
22
|
+
.de(de_TranslateTextCommand)
|
|
23
|
+
.build() {
|
|
47
24
|
}
|
|
@@ -1,47 +1,24 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
5
|
import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_1";
|
|
6
6
|
export { $Command };
|
|
7
|
-
export class UntagResourceCommand extends $Command
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const { logger } = configuration;
|
|
25
|
-
const clientName = "TranslateClient";
|
|
26
|
-
const commandName = "UntagResourceCommand";
|
|
27
|
-
const handlerExecutionContext = {
|
|
28
|
-
logger,
|
|
29
|
-
clientName,
|
|
30
|
-
commandName,
|
|
31
|
-
inputFilterSensitiveLog: (_) => _,
|
|
32
|
-
outputFilterSensitiveLog: (_) => _,
|
|
33
|
-
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
-
service: "AWSShineFrontendService_20170701",
|
|
35
|
-
operation: "UntagResource",
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
const { requestHandler } = configuration;
|
|
39
|
-
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
-
}
|
|
41
|
-
serialize(input, context) {
|
|
42
|
-
return se_UntagResourceCommand(input, context);
|
|
43
|
-
}
|
|
44
|
-
deserialize(output, context) {
|
|
45
|
-
return de_UntagResourceCommand(output, context);
|
|
46
|
-
}
|
|
7
|
+
export class UntagResourceCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep({
|
|
10
|
+
...commonParams,
|
|
11
|
+
})
|
|
12
|
+
.m(function (Command, cs, config, o) {
|
|
13
|
+
return [
|
|
14
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
15
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
16
|
+
];
|
|
17
|
+
})
|
|
18
|
+
.s("AWSShineFrontendService_20170701", "UntagResource", {})
|
|
19
|
+
.n("TranslateClient", "UntagResourceCommand")
|
|
20
|
+
.f(void 0, void 0)
|
|
21
|
+
.ser(se_UntagResourceCommand)
|
|
22
|
+
.de(de_UntagResourceCommand)
|
|
23
|
+
.build() {
|
|
47
24
|
}
|
|
@@ -1,47 +1,24 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
5
|
import { de_UpdateParallelDataCommand, se_UpdateParallelDataCommand } from "../protocols/Aws_json1_1";
|
|
6
6
|
export { $Command };
|
|
7
|
-
export class UpdateParallelDataCommand extends $Command
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const { logger } = configuration;
|
|
25
|
-
const clientName = "TranslateClient";
|
|
26
|
-
const commandName = "UpdateParallelDataCommand";
|
|
27
|
-
const handlerExecutionContext = {
|
|
28
|
-
logger,
|
|
29
|
-
clientName,
|
|
30
|
-
commandName,
|
|
31
|
-
inputFilterSensitiveLog: (_) => _,
|
|
32
|
-
outputFilterSensitiveLog: (_) => _,
|
|
33
|
-
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
-
service: "AWSShineFrontendService_20170701",
|
|
35
|
-
operation: "UpdateParallelData",
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
const { requestHandler } = configuration;
|
|
39
|
-
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
-
}
|
|
41
|
-
serialize(input, context) {
|
|
42
|
-
return se_UpdateParallelDataCommand(input, context);
|
|
43
|
-
}
|
|
44
|
-
deserialize(output, context) {
|
|
45
|
-
return de_UpdateParallelDataCommand(output, context);
|
|
46
|
-
}
|
|
7
|
+
export class UpdateParallelDataCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep({
|
|
10
|
+
...commonParams,
|
|
11
|
+
})
|
|
12
|
+
.m(function (Command, cs, config, o) {
|
|
13
|
+
return [
|
|
14
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
15
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
16
|
+
];
|
|
17
|
+
})
|
|
18
|
+
.s("AWSShineFrontendService_20170701", "UpdateParallelData", {})
|
|
19
|
+
.n("TranslateClient", "UpdateParallelDataCommand")
|
|
20
|
+
.f(void 0, void 0)
|
|
21
|
+
.ser(se_UpdateParallelDataCommand)
|
|
22
|
+
.de(de_UpdateParallelDataCommand)
|
|
23
|
+
.build() {
|
|
47
24
|
}
|
|
@@ -6,3 +6,9 @@ export const resolveClientEndpointParameters = (options) => {
|
|
|
6
6
|
defaultSigningName: "translate",
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
+
export const commonParams = {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListLanguagesCommand, } from "../commands/ListLanguagesCommand";
|
|
2
3
|
import { TranslateClient } from "../TranslateClient";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListLanguagesCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListLanguages(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.NextToken = token;
|
|
12
|
-
input["MaxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof TranslateClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected Translate | TranslateClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.NextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListLanguages = createPaginator(TranslateClient, ListLanguagesCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListParallelDataCommand, } from "../commands/ListParallelDataCommand";
|
|
2
3
|
import { TranslateClient } from "../TranslateClient";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListParallelDataCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListParallelData(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.NextToken = token;
|
|
12
|
-
input["MaxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof TranslateClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected Translate | TranslateClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.NextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListParallelData = createPaginator(TranslateClient, ListParallelDataCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListTerminologiesCommand, } from "../commands/ListTerminologiesCommand";
|
|
2
3
|
import { TranslateClient } from "../TranslateClient";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListTerminologiesCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListTerminologies(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.NextToken = token;
|
|
12
|
-
input["MaxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof TranslateClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected Translate | TranslateClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.NextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListTerminologies = createPaginator(TranslateClient, ListTerminologiesCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListTextTranslationJobsCommand, } from "../commands/ListTextTranslationJobsCommand";
|
|
2
3
|
import { TranslateClient } from "../TranslateClient";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListTextTranslationJobsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListTextTranslationJobs(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.NextToken = token;
|
|
12
|
-
input["MaxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof TranslateClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected Translate | TranslateClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.NextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListTextTranslationJobs = createPaginator(TranslateClient, ListTextTranslationJobsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
1
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
-
import {
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
4
3
|
import { CreateParallelDataRequest, CreateParallelDataResponse } from "../models/models_0";
|
|
5
4
|
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
6
5
|
/**
|
|
@@ -21,6 +20,10 @@ export interface CreateParallelDataCommandInput extends CreateParallelDataReques
|
|
|
21
20
|
*/
|
|
22
21
|
export interface CreateParallelDataCommandOutput extends CreateParallelDataResponse, __MetadataBearer {
|
|
23
22
|
}
|
|
23
|
+
declare const CreateParallelDataCommand_base: {
|
|
24
|
+
new (input: CreateParallelDataCommandInput): import("@smithy/smithy-client").CommandImpl<CreateParallelDataCommandInput, CreateParallelDataCommandOutput, TranslateClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
26
|
+
};
|
|
24
27
|
/**
|
|
25
28
|
* @public
|
|
26
29
|
* <p>Creates a parallel data resource in Amazon Translate by importing an input file from
|
|
@@ -100,23 +103,5 @@ export interface CreateParallelDataCommandOutput extends CreateParallelDataRespo
|
|
|
100
103
|
* <p>Base exception class for all service exceptions from Translate service.</p>
|
|
101
104
|
*
|
|
102
105
|
*/
|
|
103
|
-
export declare class CreateParallelDataCommand extends
|
|
104
|
-
readonly input: CreateParallelDataCommandInput;
|
|
105
|
-
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
106
|
-
/**
|
|
107
|
-
* @public
|
|
108
|
-
*/
|
|
109
|
-
constructor(input: CreateParallelDataCommandInput);
|
|
110
|
-
/**
|
|
111
|
-
* @internal
|
|
112
|
-
*/
|
|
113
|
-
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TranslateClientResolvedConfig, options?: __HttpHandlerOptions): Handler<CreateParallelDataCommandInput, CreateParallelDataCommandOutput>;
|
|
114
|
-
/**
|
|
115
|
-
* @internal
|
|
116
|
-
*/
|
|
117
|
-
private serialize;
|
|
118
|
-
/**
|
|
119
|
-
* @internal
|
|
120
|
-
*/
|
|
121
|
-
private deserialize;
|
|
106
|
+
export declare class CreateParallelDataCommand extends CreateParallelDataCommand_base {
|
|
122
107
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
1
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
-
import {
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
4
3
|
import { DeleteParallelDataRequest, DeleteParallelDataResponse } from "../models/models_0";
|
|
5
4
|
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
6
5
|
/**
|
|
@@ -21,6 +20,10 @@ export interface DeleteParallelDataCommandInput extends DeleteParallelDataReques
|
|
|
21
20
|
*/
|
|
22
21
|
export interface DeleteParallelDataCommandOutput extends DeleteParallelDataResponse, __MetadataBearer {
|
|
23
22
|
}
|
|
23
|
+
declare const DeleteParallelDataCommand_base: {
|
|
24
|
+
new (input: DeleteParallelDataCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteParallelDataCommandInput, DeleteParallelDataCommandOutput, TranslateClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
26
|
+
};
|
|
24
27
|
/**
|
|
25
28
|
* @public
|
|
26
29
|
* <p>Deletes a parallel data resource in Amazon Translate.</p>
|
|
@@ -68,23 +71,5 @@ export interface DeleteParallelDataCommandOutput extends DeleteParallelDataRespo
|
|
|
68
71
|
* <p>Base exception class for all service exceptions from Translate service.</p>
|
|
69
72
|
*
|
|
70
73
|
*/
|
|
71
|
-
export declare class DeleteParallelDataCommand extends
|
|
72
|
-
readonly input: DeleteParallelDataCommandInput;
|
|
73
|
-
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
74
|
-
/**
|
|
75
|
-
* @public
|
|
76
|
-
*/
|
|
77
|
-
constructor(input: DeleteParallelDataCommandInput);
|
|
78
|
-
/**
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
|
-
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TranslateClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeleteParallelDataCommandInput, DeleteParallelDataCommandOutput>;
|
|
82
|
-
/**
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
|
-
private serialize;
|
|
86
|
-
/**
|
|
87
|
-
* @internal
|
|
88
|
-
*/
|
|
89
|
-
private deserialize;
|
|
74
|
+
export declare class DeleteParallelDataCommand extends DeleteParallelDataCommand_base {
|
|
90
75
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
1
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
-
import {
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
4
3
|
import { DeleteTerminologyRequest } from "../models/models_0";
|
|
5
4
|
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
6
5
|
/**
|
|
@@ -21,6 +20,10 @@ export interface DeleteTerminologyCommandInput extends DeleteTerminologyRequest
|
|
|
21
20
|
*/
|
|
22
21
|
export interface DeleteTerminologyCommandOutput extends __MetadataBearer {
|
|
23
22
|
}
|
|
23
|
+
declare const DeleteTerminologyCommand_base: {
|
|
24
|
+
new (input: DeleteTerminologyCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteTerminologyCommandInput, DeleteTerminologyCommandOutput, TranslateClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
26
|
+
};
|
|
24
27
|
/**
|
|
25
28
|
* @public
|
|
26
29
|
* <p>A synchronous action that deletes a custom terminology.</p>
|
|
@@ -65,23 +68,5 @@ export interface DeleteTerminologyCommandOutput extends __MetadataBearer {
|
|
|
65
68
|
* <p>Base exception class for all service exceptions from Translate service.</p>
|
|
66
69
|
*
|
|
67
70
|
*/
|
|
68
|
-
export declare class DeleteTerminologyCommand extends
|
|
69
|
-
readonly input: DeleteTerminologyCommandInput;
|
|
70
|
-
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
71
|
-
/**
|
|
72
|
-
* @public
|
|
73
|
-
*/
|
|
74
|
-
constructor(input: DeleteTerminologyCommandInput);
|
|
75
|
-
/**
|
|
76
|
-
* @internal
|
|
77
|
-
*/
|
|
78
|
-
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TranslateClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeleteTerminologyCommandInput, DeleteTerminologyCommandOutput>;
|
|
79
|
-
/**
|
|
80
|
-
* @internal
|
|
81
|
-
*/
|
|
82
|
-
private serialize;
|
|
83
|
-
/**
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
private deserialize;
|
|
71
|
+
export declare class DeleteTerminologyCommand extends DeleteTerminologyCommand_base {
|
|
87
72
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
1
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
-
import {
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
4
3
|
import { DescribeTextTranslationJobRequest, DescribeTextTranslationJobResponse } from "../models/models_0";
|
|
5
4
|
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
6
5
|
/**
|
|
@@ -21,6 +20,10 @@ export interface DescribeTextTranslationJobCommandInput extends DescribeTextTran
|
|
|
21
20
|
*/
|
|
22
21
|
export interface DescribeTextTranslationJobCommandOutput extends DescribeTextTranslationJobResponse, __MetadataBearer {
|
|
23
22
|
}
|
|
23
|
+
declare const DescribeTextTranslationJobCommand_base: {
|
|
24
|
+
new (input: DescribeTextTranslationJobCommandInput): import("@smithy/smithy-client").CommandImpl<DescribeTextTranslationJobCommandInput, DescribeTextTranslationJobCommandOutput, TranslateClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
26
|
+
};
|
|
24
27
|
/**
|
|
25
28
|
* @public
|
|
26
29
|
* <p>Gets the properties associated with an asynchronous batch translation job including name,
|
|
@@ -103,23 +106,5 @@ export interface DescribeTextTranslationJobCommandOutput extends DescribeTextTra
|
|
|
103
106
|
* <p>Base exception class for all service exceptions from Translate service.</p>
|
|
104
107
|
*
|
|
105
108
|
*/
|
|
106
|
-
export declare class DescribeTextTranslationJobCommand extends
|
|
107
|
-
readonly input: DescribeTextTranslationJobCommandInput;
|
|
108
|
-
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
109
|
-
/**
|
|
110
|
-
* @public
|
|
111
|
-
*/
|
|
112
|
-
constructor(input: DescribeTextTranslationJobCommandInput);
|
|
113
|
-
/**
|
|
114
|
-
* @internal
|
|
115
|
-
*/
|
|
116
|
-
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TranslateClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DescribeTextTranslationJobCommandInput, DescribeTextTranslationJobCommandOutput>;
|
|
117
|
-
/**
|
|
118
|
-
* @internal
|
|
119
|
-
*/
|
|
120
|
-
private serialize;
|
|
121
|
-
/**
|
|
122
|
-
* @internal
|
|
123
|
-
*/
|
|
124
|
-
private deserialize;
|
|
109
|
+
export declare class DescribeTextTranslationJobCommand extends DescribeTextTranslationJobCommand_base {
|
|
125
110
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
1
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
-
import {
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
4
3
|
import { GetParallelDataRequest, GetParallelDataResponse } from "../models/models_0";
|
|
5
4
|
import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
|
|
6
5
|
/**
|
|
@@ -21,6 +20,10 @@ export interface GetParallelDataCommandInput extends GetParallelDataRequest {
|
|
|
21
20
|
*/
|
|
22
21
|
export interface GetParallelDataCommandOutput extends GetParallelDataResponse, __MetadataBearer {
|
|
23
22
|
}
|
|
23
|
+
declare const GetParallelDataCommand_base: {
|
|
24
|
+
new (input: GetParallelDataCommandInput): import("@smithy/smithy-client").CommandImpl<GetParallelDataCommandInput, GetParallelDataCommandOutput, TranslateClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
26
|
+
};
|
|
24
27
|
/**
|
|
25
28
|
* @public
|
|
26
29
|
* <p>Provides information about a parallel data resource.</p>
|
|
@@ -105,23 +108,5 @@ export interface GetParallelDataCommandOutput extends GetParallelDataResponse, _
|
|
|
105
108
|
* <p>Base exception class for all service exceptions from Translate service.</p>
|
|
106
109
|
*
|
|
107
110
|
*/
|
|
108
|
-
export declare class GetParallelDataCommand extends
|
|
109
|
-
readonly input: GetParallelDataCommandInput;
|
|
110
|
-
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
111
|
-
/**
|
|
112
|
-
* @public
|
|
113
|
-
*/
|
|
114
|
-
constructor(input: GetParallelDataCommandInput);
|
|
115
|
-
/**
|
|
116
|
-
* @internal
|
|
117
|
-
*/
|
|
118
|
-
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TranslateClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetParallelDataCommandInput, GetParallelDataCommandOutput>;
|
|
119
|
-
/**
|
|
120
|
-
* @internal
|
|
121
|
-
*/
|
|
122
|
-
private serialize;
|
|
123
|
-
/**
|
|
124
|
-
* @internal
|
|
125
|
-
*/
|
|
126
|
-
private deserialize;
|
|
111
|
+
export declare class GetParallelDataCommand extends GetParallelDataCommand_base {
|
|
127
112
|
}
|