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