@aws-sdk/client-mediapackage-vod 3.927.0 → 3.929.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 (38) hide show
  1. package/dist-cjs/index.js +2032 -1109
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/MediaPackageVodClient.js +2 -0
  4. package/dist-es/commands/ConfigureLogsCommand.js +3 -9
  5. package/dist-es/commands/CreateAssetCommand.js +3 -9
  6. package/dist-es/commands/CreatePackagingConfigurationCommand.js +3 -9
  7. package/dist-es/commands/CreatePackagingGroupCommand.js +3 -9
  8. package/dist-es/commands/DeleteAssetCommand.js +3 -9
  9. package/dist-es/commands/DeletePackagingConfigurationCommand.js +3 -9
  10. package/dist-es/commands/DeletePackagingGroupCommand.js +3 -9
  11. package/dist-es/commands/DescribeAssetCommand.js +3 -9
  12. package/dist-es/commands/DescribePackagingConfigurationCommand.js +3 -9
  13. package/dist-es/commands/DescribePackagingGroupCommand.js +3 -9
  14. package/dist-es/commands/ListAssetsCommand.js +3 -9
  15. package/dist-es/commands/ListPackagingConfigurationsCommand.js +3 -9
  16. package/dist-es/commands/ListPackagingGroupsCommand.js +3 -9
  17. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  18. package/dist-es/commands/TagResourceCommand.js +3 -9
  19. package/dist-es/commands/UntagResourceCommand.js +3 -9
  20. package/dist-es/commands/UpdatePackagingGroupCommand.js +3 -9
  21. package/dist-es/runtimeConfig.shared.js +2 -0
  22. package/dist-es/schemas/schemas_0.js +1990 -0
  23. package/dist-types/MediaPackageVodClient.d.ts +10 -1
  24. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  25. package/dist-types/runtimeConfig.d.ts +1 -0
  26. package/dist-types/runtimeConfig.native.d.ts +1 -0
  27. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  28. package/dist-types/schemas/schemas_0.d.ts +89 -0
  29. package/dist-types/ts3.4/MediaPackageVodClient.d.ts +4 -0
  30. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  31. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  32. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  33. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  34. package/dist-types/ts3.4/schemas/schemas_0.d.ts +94 -0
  35. package/package.json +5 -5
  36. package/dist-es/protocols/Aws_restJson1.js +0 -981
  37. package/dist-types/protocols/Aws_restJson1.d.ts +0 -155
  38. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -209
@@ -1,981 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
4
- import { MediaPackageVodServiceException as __BaseException } from "../models/MediaPackageVodServiceException";
5
- import { ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableException, TooManyRequestsException, UnprocessableEntityException, } from "../models/models_0";
6
- export const se_ConfigureLogsCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {
9
- "content-type": "application/json",
10
- };
11
- b.bp("/packaging_groups/{Id}/configure_logs");
12
- b.p("Id", () => input.Id, "{Id}", false);
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`],
16
- }));
17
- b.m("PUT").h(headers).b(body);
18
- return b.build();
19
- };
20
- export const se_CreateAssetCommand = async (input, context) => {
21
- const b = rb(input, context);
22
- const headers = {
23
- "content-type": "application/json",
24
- };
25
- b.bp("/assets");
26
- let body;
27
- body = JSON.stringify(take(input, {
28
- id: [, , `Id`],
29
- packagingGroupId: [, , `PackagingGroupId`],
30
- resourceId: [, , `ResourceId`],
31
- sourceArn: [, , `SourceArn`],
32
- sourceRoleArn: [, , `SourceRoleArn`],
33
- tags: [, (_) => _json(_), `Tags`],
34
- }));
35
- b.m("POST").h(headers).b(body);
36
- return b.build();
37
- };
38
- export const se_CreatePackagingConfigurationCommand = async (input, context) => {
39
- const b = rb(input, context);
40
- const headers = {
41
- "content-type": "application/json",
42
- };
43
- b.bp("/packaging_configurations");
44
- let body;
45
- body = JSON.stringify(take(input, {
46
- cmafPackage: [, (_) => se_CmafPackage(_, context), `CmafPackage`],
47
- dashPackage: [, (_) => se_DashPackage(_, context), `DashPackage`],
48
- hlsPackage: [, (_) => se_HlsPackage(_, context), `HlsPackage`],
49
- id: [, , `Id`],
50
- mssPackage: [, (_) => se_MssPackage(_, context), `MssPackage`],
51
- packagingGroupId: [, , `PackagingGroupId`],
52
- tags: [, (_) => _json(_), `Tags`],
53
- }));
54
- b.m("POST").h(headers).b(body);
55
- return b.build();
56
- };
57
- export const se_CreatePackagingGroupCommand = async (input, context) => {
58
- const b = rb(input, context);
59
- const headers = {
60
- "content-type": "application/json",
61
- };
62
- b.bp("/packaging_groups");
63
- let body;
64
- body = JSON.stringify(take(input, {
65
- authorization: [, (_) => se_Authorization(_, context), `Authorization`],
66
- egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`],
67
- id: [, , `Id`],
68
- tags: [, (_) => _json(_), `Tags`],
69
- }));
70
- b.m("POST").h(headers).b(body);
71
- return b.build();
72
- };
73
- export const se_DeleteAssetCommand = async (input, context) => {
74
- const b = rb(input, context);
75
- const headers = {};
76
- b.bp("/assets/{Id}");
77
- b.p("Id", () => input.Id, "{Id}", false);
78
- let body;
79
- b.m("DELETE").h(headers).b(body);
80
- return b.build();
81
- };
82
- export const se_DeletePackagingConfigurationCommand = async (input, context) => {
83
- const b = rb(input, context);
84
- const headers = {};
85
- b.bp("/packaging_configurations/{Id}");
86
- b.p("Id", () => input.Id, "{Id}", false);
87
- let body;
88
- b.m("DELETE").h(headers).b(body);
89
- return b.build();
90
- };
91
- export const se_DeletePackagingGroupCommand = async (input, context) => {
92
- const b = rb(input, context);
93
- const headers = {};
94
- b.bp("/packaging_groups/{Id}");
95
- b.p("Id", () => input.Id, "{Id}", false);
96
- let body;
97
- b.m("DELETE").h(headers).b(body);
98
- return b.build();
99
- };
100
- export const se_DescribeAssetCommand = async (input, context) => {
101
- const b = rb(input, context);
102
- const headers = {};
103
- b.bp("/assets/{Id}");
104
- b.p("Id", () => input.Id, "{Id}", false);
105
- let body;
106
- b.m("GET").h(headers).b(body);
107
- return b.build();
108
- };
109
- export const se_DescribePackagingConfigurationCommand = async (input, context) => {
110
- const b = rb(input, context);
111
- const headers = {};
112
- b.bp("/packaging_configurations/{Id}");
113
- b.p("Id", () => input.Id, "{Id}", false);
114
- let body;
115
- b.m("GET").h(headers).b(body);
116
- return b.build();
117
- };
118
- export const se_DescribePackagingGroupCommand = async (input, context) => {
119
- const b = rb(input, context);
120
- const headers = {};
121
- b.bp("/packaging_groups/{Id}");
122
- b.p("Id", () => input.Id, "{Id}", false);
123
- let body;
124
- b.m("GET").h(headers).b(body);
125
- return b.build();
126
- };
127
- export const se_ListAssetsCommand = async (input, context) => {
128
- const b = rb(input, context);
129
- const headers = {};
130
- b.bp("/assets");
131
- const query = map({
132
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
133
- [_nT]: [, input[_NT]],
134
- [_pGI]: [, input[_PGI]],
135
- });
136
- let body;
137
- b.m("GET").h(headers).q(query).b(body);
138
- return b.build();
139
- };
140
- export const se_ListPackagingConfigurationsCommand = async (input, context) => {
141
- const b = rb(input, context);
142
- const headers = {};
143
- b.bp("/packaging_configurations");
144
- const query = map({
145
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
146
- [_nT]: [, input[_NT]],
147
- [_pGI]: [, input[_PGI]],
148
- });
149
- let body;
150
- b.m("GET").h(headers).q(query).b(body);
151
- return b.build();
152
- };
153
- export const se_ListPackagingGroupsCommand = async (input, context) => {
154
- const b = rb(input, context);
155
- const headers = {};
156
- b.bp("/packaging_groups");
157
- const query = map({
158
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
159
- [_nT]: [, input[_NT]],
160
- });
161
- let body;
162
- b.m("GET").h(headers).q(query).b(body);
163
- return b.build();
164
- };
165
- export const se_ListTagsForResourceCommand = async (input, context) => {
166
- const b = rb(input, context);
167
- const headers = {};
168
- b.bp("/tags/{ResourceArn}");
169
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
170
- let body;
171
- b.m("GET").h(headers).b(body);
172
- return b.build();
173
- };
174
- export const se_TagResourceCommand = async (input, context) => {
175
- const b = rb(input, context);
176
- const headers = {
177
- "content-type": "application/json",
178
- };
179
- b.bp("/tags/{ResourceArn}");
180
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
181
- let body;
182
- body = JSON.stringify(take(input, {
183
- tags: [, (_) => _json(_), `Tags`],
184
- }));
185
- b.m("POST").h(headers).b(body);
186
- return b.build();
187
- };
188
- export const se_UntagResourceCommand = async (input, context) => {
189
- const b = rb(input, context);
190
- const headers = {};
191
- b.bp("/tags/{ResourceArn}");
192
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
193
- const query = map({
194
- [_tK]: [__expectNonNull(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []],
195
- });
196
- let body;
197
- b.m("DELETE").h(headers).q(query).b(body);
198
- return b.build();
199
- };
200
- export const se_UpdatePackagingGroupCommand = async (input, context) => {
201
- const b = rb(input, context);
202
- const headers = {
203
- "content-type": "application/json",
204
- };
205
- b.bp("/packaging_groups/{Id}");
206
- b.p("Id", () => input.Id, "{Id}", false);
207
- let body;
208
- body = JSON.stringify(take(input, {
209
- authorization: [, (_) => se_Authorization(_, context), `Authorization`],
210
- }));
211
- b.m("PUT").h(headers).b(body);
212
- return b.build();
213
- };
214
- export const de_ConfigureLogsCommand = async (output, context) => {
215
- if (output.statusCode !== 200 && output.statusCode >= 300) {
216
- return de_CommandError(output, context);
217
- }
218
- const contents = map({
219
- $metadata: deserializeMetadata(output),
220
- });
221
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
222
- const doc = take(data, {
223
- Arn: [, __expectString, `arn`],
224
- Authorization: [, (_) => de_Authorization(_, context), `authorization`],
225
- CreatedAt: [, __expectString, `createdAt`],
226
- DomainName: [, __expectString, `domainName`],
227
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
228
- Id: [, __expectString, `id`],
229
- Tags: [, _json, `tags`],
230
- });
231
- Object.assign(contents, doc);
232
- return contents;
233
- };
234
- export const de_CreateAssetCommand = async (output, context) => {
235
- if (output.statusCode !== 200 && output.statusCode >= 300) {
236
- return de_CommandError(output, context);
237
- }
238
- const contents = map({
239
- $metadata: deserializeMetadata(output),
240
- });
241
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
242
- const doc = take(data, {
243
- Arn: [, __expectString, `arn`],
244
- CreatedAt: [, __expectString, `createdAt`],
245
- EgressEndpoints: [, (_) => de___listOfEgressEndpoint(_, context), `egressEndpoints`],
246
- Id: [, __expectString, `id`],
247
- PackagingGroupId: [, __expectString, `packagingGroupId`],
248
- ResourceId: [, __expectString, `resourceId`],
249
- SourceArn: [, __expectString, `sourceArn`],
250
- SourceRoleArn: [, __expectString, `sourceRoleArn`],
251
- Tags: [, _json, `tags`],
252
- });
253
- Object.assign(contents, doc);
254
- return contents;
255
- };
256
- export const de_CreatePackagingConfigurationCommand = async (output, context) => {
257
- if (output.statusCode !== 200 && output.statusCode >= 300) {
258
- return de_CommandError(output, context);
259
- }
260
- const contents = map({
261
- $metadata: deserializeMetadata(output),
262
- });
263
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
264
- const doc = take(data, {
265
- Arn: [, __expectString, `arn`],
266
- CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
267
- CreatedAt: [, __expectString, `createdAt`],
268
- DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
269
- HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
270
- Id: [, __expectString, `id`],
271
- MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
272
- PackagingGroupId: [, __expectString, `packagingGroupId`],
273
- Tags: [, _json, `tags`],
274
- });
275
- Object.assign(contents, doc);
276
- return contents;
277
- };
278
- export const de_CreatePackagingGroupCommand = async (output, context) => {
279
- if (output.statusCode !== 200 && output.statusCode >= 300) {
280
- return de_CommandError(output, context);
281
- }
282
- const contents = map({
283
- $metadata: deserializeMetadata(output),
284
- });
285
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
286
- const doc = take(data, {
287
- Arn: [, __expectString, `arn`],
288
- Authorization: [, (_) => de_Authorization(_, context), `authorization`],
289
- CreatedAt: [, __expectString, `createdAt`],
290
- DomainName: [, __expectString, `domainName`],
291
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
292
- Id: [, __expectString, `id`],
293
- Tags: [, _json, `tags`],
294
- });
295
- Object.assign(contents, doc);
296
- return contents;
297
- };
298
- export const de_DeleteAssetCommand = async (output, context) => {
299
- if (output.statusCode !== 202 && output.statusCode >= 300) {
300
- return de_CommandError(output, context);
301
- }
302
- const contents = map({
303
- $metadata: deserializeMetadata(output),
304
- });
305
- await collectBody(output.body, context);
306
- return contents;
307
- };
308
- export const de_DeletePackagingConfigurationCommand = async (output, context) => {
309
- if (output.statusCode !== 202 && output.statusCode >= 300) {
310
- return de_CommandError(output, context);
311
- }
312
- const contents = map({
313
- $metadata: deserializeMetadata(output),
314
- });
315
- await collectBody(output.body, context);
316
- return contents;
317
- };
318
- export const de_DeletePackagingGroupCommand = async (output, context) => {
319
- if (output.statusCode !== 202 && output.statusCode >= 300) {
320
- return de_CommandError(output, context);
321
- }
322
- const contents = map({
323
- $metadata: deserializeMetadata(output),
324
- });
325
- await collectBody(output.body, context);
326
- return contents;
327
- };
328
- export const de_DescribeAssetCommand = async (output, context) => {
329
- if (output.statusCode !== 200 && output.statusCode >= 300) {
330
- return de_CommandError(output, context);
331
- }
332
- const contents = map({
333
- $metadata: deserializeMetadata(output),
334
- });
335
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
336
- const doc = take(data, {
337
- Arn: [, __expectString, `arn`],
338
- CreatedAt: [, __expectString, `createdAt`],
339
- EgressEndpoints: [, (_) => de___listOfEgressEndpoint(_, context), `egressEndpoints`],
340
- Id: [, __expectString, `id`],
341
- PackagingGroupId: [, __expectString, `packagingGroupId`],
342
- ResourceId: [, __expectString, `resourceId`],
343
- SourceArn: [, __expectString, `sourceArn`],
344
- SourceRoleArn: [, __expectString, `sourceRoleArn`],
345
- Tags: [, _json, `tags`],
346
- });
347
- Object.assign(contents, doc);
348
- return contents;
349
- };
350
- export const de_DescribePackagingConfigurationCommand = async (output, context) => {
351
- if (output.statusCode !== 200 && output.statusCode >= 300) {
352
- return de_CommandError(output, context);
353
- }
354
- const contents = map({
355
- $metadata: deserializeMetadata(output),
356
- });
357
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
358
- const doc = take(data, {
359
- Arn: [, __expectString, `arn`],
360
- CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
361
- CreatedAt: [, __expectString, `createdAt`],
362
- DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
363
- HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
364
- Id: [, __expectString, `id`],
365
- MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
366
- PackagingGroupId: [, __expectString, `packagingGroupId`],
367
- Tags: [, _json, `tags`],
368
- });
369
- Object.assign(contents, doc);
370
- return contents;
371
- };
372
- export const de_DescribePackagingGroupCommand = async (output, context) => {
373
- if (output.statusCode !== 200 && output.statusCode >= 300) {
374
- return de_CommandError(output, context);
375
- }
376
- const contents = map({
377
- $metadata: deserializeMetadata(output),
378
- });
379
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
380
- const doc = take(data, {
381
- ApproximateAssetCount: [, __expectInt32, `approximateAssetCount`],
382
- Arn: [, __expectString, `arn`],
383
- Authorization: [, (_) => de_Authorization(_, context), `authorization`],
384
- CreatedAt: [, __expectString, `createdAt`],
385
- DomainName: [, __expectString, `domainName`],
386
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
387
- Id: [, __expectString, `id`],
388
- Tags: [, _json, `tags`],
389
- });
390
- Object.assign(contents, doc);
391
- return contents;
392
- };
393
- export const de_ListAssetsCommand = async (output, context) => {
394
- if (output.statusCode !== 200 && output.statusCode >= 300) {
395
- return de_CommandError(output, context);
396
- }
397
- const contents = map({
398
- $metadata: deserializeMetadata(output),
399
- });
400
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
401
- const doc = take(data, {
402
- Assets: [, (_) => de___listOfAssetShallow(_, context), `assets`],
403
- NextToken: [, __expectString, `nextToken`],
404
- });
405
- Object.assign(contents, doc);
406
- return contents;
407
- };
408
- export const de_ListPackagingConfigurationsCommand = async (output, context) => {
409
- if (output.statusCode !== 200 && output.statusCode >= 300) {
410
- return de_CommandError(output, context);
411
- }
412
- const contents = map({
413
- $metadata: deserializeMetadata(output),
414
- });
415
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
416
- const doc = take(data, {
417
- NextToken: [, __expectString, `nextToken`],
418
- PackagingConfigurations: [, (_) => de___listOfPackagingConfiguration(_, context), `packagingConfigurations`],
419
- });
420
- Object.assign(contents, doc);
421
- return contents;
422
- };
423
- export const de_ListPackagingGroupsCommand = async (output, context) => {
424
- if (output.statusCode !== 200 && output.statusCode >= 300) {
425
- return de_CommandError(output, context);
426
- }
427
- const contents = map({
428
- $metadata: deserializeMetadata(output),
429
- });
430
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
431
- const doc = take(data, {
432
- NextToken: [, __expectString, `nextToken`],
433
- PackagingGroups: [, (_) => de___listOfPackagingGroup(_, context), `packagingGroups`],
434
- });
435
- Object.assign(contents, doc);
436
- return contents;
437
- };
438
- export const de_ListTagsForResourceCommand = async (output, context) => {
439
- if (output.statusCode !== 200 && output.statusCode >= 300) {
440
- return de_CommandError(output, context);
441
- }
442
- const contents = map({
443
- $metadata: deserializeMetadata(output),
444
- });
445
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
446
- const doc = take(data, {
447
- Tags: [, _json, `tags`],
448
- });
449
- Object.assign(contents, doc);
450
- return contents;
451
- };
452
- export const de_TagResourceCommand = async (output, context) => {
453
- if (output.statusCode !== 204 && output.statusCode >= 300) {
454
- return de_CommandError(output, context);
455
- }
456
- const contents = map({
457
- $metadata: deserializeMetadata(output),
458
- });
459
- await collectBody(output.body, context);
460
- return contents;
461
- };
462
- export const de_UntagResourceCommand = async (output, context) => {
463
- if (output.statusCode !== 204 && output.statusCode >= 300) {
464
- return de_CommandError(output, context);
465
- }
466
- const contents = map({
467
- $metadata: deserializeMetadata(output),
468
- });
469
- await collectBody(output.body, context);
470
- return contents;
471
- };
472
- export const de_UpdatePackagingGroupCommand = async (output, context) => {
473
- if (output.statusCode !== 200 && output.statusCode >= 300) {
474
- return de_CommandError(output, context);
475
- }
476
- const contents = map({
477
- $metadata: deserializeMetadata(output),
478
- });
479
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
480
- const doc = take(data, {
481
- ApproximateAssetCount: [, __expectInt32, `approximateAssetCount`],
482
- Arn: [, __expectString, `arn`],
483
- Authorization: [, (_) => de_Authorization(_, context), `authorization`],
484
- CreatedAt: [, __expectString, `createdAt`],
485
- DomainName: [, __expectString, `domainName`],
486
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
487
- Id: [, __expectString, `id`],
488
- Tags: [, _json, `tags`],
489
- });
490
- Object.assign(contents, doc);
491
- return contents;
492
- };
493
- const de_CommandError = async (output, context) => {
494
- const parsedOutput = {
495
- ...output,
496
- body: await parseErrorBody(output.body, context),
497
- };
498
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
499
- switch (errorCode) {
500
- case "ForbiddenException":
501
- case "com.amazonaws.mediapackagevod#ForbiddenException":
502
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
503
- case "InternalServerErrorException":
504
- case "com.amazonaws.mediapackagevod#InternalServerErrorException":
505
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
506
- case "NotFoundException":
507
- case "com.amazonaws.mediapackagevod#NotFoundException":
508
- throw await de_NotFoundExceptionRes(parsedOutput, context);
509
- case "ServiceUnavailableException":
510
- case "com.amazonaws.mediapackagevod#ServiceUnavailableException":
511
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
512
- case "TooManyRequestsException":
513
- case "com.amazonaws.mediapackagevod#TooManyRequestsException":
514
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
515
- case "UnprocessableEntityException":
516
- case "com.amazonaws.mediapackagevod#UnprocessableEntityException":
517
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
518
- default:
519
- const parsedBody = parsedOutput.body;
520
- return throwDefaultError({
521
- output,
522
- parsedBody,
523
- errorCode,
524
- });
525
- }
526
- };
527
- const throwDefaultError = withBaseException(__BaseException);
528
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
529
- const contents = map({});
530
- const data = parsedOutput.body;
531
- const doc = take(data, {
532
- Message: [, __expectString, `message`],
533
- });
534
- Object.assign(contents, doc);
535
- const exception = new ForbiddenException({
536
- $metadata: deserializeMetadata(parsedOutput),
537
- ...contents,
538
- });
539
- return __decorateServiceException(exception, parsedOutput.body);
540
- };
541
- const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
542
- const contents = map({});
543
- const data = parsedOutput.body;
544
- const doc = take(data, {
545
- Message: [, __expectString, `message`],
546
- });
547
- Object.assign(contents, doc);
548
- const exception = new InternalServerErrorException({
549
- $metadata: deserializeMetadata(parsedOutput),
550
- ...contents,
551
- });
552
- return __decorateServiceException(exception, parsedOutput.body);
553
- };
554
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
555
- const contents = map({});
556
- const data = parsedOutput.body;
557
- const doc = take(data, {
558
- Message: [, __expectString, `message`],
559
- });
560
- Object.assign(contents, doc);
561
- const exception = new NotFoundException({
562
- $metadata: deserializeMetadata(parsedOutput),
563
- ...contents,
564
- });
565
- return __decorateServiceException(exception, parsedOutput.body);
566
- };
567
- const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
568
- const contents = map({});
569
- const data = parsedOutput.body;
570
- const doc = take(data, {
571
- Message: [, __expectString, `message`],
572
- });
573
- Object.assign(contents, doc);
574
- const exception = new ServiceUnavailableException({
575
- $metadata: deserializeMetadata(parsedOutput),
576
- ...contents,
577
- });
578
- return __decorateServiceException(exception, parsedOutput.body);
579
- };
580
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
581
- const contents = map({});
582
- const data = parsedOutput.body;
583
- const doc = take(data, {
584
- Message: [, __expectString, `message`],
585
- });
586
- Object.assign(contents, doc);
587
- const exception = new TooManyRequestsException({
588
- $metadata: deserializeMetadata(parsedOutput),
589
- ...contents,
590
- });
591
- return __decorateServiceException(exception, parsedOutput.body);
592
- };
593
- const de_UnprocessableEntityExceptionRes = async (parsedOutput, context) => {
594
- const contents = map({});
595
- const data = parsedOutput.body;
596
- const doc = take(data, {
597
- Message: [, __expectString, `message`],
598
- });
599
- Object.assign(contents, doc);
600
- const exception = new UnprocessableEntityException({
601
- $metadata: deserializeMetadata(parsedOutput),
602
- ...contents,
603
- });
604
- return __decorateServiceException(exception, parsedOutput.body);
605
- };
606
- const se___listOfDashManifest = (input, context) => {
607
- return input
608
- .filter((e) => e != null)
609
- .map((entry) => {
610
- return se_DashManifest(entry, context);
611
- });
612
- };
613
- const se___listOfHlsManifest = (input, context) => {
614
- return input
615
- .filter((e) => e != null)
616
- .map((entry) => {
617
- return se_HlsManifest(entry, context);
618
- });
619
- };
620
- const se___listOfMssManifest = (input, context) => {
621
- return input
622
- .filter((e) => e != null)
623
- .map((entry) => {
624
- return se_MssManifest(entry, context);
625
- });
626
- };
627
- const se_Authorization = (input, context) => {
628
- return take(input, {
629
- cdnIdentifierSecret: [, , `CdnIdentifierSecret`],
630
- secretsRoleArn: [, , `SecretsRoleArn`],
631
- });
632
- };
633
- const se_CmafEncryption = (input, context) => {
634
- return take(input, {
635
- constantInitializationVector: [, , `ConstantInitializationVector`],
636
- spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
637
- });
638
- };
639
- const se_CmafPackage = (input, context) => {
640
- return take(input, {
641
- encryption: [, (_) => se_CmafEncryption(_, context), `Encryption`],
642
- hlsManifests: [, (_) => se___listOfHlsManifest(_, context), `HlsManifests`],
643
- includeEncoderConfigurationInSegments: [, , `IncludeEncoderConfigurationInSegments`],
644
- segmentDurationSeconds: [, , `SegmentDurationSeconds`],
645
- });
646
- };
647
- const se_DashEncryption = (input, context) => {
648
- return take(input, {
649
- spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
650
- });
651
- };
652
- const se_DashManifest = (input, context) => {
653
- return take(input, {
654
- manifestLayout: [, , `ManifestLayout`],
655
- manifestName: [, , `ManifestName`],
656
- minBufferTimeSeconds: [, , `MinBufferTimeSeconds`],
657
- profile: [, , `Profile`],
658
- scteMarkersSource: [, , `ScteMarkersSource`],
659
- streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
660
- });
661
- };
662
- const se_DashPackage = (input, context) => {
663
- return take(input, {
664
- dashManifests: [, (_) => se___listOfDashManifest(_, context), `DashManifests`],
665
- encryption: [, (_) => se_DashEncryption(_, context), `Encryption`],
666
- includeEncoderConfigurationInSegments: [, , `IncludeEncoderConfigurationInSegments`],
667
- includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`],
668
- periodTriggers: [, _json, `PeriodTriggers`],
669
- segmentDurationSeconds: [, , `SegmentDurationSeconds`],
670
- segmentTemplateFormat: [, , `SegmentTemplateFormat`],
671
- });
672
- };
673
- const se_EgressAccessLogs = (input, context) => {
674
- return take(input, {
675
- logGroupName: [, , `LogGroupName`],
676
- });
677
- };
678
- const se_EncryptionContractConfiguration = (input, context) => {
679
- return take(input, {
680
- presetSpeke20Audio: [, , `PresetSpeke20Audio`],
681
- presetSpeke20Video: [, , `PresetSpeke20Video`],
682
- });
683
- };
684
- const se_HlsEncryption = (input, context) => {
685
- return take(input, {
686
- constantInitializationVector: [, , `ConstantInitializationVector`],
687
- encryptionMethod: [, , `EncryptionMethod`],
688
- spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
689
- });
690
- };
691
- const se_HlsManifest = (input, context) => {
692
- return take(input, {
693
- adMarkers: [, , `AdMarkers`],
694
- includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`],
695
- manifestName: [, , `ManifestName`],
696
- programDateTimeIntervalSeconds: [, , `ProgramDateTimeIntervalSeconds`],
697
- repeatExtXKey: [, , `RepeatExtXKey`],
698
- streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
699
- });
700
- };
701
- const se_HlsPackage = (input, context) => {
702
- return take(input, {
703
- encryption: [, (_) => se_HlsEncryption(_, context), `Encryption`],
704
- hlsManifests: [, (_) => se___listOfHlsManifest(_, context), `HlsManifests`],
705
- includeDvbSubtitles: [, , `IncludeDvbSubtitles`],
706
- segmentDurationSeconds: [, , `SegmentDurationSeconds`],
707
- useAudioRenditionGroup: [, , `UseAudioRenditionGroup`],
708
- });
709
- };
710
- const se_MssEncryption = (input, context) => {
711
- return take(input, {
712
- spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`],
713
- });
714
- };
715
- const se_MssManifest = (input, context) => {
716
- return take(input, {
717
- manifestName: [, , `ManifestName`],
718
- streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`],
719
- });
720
- };
721
- const se_MssPackage = (input, context) => {
722
- return take(input, {
723
- encryption: [, (_) => se_MssEncryption(_, context), `Encryption`],
724
- mssManifests: [, (_) => se___listOfMssManifest(_, context), `MssManifests`],
725
- segmentDurationSeconds: [, , `SegmentDurationSeconds`],
726
- });
727
- };
728
- const se_SpekeKeyProvider = (input, context) => {
729
- return take(input, {
730
- encryptionContractConfiguration: [
731
- ,
732
- (_) => se_EncryptionContractConfiguration(_, context),
733
- `EncryptionContractConfiguration`,
734
- ],
735
- roleArn: [, , `RoleArn`],
736
- systemIds: [, _json, `SystemIds`],
737
- url: [, , `Url`],
738
- });
739
- };
740
- const se_StreamSelection = (input, context) => {
741
- return take(input, {
742
- maxVideoBitsPerSecond: [, , `MaxVideoBitsPerSecond`],
743
- minVideoBitsPerSecond: [, , `MinVideoBitsPerSecond`],
744
- streamOrder: [, , `StreamOrder`],
745
- });
746
- };
747
- const de___listOfAssetShallow = (output, context) => {
748
- const retVal = (output || [])
749
- .filter((e) => e != null)
750
- .map((entry) => {
751
- return de_AssetShallow(entry, context);
752
- });
753
- return retVal;
754
- };
755
- const de___listOfDashManifest = (output, context) => {
756
- const retVal = (output || [])
757
- .filter((e) => e != null)
758
- .map((entry) => {
759
- return de_DashManifest(entry, context);
760
- });
761
- return retVal;
762
- };
763
- const de___listOfEgressEndpoint = (output, context) => {
764
- const retVal = (output || [])
765
- .filter((e) => e != null)
766
- .map((entry) => {
767
- return de_EgressEndpoint(entry, context);
768
- });
769
- return retVal;
770
- };
771
- const de___listOfHlsManifest = (output, context) => {
772
- const retVal = (output || [])
773
- .filter((e) => e != null)
774
- .map((entry) => {
775
- return de_HlsManifest(entry, context);
776
- });
777
- return retVal;
778
- };
779
- const de___listOfMssManifest = (output, context) => {
780
- const retVal = (output || [])
781
- .filter((e) => e != null)
782
- .map((entry) => {
783
- return de_MssManifest(entry, context);
784
- });
785
- return retVal;
786
- };
787
- const de___listOfPackagingConfiguration = (output, context) => {
788
- const retVal = (output || [])
789
- .filter((e) => e != null)
790
- .map((entry) => {
791
- return de_PackagingConfiguration(entry, context);
792
- });
793
- return retVal;
794
- };
795
- const de___listOfPackagingGroup = (output, context) => {
796
- const retVal = (output || [])
797
- .filter((e) => e != null)
798
- .map((entry) => {
799
- return de_PackagingGroup(entry, context);
800
- });
801
- return retVal;
802
- };
803
- const de_AssetShallow = (output, context) => {
804
- return take(output, {
805
- Arn: [, __expectString, `arn`],
806
- CreatedAt: [, __expectString, `createdAt`],
807
- Id: [, __expectString, `id`],
808
- PackagingGroupId: [, __expectString, `packagingGroupId`],
809
- ResourceId: [, __expectString, `resourceId`],
810
- SourceArn: [, __expectString, `sourceArn`],
811
- SourceRoleArn: [, __expectString, `sourceRoleArn`],
812
- Tags: [, _json, `tags`],
813
- });
814
- };
815
- const de_Authorization = (output, context) => {
816
- return take(output, {
817
- CdnIdentifierSecret: [, __expectString, `cdnIdentifierSecret`],
818
- SecretsRoleArn: [, __expectString, `secretsRoleArn`],
819
- });
820
- };
821
- const de_CmafEncryption = (output, context) => {
822
- return take(output, {
823
- ConstantInitializationVector: [, __expectString, `constantInitializationVector`],
824
- SpekeKeyProvider: [, (_) => de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
825
- });
826
- };
827
- const de_CmafPackage = (output, context) => {
828
- return take(output, {
829
- Encryption: [, (_) => de_CmafEncryption(_, context), `encryption`],
830
- HlsManifests: [, (_) => de___listOfHlsManifest(_, context), `hlsManifests`],
831
- IncludeEncoderConfigurationInSegments: [, __expectBoolean, `includeEncoderConfigurationInSegments`],
832
- SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`],
833
- });
834
- };
835
- const de_DashEncryption = (output, context) => {
836
- return take(output, {
837
- SpekeKeyProvider: [, (_) => de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
838
- });
839
- };
840
- const de_DashManifest = (output, context) => {
841
- return take(output, {
842
- ManifestLayout: [, __expectString, `manifestLayout`],
843
- ManifestName: [, __expectString, `manifestName`],
844
- MinBufferTimeSeconds: [, __expectInt32, `minBufferTimeSeconds`],
845
- Profile: [, __expectString, `profile`],
846
- ScteMarkersSource: [, __expectString, `scteMarkersSource`],
847
- StreamSelection: [, (_) => de_StreamSelection(_, context), `streamSelection`],
848
- });
849
- };
850
- const de_DashPackage = (output, context) => {
851
- return take(output, {
852
- DashManifests: [, (_) => de___listOfDashManifest(_, context), `dashManifests`],
853
- Encryption: [, (_) => de_DashEncryption(_, context), `encryption`],
854
- IncludeEncoderConfigurationInSegments: [, __expectBoolean, `includeEncoderConfigurationInSegments`],
855
- IncludeIframeOnlyStream: [, __expectBoolean, `includeIframeOnlyStream`],
856
- PeriodTriggers: [, _json, `periodTriggers`],
857
- SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`],
858
- SegmentTemplateFormat: [, __expectString, `segmentTemplateFormat`],
859
- });
860
- };
861
- const de_EgressAccessLogs = (output, context) => {
862
- return take(output, {
863
- LogGroupName: [, __expectString, `logGroupName`],
864
- });
865
- };
866
- const de_EgressEndpoint = (output, context) => {
867
- return take(output, {
868
- PackagingConfigurationId: [, __expectString, `packagingConfigurationId`],
869
- Status: [, __expectString, `status`],
870
- Url: [, __expectString, `url`],
871
- });
872
- };
873
- const de_EncryptionContractConfiguration = (output, context) => {
874
- return take(output, {
875
- PresetSpeke20Audio: [, __expectString, `presetSpeke20Audio`],
876
- PresetSpeke20Video: [, __expectString, `presetSpeke20Video`],
877
- });
878
- };
879
- const de_HlsEncryption = (output, context) => {
880
- return take(output, {
881
- ConstantInitializationVector: [, __expectString, `constantInitializationVector`],
882
- EncryptionMethod: [, __expectString, `encryptionMethod`],
883
- SpekeKeyProvider: [, (_) => de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
884
- });
885
- };
886
- const de_HlsManifest = (output, context) => {
887
- return take(output, {
888
- AdMarkers: [, __expectString, `adMarkers`],
889
- IncludeIframeOnlyStream: [, __expectBoolean, `includeIframeOnlyStream`],
890
- ManifestName: [, __expectString, `manifestName`],
891
- ProgramDateTimeIntervalSeconds: [, __expectInt32, `programDateTimeIntervalSeconds`],
892
- RepeatExtXKey: [, __expectBoolean, `repeatExtXKey`],
893
- StreamSelection: [, (_) => de_StreamSelection(_, context), `streamSelection`],
894
- });
895
- };
896
- const de_HlsPackage = (output, context) => {
897
- return take(output, {
898
- Encryption: [, (_) => de_HlsEncryption(_, context), `encryption`],
899
- HlsManifests: [, (_) => de___listOfHlsManifest(_, context), `hlsManifests`],
900
- IncludeDvbSubtitles: [, __expectBoolean, `includeDvbSubtitles`],
901
- SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`],
902
- UseAudioRenditionGroup: [, __expectBoolean, `useAudioRenditionGroup`],
903
- });
904
- };
905
- const de_MssEncryption = (output, context) => {
906
- return take(output, {
907
- SpekeKeyProvider: [, (_) => de_SpekeKeyProvider(_, context), `spekeKeyProvider`],
908
- });
909
- };
910
- const de_MssManifest = (output, context) => {
911
- return take(output, {
912
- ManifestName: [, __expectString, `manifestName`],
913
- StreamSelection: [, (_) => de_StreamSelection(_, context), `streamSelection`],
914
- });
915
- };
916
- const de_MssPackage = (output, context) => {
917
- return take(output, {
918
- Encryption: [, (_) => de_MssEncryption(_, context), `encryption`],
919
- MssManifests: [, (_) => de___listOfMssManifest(_, context), `mssManifests`],
920
- SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`],
921
- });
922
- };
923
- const de_PackagingConfiguration = (output, context) => {
924
- return take(output, {
925
- Arn: [, __expectString, `arn`],
926
- CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`],
927
- CreatedAt: [, __expectString, `createdAt`],
928
- DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`],
929
- HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`],
930
- Id: [, __expectString, `id`],
931
- MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`],
932
- PackagingGroupId: [, __expectString, `packagingGroupId`],
933
- Tags: [, _json, `tags`],
934
- });
935
- };
936
- const de_PackagingGroup = (output, context) => {
937
- return take(output, {
938
- ApproximateAssetCount: [, __expectInt32, `approximateAssetCount`],
939
- Arn: [, __expectString, `arn`],
940
- Authorization: [, (_) => de_Authorization(_, context), `authorization`],
941
- CreatedAt: [, __expectString, `createdAt`],
942
- DomainName: [, __expectString, `domainName`],
943
- EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`],
944
- Id: [, __expectString, `id`],
945
- Tags: [, _json, `tags`],
946
- });
947
- };
948
- const de_SpekeKeyProvider = (output, context) => {
949
- return take(output, {
950
- EncryptionContractConfiguration: [
951
- ,
952
- (_) => de_EncryptionContractConfiguration(_, context),
953
- `encryptionContractConfiguration`,
954
- ],
955
- RoleArn: [, __expectString, `roleArn`],
956
- SystemIds: [, _json, `systemIds`],
957
- Url: [, __expectString, `url`],
958
- });
959
- };
960
- const de_StreamSelection = (output, context) => {
961
- return take(output, {
962
- MaxVideoBitsPerSecond: [, __expectInt32, `maxVideoBitsPerSecond`],
963
- MinVideoBitsPerSecond: [, __expectInt32, `minVideoBitsPerSecond`],
964
- StreamOrder: [, __expectString, `streamOrder`],
965
- });
966
- };
967
- const deserializeMetadata = (output) => ({
968
- httpStatusCode: output.statusCode,
969
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
970
- extendedRequestId: output.headers["x-amz-id-2"],
971
- cfId: output.headers["x-amz-cf-id"],
972
- });
973
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
974
- const _MR = "MaxResults";
975
- const _NT = "NextToken";
976
- const _PGI = "PackagingGroupId";
977
- const _TK = "TagKeys";
978
- const _mR = "maxResults";
979
- const _nT = "nextToken";
980
- const _pGI = "packagingGroupId";
981
- const _tK = "tagKeys";