@aws-sdk/client-keyspaces 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.
Files changed (29) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_json1_0.js +2 -2
  3. package/dist-es/Keyspaces.js +61 -54
  4. package/dist-es/KeyspacesClient.js +28 -22
  5. package/dist-es/commands/CreateKeyspaceCommand.js +28 -21
  6. package/dist-es/commands/CreateTableCommand.js +28 -21
  7. package/dist-es/commands/DeleteKeyspaceCommand.js +28 -21
  8. package/dist-es/commands/DeleteTableCommand.js +28 -21
  9. package/dist-es/commands/GetKeyspaceCommand.js +28 -21
  10. package/dist-es/commands/GetTableCommand.js +28 -21
  11. package/dist-es/commands/ListKeyspacesCommand.js +28 -21
  12. package/dist-es/commands/ListTablesCommand.js +28 -21
  13. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  14. package/dist-es/commands/RestoreTableCommand.js +28 -21
  15. package/dist-es/commands/TagResourceCommand.js +28 -21
  16. package/dist-es/commands/UntagResourceCommand.js +28 -21
  17. package/dist-es/commands/UpdateTableCommand.js +28 -21
  18. package/dist-es/endpoints.js +8 -8
  19. package/dist-es/models/KeyspacesServiceException.js +10 -5
  20. package/dist-es/models/models_0.js +109 -190
  21. package/dist-es/pagination/ListKeyspacesPaginator.js +68 -25
  22. package/dist-es/pagination/ListTablesPaginator.js +68 -25
  23. package/dist-es/pagination/ListTagsForResourcePaginator.js +68 -25
  24. package/dist-es/protocols/Aws_json1_0.js +1308 -1057
  25. package/dist-es/runtimeConfig.browser.js +12 -26
  26. package/dist-es/runtimeConfig.js +12 -30
  27. package/dist-es/runtimeConfig.native.js +5 -8
  28. package/dist-es/runtimeConfig.shared.js +11 -8
  29. package/package.json +5 -5
@@ -1,16 +1,17 @@
1
+ import { __assign, __extends } from "tslib";
1
2
  import { KeyspacesServiceException as __BaseException } from "./KeyspacesServiceException";
2
- export class AccessDeniedException extends __BaseException {
3
- constructor(opts) {
4
- super({
5
- name: "AccessDeniedException",
6
- $fault: "client",
7
- ...opts,
8
- });
9
- this.name = "AccessDeniedException";
10
- this.$fault = "client";
11
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
3
+ var AccessDeniedException = (function (_super) {
4
+ __extends(AccessDeniedException, _super);
5
+ function AccessDeniedException(opts) {
6
+ var _this = _super.call(this, __assign({ name: "AccessDeniedException", $fault: "client" }, opts)) || this;
7
+ _this.name = "AccessDeniedException";
8
+ _this.$fault = "client";
9
+ Object.setPrototypeOf(_this, AccessDeniedException.prototype);
10
+ return _this;
12
11
  }
13
- }
12
+ return AccessDeniedException;
13
+ }(__BaseException));
14
+ export { AccessDeniedException };
14
15
  export var ThroughputMode;
15
16
  (function (ThroughputMode) {
16
17
  ThroughputMode["PAY_PER_REQUEST"] = "PAY_PER_REQUEST";
@@ -21,54 +22,54 @@ export var SortOrder;
21
22
  SortOrder["ASC"] = "ASC";
22
23
  SortOrder["DESC"] = "DESC";
23
24
  })(SortOrder || (SortOrder = {}));
24
- export class ConflictException extends __BaseException {
25
- constructor(opts) {
26
- super({
27
- name: "ConflictException",
28
- $fault: "client",
29
- ...opts,
30
- });
31
- this.name = "ConflictException";
32
- this.$fault = "client";
33
- Object.setPrototypeOf(this, ConflictException.prototype);
25
+ var ConflictException = (function (_super) {
26
+ __extends(ConflictException, _super);
27
+ function ConflictException(opts) {
28
+ var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
29
+ _this.name = "ConflictException";
30
+ _this.$fault = "client";
31
+ Object.setPrototypeOf(_this, ConflictException.prototype);
32
+ return _this;
34
33
  }
35
- }
36
- export class InternalServerException extends __BaseException {
37
- constructor(opts) {
38
- super({
39
- name: "InternalServerException",
40
- $fault: "server",
41
- ...opts,
42
- });
43
- this.name = "InternalServerException";
44
- this.$fault = "server";
45
- Object.setPrototypeOf(this, InternalServerException.prototype);
34
+ return ConflictException;
35
+ }(__BaseException));
36
+ export { ConflictException };
37
+ var InternalServerException = (function (_super) {
38
+ __extends(InternalServerException, _super);
39
+ function InternalServerException(opts) {
40
+ var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
41
+ _this.name = "InternalServerException";
42
+ _this.$fault = "server";
43
+ Object.setPrototypeOf(_this, InternalServerException.prototype);
44
+ return _this;
46
45
  }
47
- }
48
- export class ServiceQuotaExceededException extends __BaseException {
49
- constructor(opts) {
50
- super({
51
- name: "ServiceQuotaExceededException",
52
- $fault: "client",
53
- ...opts,
54
- });
55
- this.name = "ServiceQuotaExceededException";
56
- this.$fault = "client";
57
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
46
+ return InternalServerException;
47
+ }(__BaseException));
48
+ export { InternalServerException };
49
+ var ServiceQuotaExceededException = (function (_super) {
50
+ __extends(ServiceQuotaExceededException, _super);
51
+ function ServiceQuotaExceededException(opts) {
52
+ var _this = _super.call(this, __assign({ name: "ServiceQuotaExceededException", $fault: "client" }, opts)) || this;
53
+ _this.name = "ServiceQuotaExceededException";
54
+ _this.$fault = "client";
55
+ Object.setPrototypeOf(_this, ServiceQuotaExceededException.prototype);
56
+ return _this;
58
57
  }
59
- }
60
- export class ValidationException extends __BaseException {
61
- constructor(opts) {
62
- super({
63
- name: "ValidationException",
64
- $fault: "client",
65
- ...opts,
66
- });
67
- this.name = "ValidationException";
68
- this.$fault = "client";
69
- Object.setPrototypeOf(this, ValidationException.prototype);
58
+ return ServiceQuotaExceededException;
59
+ }(__BaseException));
60
+ export { ServiceQuotaExceededException };
61
+ var ValidationException = (function (_super) {
62
+ __extends(ValidationException, _super);
63
+ function ValidationException(opts) {
64
+ var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
65
+ _this.name = "ValidationException";
66
+ _this.$fault = "client";
67
+ Object.setPrototypeOf(_this, ValidationException.prototype);
68
+ return _this;
70
69
  }
71
- }
70
+ return ValidationException;
71
+ }(__BaseException));
72
+ export { ValidationException };
72
73
  export var EncryptionType;
73
74
  (function (EncryptionType) {
74
75
  EncryptionType["AWS_OWNED_KMS_KEY"] = "AWS_OWNED_KMS_KEY";
@@ -83,19 +84,19 @@ export var TimeToLiveStatus;
83
84
  (function (TimeToLiveStatus) {
84
85
  TimeToLiveStatus["ENABLED"] = "ENABLED";
85
86
  })(TimeToLiveStatus || (TimeToLiveStatus = {}));
86
- export class ResourceNotFoundException extends __BaseException {
87
- constructor(opts) {
88
- super({
89
- name: "ResourceNotFoundException",
90
- $fault: "client",
91
- ...opts,
92
- });
93
- this.name = "ResourceNotFoundException";
94
- this.$fault = "client";
95
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
96
- this.resourceArn = opts.resourceArn;
87
+ var ResourceNotFoundException = (function (_super) {
88
+ __extends(ResourceNotFoundException, _super);
89
+ function ResourceNotFoundException(opts) {
90
+ var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
91
+ _this.name = "ResourceNotFoundException";
92
+ _this.$fault = "client";
93
+ Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
94
+ _this.resourceArn = opts.resourceArn;
95
+ return _this;
97
96
  }
98
- }
97
+ return ResourceNotFoundException;
98
+ }(__BaseException));
99
+ export { ResourceNotFoundException };
99
100
  export var TableStatus;
100
101
  (function (TableStatus) {
101
102
  TableStatus["ACTIVE"] = "ACTIVE";
@@ -106,126 +107,44 @@ export var TableStatus;
106
107
  TableStatus["RESTORING"] = "RESTORING";
107
108
  TableStatus["UPDATING"] = "UPDATING";
108
109
  })(TableStatus || (TableStatus = {}));
109
- export const CapacitySpecificationFilterSensitiveLog = (obj) => ({
110
- ...obj,
111
- });
112
- export const CapacitySpecificationSummaryFilterSensitiveLog = (obj) => ({
113
- ...obj,
114
- });
115
- export const ClusteringKeyFilterSensitiveLog = (obj) => ({
116
- ...obj,
117
- });
118
- export const ColumnDefinitionFilterSensitiveLog = (obj) => ({
119
- ...obj,
120
- });
121
- export const CommentFilterSensitiveLog = (obj) => ({
122
- ...obj,
123
- });
124
- export const TagFilterSensitiveLog = (obj) => ({
125
- ...obj,
126
- });
127
- export const CreateKeyspaceRequestFilterSensitiveLog = (obj) => ({
128
- ...obj,
129
- });
130
- export const CreateKeyspaceResponseFilterSensitiveLog = (obj) => ({
131
- ...obj,
132
- });
133
- export const EncryptionSpecificationFilterSensitiveLog = (obj) => ({
134
- ...obj,
135
- });
136
- export const PointInTimeRecoveryFilterSensitiveLog = (obj) => ({
137
- ...obj,
138
- });
139
- export const PartitionKeyFilterSensitiveLog = (obj) => ({
140
- ...obj,
141
- });
142
- export const StaticColumnFilterSensitiveLog = (obj) => ({
143
- ...obj,
144
- });
145
- export const SchemaDefinitionFilterSensitiveLog = (obj) => ({
146
- ...obj,
147
- });
148
- export const TimeToLiveFilterSensitiveLog = (obj) => ({
149
- ...obj,
150
- });
151
- export const CreateTableRequestFilterSensitiveLog = (obj) => ({
152
- ...obj,
153
- });
154
- export const CreateTableResponseFilterSensitiveLog = (obj) => ({
155
- ...obj,
156
- });
157
- export const DeleteKeyspaceRequestFilterSensitiveLog = (obj) => ({
158
- ...obj,
159
- });
160
- export const DeleteKeyspaceResponseFilterSensitiveLog = (obj) => ({
161
- ...obj,
162
- });
163
- export const DeleteTableRequestFilterSensitiveLog = (obj) => ({
164
- ...obj,
165
- });
166
- export const DeleteTableResponseFilterSensitiveLog = (obj) => ({
167
- ...obj,
168
- });
169
- export const GetKeyspaceRequestFilterSensitiveLog = (obj) => ({
170
- ...obj,
171
- });
172
- export const GetKeyspaceResponseFilterSensitiveLog = (obj) => ({
173
- ...obj,
174
- });
175
- export const GetTableRequestFilterSensitiveLog = (obj) => ({
176
- ...obj,
177
- });
178
- export const PointInTimeRecoverySummaryFilterSensitiveLog = (obj) => ({
179
- ...obj,
180
- });
181
- export const GetTableResponseFilterSensitiveLog = (obj) => ({
182
- ...obj,
183
- });
184
- export const ListKeyspacesRequestFilterSensitiveLog = (obj) => ({
185
- ...obj,
186
- });
187
- export const KeyspaceSummaryFilterSensitiveLog = (obj) => ({
188
- ...obj,
189
- });
190
- export const ListKeyspacesResponseFilterSensitiveLog = (obj) => ({
191
- ...obj,
192
- });
193
- export const ListTablesRequestFilterSensitiveLog = (obj) => ({
194
- ...obj,
195
- });
196
- export const TableSummaryFilterSensitiveLog = (obj) => ({
197
- ...obj,
198
- });
199
- export const ListTablesResponseFilterSensitiveLog = (obj) => ({
200
- ...obj,
201
- });
202
- export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
203
- ...obj,
204
- });
205
- export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
206
- ...obj,
207
- });
208
- export const RestoreTableRequestFilterSensitiveLog = (obj) => ({
209
- ...obj,
210
- });
211
- export const RestoreTableResponseFilterSensitiveLog = (obj) => ({
212
- ...obj,
213
- });
214
- export const TagResourceRequestFilterSensitiveLog = (obj) => ({
215
- ...obj,
216
- });
217
- export const TagResourceResponseFilterSensitiveLog = (obj) => ({
218
- ...obj,
219
- });
220
- export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
221
- ...obj,
222
- });
223
- export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
224
- ...obj,
225
- });
226
- export const UpdateTableRequestFilterSensitiveLog = (obj) => ({
227
- ...obj,
228
- });
229
- export const UpdateTableResponseFilterSensitiveLog = (obj) => ({
230
- ...obj,
231
- });
110
+ export var CapacitySpecificationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
111
+ export var CapacitySpecificationSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
112
+ export var ClusteringKeyFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
113
+ export var ColumnDefinitionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
114
+ export var CommentFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
115
+ export var TagFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
116
+ export var CreateKeyspaceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
117
+ export var CreateKeyspaceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
118
+ export var EncryptionSpecificationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
119
+ export var PointInTimeRecoveryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
120
+ export var PartitionKeyFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
121
+ export var StaticColumnFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
122
+ export var SchemaDefinitionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
123
+ export var TimeToLiveFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
124
+ export var CreateTableRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
125
+ export var CreateTableResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
+ export var DeleteKeyspaceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
+ export var DeleteKeyspaceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
128
+ export var DeleteTableRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
129
+ export var DeleteTableResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
+ export var GetKeyspaceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
+ export var GetKeyspaceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
132
+ export var GetTableRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
133
+ export var PointInTimeRecoverySummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
134
+ export var GetTableResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
135
+ export var ListKeyspacesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
136
+ export var KeyspaceSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
137
+ export var ListKeyspacesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
138
+ export var ListTablesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
139
+ export var TableSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
140
+ export var ListTablesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
141
+ export var ListTagsForResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
142
+ export var ListTagsForResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
143
+ export var RestoreTableRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
144
+ export var RestoreTableResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
145
+ export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
146
+ export var TagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
147
+ export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
148
+ export var UntagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
149
+ export var UpdateTableRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
150
+ export var UpdateTableResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { ListKeyspacesCommand, } from "../commands/ListKeyspacesCommand";
2
3
  import { Keyspaces } from "../Keyspaces";
3
4
  import { KeyspacesClient } from "../KeyspacesClient";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new ListKeyspacesCommand(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 ListKeyspacesCommand(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.listKeyspaces(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.listKeyspaces.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateListKeyspaces(config, input, ...additionalArguments) {
11
- let token = config.startingToken || undefined;
12
- let hasNext = true;
13
- let page;
14
- while (hasNext) {
15
- input.nextToken = token;
16
- input["maxResults"] = config.pageSize;
17
- if (config.client instanceof Keyspaces) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof KeyspacesClient) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected Keyspaces | KeyspacesClient");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.nextToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateListKeyspaces(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 paginateListKeyspaces_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.nextToken = token;
49
+ input["maxResults"] = config.pageSize;
50
+ if (!(config.client instanceof Keyspaces)) 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 KeyspacesClient)) 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 Keyspaces | KeyspacesClient");
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.nextToken;
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 { ListTablesCommand } from "../commands/ListTablesCommand";
2
3
  import { Keyspaces } from "../Keyspaces";
3
4
  import { KeyspacesClient } from "../KeyspacesClient";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new ListTablesCommand(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 ListTablesCommand(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.listTables(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.listTables.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateListTables(config, input, ...additionalArguments) {
11
- let token = config.startingToken || undefined;
12
- let hasNext = true;
13
- let page;
14
- while (hasNext) {
15
- input.nextToken = token;
16
- input["maxResults"] = config.pageSize;
17
- if (config.client instanceof Keyspaces) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof KeyspacesClient) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected Keyspaces | KeyspacesClient");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.nextToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateListTables(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 paginateListTables_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.nextToken = token;
49
+ input["maxResults"] = config.pageSize;
50
+ if (!(config.client instanceof Keyspaces)) 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 KeyspacesClient)) 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 Keyspaces | KeyspacesClient");
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.nextToken;
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 { ListTagsForResourceCommand, } from "../commands/ListTagsForResourceCommand";
2
3
  import { Keyspaces } from "../Keyspaces";
3
4
  import { KeyspacesClient } from "../KeyspacesClient";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new ListTagsForResourceCommand(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 ListTagsForResourceCommand(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.listTagsForResource(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.listTagsForResource.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateListTagsForResource(config, input, ...additionalArguments) {
11
- let token = config.startingToken || undefined;
12
- let hasNext = true;
13
- let page;
14
- while (hasNext) {
15
- input.nextToken = token;
16
- input["maxResults"] = config.pageSize;
17
- if (config.client instanceof Keyspaces) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof KeyspacesClient) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected Keyspaces | KeyspacesClient");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.nextToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateListTagsForResource(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 paginateListTagsForResource_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.nextToken = token;
49
+ input["maxResults"] = config.pageSize;
50
+ if (!(config.client instanceof Keyspaces)) 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 KeyspacesClient)) 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 Keyspaces | KeyspacesClient");
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.nextToken;
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
  }