@aws-sdk/client-mediapackage 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 (34) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist-es/MediaPackage.js +78 -85
  3. package/dist-es/MediaPackageClient.js +22 -28
  4. package/dist-es/commands/ConfigureLogsCommand.js +21 -28
  5. package/dist-es/commands/CreateChannelCommand.js +21 -28
  6. package/dist-es/commands/CreateHarvestJobCommand.js +21 -28
  7. package/dist-es/commands/CreateOriginEndpointCommand.js +21 -28
  8. package/dist-es/commands/DeleteChannelCommand.js +21 -28
  9. package/dist-es/commands/DeleteOriginEndpointCommand.js +21 -28
  10. package/dist-es/commands/DescribeChannelCommand.js +21 -28
  11. package/dist-es/commands/DescribeHarvestJobCommand.js +21 -28
  12. package/dist-es/commands/DescribeOriginEndpointCommand.js +21 -28
  13. package/dist-es/commands/ListChannelsCommand.js +21 -28
  14. package/dist-es/commands/ListHarvestJobsCommand.js +21 -28
  15. package/dist-es/commands/ListOriginEndpointsCommand.js +21 -28
  16. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  17. package/dist-es/commands/RotateChannelCredentialsCommand.js +21 -28
  18. package/dist-es/commands/RotateIngestEndpointCredentialsCommand.js +21 -28
  19. package/dist-es/commands/TagResourceCommand.js +22 -29
  20. package/dist-es/commands/UntagResourceCommand.js +22 -29
  21. package/dist-es/commands/UpdateChannelCommand.js +21 -28
  22. package/dist-es/commands/UpdateOriginEndpointCommand.js +21 -28
  23. package/dist-es/endpoints.js +8 -8
  24. package/dist-es/models/MediaPackageServiceException.js +5 -10
  25. package/dist-es/models/models_0.js +249 -132
  26. package/dist-es/pagination/ListChannelsPaginator.js +25 -68
  27. package/dist-es/pagination/ListHarvestJobsPaginator.js +25 -68
  28. package/dist-es/pagination/ListOriginEndpointsPaginator.js +25 -68
  29. package/dist-es/protocols/Aws_restJson1.js +1853 -2343
  30. package/dist-es/runtimeConfig.browser.js +26 -12
  31. package/dist-es/runtimeConfig.js +30 -12
  32. package/dist-es/runtimeConfig.native.js +8 -5
  33. package/dist-es/runtimeConfig.shared.js +8 -11
  34. package/package.json +33 -33
@@ -1,4 +1,3 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { MediaPackageServiceException as __BaseException } from "./MediaPackageServiceException";
3
2
  export var __AdTriggersElement;
4
3
  (function (__AdTriggersElement) {
@@ -108,140 +107,258 @@ export var Origination;
108
107
  Origination["ALLOW"] = "ALLOW";
109
108
  Origination["DENY"] = "DENY";
110
109
  })(Origination || (Origination = {}));
111
- var ForbiddenException = (function (_super) {
112
- __extends(ForbiddenException, _super);
113
- function ForbiddenException(opts) {
114
- var _this = _super.call(this, __assign({ name: "ForbiddenException", $fault: "client" }, opts)) || this;
115
- _this.name = "ForbiddenException";
116
- _this.$fault = "client";
117
- Object.setPrototypeOf(_this, ForbiddenException.prototype);
118
- _this.Message = opts.Message;
119
- return _this;
110
+ export class ForbiddenException extends __BaseException {
111
+ constructor(opts) {
112
+ super({
113
+ name: "ForbiddenException",
114
+ $fault: "client",
115
+ ...opts,
116
+ });
117
+ this.name = "ForbiddenException";
118
+ this.$fault = "client";
119
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
120
+ this.Message = opts.Message;
120
121
  }
121
- return ForbiddenException;
122
- }(__BaseException));
123
- export { ForbiddenException };
124
- var InternalServerErrorException = (function (_super) {
125
- __extends(InternalServerErrorException, _super);
126
- function InternalServerErrorException(opts) {
127
- var _this = _super.call(this, __assign({ name: "InternalServerErrorException", $fault: "server" }, opts)) || this;
128
- _this.name = "InternalServerErrorException";
129
- _this.$fault = "server";
130
- Object.setPrototypeOf(_this, InternalServerErrorException.prototype);
131
- _this.Message = opts.Message;
132
- return _this;
122
+ }
123
+ export class InternalServerErrorException extends __BaseException {
124
+ constructor(opts) {
125
+ super({
126
+ name: "InternalServerErrorException",
127
+ $fault: "server",
128
+ ...opts,
129
+ });
130
+ this.name = "InternalServerErrorException";
131
+ this.$fault = "server";
132
+ Object.setPrototypeOf(this, InternalServerErrorException.prototype);
133
+ this.Message = opts.Message;
133
134
  }
134
- return InternalServerErrorException;
135
- }(__BaseException));
136
- export { InternalServerErrorException };
137
- var NotFoundException = (function (_super) {
138
- __extends(NotFoundException, _super);
139
- function NotFoundException(opts) {
140
- var _this = _super.call(this, __assign({ name: "NotFoundException", $fault: "client" }, opts)) || this;
141
- _this.name = "NotFoundException";
142
- _this.$fault = "client";
143
- Object.setPrototypeOf(_this, NotFoundException.prototype);
144
- _this.Message = opts.Message;
145
- return _this;
135
+ }
136
+ export class NotFoundException extends __BaseException {
137
+ constructor(opts) {
138
+ super({
139
+ name: "NotFoundException",
140
+ $fault: "client",
141
+ ...opts,
142
+ });
143
+ this.name = "NotFoundException";
144
+ this.$fault = "client";
145
+ Object.setPrototypeOf(this, NotFoundException.prototype);
146
+ this.Message = opts.Message;
146
147
  }
147
- return NotFoundException;
148
- }(__BaseException));
149
- export { NotFoundException };
150
- var ServiceUnavailableException = (function (_super) {
151
- __extends(ServiceUnavailableException, _super);
152
- function ServiceUnavailableException(opts) {
153
- var _this = _super.call(this, __assign({ name: "ServiceUnavailableException", $fault: "server" }, opts)) || this;
154
- _this.name = "ServiceUnavailableException";
155
- _this.$fault = "server";
156
- Object.setPrototypeOf(_this, ServiceUnavailableException.prototype);
157
- _this.Message = opts.Message;
158
- return _this;
148
+ }
149
+ export class ServiceUnavailableException extends __BaseException {
150
+ constructor(opts) {
151
+ super({
152
+ name: "ServiceUnavailableException",
153
+ $fault: "server",
154
+ ...opts,
155
+ });
156
+ this.name = "ServiceUnavailableException";
157
+ this.$fault = "server";
158
+ Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
159
+ this.Message = opts.Message;
159
160
  }
160
- return ServiceUnavailableException;
161
- }(__BaseException));
162
- export { ServiceUnavailableException };
163
- var TooManyRequestsException = (function (_super) {
164
- __extends(TooManyRequestsException, _super);
165
- function TooManyRequestsException(opts) {
166
- var _this = _super.call(this, __assign({ name: "TooManyRequestsException", $fault: "client" }, opts)) || this;
167
- _this.name = "TooManyRequestsException";
168
- _this.$fault = "client";
169
- Object.setPrototypeOf(_this, TooManyRequestsException.prototype);
170
- _this.Message = opts.Message;
171
- return _this;
161
+ }
162
+ export class TooManyRequestsException extends __BaseException {
163
+ constructor(opts) {
164
+ super({
165
+ name: "TooManyRequestsException",
166
+ $fault: "client",
167
+ ...opts,
168
+ });
169
+ this.name = "TooManyRequestsException";
170
+ this.$fault = "client";
171
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
172
+ this.Message = opts.Message;
172
173
  }
173
- return TooManyRequestsException;
174
- }(__BaseException));
175
- export { TooManyRequestsException };
176
- var UnprocessableEntityException = (function (_super) {
177
- __extends(UnprocessableEntityException, _super);
178
- function UnprocessableEntityException(opts) {
179
- var _this = _super.call(this, __assign({ name: "UnprocessableEntityException", $fault: "client" }, opts)) || this;
180
- _this.name = "UnprocessableEntityException";
181
- _this.$fault = "client";
182
- Object.setPrototypeOf(_this, UnprocessableEntityException.prototype);
183
- _this.Message = opts.Message;
184
- return _this;
174
+ }
175
+ export class UnprocessableEntityException extends __BaseException {
176
+ constructor(opts) {
177
+ super({
178
+ name: "UnprocessableEntityException",
179
+ $fault: "client",
180
+ ...opts,
181
+ });
182
+ this.name = "UnprocessableEntityException";
183
+ this.$fault = "client";
184
+ Object.setPrototypeOf(this, UnprocessableEntityException.prototype);
185
+ this.Message = opts.Message;
185
186
  }
186
- return UnprocessableEntityException;
187
- }(__BaseException));
188
- export { UnprocessableEntityException };
189
- export var EgressAccessLogsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
190
- export var IngestEndpointFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
191
- export var HlsIngestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
192
- export var IngressAccessLogsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
193
- export var ChannelFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
194
- export var S3DestinationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
195
- export var HarvestJobFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
196
- export var HlsManifestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
197
- export var HlsManifestCreateOrUpdateParametersFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
198
- export var AuthorizationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
199
- export var EncryptionContractConfigurationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
200
- export var SpekeKeyProviderFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
201
- export var CmafEncryptionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
202
- export var StreamSelectionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
203
- export var CmafPackageFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
204
- export var DashEncryptionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
205
- export var DashPackageFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
206
- export var HlsEncryptionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
207
- export var HlsPackageFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
208
- export var MssEncryptionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
209
- export var MssPackageFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
210
- export var OriginEndpointFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
211
- export var CmafPackageCreateOrUpdateParametersFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
212
- export var ConfigureLogsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
213
- export var ConfigureLogsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
214
- export var CreateChannelRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
215
- export var CreateChannelResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
216
- export var CreateHarvestJobRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
217
- export var CreateHarvestJobResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
218
- export var CreateOriginEndpointRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
219
- export var CreateOriginEndpointResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
220
- export var DeleteChannelRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
221
- export var DeleteChannelResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
222
- export var DeleteOriginEndpointRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
223
- export var DeleteOriginEndpointResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
224
- export var DescribeChannelRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
225
- export var DescribeChannelResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
226
- export var DescribeHarvestJobRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
227
- export var DescribeHarvestJobResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
228
- export var DescribeOriginEndpointRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
229
- export var DescribeOriginEndpointResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
230
- export var ListChannelsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
231
- export var ListChannelsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
232
- export var ListHarvestJobsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
233
- export var ListHarvestJobsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
234
- export var ListOriginEndpointsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
235
- export var ListOriginEndpointsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
236
- export var ListTagsForResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
237
- export var ListTagsForResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
238
- export var RotateChannelCredentialsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
239
- export var RotateChannelCredentialsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
240
- export var RotateIngestEndpointCredentialsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
241
- export var RotateIngestEndpointCredentialsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
242
- export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
243
- export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
244
- export var UpdateChannelRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
245
- export var UpdateChannelResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
246
- export var UpdateOriginEndpointRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
247
- export var UpdateOriginEndpointResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
187
+ }
188
+ export const EgressAccessLogsFilterSensitiveLog = (obj) => ({
189
+ ...obj,
190
+ });
191
+ export const IngestEndpointFilterSensitiveLog = (obj) => ({
192
+ ...obj,
193
+ });
194
+ export const HlsIngestFilterSensitiveLog = (obj) => ({
195
+ ...obj,
196
+ });
197
+ export const IngressAccessLogsFilterSensitiveLog = (obj) => ({
198
+ ...obj,
199
+ });
200
+ export const ChannelFilterSensitiveLog = (obj) => ({
201
+ ...obj,
202
+ });
203
+ export const S3DestinationFilterSensitiveLog = (obj) => ({
204
+ ...obj,
205
+ });
206
+ export const HarvestJobFilterSensitiveLog = (obj) => ({
207
+ ...obj,
208
+ });
209
+ export const HlsManifestFilterSensitiveLog = (obj) => ({
210
+ ...obj,
211
+ });
212
+ export const HlsManifestCreateOrUpdateParametersFilterSensitiveLog = (obj) => ({
213
+ ...obj,
214
+ });
215
+ export const AuthorizationFilterSensitiveLog = (obj) => ({
216
+ ...obj,
217
+ });
218
+ export const EncryptionContractConfigurationFilterSensitiveLog = (obj) => ({
219
+ ...obj,
220
+ });
221
+ export const SpekeKeyProviderFilterSensitiveLog = (obj) => ({
222
+ ...obj,
223
+ });
224
+ export const CmafEncryptionFilterSensitiveLog = (obj) => ({
225
+ ...obj,
226
+ });
227
+ export const StreamSelectionFilterSensitiveLog = (obj) => ({
228
+ ...obj,
229
+ });
230
+ export const CmafPackageFilterSensitiveLog = (obj) => ({
231
+ ...obj,
232
+ });
233
+ export const DashEncryptionFilterSensitiveLog = (obj) => ({
234
+ ...obj,
235
+ });
236
+ export const DashPackageFilterSensitiveLog = (obj) => ({
237
+ ...obj,
238
+ });
239
+ export const HlsEncryptionFilterSensitiveLog = (obj) => ({
240
+ ...obj,
241
+ });
242
+ export const HlsPackageFilterSensitiveLog = (obj) => ({
243
+ ...obj,
244
+ });
245
+ export const MssEncryptionFilterSensitiveLog = (obj) => ({
246
+ ...obj,
247
+ });
248
+ export const MssPackageFilterSensitiveLog = (obj) => ({
249
+ ...obj,
250
+ });
251
+ export const OriginEndpointFilterSensitiveLog = (obj) => ({
252
+ ...obj,
253
+ });
254
+ export const CmafPackageCreateOrUpdateParametersFilterSensitiveLog = (obj) => ({
255
+ ...obj,
256
+ });
257
+ export const ConfigureLogsRequestFilterSensitiveLog = (obj) => ({
258
+ ...obj,
259
+ });
260
+ export const ConfigureLogsResponseFilterSensitiveLog = (obj) => ({
261
+ ...obj,
262
+ });
263
+ export const CreateChannelRequestFilterSensitiveLog = (obj) => ({
264
+ ...obj,
265
+ });
266
+ export const CreateChannelResponseFilterSensitiveLog = (obj) => ({
267
+ ...obj,
268
+ });
269
+ export const CreateHarvestJobRequestFilterSensitiveLog = (obj) => ({
270
+ ...obj,
271
+ });
272
+ export const CreateHarvestJobResponseFilterSensitiveLog = (obj) => ({
273
+ ...obj,
274
+ });
275
+ export const CreateOriginEndpointRequestFilterSensitiveLog = (obj) => ({
276
+ ...obj,
277
+ });
278
+ export const CreateOriginEndpointResponseFilterSensitiveLog = (obj) => ({
279
+ ...obj,
280
+ });
281
+ export const DeleteChannelRequestFilterSensitiveLog = (obj) => ({
282
+ ...obj,
283
+ });
284
+ export const DeleteChannelResponseFilterSensitiveLog = (obj) => ({
285
+ ...obj,
286
+ });
287
+ export const DeleteOriginEndpointRequestFilterSensitiveLog = (obj) => ({
288
+ ...obj,
289
+ });
290
+ export const DeleteOriginEndpointResponseFilterSensitiveLog = (obj) => ({
291
+ ...obj,
292
+ });
293
+ export const DescribeChannelRequestFilterSensitiveLog = (obj) => ({
294
+ ...obj,
295
+ });
296
+ export const DescribeChannelResponseFilterSensitiveLog = (obj) => ({
297
+ ...obj,
298
+ });
299
+ export const DescribeHarvestJobRequestFilterSensitiveLog = (obj) => ({
300
+ ...obj,
301
+ });
302
+ export const DescribeHarvestJobResponseFilterSensitiveLog = (obj) => ({
303
+ ...obj,
304
+ });
305
+ export const DescribeOriginEndpointRequestFilterSensitiveLog = (obj) => ({
306
+ ...obj,
307
+ });
308
+ export const DescribeOriginEndpointResponseFilterSensitiveLog = (obj) => ({
309
+ ...obj,
310
+ });
311
+ export const ListChannelsRequestFilterSensitiveLog = (obj) => ({
312
+ ...obj,
313
+ });
314
+ export const ListChannelsResponseFilterSensitiveLog = (obj) => ({
315
+ ...obj,
316
+ });
317
+ export const ListHarvestJobsRequestFilterSensitiveLog = (obj) => ({
318
+ ...obj,
319
+ });
320
+ export const ListHarvestJobsResponseFilterSensitiveLog = (obj) => ({
321
+ ...obj,
322
+ });
323
+ export const ListOriginEndpointsRequestFilterSensitiveLog = (obj) => ({
324
+ ...obj,
325
+ });
326
+ export const ListOriginEndpointsResponseFilterSensitiveLog = (obj) => ({
327
+ ...obj,
328
+ });
329
+ export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
330
+ ...obj,
331
+ });
332
+ export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
333
+ ...obj,
334
+ });
335
+ export const RotateChannelCredentialsRequestFilterSensitiveLog = (obj) => ({
336
+ ...obj,
337
+ });
338
+ export const RotateChannelCredentialsResponseFilterSensitiveLog = (obj) => ({
339
+ ...obj,
340
+ });
341
+ export const RotateIngestEndpointCredentialsRequestFilterSensitiveLog = (obj) => ({
342
+ ...obj,
343
+ });
344
+ export const RotateIngestEndpointCredentialsResponseFilterSensitiveLog = (obj) => ({
345
+ ...obj,
346
+ });
347
+ export const TagResourceRequestFilterSensitiveLog = (obj) => ({
348
+ ...obj,
349
+ });
350
+ export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
351
+ ...obj,
352
+ });
353
+ export const UpdateChannelRequestFilterSensitiveLog = (obj) => ({
354
+ ...obj,
355
+ });
356
+ export const UpdateChannelResponseFilterSensitiveLog = (obj) => ({
357
+ ...obj,
358
+ });
359
+ export const UpdateOriginEndpointRequestFilterSensitiveLog = (obj) => ({
360
+ ...obj,
361
+ });
362
+ export const UpdateOriginEndpointResponseFilterSensitiveLog = (obj) => ({
363
+ ...obj,
364
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListChannelsCommand, } from "../commands/ListChannelsCommand";
3
2
  import { MediaPackage } from "../MediaPackage";
4
3
  import { MediaPackageClient } from "../MediaPackageClient";
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 ListChannelsCommand(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 ListChannelsCommand(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.listChannels.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.listChannels(input, ...args);
32
9
  };
33
- export function paginateListChannels(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListChannels(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 MediaPackage) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof MediaPackageClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected MediaPackage | MediaPackageClient");
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 paginateListChannels_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 MediaPackage)) 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 MediaPackageClient)) 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 MediaPackage | MediaPackageClient");
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 { ListHarvestJobsCommand, } from "../commands/ListHarvestJobsCommand";
3
2
  import { MediaPackage } from "../MediaPackage";
4
3
  import { MediaPackageClient } from "../MediaPackageClient";
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 ListHarvestJobsCommand(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 ListHarvestJobsCommand(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.listHarvestJobs.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.listHarvestJobs(input, ...args);
32
9
  };
33
- export function paginateListHarvestJobs(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListHarvestJobs(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 MediaPackage) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof MediaPackageClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected MediaPackage | MediaPackageClient");
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 paginateListHarvestJobs_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 MediaPackage)) 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 MediaPackageClient)) 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 MediaPackage | MediaPackageClient");
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
  }