@aws-sdk/client-cloudhsm-v2 3.183.0 → 3.186.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 (31) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +2 -2
  3. package/dist-es/CloudHSMV2.js +69 -62
  4. package/dist-es/CloudHSMV2Client.js +28 -22
  5. package/dist-es/commands/CopyBackupToRegionCommand.js +28 -21
  6. package/dist-es/commands/CreateClusterCommand.js +28 -21
  7. package/dist-es/commands/CreateHsmCommand.js +28 -21
  8. package/dist-es/commands/DeleteBackupCommand.js +28 -21
  9. package/dist-es/commands/DeleteClusterCommand.js +28 -21
  10. package/dist-es/commands/DeleteHsmCommand.js +28 -21
  11. package/dist-es/commands/DescribeBackupsCommand.js +28 -21
  12. package/dist-es/commands/DescribeClustersCommand.js +28 -21
  13. package/dist-es/commands/InitializeClusterCommand.js +28 -21
  14. package/dist-es/commands/ListTagsCommand.js +28 -21
  15. package/dist-es/commands/ModifyBackupAttributesCommand.js +28 -21
  16. package/dist-es/commands/ModifyClusterCommand.js +28 -21
  17. package/dist-es/commands/RestoreBackupCommand.js +28 -21
  18. package/dist-es/commands/TagResourceCommand.js +28 -21
  19. package/dist-es/commands/UntagResourceCommand.js +28 -21
  20. package/dist-es/endpoints.js +8 -8
  21. package/dist-es/models/CloudHSMV2ServiceException.js +10 -5
  22. package/dist-es/models/models_0.js +110 -183
  23. package/dist-es/pagination/DescribeBackupsPaginator.js +68 -25
  24. package/dist-es/pagination/DescribeClustersPaginator.js +68 -25
  25. package/dist-es/pagination/ListTagsPaginator.js +68 -25
  26. package/dist-es/protocols/Aws_json1_1.js +1415 -1086
  27. package/dist-es/runtimeConfig.browser.js +12 -26
  28. package/dist-es/runtimeConfig.js +12 -30
  29. package/dist-es/runtimeConfig.native.js +5 -8
  30. package/dist-es/runtimeConfig.shared.js +11 -8
  31. package/package.json +33 -33
@@ -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 { UntagResourceRequestFilterSensitiveLog, UntagResourceResponseFilterSensitiveLog, } from "../models/models_0";
4
5
  import { deserializeAws_json1_1UntagResourceCommand, serializeAws_json1_1UntagResourceCommand, } from "../protocols/Aws_json1_1";
5
- export class UntagResourceCommand extends $Command {
6
- constructor(input) {
7
- super();
8
- this.input = input;
6
+ var UntagResourceCommand = (function (_super) {
7
+ __extends(UntagResourceCommand, _super);
8
+ function UntagResourceCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
9
12
  }
10
- resolveMiddleware(clientStack, configuration, options) {
13
+ UntagResourceCommand.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 = "CloudHSMV2Client";
15
- const commandName = "UntagResourceCommand";
16
- const handlerExecutionContext = {
17
- logger,
18
- clientName,
19
- commandName,
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "CloudHSMV2Client";
18
+ var commandName = "UntagResourceCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
20
23
  inputFilterSensitiveLog: UntagResourceRequestFilterSensitiveLog,
21
24
  outputFilterSensitiveLog: UntagResourceResponseFilterSensitiveLog,
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
+ UntagResourceCommand.prototype.serialize = function (input, context) {
27
32
  return serializeAws_json1_1UntagResourceCommand(input, context);
28
- }
29
- deserialize(output, context) {
33
+ };
34
+ UntagResourceCommand.prototype.deserialize = function (output, context) {
30
35
  return deserializeAws_json1_1UntagResourceCommand(output, context);
31
- }
32
- }
36
+ };
37
+ return UntagResourceCommand;
38
+ }($Command));
39
+ export { UntagResourceCommand };
@@ -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: "cloudhsm",
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: "cloudhsm", 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 CloudHSMV2ServiceException extends __ServiceException {
3
- constructor(options) {
4
- super(options);
5
- Object.setPrototypeOf(this, CloudHSMV2ServiceException.prototype);
3
+ var CloudHSMV2ServiceException = (function (_super) {
4
+ __extends(CloudHSMV2ServiceException, _super);
5
+ function CloudHSMV2ServiceException(options) {
6
+ var _this = _super.call(this, options) || this;
7
+ Object.setPrototypeOf(_this, CloudHSMV2ServiceException.prototype);
8
+ return _this;
6
9
  }
7
- }
10
+ return CloudHSMV2ServiceException;
11
+ }(__ServiceException));
12
+ export { CloudHSMV2ServiceException };
@@ -1,3 +1,4 @@
1
+ import { __assign, __extends } from "tslib";
1
2
  import { CloudHSMV2ServiceException as __BaseException } from "./CloudHSMV2ServiceException";
2
3
  export var BackupState;
3
4
  (function (BackupState) {
@@ -14,84 +15,84 @@ export var BackupRetentionType;
14
15
  (function (BackupRetentionType) {
15
16
  BackupRetentionType["DAYS"] = "DAYS";
16
17
  })(BackupRetentionType || (BackupRetentionType = {}));
17
- export class CloudHsmAccessDeniedException extends __BaseException {
18
- constructor(opts) {
19
- super({
20
- name: "CloudHsmAccessDeniedException",
21
- $fault: "client",
22
- ...opts,
23
- });
24
- this.name = "CloudHsmAccessDeniedException";
25
- this.$fault = "client";
26
- Object.setPrototypeOf(this, CloudHsmAccessDeniedException.prototype);
27
- this.Message = opts.Message;
18
+ var CloudHsmAccessDeniedException = (function (_super) {
19
+ __extends(CloudHsmAccessDeniedException, _super);
20
+ function CloudHsmAccessDeniedException(opts) {
21
+ var _this = _super.call(this, __assign({ name: "CloudHsmAccessDeniedException", $fault: "client" }, opts)) || this;
22
+ _this.name = "CloudHsmAccessDeniedException";
23
+ _this.$fault = "client";
24
+ Object.setPrototypeOf(_this, CloudHsmAccessDeniedException.prototype);
25
+ _this.Message = opts.Message;
26
+ return _this;
28
27
  }
29
- }
30
- export class CloudHsmInternalFailureException extends __BaseException {
31
- constructor(opts) {
32
- super({
33
- name: "CloudHsmInternalFailureException",
34
- $fault: "server",
35
- ...opts,
36
- });
37
- this.name = "CloudHsmInternalFailureException";
38
- this.$fault = "server";
39
- Object.setPrototypeOf(this, CloudHsmInternalFailureException.prototype);
40
- this.Message = opts.Message;
28
+ return CloudHsmAccessDeniedException;
29
+ }(__BaseException));
30
+ export { CloudHsmAccessDeniedException };
31
+ var CloudHsmInternalFailureException = (function (_super) {
32
+ __extends(CloudHsmInternalFailureException, _super);
33
+ function CloudHsmInternalFailureException(opts) {
34
+ var _this = _super.call(this, __assign({ name: "CloudHsmInternalFailureException", $fault: "server" }, opts)) || this;
35
+ _this.name = "CloudHsmInternalFailureException";
36
+ _this.$fault = "server";
37
+ Object.setPrototypeOf(_this, CloudHsmInternalFailureException.prototype);
38
+ _this.Message = opts.Message;
39
+ return _this;
41
40
  }
42
- }
43
- export class CloudHsmInvalidRequestException extends __BaseException {
44
- constructor(opts) {
45
- super({
46
- name: "CloudHsmInvalidRequestException",
47
- $fault: "client",
48
- ...opts,
49
- });
50
- this.name = "CloudHsmInvalidRequestException";
51
- this.$fault = "client";
52
- Object.setPrototypeOf(this, CloudHsmInvalidRequestException.prototype);
53
- this.Message = opts.Message;
41
+ return CloudHsmInternalFailureException;
42
+ }(__BaseException));
43
+ export { CloudHsmInternalFailureException };
44
+ var CloudHsmInvalidRequestException = (function (_super) {
45
+ __extends(CloudHsmInvalidRequestException, _super);
46
+ function CloudHsmInvalidRequestException(opts) {
47
+ var _this = _super.call(this, __assign({ name: "CloudHsmInvalidRequestException", $fault: "client" }, opts)) || this;
48
+ _this.name = "CloudHsmInvalidRequestException";
49
+ _this.$fault = "client";
50
+ Object.setPrototypeOf(_this, CloudHsmInvalidRequestException.prototype);
51
+ _this.Message = opts.Message;
52
+ return _this;
54
53
  }
55
- }
56
- export class CloudHsmResourceNotFoundException extends __BaseException {
57
- constructor(opts) {
58
- super({
59
- name: "CloudHsmResourceNotFoundException",
60
- $fault: "client",
61
- ...opts,
62
- });
63
- this.name = "CloudHsmResourceNotFoundException";
64
- this.$fault = "client";
65
- Object.setPrototypeOf(this, CloudHsmResourceNotFoundException.prototype);
66
- this.Message = opts.Message;
54
+ return CloudHsmInvalidRequestException;
55
+ }(__BaseException));
56
+ export { CloudHsmInvalidRequestException };
57
+ var CloudHsmResourceNotFoundException = (function (_super) {
58
+ __extends(CloudHsmResourceNotFoundException, _super);
59
+ function CloudHsmResourceNotFoundException(opts) {
60
+ var _this = _super.call(this, __assign({ name: "CloudHsmResourceNotFoundException", $fault: "client" }, opts)) || this;
61
+ _this.name = "CloudHsmResourceNotFoundException";
62
+ _this.$fault = "client";
63
+ Object.setPrototypeOf(_this, CloudHsmResourceNotFoundException.prototype);
64
+ _this.Message = opts.Message;
65
+ return _this;
67
66
  }
68
- }
69
- export class CloudHsmServiceException extends __BaseException {
70
- constructor(opts) {
71
- super({
72
- name: "CloudHsmServiceException",
73
- $fault: "client",
74
- ...opts,
75
- });
76
- this.name = "CloudHsmServiceException";
77
- this.$fault = "client";
78
- Object.setPrototypeOf(this, CloudHsmServiceException.prototype);
79
- this.Message = opts.Message;
67
+ return CloudHsmResourceNotFoundException;
68
+ }(__BaseException));
69
+ export { CloudHsmResourceNotFoundException };
70
+ var CloudHsmServiceException = (function (_super) {
71
+ __extends(CloudHsmServiceException, _super);
72
+ function CloudHsmServiceException(opts) {
73
+ var _this = _super.call(this, __assign({ name: "CloudHsmServiceException", $fault: "client" }, opts)) || this;
74
+ _this.name = "CloudHsmServiceException";
75
+ _this.$fault = "client";
76
+ Object.setPrototypeOf(_this, CloudHsmServiceException.prototype);
77
+ _this.Message = opts.Message;
78
+ return _this;
80
79
  }
81
- }
82
- export class CloudHsmTagException extends __BaseException {
83
- constructor(opts) {
84
- super({
85
- name: "CloudHsmTagException",
86
- $fault: "client",
87
- ...opts,
88
- });
89
- this.name = "CloudHsmTagException";
90
- this.$fault = "client";
91
- Object.setPrototypeOf(this, CloudHsmTagException.prototype);
92
- this.Message = opts.Message;
80
+ return CloudHsmServiceException;
81
+ }(__BaseException));
82
+ export { CloudHsmServiceException };
83
+ var CloudHsmTagException = (function (_super) {
84
+ __extends(CloudHsmTagException, _super);
85
+ function CloudHsmTagException(opts) {
86
+ var _this = _super.call(this, __assign({ name: "CloudHsmTagException", $fault: "client" }, opts)) || this;
87
+ _this.name = "CloudHsmTagException";
88
+ _this.$fault = "client";
89
+ Object.setPrototypeOf(_this, CloudHsmTagException.prototype);
90
+ _this.Message = opts.Message;
91
+ return _this;
93
92
  }
94
- }
93
+ return CloudHsmTagException;
94
+ }(__BaseException));
95
+ export { CloudHsmTagException };
95
96
  export var HsmState;
96
97
  (function (HsmState) {
97
98
  HsmState["ACTIVE"] = "ACTIVE";
@@ -112,114 +113,40 @@ export var ClusterState;
112
113
  ClusterState["UNINITIALIZED"] = "UNINITIALIZED";
113
114
  ClusterState["UPDATE_IN_PROGRESS"] = "UPDATE_IN_PROGRESS";
114
115
  })(ClusterState || (ClusterState = {}));
115
- export const TagFilterSensitiveLog = (obj) => ({
116
- ...obj,
117
- });
118
- export const BackupFilterSensitiveLog = (obj) => ({
119
- ...obj,
120
- });
121
- export const BackupRetentionPolicyFilterSensitiveLog = (obj) => ({
122
- ...obj,
123
- });
124
- export const CopyBackupToRegionRequestFilterSensitiveLog = (obj) => ({
125
- ...obj,
126
- });
127
- export const DestinationBackupFilterSensitiveLog = (obj) => ({
128
- ...obj,
129
- });
130
- export const CopyBackupToRegionResponseFilterSensitiveLog = (obj) => ({
131
- ...obj,
132
- });
133
- export const CreateClusterRequestFilterSensitiveLog = (obj) => ({
134
- ...obj,
135
- });
136
- export const CertificatesFilterSensitiveLog = (obj) => ({
137
- ...obj,
138
- });
139
- export const HsmFilterSensitiveLog = (obj) => ({
140
- ...obj,
141
- });
142
- export const ClusterFilterSensitiveLog = (obj) => ({
143
- ...obj,
144
- });
145
- export const CreateClusterResponseFilterSensitiveLog = (obj) => ({
146
- ...obj,
147
- });
148
- export const CreateHsmRequestFilterSensitiveLog = (obj) => ({
149
- ...obj,
150
- });
151
- export const CreateHsmResponseFilterSensitiveLog = (obj) => ({
152
- ...obj,
153
- });
154
- export const DeleteBackupRequestFilterSensitiveLog = (obj) => ({
155
- ...obj,
156
- });
157
- export const DeleteBackupResponseFilterSensitiveLog = (obj) => ({
158
- ...obj,
159
- });
160
- export const DeleteClusterRequestFilterSensitiveLog = (obj) => ({
161
- ...obj,
162
- });
163
- export const DeleteClusterResponseFilterSensitiveLog = (obj) => ({
164
- ...obj,
165
- });
166
- export const DeleteHsmRequestFilterSensitiveLog = (obj) => ({
167
- ...obj,
168
- });
169
- export const DeleteHsmResponseFilterSensitiveLog = (obj) => ({
170
- ...obj,
171
- });
172
- export const DescribeBackupsRequestFilterSensitiveLog = (obj) => ({
173
- ...obj,
174
- });
175
- export const DescribeBackupsResponseFilterSensitiveLog = (obj) => ({
176
- ...obj,
177
- });
178
- export const DescribeClustersRequestFilterSensitiveLog = (obj) => ({
179
- ...obj,
180
- });
181
- export const DescribeClustersResponseFilterSensitiveLog = (obj) => ({
182
- ...obj,
183
- });
184
- export const InitializeClusterRequestFilterSensitiveLog = (obj) => ({
185
- ...obj,
186
- });
187
- export const InitializeClusterResponseFilterSensitiveLog = (obj) => ({
188
- ...obj,
189
- });
190
- export const ListTagsRequestFilterSensitiveLog = (obj) => ({
191
- ...obj,
192
- });
193
- export const ListTagsResponseFilterSensitiveLog = (obj) => ({
194
- ...obj,
195
- });
196
- export const ModifyBackupAttributesRequestFilterSensitiveLog = (obj) => ({
197
- ...obj,
198
- });
199
- export const ModifyBackupAttributesResponseFilterSensitiveLog = (obj) => ({
200
- ...obj,
201
- });
202
- export const ModifyClusterRequestFilterSensitiveLog = (obj) => ({
203
- ...obj,
204
- });
205
- export const ModifyClusterResponseFilterSensitiveLog = (obj) => ({
206
- ...obj,
207
- });
208
- export const RestoreBackupRequestFilterSensitiveLog = (obj) => ({
209
- ...obj,
210
- });
211
- export const RestoreBackupResponseFilterSensitiveLog = (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
- });
116
+ export var TagFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
117
+ export var BackupFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
118
+ export var BackupRetentionPolicyFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
119
+ export var CopyBackupToRegionRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
120
+ export var DestinationBackupFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
121
+ export var CopyBackupToRegionResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
122
+ export var CreateClusterRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
123
+ export var CertificatesFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
124
+ export var HsmFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
125
+ export var ClusterFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
+ export var CreateClusterResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
+ export var CreateHsmRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
128
+ export var CreateHsmResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
129
+ export var DeleteBackupRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
+ export var DeleteBackupResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
+ export var DeleteClusterRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
132
+ export var DeleteClusterResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
133
+ export var DeleteHsmRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
134
+ export var DeleteHsmResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
135
+ export var DescribeBackupsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
136
+ export var DescribeBackupsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
137
+ export var DescribeClustersRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
138
+ export var DescribeClustersResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
139
+ export var InitializeClusterRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
140
+ export var InitializeClusterResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
141
+ export var ListTagsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
142
+ export var ListTagsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
143
+ export var ModifyBackupAttributesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
144
+ export var ModifyBackupAttributesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
145
+ export var ModifyClusterRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
146
+ export var ModifyClusterResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
147
+ export var RestoreBackupRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
148
+ export var RestoreBackupResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
149
+ export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
150
+ export var TagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
151
+ export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
152
+ export var UntagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { CloudHSMV2 } from "../CloudHSMV2";
2
3
  import { CloudHSMV2Client } from "../CloudHSMV2Client";
3
4
  import { DescribeBackupsCommand, } from "../commands/DescribeBackupsCommand";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new DescribeBackupsCommand(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 DescribeBackupsCommand(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.describeBackups(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.describeBackups.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateDescribeBackups(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 CloudHSMV2) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof CloudHSMV2Client) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected CloudHSMV2 | CloudHSMV2Client");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.NextToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateDescribeBackups(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 paginateDescribeBackups_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 CloudHSMV2)) 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 CloudHSMV2Client)) 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 CloudHSMV2 | CloudHSMV2Client");
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 { CloudHSMV2 } from "../CloudHSMV2";
2
3
  import { CloudHSMV2Client } from "../CloudHSMV2Client";
3
4
  import { DescribeClustersCommand, } from "../commands/DescribeClustersCommand";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new DescribeClustersCommand(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 DescribeClustersCommand(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.describeClusters(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.describeClusters.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateDescribeClusters(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 CloudHSMV2) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof CloudHSMV2Client) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected CloudHSMV2 | CloudHSMV2Client");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.NextToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateDescribeClusters(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 paginateDescribeClusters_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 CloudHSMV2)) 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 CloudHSMV2Client)) 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 CloudHSMV2 | CloudHSMV2Client");
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
  }