@aws-sdk/client-polly 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.
Files changed (45) hide show
  1. package/dist-cjs/commands/DeleteLexiconCommand.js +18 -41
  2. package/dist-cjs/commands/DescribeVoicesCommand.js +18 -41
  3. package/dist-cjs/commands/GetLexiconCommand.js +18 -41
  4. package/dist-cjs/commands/GetSpeechSynthesisTaskCommand.js +18 -41
  5. package/dist-cjs/commands/ListLexiconsCommand.js +18 -41
  6. package/dist-cjs/commands/ListSpeechSynthesisTasksCommand.js +18 -41
  7. package/dist-cjs/commands/PutLexiconCommand.js +18 -41
  8. package/dist-cjs/commands/StartSpeechSynthesisTaskCommand.js +18 -41
  9. package/dist-cjs/commands/SynthesizeSpeechCommand.js +18 -41
  10. package/dist-cjs/endpoint/EndpointParameters.js +7 -1
  11. package/dist-cjs/pagination/ListSpeechSynthesisTasksPaginator.js +2 -24
  12. package/dist-es/commands/DeleteLexiconCommand.js +18 -41
  13. package/dist-es/commands/DescribeVoicesCommand.js +18 -41
  14. package/dist-es/commands/GetLexiconCommand.js +18 -41
  15. package/dist-es/commands/GetSpeechSynthesisTaskCommand.js +18 -41
  16. package/dist-es/commands/ListLexiconsCommand.js +18 -41
  17. package/dist-es/commands/ListSpeechSynthesisTasksCommand.js +18 -41
  18. package/dist-es/commands/PutLexiconCommand.js +18 -41
  19. package/dist-es/commands/StartSpeechSynthesisTaskCommand.js +18 -41
  20. package/dist-es/commands/SynthesizeSpeechCommand.js +18 -41
  21. package/dist-es/endpoint/EndpointParameters.js +6 -0
  22. package/dist-es/pagination/ListSpeechSynthesisTasksPaginator.js +2 -23
  23. package/dist-types/commands/DeleteLexiconCommand.d.ts +6 -21
  24. package/dist-types/commands/DescribeVoicesCommand.d.ts +6 -21
  25. package/dist-types/commands/GetLexiconCommand.d.ts +6 -21
  26. package/dist-types/commands/GetSpeechSynthesisTaskCommand.d.ts +6 -21
  27. package/dist-types/commands/ListLexiconsCommand.d.ts +6 -21
  28. package/dist-types/commands/ListSpeechSynthesisTasksCommand.d.ts +6 -21
  29. package/dist-types/commands/PutLexiconCommand.d.ts +6 -21
  30. package/dist-types/commands/StartSpeechSynthesisTaskCommand.d.ts +6 -21
  31. package/dist-types/commands/SynthesizeSpeechCommand.d.ts +6 -21
  32. package/dist-types/endpoint/EndpointParameters.d.ts +18 -0
  33. package/dist-types/pagination/ListSpeechSynthesisTasksPaginator.d.ts +1 -1
  34. package/dist-types/ts3.4/commands/DeleteLexiconCommand.d.ts +14 -23
  35. package/dist-types/ts3.4/commands/DescribeVoicesCommand.d.ts +14 -23
  36. package/dist-types/ts3.4/commands/GetLexiconCommand.d.ts +14 -23
  37. package/dist-types/ts3.4/commands/GetSpeechSynthesisTaskCommand.d.ts +12 -24
  38. package/dist-types/ts3.4/commands/ListLexiconsCommand.d.ts +14 -23
  39. package/dist-types/ts3.4/commands/ListSpeechSynthesisTasksCommand.d.ts +12 -24
  40. package/dist-types/ts3.4/commands/PutLexiconCommand.d.ts +14 -23
  41. package/dist-types/ts3.4/commands/StartSpeechSynthesisTaskCommand.d.ts +12 -24
  42. package/dist-types/ts3.4/commands/SynthesizeSpeechCommand.d.ts +13 -20
  43. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +18 -0
  44. package/dist-types/ts3.4/pagination/ListSpeechSynthesisTasksPaginator.d.ts +3 -3
  45. package/package.json +11 -11
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListSpeechSynthesisTasks = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListSpeechSynthesisTasksCommand_1 = require("../commands/ListSpeechSynthesisTasksCommand");
5
6
  const PollyClient_1 = require("../PollyClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListSpeechSynthesisTasksCommand_1.ListSpeechSynthesisTasksCommand(input), ...args);
8
- };
9
- async function* paginateListSpeechSynthesisTasks(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof PollyClient_1.PollyClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Polly | PollyClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListSpeechSynthesisTasks = paginateListSpeechSynthesisTasks;
7
+ exports.paginateListSpeechSynthesisTasks = (0, core_1.createPaginator)(PollyClient_1.PollyClient, ListSpeechSynthesisTasksCommand_1.ListSpeechSynthesisTasksCommand, "NextToken", "NextToken", "MaxResults");
@@ -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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
5
  import { de_DeleteLexiconCommand, se_DeleteLexiconCommand } from "../protocols/Aws_restJson1";
6
6
  export { $Command };
7
- export class DeleteLexiconCommand extends $Command {
8
- static getEndpointParameterInstructions() {
9
- return {
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
- };
15
- }
16
- constructor(input) {
17
- super();
18
- this.input = input;
19
- }
20
- resolveMiddleware(clientStack, configuration, options) {
21
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
- this.middlewareStack.use(getEndpointPlugin(configuration, DeleteLexiconCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "PollyClient";
26
- const commandName = "DeleteLexiconCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "Parrot_v1",
35
- operation: "DeleteLexicon",
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_DeleteLexiconCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_DeleteLexiconCommand(output, context);
46
- }
7
+ export class DeleteLexiconCommand 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("Parrot_v1", "DeleteLexicon", {})
19
+ .n("PollyClient", "DeleteLexiconCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_DeleteLexiconCommand)
22
+ .de(de_DeleteLexiconCommand)
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
5
  import { de_DescribeVoicesCommand, se_DescribeVoicesCommand } from "../protocols/Aws_restJson1";
6
6
  export { $Command };
7
- export class DescribeVoicesCommand extends $Command {
8
- static getEndpointParameterInstructions() {
9
- return {
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
- };
15
- }
16
- constructor(input) {
17
- super();
18
- this.input = input;
19
- }
20
- resolveMiddleware(clientStack, configuration, options) {
21
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
- this.middlewareStack.use(getEndpointPlugin(configuration, DescribeVoicesCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "PollyClient";
26
- const commandName = "DescribeVoicesCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "Parrot_v1",
35
- operation: "DescribeVoices",
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_DescribeVoicesCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_DescribeVoicesCommand(output, context);
46
- }
7
+ export class DescribeVoicesCommand 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("Parrot_v1", "DescribeVoices", {})
19
+ .n("PollyClient", "DescribeVoicesCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_DescribeVoicesCommand)
22
+ .de(de_DescribeVoicesCommand)
23
+ .build() {
47
24
  }
@@ -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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
5
  import { GetLexiconOutputFilterSensitiveLog } from "../models/models_0";
6
6
  import { de_GetLexiconCommand, se_GetLexiconCommand } from "../protocols/Aws_restJson1";
7
7
  export { $Command };
8
- export class GetLexiconCommand extends $Command {
9
- static getEndpointParameterInstructions() {
10
- return {
11
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
- Endpoint: { type: "builtInParams", name: "endpoint" },
13
- Region: { type: "builtInParams", name: "region" },
14
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
- };
16
- }
17
- constructor(input) {
18
- super();
19
- this.input = input;
20
- }
21
- resolveMiddleware(clientStack, configuration, options) {
22
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
- this.middlewareStack.use(getEndpointPlugin(configuration, GetLexiconCommand.getEndpointParameterInstructions()));
24
- const stack = clientStack.concat(this.middlewareStack);
25
- const { logger } = configuration;
26
- const clientName = "PollyClient";
27
- const commandName = "GetLexiconCommand";
28
- const handlerExecutionContext = {
29
- logger,
30
- clientName,
31
- commandName,
32
- inputFilterSensitiveLog: (_) => _,
33
- outputFilterSensitiveLog: GetLexiconOutputFilterSensitiveLog,
34
- [SMITHY_CONTEXT_KEY]: {
35
- service: "Parrot_v1",
36
- operation: "GetLexicon",
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_GetLexiconCommand(input, context);
44
- }
45
- deserialize(output, context) {
46
- return de_GetLexiconCommand(output, context);
47
- }
8
+ export class GetLexiconCommand 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("Parrot_v1", "GetLexicon", {})
20
+ .n("PollyClient", "GetLexiconCommand")
21
+ .f(void 0, GetLexiconOutputFilterSensitiveLog)
22
+ .ser(se_GetLexiconCommand)
23
+ .de(de_GetLexiconCommand)
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
5
  import { de_GetSpeechSynthesisTaskCommand, se_GetSpeechSynthesisTaskCommand } from "../protocols/Aws_restJson1";
6
6
  export { $Command };
7
- export class GetSpeechSynthesisTaskCommand extends $Command {
8
- static getEndpointParameterInstructions() {
9
- return {
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
- };
15
- }
16
- constructor(input) {
17
- super();
18
- this.input = input;
19
- }
20
- resolveMiddleware(clientStack, configuration, options) {
21
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
- this.middlewareStack.use(getEndpointPlugin(configuration, GetSpeechSynthesisTaskCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "PollyClient";
26
- const commandName = "GetSpeechSynthesisTaskCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "Parrot_v1",
35
- operation: "GetSpeechSynthesisTask",
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_GetSpeechSynthesisTaskCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_GetSpeechSynthesisTaskCommand(output, context);
46
- }
7
+ export class GetSpeechSynthesisTaskCommand 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("Parrot_v1", "GetSpeechSynthesisTask", {})
19
+ .n("PollyClient", "GetSpeechSynthesisTaskCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_GetSpeechSynthesisTaskCommand)
22
+ .de(de_GetSpeechSynthesisTaskCommand)
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
5
  import { de_ListLexiconsCommand, se_ListLexiconsCommand } from "../protocols/Aws_restJson1";
6
6
  export { $Command };
7
- export class ListLexiconsCommand extends $Command {
8
- static getEndpointParameterInstructions() {
9
- return {
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
- };
15
- }
16
- constructor(input) {
17
- super();
18
- this.input = input;
19
- }
20
- resolveMiddleware(clientStack, configuration, options) {
21
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
- this.middlewareStack.use(getEndpointPlugin(configuration, ListLexiconsCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "PollyClient";
26
- const commandName = "ListLexiconsCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "Parrot_v1",
35
- operation: "ListLexicons",
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_ListLexiconsCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_ListLexiconsCommand(output, context);
46
- }
7
+ export class ListLexiconsCommand 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("Parrot_v1", "ListLexicons", {})
19
+ .n("PollyClient", "ListLexiconsCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_ListLexiconsCommand)
22
+ .de(de_ListLexiconsCommand)
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
5
  import { de_ListSpeechSynthesisTasksCommand, se_ListSpeechSynthesisTasksCommand } from "../protocols/Aws_restJson1";
6
6
  export { $Command };
7
- export class ListSpeechSynthesisTasksCommand extends $Command {
8
- static getEndpointParameterInstructions() {
9
- return {
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
- };
15
- }
16
- constructor(input) {
17
- super();
18
- this.input = input;
19
- }
20
- resolveMiddleware(clientStack, configuration, options) {
21
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
- this.middlewareStack.use(getEndpointPlugin(configuration, ListSpeechSynthesisTasksCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "PollyClient";
26
- const commandName = "ListSpeechSynthesisTasksCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "Parrot_v1",
35
- operation: "ListSpeechSynthesisTasks",
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_ListSpeechSynthesisTasksCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_ListSpeechSynthesisTasksCommand(output, context);
46
- }
7
+ export class ListSpeechSynthesisTasksCommand 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("Parrot_v1", "ListSpeechSynthesisTasks", {})
19
+ .n("PollyClient", "ListSpeechSynthesisTasksCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_ListSpeechSynthesisTasksCommand)
22
+ .de(de_ListSpeechSynthesisTasksCommand)
23
+ .build() {
47
24
  }
@@ -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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
5
  import { PutLexiconInputFilterSensitiveLog } from "../models/models_0";
6
6
  import { de_PutLexiconCommand, se_PutLexiconCommand } from "../protocols/Aws_restJson1";
7
7
  export { $Command };
8
- export class PutLexiconCommand extends $Command {
9
- static getEndpointParameterInstructions() {
10
- return {
11
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
- Endpoint: { type: "builtInParams", name: "endpoint" },
13
- Region: { type: "builtInParams", name: "region" },
14
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
- };
16
- }
17
- constructor(input) {
18
- super();
19
- this.input = input;
20
- }
21
- resolveMiddleware(clientStack, configuration, options) {
22
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
- this.middlewareStack.use(getEndpointPlugin(configuration, PutLexiconCommand.getEndpointParameterInstructions()));
24
- const stack = clientStack.concat(this.middlewareStack);
25
- const { logger } = configuration;
26
- const clientName = "PollyClient";
27
- const commandName = "PutLexiconCommand";
28
- const handlerExecutionContext = {
29
- logger,
30
- clientName,
31
- commandName,
32
- inputFilterSensitiveLog: PutLexiconInputFilterSensitiveLog,
33
- outputFilterSensitiveLog: (_) => _,
34
- [SMITHY_CONTEXT_KEY]: {
35
- service: "Parrot_v1",
36
- operation: "PutLexicon",
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_PutLexiconCommand(input, context);
44
- }
45
- deserialize(output, context) {
46
- return de_PutLexiconCommand(output, context);
47
- }
8
+ export class PutLexiconCommand 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("Parrot_v1", "PutLexicon", {})
20
+ .n("PollyClient", "PutLexiconCommand")
21
+ .f(PutLexiconInputFilterSensitiveLog, void 0)
22
+ .ser(se_PutLexiconCommand)
23
+ .de(de_PutLexiconCommand)
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
5
  import { de_StartSpeechSynthesisTaskCommand, se_StartSpeechSynthesisTaskCommand } from "../protocols/Aws_restJson1";
6
6
  export { $Command };
7
- export class StartSpeechSynthesisTaskCommand extends $Command {
8
- static getEndpointParameterInstructions() {
9
- return {
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
- };
15
- }
16
- constructor(input) {
17
- super();
18
- this.input = input;
19
- }
20
- resolveMiddleware(clientStack, configuration, options) {
21
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
- this.middlewareStack.use(getEndpointPlugin(configuration, StartSpeechSynthesisTaskCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "PollyClient";
26
- const commandName = "StartSpeechSynthesisTaskCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "Parrot_v1",
35
- operation: "StartSpeechSynthesisTask",
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_StartSpeechSynthesisTaskCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_StartSpeechSynthesisTaskCommand(output, context);
46
- }
7
+ export class StartSpeechSynthesisTaskCommand 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("Parrot_v1", "StartSpeechSynthesisTask", {})
19
+ .n("PollyClient", "StartSpeechSynthesisTaskCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_StartSpeechSynthesisTaskCommand)
22
+ .de(de_StartSpeechSynthesisTaskCommand)
23
+ .build() {
47
24
  }
@@ -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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
5
  import { SynthesizeSpeechOutputFilterSensitiveLog, } from "../models/models_0";
6
6
  import { de_SynthesizeSpeechCommand, se_SynthesizeSpeechCommand } from "../protocols/Aws_restJson1";
7
7
  export { $Command };
8
- export class SynthesizeSpeechCommand extends $Command {
9
- static getEndpointParameterInstructions() {
10
- return {
11
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
- Endpoint: { type: "builtInParams", name: "endpoint" },
13
- Region: { type: "builtInParams", name: "region" },
14
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
- };
16
- }
17
- constructor(input) {
18
- super();
19
- this.input = input;
20
- }
21
- resolveMiddleware(clientStack, configuration, options) {
22
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
- this.middlewareStack.use(getEndpointPlugin(configuration, SynthesizeSpeechCommand.getEndpointParameterInstructions()));
24
- const stack = clientStack.concat(this.middlewareStack);
25
- const { logger } = configuration;
26
- const clientName = "PollyClient";
27
- const commandName = "SynthesizeSpeechCommand";
28
- const handlerExecutionContext = {
29
- logger,
30
- clientName,
31
- commandName,
32
- inputFilterSensitiveLog: (_) => _,
33
- outputFilterSensitiveLog: SynthesizeSpeechOutputFilterSensitiveLog,
34
- [SMITHY_CONTEXT_KEY]: {
35
- service: "Parrot_v1",
36
- operation: "SynthesizeSpeech",
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_SynthesizeSpeechCommand(input, context);
44
- }
45
- deserialize(output, context) {
46
- return de_SynthesizeSpeechCommand(output, context);
47
- }
8
+ export class SynthesizeSpeechCommand 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("Parrot_v1", "SynthesizeSpeech", {})
20
+ .n("PollyClient", "SynthesizeSpeechCommand")
21
+ .f(void 0, SynthesizeSpeechOutputFilterSensitiveLog)
22
+ .ser(se_SynthesizeSpeechCommand)
23
+ .de(de_SynthesizeSpeechCommand)
24
+ .build() {
48
25
  }