@aws-sdk/client-timestream-query 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 (69) hide show
  1. package/dist-cjs/commands/CancelQueryCommand.js +19 -42
  2. package/dist-cjs/commands/CreateScheduledQueryCommand.js +19 -42
  3. package/dist-cjs/commands/DeleteScheduledQueryCommand.js +19 -42
  4. package/dist-cjs/commands/DescribeEndpointsCommand.js +18 -41
  5. package/dist-cjs/commands/DescribeScheduledQueryCommand.js +19 -42
  6. package/dist-cjs/commands/ExecuteScheduledQueryCommand.js +19 -42
  7. package/dist-cjs/commands/ListScheduledQueriesCommand.js +19 -42
  8. package/dist-cjs/commands/ListTagsForResourceCommand.js +19 -42
  9. package/dist-cjs/commands/PrepareQueryCommand.js +19 -42
  10. package/dist-cjs/commands/QueryCommand.js +19 -42
  11. package/dist-cjs/commands/TagResourceCommand.js +19 -42
  12. package/dist-cjs/commands/UntagResourceCommand.js +19 -42
  13. package/dist-cjs/commands/UpdateScheduledQueryCommand.js +19 -42
  14. package/dist-cjs/endpoint/EndpointParameters.js +7 -1
  15. package/dist-cjs/pagination/ListScheduledQueriesPaginator.js +2 -24
  16. package/dist-cjs/pagination/ListTagsForResourcePaginator.js +2 -24
  17. package/dist-cjs/pagination/QueryPaginator.js +2 -24
  18. package/dist-es/commands/CancelQueryCommand.js +19 -42
  19. package/dist-es/commands/CreateScheduledQueryCommand.js +19 -42
  20. package/dist-es/commands/DeleteScheduledQueryCommand.js +19 -42
  21. package/dist-es/commands/DescribeEndpointsCommand.js +18 -41
  22. package/dist-es/commands/DescribeScheduledQueryCommand.js +19 -42
  23. package/dist-es/commands/ExecuteScheduledQueryCommand.js +19 -42
  24. package/dist-es/commands/ListScheduledQueriesCommand.js +19 -42
  25. package/dist-es/commands/ListTagsForResourceCommand.js +19 -42
  26. package/dist-es/commands/PrepareQueryCommand.js +19 -42
  27. package/dist-es/commands/QueryCommand.js +19 -42
  28. package/dist-es/commands/TagResourceCommand.js +19 -42
  29. package/dist-es/commands/UntagResourceCommand.js +19 -42
  30. package/dist-es/commands/UpdateScheduledQueryCommand.js +19 -42
  31. package/dist-es/endpoint/EndpointParameters.js +6 -0
  32. package/dist-es/pagination/ListScheduledQueriesPaginator.js +2 -23
  33. package/dist-es/pagination/ListTagsForResourcePaginator.js +2 -23
  34. package/dist-es/pagination/QueryPaginator.js +2 -23
  35. package/dist-types/commands/CancelQueryCommand.d.ts +6 -21
  36. package/dist-types/commands/CreateScheduledQueryCommand.d.ts +6 -21
  37. package/dist-types/commands/DeleteScheduledQueryCommand.d.ts +6 -21
  38. package/dist-types/commands/DescribeEndpointsCommand.d.ts +6 -21
  39. package/dist-types/commands/DescribeScheduledQueryCommand.d.ts +6 -21
  40. package/dist-types/commands/ExecuteScheduledQueryCommand.d.ts +6 -21
  41. package/dist-types/commands/ListScheduledQueriesCommand.d.ts +6 -21
  42. package/dist-types/commands/ListTagsForResourceCommand.d.ts +6 -21
  43. package/dist-types/commands/PrepareQueryCommand.d.ts +6 -21
  44. package/dist-types/commands/QueryCommand.d.ts +6 -21
  45. package/dist-types/commands/TagResourceCommand.d.ts +6 -21
  46. package/dist-types/commands/UntagResourceCommand.d.ts +6 -21
  47. package/dist-types/commands/UpdateScheduledQueryCommand.d.ts +6 -21
  48. package/dist-types/endpoint/EndpointParameters.d.ts +18 -0
  49. package/dist-types/pagination/ListScheduledQueriesPaginator.d.ts +1 -1
  50. package/dist-types/pagination/ListTagsForResourcePaginator.d.ts +1 -1
  51. package/dist-types/pagination/QueryPaginator.d.ts +1 -1
  52. package/dist-types/ts3.4/commands/CancelQueryCommand.d.ts +14 -23
  53. package/dist-types/ts3.4/commands/CreateScheduledQueryCommand.d.ts +12 -24
  54. package/dist-types/ts3.4/commands/DeleteScheduledQueryCommand.d.ts +12 -24
  55. package/dist-types/ts3.4/commands/DescribeEndpointsCommand.d.ts +14 -23
  56. package/dist-types/ts3.4/commands/DescribeScheduledQueryCommand.d.ts +12 -24
  57. package/dist-types/ts3.4/commands/ExecuteScheduledQueryCommand.d.ts +12 -24
  58. package/dist-types/ts3.4/commands/ListScheduledQueriesCommand.d.ts +12 -24
  59. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +14 -23
  60. package/dist-types/ts3.4/commands/PrepareQueryCommand.d.ts +14 -23
  61. package/dist-types/ts3.4/commands/QueryCommand.d.ts +12 -23
  62. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +14 -23
  63. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +14 -23
  64. package/dist-types/ts3.4/commands/UpdateScheduledQueryCommand.d.ts +12 -24
  65. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +18 -0
  66. package/dist-types/ts3.4/pagination/ListScheduledQueriesPaginator.d.ts +3 -3
  67. package/dist-types/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +3 -3
  68. package/dist-types/ts3.4/pagination/QueryPaginator.d.ts +3 -3
  69. package/package.json +11 -10
@@ -6,49 +6,26 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
6
6
  const middleware_serde_1 = require("@smithy/middleware-serde");
7
7
  const smithy_client_1 = require("@smithy/smithy-client");
8
8
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
9
- const types_1 = require("@smithy/types");
9
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
10
10
  const models_0_1 = require("../models/models_0");
11
11
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
12
- class QueryCommand extends smithy_client_1.Command {
13
- static getEndpointParameterInstructions() {
14
- return {
15
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
16
- Endpoint: { type: "builtInParams", name: "endpoint" },
17
- Region: { type: "builtInParams", name: "region" },
18
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
19
- };
20
- }
21
- constructor(input) {
22
- super();
23
- this.input = input;
24
- }
25
- resolveMiddleware(clientStack, configuration, options) {
26
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
27
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, QueryCommand.getEndpointParameterInstructions()));
28
- this.middlewareStack.use((0, middleware_endpoint_discovery_1.getEndpointDiscoveryPlugin)(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
29
- const stack = clientStack.concat(this.middlewareStack);
30
- const { logger } = configuration;
31
- const clientName = "TimestreamQueryClient";
32
- const commandName = "QueryCommand";
33
- const handlerExecutionContext = {
34
- logger,
35
- clientName,
36
- commandName,
37
- inputFilterSensitiveLog: models_0_1.QueryRequestFilterSensitiveLog,
38
- outputFilterSensitiveLog: (_) => _,
39
- [types_1.SMITHY_CONTEXT_KEY]: {
40
- service: "Timestream_20181101",
41
- operation: "Query",
42
- },
43
- };
44
- const { requestHandler } = configuration;
45
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
46
- }
47
- serialize(input, context) {
48
- return (0, Aws_json1_0_1.se_QueryCommand)(input, context);
49
- }
50
- deserialize(output, context) {
51
- return (0, Aws_json1_0_1.de_QueryCommand)(output, context);
52
- }
12
+ class QueryCommand extends smithy_client_1.Command
13
+ .classBuilder()
14
+ .ep({
15
+ ...EndpointParameters_1.commonParams,
16
+ })
17
+ .m(function (Command, cs, config, o) {
18
+ return [
19
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
20
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
21
+ (0, middleware_endpoint_discovery_1.getEndpointDiscoveryPlugin)(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
22
+ ];
23
+ })
24
+ .s("Timestream_20181101", "Query", {})
25
+ .n("TimestreamQueryClient", "QueryCommand")
26
+ .f(models_0_1.QueryRequestFilterSensitiveLog, void 0)
27
+ .ser(Aws_json1_0_1.se_QueryCommand)
28
+ .de(Aws_json1_0_1.de_QueryCommand)
29
+ .build() {
53
30
  }
54
31
  exports.QueryCommand = QueryCommand;
@@ -6,48 +6,25 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
6
6
  const middleware_serde_1 = require("@smithy/middleware-serde");
7
7
  const smithy_client_1 = require("@smithy/smithy-client");
8
8
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
9
- const types_1 = require("@smithy/types");
9
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
10
10
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
11
- class TagResourceCommand extends smithy_client_1.Command {
12
- static getEndpointParameterInstructions() {
13
- return {
14
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
15
- Endpoint: { type: "builtInParams", name: "endpoint" },
16
- Region: { type: "builtInParams", name: "region" },
17
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
- };
19
- }
20
- constructor(input) {
21
- super();
22
- this.input = input;
23
- }
24
- resolveMiddleware(clientStack, configuration, options) {
25
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
26
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, TagResourceCommand.getEndpointParameterInstructions()));
27
- this.middlewareStack.use((0, middleware_endpoint_discovery_1.getEndpointDiscoveryPlugin)(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
28
- const stack = clientStack.concat(this.middlewareStack);
29
- const { logger } = configuration;
30
- const clientName = "TimestreamQueryClient";
31
- const commandName = "TagResourceCommand";
32
- const handlerExecutionContext = {
33
- logger,
34
- clientName,
35
- commandName,
36
- inputFilterSensitiveLog: (_) => _,
37
- outputFilterSensitiveLog: (_) => _,
38
- [types_1.SMITHY_CONTEXT_KEY]: {
39
- service: "Timestream_20181101",
40
- operation: "TagResource",
41
- },
42
- };
43
- const { requestHandler } = configuration;
44
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
45
- }
46
- serialize(input, context) {
47
- return (0, Aws_json1_0_1.se_TagResourceCommand)(input, context);
48
- }
49
- deserialize(output, context) {
50
- return (0, Aws_json1_0_1.de_TagResourceCommand)(output, context);
51
- }
11
+ class TagResourceCommand extends smithy_client_1.Command
12
+ .classBuilder()
13
+ .ep({
14
+ ...EndpointParameters_1.commonParams,
15
+ })
16
+ .m(function (Command, cs, config, o) {
17
+ return [
18
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
19
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
20
+ (0, middleware_endpoint_discovery_1.getEndpointDiscoveryPlugin)(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
21
+ ];
22
+ })
23
+ .s("Timestream_20181101", "TagResource", {})
24
+ .n("TimestreamQueryClient", "TagResourceCommand")
25
+ .f(void 0, void 0)
26
+ .ser(Aws_json1_0_1.se_TagResourceCommand)
27
+ .de(Aws_json1_0_1.de_TagResourceCommand)
28
+ .build() {
52
29
  }
53
30
  exports.TagResourceCommand = TagResourceCommand;
@@ -6,48 +6,25 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
6
6
  const middleware_serde_1 = require("@smithy/middleware-serde");
7
7
  const smithy_client_1 = require("@smithy/smithy-client");
8
8
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
9
- const types_1 = require("@smithy/types");
9
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
10
10
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
11
- class UntagResourceCommand extends smithy_client_1.Command {
12
- static getEndpointParameterInstructions() {
13
- return {
14
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
15
- Endpoint: { type: "builtInParams", name: "endpoint" },
16
- Region: { type: "builtInParams", name: "region" },
17
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
- };
19
- }
20
- constructor(input) {
21
- super();
22
- this.input = input;
23
- }
24
- resolveMiddleware(clientStack, configuration, options) {
25
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
26
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UntagResourceCommand.getEndpointParameterInstructions()));
27
- this.middlewareStack.use((0, middleware_endpoint_discovery_1.getEndpointDiscoveryPlugin)(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
28
- const stack = clientStack.concat(this.middlewareStack);
29
- const { logger } = configuration;
30
- const clientName = "TimestreamQueryClient";
31
- const commandName = "UntagResourceCommand";
32
- const handlerExecutionContext = {
33
- logger,
34
- clientName,
35
- commandName,
36
- inputFilterSensitiveLog: (_) => _,
37
- outputFilterSensitiveLog: (_) => _,
38
- [types_1.SMITHY_CONTEXT_KEY]: {
39
- service: "Timestream_20181101",
40
- operation: "UntagResource",
41
- },
42
- };
43
- const { requestHandler } = configuration;
44
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
45
- }
46
- serialize(input, context) {
47
- return (0, Aws_json1_0_1.se_UntagResourceCommand)(input, context);
48
- }
49
- deserialize(output, context) {
50
- return (0, Aws_json1_0_1.de_UntagResourceCommand)(output, context);
51
- }
11
+ class UntagResourceCommand extends smithy_client_1.Command
12
+ .classBuilder()
13
+ .ep({
14
+ ...EndpointParameters_1.commonParams,
15
+ })
16
+ .m(function (Command, cs, config, o) {
17
+ return [
18
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
19
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
20
+ (0, middleware_endpoint_discovery_1.getEndpointDiscoveryPlugin)(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
21
+ ];
22
+ })
23
+ .s("Timestream_20181101", "UntagResource", {})
24
+ .n("TimestreamQueryClient", "UntagResourceCommand")
25
+ .f(void 0, void 0)
26
+ .ser(Aws_json1_0_1.se_UntagResourceCommand)
27
+ .de(Aws_json1_0_1.de_UntagResourceCommand)
28
+ .build() {
52
29
  }
53
30
  exports.UntagResourceCommand = UntagResourceCommand;
@@ -6,48 +6,25 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
6
6
  const middleware_serde_1 = require("@smithy/middleware-serde");
7
7
  const smithy_client_1 = require("@smithy/smithy-client");
8
8
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
9
- const types_1 = require("@smithy/types");
9
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
10
10
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
11
- class UpdateScheduledQueryCommand extends smithy_client_1.Command {
12
- static getEndpointParameterInstructions() {
13
- return {
14
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
15
- Endpoint: { type: "builtInParams", name: "endpoint" },
16
- Region: { type: "builtInParams", name: "region" },
17
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
- };
19
- }
20
- constructor(input) {
21
- super();
22
- this.input = input;
23
- }
24
- resolveMiddleware(clientStack, configuration, options) {
25
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
26
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UpdateScheduledQueryCommand.getEndpointParameterInstructions()));
27
- this.middlewareStack.use((0, middleware_endpoint_discovery_1.getEndpointDiscoveryPlugin)(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
28
- const stack = clientStack.concat(this.middlewareStack);
29
- const { logger } = configuration;
30
- const clientName = "TimestreamQueryClient";
31
- const commandName = "UpdateScheduledQueryCommand";
32
- const handlerExecutionContext = {
33
- logger,
34
- clientName,
35
- commandName,
36
- inputFilterSensitiveLog: (_) => _,
37
- outputFilterSensitiveLog: (_) => _,
38
- [types_1.SMITHY_CONTEXT_KEY]: {
39
- service: "Timestream_20181101",
40
- operation: "UpdateScheduledQuery",
41
- },
42
- };
43
- const { requestHandler } = configuration;
44
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
45
- }
46
- serialize(input, context) {
47
- return (0, Aws_json1_0_1.se_UpdateScheduledQueryCommand)(input, context);
48
- }
49
- deserialize(output, context) {
50
- return (0, Aws_json1_0_1.de_UpdateScheduledQueryCommand)(output, context);
51
- }
11
+ class UpdateScheduledQueryCommand extends smithy_client_1.Command
12
+ .classBuilder()
13
+ .ep({
14
+ ...EndpointParameters_1.commonParams,
15
+ })
16
+ .m(function (Command, cs, config, o) {
17
+ return [
18
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
19
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
20
+ (0, middleware_endpoint_discovery_1.getEndpointDiscoveryPlugin)(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
21
+ ];
22
+ })
23
+ .s("Timestream_20181101", "UpdateScheduledQuery", {})
24
+ .n("TimestreamQueryClient", "UpdateScheduledQueryCommand")
25
+ .f(void 0, void 0)
26
+ .ser(Aws_json1_0_1.se_UpdateScheduledQueryCommand)
27
+ .de(Aws_json1_0_1.de_UpdateScheduledQueryCommand)
28
+ .build() {
52
29
  }
53
30
  exports.UpdateScheduledQueryCommand = UpdateScheduledQueryCommand;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveClientEndpointParameters = void 0;
3
+ exports.commonParams = exports.resolveClientEndpointParameters = void 0;
4
4
  const resolveClientEndpointParameters = (options) => {
5
5
  return {
6
6
  ...options,
@@ -10,3 +10,9 @@ const resolveClientEndpointParameters = (options) => {
10
10
  };
11
11
  };
12
12
  exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
13
+ exports.commonParams = {
14
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
15
+ Endpoint: { type: "builtInParams", name: "endpoint" },
16
+ Region: { type: "builtInParams", name: "region" },
17
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
+ };
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListScheduledQueries = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListScheduledQueriesCommand_1 = require("../commands/ListScheduledQueriesCommand");
5
6
  const TimestreamQueryClient_1 = require("../TimestreamQueryClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListScheduledQueriesCommand_1.ListScheduledQueriesCommand(input), ...args);
8
- };
9
- async function* paginateListScheduledQueries(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 TimestreamQueryClient_1.TimestreamQueryClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected TimestreamQuery | TimestreamQueryClient");
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.paginateListScheduledQueries = paginateListScheduledQueries;
7
+ exports.paginateListScheduledQueries = (0, core_1.createPaginator)(TimestreamQueryClient_1.TimestreamQueryClient, ListScheduledQueriesCommand_1.ListScheduledQueriesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListTagsForResource = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListTagsForResourceCommand_1 = require("../commands/ListTagsForResourceCommand");
5
6
  const TimestreamQueryClient_1 = require("../TimestreamQueryClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListTagsForResourceCommand_1.ListTagsForResourceCommand(input), ...args);
8
- };
9
- async function* paginateListTagsForResource(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 TimestreamQueryClient_1.TimestreamQueryClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected TimestreamQuery | TimestreamQueryClient");
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.paginateListTagsForResource = paginateListTagsForResource;
7
+ exports.paginateListTagsForResource = (0, core_1.createPaginator)(TimestreamQueryClient_1.TimestreamQueryClient, ListTagsForResourceCommand_1.ListTagsForResourceCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateQuery = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const QueryCommand_1 = require("../commands/QueryCommand");
5
6
  const TimestreamQueryClient_1 = require("../TimestreamQueryClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new QueryCommand_1.QueryCommand(input), ...args);
8
- };
9
- async function* paginateQuery(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["MaxRows"] = config.pageSize;
16
- if (config.client instanceof TimestreamQueryClient_1.TimestreamQueryClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected TimestreamQuery | TimestreamQueryClient");
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.paginateQuery = paginateQuery;
7
+ exports.paginateQuery = (0, core_1.createPaginator)(TimestreamQueryClient_1.TimestreamQueryClient, QueryCommand_1.QueryCommand, "NextToken", "NextToken", "MaxRows");
@@ -2,48 +2,25 @@ import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discove
2
2
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3
3
  import { getSerdePlugin } from "@smithy/middleware-serde";
4
4
  import { Command as $Command } from "@smithy/smithy-client";
5
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { commonParams } from "../endpoint/EndpointParameters";
6
6
  import { de_CancelQueryCommand, se_CancelQueryCommand } from "../protocols/Aws_json1_0";
7
7
  export { $Command };
8
- export class CancelQueryCommand 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, CancelQueryCommand.getEndpointParameterInstructions()));
24
- this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
25
- const stack = clientStack.concat(this.middlewareStack);
26
- const { logger } = configuration;
27
- const clientName = "TimestreamQueryClient";
28
- const commandName = "CancelQueryCommand";
29
- const handlerExecutionContext = {
30
- logger,
31
- clientName,
32
- commandName,
33
- inputFilterSensitiveLog: (_) => _,
34
- outputFilterSensitiveLog: (_) => _,
35
- [SMITHY_CONTEXT_KEY]: {
36
- service: "Timestream_20181101",
37
- operation: "CancelQuery",
38
- },
39
- };
40
- const { requestHandler } = configuration;
41
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
42
- }
43
- serialize(input, context) {
44
- return se_CancelQueryCommand(input, context);
45
- }
46
- deserialize(output, context) {
47
- return de_CancelQueryCommand(output, context);
48
- }
8
+ export class CancelQueryCommand 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
+ getEndpointDiscoveryPlugin(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
18
+ ];
19
+ })
20
+ .s("Timestream_20181101", "CancelQuery", {})
21
+ .n("TimestreamQueryClient", "CancelQueryCommand")
22
+ .f(void 0, void 0)
23
+ .ser(se_CancelQueryCommand)
24
+ .de(de_CancelQueryCommand)
25
+ .build() {
49
26
  }
@@ -2,49 +2,26 @@ import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discove
2
2
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3
3
  import { getSerdePlugin } from "@smithy/middleware-serde";
4
4
  import { Command as $Command } from "@smithy/smithy-client";
5
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { commonParams } from "../endpoint/EndpointParameters";
6
6
  import { CreateScheduledQueryRequestFilterSensitiveLog, } from "../models/models_0";
7
7
  import { de_CreateScheduledQueryCommand, se_CreateScheduledQueryCommand } from "../protocols/Aws_json1_0";
8
8
  export { $Command };
9
- export class CreateScheduledQueryCommand extends $Command {
10
- static getEndpointParameterInstructions() {
11
- return {
12
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
- Endpoint: { type: "builtInParams", name: "endpoint" },
14
- Region: { type: "builtInParams", name: "region" },
15
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
16
- };
17
- }
18
- constructor(input) {
19
- super();
20
- this.input = input;
21
- }
22
- resolveMiddleware(clientStack, configuration, options) {
23
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
24
- this.middlewareStack.use(getEndpointPlugin(configuration, CreateScheduledQueryCommand.getEndpointParameterInstructions()));
25
- this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "TimestreamQueryClient";
29
- const commandName = "CreateScheduledQueryCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: CreateScheduledQueryRequestFilterSensitiveLog,
35
- outputFilterSensitiveLog: (_) => _,
36
- [SMITHY_CONTEXT_KEY]: {
37
- service: "Timestream_20181101",
38
- operation: "CreateScheduledQuery",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return se_CreateScheduledQueryCommand(input, context);
46
- }
47
- deserialize(output, context) {
48
- return de_CreateScheduledQueryCommand(output, context);
49
- }
9
+ export class CreateScheduledQueryCommand extends $Command
10
+ .classBuilder()
11
+ .ep({
12
+ ...commonParams,
13
+ })
14
+ .m(function (Command, cs, config, o) {
15
+ return [
16
+ getSerdePlugin(config, this.serialize, this.deserialize),
17
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
18
+ getEndpointDiscoveryPlugin(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
19
+ ];
20
+ })
21
+ .s("Timestream_20181101", "CreateScheduledQuery", {})
22
+ .n("TimestreamQueryClient", "CreateScheduledQueryCommand")
23
+ .f(CreateScheduledQueryRequestFilterSensitiveLog, void 0)
24
+ .ser(se_CreateScheduledQueryCommand)
25
+ .de(de_CreateScheduledQueryCommand)
26
+ .build() {
50
27
  }
@@ -2,48 +2,25 @@ import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discove
2
2
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3
3
  import { getSerdePlugin } from "@smithy/middleware-serde";
4
4
  import { Command as $Command } from "@smithy/smithy-client";
5
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { commonParams } from "../endpoint/EndpointParameters";
6
6
  import { de_DeleteScheduledQueryCommand, se_DeleteScheduledQueryCommand } from "../protocols/Aws_json1_0";
7
7
  export { $Command };
8
- export class DeleteScheduledQueryCommand 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, DeleteScheduledQueryCommand.getEndpointParameterInstructions()));
24
- this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
25
- const stack = clientStack.concat(this.middlewareStack);
26
- const { logger } = configuration;
27
- const clientName = "TimestreamQueryClient";
28
- const commandName = "DeleteScheduledQueryCommand";
29
- const handlerExecutionContext = {
30
- logger,
31
- clientName,
32
- commandName,
33
- inputFilterSensitiveLog: (_) => _,
34
- outputFilterSensitiveLog: (_) => _,
35
- [SMITHY_CONTEXT_KEY]: {
36
- service: "Timestream_20181101",
37
- operation: "DeleteScheduledQuery",
38
- },
39
- };
40
- const { requestHandler } = configuration;
41
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
42
- }
43
- serialize(input, context) {
44
- return se_DeleteScheduledQueryCommand(input, context);
45
- }
46
- deserialize(output, context) {
47
- return de_DeleteScheduledQueryCommand(output, context);
48
- }
8
+ export class DeleteScheduledQueryCommand 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
+ getEndpointDiscoveryPlugin(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
18
+ ];
19
+ })
20
+ .s("Timestream_20181101", "DeleteScheduledQuery", {})
21
+ .n("TimestreamQueryClient", "DeleteScheduledQueryCommand")
22
+ .f(void 0, void 0)
23
+ .ser(se_DeleteScheduledQueryCommand)
24
+ .de(de_DeleteScheduledQueryCommand)
25
+ .build() {
49
26
  }