@aws-sdk/client-mediapackage 3.489.0 → 3.495.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 (36) hide show
  1. package/dist-cjs/MediaPackage.js +1 -49
  2. package/dist-cjs/MediaPackageClient.js +1 -43
  3. package/dist-cjs/commands/ConfigureLogsCommand.js +1 -29
  4. package/dist-cjs/commands/CreateChannelCommand.js +1 -29
  5. package/dist-cjs/commands/CreateHarvestJobCommand.js +1 -28
  6. package/dist-cjs/commands/CreateOriginEndpointCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteChannelCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteOriginEndpointCommand.js +1 -28
  9. package/dist-cjs/commands/DescribeChannelCommand.js +1 -29
  10. package/dist-cjs/commands/DescribeHarvestJobCommand.js +1 -28
  11. package/dist-cjs/commands/DescribeOriginEndpointCommand.js +1 -28
  12. package/dist-cjs/commands/ListChannelsCommand.js +1 -29
  13. package/dist-cjs/commands/ListHarvestJobsCommand.js +1 -28
  14. package/dist-cjs/commands/ListOriginEndpointsCommand.js +1 -28
  15. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  16. package/dist-cjs/commands/RotateChannelCredentialsCommand.js +1 -29
  17. package/dist-cjs/commands/RotateIngestEndpointCredentialsCommand.js +1 -29
  18. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  19. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  20. package/dist-cjs/commands/UpdateChannelCommand.js +1 -29
  21. package/dist-cjs/commands/UpdateOriginEndpointCommand.js +1 -28
  22. package/dist-cjs/commands/index.js +1 -22
  23. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  24. package/dist-cjs/extensionConfiguration.js +1 -2
  25. package/dist-cjs/index.js +2594 -11
  26. package/dist-cjs/models/MediaPackageServiceException.js +1 -12
  27. package/dist-cjs/models/index.js +1 -4
  28. package/dist-cjs/models/models_0.js +1 -234
  29. package/dist-cjs/pagination/Interfaces.js +1 -2
  30. package/dist-cjs/pagination/ListChannelsPaginator.js +1 -7
  31. package/dist-cjs/pagination/ListHarvestJobsPaginator.js +1 -7
  32. package/dist-cjs/pagination/ListOriginEndpointsPaginator.js +1 -7
  33. package/dist-cjs/pagination/index.js +1 -7
  34. package/dist-cjs/protocols/Aws_restJson1.js +1 -1777
  35. package/dist-cjs/runtimeExtensions.js +1 -22
  36. package/package.json +40 -40
@@ -1,1777 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateOriginEndpointCommand = exports.de_UpdateChannelCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_RotateIngestEndpointCredentialsCommand = exports.de_RotateChannelCredentialsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListOriginEndpointsCommand = exports.de_ListHarvestJobsCommand = exports.de_ListChannelsCommand = exports.de_DescribeOriginEndpointCommand = exports.de_DescribeHarvestJobCommand = exports.de_DescribeChannelCommand = exports.de_DeleteOriginEndpointCommand = exports.de_DeleteChannelCommand = exports.de_CreateOriginEndpointCommand = exports.de_CreateHarvestJobCommand = exports.de_CreateChannelCommand = exports.de_ConfigureLogsCommand = exports.se_UpdateOriginEndpointCommand = exports.se_UpdateChannelCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_RotateIngestEndpointCredentialsCommand = exports.se_RotateChannelCredentialsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListOriginEndpointsCommand = exports.se_ListHarvestJobsCommand = exports.se_ListChannelsCommand = exports.se_DescribeOriginEndpointCommand = exports.se_DescribeHarvestJobCommand = exports.se_DescribeChannelCommand = exports.se_DeleteOriginEndpointCommand = exports.se_DeleteChannelCommand = exports.se_CreateOriginEndpointCommand = exports.se_CreateHarvestJobCommand = exports.se_CreateChannelCommand = exports.se_ConfigureLogsCommand = void 0;
4
- const core_1 = require("@smithy/core");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const MediaPackageServiceException_1 = require("../models/MediaPackageServiceException");
7
- const models_0_1 = require("../models/models_0");
8
- const se_ConfigureLogsCommand = async (input, context) => {
9
- const b = (0, core_1.requestBuilder)(input, context);
10
- const headers = {
11
- "content-type": "application/json",
12
- };
13
- b.bp("/channels/{Id}/configure_logs");
14
- b.p("Id", () => input.Id, "{Id}", false);
15
- let body;
16
- body = JSON.stringify((0, smithy_client_1.take)(input, {
17
- egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`],
18
- ingressAccessLogs: [, (_) => se_IngressAccessLogs(_, context), `IngressAccessLogs`],
19
- }));
20
- b.m("PUT").h(headers).b(body);
21
- return b.build();
22
- };
23
- exports.se_ConfigureLogsCommand = se_ConfigureLogsCommand;
24
- const se_CreateChannelCommand = async (input, context) => {
25
- const b = (0, core_1.requestBuilder)(input, context);
26
- const headers = {
27
- "content-type": "application/json",
28
- };
29
- b.bp("/channels");
30
- let body;
31
- body = JSON.stringify((0, smithy_client_1.take)(input, {
32
- description: [, , `Description`],
33
- id: [, , `Id`],
34
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
35
- }));
36
- b.m("POST").h(headers).b(body);
37
- return b.build();
38
- };
39
- exports.se_CreateChannelCommand = se_CreateChannelCommand;
40
- const se_CreateHarvestJobCommand = async (input, context) => {
41
- const b = (0, core_1.requestBuilder)(input, context);
42
- const headers = {
43
- "content-type": "application/json",
44
- };
45
- b.bp("/harvest_jobs");
46
- let body;
47
- body = JSON.stringify((0, smithy_client_1.take)(input, {
48
- endTime: [, , `EndTime`],
49
- id: [, , `Id`],
50
- originEndpointId: [, , `OriginEndpointId`],
51
- s3Destination: [, (_) => se_S3Destination(_, context), `S3Destination`],
52
- startTime: [, , `StartTime`],
53
- }));
54
- b.m("POST").h(headers).b(body);
55
- return b.build();
56
- };
57
- exports.se_CreateHarvestJobCommand = se_CreateHarvestJobCommand;
58
- const se_CreateOriginEndpointCommand = async (input, context) => {
59
- const b = (0, core_1.requestBuilder)(input, context);
60
- const headers = {
61
- "content-type": "application/json",
62
- };
63
- b.bp("/origin_endpoints");
64
- let body;
65
- body = JSON.stringify((0, smithy_client_1.take)(input, {
66
- authorization: [, (_) => se_Authorization(_, context), `Authorization`],
67
- channelId: [, , `ChannelId`],
68
- cmafPackage: [, (_) => se_CmafPackageCreateOrUpdateParameters(_, context), `CmafPackage`],
69
- dashPackage: [, (_) => se_DashPackage(_, context), `DashPackage`],
70
- description: [, , `Description`],
71
- hlsPackage: [, (_) => se_HlsPackage(_, context), `HlsPackage`],
72
- id: [, , `Id`],
73
- manifestName: [, , `ManifestName`],
74
- mssPackage: [, (_) => se_MssPackage(_, context), `MssPackage`],
75
- origination: [, , `Origination`],
76
- startoverWindowSeconds: [, , `StartoverWindowSeconds`],
77
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
78
- timeDelaySeconds: [, , `TimeDelaySeconds`],
79
- whitelist: [, (_) => (0, smithy_client_1._json)(_), `Whitelist`],
80
- }));
81
- b.m("POST").h(headers).b(body);
82
- return b.build();
83
- };
84
- exports.se_CreateOriginEndpointCommand = se_CreateOriginEndpointCommand;
85
- const se_DeleteChannelCommand = async (input, context) => {
86
- const b = (0, core_1.requestBuilder)(input, context);
87
- const headers = {};
88
- b.bp("/channels/{Id}");
89
- b.p("Id", () => input.Id, "{Id}", false);
90
- let body;
91
- b.m("DELETE").h(headers).b(body);
92
- return b.build();
93
- };
94
- exports.se_DeleteChannelCommand = se_DeleteChannelCommand;
95
- const se_DeleteOriginEndpointCommand = async (input, context) => {
96
- const b = (0, core_1.requestBuilder)(input, context);
97
- const headers = {};
98
- b.bp("/origin_endpoints/{Id}");
99
- b.p("Id", () => input.Id, "{Id}", false);
100
- let body;
101
- b.m("DELETE").h(headers).b(body);
102
- return b.build();
103
- };
104
- exports.se_DeleteOriginEndpointCommand = se_DeleteOriginEndpointCommand;
105
- const se_DescribeChannelCommand = async (input, context) => {
106
- const b = (0, core_1.requestBuilder)(input, context);
107
- const headers = {};
108
- b.bp("/channels/{Id}");
109
- b.p("Id", () => input.Id, "{Id}", false);
110
- let body;
111
- b.m("GET").h(headers).b(body);
112
- return b.build();
113
- };
114
- exports.se_DescribeChannelCommand = se_DescribeChannelCommand;
115
- const se_DescribeHarvestJobCommand = async (input, context) => {
116
- const b = (0, core_1.requestBuilder)(input, context);
117
- const headers = {};
118
- b.bp("/harvest_jobs/{Id}");
119
- b.p("Id", () => input.Id, "{Id}", false);
120
- let body;
121
- b.m("GET").h(headers).b(body);
122
- return b.build();
123
- };
124
- exports.se_DescribeHarvestJobCommand = se_DescribeHarvestJobCommand;
125
- const se_DescribeOriginEndpointCommand = async (input, context) => {
126
- const b = (0, core_1.requestBuilder)(input, context);
127
- const headers = {};
128
- b.bp("/origin_endpoints/{Id}");
129
- b.p("Id", () => input.Id, "{Id}", false);
130
- let body;
131
- b.m("GET").h(headers).b(body);
132
- return b.build();
133
- };
134
- exports.se_DescribeOriginEndpointCommand = se_DescribeOriginEndpointCommand;
135
- const se_ListChannelsCommand = async (input, context) => {
136
- const b = (0, core_1.requestBuilder)(input, context);
137
- const headers = {};
138
- b.bp("/channels");
139
- const query = (0, smithy_client_1.map)({
140
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
141
- [_nT]: [, input[_NT]],
142
- });
143
- let body;
144
- b.m("GET").h(headers).q(query).b(body);
145
- return b.build();
146
- };
147
- exports.se_ListChannelsCommand = se_ListChannelsCommand;
148
- const se_ListHarvestJobsCommand = async (input, context) => {
149
- const b = (0, core_1.requestBuilder)(input, context);
150
- const headers = {};
151
- b.bp("/harvest_jobs");
152
- const query = (0, smithy_client_1.map)({
153
- [_iCI]: [, input[_ICI]],
154
- [_iS]: [, input[_IS]],
155
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
156
- [_nT]: [, input[_NT]],
157
- });
158
- let body;
159
- b.m("GET").h(headers).q(query).b(body);
160
- return b.build();
161
- };
162
- exports.se_ListHarvestJobsCommand = se_ListHarvestJobsCommand;
163
- const se_ListOriginEndpointsCommand = async (input, context) => {
164
- const b = (0, core_1.requestBuilder)(input, context);
165
- const headers = {};
166
- b.bp("/origin_endpoints");
167
- const query = (0, smithy_client_1.map)({
168
- [_cI]: [, input[_CI]],
169
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
170
- [_nT]: [, input[_NT]],
171
- });
172
- let body;
173
- b.m("GET").h(headers).q(query).b(body);
174
- return b.build();
175
- };
176
- exports.se_ListOriginEndpointsCommand = se_ListOriginEndpointsCommand;
177
- const se_ListTagsForResourceCommand = async (input, context) => {
178
- const b = (0, core_1.requestBuilder)(input, context);
179
- const headers = {};
180
- b.bp("/tags/{ResourceArn}");
181
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
182
- let body;
183
- b.m("GET").h(headers).b(body);
184
- return b.build();
185
- };
186
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
187
- const se_RotateChannelCredentialsCommand = async (input, context) => {
188
- const b = (0, core_1.requestBuilder)(input, context);
189
- const headers = {};
190
- b.bp("/channels/{Id}/credentials");
191
- b.p("Id", () => input.Id, "{Id}", false);
192
- let body;
193
- b.m("PUT").h(headers).b(body);
194
- return b.build();
195
- };
196
- exports.se_RotateChannelCredentialsCommand = se_RotateChannelCredentialsCommand;
197
- const se_RotateIngestEndpointCredentialsCommand = async (input, context) => {
198
- const b = (0, core_1.requestBuilder)(input, context);
199
- const headers = {};
200
- b.bp("/channels/{Id}/ingest_endpoints/{IngestEndpointId}/credentials");
201
- b.p("Id", () => input.Id, "{Id}", false);
202
- b.p("IngestEndpointId", () => input.IngestEndpointId, "{IngestEndpointId}", false);
203
- let body;
204
- b.m("PUT").h(headers).b(body);
205
- return b.build();
206
- };
207
- exports.se_RotateIngestEndpointCredentialsCommand = se_RotateIngestEndpointCredentialsCommand;
208
- const se_TagResourceCommand = async (input, context) => {
209
- const b = (0, core_1.requestBuilder)(input, context);
210
- const headers = {
211
- "content-type": "application/json",
212
- };
213
- b.bp("/tags/{ResourceArn}");
214
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
215
- let body;
216
- body = JSON.stringify((0, smithy_client_1.take)(input, {
217
- tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
218
- }));
219
- b.m("POST").h(headers).b(body);
220
- return b.build();
221
- };
222
- exports.se_TagResourceCommand = se_TagResourceCommand;
223
- const se_UntagResourceCommand = async (input, context) => {
224
- const b = (0, core_1.requestBuilder)(input, context);
225
- const headers = {};
226
- b.bp("/tags/{ResourceArn}");
227
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
228
- const query = (0, smithy_client_1.map)({
229
- [_tK]: [
230
- (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
231
- () => (input[_TK] || []).map((_entry) => _entry),
232
- ],
233
- });
234
- let body;
235
- b.m("DELETE").h(headers).q(query).b(body);
236
- return b.build();
237
- };
238
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
239
- const se_UpdateChannelCommand = async (input, context) => {
240
- const b = (0, core_1.requestBuilder)(input, context);
241
- const headers = {
242
- "content-type": "application/json",
243
- };
244
- b.bp("/channels/{Id}");
245
- b.p("Id", () => input.Id, "{Id}", false);
246
- let body;
247
- body = JSON.stringify((0, smithy_client_1.take)(input, {
248
- description: [, , `Description`],
249
- }));
250
- b.m("PUT").h(headers).b(body);
251
- return b.build();
252
- };
253
- exports.se_UpdateChannelCommand = se_UpdateChannelCommand;
254
- const se_UpdateOriginEndpointCommand = async (input, context) => {
255
- const b = (0, core_1.requestBuilder)(input, context);
256
- const headers = {
257
- "content-type": "application/json",
258
- };
259
- b.bp("/origin_endpoints/{Id}");
260
- b.p("Id", () => input.Id, "{Id}", false);
261
- let body;
262
- body = JSON.stringify((0, smithy_client_1.take)(input, {
263
- authorization: [, (_) => se_Authorization(_, context), `Authorization`],
264
- cmafPackage: [, (_) => se_CmafPackageCreateOrUpdateParameters(_, context), `CmafPackage`],
265
- dashPackage: [, (_) => se_DashPackage(_, context), `DashPackage`],
266
- description: [, , `Description`],
267
- hlsPackage: [, (_) => se_HlsPackage(_, context), `HlsPackage`],
268
- manifestName: [, , `ManifestName`],
269
- mssPackage: [, (_) => se_MssPackage(_, context), `MssPackage`],
270
- origination: [, , `Origination`],
271
- startoverWindowSeconds: [, , `StartoverWindowSeconds`],
272
- timeDelaySeconds: [, , `TimeDelaySeconds`],
273
- whitelist: [, (_) => (0, smithy_client_1._json)(_), `Whitelist`],
274
- }));
275
- b.m("PUT").h(headers).b(body);
276
- return b.build();
277
- };
278
- exports.se_UpdateOriginEndpointCommand = se_UpdateOriginEndpointCommand;
279
- const de_ConfigureLogsCommand = async (output, context) => {
280
- if (output.statusCode !== 200 && output.statusCode >= 300) {
281
- return de_ConfigureLogsCommandError(output, context);
282
- }
283
- const contents = (0, smithy_client_1.map)({
284
- $metadata: deserializeMetadata(output),
285
- });
286
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
287
- const doc = (0, smithy_client_1.take)(data, {
288
- Arn: [, smithy_client_1.expectString, `arn`],
289
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
290
- Description: [, smithy_client_1.expectString, `description`],
291
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
292
- HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
293
- Id: [, smithy_client_1.expectString, `id`],
294
- IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
295
- Tags: [, smithy_client_1._json, `tags`],
296
- });
297
- Object.assign(contents, doc);
298
- return contents;
299
- };
300
- exports.de_ConfigureLogsCommand = de_ConfigureLogsCommand;
301
- const de_ConfigureLogsCommandError = async (output, context) => {
302
- const parsedOutput = {
303
- ...output,
304
- body: await parseErrorBody(output.body, context),
305
- };
306
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
307
- switch (errorCode) {
308
- case "ForbiddenException":
309
- case "com.amazonaws.mediapackage#ForbiddenException":
310
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
311
- case "InternalServerErrorException":
312
- case "com.amazonaws.mediapackage#InternalServerErrorException":
313
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
314
- case "NotFoundException":
315
- case "com.amazonaws.mediapackage#NotFoundException":
316
- throw await de_NotFoundExceptionRes(parsedOutput, context);
317
- case "ServiceUnavailableException":
318
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
319
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
320
- case "TooManyRequestsException":
321
- case "com.amazonaws.mediapackage#TooManyRequestsException":
322
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
323
- case "UnprocessableEntityException":
324
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
325
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
326
- default:
327
- const parsedBody = parsedOutput.body;
328
- return throwDefaultError({
329
- output,
330
- parsedBody,
331
- errorCode,
332
- });
333
- }
334
- };
335
- const de_CreateChannelCommand = async (output, context) => {
336
- if (output.statusCode !== 200 && output.statusCode >= 300) {
337
- return de_CreateChannelCommandError(output, context);
338
- }
339
- const contents = (0, smithy_client_1.map)({
340
- $metadata: deserializeMetadata(output),
341
- });
342
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
343
- const doc = (0, smithy_client_1.take)(data, {
344
- Arn: [, smithy_client_1.expectString, `arn`],
345
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
346
- Description: [, smithy_client_1.expectString, `description`],
347
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
348
- HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
349
- Id: [, smithy_client_1.expectString, `id`],
350
- IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
351
- Tags: [, smithy_client_1._json, `tags`],
352
- });
353
- Object.assign(contents, doc);
354
- return contents;
355
- };
356
- exports.de_CreateChannelCommand = de_CreateChannelCommand;
357
- const de_CreateChannelCommandError = async (output, context) => {
358
- const parsedOutput = {
359
- ...output,
360
- body: await parseErrorBody(output.body, context),
361
- };
362
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
363
- switch (errorCode) {
364
- case "ForbiddenException":
365
- case "com.amazonaws.mediapackage#ForbiddenException":
366
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
367
- case "InternalServerErrorException":
368
- case "com.amazonaws.mediapackage#InternalServerErrorException":
369
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
370
- case "NotFoundException":
371
- case "com.amazonaws.mediapackage#NotFoundException":
372
- throw await de_NotFoundExceptionRes(parsedOutput, context);
373
- case "ServiceUnavailableException":
374
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
375
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
376
- case "TooManyRequestsException":
377
- case "com.amazonaws.mediapackage#TooManyRequestsException":
378
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
379
- case "UnprocessableEntityException":
380
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
381
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
382
- default:
383
- const parsedBody = parsedOutput.body;
384
- return throwDefaultError({
385
- output,
386
- parsedBody,
387
- errorCode,
388
- });
389
- }
390
- };
391
- const de_CreateHarvestJobCommand = async (output, context) => {
392
- if (output.statusCode !== 200 && output.statusCode >= 300) {
393
- return de_CreateHarvestJobCommandError(output, context);
394
- }
395
- const contents = (0, smithy_client_1.map)({
396
- $metadata: deserializeMetadata(output),
397
- });
398
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
399
- const doc = (0, smithy_client_1.take)(data, {
400
- Arn: [, smithy_client_1.expectString, `arn`],
401
- ChannelId: [, smithy_client_1.expectString, `channelId`],
402
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
403
- EndTime: [, smithy_client_1.expectString, `endTime`],
404
- Id: [, smithy_client_1.expectString, `id`],
405
- OriginEndpointId: [, smithy_client_1.expectString, `originEndpointId`],
406
- S3Destination: [, (_) => de_S3Destination(_, context), `s3Destination`],
407
- StartTime: [, smithy_client_1.expectString, `startTime`],
408
- Status: [, smithy_client_1.expectString, `status`],
409
- });
410
- Object.assign(contents, doc);
411
- return contents;
412
- };
413
- exports.de_CreateHarvestJobCommand = de_CreateHarvestJobCommand;
414
- const de_CreateHarvestJobCommandError = async (output, context) => {
415
- const parsedOutput = {
416
- ...output,
417
- body: await parseErrorBody(output.body, context),
418
- };
419
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
420
- switch (errorCode) {
421
- case "ForbiddenException":
422
- case "com.amazonaws.mediapackage#ForbiddenException":
423
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
424
- case "InternalServerErrorException":
425
- case "com.amazonaws.mediapackage#InternalServerErrorException":
426
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
427
- case "NotFoundException":
428
- case "com.amazonaws.mediapackage#NotFoundException":
429
- throw await de_NotFoundExceptionRes(parsedOutput, context);
430
- case "ServiceUnavailableException":
431
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
432
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
433
- case "TooManyRequestsException":
434
- case "com.amazonaws.mediapackage#TooManyRequestsException":
435
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
436
- case "UnprocessableEntityException":
437
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
438
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
439
- default:
440
- const parsedBody = parsedOutput.body;
441
- return throwDefaultError({
442
- output,
443
- parsedBody,
444
- errorCode,
445
- });
446
- }
447
- };
448
- const de_CreateOriginEndpointCommand = async (output, context) => {
449
- if (output.statusCode !== 200 && output.statusCode >= 300) {
450
- return de_CreateOriginEndpointCommandError(output, context);
451
- }
452
- const contents = (0, smithy_client_1.map)({
453
- $metadata: deserializeMetadata(output),
454
- });
455
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
456
- const doc = (0, smithy_client_1.take)(data, {
457
- Arn: [, smithy_client_1.expectString, `arn`],
458
- Authorization: [, (_) => de_Authorization(_, context), `authorization`],
459
- ChannelId: [, smithy_client_1.expectString, `channelId`],
460
- CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
461
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
462
- DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
463
- Description: [, smithy_client_1.expectString, `description`],
464
- HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
465
- Id: [, smithy_client_1.expectString, `id`],
466
- ManifestName: [, smithy_client_1.expectString, `manifestName`],
467
- MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
468
- Origination: [, smithy_client_1.expectString, `origination`],
469
- StartoverWindowSeconds: [, smithy_client_1.expectInt32, `startoverWindowSeconds`],
470
- Tags: [, smithy_client_1._json, `tags`],
471
- TimeDelaySeconds: [, smithy_client_1.expectInt32, `timeDelaySeconds`],
472
- Url: [, smithy_client_1.expectString, `url`],
473
- Whitelist: [, smithy_client_1._json, `whitelist`],
474
- });
475
- Object.assign(contents, doc);
476
- return contents;
477
- };
478
- exports.de_CreateOriginEndpointCommand = de_CreateOriginEndpointCommand;
479
- const de_CreateOriginEndpointCommandError = async (output, context) => {
480
- const parsedOutput = {
481
- ...output,
482
- body: await parseErrorBody(output.body, context),
483
- };
484
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
485
- switch (errorCode) {
486
- case "ForbiddenException":
487
- case "com.amazonaws.mediapackage#ForbiddenException":
488
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
489
- case "InternalServerErrorException":
490
- case "com.amazonaws.mediapackage#InternalServerErrorException":
491
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
492
- case "NotFoundException":
493
- case "com.amazonaws.mediapackage#NotFoundException":
494
- throw await de_NotFoundExceptionRes(parsedOutput, context);
495
- case "ServiceUnavailableException":
496
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
497
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
498
- case "TooManyRequestsException":
499
- case "com.amazonaws.mediapackage#TooManyRequestsException":
500
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
501
- case "UnprocessableEntityException":
502
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
503
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
504
- default:
505
- const parsedBody = parsedOutput.body;
506
- return throwDefaultError({
507
- output,
508
- parsedBody,
509
- errorCode,
510
- });
511
- }
512
- };
513
- const de_DeleteChannelCommand = async (output, context) => {
514
- if (output.statusCode !== 202 && output.statusCode >= 300) {
515
- return de_DeleteChannelCommandError(output, context);
516
- }
517
- const contents = (0, smithy_client_1.map)({
518
- $metadata: deserializeMetadata(output),
519
- });
520
- await (0, smithy_client_1.collectBody)(output.body, context);
521
- return contents;
522
- };
523
- exports.de_DeleteChannelCommand = de_DeleteChannelCommand;
524
- const de_DeleteChannelCommandError = async (output, context) => {
525
- const parsedOutput = {
526
- ...output,
527
- body: await parseErrorBody(output.body, context),
528
- };
529
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
530
- switch (errorCode) {
531
- case "ForbiddenException":
532
- case "com.amazonaws.mediapackage#ForbiddenException":
533
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
534
- case "InternalServerErrorException":
535
- case "com.amazonaws.mediapackage#InternalServerErrorException":
536
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
537
- case "NotFoundException":
538
- case "com.amazonaws.mediapackage#NotFoundException":
539
- throw await de_NotFoundExceptionRes(parsedOutput, context);
540
- case "ServiceUnavailableException":
541
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
542
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
543
- case "TooManyRequestsException":
544
- case "com.amazonaws.mediapackage#TooManyRequestsException":
545
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
546
- case "UnprocessableEntityException":
547
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
548
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
549
- default:
550
- const parsedBody = parsedOutput.body;
551
- return throwDefaultError({
552
- output,
553
- parsedBody,
554
- errorCode,
555
- });
556
- }
557
- };
558
- const de_DeleteOriginEndpointCommand = async (output, context) => {
559
- if (output.statusCode !== 202 && output.statusCode >= 300) {
560
- return de_DeleteOriginEndpointCommandError(output, context);
561
- }
562
- const contents = (0, smithy_client_1.map)({
563
- $metadata: deserializeMetadata(output),
564
- });
565
- await (0, smithy_client_1.collectBody)(output.body, context);
566
- return contents;
567
- };
568
- exports.de_DeleteOriginEndpointCommand = de_DeleteOriginEndpointCommand;
569
- const de_DeleteOriginEndpointCommandError = async (output, context) => {
570
- const parsedOutput = {
571
- ...output,
572
- body: await parseErrorBody(output.body, context),
573
- };
574
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
575
- switch (errorCode) {
576
- case "ForbiddenException":
577
- case "com.amazonaws.mediapackage#ForbiddenException":
578
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
579
- case "InternalServerErrorException":
580
- case "com.amazonaws.mediapackage#InternalServerErrorException":
581
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
582
- case "NotFoundException":
583
- case "com.amazonaws.mediapackage#NotFoundException":
584
- throw await de_NotFoundExceptionRes(parsedOutput, context);
585
- case "ServiceUnavailableException":
586
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
587
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
588
- case "TooManyRequestsException":
589
- case "com.amazonaws.mediapackage#TooManyRequestsException":
590
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
591
- case "UnprocessableEntityException":
592
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
593
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
594
- default:
595
- const parsedBody = parsedOutput.body;
596
- return throwDefaultError({
597
- output,
598
- parsedBody,
599
- errorCode,
600
- });
601
- }
602
- };
603
- const de_DescribeChannelCommand = async (output, context) => {
604
- if (output.statusCode !== 200 && output.statusCode >= 300) {
605
- return de_DescribeChannelCommandError(output, context);
606
- }
607
- const contents = (0, smithy_client_1.map)({
608
- $metadata: deserializeMetadata(output),
609
- });
610
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
611
- const doc = (0, smithy_client_1.take)(data, {
612
- Arn: [, smithy_client_1.expectString, `arn`],
613
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
614
- Description: [, smithy_client_1.expectString, `description`],
615
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
616
- HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
617
- Id: [, smithy_client_1.expectString, `id`],
618
- IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
619
- Tags: [, smithy_client_1._json, `tags`],
620
- });
621
- Object.assign(contents, doc);
622
- return contents;
623
- };
624
- exports.de_DescribeChannelCommand = de_DescribeChannelCommand;
625
- const de_DescribeChannelCommandError = async (output, context) => {
626
- const parsedOutput = {
627
- ...output,
628
- body: await parseErrorBody(output.body, context),
629
- };
630
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
631
- switch (errorCode) {
632
- case "ForbiddenException":
633
- case "com.amazonaws.mediapackage#ForbiddenException":
634
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
635
- case "InternalServerErrorException":
636
- case "com.amazonaws.mediapackage#InternalServerErrorException":
637
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
638
- case "NotFoundException":
639
- case "com.amazonaws.mediapackage#NotFoundException":
640
- throw await de_NotFoundExceptionRes(parsedOutput, context);
641
- case "ServiceUnavailableException":
642
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
643
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
644
- case "TooManyRequestsException":
645
- case "com.amazonaws.mediapackage#TooManyRequestsException":
646
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
647
- case "UnprocessableEntityException":
648
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
649
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
650
- default:
651
- const parsedBody = parsedOutput.body;
652
- return throwDefaultError({
653
- output,
654
- parsedBody,
655
- errorCode,
656
- });
657
- }
658
- };
659
- const de_DescribeHarvestJobCommand = async (output, context) => {
660
- if (output.statusCode !== 200 && output.statusCode >= 300) {
661
- return de_DescribeHarvestJobCommandError(output, context);
662
- }
663
- const contents = (0, smithy_client_1.map)({
664
- $metadata: deserializeMetadata(output),
665
- });
666
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
667
- const doc = (0, smithy_client_1.take)(data, {
668
- Arn: [, smithy_client_1.expectString, `arn`],
669
- ChannelId: [, smithy_client_1.expectString, `channelId`],
670
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
671
- EndTime: [, smithy_client_1.expectString, `endTime`],
672
- Id: [, smithy_client_1.expectString, `id`],
673
- OriginEndpointId: [, smithy_client_1.expectString, `originEndpointId`],
674
- S3Destination: [, (_) => de_S3Destination(_, context), `s3Destination`],
675
- StartTime: [, smithy_client_1.expectString, `startTime`],
676
- Status: [, smithy_client_1.expectString, `status`],
677
- });
678
- Object.assign(contents, doc);
679
- return contents;
680
- };
681
- exports.de_DescribeHarvestJobCommand = de_DescribeHarvestJobCommand;
682
- const de_DescribeHarvestJobCommandError = async (output, context) => {
683
- const parsedOutput = {
684
- ...output,
685
- body: await parseErrorBody(output.body, context),
686
- };
687
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
688
- switch (errorCode) {
689
- case "ForbiddenException":
690
- case "com.amazonaws.mediapackage#ForbiddenException":
691
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
692
- case "InternalServerErrorException":
693
- case "com.amazonaws.mediapackage#InternalServerErrorException":
694
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
695
- case "NotFoundException":
696
- case "com.amazonaws.mediapackage#NotFoundException":
697
- throw await de_NotFoundExceptionRes(parsedOutput, context);
698
- case "ServiceUnavailableException":
699
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
700
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
701
- case "TooManyRequestsException":
702
- case "com.amazonaws.mediapackage#TooManyRequestsException":
703
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
704
- case "UnprocessableEntityException":
705
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
706
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
707
- default:
708
- const parsedBody = parsedOutput.body;
709
- return throwDefaultError({
710
- output,
711
- parsedBody,
712
- errorCode,
713
- });
714
- }
715
- };
716
- const de_DescribeOriginEndpointCommand = async (output, context) => {
717
- if (output.statusCode !== 200 && output.statusCode >= 300) {
718
- return de_DescribeOriginEndpointCommandError(output, context);
719
- }
720
- const contents = (0, smithy_client_1.map)({
721
- $metadata: deserializeMetadata(output),
722
- });
723
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
724
- const doc = (0, smithy_client_1.take)(data, {
725
- Arn: [, smithy_client_1.expectString, `arn`],
726
- Authorization: [, (_) => de_Authorization(_, context), `authorization`],
727
- ChannelId: [, smithy_client_1.expectString, `channelId`],
728
- CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
729
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
730
- DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
731
- Description: [, smithy_client_1.expectString, `description`],
732
- HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
733
- Id: [, smithy_client_1.expectString, `id`],
734
- ManifestName: [, smithy_client_1.expectString, `manifestName`],
735
- MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
736
- Origination: [, smithy_client_1.expectString, `origination`],
737
- StartoverWindowSeconds: [, smithy_client_1.expectInt32, `startoverWindowSeconds`],
738
- Tags: [, smithy_client_1._json, `tags`],
739
- TimeDelaySeconds: [, smithy_client_1.expectInt32, `timeDelaySeconds`],
740
- Url: [, smithy_client_1.expectString, `url`],
741
- Whitelist: [, smithy_client_1._json, `whitelist`],
742
- });
743
- Object.assign(contents, doc);
744
- return contents;
745
- };
746
- exports.de_DescribeOriginEndpointCommand = de_DescribeOriginEndpointCommand;
747
- const de_DescribeOriginEndpointCommandError = async (output, context) => {
748
- const parsedOutput = {
749
- ...output,
750
- body: await parseErrorBody(output.body, context),
751
- };
752
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
753
- switch (errorCode) {
754
- case "ForbiddenException":
755
- case "com.amazonaws.mediapackage#ForbiddenException":
756
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
757
- case "InternalServerErrorException":
758
- case "com.amazonaws.mediapackage#InternalServerErrorException":
759
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
760
- case "NotFoundException":
761
- case "com.amazonaws.mediapackage#NotFoundException":
762
- throw await de_NotFoundExceptionRes(parsedOutput, context);
763
- case "ServiceUnavailableException":
764
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
765
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
766
- case "TooManyRequestsException":
767
- case "com.amazonaws.mediapackage#TooManyRequestsException":
768
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
769
- case "UnprocessableEntityException":
770
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
771
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
772
- default:
773
- const parsedBody = parsedOutput.body;
774
- return throwDefaultError({
775
- output,
776
- parsedBody,
777
- errorCode,
778
- });
779
- }
780
- };
781
- const de_ListChannelsCommand = async (output, context) => {
782
- if (output.statusCode !== 200 && output.statusCode >= 300) {
783
- return de_ListChannelsCommandError(output, context);
784
- }
785
- const contents = (0, smithy_client_1.map)({
786
- $metadata: deserializeMetadata(output),
787
- });
788
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
789
- const doc = (0, smithy_client_1.take)(data, {
790
- Channels: [, (_) => de___listOfChannel(_, context), `channels`],
791
- NextToken: [, smithy_client_1.expectString, `nextToken`],
792
- });
793
- Object.assign(contents, doc);
794
- return contents;
795
- };
796
- exports.de_ListChannelsCommand = de_ListChannelsCommand;
797
- const de_ListChannelsCommandError = async (output, context) => {
798
- const parsedOutput = {
799
- ...output,
800
- body: await parseErrorBody(output.body, context),
801
- };
802
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
803
- switch (errorCode) {
804
- case "ForbiddenException":
805
- case "com.amazonaws.mediapackage#ForbiddenException":
806
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
807
- case "InternalServerErrorException":
808
- case "com.amazonaws.mediapackage#InternalServerErrorException":
809
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
810
- case "NotFoundException":
811
- case "com.amazonaws.mediapackage#NotFoundException":
812
- throw await de_NotFoundExceptionRes(parsedOutput, context);
813
- case "ServiceUnavailableException":
814
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
815
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
816
- case "TooManyRequestsException":
817
- case "com.amazonaws.mediapackage#TooManyRequestsException":
818
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
819
- case "UnprocessableEntityException":
820
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
821
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
822
- default:
823
- const parsedBody = parsedOutput.body;
824
- return throwDefaultError({
825
- output,
826
- parsedBody,
827
- errorCode,
828
- });
829
- }
830
- };
831
- const de_ListHarvestJobsCommand = async (output, context) => {
832
- if (output.statusCode !== 200 && output.statusCode >= 300) {
833
- return de_ListHarvestJobsCommandError(output, context);
834
- }
835
- const contents = (0, smithy_client_1.map)({
836
- $metadata: deserializeMetadata(output),
837
- });
838
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
839
- const doc = (0, smithy_client_1.take)(data, {
840
- HarvestJobs: [, (_) => de___listOfHarvestJob(_, context), `harvestJobs`],
841
- NextToken: [, smithy_client_1.expectString, `nextToken`],
842
- });
843
- Object.assign(contents, doc);
844
- return contents;
845
- };
846
- exports.de_ListHarvestJobsCommand = de_ListHarvestJobsCommand;
847
- const de_ListHarvestJobsCommandError = async (output, context) => {
848
- const parsedOutput = {
849
- ...output,
850
- body: await parseErrorBody(output.body, context),
851
- };
852
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
853
- switch (errorCode) {
854
- case "ForbiddenException":
855
- case "com.amazonaws.mediapackage#ForbiddenException":
856
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
857
- case "InternalServerErrorException":
858
- case "com.amazonaws.mediapackage#InternalServerErrorException":
859
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
860
- case "NotFoundException":
861
- case "com.amazonaws.mediapackage#NotFoundException":
862
- throw await de_NotFoundExceptionRes(parsedOutput, context);
863
- case "ServiceUnavailableException":
864
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
865
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
866
- case "TooManyRequestsException":
867
- case "com.amazonaws.mediapackage#TooManyRequestsException":
868
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
869
- case "UnprocessableEntityException":
870
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
871
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
872
- default:
873
- const parsedBody = parsedOutput.body;
874
- return throwDefaultError({
875
- output,
876
- parsedBody,
877
- errorCode,
878
- });
879
- }
880
- };
881
- const de_ListOriginEndpointsCommand = async (output, context) => {
882
- if (output.statusCode !== 200 && output.statusCode >= 300) {
883
- return de_ListOriginEndpointsCommandError(output, context);
884
- }
885
- const contents = (0, smithy_client_1.map)({
886
- $metadata: deserializeMetadata(output),
887
- });
888
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
889
- const doc = (0, smithy_client_1.take)(data, {
890
- NextToken: [, smithy_client_1.expectString, `nextToken`],
891
- OriginEndpoints: [, (_) => de___listOfOriginEndpoint(_, context), `originEndpoints`],
892
- });
893
- Object.assign(contents, doc);
894
- return contents;
895
- };
896
- exports.de_ListOriginEndpointsCommand = de_ListOriginEndpointsCommand;
897
- const de_ListOriginEndpointsCommandError = async (output, context) => {
898
- const parsedOutput = {
899
- ...output,
900
- body: await parseErrorBody(output.body, context),
901
- };
902
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
903
- switch (errorCode) {
904
- case "ForbiddenException":
905
- case "com.amazonaws.mediapackage#ForbiddenException":
906
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
907
- case "InternalServerErrorException":
908
- case "com.amazonaws.mediapackage#InternalServerErrorException":
909
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
910
- case "NotFoundException":
911
- case "com.amazonaws.mediapackage#NotFoundException":
912
- throw await de_NotFoundExceptionRes(parsedOutput, context);
913
- case "ServiceUnavailableException":
914
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
915
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
916
- case "TooManyRequestsException":
917
- case "com.amazonaws.mediapackage#TooManyRequestsException":
918
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
919
- case "UnprocessableEntityException":
920
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
921
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
922
- default:
923
- const parsedBody = parsedOutput.body;
924
- return throwDefaultError({
925
- output,
926
- parsedBody,
927
- errorCode,
928
- });
929
- }
930
- };
931
- const de_ListTagsForResourceCommand = async (output, context) => {
932
- if (output.statusCode !== 200 && output.statusCode >= 300) {
933
- return de_ListTagsForResourceCommandError(output, context);
934
- }
935
- const contents = (0, smithy_client_1.map)({
936
- $metadata: deserializeMetadata(output),
937
- });
938
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
939
- const doc = (0, smithy_client_1.take)(data, {
940
- Tags: [, smithy_client_1._json, `tags`],
941
- });
942
- Object.assign(contents, doc);
943
- return contents;
944
- };
945
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
946
- const de_ListTagsForResourceCommandError = async (output, context) => {
947
- const parsedOutput = {
948
- ...output,
949
- body: await parseErrorBody(output.body, context),
950
- };
951
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
952
- const parsedBody = parsedOutput.body;
953
- return throwDefaultError({
954
- output,
955
- parsedBody,
956
- errorCode,
957
- });
958
- };
959
- const de_RotateChannelCredentialsCommand = async (output, context) => {
960
- if (output.statusCode !== 200 && output.statusCode >= 300) {
961
- return de_RotateChannelCredentialsCommandError(output, context);
962
- }
963
- const contents = (0, smithy_client_1.map)({
964
- $metadata: deserializeMetadata(output),
965
- });
966
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
967
- const doc = (0, smithy_client_1.take)(data, {
968
- Arn: [, smithy_client_1.expectString, `arn`],
969
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
970
- Description: [, smithy_client_1.expectString, `description`],
971
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
972
- HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
973
- Id: [, smithy_client_1.expectString, `id`],
974
- IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
975
- Tags: [, smithy_client_1._json, `tags`],
976
- });
977
- Object.assign(contents, doc);
978
- return contents;
979
- };
980
- exports.de_RotateChannelCredentialsCommand = de_RotateChannelCredentialsCommand;
981
- const de_RotateChannelCredentialsCommandError = async (output, context) => {
982
- const parsedOutput = {
983
- ...output,
984
- body: await parseErrorBody(output.body, context),
985
- };
986
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
987
- switch (errorCode) {
988
- case "ForbiddenException":
989
- case "com.amazonaws.mediapackage#ForbiddenException":
990
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
991
- case "InternalServerErrorException":
992
- case "com.amazonaws.mediapackage#InternalServerErrorException":
993
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
994
- case "NotFoundException":
995
- case "com.amazonaws.mediapackage#NotFoundException":
996
- throw await de_NotFoundExceptionRes(parsedOutput, context);
997
- case "ServiceUnavailableException":
998
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
999
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1000
- case "TooManyRequestsException":
1001
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1002
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1003
- case "UnprocessableEntityException":
1004
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1005
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1006
- default:
1007
- const parsedBody = parsedOutput.body;
1008
- return throwDefaultError({
1009
- output,
1010
- parsedBody,
1011
- errorCode,
1012
- });
1013
- }
1014
- };
1015
- const de_RotateIngestEndpointCredentialsCommand = async (output, context) => {
1016
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1017
- return de_RotateIngestEndpointCredentialsCommandError(output, context);
1018
- }
1019
- const contents = (0, smithy_client_1.map)({
1020
- $metadata: deserializeMetadata(output),
1021
- });
1022
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1023
- const doc = (0, smithy_client_1.take)(data, {
1024
- Arn: [, smithy_client_1.expectString, `arn`],
1025
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1026
- Description: [, smithy_client_1.expectString, `description`],
1027
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
1028
- HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
1029
- Id: [, smithy_client_1.expectString, `id`],
1030
- IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
1031
- Tags: [, smithy_client_1._json, `tags`],
1032
- });
1033
- Object.assign(contents, doc);
1034
- return contents;
1035
- };
1036
- exports.de_RotateIngestEndpointCredentialsCommand = de_RotateIngestEndpointCredentialsCommand;
1037
- const de_RotateIngestEndpointCredentialsCommandError = async (output, context) => {
1038
- const parsedOutput = {
1039
- ...output,
1040
- body: await parseErrorBody(output.body, context),
1041
- };
1042
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1043
- switch (errorCode) {
1044
- case "ForbiddenException":
1045
- case "com.amazonaws.mediapackage#ForbiddenException":
1046
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1047
- case "InternalServerErrorException":
1048
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1049
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1050
- case "NotFoundException":
1051
- case "com.amazonaws.mediapackage#NotFoundException":
1052
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1053
- case "ServiceUnavailableException":
1054
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1055
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1056
- case "TooManyRequestsException":
1057
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1058
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1059
- case "UnprocessableEntityException":
1060
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1061
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1062
- default:
1063
- const parsedBody = parsedOutput.body;
1064
- return throwDefaultError({
1065
- output,
1066
- parsedBody,
1067
- errorCode,
1068
- });
1069
- }
1070
- };
1071
- const de_TagResourceCommand = async (output, context) => {
1072
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1073
- return de_TagResourceCommandError(output, context);
1074
- }
1075
- const contents = (0, smithy_client_1.map)({
1076
- $metadata: deserializeMetadata(output),
1077
- });
1078
- await (0, smithy_client_1.collectBody)(output.body, context);
1079
- return contents;
1080
- };
1081
- exports.de_TagResourceCommand = de_TagResourceCommand;
1082
- const de_TagResourceCommandError = async (output, context) => {
1083
- const parsedOutput = {
1084
- ...output,
1085
- body: await parseErrorBody(output.body, context),
1086
- };
1087
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1088
- const parsedBody = parsedOutput.body;
1089
- return throwDefaultError({
1090
- output,
1091
- parsedBody,
1092
- errorCode,
1093
- });
1094
- };
1095
- const de_UntagResourceCommand = async (output, context) => {
1096
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1097
- return de_UntagResourceCommandError(output, context);
1098
- }
1099
- const contents = (0, smithy_client_1.map)({
1100
- $metadata: deserializeMetadata(output),
1101
- });
1102
- await (0, smithy_client_1.collectBody)(output.body, context);
1103
- return contents;
1104
- };
1105
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1106
- const de_UntagResourceCommandError = async (output, context) => {
1107
- const parsedOutput = {
1108
- ...output,
1109
- body: await parseErrorBody(output.body, context),
1110
- };
1111
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1112
- const parsedBody = parsedOutput.body;
1113
- return throwDefaultError({
1114
- output,
1115
- parsedBody,
1116
- errorCode,
1117
- });
1118
- };
1119
- const de_UpdateChannelCommand = async (output, context) => {
1120
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1121
- return de_UpdateChannelCommandError(output, context);
1122
- }
1123
- const contents = (0, smithy_client_1.map)({
1124
- $metadata: deserializeMetadata(output),
1125
- });
1126
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1127
- const doc = (0, smithy_client_1.take)(data, {
1128
- Arn: [, smithy_client_1.expectString, `arn`],
1129
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1130
- Description: [, smithy_client_1.expectString, `description`],
1131
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
1132
- HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
1133
- Id: [, smithy_client_1.expectString, `id`],
1134
- IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
1135
- Tags: [, smithy_client_1._json, `tags`],
1136
- });
1137
- Object.assign(contents, doc);
1138
- return contents;
1139
- };
1140
- exports.de_UpdateChannelCommand = de_UpdateChannelCommand;
1141
- const de_UpdateChannelCommandError = async (output, context) => {
1142
- const parsedOutput = {
1143
- ...output,
1144
- body: await parseErrorBody(output.body, context),
1145
- };
1146
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1147
- switch (errorCode) {
1148
- case "ForbiddenException":
1149
- case "com.amazonaws.mediapackage#ForbiddenException":
1150
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1151
- case "InternalServerErrorException":
1152
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1153
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1154
- case "NotFoundException":
1155
- case "com.amazonaws.mediapackage#NotFoundException":
1156
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1157
- case "ServiceUnavailableException":
1158
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1159
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1160
- case "TooManyRequestsException":
1161
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1162
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1163
- case "UnprocessableEntityException":
1164
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1165
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1166
- default:
1167
- const parsedBody = parsedOutput.body;
1168
- return throwDefaultError({
1169
- output,
1170
- parsedBody,
1171
- errorCode,
1172
- });
1173
- }
1174
- };
1175
- const de_UpdateOriginEndpointCommand = async (output, context) => {
1176
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1177
- return de_UpdateOriginEndpointCommandError(output, context);
1178
- }
1179
- const contents = (0, smithy_client_1.map)({
1180
- $metadata: deserializeMetadata(output),
1181
- });
1182
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1183
- const doc = (0, smithy_client_1.take)(data, {
1184
- Arn: [, smithy_client_1.expectString, `arn`],
1185
- Authorization: [, (_) => de_Authorization(_, context), `authorization`],
1186
- ChannelId: [, smithy_client_1.expectString, `channelId`],
1187
- CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
1188
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1189
- DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
1190
- Description: [, smithy_client_1.expectString, `description`],
1191
- HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
1192
- Id: [, smithy_client_1.expectString, `id`],
1193
- ManifestName: [, smithy_client_1.expectString, `manifestName`],
1194
- MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
1195
- Origination: [, smithy_client_1.expectString, `origination`],
1196
- StartoverWindowSeconds: [, smithy_client_1.expectInt32, `startoverWindowSeconds`],
1197
- Tags: [, smithy_client_1._json, `tags`],
1198
- TimeDelaySeconds: [, smithy_client_1.expectInt32, `timeDelaySeconds`],
1199
- Url: [, smithy_client_1.expectString, `url`],
1200
- Whitelist: [, smithy_client_1._json, `whitelist`],
1201
- });
1202
- Object.assign(contents, doc);
1203
- return contents;
1204
- };
1205
- exports.de_UpdateOriginEndpointCommand = de_UpdateOriginEndpointCommand;
1206
- const de_UpdateOriginEndpointCommandError = async (output, context) => {
1207
- const parsedOutput = {
1208
- ...output,
1209
- body: await parseErrorBody(output.body, context),
1210
- };
1211
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1212
- switch (errorCode) {
1213
- case "ForbiddenException":
1214
- case "com.amazonaws.mediapackage#ForbiddenException":
1215
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1216
- case "InternalServerErrorException":
1217
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1218
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1219
- case "NotFoundException":
1220
- case "com.amazonaws.mediapackage#NotFoundException":
1221
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1222
- case "ServiceUnavailableException":
1223
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1224
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1225
- case "TooManyRequestsException":
1226
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1227
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1228
- case "UnprocessableEntityException":
1229
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1230
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1231
- default:
1232
- const parsedBody = parsedOutput.body;
1233
- return throwDefaultError({
1234
- output,
1235
- parsedBody,
1236
- errorCode,
1237
- });
1238
- }
1239
- };
1240
- const throwDefaultError = (0, smithy_client_1.withBaseException)(MediaPackageServiceException_1.MediaPackageServiceException);
1241
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1242
- const contents = (0, smithy_client_1.map)({});
1243
- const data = parsedOutput.body;
1244
- const doc = (0, smithy_client_1.take)(data, {
1245
- Message: [, smithy_client_1.expectString, `message`],
1246
- });
1247
- Object.assign(contents, doc);
1248
- const exception = new models_0_1.ForbiddenException({
1249
- $metadata: deserializeMetadata(parsedOutput),
1250
- ...contents,
1251
- });
1252
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1253
- };
1254
- const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
1255
- const contents = (0, smithy_client_1.map)({});
1256
- const data = parsedOutput.body;
1257
- const doc = (0, smithy_client_1.take)(data, {
1258
- Message: [, smithy_client_1.expectString, `message`],
1259
- });
1260
- Object.assign(contents, doc);
1261
- const exception = new models_0_1.InternalServerErrorException({
1262
- $metadata: deserializeMetadata(parsedOutput),
1263
- ...contents,
1264
- });
1265
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1266
- };
1267
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1268
- const contents = (0, smithy_client_1.map)({});
1269
- const data = parsedOutput.body;
1270
- const doc = (0, smithy_client_1.take)(data, {
1271
- Message: [, smithy_client_1.expectString, `message`],
1272
- });
1273
- Object.assign(contents, doc);
1274
- const exception = new models_0_1.NotFoundException({
1275
- $metadata: deserializeMetadata(parsedOutput),
1276
- ...contents,
1277
- });
1278
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1279
- };
1280
- const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1281
- const contents = (0, smithy_client_1.map)({});
1282
- const data = parsedOutput.body;
1283
- const doc = (0, smithy_client_1.take)(data, {
1284
- Message: [, smithy_client_1.expectString, `message`],
1285
- });
1286
- Object.assign(contents, doc);
1287
- const exception = new models_0_1.ServiceUnavailableException({
1288
- $metadata: deserializeMetadata(parsedOutput),
1289
- ...contents,
1290
- });
1291
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1292
- };
1293
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1294
- const contents = (0, smithy_client_1.map)({});
1295
- const data = parsedOutput.body;
1296
- const doc = (0, smithy_client_1.take)(data, {
1297
- Message: [, smithy_client_1.expectString, `message`],
1298
- });
1299
- Object.assign(contents, doc);
1300
- const exception = new models_0_1.TooManyRequestsException({
1301
- $metadata: deserializeMetadata(parsedOutput),
1302
- ...contents,
1303
- });
1304
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1305
- };
1306
- const de_UnprocessableEntityExceptionRes = async (parsedOutput, context) => {
1307
- const contents = (0, smithy_client_1.map)({});
1308
- const data = parsedOutput.body;
1309
- const doc = (0, smithy_client_1.take)(data, {
1310
- Message: [, smithy_client_1.expectString, `message`],
1311
- });
1312
- Object.assign(contents, doc);
1313
- const exception = new models_0_1.UnprocessableEntityException({
1314
- $metadata: deserializeMetadata(parsedOutput),
1315
- ...contents,
1316
- });
1317
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1318
- };
1319
- const se___listOfHlsManifestCreateOrUpdateParameters = (input, context) => {
1320
- return input
1321
- .filter((e) => e != null)
1322
- .map((entry) => {
1323
- return se_HlsManifestCreateOrUpdateParameters(entry, context);
1324
- });
1325
- };
1326
- const se_Authorization = (input, context) => {
1327
- return (0, smithy_client_1.take)(input, {
1328
- cdnIdentifierSecret: [, , `CdnIdentifierSecret`],
1329
- secretsRoleArn: [, , `SecretsRoleArn`],
1330
- });
1331
- };
1332
- const se_CmafEncryption = (input, context) => {
1333
- return (0, smithy_client_1.take)(input, {
1334
- constantInitializationVector: [, , `ConstantInitializationVector`],
1335
- encryptionMethod: [, , `EncryptionMethod`],
1336
- keyRotationIntervalSeconds: [, , `KeyRotationIntervalSeconds`],
1337
- spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
1338
- });
1339
- };
1340
- const se_CmafPackageCreateOrUpdateParameters = (input, context) => {
1341
- return (0, smithy_client_1.take)(input, {
1342
- encryption: [, (_) => se_CmafEncryption(_, context), `Encryption`],
1343
- hlsManifests: [, (_) => se___listOfHlsManifestCreateOrUpdateParameters(_, context), `HlsManifests`],
1344
- segmentDurationSeconds: [, , `SegmentDurationSeconds`],
1345
- segmentPrefix: [, , `SegmentPrefix`],
1346
- streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
1347
- });
1348
- };
1349
- const se_DashEncryption = (input, context) => {
1350
- return (0, smithy_client_1.take)(input, {
1351
- keyRotationIntervalSeconds: [, , `KeyRotationIntervalSeconds`],
1352
- spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
1353
- });
1354
- };
1355
- const se_DashPackage = (input, context) => {
1356
- return (0, smithy_client_1.take)(input, {
1357
- adTriggers: [, smithy_client_1._json, `AdTriggers`],
1358
- adsOnDeliveryRestrictions: [, , `AdsOnDeliveryRestrictions`],
1359
- encryption: [, (_) => se_DashEncryption(_, context), `Encryption`],
1360
- includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`],
1361
- manifestLayout: [, , `ManifestLayout`],
1362
- manifestWindowSeconds: [, , `ManifestWindowSeconds`],
1363
- minBufferTimeSeconds: [, , `MinBufferTimeSeconds`],
1364
- minUpdatePeriodSeconds: [, , `MinUpdatePeriodSeconds`],
1365
- periodTriggers: [, smithy_client_1._json, `PeriodTriggers`],
1366
- profile: [, , `Profile`],
1367
- segmentDurationSeconds: [, , `SegmentDurationSeconds`],
1368
- segmentTemplateFormat: [, , `SegmentTemplateFormat`],
1369
- streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
1370
- suggestedPresentationDelaySeconds: [, , `SuggestedPresentationDelaySeconds`],
1371
- utcTiming: [, , `UtcTiming`],
1372
- utcTimingUri: [, , `UtcTimingUri`],
1373
- });
1374
- };
1375
- const se_EgressAccessLogs = (input, context) => {
1376
- return (0, smithy_client_1.take)(input, {
1377
- logGroupName: [, , `LogGroupName`],
1378
- });
1379
- };
1380
- const se_EncryptionContractConfiguration = (input, context) => {
1381
- return (0, smithy_client_1.take)(input, {
1382
- presetSpeke20Audio: [, , `PresetSpeke20Audio`],
1383
- presetSpeke20Video: [, , `PresetSpeke20Video`],
1384
- });
1385
- };
1386
- const se_HlsEncryption = (input, context) => {
1387
- return (0, smithy_client_1.take)(input, {
1388
- constantInitializationVector: [, , `ConstantInitializationVector`],
1389
- encryptionMethod: [, , `EncryptionMethod`],
1390
- keyRotationIntervalSeconds: [, , `KeyRotationIntervalSeconds`],
1391
- repeatExtXKey: [, , `RepeatExtXKey`],
1392
- spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
1393
- });
1394
- };
1395
- const se_HlsManifestCreateOrUpdateParameters = (input, context) => {
1396
- return (0, smithy_client_1.take)(input, {
1397
- adMarkers: [, , `AdMarkers`],
1398
- adTriggers: [, smithy_client_1._json, `AdTriggers`],
1399
- adsOnDeliveryRestrictions: [, , `AdsOnDeliveryRestrictions`],
1400
- id: [, , `Id`],
1401
- includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`],
1402
- manifestName: [, , `ManifestName`],
1403
- playlistType: [, , `PlaylistType`],
1404
- playlistWindowSeconds: [, , `PlaylistWindowSeconds`],
1405
- programDateTimeIntervalSeconds: [, , `ProgramDateTimeIntervalSeconds`],
1406
- });
1407
- };
1408
- const se_HlsPackage = (input, context) => {
1409
- return (0, smithy_client_1.take)(input, {
1410
- adMarkers: [, , `AdMarkers`],
1411
- adTriggers: [, smithy_client_1._json, `AdTriggers`],
1412
- adsOnDeliveryRestrictions: [, , `AdsOnDeliveryRestrictions`],
1413
- encryption: [, (_) => se_HlsEncryption(_, context), `Encryption`],
1414
- includeDvbSubtitles: [, , `IncludeDvbSubtitles`],
1415
- includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`],
1416
- playlistType: [, , `PlaylistType`],
1417
- playlistWindowSeconds: [, , `PlaylistWindowSeconds`],
1418
- programDateTimeIntervalSeconds: [, , `ProgramDateTimeIntervalSeconds`],
1419
- segmentDurationSeconds: [, , `SegmentDurationSeconds`],
1420
- streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
1421
- useAudioRenditionGroup: [, , `UseAudioRenditionGroup`],
1422
- });
1423
- };
1424
- const se_IngressAccessLogs = (input, context) => {
1425
- return (0, smithy_client_1.take)(input, {
1426
- logGroupName: [, , `LogGroupName`],
1427
- });
1428
- };
1429
- const se_MssEncryption = (input, context) => {
1430
- return (0, smithy_client_1.take)(input, {
1431
- spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
1432
- });
1433
- };
1434
- const se_MssPackage = (input, context) => {
1435
- return (0, smithy_client_1.take)(input, {
1436
- encryption: [, (_) => se_MssEncryption(_, context), `Encryption`],
1437
- manifestWindowSeconds: [, , `ManifestWindowSeconds`],
1438
- segmentDurationSeconds: [, , `SegmentDurationSeconds`],
1439
- streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
1440
- });
1441
- };
1442
- const se_S3Destination = (input, context) => {
1443
- return (0, smithy_client_1.take)(input, {
1444
- bucketName: [, , `BucketName`],
1445
- manifestKey: [, , `ManifestKey`],
1446
- roleArn: [, , `RoleArn`],
1447
- });
1448
- };
1449
- const se_SpekeKeyProvider = (input, context) => {
1450
- return (0, smithy_client_1.take)(input, {
1451
- certificateArn: [, , `CertificateArn`],
1452
- encryptionContractConfiguration: [
1453
- ,
1454
- (_) => se_EncryptionContractConfiguration(_, context),
1455
- `EncryptionContractConfiguration`,
1456
- ],
1457
- resourceId: [, , `ResourceId`],
1458
- roleArn: [, , `RoleArn`],
1459
- systemIds: [, smithy_client_1._json, `SystemIds`],
1460
- url: [, , `Url`],
1461
- });
1462
- };
1463
- const se_StreamSelection = (input, context) => {
1464
- return (0, smithy_client_1.take)(input, {
1465
- maxVideoBitsPerSecond: [, , `MaxVideoBitsPerSecond`],
1466
- minVideoBitsPerSecond: [, , `MinVideoBitsPerSecond`],
1467
- streamOrder: [, , `StreamOrder`],
1468
- });
1469
- };
1470
- const de___listOfChannel = (output, context) => {
1471
- const retVal = (output || [])
1472
- .filter((e) => e != null)
1473
- .map((entry) => {
1474
- return de_Channel(entry, context);
1475
- });
1476
- return retVal;
1477
- };
1478
- const de___listOfHarvestJob = (output, context) => {
1479
- const retVal = (output || [])
1480
- .filter((e) => e != null)
1481
- .map((entry) => {
1482
- return de_HarvestJob(entry, context);
1483
- });
1484
- return retVal;
1485
- };
1486
- const de___listOfHlsManifest = (output, context) => {
1487
- const retVal = (output || [])
1488
- .filter((e) => e != null)
1489
- .map((entry) => {
1490
- return de_HlsManifest(entry, context);
1491
- });
1492
- return retVal;
1493
- };
1494
- const de___listOfIngestEndpoint = (output, context) => {
1495
- const retVal = (output || [])
1496
- .filter((e) => e != null)
1497
- .map((entry) => {
1498
- return de_IngestEndpoint(entry, context);
1499
- });
1500
- return retVal;
1501
- };
1502
- const de___listOfOriginEndpoint = (output, context) => {
1503
- const retVal = (output || [])
1504
- .filter((e) => e != null)
1505
- .map((entry) => {
1506
- return de_OriginEndpoint(entry, context);
1507
- });
1508
- return retVal;
1509
- };
1510
- const de_Authorization = (output, context) => {
1511
- return (0, smithy_client_1.take)(output, {
1512
- CdnIdentifierSecret: [, smithy_client_1.expectString, `cdnIdentifierSecret`],
1513
- SecretsRoleArn: [, smithy_client_1.expectString, `secretsRoleArn`],
1514
- });
1515
- };
1516
- const de_Channel = (output, context) => {
1517
- return (0, smithy_client_1.take)(output, {
1518
- Arn: [, smithy_client_1.expectString, `arn`],
1519
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1520
- Description: [, smithy_client_1.expectString, `description`],
1521
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
1522
- HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`],
1523
- Id: [, smithy_client_1.expectString, `id`],
1524
- IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`],
1525
- Tags: [, smithy_client_1._json, `tags`],
1526
- });
1527
- };
1528
- const de_CmafEncryption = (output, context) => {
1529
- return (0, smithy_client_1.take)(output, {
1530
- ConstantInitializationVector: [, smithy_client_1.expectString, `constantInitializationVector`],
1531
- EncryptionMethod: [, smithy_client_1.expectString, `encryptionMethod`],
1532
- KeyRotationIntervalSeconds: [, smithy_client_1.expectInt32, `keyRotationIntervalSeconds`],
1533
- SpekeKeyProvider: [, (_) => de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
1534
- });
1535
- };
1536
- const de_CmafPackage = (output, context) => {
1537
- return (0, smithy_client_1.take)(output, {
1538
- Encryption: [, (_) => de_CmafEncryption(_, context), `encryption`],
1539
- HlsManifests: [, (_) => de___listOfHlsManifest(_, context), `hlsManifests`],
1540
- SegmentDurationSeconds: [, smithy_client_1.expectInt32, `segmentDurationSeconds`],
1541
- SegmentPrefix: [, smithy_client_1.expectString, `segmentPrefix`],
1542
- StreamSelection: [, (_) => de_StreamSelection(_, context), `streamSelection`],
1543
- });
1544
- };
1545
- const de_DashEncryption = (output, context) => {
1546
- return (0, smithy_client_1.take)(output, {
1547
- KeyRotationIntervalSeconds: [, smithy_client_1.expectInt32, `keyRotationIntervalSeconds`],
1548
- SpekeKeyProvider: [, (_) => de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
1549
- });
1550
- };
1551
- const de_DashPackage = (output, context) => {
1552
- return (0, smithy_client_1.take)(output, {
1553
- AdTriggers: [, smithy_client_1._json, `adTriggers`],
1554
- AdsOnDeliveryRestrictions: [, smithy_client_1.expectString, `adsOnDeliveryRestrictions`],
1555
- Encryption: [, (_) => de_DashEncryption(_, context), `encryption`],
1556
- IncludeIframeOnlyStream: [, smithy_client_1.expectBoolean, `includeIframeOnlyStream`],
1557
- ManifestLayout: [, smithy_client_1.expectString, `manifestLayout`],
1558
- ManifestWindowSeconds: [, smithy_client_1.expectInt32, `manifestWindowSeconds`],
1559
- MinBufferTimeSeconds: [, smithy_client_1.expectInt32, `minBufferTimeSeconds`],
1560
- MinUpdatePeriodSeconds: [, smithy_client_1.expectInt32, `minUpdatePeriodSeconds`],
1561
- PeriodTriggers: [, smithy_client_1._json, `periodTriggers`],
1562
- Profile: [, smithy_client_1.expectString, `profile`],
1563
- SegmentDurationSeconds: [, smithy_client_1.expectInt32, `segmentDurationSeconds`],
1564
- SegmentTemplateFormat: [, smithy_client_1.expectString, `segmentTemplateFormat`],
1565
- StreamSelection: [, (_) => de_StreamSelection(_, context), `streamSelection`],
1566
- SuggestedPresentationDelaySeconds: [, smithy_client_1.expectInt32, `suggestedPresentationDelaySeconds`],
1567
- UtcTiming: [, smithy_client_1.expectString, `utcTiming`],
1568
- UtcTimingUri: [, smithy_client_1.expectString, `utcTimingUri`],
1569
- });
1570
- };
1571
- const de_EgressAccessLogs = (output, context) => {
1572
- return (0, smithy_client_1.take)(output, {
1573
- LogGroupName: [, smithy_client_1.expectString, `logGroupName`],
1574
- });
1575
- };
1576
- const de_EncryptionContractConfiguration = (output, context) => {
1577
- return (0, smithy_client_1.take)(output, {
1578
- PresetSpeke20Audio: [, smithy_client_1.expectString, `presetSpeke20Audio`],
1579
- PresetSpeke20Video: [, smithy_client_1.expectString, `presetSpeke20Video`],
1580
- });
1581
- };
1582
- const de_HarvestJob = (output, context) => {
1583
- return (0, smithy_client_1.take)(output, {
1584
- Arn: [, smithy_client_1.expectString, `arn`],
1585
- ChannelId: [, smithy_client_1.expectString, `channelId`],
1586
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1587
- EndTime: [, smithy_client_1.expectString, `endTime`],
1588
- Id: [, smithy_client_1.expectString, `id`],
1589
- OriginEndpointId: [, smithy_client_1.expectString, `originEndpointId`],
1590
- S3Destination: [, (_) => de_S3Destination(_, context), `s3Destination`],
1591
- StartTime: [, smithy_client_1.expectString, `startTime`],
1592
- Status: [, smithy_client_1.expectString, `status`],
1593
- });
1594
- };
1595
- const de_HlsEncryption = (output, context) => {
1596
- return (0, smithy_client_1.take)(output, {
1597
- ConstantInitializationVector: [, smithy_client_1.expectString, `constantInitializationVector`],
1598
- EncryptionMethod: [, smithy_client_1.expectString, `encryptionMethod`],
1599
- KeyRotationIntervalSeconds: [, smithy_client_1.expectInt32, `keyRotationIntervalSeconds`],
1600
- RepeatExtXKey: [, smithy_client_1.expectBoolean, `repeatExtXKey`],
1601
- SpekeKeyProvider: [, (_) => de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
1602
- });
1603
- };
1604
- const de_HlsIngest = (output, context) => {
1605
- return (0, smithy_client_1.take)(output, {
1606
- IngestEndpoints: [, (_) => de___listOfIngestEndpoint(_, context), `ingestEndpoints`],
1607
- });
1608
- };
1609
- const de_HlsManifest = (output, context) => {
1610
- return (0, smithy_client_1.take)(output, {
1611
- AdMarkers: [, smithy_client_1.expectString, `adMarkers`],
1612
- AdTriggers: [, smithy_client_1._json, `adTriggers`],
1613
- AdsOnDeliveryRestrictions: [, smithy_client_1.expectString, `adsOnDeliveryRestrictions`],
1614
- Id: [, smithy_client_1.expectString, `id`],
1615
- IncludeIframeOnlyStream: [, smithy_client_1.expectBoolean, `includeIframeOnlyStream`],
1616
- ManifestName: [, smithy_client_1.expectString, `manifestName`],
1617
- PlaylistType: [, smithy_client_1.expectString, `playlistType`],
1618
- PlaylistWindowSeconds: [, smithy_client_1.expectInt32, `playlistWindowSeconds`],
1619
- ProgramDateTimeIntervalSeconds: [, smithy_client_1.expectInt32, `programDateTimeIntervalSeconds`],
1620
- Url: [, smithy_client_1.expectString, `url`],
1621
- });
1622
- };
1623
- const de_HlsPackage = (output, context) => {
1624
- return (0, smithy_client_1.take)(output, {
1625
- AdMarkers: [, smithy_client_1.expectString, `adMarkers`],
1626
- AdTriggers: [, smithy_client_1._json, `adTriggers`],
1627
- AdsOnDeliveryRestrictions: [, smithy_client_1.expectString, `adsOnDeliveryRestrictions`],
1628
- Encryption: [, (_) => de_HlsEncryption(_, context), `encryption`],
1629
- IncludeDvbSubtitles: [, smithy_client_1.expectBoolean, `includeDvbSubtitles`],
1630
- IncludeIframeOnlyStream: [, smithy_client_1.expectBoolean, `includeIframeOnlyStream`],
1631
- PlaylistType: [, smithy_client_1.expectString, `playlistType`],
1632
- PlaylistWindowSeconds: [, smithy_client_1.expectInt32, `playlistWindowSeconds`],
1633
- ProgramDateTimeIntervalSeconds: [, smithy_client_1.expectInt32, `programDateTimeIntervalSeconds`],
1634
- SegmentDurationSeconds: [, smithy_client_1.expectInt32, `segmentDurationSeconds`],
1635
- StreamSelection: [, (_) => de_StreamSelection(_, context), `streamSelection`],
1636
- UseAudioRenditionGroup: [, smithy_client_1.expectBoolean, `useAudioRenditionGroup`],
1637
- });
1638
- };
1639
- const de_IngestEndpoint = (output, context) => {
1640
- return (0, smithy_client_1.take)(output, {
1641
- Id: [, smithy_client_1.expectString, `id`],
1642
- Password: [, smithy_client_1.expectString, `password`],
1643
- Url: [, smithy_client_1.expectString, `url`],
1644
- Username: [, smithy_client_1.expectString, `username`],
1645
- });
1646
- };
1647
- const de_IngressAccessLogs = (output, context) => {
1648
- return (0, smithy_client_1.take)(output, {
1649
- LogGroupName: [, smithy_client_1.expectString, `logGroupName`],
1650
- });
1651
- };
1652
- const de_MssEncryption = (output, context) => {
1653
- return (0, smithy_client_1.take)(output, {
1654
- SpekeKeyProvider: [, (_) => de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
1655
- });
1656
- };
1657
- const de_MssPackage = (output, context) => {
1658
- return (0, smithy_client_1.take)(output, {
1659
- Encryption: [, (_) => de_MssEncryption(_, context), `encryption`],
1660
- ManifestWindowSeconds: [, smithy_client_1.expectInt32, `manifestWindowSeconds`],
1661
- SegmentDurationSeconds: [, smithy_client_1.expectInt32, `segmentDurationSeconds`],
1662
- StreamSelection: [, (_) => de_StreamSelection(_, context), `streamSelection`],
1663
- });
1664
- };
1665
- const de_OriginEndpoint = (output, context) => {
1666
- return (0, smithy_client_1.take)(output, {
1667
- Arn: [, smithy_client_1.expectString, `arn`],
1668
- Authorization: [, (_) => de_Authorization(_, context), `authorization`],
1669
- ChannelId: [, smithy_client_1.expectString, `channelId`],
1670
- CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
1671
- CreatedAt: [, smithy_client_1.expectString, `createdAt`],
1672
- DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
1673
- Description: [, smithy_client_1.expectString, `description`],
1674
- HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
1675
- Id: [, smithy_client_1.expectString, `id`],
1676
- ManifestName: [, smithy_client_1.expectString, `manifestName`],
1677
- MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
1678
- Origination: [, smithy_client_1.expectString, `origination`],
1679
- StartoverWindowSeconds: [, smithy_client_1.expectInt32, `startoverWindowSeconds`],
1680
- Tags: [, smithy_client_1._json, `tags`],
1681
- TimeDelaySeconds: [, smithy_client_1.expectInt32, `timeDelaySeconds`],
1682
- Url: [, smithy_client_1.expectString, `url`],
1683
- Whitelist: [, smithy_client_1._json, `whitelist`],
1684
- });
1685
- };
1686
- const de_S3Destination = (output, context) => {
1687
- return (0, smithy_client_1.take)(output, {
1688
- BucketName: [, smithy_client_1.expectString, `bucketName`],
1689
- ManifestKey: [, smithy_client_1.expectString, `manifestKey`],
1690
- RoleArn: [, smithy_client_1.expectString, `roleArn`],
1691
- });
1692
- };
1693
- const de_SpekeKeyProvider = (output, context) => {
1694
- return (0, smithy_client_1.take)(output, {
1695
- CertificateArn: [, smithy_client_1.expectString, `certificateArn`],
1696
- EncryptionContractConfiguration: [
1697
- ,
1698
- (_) => de_EncryptionContractConfiguration(_, context),
1699
- `encryptionContractConfiguration`,
1700
- ],
1701
- ResourceId: [, smithy_client_1.expectString, `resourceId`],
1702
- RoleArn: [, smithy_client_1.expectString, `roleArn`],
1703
- SystemIds: [, smithy_client_1._json, `systemIds`],
1704
- Url: [, smithy_client_1.expectString, `url`],
1705
- });
1706
- };
1707
- const de_StreamSelection = (output, context) => {
1708
- return (0, smithy_client_1.take)(output, {
1709
- MaxVideoBitsPerSecond: [, smithy_client_1.expectInt32, `maxVideoBitsPerSecond`],
1710
- MinVideoBitsPerSecond: [, smithy_client_1.expectInt32, `minVideoBitsPerSecond`],
1711
- StreamOrder: [, smithy_client_1.expectString, `streamOrder`],
1712
- });
1713
- };
1714
- const deserializeMetadata = (output) => ({
1715
- httpStatusCode: output.statusCode,
1716
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1717
- extendedRequestId: output.headers["x-amz-id-2"],
1718
- cfId: output.headers["x-amz-cf-id"],
1719
- });
1720
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1721
- const isSerializableHeaderValue = (value) => value !== undefined &&
1722
- value !== null &&
1723
- value !== "" &&
1724
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1725
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1726
- const _CI = "ChannelId";
1727
- const _ICI = "IncludeChannelId";
1728
- const _IS = "IncludeStatus";
1729
- const _MR = "MaxResults";
1730
- const _NT = "NextToken";
1731
- const _TK = "TagKeys";
1732
- const _cI = "channelId";
1733
- const _iCI = "includeChannelId";
1734
- const _iS = "includeStatus";
1735
- const _mR = "maxResults";
1736
- const _nT = "nextToken";
1737
- const _tK = "tagKeys";
1738
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1739
- if (encoded.length) {
1740
- return JSON.parse(encoded);
1741
- }
1742
- return {};
1743
- });
1744
- const parseErrorBody = async (errorBody, context) => {
1745
- const value = await parseBody(errorBody, context);
1746
- value.message = value.message ?? value.Message;
1747
- return value;
1748
- };
1749
- const loadRestJsonErrorCode = (output, data) => {
1750
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1751
- const sanitizeErrorCode = (rawValue) => {
1752
- let cleanValue = rawValue;
1753
- if (typeof cleanValue === "number") {
1754
- cleanValue = cleanValue.toString();
1755
- }
1756
- if (cleanValue.indexOf(",") >= 0) {
1757
- cleanValue = cleanValue.split(",")[0];
1758
- }
1759
- if (cleanValue.indexOf(":") >= 0) {
1760
- cleanValue = cleanValue.split(":")[0];
1761
- }
1762
- if (cleanValue.indexOf("#") >= 0) {
1763
- cleanValue = cleanValue.split("#")[1];
1764
- }
1765
- return cleanValue;
1766
- };
1767
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1768
- if (headerKey !== undefined) {
1769
- return sanitizeErrorCode(output.headers[headerKey]);
1770
- }
1771
- if (data.code !== undefined) {
1772
- return sanitizeErrorCode(data.code);
1773
- }
1774
- if (data["__type"] !== undefined) {
1775
- return sanitizeErrorCode(data["__type"]);
1776
- }
1777
- };
1
+ module.exports = require("../index.js");