@aws-sdk/client-cost-optimization-hub 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/GetPreferencesCommand.js +18 -41
  2. package/dist-cjs/commands/GetRecommendationCommand.js +18 -41
  3. package/dist-cjs/commands/ListEnrollmentStatusesCommand.js +18 -41
  4. package/dist-cjs/commands/ListRecommendationSummariesCommand.js +18 -41
  5. package/dist-cjs/commands/ListRecommendationsCommand.js +18 -41
  6. package/dist-cjs/commands/UpdateEnrollmentStatusCommand.js +18 -41
  7. package/dist-cjs/commands/UpdatePreferencesCommand.js +18 -41
  8. package/dist-cjs/endpoint/EndpointParameters.js +7 -1
  9. package/dist-cjs/pagination/ListEnrollmentStatusesPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListRecommendationSummariesPaginator.js +2 -24
  11. package/dist-cjs/pagination/ListRecommendationsPaginator.js +2 -24
  12. package/dist-es/commands/GetPreferencesCommand.js +18 -41
  13. package/dist-es/commands/GetRecommendationCommand.js +18 -41
  14. package/dist-es/commands/ListEnrollmentStatusesCommand.js +18 -41
  15. package/dist-es/commands/ListRecommendationSummariesCommand.js +18 -41
  16. package/dist-es/commands/ListRecommendationsCommand.js +18 -41
  17. package/dist-es/commands/UpdateEnrollmentStatusCommand.js +18 -41
  18. package/dist-es/commands/UpdatePreferencesCommand.js +18 -41
  19. package/dist-es/endpoint/EndpointParameters.js +6 -0
  20. package/dist-es/pagination/ListEnrollmentStatusesPaginator.js +2 -23
  21. package/dist-es/pagination/ListRecommendationSummariesPaginator.js +2 -23
  22. package/dist-es/pagination/ListRecommendationsPaginator.js +2 -23
  23. package/dist-types/commands/GetPreferencesCommand.d.ts +6 -21
  24. package/dist-types/commands/GetRecommendationCommand.d.ts +6 -21
  25. package/dist-types/commands/ListEnrollmentStatusesCommand.d.ts +6 -21
  26. package/dist-types/commands/ListRecommendationSummariesCommand.d.ts +6 -21
  27. package/dist-types/commands/ListRecommendationsCommand.d.ts +6 -21
  28. package/dist-types/commands/UpdateEnrollmentStatusCommand.d.ts +6 -21
  29. package/dist-types/commands/UpdatePreferencesCommand.d.ts +6 -21
  30. package/dist-types/endpoint/EndpointParameters.d.ts +18 -0
  31. package/dist-types/pagination/ListEnrollmentStatusesPaginator.d.ts +1 -1
  32. package/dist-types/pagination/ListRecommendationSummariesPaginator.d.ts +1 -1
  33. package/dist-types/pagination/ListRecommendationsPaginator.d.ts +1 -1
  34. package/dist-types/ts3.4/commands/GetPreferencesCommand.d.ts +14 -23
  35. package/dist-types/ts3.4/commands/GetRecommendationCommand.d.ts +14 -23
  36. package/dist-types/ts3.4/commands/ListEnrollmentStatusesCommand.d.ts +12 -24
  37. package/dist-types/ts3.4/commands/ListRecommendationSummariesCommand.d.ts +12 -24
  38. package/dist-types/ts3.4/commands/ListRecommendationsCommand.d.ts +14 -23
  39. package/dist-types/ts3.4/commands/UpdateEnrollmentStatusCommand.d.ts +12 -24
  40. package/dist-types/ts3.4/commands/UpdatePreferencesCommand.d.ts +14 -23
  41. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +18 -0
  42. package/dist-types/ts3.4/pagination/ListEnrollmentStatusesPaginator.d.ts +3 -3
  43. package/dist-types/ts3.4/pagination/ListRecommendationSummariesPaginator.d.ts +3 -3
  44. package/dist-types/ts3.4/pagination/ListRecommendationsPaginator.d.ts +3 -3
  45. package/package.json +11 -10
@@ -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_GetPreferencesCommand, se_GetPreferencesCommand } from "../protocols/Aws_json1_0";
6
6
  export { $Command };
7
- export class GetPreferencesCommand 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, GetPreferencesCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "CostOptimizationHubClient";
26
- const commandName = "GetPreferencesCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "CostOptimizationHubService",
35
- operation: "GetPreferences",
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_GetPreferencesCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_GetPreferencesCommand(output, context);
46
- }
7
+ export class GetPreferencesCommand 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("CostOptimizationHubService", "GetPreferences", {})
19
+ .n("CostOptimizationHubClient", "GetPreferencesCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_GetPreferencesCommand)
22
+ .de(de_GetPreferencesCommand)
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_GetRecommendationCommand, se_GetRecommendationCommand } from "../protocols/Aws_json1_0";
6
6
  export { $Command };
7
- export class GetRecommendationCommand 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, GetRecommendationCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "CostOptimizationHubClient";
26
- const commandName = "GetRecommendationCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "CostOptimizationHubService",
35
- operation: "GetRecommendation",
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_GetRecommendationCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_GetRecommendationCommand(output, context);
46
- }
7
+ export class GetRecommendationCommand 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("CostOptimizationHubService", "GetRecommendation", {})
19
+ .n("CostOptimizationHubClient", "GetRecommendationCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_GetRecommendationCommand)
22
+ .de(de_GetRecommendationCommand)
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_ListEnrollmentStatusesCommand, se_ListEnrollmentStatusesCommand } from "../protocols/Aws_json1_0";
6
6
  export { $Command };
7
- export class ListEnrollmentStatusesCommand 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, ListEnrollmentStatusesCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "CostOptimizationHubClient";
26
- const commandName = "ListEnrollmentStatusesCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "CostOptimizationHubService",
35
- operation: "ListEnrollmentStatuses",
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_ListEnrollmentStatusesCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_ListEnrollmentStatusesCommand(output, context);
46
- }
7
+ export class ListEnrollmentStatusesCommand 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("CostOptimizationHubService", "ListEnrollmentStatuses", {})
19
+ .n("CostOptimizationHubClient", "ListEnrollmentStatusesCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_ListEnrollmentStatusesCommand)
22
+ .de(de_ListEnrollmentStatusesCommand)
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_ListRecommendationSummariesCommand, se_ListRecommendationSummariesCommand } from "../protocols/Aws_json1_0";
6
6
  export { $Command };
7
- export class ListRecommendationSummariesCommand 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, ListRecommendationSummariesCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "CostOptimizationHubClient";
26
- const commandName = "ListRecommendationSummariesCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "CostOptimizationHubService",
35
- operation: "ListRecommendationSummaries",
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_ListRecommendationSummariesCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_ListRecommendationSummariesCommand(output, context);
46
- }
7
+ export class ListRecommendationSummariesCommand 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("CostOptimizationHubService", "ListRecommendationSummaries", {})
19
+ .n("CostOptimizationHubClient", "ListRecommendationSummariesCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_ListRecommendationSummariesCommand)
22
+ .de(de_ListRecommendationSummariesCommand)
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_ListRecommendationsCommand, se_ListRecommendationsCommand } from "../protocols/Aws_json1_0";
6
6
  export { $Command };
7
- export class ListRecommendationsCommand 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, ListRecommendationsCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "CostOptimizationHubClient";
26
- const commandName = "ListRecommendationsCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "CostOptimizationHubService",
35
- operation: "ListRecommendations",
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_ListRecommendationsCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_ListRecommendationsCommand(output, context);
46
- }
7
+ export class ListRecommendationsCommand 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("CostOptimizationHubService", "ListRecommendations", {})
19
+ .n("CostOptimizationHubClient", "ListRecommendationsCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_ListRecommendationsCommand)
22
+ .de(de_ListRecommendationsCommand)
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_UpdateEnrollmentStatusCommand, se_UpdateEnrollmentStatusCommand } from "../protocols/Aws_json1_0";
6
6
  export { $Command };
7
- export class UpdateEnrollmentStatusCommand 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, UpdateEnrollmentStatusCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "CostOptimizationHubClient";
26
- const commandName = "UpdateEnrollmentStatusCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "CostOptimizationHubService",
35
- operation: "UpdateEnrollmentStatus",
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_UpdateEnrollmentStatusCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_UpdateEnrollmentStatusCommand(output, context);
46
- }
7
+ export class UpdateEnrollmentStatusCommand 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("CostOptimizationHubService", "UpdateEnrollmentStatus", {})
19
+ .n("CostOptimizationHubClient", "UpdateEnrollmentStatusCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_UpdateEnrollmentStatusCommand)
22
+ .de(de_UpdateEnrollmentStatusCommand)
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_UpdatePreferencesCommand, se_UpdatePreferencesCommand } from "../protocols/Aws_json1_0";
6
6
  export { $Command };
7
- export class UpdatePreferencesCommand 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, UpdatePreferencesCommand.getEndpointParameterInstructions()));
23
- const stack = clientStack.concat(this.middlewareStack);
24
- const { logger } = configuration;
25
- const clientName = "CostOptimizationHubClient";
26
- const commandName = "UpdatePreferencesCommand";
27
- const handlerExecutionContext = {
28
- logger,
29
- clientName,
30
- commandName,
31
- inputFilterSensitiveLog: (_) => _,
32
- outputFilterSensitiveLog: (_) => _,
33
- [SMITHY_CONTEXT_KEY]: {
34
- service: "CostOptimizationHubService",
35
- operation: "UpdatePreferences",
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_UpdatePreferencesCommand(input, context);
43
- }
44
- deserialize(output, context) {
45
- return de_UpdatePreferencesCommand(output, context);
46
- }
7
+ export class UpdatePreferencesCommand 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("CostOptimizationHubService", "UpdatePreferences", {})
19
+ .n("CostOptimizationHubClient", "UpdatePreferencesCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_UpdatePreferencesCommand)
22
+ .de(de_UpdatePreferencesCommand)
23
+ .build() {
47
24
  }
@@ -6,3 +6,9 @@ export const resolveClientEndpointParameters = (options) => {
6
6
  defaultSigningName: "cost-optimization-hub",
7
7
  };
8
8
  };
9
+ export const commonParams = {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListEnrollmentStatusesCommand, } from "../commands/ListEnrollmentStatusesCommand";
2
3
  import { CostOptimizationHubClient } from "../CostOptimizationHubClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListEnrollmentStatusesCommand(input), ...args);
5
- };
6
- export async function* paginateListEnrollmentStatuses(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof CostOptimizationHubClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CostOptimizationHub | CostOptimizationHubClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListEnrollmentStatuses = createPaginator(CostOptimizationHubClient, ListEnrollmentStatusesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListRecommendationSummariesCommand, } from "../commands/ListRecommendationSummariesCommand";
2
3
  import { CostOptimizationHubClient } from "../CostOptimizationHubClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRecommendationSummariesCommand(input), ...args);
5
- };
6
- export async function* paginateListRecommendationSummaries(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof CostOptimizationHubClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CostOptimizationHub | CostOptimizationHubClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListRecommendationSummaries = createPaginator(CostOptimizationHubClient, ListRecommendationSummariesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListRecommendationsCommand, } from "../commands/ListRecommendationsCommand";
2
3
  import { CostOptimizationHubClient } from "../CostOptimizationHubClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRecommendationsCommand(input), ...args);
5
- };
6
- export async function* paginateListRecommendations(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof CostOptimizationHubClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CostOptimizationHub | CostOptimizationHubClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListRecommendations = createPaginator(CostOptimizationHubClient, ListRecommendationsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,6 +1,5 @@
1
- import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
1
  import { Command as $Command } from "@smithy/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4
3
  import { CostOptimizationHubClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CostOptimizationHubClient";
5
4
  import { GetPreferencesRequest, GetPreferencesResponse } from "../models/models_0";
6
5
  /**
@@ -21,6 +20,10 @@ export interface GetPreferencesCommandInput extends GetPreferencesRequest {
21
20
  */
22
21
  export interface GetPreferencesCommandOutput extends GetPreferencesResponse, __MetadataBearer {
23
22
  }
23
+ declare const GetPreferencesCommand_base: {
24
+ new (input: GetPreferencesCommandInput): import("@smithy/smithy-client").CommandImpl<GetPreferencesCommandInput, GetPreferencesCommandOutput, CostOptimizationHubClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
25
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
26
+ };
24
27
  /**
25
28
  * @public
26
29
  * <p>Returns a set of preferences for an account in order to add account-specific preferences
@@ -67,23 +70,5 @@ export interface GetPreferencesCommandOutput extends GetPreferencesResponse, __M
67
70
  * <p>Base exception class for all service exceptions from CostOptimizationHub service.</p>
68
71
  *
69
72
  */
70
- export declare class GetPreferencesCommand extends $Command<GetPreferencesCommandInput, GetPreferencesCommandOutput, CostOptimizationHubClientResolvedConfig> {
71
- readonly input: GetPreferencesCommandInput;
72
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
73
- /**
74
- * @public
75
- */
76
- constructor(input: GetPreferencesCommandInput);
77
- /**
78
- * @internal
79
- */
80
- resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CostOptimizationHubClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetPreferencesCommandInput, GetPreferencesCommandOutput>;
81
- /**
82
- * @internal
83
- */
84
- private serialize;
85
- /**
86
- * @internal
87
- */
88
- private deserialize;
73
+ export declare class GetPreferencesCommand extends GetPreferencesCommand_base {
89
74
  }