@aws-sdk/client-healthlake 3.185.0 → 3.188.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 (28) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist-es/HealthLake.js +54 -61
  3. package/dist-es/HealthLakeClient.js +22 -28
  4. package/dist-es/commands/CreateFHIRDatastoreCommand.js +21 -28
  5. package/dist-es/commands/DeleteFHIRDatastoreCommand.js +21 -28
  6. package/dist-es/commands/DescribeFHIRDatastoreCommand.js +21 -28
  7. package/dist-es/commands/DescribeFHIRExportJobCommand.js +21 -28
  8. package/dist-es/commands/DescribeFHIRImportJobCommand.js +21 -28
  9. package/dist-es/commands/ListFHIRDatastoresCommand.js +21 -28
  10. package/dist-es/commands/ListFHIRExportJobsCommand.js +21 -28
  11. package/dist-es/commands/ListFHIRImportJobsCommand.js +21 -28
  12. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  13. package/dist-es/commands/StartFHIRExportJobCommand.js +21 -28
  14. package/dist-es/commands/StartFHIRImportJobCommand.js +21 -28
  15. package/dist-es/commands/TagResourceCommand.js +21 -28
  16. package/dist-es/commands/UntagResourceCommand.js +21 -28
  17. package/dist-es/endpoints.js +8 -8
  18. package/dist-es/models/HealthLakeServiceException.js +5 -10
  19. package/dist-es/models/models_0.js +201 -124
  20. package/dist-es/pagination/ListFHIRDatastoresPaginator.js +25 -68
  21. package/dist-es/pagination/ListFHIRExportJobsPaginator.js +25 -68
  22. package/dist-es/pagination/ListFHIRImportJobsPaginator.js +25 -68
  23. package/dist-es/protocols/Aws_json1_0.js +932 -1181
  24. package/dist-es/runtimeConfig.browser.js +26 -12
  25. package/dist-es/runtimeConfig.js +30 -12
  26. package/dist-es/runtimeConfig.native.js +8 -5
  27. package/dist-es/runtimeConfig.shared.js +8 -11
  28. package/package.json +33 -33
@@ -1,36 +1,35 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { HealthLakeServiceException as __BaseException } from "./HealthLakeServiceException";
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
- _this.Message = opts.Message;
11
- return _this;
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);
12
+ this.Message = opts.Message;
12
13
  }
13
- return AccessDeniedException;
14
- }(__BaseException));
15
- export { AccessDeniedException };
14
+ }
16
15
  export var CmkType;
17
16
  (function (CmkType) {
18
17
  CmkType["AO_CMK"] = "AWS_OWNED_KMS_KEY";
19
18
  CmkType["CM_CMK"] = "CUSTOMER_MANAGED_KMS_KEY";
20
19
  })(CmkType || (CmkType = {}));
21
- var ConflictException = (function (_super) {
22
- __extends(ConflictException, _super);
23
- function ConflictException(opts) {
24
- var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
25
- _this.name = "ConflictException";
26
- _this.$fault = "client";
27
- Object.setPrototypeOf(_this, ConflictException.prototype);
28
- _this.Message = opts.Message;
29
- return _this;
20
+ export class ConflictException extends __BaseException {
21
+ constructor(opts) {
22
+ super({
23
+ name: "ConflictException",
24
+ $fault: "client",
25
+ ...opts,
26
+ });
27
+ this.name = "ConflictException";
28
+ this.$fault = "client";
29
+ Object.setPrototypeOf(this, ConflictException.prototype);
30
+ this.Message = opts.Message;
30
31
  }
31
- return ConflictException;
32
- }(__BaseException));
33
- export { ConflictException };
32
+ }
34
33
  export var FHIRVersion;
35
34
  (function (FHIRVersion) {
36
35
  FHIRVersion["R4"] = "R4";
@@ -46,58 +45,58 @@ export var DatastoreStatus;
46
45
  DatastoreStatus["DELETED"] = "DELETED";
47
46
  DatastoreStatus["DELETING"] = "DELETING";
48
47
  })(DatastoreStatus || (DatastoreStatus = {}));
49
- var InternalServerException = (function (_super) {
50
- __extends(InternalServerException, _super);
51
- function InternalServerException(opts) {
52
- var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
53
- _this.name = "InternalServerException";
54
- _this.$fault = "server";
55
- Object.setPrototypeOf(_this, InternalServerException.prototype);
56
- _this.Message = opts.Message;
57
- return _this;
48
+ export class InternalServerException extends __BaseException {
49
+ constructor(opts) {
50
+ super({
51
+ name: "InternalServerException",
52
+ $fault: "server",
53
+ ...opts,
54
+ });
55
+ this.name = "InternalServerException";
56
+ this.$fault = "server";
57
+ Object.setPrototypeOf(this, InternalServerException.prototype);
58
+ this.Message = opts.Message;
58
59
  }
59
- return InternalServerException;
60
- }(__BaseException));
61
- export { InternalServerException };
62
- var ThrottlingException = (function (_super) {
63
- __extends(ThrottlingException, _super);
64
- function ThrottlingException(opts) {
65
- var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
66
- _this.name = "ThrottlingException";
67
- _this.$fault = "client";
68
- Object.setPrototypeOf(_this, ThrottlingException.prototype);
69
- _this.Message = opts.Message;
70
- return _this;
60
+ }
61
+ export class ThrottlingException extends __BaseException {
62
+ constructor(opts) {
63
+ super({
64
+ name: "ThrottlingException",
65
+ $fault: "client",
66
+ ...opts,
67
+ });
68
+ this.name = "ThrottlingException";
69
+ this.$fault = "client";
70
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
71
+ this.Message = opts.Message;
71
72
  }
72
- return ThrottlingException;
73
- }(__BaseException));
74
- export { ThrottlingException };
75
- var ValidationException = (function (_super) {
76
- __extends(ValidationException, _super);
77
- function ValidationException(opts) {
78
- var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
79
- _this.name = "ValidationException";
80
- _this.$fault = "client";
81
- Object.setPrototypeOf(_this, ValidationException.prototype);
82
- _this.Message = opts.Message;
83
- return _this;
73
+ }
74
+ export class ValidationException extends __BaseException {
75
+ constructor(opts) {
76
+ super({
77
+ name: "ValidationException",
78
+ $fault: "client",
79
+ ...opts,
80
+ });
81
+ this.name = "ValidationException";
82
+ this.$fault = "client";
83
+ Object.setPrototypeOf(this, ValidationException.prototype);
84
+ this.Message = opts.Message;
84
85
  }
85
- return ValidationException;
86
- }(__BaseException));
87
- export { ValidationException };
88
- var ResourceNotFoundException = (function (_super) {
89
- __extends(ResourceNotFoundException, _super);
90
- function ResourceNotFoundException(opts) {
91
- var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
92
- _this.name = "ResourceNotFoundException";
93
- _this.$fault = "client";
94
- Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
95
- _this.Message = opts.Message;
96
- return _this;
86
+ }
87
+ export class ResourceNotFoundException extends __BaseException {
88
+ constructor(opts) {
89
+ super({
90
+ name: "ResourceNotFoundException",
91
+ $fault: "client",
92
+ ...opts,
93
+ });
94
+ this.name = "ResourceNotFoundException";
95
+ this.$fault = "client";
96
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
97
+ this.Message = opts.Message;
97
98
  }
98
- return ResourceNotFoundException;
99
- }(__BaseException));
100
- export { ResourceNotFoundException };
99
+ }
101
100
  export var JobStatus;
102
101
  (function (JobStatus) {
103
102
  JobStatus["COMPLETED"] = "COMPLETED";
@@ -108,7 +107,7 @@ export var JobStatus;
108
107
  })(JobStatus || (JobStatus = {}));
109
108
  export var OutputDataConfig;
110
109
  (function (OutputDataConfig) {
111
- OutputDataConfig.visit = function (value, visitor) {
110
+ OutputDataConfig.visit = (value, visitor) => {
112
111
  if (value.S3Configuration !== undefined)
113
112
  return visitor.S3Configuration(value.S3Configuration);
114
113
  return visitor._(value.$unknown[0], value.$unknown[1]);
@@ -116,66 +115,144 @@ export var OutputDataConfig;
116
115
  })(OutputDataConfig || (OutputDataConfig = {}));
117
116
  export var InputDataConfig;
118
117
  (function (InputDataConfig) {
119
- InputDataConfig.visit = function (value, visitor) {
118
+ InputDataConfig.visit = (value, visitor) => {
120
119
  if (value.S3Uri !== undefined)
121
120
  return visitor.S3Uri(value.S3Uri);
122
121
  return visitor._(value.$unknown[0], value.$unknown[1]);
123
122
  };
124
123
  })(InputDataConfig || (InputDataConfig = {}));
125
- export var PreloadDataConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
- export var KmsEncryptionConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
- export var SseConfigurationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
128
- export var TagFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
129
- export var CreateFHIRDatastoreRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
- export var CreateFHIRDatastoreResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
- export var DatastoreFilterFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
132
- export var DatastorePropertiesFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
133
- export var DeleteFHIRDatastoreRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
134
- export var DeleteFHIRDatastoreResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
135
- export var DescribeFHIRDatastoreRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
136
- export var DescribeFHIRDatastoreResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
137
- export var DescribeFHIRExportJobRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
138
- export var S3ConfigurationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
139
- export var OutputDataConfigFilterSensitiveLog = function (obj) {
140
- var _a;
124
+ export const PreloadDataConfigFilterSensitiveLog = (obj) => ({
125
+ ...obj,
126
+ });
127
+ export const KmsEncryptionConfigFilterSensitiveLog = (obj) => ({
128
+ ...obj,
129
+ });
130
+ export const SseConfigurationFilterSensitiveLog = (obj) => ({
131
+ ...obj,
132
+ });
133
+ export const TagFilterSensitiveLog = (obj) => ({
134
+ ...obj,
135
+ });
136
+ export const CreateFHIRDatastoreRequestFilterSensitiveLog = (obj) => ({
137
+ ...obj,
138
+ });
139
+ export const CreateFHIRDatastoreResponseFilterSensitiveLog = (obj) => ({
140
+ ...obj,
141
+ });
142
+ export const DatastoreFilterFilterSensitiveLog = (obj) => ({
143
+ ...obj,
144
+ });
145
+ export const DatastorePropertiesFilterSensitiveLog = (obj) => ({
146
+ ...obj,
147
+ });
148
+ export const DeleteFHIRDatastoreRequestFilterSensitiveLog = (obj) => ({
149
+ ...obj,
150
+ });
151
+ export const DeleteFHIRDatastoreResponseFilterSensitiveLog = (obj) => ({
152
+ ...obj,
153
+ });
154
+ export const DescribeFHIRDatastoreRequestFilterSensitiveLog = (obj) => ({
155
+ ...obj,
156
+ });
157
+ export const DescribeFHIRDatastoreResponseFilterSensitiveLog = (obj) => ({
158
+ ...obj,
159
+ });
160
+ export const DescribeFHIRExportJobRequestFilterSensitiveLog = (obj) => ({
161
+ ...obj,
162
+ });
163
+ export const S3ConfigurationFilterSensitiveLog = (obj) => ({
164
+ ...obj,
165
+ });
166
+ export const OutputDataConfigFilterSensitiveLog = (obj) => {
141
167
  if (obj.S3Configuration !== undefined)
142
168
  return { S3Configuration: S3ConfigurationFilterSensitiveLog(obj.S3Configuration) };
143
169
  if (obj.$unknown !== undefined)
144
- return _a = {}, _a[obj.$unknown[0]] = "UNKNOWN", _a;
170
+ return { [obj.$unknown[0]]: "UNKNOWN" };
145
171
  };
146
- export var ExportJobPropertiesFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.OutputDataConfig && { OutputDataConfig: OutputDataConfigFilterSensitiveLog(obj.OutputDataConfig) }))); };
147
- export var DescribeFHIRExportJobResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ExportJobProperties && {
148
- ExportJobProperties: ExportJobPropertiesFilterSensitiveLog(obj.ExportJobProperties),
149
- }))); };
150
- export var DescribeFHIRImportJobRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
151
- export var InputDataConfigFilterSensitiveLog = function (obj) {
152
- var _a;
172
+ export const ExportJobPropertiesFilterSensitiveLog = (obj) => ({
173
+ ...obj,
174
+ ...(obj.OutputDataConfig && { OutputDataConfig: OutputDataConfigFilterSensitiveLog(obj.OutputDataConfig) }),
175
+ });
176
+ export const DescribeFHIRExportJobResponseFilterSensitiveLog = (obj) => ({
177
+ ...obj,
178
+ ...(obj.ExportJobProperties && {
179
+ ExportJobProperties: ExportJobPropertiesFilterSensitiveLog(obj.ExportJobProperties),
180
+ }),
181
+ });
182
+ export const DescribeFHIRImportJobRequestFilterSensitiveLog = (obj) => ({
183
+ ...obj,
184
+ });
185
+ export const InputDataConfigFilterSensitiveLog = (obj) => {
153
186
  if (obj.S3Uri !== undefined)
154
187
  return { S3Uri: obj.S3Uri };
155
188
  if (obj.$unknown !== undefined)
156
- return _a = {}, _a[obj.$unknown[0]] = "UNKNOWN", _a;
189
+ return { [obj.$unknown[0]]: "UNKNOWN" };
157
190
  };
158
- export var ImportJobPropertiesFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.InputDataConfig && { InputDataConfig: InputDataConfigFilterSensitiveLog(obj.InputDataConfig) })), (obj.JobOutputDataConfig && { JobOutputDataConfig: OutputDataConfigFilterSensitiveLog(obj.JobOutputDataConfig) }))); };
159
- export var DescribeFHIRImportJobResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ImportJobProperties && {
160
- ImportJobProperties: ImportJobPropertiesFilterSensitiveLog(obj.ImportJobProperties),
161
- }))); };
162
- export var ListFHIRDatastoresRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
163
- export var ListFHIRDatastoresResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
164
- export var ListFHIRExportJobsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
165
- export var ListFHIRExportJobsResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ExportJobPropertiesList && {
166
- ExportJobPropertiesList: obj.ExportJobPropertiesList.map(function (item) { return ExportJobPropertiesFilterSensitiveLog(item); }),
167
- }))); };
168
- export var ListFHIRImportJobsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
169
- export var ListFHIRImportJobsResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ImportJobPropertiesList && {
170
- ImportJobPropertiesList: obj.ImportJobPropertiesList.map(function (item) { return ImportJobPropertiesFilterSensitiveLog(item); }),
171
- }))); };
172
- export var ListTagsForResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
173
- export var ListTagsForResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
174
- export var StartFHIRExportJobRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.OutputDataConfig && { OutputDataConfig: OutputDataConfigFilterSensitiveLog(obj.OutputDataConfig) }))); };
175
- export var StartFHIRExportJobResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
176
- export var StartFHIRImportJobRequestFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.InputDataConfig && { InputDataConfig: InputDataConfigFilterSensitiveLog(obj.InputDataConfig) })), (obj.JobOutputDataConfig && { JobOutputDataConfig: OutputDataConfigFilterSensitiveLog(obj.JobOutputDataConfig) }))); };
177
- export var StartFHIRImportJobResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
178
- export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
179
- export var TagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
180
- export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
181
- export var UntagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
191
+ export const ImportJobPropertiesFilterSensitiveLog = (obj) => ({
192
+ ...obj,
193
+ ...(obj.InputDataConfig && { InputDataConfig: InputDataConfigFilterSensitiveLog(obj.InputDataConfig) }),
194
+ ...(obj.JobOutputDataConfig && { JobOutputDataConfig: OutputDataConfigFilterSensitiveLog(obj.JobOutputDataConfig) }),
195
+ });
196
+ export const DescribeFHIRImportJobResponseFilterSensitiveLog = (obj) => ({
197
+ ...obj,
198
+ ...(obj.ImportJobProperties && {
199
+ ImportJobProperties: ImportJobPropertiesFilterSensitiveLog(obj.ImportJobProperties),
200
+ }),
201
+ });
202
+ export const ListFHIRDatastoresRequestFilterSensitiveLog = (obj) => ({
203
+ ...obj,
204
+ });
205
+ export const ListFHIRDatastoresResponseFilterSensitiveLog = (obj) => ({
206
+ ...obj,
207
+ });
208
+ export const ListFHIRExportJobsRequestFilterSensitiveLog = (obj) => ({
209
+ ...obj,
210
+ });
211
+ export const ListFHIRExportJobsResponseFilterSensitiveLog = (obj) => ({
212
+ ...obj,
213
+ ...(obj.ExportJobPropertiesList && {
214
+ ExportJobPropertiesList: obj.ExportJobPropertiesList.map((item) => ExportJobPropertiesFilterSensitiveLog(item)),
215
+ }),
216
+ });
217
+ export const ListFHIRImportJobsRequestFilterSensitiveLog = (obj) => ({
218
+ ...obj,
219
+ });
220
+ export const ListFHIRImportJobsResponseFilterSensitiveLog = (obj) => ({
221
+ ...obj,
222
+ ...(obj.ImportJobPropertiesList && {
223
+ ImportJobPropertiesList: obj.ImportJobPropertiesList.map((item) => ImportJobPropertiesFilterSensitiveLog(item)),
224
+ }),
225
+ });
226
+ export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
227
+ ...obj,
228
+ });
229
+ export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
230
+ ...obj,
231
+ });
232
+ export const StartFHIRExportJobRequestFilterSensitiveLog = (obj) => ({
233
+ ...obj,
234
+ ...(obj.OutputDataConfig && { OutputDataConfig: OutputDataConfigFilterSensitiveLog(obj.OutputDataConfig) }),
235
+ });
236
+ export const StartFHIRExportJobResponseFilterSensitiveLog = (obj) => ({
237
+ ...obj,
238
+ });
239
+ export const StartFHIRImportJobRequestFilterSensitiveLog = (obj) => ({
240
+ ...obj,
241
+ ...(obj.InputDataConfig && { InputDataConfig: InputDataConfigFilterSensitiveLog(obj.InputDataConfig) }),
242
+ ...(obj.JobOutputDataConfig && { JobOutputDataConfig: OutputDataConfigFilterSensitiveLog(obj.JobOutputDataConfig) }),
243
+ });
244
+ export const StartFHIRImportJobResponseFilterSensitiveLog = (obj) => ({
245
+ ...obj,
246
+ });
247
+ export const TagResourceRequestFilterSensitiveLog = (obj) => ({
248
+ ...obj,
249
+ });
250
+ export const TagResourceResponseFilterSensitiveLog = (obj) => ({
251
+ ...obj,
252
+ });
253
+ export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
254
+ ...obj,
255
+ });
256
+ export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
257
+ ...obj,
258
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListFHIRDatastoresCommand, } from "../commands/ListFHIRDatastoresCommand";
3
2
  import { HealthLake } from "../HealthLake";
4
3
  import { HealthLakeClient } from "../HealthLakeClient";
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 ListFHIRDatastoresCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListFHIRDatastoresCommand(input), ...args);
18
6
  };
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.listFHIRDatastores.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listFHIRDatastores(input, ...args);
32
9
  };
33
- export function paginateListFHIRDatastores(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListFHIRDatastores(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 HealthLake) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof HealthLakeClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected HealthLake | HealthLakeClient");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.NextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListFHIRDatastores_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 HealthLake)) 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 HealthLakeClient)) 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 HealthLake | HealthLakeClient");
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
- });
31
+ return undefined;
75
32
  }
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListFHIRExportJobsCommand, } from "../commands/ListFHIRExportJobsCommand";
3
2
  import { HealthLake } from "../HealthLake";
4
3
  import { HealthLakeClient } from "../HealthLakeClient";
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 ListFHIRExportJobsCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListFHIRExportJobsCommand(input), ...args);
18
6
  };
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.listFHIRExportJobs.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listFHIRExportJobs(input, ...args);
32
9
  };
33
- export function paginateListFHIRExportJobs(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListFHIRExportJobs(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 HealthLake) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof HealthLakeClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected HealthLake | HealthLakeClient");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.NextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListFHIRExportJobs_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 HealthLake)) 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 HealthLakeClient)) 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 HealthLake | HealthLakeClient");
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
- });
31
+ return undefined;
75
32
  }