@aws-sdk/client-pricing 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 (41) hide show
  1. package/dist-cjs/commands/DescribeServicesCommand.js +18 -41
  2. package/dist-cjs/commands/GetAttributeValuesCommand.js +18 -41
  3. package/dist-cjs/commands/GetPriceListFileUrlCommand.js +18 -41
  4. package/dist-cjs/commands/GetProductsCommand.js +18 -41
  5. package/dist-cjs/commands/ListPriceListsCommand.js +18 -41
  6. package/dist-cjs/endpoint/EndpointParameters.js +7 -1
  7. package/dist-cjs/pagination/DescribeServicesPaginator.js +2 -24
  8. package/dist-cjs/pagination/GetAttributeValuesPaginator.js +2 -24
  9. package/dist-cjs/pagination/GetProductsPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListPriceListsPaginator.js +2 -24
  11. package/dist-es/commands/DescribeServicesCommand.js +18 -41
  12. package/dist-es/commands/GetAttributeValuesCommand.js +18 -41
  13. package/dist-es/commands/GetPriceListFileUrlCommand.js +18 -41
  14. package/dist-es/commands/GetProductsCommand.js +18 -41
  15. package/dist-es/commands/ListPriceListsCommand.js +18 -41
  16. package/dist-es/endpoint/EndpointParameters.js +6 -0
  17. package/dist-es/pagination/DescribeServicesPaginator.js +2 -23
  18. package/dist-es/pagination/GetAttributeValuesPaginator.js +2 -23
  19. package/dist-es/pagination/GetProductsPaginator.js +2 -23
  20. package/dist-es/pagination/ListPriceListsPaginator.js +2 -23
  21. package/dist-types/commands/DescribeServicesCommand.d.ts +6 -21
  22. package/dist-types/commands/GetAttributeValuesCommand.d.ts +6 -21
  23. package/dist-types/commands/GetPriceListFileUrlCommand.d.ts +6 -21
  24. package/dist-types/commands/GetProductsCommand.d.ts +6 -21
  25. package/dist-types/commands/ListPriceListsCommand.d.ts +6 -21
  26. package/dist-types/endpoint/EndpointParameters.d.ts +18 -0
  27. package/dist-types/pagination/DescribeServicesPaginator.d.ts +1 -1
  28. package/dist-types/pagination/GetAttributeValuesPaginator.d.ts +1 -1
  29. package/dist-types/pagination/GetProductsPaginator.d.ts +1 -1
  30. package/dist-types/pagination/ListPriceListsPaginator.d.ts +1 -1
  31. package/dist-types/ts3.4/commands/DescribeServicesCommand.d.ts +14 -23
  32. package/dist-types/ts3.4/commands/GetAttributeValuesCommand.d.ts +14 -23
  33. package/dist-types/ts3.4/commands/GetPriceListFileUrlCommand.d.ts +14 -23
  34. package/dist-types/ts3.4/commands/GetProductsCommand.d.ts +14 -23
  35. package/dist-types/ts3.4/commands/ListPriceListsCommand.d.ts +14 -23
  36. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +18 -0
  37. package/dist-types/ts3.4/pagination/DescribeServicesPaginator.d.ts +3 -3
  38. package/dist-types/ts3.4/pagination/GetAttributeValuesPaginator.d.ts +3 -3
  39. package/dist-types/ts3.4/pagination/GetProductsPaginator.d.ts +3 -3
  40. package/dist-types/ts3.4/pagination/ListPriceListsPaginator.d.ts +3 -3
  41. package/package.json +11 -10
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
10
- class DescribeServicesCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeServicesCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "PricingClient";
29
- const commandName = "DescribeServicesCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AWSPriceListService",
38
- operation: "DescribeServices",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_json1_1_1.se_DescribeServicesCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_json1_1_1.de_DescribeServicesCommand)(output, context);
49
- }
10
+ class DescribeServicesCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AWSPriceListService", "DescribeServices", {})
22
+ .n("PricingClient", "DescribeServicesCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_json1_1_1.se_DescribeServicesCommand)
25
+ .de(Aws_json1_1_1.de_DescribeServicesCommand)
26
+ .build() {
50
27
  }
51
28
  exports.DescribeServicesCommand = DescribeServicesCommand;
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
10
- class GetAttributeValuesCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetAttributeValuesCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "PricingClient";
29
- const commandName = "GetAttributeValuesCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AWSPriceListService",
38
- operation: "GetAttributeValues",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_json1_1_1.se_GetAttributeValuesCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_json1_1_1.de_GetAttributeValuesCommand)(output, context);
49
- }
10
+ class GetAttributeValuesCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AWSPriceListService", "GetAttributeValues", {})
22
+ .n("PricingClient", "GetAttributeValuesCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_json1_1_1.se_GetAttributeValuesCommand)
25
+ .de(Aws_json1_1_1.de_GetAttributeValuesCommand)
26
+ .build() {
50
27
  }
51
28
  exports.GetAttributeValuesCommand = GetAttributeValuesCommand;
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
10
- class GetPriceListFileUrlCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetPriceListFileUrlCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "PricingClient";
29
- const commandName = "GetPriceListFileUrlCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AWSPriceListService",
38
- operation: "GetPriceListFileUrl",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_json1_1_1.se_GetPriceListFileUrlCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_json1_1_1.de_GetPriceListFileUrlCommand)(output, context);
49
- }
10
+ class GetPriceListFileUrlCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AWSPriceListService", "GetPriceListFileUrl", {})
22
+ .n("PricingClient", "GetPriceListFileUrlCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_json1_1_1.se_GetPriceListFileUrlCommand)
25
+ .de(Aws_json1_1_1.de_GetPriceListFileUrlCommand)
26
+ .build() {
50
27
  }
51
28
  exports.GetPriceListFileUrlCommand = GetPriceListFileUrlCommand;
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
10
- class GetProductsCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetProductsCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "PricingClient";
29
- const commandName = "GetProductsCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AWSPriceListService",
38
- operation: "GetProducts",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_json1_1_1.se_GetProductsCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_json1_1_1.de_GetProductsCommand)(output, context);
49
- }
10
+ class GetProductsCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AWSPriceListService", "GetProducts", {})
22
+ .n("PricingClient", "GetProductsCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_json1_1_1.se_GetProductsCommand)
25
+ .de(Aws_json1_1_1.de_GetProductsCommand)
26
+ .build() {
50
27
  }
51
28
  exports.GetProductsCommand = GetProductsCommand;
@@ -5,47 +5,24 @@ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const types_1 = require("@smithy/types");
8
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
9
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
10
- class ListPriceListsCommand extends smithy_client_1.Command {
11
- static getEndpointParameterInstructions() {
12
- return {
13
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
- Endpoint: { type: "builtInParams", name: "endpoint" },
15
- Region: { type: "builtInParams", name: "region" },
16
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
- };
18
- }
19
- constructor(input) {
20
- super();
21
- this.input = input;
22
- }
23
- resolveMiddleware(clientStack, configuration, options) {
24
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
- this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListPriceListsCommand.getEndpointParameterInstructions()));
26
- const stack = clientStack.concat(this.middlewareStack);
27
- const { logger } = configuration;
28
- const clientName = "PricingClient";
29
- const commandName = "ListPriceListsCommand";
30
- const handlerExecutionContext = {
31
- logger,
32
- clientName,
33
- commandName,
34
- inputFilterSensitiveLog: (_) => _,
35
- outputFilterSensitiveLog: (_) => _,
36
- [types_1.SMITHY_CONTEXT_KEY]: {
37
- service: "AWSPriceListService",
38
- operation: "ListPriceLists",
39
- },
40
- };
41
- const { requestHandler } = configuration;
42
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
- }
44
- serialize(input, context) {
45
- return (0, Aws_json1_1_1.se_ListPriceListsCommand)(input, context);
46
- }
47
- deserialize(output, context) {
48
- return (0, Aws_json1_1_1.de_ListPriceListsCommand)(output, context);
49
- }
10
+ class ListPriceListsCommand extends smithy_client_1.Command
11
+ .classBuilder()
12
+ .ep({
13
+ ...EndpointParameters_1.commonParams,
14
+ })
15
+ .m(function (Command, cs, config, o) {
16
+ return [
17
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
+ (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
+ ];
20
+ })
21
+ .s("AWSPriceListService", "ListPriceLists", {})
22
+ .n("PricingClient", "ListPriceListsCommand")
23
+ .f(void 0, void 0)
24
+ .ser(Aws_json1_1_1.se_ListPriceListsCommand)
25
+ .de(Aws_json1_1_1.de_ListPriceListsCommand)
26
+ .build() {
50
27
  }
51
28
  exports.ListPriceListsCommand = ListPriceListsCommand;
@@ -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.paginateDescribeServices = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const DescribeServicesCommand_1 = require("../commands/DescribeServicesCommand");
5
6
  const PricingClient_1 = require("../PricingClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new DescribeServicesCommand_1.DescribeServicesCommand(input), ...args);
8
- };
9
- async function* paginateDescribeServices(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 PricingClient_1.PricingClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Pricing | PricingClient");
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.paginateDescribeServices = paginateDescribeServices;
7
+ exports.paginateDescribeServices = (0, core_1.createPaginator)(PricingClient_1.PricingClient, DescribeServicesCommand_1.DescribeServicesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateGetAttributeValues = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const GetAttributeValuesCommand_1 = require("../commands/GetAttributeValuesCommand");
5
6
  const PricingClient_1 = require("../PricingClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new GetAttributeValuesCommand_1.GetAttributeValuesCommand(input), ...args);
8
- };
9
- async function* paginateGetAttributeValues(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 PricingClient_1.PricingClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Pricing | PricingClient");
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.paginateGetAttributeValues = paginateGetAttributeValues;
7
+ exports.paginateGetAttributeValues = (0, core_1.createPaginator)(PricingClient_1.PricingClient, GetAttributeValuesCommand_1.GetAttributeValuesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateGetProducts = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const GetProductsCommand_1 = require("../commands/GetProductsCommand");
5
6
  const PricingClient_1 = require("../PricingClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new GetProductsCommand_1.GetProductsCommand(input), ...args);
8
- };
9
- async function* paginateGetProducts(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 PricingClient_1.PricingClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Pricing | PricingClient");
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.paginateGetProducts = paginateGetProducts;
7
+ exports.paginateGetProducts = (0, core_1.createPaginator)(PricingClient_1.PricingClient, GetProductsCommand_1.GetProductsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPriceLists = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPriceListsCommand_1 = require("../commands/ListPriceListsCommand");
5
6
  const PricingClient_1 = require("../PricingClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPriceListsCommand_1.ListPriceListsCommand(input), ...args);
8
- };
9
- async function* paginateListPriceLists(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 PricingClient_1.PricingClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Pricing | PricingClient");
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.paginateListPriceLists = paginateListPriceLists;
7
+ exports.paginateListPriceLists = (0, core_1.createPaginator)(PricingClient_1.PricingClient, ListPriceListsCommand_1.ListPriceListsCommand, "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_DescribeServicesCommand, se_DescribeServicesCommand } from "../protocols/Aws_json1_1";
6
6
  export { $Command };
7
- export class DescribeServicesCommand 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, DescribeServicesCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "PricingClient";
26
- const commandName = "DescribeServicesCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "AWSPriceListService",
35
- operation: "DescribeServices",
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_DescribeServicesCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_DescribeServicesCommand(output, context);
46
- }
7
+ export class DescribeServicesCommand 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("AWSPriceListService", "DescribeServices", {})
19
+ .n("PricingClient", "DescribeServicesCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_DescribeServicesCommand)
22
+ .de(de_DescribeServicesCommand)
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_GetAttributeValuesCommand, se_GetAttributeValuesCommand } from "../protocols/Aws_json1_1";
6
6
  export { $Command };
7
- export class GetAttributeValuesCommand 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, GetAttributeValuesCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "PricingClient";
26
- const commandName = "GetAttributeValuesCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "AWSPriceListService",
35
- operation: "GetAttributeValues",
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_GetAttributeValuesCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_GetAttributeValuesCommand(output, context);
46
- }
7
+ export class GetAttributeValuesCommand 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("AWSPriceListService", "GetAttributeValues", {})
19
+ .n("PricingClient", "GetAttributeValuesCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_GetAttributeValuesCommand)
22
+ .de(de_GetAttributeValuesCommand)
23
+ .build() {
47
24
  }