@aws-sdk/client-resource-groups-tagging-api 3.183.0 → 3.185.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.
@@ -1,32 +1,39 @@
1
+ import { __extends } from "tslib";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { TagResourcesInputFilterSensitiveLog, TagResourcesOutputFilterSensitiveLog, } from "../models/models_0";
4
5
  import { deserializeAws_json1_1TagResourcesCommand, serializeAws_json1_1TagResourcesCommand, } from "../protocols/Aws_json1_1";
5
- export class TagResourcesCommand extends $Command {
6
- constructor(input) {
7
- super();
8
- this.input = input;
6
+ var TagResourcesCommand = (function (_super) {
7
+ __extends(TagResourcesCommand, _super);
8
+ function TagResourcesCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
9
12
  }
10
- resolveMiddleware(clientStack, configuration, options) {
13
+ TagResourcesCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
11
14
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
12
- const stack = clientStack.concat(this.middlewareStack);
13
- const { logger } = configuration;
14
- const clientName = "ResourceGroupsTaggingAPIClient";
15
- const commandName = "TagResourcesCommand";
16
- const handlerExecutionContext = {
17
- logger,
18
- clientName,
19
- commandName,
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ResourceGroupsTaggingAPIClient";
18
+ var commandName = "TagResourcesCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
20
23
  inputFilterSensitiveLog: TagResourcesInputFilterSensitiveLog,
21
24
  outputFilterSensitiveLog: TagResourcesOutputFilterSensitiveLog,
22
25
  };
23
- const { requestHandler } = configuration;
24
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
- }
26
- serialize(input, context) {
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ TagResourcesCommand.prototype.serialize = function (input, context) {
27
32
  return serializeAws_json1_1TagResourcesCommand(input, context);
28
- }
29
- deserialize(output, context) {
33
+ };
34
+ TagResourcesCommand.prototype.deserialize = function (output, context) {
30
35
  return deserializeAws_json1_1TagResourcesCommand(output, context);
31
- }
32
- }
36
+ };
37
+ return TagResourcesCommand;
38
+ }($Command));
39
+ export { TagResourcesCommand };
@@ -1,32 +1,39 @@
1
+ import { __extends } from "tslib";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { UntagResourcesInputFilterSensitiveLog, UntagResourcesOutputFilterSensitiveLog, } from "../models/models_0";
4
5
  import { deserializeAws_json1_1UntagResourcesCommand, serializeAws_json1_1UntagResourcesCommand, } from "../protocols/Aws_json1_1";
5
- export class UntagResourcesCommand extends $Command {
6
- constructor(input) {
7
- super();
8
- this.input = input;
6
+ var UntagResourcesCommand = (function (_super) {
7
+ __extends(UntagResourcesCommand, _super);
8
+ function UntagResourcesCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
9
12
  }
10
- resolveMiddleware(clientStack, configuration, options) {
13
+ UntagResourcesCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
11
14
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
12
- const stack = clientStack.concat(this.middlewareStack);
13
- const { logger } = configuration;
14
- const clientName = "ResourceGroupsTaggingAPIClient";
15
- const commandName = "UntagResourcesCommand";
16
- const handlerExecutionContext = {
17
- logger,
18
- clientName,
19
- commandName,
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ResourceGroupsTaggingAPIClient";
18
+ var commandName = "UntagResourcesCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
20
23
  inputFilterSensitiveLog: UntagResourcesInputFilterSensitiveLog,
21
24
  outputFilterSensitiveLog: UntagResourcesOutputFilterSensitiveLog,
22
25
  };
23
- const { requestHandler } = configuration;
24
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
- }
26
- serialize(input, context) {
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ UntagResourcesCommand.prototype.serialize = function (input, context) {
27
32
  return serializeAws_json1_1UntagResourcesCommand(input, context);
28
- }
29
- deserialize(output, context) {
33
+ };
34
+ UntagResourcesCommand.prototype.deserialize = function (output, context) {
30
35
  return deserializeAws_json1_1UntagResourcesCommand(output, context);
31
- }
32
- }
36
+ };
37
+ return UntagResourcesCommand;
38
+ }($Command));
39
+ export { UntagResourcesCommand };
@@ -1,6 +1,7 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
2
- const regionHash = {};
3
- const partitionHash = {
3
+ var regionHash = {};
4
+ var partitionHash = {
4
5
  aws: {
5
6
  regions: [
6
7
  "af-south-1",
@@ -120,9 +121,8 @@ const partitionHash = {
120
121
  ],
121
122
  },
122
123
  };
123
- export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
124
- ...options,
125
- signingService: "tagging",
126
- regionHash,
127
- partitionHash,
128
- });
124
+ export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
125
+ return __generator(this, function (_a) {
126
+ return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "tagging", regionHash: regionHash, partitionHash: partitionHash }))];
127
+ });
128
+ }); };
@@ -1,7 +1,12 @@
1
+ import { __extends } from "tslib";
1
2
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
2
- export class ResourceGroupsTaggingAPIServiceException extends __ServiceException {
3
- constructor(options) {
4
- super(options);
5
- Object.setPrototypeOf(this, ResourceGroupsTaggingAPIServiceException.prototype);
3
+ var ResourceGroupsTaggingAPIServiceException = (function (_super) {
4
+ __extends(ResourceGroupsTaggingAPIServiceException, _super);
5
+ function ResourceGroupsTaggingAPIServiceException(options) {
6
+ var _this = _super.call(this, options) || this;
7
+ Object.setPrototypeOf(_this, ResourceGroupsTaggingAPIServiceException.prototype);
8
+ return _this;
6
9
  }
7
- }
10
+ return ResourceGroupsTaggingAPIServiceException;
11
+ }(__ServiceException));
12
+ export { ResourceGroupsTaggingAPIServiceException };
@@ -1,69 +1,70 @@
1
+ import { __assign, __extends } from "tslib";
1
2
  import { ResourceGroupsTaggingAPIServiceException as __BaseException } from "./ResourceGroupsTaggingAPIServiceException";
2
- export class ConcurrentModificationException extends __BaseException {
3
- constructor(opts) {
4
- super({
5
- name: "ConcurrentModificationException",
6
- $fault: "client",
7
- ...opts,
8
- });
9
- this.name = "ConcurrentModificationException";
10
- this.$fault = "client";
11
- Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
12
- this.Message = opts.Message;
3
+ var ConcurrentModificationException = (function (_super) {
4
+ __extends(ConcurrentModificationException, _super);
5
+ function ConcurrentModificationException(opts) {
6
+ var _this = _super.call(this, __assign({ name: "ConcurrentModificationException", $fault: "client" }, opts)) || this;
7
+ _this.name = "ConcurrentModificationException";
8
+ _this.$fault = "client";
9
+ Object.setPrototypeOf(_this, ConcurrentModificationException.prototype);
10
+ _this.Message = opts.Message;
11
+ return _this;
13
12
  }
14
- }
15
- export class ConstraintViolationException extends __BaseException {
16
- constructor(opts) {
17
- super({
18
- name: "ConstraintViolationException",
19
- $fault: "client",
20
- ...opts,
21
- });
22
- this.name = "ConstraintViolationException";
23
- this.$fault = "client";
24
- Object.setPrototypeOf(this, ConstraintViolationException.prototype);
25
- this.Message = opts.Message;
13
+ return ConcurrentModificationException;
14
+ }(__BaseException));
15
+ export { ConcurrentModificationException };
16
+ var ConstraintViolationException = (function (_super) {
17
+ __extends(ConstraintViolationException, _super);
18
+ function ConstraintViolationException(opts) {
19
+ var _this = _super.call(this, __assign({ name: "ConstraintViolationException", $fault: "client" }, opts)) || this;
20
+ _this.name = "ConstraintViolationException";
21
+ _this.$fault = "client";
22
+ Object.setPrototypeOf(_this, ConstraintViolationException.prototype);
23
+ _this.Message = opts.Message;
24
+ return _this;
26
25
  }
27
- }
28
- export class InternalServiceException extends __BaseException {
29
- constructor(opts) {
30
- super({
31
- name: "InternalServiceException",
32
- $fault: "server",
33
- ...opts,
34
- });
35
- this.name = "InternalServiceException";
36
- this.$fault = "server";
37
- Object.setPrototypeOf(this, InternalServiceException.prototype);
38
- this.Message = opts.Message;
26
+ return ConstraintViolationException;
27
+ }(__BaseException));
28
+ export { ConstraintViolationException };
29
+ var InternalServiceException = (function (_super) {
30
+ __extends(InternalServiceException, _super);
31
+ function InternalServiceException(opts) {
32
+ var _this = _super.call(this, __assign({ name: "InternalServiceException", $fault: "server" }, opts)) || this;
33
+ _this.name = "InternalServiceException";
34
+ _this.$fault = "server";
35
+ Object.setPrototypeOf(_this, InternalServiceException.prototype);
36
+ _this.Message = opts.Message;
37
+ return _this;
39
38
  }
40
- }
41
- export class InvalidParameterException extends __BaseException {
42
- constructor(opts) {
43
- super({
44
- name: "InvalidParameterException",
45
- $fault: "client",
46
- ...opts,
47
- });
48
- this.name = "InvalidParameterException";
49
- this.$fault = "client";
50
- Object.setPrototypeOf(this, InvalidParameterException.prototype);
51
- this.Message = opts.Message;
39
+ return InternalServiceException;
40
+ }(__BaseException));
41
+ export { InternalServiceException };
42
+ var InvalidParameterException = (function (_super) {
43
+ __extends(InvalidParameterException, _super);
44
+ function InvalidParameterException(opts) {
45
+ var _this = _super.call(this, __assign({ name: "InvalidParameterException", $fault: "client" }, opts)) || this;
46
+ _this.name = "InvalidParameterException";
47
+ _this.$fault = "client";
48
+ Object.setPrototypeOf(_this, InvalidParameterException.prototype);
49
+ _this.Message = opts.Message;
50
+ return _this;
52
51
  }
53
- }
54
- export class ThrottledException extends __BaseException {
55
- constructor(opts) {
56
- super({
57
- name: "ThrottledException",
58
- $fault: "client",
59
- ...opts,
60
- });
61
- this.name = "ThrottledException";
62
- this.$fault = "client";
63
- Object.setPrototypeOf(this, ThrottledException.prototype);
64
- this.Message = opts.Message;
52
+ return InvalidParameterException;
53
+ }(__BaseException));
54
+ export { InvalidParameterException };
55
+ var ThrottledException = (function (_super) {
56
+ __extends(ThrottledException, _super);
57
+ function ThrottledException(opts) {
58
+ var _this = _super.call(this, __assign({ name: "ThrottledException", $fault: "client" }, opts)) || this;
59
+ _this.name = "ThrottledException";
60
+ _this.$fault = "client";
61
+ Object.setPrototypeOf(_this, ThrottledException.prototype);
62
+ _this.Message = opts.Message;
63
+ return _this;
65
64
  }
66
- }
65
+ return ThrottledException;
66
+ }(__BaseException));
67
+ export { ThrottledException };
67
68
  export var ErrorCode;
68
69
  (function (ErrorCode) {
69
70
  ErrorCode["INTERNAL_SERVICE_EXCEPTION"] = "InternalServiceException";
@@ -81,82 +82,38 @@ export var TargetIdType;
81
82
  TargetIdType["OU"] = "OU";
82
83
  TargetIdType["ROOT"] = "ROOT";
83
84
  })(TargetIdType || (TargetIdType = {}));
84
- export class PaginationTokenExpiredException extends __BaseException {
85
- constructor(opts) {
86
- super({
87
- name: "PaginationTokenExpiredException",
88
- $fault: "client",
89
- ...opts,
90
- });
91
- this.name = "PaginationTokenExpiredException";
92
- this.$fault = "client";
93
- Object.setPrototypeOf(this, PaginationTokenExpiredException.prototype);
94
- this.Message = opts.Message;
85
+ var PaginationTokenExpiredException = (function (_super) {
86
+ __extends(PaginationTokenExpiredException, _super);
87
+ function PaginationTokenExpiredException(opts) {
88
+ var _this = _super.call(this, __assign({ name: "PaginationTokenExpiredException", $fault: "client" }, opts)) || this;
89
+ _this.name = "PaginationTokenExpiredException";
90
+ _this.$fault = "client";
91
+ Object.setPrototypeOf(_this, PaginationTokenExpiredException.prototype);
92
+ _this.Message = opts.Message;
93
+ return _this;
95
94
  }
96
- }
97
- export const ComplianceDetailsFilterSensitiveLog = (obj) => ({
98
- ...obj,
99
- });
100
- export const DescribeReportCreationInputFilterSensitiveLog = (obj) => ({
101
- ...obj,
102
- });
103
- export const DescribeReportCreationOutputFilterSensitiveLog = (obj) => ({
104
- ...obj,
105
- });
106
- export const FailureInfoFilterSensitiveLog = (obj) => ({
107
- ...obj,
108
- });
109
- export const GetComplianceSummaryInputFilterSensitiveLog = (obj) => ({
110
- ...obj,
111
- });
112
- export const SummaryFilterSensitiveLog = (obj) => ({
113
- ...obj,
114
- });
115
- export const GetComplianceSummaryOutputFilterSensitiveLog = (obj) => ({
116
- ...obj,
117
- });
118
- export const TagFilterFilterSensitiveLog = (obj) => ({
119
- ...obj,
120
- });
121
- export const GetResourcesInputFilterSensitiveLog = (obj) => ({
122
- ...obj,
123
- });
124
- export const TagFilterSensitiveLog = (obj) => ({
125
- ...obj,
126
- });
127
- export const ResourceTagMappingFilterSensitiveLog = (obj) => ({
128
- ...obj,
129
- });
130
- export const GetResourcesOutputFilterSensitiveLog = (obj) => ({
131
- ...obj,
132
- });
133
- export const GetTagKeysInputFilterSensitiveLog = (obj) => ({
134
- ...obj,
135
- });
136
- export const GetTagKeysOutputFilterSensitiveLog = (obj) => ({
137
- ...obj,
138
- });
139
- export const GetTagValuesInputFilterSensitiveLog = (obj) => ({
140
- ...obj,
141
- });
142
- export const GetTagValuesOutputFilterSensitiveLog = (obj) => ({
143
- ...obj,
144
- });
145
- export const StartReportCreationInputFilterSensitiveLog = (obj) => ({
146
- ...obj,
147
- });
148
- export const StartReportCreationOutputFilterSensitiveLog = (obj) => ({
149
- ...obj,
150
- });
151
- export const TagResourcesInputFilterSensitiveLog = (obj) => ({
152
- ...obj,
153
- });
154
- export const TagResourcesOutputFilterSensitiveLog = (obj) => ({
155
- ...obj,
156
- });
157
- export const UntagResourcesInputFilterSensitiveLog = (obj) => ({
158
- ...obj,
159
- });
160
- export const UntagResourcesOutputFilterSensitiveLog = (obj) => ({
161
- ...obj,
162
- });
95
+ return PaginationTokenExpiredException;
96
+ }(__BaseException));
97
+ export { PaginationTokenExpiredException };
98
+ export var ComplianceDetailsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
99
+ export var DescribeReportCreationInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
100
+ export var DescribeReportCreationOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
101
+ export var FailureInfoFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
102
+ export var GetComplianceSummaryInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
103
+ export var SummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
104
+ export var GetComplianceSummaryOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
105
+ export var TagFilterFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
106
+ export var GetResourcesInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
107
+ export var TagFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
108
+ export var ResourceTagMappingFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
109
+ export var GetResourcesOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
110
+ export var GetTagKeysInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
111
+ export var GetTagKeysOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
112
+ export var GetTagValuesInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
113
+ export var GetTagValuesOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
114
+ export var StartReportCreationInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
115
+ export var StartReportCreationOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
116
+ export var TagResourcesInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
117
+ export var TagResourcesOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
118
+ export var UntagResourcesInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
119
+ export var UntagResourcesOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { GetComplianceSummaryCommand, } from "../commands/GetComplianceSummaryCommand";
2
3
  import { ResourceGroupsTaggingAPI } from "../ResourceGroupsTaggingAPI";
3
4
  import { ResourceGroupsTaggingAPIClient } from "../ResourceGroupsTaggingAPIClient";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new GetComplianceSummaryCommand(input), ...args);
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new GetComplianceSummaryCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
6
18
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.getComplianceSummary(input, ...args);
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.getComplianceSummary.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateGetComplianceSummary(config, input, ...additionalArguments) {
11
- let token = config.startingToken || undefined;
12
- let hasNext = true;
13
- let page;
14
- while (hasNext) {
15
- input.PaginationToken = token;
16
- input["MaxResults"] = config.pageSize;
17
- if (config.client instanceof ResourceGroupsTaggingAPI) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof ResourceGroupsTaggingAPIClient) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected ResourceGroupsTaggingAPI | ResourceGroupsTaggingAPIClient");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.PaginationToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateGetComplianceSummary(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
30
37
  }
31
- return undefined;
38
+ return __asyncGenerator(this, arguments, function paginateGetComplianceSummary_1() {
39
+ var token, hasNext, page, prevToken;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.PaginationToken = token;
49
+ input["MaxResults"] = config.pageSize;
50
+ if (!(config.client instanceof ResourceGroupsTaggingAPI)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof ResourceGroupsTaggingAPIClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected ResourceGroupsTaggingAPI | ResourceGroupsTaggingAPIClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ prevToken = token;
67
+ token = page.PaginationToken;
68
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
+ return [3, 1];
70
+ case 9: return [4, __await(undefined)];
71
+ case 10: return [2, _a.sent()];
72
+ }
73
+ });
74
+ });
32
75
  }
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { GetResourcesCommand, } from "../commands/GetResourcesCommand";
2
3
  import { ResourceGroupsTaggingAPI } from "../ResourceGroupsTaggingAPI";
3
4
  import { ResourceGroupsTaggingAPIClient } from "../ResourceGroupsTaggingAPIClient";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new GetResourcesCommand(input), ...args);
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new GetResourcesCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
6
18
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.getResources(input, ...args);
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.getResources.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateGetResources(config, input, ...additionalArguments) {
11
- let token = config.startingToken || undefined;
12
- let hasNext = true;
13
- let page;
14
- while (hasNext) {
15
- input.PaginationToken = token;
16
- input["ResourcesPerPage"] = config.pageSize;
17
- if (config.client instanceof ResourceGroupsTaggingAPI) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof ResourceGroupsTaggingAPIClient) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected ResourceGroupsTaggingAPI | ResourceGroupsTaggingAPIClient");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.PaginationToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateGetResources(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
30
37
  }
31
- return undefined;
38
+ return __asyncGenerator(this, arguments, function paginateGetResources_1() {
39
+ var token, hasNext, page, prevToken;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.PaginationToken = token;
49
+ input["ResourcesPerPage"] = config.pageSize;
50
+ if (!(config.client instanceof ResourceGroupsTaggingAPI)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof ResourceGroupsTaggingAPIClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected ResourceGroupsTaggingAPI | ResourceGroupsTaggingAPIClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ prevToken = token;
67
+ token = page.PaginationToken;
68
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
+ return [3, 1];
70
+ case 9: return [4, __await(undefined)];
71
+ case 10: return [2, _a.sent()];
72
+ }
73
+ });
74
+ });
32
75
  }