@aws-sdk/client-mediapackage 3.183.0 → 3.185.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 (35) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +2 -2
  3. package/dist-es/MediaPackage.js +85 -78
  4. package/dist-es/MediaPackageClient.js +28 -22
  5. package/dist-es/commands/ConfigureLogsCommand.js +28 -21
  6. package/dist-es/commands/CreateChannelCommand.js +28 -21
  7. package/dist-es/commands/CreateHarvestJobCommand.js +28 -21
  8. package/dist-es/commands/CreateOriginEndpointCommand.js +28 -21
  9. package/dist-es/commands/DeleteChannelCommand.js +28 -21
  10. package/dist-es/commands/DeleteOriginEndpointCommand.js +28 -21
  11. package/dist-es/commands/DescribeChannelCommand.js +28 -21
  12. package/dist-es/commands/DescribeHarvestJobCommand.js +28 -21
  13. package/dist-es/commands/DescribeOriginEndpointCommand.js +28 -21
  14. package/dist-es/commands/ListChannelsCommand.js +28 -21
  15. package/dist-es/commands/ListHarvestJobsCommand.js +28 -21
  16. package/dist-es/commands/ListOriginEndpointsCommand.js +28 -21
  17. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  18. package/dist-es/commands/RotateChannelCredentialsCommand.js +28 -21
  19. package/dist-es/commands/RotateIngestEndpointCredentialsCommand.js +28 -21
  20. package/dist-es/commands/TagResourceCommand.js +29 -22
  21. package/dist-es/commands/UntagResourceCommand.js +29 -22
  22. package/dist-es/commands/UpdateChannelCommand.js +28 -21
  23. package/dist-es/commands/UpdateOriginEndpointCommand.js +28 -21
  24. package/dist-es/endpoints.js +8 -8
  25. package/dist-es/models/MediaPackageServiceException.js +10 -5
  26. package/dist-es/models/models_0.js +132 -249
  27. package/dist-es/pagination/ListChannelsPaginator.js +68 -25
  28. package/dist-es/pagination/ListHarvestJobsPaginator.js +68 -25
  29. package/dist-es/pagination/ListOriginEndpointsPaginator.js +68 -25
  30. package/dist-es/protocols/Aws_restJson1.js +2343 -1853
  31. package/dist-es/runtimeConfig.browser.js +12 -26
  32. package/dist-es/runtimeConfig.js +12 -30
  33. package/dist-es/runtimeConfig.native.js +5 -8
  34. package/dist-es/runtimeConfig.shared.js +11 -8
  35. package/package.json +5 -5
@@ -1,1844 +1,2318 @@
1
+ import { __assign, __awaiter, __generator, __read } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
3
4
  import { MediaPackageServiceException as __BaseException } from "../models/MediaPackageServiceException";
4
5
  import { ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableException, TooManyRequestsException, UnprocessableEntityException, } from "../models/models_0";
5
- export const serializeAws_restJson1ConfigureLogsCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
- const headers = {
8
- "content-type": "application/json",
9
- };
10
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}/configure_logs";
11
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
12
- let body;
13
- body = JSON.stringify({
14
- ...(input.EgressAccessLogs != null && {
15
- egressAccessLogs: serializeAws_restJson1EgressAccessLogs(input.EgressAccessLogs, context),
16
- }),
17
- ...(input.IngressAccessLogs != null && {
18
- ingressAccessLogs: serializeAws_restJson1IngressAccessLogs(input.IngressAccessLogs, context),
19
- }),
20
- });
21
- return new __HttpRequest({
22
- protocol,
23
- hostname,
24
- port,
25
- method: "PUT",
26
- headers,
27
- path: resolvedPath,
28
- body,
6
+ export var serializeAws_restJson1ConfigureLogsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
8
+ return __generator(this, function (_c) {
9
+ switch (_c.label) {
10
+ case 0: return [4, context.endpoint()];
11
+ case 1:
12
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
13
+ headers = {
14
+ "content-type": "application/json",
15
+ };
16
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/channels/{Id}/configure_logs";
17
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
18
+ body = JSON.stringify(__assign(__assign({}, (input.EgressAccessLogs != null && {
19
+ egressAccessLogs: serializeAws_restJson1EgressAccessLogs(input.EgressAccessLogs, context),
20
+ })), (input.IngressAccessLogs != null && {
21
+ ingressAccessLogs: serializeAws_restJson1IngressAccessLogs(input.IngressAccessLogs, context),
22
+ })));
23
+ return [2, new __HttpRequest({
24
+ protocol: protocol,
25
+ hostname: hostname,
26
+ port: port,
27
+ method: "PUT",
28
+ headers: headers,
29
+ path: resolvedPath,
30
+ body: body,
31
+ })];
32
+ }
29
33
  });
30
- };
31
- export const serializeAws_restJson1CreateChannelCommand = async (input, context) => {
32
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
- const headers = {
34
- "content-type": "application/json",
35
- };
36
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
37
- let body;
38
- body = JSON.stringify({
39
- ...(input.Description != null && { description: input.Description }),
40
- ...(input.Id != null && { id: input.Id }),
41
- ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
42
- });
43
- return new __HttpRequest({
44
- protocol,
45
- hostname,
46
- port,
47
- method: "POST",
48
- headers,
49
- path: resolvedPath,
50
- body,
34
+ }); };
35
+ export var serializeAws_restJson1CreateChannelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
36
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
37
+ return __generator(this, function (_c) {
38
+ switch (_c.label) {
39
+ case 0: return [4, context.endpoint()];
40
+ case 1:
41
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
42
+ headers = {
43
+ "content-type": "application/json",
44
+ };
45
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/channels";
46
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.Description != null && { description: input.Description })), (input.Id != null && { id: input.Id })), (input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) })));
47
+ return [2, new __HttpRequest({
48
+ protocol: protocol,
49
+ hostname: hostname,
50
+ port: port,
51
+ method: "POST",
52
+ headers: headers,
53
+ path: resolvedPath,
54
+ body: body,
55
+ })];
56
+ }
51
57
  });
52
- };
53
- export const serializeAws_restJson1CreateHarvestJobCommand = async (input, context) => {
54
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
- const headers = {
56
- "content-type": "application/json",
57
- };
58
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/harvest_jobs";
59
- let body;
60
- body = JSON.stringify({
61
- ...(input.EndTime != null && { endTime: input.EndTime }),
62
- ...(input.Id != null && { id: input.Id }),
63
- ...(input.OriginEndpointId != null && { originEndpointId: input.OriginEndpointId }),
64
- ...(input.S3Destination != null && {
65
- s3Destination: serializeAws_restJson1S3Destination(input.S3Destination, context),
66
- }),
67
- ...(input.StartTime != null && { startTime: input.StartTime }),
68
- });
69
- return new __HttpRequest({
70
- protocol,
71
- hostname,
72
- port,
73
- method: "POST",
74
- headers,
75
- path: resolvedPath,
76
- body,
58
+ }); };
59
+ export var serializeAws_restJson1CreateHarvestJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
60
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
61
+ return __generator(this, function (_c) {
62
+ switch (_c.label) {
63
+ case 0: return [4, context.endpoint()];
64
+ case 1:
65
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
66
+ headers = {
67
+ "content-type": "application/json",
68
+ };
69
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/harvest_jobs";
70
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.EndTime != null && { endTime: input.EndTime })), (input.Id != null && { id: input.Id })), (input.OriginEndpointId != null && { originEndpointId: input.OriginEndpointId })), (input.S3Destination != null && {
71
+ s3Destination: serializeAws_restJson1S3Destination(input.S3Destination, context),
72
+ })), (input.StartTime != null && { startTime: input.StartTime })));
73
+ return [2, new __HttpRequest({
74
+ protocol: protocol,
75
+ hostname: hostname,
76
+ port: port,
77
+ method: "POST",
78
+ headers: headers,
79
+ path: resolvedPath,
80
+ body: body,
81
+ })];
82
+ }
77
83
  });
78
- };
79
- export const serializeAws_restJson1CreateOriginEndpointCommand = async (input, context) => {
80
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
81
- const headers = {
82
- "content-type": "application/json",
83
- };
84
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints";
85
- let body;
86
- body = JSON.stringify({
87
- ...(input.Authorization != null && {
88
- authorization: serializeAws_restJson1Authorization(input.Authorization, context),
89
- }),
90
- ...(input.ChannelId != null && { channelId: input.ChannelId }),
91
- ...(input.CmafPackage != null && {
92
- cmafPackage: serializeAws_restJson1CmafPackageCreateOrUpdateParameters(input.CmafPackage, context),
93
- }),
94
- ...(input.DashPackage != null && { dashPackage: serializeAws_restJson1DashPackage(input.DashPackage, context) }),
95
- ...(input.Description != null && { description: input.Description }),
96
- ...(input.HlsPackage != null && { hlsPackage: serializeAws_restJson1HlsPackage(input.HlsPackage, context) }),
97
- ...(input.Id != null && { id: input.Id }),
98
- ...(input.ManifestName != null && { manifestName: input.ManifestName }),
99
- ...(input.MssPackage != null && { mssPackage: serializeAws_restJson1MssPackage(input.MssPackage, context) }),
100
- ...(input.Origination != null && { origination: input.Origination }),
101
- ...(input.StartoverWindowSeconds != null && { startoverWindowSeconds: input.StartoverWindowSeconds }),
102
- ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
103
- ...(input.TimeDelaySeconds != null && { timeDelaySeconds: input.TimeDelaySeconds }),
104
- ...(input.Whitelist != null && { whitelist: serializeAws_restJson1__listOf__string(input.Whitelist, context) }),
105
- });
106
- return new __HttpRequest({
107
- protocol,
108
- hostname,
109
- port,
110
- method: "POST",
111
- headers,
112
- path: resolvedPath,
113
- body,
84
+ }); };
85
+ export var serializeAws_restJson1CreateOriginEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
86
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
87
+ return __generator(this, function (_c) {
88
+ switch (_c.label) {
89
+ case 0: return [4, context.endpoint()];
90
+ case 1:
91
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
92
+ headers = {
93
+ "content-type": "application/json",
94
+ };
95
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/origin_endpoints";
96
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Authorization != null && {
97
+ authorization: serializeAws_restJson1Authorization(input.Authorization, context),
98
+ })), (input.ChannelId != null && { channelId: input.ChannelId })), (input.CmafPackage != null && {
99
+ cmafPackage: serializeAws_restJson1CmafPackageCreateOrUpdateParameters(input.CmafPackage, context),
100
+ })), (input.DashPackage != null && { dashPackage: serializeAws_restJson1DashPackage(input.DashPackage, context) })), (input.Description != null && { description: input.Description })), (input.HlsPackage != null && { hlsPackage: serializeAws_restJson1HlsPackage(input.HlsPackage, context) })), (input.Id != null && { id: input.Id })), (input.ManifestName != null && { manifestName: input.ManifestName })), (input.MssPackage != null && { mssPackage: serializeAws_restJson1MssPackage(input.MssPackage, context) })), (input.Origination != null && { origination: input.Origination })), (input.StartoverWindowSeconds != null && { startoverWindowSeconds: input.StartoverWindowSeconds })), (input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) })), (input.TimeDelaySeconds != null && { timeDelaySeconds: input.TimeDelaySeconds })), (input.Whitelist != null && { whitelist: serializeAws_restJson1__listOf__string(input.Whitelist, context) })));
101
+ return [2, new __HttpRequest({
102
+ protocol: protocol,
103
+ hostname: hostname,
104
+ port: port,
105
+ method: "POST",
106
+ headers: headers,
107
+ path: resolvedPath,
108
+ body: body,
109
+ })];
110
+ }
114
111
  });
115
- };
116
- export const serializeAws_restJson1DeleteChannelCommand = async (input, context) => {
117
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
- const headers = {};
119
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}";
120
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
121
- let body;
122
- return new __HttpRequest({
123
- protocol,
124
- hostname,
125
- port,
126
- method: "DELETE",
127
- headers,
128
- path: resolvedPath,
129
- body,
112
+ }); };
113
+ export var serializeAws_restJson1DeleteChannelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
114
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
115
+ return __generator(this, function (_c) {
116
+ switch (_c.label) {
117
+ case 0: return [4, context.endpoint()];
118
+ case 1:
119
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
120
+ headers = {};
121
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/channels/{Id}";
122
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
123
+ return [2, new __HttpRequest({
124
+ protocol: protocol,
125
+ hostname: hostname,
126
+ port: port,
127
+ method: "DELETE",
128
+ headers: headers,
129
+ path: resolvedPath,
130
+ body: body,
131
+ })];
132
+ }
130
133
  });
131
- };
132
- export const serializeAws_restJson1DeleteOriginEndpointCommand = async (input, context) => {
133
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
- const headers = {};
135
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints/{Id}";
136
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
137
- let body;
138
- return new __HttpRequest({
139
- protocol,
140
- hostname,
141
- port,
142
- method: "DELETE",
143
- headers,
144
- path: resolvedPath,
145
- body,
134
+ }); };
135
+ export var serializeAws_restJson1DeleteOriginEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
136
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
137
+ return __generator(this, function (_c) {
138
+ switch (_c.label) {
139
+ case 0: return [4, context.endpoint()];
140
+ case 1:
141
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
142
+ headers = {};
143
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/origin_endpoints/{Id}";
144
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
145
+ return [2, new __HttpRequest({
146
+ protocol: protocol,
147
+ hostname: hostname,
148
+ port: port,
149
+ method: "DELETE",
150
+ headers: headers,
151
+ path: resolvedPath,
152
+ body: body,
153
+ })];
154
+ }
146
155
  });
147
- };
148
- export const serializeAws_restJson1DescribeChannelCommand = async (input, context) => {
149
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
150
- const headers = {};
151
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}";
152
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
153
- let body;
154
- return new __HttpRequest({
155
- protocol,
156
- hostname,
157
- port,
158
- method: "GET",
159
- headers,
160
- path: resolvedPath,
161
- body,
156
+ }); };
157
+ export var serializeAws_restJson1DescribeChannelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
158
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
159
+ return __generator(this, function (_c) {
160
+ switch (_c.label) {
161
+ case 0: return [4, context.endpoint()];
162
+ case 1:
163
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
164
+ headers = {};
165
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/channels/{Id}";
166
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
167
+ return [2, new __HttpRequest({
168
+ protocol: protocol,
169
+ hostname: hostname,
170
+ port: port,
171
+ method: "GET",
172
+ headers: headers,
173
+ path: resolvedPath,
174
+ body: body,
175
+ })];
176
+ }
162
177
  });
163
- };
164
- export const serializeAws_restJson1DescribeHarvestJobCommand = async (input, context) => {
165
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
166
- const headers = {};
167
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/harvest_jobs/{Id}";
168
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
169
- let body;
170
- return new __HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "GET",
175
- headers,
176
- path: resolvedPath,
177
- body,
178
+ }); };
179
+ export var serializeAws_restJson1DescribeHarvestJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
180
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
181
+ return __generator(this, function (_c) {
182
+ switch (_c.label) {
183
+ case 0: return [4, context.endpoint()];
184
+ case 1:
185
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
186
+ headers = {};
187
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/harvest_jobs/{Id}";
188
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
189
+ return [2, new __HttpRequest({
190
+ protocol: protocol,
191
+ hostname: hostname,
192
+ port: port,
193
+ method: "GET",
194
+ headers: headers,
195
+ path: resolvedPath,
196
+ body: body,
197
+ })];
198
+ }
178
199
  });
179
- };
180
- export const serializeAws_restJson1DescribeOriginEndpointCommand = async (input, context) => {
181
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
182
- const headers = {};
183
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints/{Id}";
184
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
185
- let body;
186
- return new __HttpRequest({
187
- protocol,
188
- hostname,
189
- port,
190
- method: "GET",
191
- headers,
192
- path: resolvedPath,
193
- body,
200
+ }); };
201
+ export var serializeAws_restJson1DescribeOriginEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
202
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
203
+ return __generator(this, function (_c) {
204
+ switch (_c.label) {
205
+ case 0: return [4, context.endpoint()];
206
+ case 1:
207
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
208
+ headers = {};
209
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/origin_endpoints/{Id}";
210
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
211
+ return [2, new __HttpRequest({
212
+ protocol: protocol,
213
+ hostname: hostname,
214
+ port: port,
215
+ method: "GET",
216
+ headers: headers,
217
+ path: resolvedPath,
218
+ body: body,
219
+ })];
220
+ }
194
221
  });
195
- };
196
- export const serializeAws_restJson1ListChannelsCommand = async (input, context) => {
197
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
198
- const headers = {};
199
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
200
- const query = map({
201
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
202
- nextToken: [, input.NextToken],
203
- });
204
- let body;
205
- return new __HttpRequest({
206
- protocol,
207
- hostname,
208
- port,
209
- method: "GET",
210
- headers,
211
- path: resolvedPath,
212
- query,
213
- body,
222
+ }); };
223
+ export var serializeAws_restJson1ListChannelsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
224
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
225
+ return __generator(this, function (_c) {
226
+ switch (_c.label) {
227
+ case 0: return [4, context.endpoint()];
228
+ case 1:
229
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
230
+ headers = {};
231
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/channels";
232
+ query = map({
233
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
234
+ nextToken: [, input.NextToken],
235
+ });
236
+ return [2, new __HttpRequest({
237
+ protocol: protocol,
238
+ hostname: hostname,
239
+ port: port,
240
+ method: "GET",
241
+ headers: headers,
242
+ path: resolvedPath,
243
+ query: query,
244
+ body: body,
245
+ })];
246
+ }
214
247
  });
215
- };
216
- export const serializeAws_restJson1ListHarvestJobsCommand = async (input, context) => {
217
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
218
- const headers = {};
219
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/harvest_jobs";
220
- const query = map({
221
- includeChannelId: [, input.IncludeChannelId],
222
- includeStatus: [, input.IncludeStatus],
223
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
224
- nextToken: [, input.NextToken],
225
- });
226
- let body;
227
- return new __HttpRequest({
228
- protocol,
229
- hostname,
230
- port,
231
- method: "GET",
232
- headers,
233
- path: resolvedPath,
234
- query,
235
- body,
248
+ }); };
249
+ export var serializeAws_restJson1ListHarvestJobsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
250
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
251
+ return __generator(this, function (_c) {
252
+ switch (_c.label) {
253
+ case 0: return [4, context.endpoint()];
254
+ case 1:
255
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
256
+ headers = {};
257
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/harvest_jobs";
258
+ query = map({
259
+ includeChannelId: [, input.IncludeChannelId],
260
+ includeStatus: [, input.IncludeStatus],
261
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
262
+ nextToken: [, input.NextToken],
263
+ });
264
+ return [2, new __HttpRequest({
265
+ protocol: protocol,
266
+ hostname: hostname,
267
+ port: port,
268
+ method: "GET",
269
+ headers: headers,
270
+ path: resolvedPath,
271
+ query: query,
272
+ body: body,
273
+ })];
274
+ }
236
275
  });
237
- };
238
- export const serializeAws_restJson1ListOriginEndpointsCommand = async (input, context) => {
239
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
240
- const headers = {};
241
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints";
242
- const query = map({
243
- channelId: [, input.ChannelId],
244
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
245
- nextToken: [, input.NextToken],
246
- });
247
- let body;
248
- return new __HttpRequest({
249
- protocol,
250
- hostname,
251
- port,
252
- method: "GET",
253
- headers,
254
- path: resolvedPath,
255
- query,
256
- body,
276
+ }); };
277
+ export var serializeAws_restJson1ListOriginEndpointsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
278
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
279
+ return __generator(this, function (_c) {
280
+ switch (_c.label) {
281
+ case 0: return [4, context.endpoint()];
282
+ case 1:
283
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
284
+ headers = {};
285
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/origin_endpoints";
286
+ query = map({
287
+ channelId: [, input.ChannelId],
288
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
289
+ nextToken: [, input.NextToken],
290
+ });
291
+ return [2, new __HttpRequest({
292
+ protocol: protocol,
293
+ hostname: hostname,
294
+ port: port,
295
+ method: "GET",
296
+ headers: headers,
297
+ path: resolvedPath,
298
+ query: query,
299
+ body: body,
300
+ })];
301
+ }
257
302
  });
258
- };
259
- export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
260
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
261
- const headers = {};
262
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
263
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
264
- let body;
265
- return new __HttpRequest({
266
- protocol,
267
- hostname,
268
- port,
269
- method: "GET",
270
- headers,
271
- path: resolvedPath,
272
- body,
303
+ }); };
304
+ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
305
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
306
+ return __generator(this, function (_c) {
307
+ switch (_c.label) {
308
+ case 0: return [4, context.endpoint()];
309
+ case 1:
310
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
311
+ headers = {};
312
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
313
+ resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
314
+ return [2, new __HttpRequest({
315
+ protocol: protocol,
316
+ hostname: hostname,
317
+ port: port,
318
+ method: "GET",
319
+ headers: headers,
320
+ path: resolvedPath,
321
+ body: body,
322
+ })];
323
+ }
273
324
  });
274
- };
275
- export const serializeAws_restJson1RotateChannelCredentialsCommand = async (input, context) => {
276
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
277
- const headers = {};
278
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}/credentials";
279
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
280
- let body;
281
- return new __HttpRequest({
282
- protocol,
283
- hostname,
284
- port,
285
- method: "PUT",
286
- headers,
287
- path: resolvedPath,
288
- body,
325
+ }); };
326
+ export var serializeAws_restJson1RotateChannelCredentialsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
327
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
328
+ return __generator(this, function (_c) {
329
+ switch (_c.label) {
330
+ case 0: return [4, context.endpoint()];
331
+ case 1:
332
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
333
+ headers = {};
334
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/channels/{Id}/credentials";
335
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
336
+ return [2, new __HttpRequest({
337
+ protocol: protocol,
338
+ hostname: hostname,
339
+ port: port,
340
+ method: "PUT",
341
+ headers: headers,
342
+ path: resolvedPath,
343
+ body: body,
344
+ })];
345
+ }
289
346
  });
290
- };
291
- export const serializeAws_restJson1RotateIngestEndpointCredentialsCommand = async (input, context) => {
292
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
293
- const headers = {};
294
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
295
- "/channels/{Id}/ingest_endpoints/{IngestEndpointId}/credentials";
296
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
297
- resolvedPath = __resolvedPath(resolvedPath, input, "IngestEndpointId", () => input.IngestEndpointId, "{IngestEndpointId}", false);
298
- let body;
299
- return new __HttpRequest({
300
- protocol,
301
- hostname,
302
- port,
303
- method: "PUT",
304
- headers,
305
- path: resolvedPath,
306
- body,
347
+ }); };
348
+ export var serializeAws_restJson1RotateIngestEndpointCredentialsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
349
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
350
+ return __generator(this, function (_c) {
351
+ switch (_c.label) {
352
+ case 0: return [4, context.endpoint()];
353
+ case 1:
354
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
355
+ headers = {};
356
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
357
+ "/channels/{Id}/ingest_endpoints/{IngestEndpointId}/credentials";
358
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
359
+ resolvedPath = __resolvedPath(resolvedPath, input, "IngestEndpointId", function () { return input.IngestEndpointId; }, "{IngestEndpointId}", false);
360
+ return [2, new __HttpRequest({
361
+ protocol: protocol,
362
+ hostname: hostname,
363
+ port: port,
364
+ method: "PUT",
365
+ headers: headers,
366
+ path: resolvedPath,
367
+ body: body,
368
+ })];
369
+ }
307
370
  });
308
- };
309
- export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
310
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
311
- const headers = {
312
- "content-type": "application/json",
313
- };
314
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
315
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
316
- let body;
317
- body = JSON.stringify({
318
- ...(input.Tags != null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) }),
319
- });
320
- return new __HttpRequest({
321
- protocol,
322
- hostname,
323
- port,
324
- method: "POST",
325
- headers,
326
- path: resolvedPath,
327
- body,
371
+ }); };
372
+ export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
373
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
374
+ return __generator(this, function (_c) {
375
+ switch (_c.label) {
376
+ case 0: return [4, context.endpoint()];
377
+ case 1:
378
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
379
+ headers = {
380
+ "content-type": "application/json",
381
+ };
382
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
383
+ resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
384
+ body = JSON.stringify(__assign({}, (input.Tags != null && { tags: serializeAws_restJson1__mapOf__string(input.Tags, context) })));
385
+ return [2, new __HttpRequest({
386
+ protocol: protocol,
387
+ hostname: hostname,
388
+ port: port,
389
+ method: "POST",
390
+ headers: headers,
391
+ path: resolvedPath,
392
+ body: body,
393
+ })];
394
+ }
328
395
  });
329
- };
330
- export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
331
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
332
- const headers = {};
333
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
334
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
335
- const query = map({
336
- tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],
337
- });
338
- let body;
339
- return new __HttpRequest({
340
- protocol,
341
- hostname,
342
- port,
343
- method: "DELETE",
344
- headers,
345
- path: resolvedPath,
346
- query,
347
- body,
396
+ }); };
397
+ export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
398
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
399
+ return __generator(this, function (_c) {
400
+ switch (_c.label) {
401
+ case 0: return [4, context.endpoint()];
402
+ case 1:
403
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
404
+ headers = {};
405
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
406
+ resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
407
+ query = map({
408
+ tagKeys: [function () { return input.TagKeys !== void 0; }, function () { return (input.TagKeys || []).map(function (_entry) { return _entry; }); }],
409
+ });
410
+ return [2, new __HttpRequest({
411
+ protocol: protocol,
412
+ hostname: hostname,
413
+ port: port,
414
+ method: "DELETE",
415
+ headers: headers,
416
+ path: resolvedPath,
417
+ query: query,
418
+ body: body,
419
+ })];
420
+ }
348
421
  });
349
- };
350
- export const serializeAws_restJson1UpdateChannelCommand = async (input, context) => {
351
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
352
- const headers = {
353
- "content-type": "application/json",
354
- };
355
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}";
356
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
357
- let body;
358
- body = JSON.stringify({
359
- ...(input.Description != null && { description: input.Description }),
360
- });
361
- return new __HttpRequest({
362
- protocol,
363
- hostname,
364
- port,
365
- method: "PUT",
366
- headers,
367
- path: resolvedPath,
368
- body,
422
+ }); };
423
+ export var serializeAws_restJson1UpdateChannelCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
424
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
425
+ return __generator(this, function (_c) {
426
+ switch (_c.label) {
427
+ case 0: return [4, context.endpoint()];
428
+ case 1:
429
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
430
+ headers = {
431
+ "content-type": "application/json",
432
+ };
433
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/channels/{Id}";
434
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
435
+ body = JSON.stringify(__assign({}, (input.Description != null && { description: input.Description })));
436
+ return [2, new __HttpRequest({
437
+ protocol: protocol,
438
+ hostname: hostname,
439
+ port: port,
440
+ method: "PUT",
441
+ headers: headers,
442
+ path: resolvedPath,
443
+ body: body,
444
+ })];
445
+ }
369
446
  });
370
- };
371
- export const serializeAws_restJson1UpdateOriginEndpointCommand = async (input, context) => {
372
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
373
- const headers = {
374
- "content-type": "application/json",
375
- };
376
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints/{Id}";
377
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
378
- let body;
379
- body = JSON.stringify({
380
- ...(input.Authorization != null && {
381
- authorization: serializeAws_restJson1Authorization(input.Authorization, context),
382
- }),
383
- ...(input.CmafPackage != null && {
384
- cmafPackage: serializeAws_restJson1CmafPackageCreateOrUpdateParameters(input.CmafPackage, context),
385
- }),
386
- ...(input.DashPackage != null && { dashPackage: serializeAws_restJson1DashPackage(input.DashPackage, context) }),
387
- ...(input.Description != null && { description: input.Description }),
388
- ...(input.HlsPackage != null && { hlsPackage: serializeAws_restJson1HlsPackage(input.HlsPackage, context) }),
389
- ...(input.ManifestName != null && { manifestName: input.ManifestName }),
390
- ...(input.MssPackage != null && { mssPackage: serializeAws_restJson1MssPackage(input.MssPackage, context) }),
391
- ...(input.Origination != null && { origination: input.Origination }),
392
- ...(input.StartoverWindowSeconds != null && { startoverWindowSeconds: input.StartoverWindowSeconds }),
393
- ...(input.TimeDelaySeconds != null && { timeDelaySeconds: input.TimeDelaySeconds }),
394
- ...(input.Whitelist != null && { whitelist: serializeAws_restJson1__listOf__string(input.Whitelist, context) }),
395
- });
396
- return new __HttpRequest({
397
- protocol,
398
- hostname,
399
- port,
400
- method: "PUT",
401
- headers,
402
- path: resolvedPath,
403
- body,
447
+ }); };
448
+ export var serializeAws_restJson1UpdateOriginEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
449
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
450
+ return __generator(this, function (_c) {
451
+ switch (_c.label) {
452
+ case 0: return [4, context.endpoint()];
453
+ case 1:
454
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
455
+ headers = {
456
+ "content-type": "application/json",
457
+ };
458
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/origin_endpoints/{Id}";
459
+ resolvedPath = __resolvedPath(resolvedPath, input, "Id", function () { return input.Id; }, "{Id}", false);
460
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Authorization != null && {
461
+ authorization: serializeAws_restJson1Authorization(input.Authorization, context),
462
+ })), (input.CmafPackage != null && {
463
+ cmafPackage: serializeAws_restJson1CmafPackageCreateOrUpdateParameters(input.CmafPackage, context),
464
+ })), (input.DashPackage != null && { dashPackage: serializeAws_restJson1DashPackage(input.DashPackage, context) })), (input.Description != null && { description: input.Description })), (input.HlsPackage != null && { hlsPackage: serializeAws_restJson1HlsPackage(input.HlsPackage, context) })), (input.ManifestName != null && { manifestName: input.ManifestName })), (input.MssPackage != null && { mssPackage: serializeAws_restJson1MssPackage(input.MssPackage, context) })), (input.Origination != null && { origination: input.Origination })), (input.StartoverWindowSeconds != null && { startoverWindowSeconds: input.StartoverWindowSeconds })), (input.TimeDelaySeconds != null && { timeDelaySeconds: input.TimeDelaySeconds })), (input.Whitelist != null && { whitelist: serializeAws_restJson1__listOf__string(input.Whitelist, context) })));
465
+ return [2, new __HttpRequest({
466
+ protocol: protocol,
467
+ hostname: hostname,
468
+ port: port,
469
+ method: "PUT",
470
+ headers: headers,
471
+ path: resolvedPath,
472
+ body: body,
473
+ })];
474
+ }
404
475
  });
405
- };
406
- export const deserializeAws_restJson1ConfigureLogsCommand = async (output, context) => {
407
- if (output.statusCode !== 200 && output.statusCode >= 300) {
408
- return deserializeAws_restJson1ConfigureLogsCommandError(output, context);
409
- }
410
- const contents = map({
411
- $metadata: deserializeMetadata(output),
476
+ }); };
477
+ export var deserializeAws_restJson1ConfigureLogsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
478
+ var contents, data, _a, _b;
479
+ return __generator(this, function (_c) {
480
+ switch (_c.label) {
481
+ case 0:
482
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
483
+ return [2, deserializeAws_restJson1ConfigureLogsCommandError(output, context)];
484
+ }
485
+ contents = map({
486
+ $metadata: deserializeMetadata(output),
487
+ });
488
+ _a = __expectNonNull;
489
+ _b = __expectObject;
490
+ return [4, parseBody(output.body, context)];
491
+ case 1:
492
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
493
+ if (data.arn != null) {
494
+ contents.Arn = __expectString(data.arn);
495
+ }
496
+ if (data.description != null) {
497
+ contents.Description = __expectString(data.description);
498
+ }
499
+ if (data.egressAccessLogs != null) {
500
+ contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
501
+ }
502
+ if (data.hlsIngest != null) {
503
+ contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
504
+ }
505
+ if (data.id != null) {
506
+ contents.Id = __expectString(data.id);
507
+ }
508
+ if (data.ingressAccessLogs != null) {
509
+ contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
510
+ }
511
+ if (data.tags != null) {
512
+ contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
513
+ }
514
+ return [2, contents];
515
+ }
412
516
  });
413
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
414
- if (data.arn != null) {
415
- contents.Arn = __expectString(data.arn);
416
- }
417
- if (data.description != null) {
418
- contents.Description = __expectString(data.description);
419
- }
420
- if (data.egressAccessLogs != null) {
421
- contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
422
- }
423
- if (data.hlsIngest != null) {
424
- contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
425
- }
426
- if (data.id != null) {
427
- contents.Id = __expectString(data.id);
428
- }
429
- if (data.ingressAccessLogs != null) {
430
- contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
431
- }
432
- if (data.tags != null) {
433
- contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
434
- }
435
- return contents;
436
- };
437
- const deserializeAws_restJson1ConfigureLogsCommandError = async (output, context) => {
438
- const parsedOutput = {
439
- ...output,
440
- body: await parseErrorBody(output.body, context),
441
- };
442
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
443
- switch (errorCode) {
444
- case "ForbiddenException":
445
- case "com.amazonaws.mediapackage#ForbiddenException":
446
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
447
- case "InternalServerErrorException":
448
- case "com.amazonaws.mediapackage#InternalServerErrorException":
449
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
450
- case "NotFoundException":
451
- case "com.amazonaws.mediapackage#NotFoundException":
452
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
453
- case "ServiceUnavailableException":
454
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
455
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
456
- case "TooManyRequestsException":
457
- case "com.amazonaws.mediapackage#TooManyRequestsException":
458
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
459
- case "UnprocessableEntityException":
460
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
461
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
462
- default:
463
- const parsedBody = parsedOutput.body;
464
- throwDefaultError({
465
- output,
466
- parsedBody,
467
- exceptionCtor: __BaseException,
468
- errorCode,
469
- });
470
- }
471
- };
472
- export const deserializeAws_restJson1CreateChannelCommand = async (output, context) => {
473
- if (output.statusCode !== 200 && output.statusCode >= 300) {
474
- return deserializeAws_restJson1CreateChannelCommandError(output, context);
475
- }
476
- const contents = map({
477
- $metadata: deserializeMetadata(output),
517
+ }); };
518
+ var deserializeAws_restJson1ConfigureLogsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
519
+ var parsedOutput, _a, errorCode, _b, parsedBody;
520
+ var _c;
521
+ return __generator(this, function (_d) {
522
+ switch (_d.label) {
523
+ case 0:
524
+ _a = [__assign({}, output)];
525
+ _c = {};
526
+ return [4, parseErrorBody(output.body, context)];
527
+ case 1:
528
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
529
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
530
+ _b = errorCode;
531
+ switch (_b) {
532
+ case "ForbiddenException": return [3, 2];
533
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
534
+ case "InternalServerErrorException": return [3, 4];
535
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
536
+ case "NotFoundException": return [3, 6];
537
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
538
+ case "ServiceUnavailableException": return [3, 8];
539
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
540
+ case "TooManyRequestsException": return [3, 10];
541
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
542
+ case "UnprocessableEntityException": return [3, 12];
543
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
544
+ }
545
+ return [3, 14];
546
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
547
+ case 3: throw _d.sent();
548
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
549
+ case 5: throw _d.sent();
550
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
551
+ case 7: throw _d.sent();
552
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
553
+ case 9: throw _d.sent();
554
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
555
+ case 11: throw _d.sent();
556
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
557
+ case 13: throw _d.sent();
558
+ case 14:
559
+ parsedBody = parsedOutput.body;
560
+ throwDefaultError({
561
+ output: output,
562
+ parsedBody: parsedBody,
563
+ exceptionCtor: __BaseException,
564
+ errorCode: errorCode,
565
+ });
566
+ _d.label = 15;
567
+ case 15: return [2];
568
+ }
478
569
  });
479
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
480
- if (data.arn != null) {
481
- contents.Arn = __expectString(data.arn);
482
- }
483
- if (data.description != null) {
484
- contents.Description = __expectString(data.description);
485
- }
486
- if (data.egressAccessLogs != null) {
487
- contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
488
- }
489
- if (data.hlsIngest != null) {
490
- contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
491
- }
492
- if (data.id != null) {
493
- contents.Id = __expectString(data.id);
494
- }
495
- if (data.ingressAccessLogs != null) {
496
- contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
497
- }
498
- if (data.tags != null) {
499
- contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
500
- }
501
- return contents;
502
- };
503
- const deserializeAws_restJson1CreateChannelCommandError = async (output, context) => {
504
- const parsedOutput = {
505
- ...output,
506
- body: await parseErrorBody(output.body, context),
507
- };
508
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
509
- switch (errorCode) {
510
- case "ForbiddenException":
511
- case "com.amazonaws.mediapackage#ForbiddenException":
512
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
513
- case "InternalServerErrorException":
514
- case "com.amazonaws.mediapackage#InternalServerErrorException":
515
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
516
- case "NotFoundException":
517
- case "com.amazonaws.mediapackage#NotFoundException":
518
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
519
- case "ServiceUnavailableException":
520
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
521
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
522
- case "TooManyRequestsException":
523
- case "com.amazonaws.mediapackage#TooManyRequestsException":
524
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
525
- case "UnprocessableEntityException":
526
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
527
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
528
- default:
529
- const parsedBody = parsedOutput.body;
530
- throwDefaultError({
531
- output,
532
- parsedBody,
533
- exceptionCtor: __BaseException,
534
- errorCode,
535
- });
536
- }
537
- };
538
- export const deserializeAws_restJson1CreateHarvestJobCommand = async (output, context) => {
539
- if (output.statusCode !== 200 && output.statusCode >= 300) {
540
- return deserializeAws_restJson1CreateHarvestJobCommandError(output, context);
541
- }
542
- const contents = map({
543
- $metadata: deserializeMetadata(output),
570
+ }); };
571
+ export var deserializeAws_restJson1CreateChannelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
572
+ var contents, data, _a, _b;
573
+ return __generator(this, function (_c) {
574
+ switch (_c.label) {
575
+ case 0:
576
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
577
+ return [2, deserializeAws_restJson1CreateChannelCommandError(output, context)];
578
+ }
579
+ contents = map({
580
+ $metadata: deserializeMetadata(output),
581
+ });
582
+ _a = __expectNonNull;
583
+ _b = __expectObject;
584
+ return [4, parseBody(output.body, context)];
585
+ case 1:
586
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
587
+ if (data.arn != null) {
588
+ contents.Arn = __expectString(data.arn);
589
+ }
590
+ if (data.description != null) {
591
+ contents.Description = __expectString(data.description);
592
+ }
593
+ if (data.egressAccessLogs != null) {
594
+ contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
595
+ }
596
+ if (data.hlsIngest != null) {
597
+ contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
598
+ }
599
+ if (data.id != null) {
600
+ contents.Id = __expectString(data.id);
601
+ }
602
+ if (data.ingressAccessLogs != null) {
603
+ contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
604
+ }
605
+ if (data.tags != null) {
606
+ contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
607
+ }
608
+ return [2, contents];
609
+ }
544
610
  });
545
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
546
- if (data.arn != null) {
547
- contents.Arn = __expectString(data.arn);
548
- }
549
- if (data.channelId != null) {
550
- contents.ChannelId = __expectString(data.channelId);
551
- }
552
- if (data.createdAt != null) {
553
- contents.CreatedAt = __expectString(data.createdAt);
554
- }
555
- if (data.endTime != null) {
556
- contents.EndTime = __expectString(data.endTime);
557
- }
558
- if (data.id != null) {
559
- contents.Id = __expectString(data.id);
560
- }
561
- if (data.originEndpointId != null) {
562
- contents.OriginEndpointId = __expectString(data.originEndpointId);
563
- }
564
- if (data.s3Destination != null) {
565
- contents.S3Destination = deserializeAws_restJson1S3Destination(data.s3Destination, context);
566
- }
567
- if (data.startTime != null) {
568
- contents.StartTime = __expectString(data.startTime);
569
- }
570
- if (data.status != null) {
571
- contents.Status = __expectString(data.status);
572
- }
573
- return contents;
574
- };
575
- const deserializeAws_restJson1CreateHarvestJobCommandError = async (output, context) => {
576
- const parsedOutput = {
577
- ...output,
578
- body: await parseErrorBody(output.body, context),
579
- };
580
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
581
- switch (errorCode) {
582
- case "ForbiddenException":
583
- case "com.amazonaws.mediapackage#ForbiddenException":
584
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
585
- case "InternalServerErrorException":
586
- case "com.amazonaws.mediapackage#InternalServerErrorException":
587
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
588
- case "NotFoundException":
589
- case "com.amazonaws.mediapackage#NotFoundException":
590
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
591
- case "ServiceUnavailableException":
592
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
593
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
594
- case "TooManyRequestsException":
595
- case "com.amazonaws.mediapackage#TooManyRequestsException":
596
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
597
- case "UnprocessableEntityException":
598
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
599
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
600
- default:
601
- const parsedBody = parsedOutput.body;
602
- throwDefaultError({
603
- output,
604
- parsedBody,
605
- exceptionCtor: __BaseException,
606
- errorCode,
607
- });
608
- }
609
- };
610
- export const deserializeAws_restJson1CreateOriginEndpointCommand = async (output, context) => {
611
- if (output.statusCode !== 200 && output.statusCode >= 300) {
612
- return deserializeAws_restJson1CreateOriginEndpointCommandError(output, context);
613
- }
614
- const contents = map({
615
- $metadata: deserializeMetadata(output),
611
+ }); };
612
+ var deserializeAws_restJson1CreateChannelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
613
+ var parsedOutput, _a, errorCode, _b, parsedBody;
614
+ var _c;
615
+ return __generator(this, function (_d) {
616
+ switch (_d.label) {
617
+ case 0:
618
+ _a = [__assign({}, output)];
619
+ _c = {};
620
+ return [4, parseErrorBody(output.body, context)];
621
+ case 1:
622
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
623
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
624
+ _b = errorCode;
625
+ switch (_b) {
626
+ case "ForbiddenException": return [3, 2];
627
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
628
+ case "InternalServerErrorException": return [3, 4];
629
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
630
+ case "NotFoundException": return [3, 6];
631
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
632
+ case "ServiceUnavailableException": return [3, 8];
633
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
634
+ case "TooManyRequestsException": return [3, 10];
635
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
636
+ case "UnprocessableEntityException": return [3, 12];
637
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
638
+ }
639
+ return [3, 14];
640
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
641
+ case 3: throw _d.sent();
642
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
643
+ case 5: throw _d.sent();
644
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
645
+ case 7: throw _d.sent();
646
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
647
+ case 9: throw _d.sent();
648
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
649
+ case 11: throw _d.sent();
650
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
651
+ case 13: throw _d.sent();
652
+ case 14:
653
+ parsedBody = parsedOutput.body;
654
+ throwDefaultError({
655
+ output: output,
656
+ parsedBody: parsedBody,
657
+ exceptionCtor: __BaseException,
658
+ errorCode: errorCode,
659
+ });
660
+ _d.label = 15;
661
+ case 15: return [2];
662
+ }
616
663
  });
617
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
618
- if (data.arn != null) {
619
- contents.Arn = __expectString(data.arn);
620
- }
621
- if (data.authorization != null) {
622
- contents.Authorization = deserializeAws_restJson1Authorization(data.authorization, context);
623
- }
624
- if (data.channelId != null) {
625
- contents.ChannelId = __expectString(data.channelId);
626
- }
627
- if (data.cmafPackage != null) {
628
- contents.CmafPackage = deserializeAws_restJson1CmafPackage(data.cmafPackage, context);
629
- }
630
- if (data.dashPackage != null) {
631
- contents.DashPackage = deserializeAws_restJson1DashPackage(data.dashPackage, context);
632
- }
633
- if (data.description != null) {
634
- contents.Description = __expectString(data.description);
635
- }
636
- if (data.hlsPackage != null) {
637
- contents.HlsPackage = deserializeAws_restJson1HlsPackage(data.hlsPackage, context);
638
- }
639
- if (data.id != null) {
640
- contents.Id = __expectString(data.id);
641
- }
642
- if (data.manifestName != null) {
643
- contents.ManifestName = __expectString(data.manifestName);
644
- }
645
- if (data.mssPackage != null) {
646
- contents.MssPackage = deserializeAws_restJson1MssPackage(data.mssPackage, context);
647
- }
648
- if (data.origination != null) {
649
- contents.Origination = __expectString(data.origination);
650
- }
651
- if (data.startoverWindowSeconds != null) {
652
- contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds);
653
- }
654
- if (data.tags != null) {
655
- contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
656
- }
657
- if (data.timeDelaySeconds != null) {
658
- contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds);
659
- }
660
- if (data.url != null) {
661
- contents.Url = __expectString(data.url);
662
- }
663
- if (data.whitelist != null) {
664
- contents.Whitelist = deserializeAws_restJson1__listOf__string(data.whitelist, context);
665
- }
666
- return contents;
667
- };
668
- const deserializeAws_restJson1CreateOriginEndpointCommandError = async (output, context) => {
669
- const parsedOutput = {
670
- ...output,
671
- body: await parseErrorBody(output.body, context),
672
- };
673
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
674
- switch (errorCode) {
675
- case "ForbiddenException":
676
- case "com.amazonaws.mediapackage#ForbiddenException":
677
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
678
- case "InternalServerErrorException":
679
- case "com.amazonaws.mediapackage#InternalServerErrorException":
680
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
681
- case "NotFoundException":
682
- case "com.amazonaws.mediapackage#NotFoundException":
683
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
684
- case "ServiceUnavailableException":
685
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
686
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
687
- case "TooManyRequestsException":
688
- case "com.amazonaws.mediapackage#TooManyRequestsException":
689
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
690
- case "UnprocessableEntityException":
691
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
692
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
693
- default:
694
- const parsedBody = parsedOutput.body;
695
- throwDefaultError({
696
- output,
697
- parsedBody,
698
- exceptionCtor: __BaseException,
699
- errorCode,
700
- });
701
- }
702
- };
703
- export const deserializeAws_restJson1DeleteChannelCommand = async (output, context) => {
704
- if (output.statusCode !== 202 && output.statusCode >= 300) {
705
- return deserializeAws_restJson1DeleteChannelCommandError(output, context);
706
- }
707
- const contents = map({
708
- $metadata: deserializeMetadata(output),
664
+ }); };
665
+ export var deserializeAws_restJson1CreateHarvestJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
666
+ var contents, data, _a, _b;
667
+ return __generator(this, function (_c) {
668
+ switch (_c.label) {
669
+ case 0:
670
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
671
+ return [2, deserializeAws_restJson1CreateHarvestJobCommandError(output, context)];
672
+ }
673
+ contents = map({
674
+ $metadata: deserializeMetadata(output),
675
+ });
676
+ _a = __expectNonNull;
677
+ _b = __expectObject;
678
+ return [4, parseBody(output.body, context)];
679
+ case 1:
680
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
681
+ if (data.arn != null) {
682
+ contents.Arn = __expectString(data.arn);
683
+ }
684
+ if (data.channelId != null) {
685
+ contents.ChannelId = __expectString(data.channelId);
686
+ }
687
+ if (data.createdAt != null) {
688
+ contents.CreatedAt = __expectString(data.createdAt);
689
+ }
690
+ if (data.endTime != null) {
691
+ contents.EndTime = __expectString(data.endTime);
692
+ }
693
+ if (data.id != null) {
694
+ contents.Id = __expectString(data.id);
695
+ }
696
+ if (data.originEndpointId != null) {
697
+ contents.OriginEndpointId = __expectString(data.originEndpointId);
698
+ }
699
+ if (data.s3Destination != null) {
700
+ contents.S3Destination = deserializeAws_restJson1S3Destination(data.s3Destination, context);
701
+ }
702
+ if (data.startTime != null) {
703
+ contents.StartTime = __expectString(data.startTime);
704
+ }
705
+ if (data.status != null) {
706
+ contents.Status = __expectString(data.status);
707
+ }
708
+ return [2, contents];
709
+ }
709
710
  });
710
- await collectBody(output.body, context);
711
- return contents;
712
- };
713
- const deserializeAws_restJson1DeleteChannelCommandError = async (output, context) => {
714
- const parsedOutput = {
715
- ...output,
716
- body: await parseErrorBody(output.body, context),
717
- };
718
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
719
- switch (errorCode) {
720
- case "ForbiddenException":
721
- case "com.amazonaws.mediapackage#ForbiddenException":
722
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
723
- case "InternalServerErrorException":
724
- case "com.amazonaws.mediapackage#InternalServerErrorException":
725
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
726
- case "NotFoundException":
727
- case "com.amazonaws.mediapackage#NotFoundException":
728
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
729
- case "ServiceUnavailableException":
730
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
731
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
732
- case "TooManyRequestsException":
733
- case "com.amazonaws.mediapackage#TooManyRequestsException":
734
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
735
- case "UnprocessableEntityException":
736
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
737
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
738
- default:
739
- const parsedBody = parsedOutput.body;
740
- throwDefaultError({
741
- output,
742
- parsedBody,
743
- exceptionCtor: __BaseException,
744
- errorCode,
745
- });
746
- }
747
- };
748
- export const deserializeAws_restJson1DeleteOriginEndpointCommand = async (output, context) => {
749
- if (output.statusCode !== 202 && output.statusCode >= 300) {
750
- return deserializeAws_restJson1DeleteOriginEndpointCommandError(output, context);
751
- }
752
- const contents = map({
753
- $metadata: deserializeMetadata(output),
711
+ }); };
712
+ var deserializeAws_restJson1CreateHarvestJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
713
+ var parsedOutput, _a, errorCode, _b, parsedBody;
714
+ var _c;
715
+ return __generator(this, function (_d) {
716
+ switch (_d.label) {
717
+ case 0:
718
+ _a = [__assign({}, output)];
719
+ _c = {};
720
+ return [4, parseErrorBody(output.body, context)];
721
+ case 1:
722
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
723
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
724
+ _b = errorCode;
725
+ switch (_b) {
726
+ case "ForbiddenException": return [3, 2];
727
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
728
+ case "InternalServerErrorException": return [3, 4];
729
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
730
+ case "NotFoundException": return [3, 6];
731
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
732
+ case "ServiceUnavailableException": return [3, 8];
733
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
734
+ case "TooManyRequestsException": return [3, 10];
735
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
736
+ case "UnprocessableEntityException": return [3, 12];
737
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
738
+ }
739
+ return [3, 14];
740
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
741
+ case 3: throw _d.sent();
742
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
743
+ case 5: throw _d.sent();
744
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
745
+ case 7: throw _d.sent();
746
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
747
+ case 9: throw _d.sent();
748
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
749
+ case 11: throw _d.sent();
750
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
751
+ case 13: throw _d.sent();
752
+ case 14:
753
+ parsedBody = parsedOutput.body;
754
+ throwDefaultError({
755
+ output: output,
756
+ parsedBody: parsedBody,
757
+ exceptionCtor: __BaseException,
758
+ errorCode: errorCode,
759
+ });
760
+ _d.label = 15;
761
+ case 15: return [2];
762
+ }
754
763
  });
755
- await collectBody(output.body, context);
756
- return contents;
757
- };
758
- const deserializeAws_restJson1DeleteOriginEndpointCommandError = 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 "ForbiddenException":
766
- case "com.amazonaws.mediapackage#ForbiddenException":
767
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
768
- case "InternalServerErrorException":
769
- case "com.amazonaws.mediapackage#InternalServerErrorException":
770
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
771
- case "NotFoundException":
772
- case "com.amazonaws.mediapackage#NotFoundException":
773
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
774
- case "ServiceUnavailableException":
775
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
776
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
777
- case "TooManyRequestsException":
778
- case "com.amazonaws.mediapackage#TooManyRequestsException":
779
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
780
- case "UnprocessableEntityException":
781
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
782
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
783
- default:
784
- const parsedBody = parsedOutput.body;
785
- throwDefaultError({
786
- output,
787
- parsedBody,
788
- exceptionCtor: __BaseException,
789
- errorCode,
790
- });
791
- }
792
- };
793
- export const deserializeAws_restJson1DescribeChannelCommand = async (output, context) => {
794
- if (output.statusCode !== 200 && output.statusCode >= 300) {
795
- return deserializeAws_restJson1DescribeChannelCommandError(output, context);
796
- }
797
- const contents = map({
798
- $metadata: deserializeMetadata(output),
764
+ }); };
765
+ export var deserializeAws_restJson1CreateOriginEndpointCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
766
+ var contents, data, _a, _b;
767
+ return __generator(this, function (_c) {
768
+ switch (_c.label) {
769
+ case 0:
770
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
771
+ return [2, deserializeAws_restJson1CreateOriginEndpointCommandError(output, context)];
772
+ }
773
+ contents = map({
774
+ $metadata: deserializeMetadata(output),
775
+ });
776
+ _a = __expectNonNull;
777
+ _b = __expectObject;
778
+ return [4, parseBody(output.body, context)];
779
+ case 1:
780
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
781
+ if (data.arn != null) {
782
+ contents.Arn = __expectString(data.arn);
783
+ }
784
+ if (data.authorization != null) {
785
+ contents.Authorization = deserializeAws_restJson1Authorization(data.authorization, context);
786
+ }
787
+ if (data.channelId != null) {
788
+ contents.ChannelId = __expectString(data.channelId);
789
+ }
790
+ if (data.cmafPackage != null) {
791
+ contents.CmafPackage = deserializeAws_restJson1CmafPackage(data.cmafPackage, context);
792
+ }
793
+ if (data.dashPackage != null) {
794
+ contents.DashPackage = deserializeAws_restJson1DashPackage(data.dashPackage, context);
795
+ }
796
+ if (data.description != null) {
797
+ contents.Description = __expectString(data.description);
798
+ }
799
+ if (data.hlsPackage != null) {
800
+ contents.HlsPackage = deserializeAws_restJson1HlsPackage(data.hlsPackage, context);
801
+ }
802
+ if (data.id != null) {
803
+ contents.Id = __expectString(data.id);
804
+ }
805
+ if (data.manifestName != null) {
806
+ contents.ManifestName = __expectString(data.manifestName);
807
+ }
808
+ if (data.mssPackage != null) {
809
+ contents.MssPackage = deserializeAws_restJson1MssPackage(data.mssPackage, context);
810
+ }
811
+ if (data.origination != null) {
812
+ contents.Origination = __expectString(data.origination);
813
+ }
814
+ if (data.startoverWindowSeconds != null) {
815
+ contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds);
816
+ }
817
+ if (data.tags != null) {
818
+ contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
819
+ }
820
+ if (data.timeDelaySeconds != null) {
821
+ contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds);
822
+ }
823
+ if (data.url != null) {
824
+ contents.Url = __expectString(data.url);
825
+ }
826
+ if (data.whitelist != null) {
827
+ contents.Whitelist = deserializeAws_restJson1__listOf__string(data.whitelist, context);
828
+ }
829
+ return [2, contents];
830
+ }
799
831
  });
800
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
801
- if (data.arn != null) {
802
- contents.Arn = __expectString(data.arn);
803
- }
804
- if (data.description != null) {
805
- contents.Description = __expectString(data.description);
806
- }
807
- if (data.egressAccessLogs != null) {
808
- contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
809
- }
810
- if (data.hlsIngest != null) {
811
- contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
812
- }
813
- if (data.id != null) {
814
- contents.Id = __expectString(data.id);
815
- }
816
- if (data.ingressAccessLogs != null) {
817
- contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
818
- }
819
- if (data.tags != null) {
820
- contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
821
- }
822
- return contents;
823
- };
824
- const deserializeAws_restJson1DescribeChannelCommandError = async (output, context) => {
825
- const parsedOutput = {
826
- ...output,
827
- body: await parseErrorBody(output.body, context),
828
- };
829
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
830
- switch (errorCode) {
831
- case "ForbiddenException":
832
- case "com.amazonaws.mediapackage#ForbiddenException":
833
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
834
- case "InternalServerErrorException":
835
- case "com.amazonaws.mediapackage#InternalServerErrorException":
836
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
837
- case "NotFoundException":
838
- case "com.amazonaws.mediapackage#NotFoundException":
839
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
840
- case "ServiceUnavailableException":
841
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
842
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
843
- case "TooManyRequestsException":
844
- case "com.amazonaws.mediapackage#TooManyRequestsException":
845
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
846
- case "UnprocessableEntityException":
847
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
848
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
849
- default:
850
- const parsedBody = parsedOutput.body;
851
- throwDefaultError({
852
- output,
853
- parsedBody,
854
- exceptionCtor: __BaseException,
855
- errorCode,
856
- });
857
- }
858
- };
859
- export const deserializeAws_restJson1DescribeHarvestJobCommand = async (output, context) => {
860
- if (output.statusCode !== 200 && output.statusCode >= 300) {
861
- return deserializeAws_restJson1DescribeHarvestJobCommandError(output, context);
862
- }
863
- const contents = map({
864
- $metadata: deserializeMetadata(output),
832
+ }); };
833
+ var deserializeAws_restJson1CreateOriginEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
834
+ var parsedOutput, _a, errorCode, _b, parsedBody;
835
+ var _c;
836
+ return __generator(this, function (_d) {
837
+ switch (_d.label) {
838
+ case 0:
839
+ _a = [__assign({}, output)];
840
+ _c = {};
841
+ return [4, parseErrorBody(output.body, context)];
842
+ case 1:
843
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
844
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
845
+ _b = errorCode;
846
+ switch (_b) {
847
+ case "ForbiddenException": return [3, 2];
848
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
849
+ case "InternalServerErrorException": return [3, 4];
850
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
851
+ case "NotFoundException": return [3, 6];
852
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
853
+ case "ServiceUnavailableException": return [3, 8];
854
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
855
+ case "TooManyRequestsException": return [3, 10];
856
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
857
+ case "UnprocessableEntityException": return [3, 12];
858
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
859
+ }
860
+ return [3, 14];
861
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
862
+ case 3: throw _d.sent();
863
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
864
+ case 5: throw _d.sent();
865
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
866
+ case 7: throw _d.sent();
867
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
868
+ case 9: throw _d.sent();
869
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
870
+ case 11: throw _d.sent();
871
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
872
+ case 13: throw _d.sent();
873
+ case 14:
874
+ parsedBody = parsedOutput.body;
875
+ throwDefaultError({
876
+ output: output,
877
+ parsedBody: parsedBody,
878
+ exceptionCtor: __BaseException,
879
+ errorCode: errorCode,
880
+ });
881
+ _d.label = 15;
882
+ case 15: return [2];
883
+ }
865
884
  });
866
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
867
- if (data.arn != null) {
868
- contents.Arn = __expectString(data.arn);
869
- }
870
- if (data.channelId != null) {
871
- contents.ChannelId = __expectString(data.channelId);
872
- }
873
- if (data.createdAt != null) {
874
- contents.CreatedAt = __expectString(data.createdAt);
875
- }
876
- if (data.endTime != null) {
877
- contents.EndTime = __expectString(data.endTime);
878
- }
879
- if (data.id != null) {
880
- contents.Id = __expectString(data.id);
881
- }
882
- if (data.originEndpointId != null) {
883
- contents.OriginEndpointId = __expectString(data.originEndpointId);
884
- }
885
- if (data.s3Destination != null) {
886
- contents.S3Destination = deserializeAws_restJson1S3Destination(data.s3Destination, context);
887
- }
888
- if (data.startTime != null) {
889
- contents.StartTime = __expectString(data.startTime);
890
- }
891
- if (data.status != null) {
892
- contents.Status = __expectString(data.status);
893
- }
894
- return contents;
895
- };
896
- const deserializeAws_restJson1DescribeHarvestJobCommandError = async (output, context) => {
897
- const parsedOutput = {
898
- ...output,
899
- body: await parseErrorBody(output.body, context),
900
- };
901
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
902
- switch (errorCode) {
903
- case "ForbiddenException":
904
- case "com.amazonaws.mediapackage#ForbiddenException":
905
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
906
- case "InternalServerErrorException":
907
- case "com.amazonaws.mediapackage#InternalServerErrorException":
908
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
909
- case "NotFoundException":
910
- case "com.amazonaws.mediapackage#NotFoundException":
911
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
912
- case "ServiceUnavailableException":
913
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
914
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
915
- case "TooManyRequestsException":
916
- case "com.amazonaws.mediapackage#TooManyRequestsException":
917
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
918
- case "UnprocessableEntityException":
919
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
920
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
921
- default:
922
- const parsedBody = parsedOutput.body;
923
- throwDefaultError({
924
- output,
925
- parsedBody,
926
- exceptionCtor: __BaseException,
927
- errorCode,
928
- });
929
- }
930
- };
931
- export const deserializeAws_restJson1DescribeOriginEndpointCommand = async (output, context) => {
932
- if (output.statusCode !== 200 && output.statusCode >= 300) {
933
- return deserializeAws_restJson1DescribeOriginEndpointCommandError(output, context);
934
- }
935
- const contents = map({
936
- $metadata: deserializeMetadata(output),
885
+ }); };
886
+ export var deserializeAws_restJson1DeleteChannelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
887
+ var contents;
888
+ return __generator(this, function (_a) {
889
+ switch (_a.label) {
890
+ case 0:
891
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
892
+ return [2, deserializeAws_restJson1DeleteChannelCommandError(output, context)];
893
+ }
894
+ contents = map({
895
+ $metadata: deserializeMetadata(output),
896
+ });
897
+ return [4, collectBody(output.body, context)];
898
+ case 1:
899
+ _a.sent();
900
+ return [2, contents];
901
+ }
937
902
  });
938
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
939
- if (data.arn != null) {
940
- contents.Arn = __expectString(data.arn);
941
- }
942
- if (data.authorization != null) {
943
- contents.Authorization = deserializeAws_restJson1Authorization(data.authorization, context);
944
- }
945
- if (data.channelId != null) {
946
- contents.ChannelId = __expectString(data.channelId);
947
- }
948
- if (data.cmafPackage != null) {
949
- contents.CmafPackage = deserializeAws_restJson1CmafPackage(data.cmafPackage, context);
950
- }
951
- if (data.dashPackage != null) {
952
- contents.DashPackage = deserializeAws_restJson1DashPackage(data.dashPackage, context);
953
- }
954
- if (data.description != null) {
955
- contents.Description = __expectString(data.description);
956
- }
957
- if (data.hlsPackage != null) {
958
- contents.HlsPackage = deserializeAws_restJson1HlsPackage(data.hlsPackage, context);
959
- }
960
- if (data.id != null) {
961
- contents.Id = __expectString(data.id);
962
- }
963
- if (data.manifestName != null) {
964
- contents.ManifestName = __expectString(data.manifestName);
965
- }
966
- if (data.mssPackage != null) {
967
- contents.MssPackage = deserializeAws_restJson1MssPackage(data.mssPackage, context);
968
- }
969
- if (data.origination != null) {
970
- contents.Origination = __expectString(data.origination);
971
- }
972
- if (data.startoverWindowSeconds != null) {
973
- contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds);
974
- }
975
- if (data.tags != null) {
976
- contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
977
- }
978
- if (data.timeDelaySeconds != null) {
979
- contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds);
980
- }
981
- if (data.url != null) {
982
- contents.Url = __expectString(data.url);
983
- }
984
- if (data.whitelist != null) {
985
- contents.Whitelist = deserializeAws_restJson1__listOf__string(data.whitelist, context);
986
- }
987
- return contents;
988
- };
989
- const deserializeAws_restJson1DescribeOriginEndpointCommandError = async (output, context) => {
990
- const parsedOutput = {
991
- ...output,
992
- body: await parseErrorBody(output.body, context),
993
- };
994
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
995
- switch (errorCode) {
996
- case "ForbiddenException":
997
- case "com.amazonaws.mediapackage#ForbiddenException":
998
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
999
- case "InternalServerErrorException":
1000
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1001
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1002
- case "NotFoundException":
1003
- case "com.amazonaws.mediapackage#NotFoundException":
1004
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1005
- case "ServiceUnavailableException":
1006
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1007
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1008
- case "TooManyRequestsException":
1009
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1010
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1011
- case "UnprocessableEntityException":
1012
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1013
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1014
- default:
1015
- const parsedBody = parsedOutput.body;
1016
- throwDefaultError({
1017
- output,
1018
- parsedBody,
1019
- exceptionCtor: __BaseException,
1020
- errorCode,
1021
- });
1022
- }
1023
- };
1024
- export const deserializeAws_restJson1ListChannelsCommand = async (output, context) => {
1025
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1026
- return deserializeAws_restJson1ListChannelsCommandError(output, context);
1027
- }
1028
- const contents = map({
1029
- $metadata: deserializeMetadata(output),
903
+ }); };
904
+ var deserializeAws_restJson1DeleteChannelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
905
+ var parsedOutput, _a, errorCode, _b, parsedBody;
906
+ var _c;
907
+ return __generator(this, function (_d) {
908
+ switch (_d.label) {
909
+ case 0:
910
+ _a = [__assign({}, output)];
911
+ _c = {};
912
+ return [4, parseErrorBody(output.body, context)];
913
+ case 1:
914
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
915
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
916
+ _b = errorCode;
917
+ switch (_b) {
918
+ case "ForbiddenException": return [3, 2];
919
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
920
+ case "InternalServerErrorException": return [3, 4];
921
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
922
+ case "NotFoundException": return [3, 6];
923
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
924
+ case "ServiceUnavailableException": return [3, 8];
925
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
926
+ case "TooManyRequestsException": return [3, 10];
927
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
928
+ case "UnprocessableEntityException": return [3, 12];
929
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
930
+ }
931
+ return [3, 14];
932
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
933
+ case 3: throw _d.sent();
934
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
935
+ case 5: throw _d.sent();
936
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
937
+ case 7: throw _d.sent();
938
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
939
+ case 9: throw _d.sent();
940
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
941
+ case 11: throw _d.sent();
942
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
943
+ case 13: throw _d.sent();
944
+ case 14:
945
+ parsedBody = parsedOutput.body;
946
+ throwDefaultError({
947
+ output: output,
948
+ parsedBody: parsedBody,
949
+ exceptionCtor: __BaseException,
950
+ errorCode: errorCode,
951
+ });
952
+ _d.label = 15;
953
+ case 15: return [2];
954
+ }
1030
955
  });
1031
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1032
- if (data.channels != null) {
1033
- contents.Channels = deserializeAws_restJson1__listOfChannel(data.channels, context);
1034
- }
1035
- if (data.nextToken != null) {
1036
- contents.NextToken = __expectString(data.nextToken);
1037
- }
1038
- return contents;
1039
- };
1040
- const deserializeAws_restJson1ListChannelsCommandError = async (output, context) => {
1041
- const parsedOutput = {
1042
- ...output,
1043
- body: await parseErrorBody(output.body, context),
1044
- };
1045
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1046
- switch (errorCode) {
1047
- case "ForbiddenException":
1048
- case "com.amazonaws.mediapackage#ForbiddenException":
1049
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1050
- case "InternalServerErrorException":
1051
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1052
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1053
- case "NotFoundException":
1054
- case "com.amazonaws.mediapackage#NotFoundException":
1055
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1056
- case "ServiceUnavailableException":
1057
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1058
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1059
- case "TooManyRequestsException":
1060
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1061
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1062
- case "UnprocessableEntityException":
1063
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1064
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1065
- default:
1066
- const parsedBody = parsedOutput.body;
1067
- throwDefaultError({
1068
- output,
1069
- parsedBody,
1070
- exceptionCtor: __BaseException,
1071
- errorCode,
1072
- });
1073
- }
1074
- };
1075
- export const deserializeAws_restJson1ListHarvestJobsCommand = async (output, context) => {
1076
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1077
- return deserializeAws_restJson1ListHarvestJobsCommandError(output, context);
1078
- }
1079
- const contents = map({
1080
- $metadata: deserializeMetadata(output),
956
+ }); };
957
+ export var deserializeAws_restJson1DeleteOriginEndpointCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
958
+ var contents;
959
+ return __generator(this, function (_a) {
960
+ switch (_a.label) {
961
+ case 0:
962
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
963
+ return [2, deserializeAws_restJson1DeleteOriginEndpointCommandError(output, context)];
964
+ }
965
+ contents = map({
966
+ $metadata: deserializeMetadata(output),
967
+ });
968
+ return [4, collectBody(output.body, context)];
969
+ case 1:
970
+ _a.sent();
971
+ return [2, contents];
972
+ }
1081
973
  });
1082
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1083
- if (data.harvestJobs != null) {
1084
- contents.HarvestJobs = deserializeAws_restJson1__listOfHarvestJob(data.harvestJobs, context);
1085
- }
1086
- if (data.nextToken != null) {
1087
- contents.NextToken = __expectString(data.nextToken);
1088
- }
1089
- return contents;
1090
- };
1091
- const deserializeAws_restJson1ListHarvestJobsCommandError = async (output, context) => {
1092
- const parsedOutput = {
1093
- ...output,
1094
- body: await parseErrorBody(output.body, context),
1095
- };
1096
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1097
- switch (errorCode) {
1098
- case "ForbiddenException":
1099
- case "com.amazonaws.mediapackage#ForbiddenException":
1100
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1101
- case "InternalServerErrorException":
1102
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1103
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1104
- case "NotFoundException":
1105
- case "com.amazonaws.mediapackage#NotFoundException":
1106
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1107
- case "ServiceUnavailableException":
1108
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1109
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1110
- case "TooManyRequestsException":
1111
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1112
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1113
- case "UnprocessableEntityException":
1114
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1115
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1116
- default:
1117
- const parsedBody = parsedOutput.body;
1118
- throwDefaultError({
1119
- output,
1120
- parsedBody,
1121
- exceptionCtor: __BaseException,
1122
- errorCode,
1123
- });
1124
- }
1125
- };
1126
- export const deserializeAws_restJson1ListOriginEndpointsCommand = async (output, context) => {
1127
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1128
- return deserializeAws_restJson1ListOriginEndpointsCommandError(output, context);
1129
- }
1130
- const contents = map({
1131
- $metadata: deserializeMetadata(output),
974
+ }); };
975
+ var deserializeAws_restJson1DeleteOriginEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
976
+ var parsedOutput, _a, errorCode, _b, parsedBody;
977
+ var _c;
978
+ return __generator(this, function (_d) {
979
+ switch (_d.label) {
980
+ case 0:
981
+ _a = [__assign({}, output)];
982
+ _c = {};
983
+ return [4, parseErrorBody(output.body, context)];
984
+ case 1:
985
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
986
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
987
+ _b = errorCode;
988
+ switch (_b) {
989
+ case "ForbiddenException": return [3, 2];
990
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
991
+ case "InternalServerErrorException": return [3, 4];
992
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
993
+ case "NotFoundException": return [3, 6];
994
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
995
+ case "ServiceUnavailableException": return [3, 8];
996
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
997
+ case "TooManyRequestsException": return [3, 10];
998
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
999
+ case "UnprocessableEntityException": return [3, 12];
1000
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1001
+ }
1002
+ return [3, 14];
1003
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1004
+ case 3: throw _d.sent();
1005
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1006
+ case 5: throw _d.sent();
1007
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1008
+ case 7: throw _d.sent();
1009
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1010
+ case 9: throw _d.sent();
1011
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1012
+ case 11: throw _d.sent();
1013
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1014
+ case 13: throw _d.sent();
1015
+ case 14:
1016
+ parsedBody = parsedOutput.body;
1017
+ throwDefaultError({
1018
+ output: output,
1019
+ parsedBody: parsedBody,
1020
+ exceptionCtor: __BaseException,
1021
+ errorCode: errorCode,
1022
+ });
1023
+ _d.label = 15;
1024
+ case 15: return [2];
1025
+ }
1132
1026
  });
1133
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1134
- if (data.nextToken != null) {
1135
- contents.NextToken = __expectString(data.nextToken);
1136
- }
1137
- if (data.originEndpoints != null) {
1138
- contents.OriginEndpoints = deserializeAws_restJson1__listOfOriginEndpoint(data.originEndpoints, context);
1139
- }
1140
- return contents;
1141
- };
1142
- const deserializeAws_restJson1ListOriginEndpointsCommandError = async (output, context) => {
1143
- const parsedOutput = {
1144
- ...output,
1145
- body: await parseErrorBody(output.body, context),
1146
- };
1147
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1148
- switch (errorCode) {
1149
- case "ForbiddenException":
1150
- case "com.amazonaws.mediapackage#ForbiddenException":
1151
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1152
- case "InternalServerErrorException":
1153
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1154
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1155
- case "NotFoundException":
1156
- case "com.amazonaws.mediapackage#NotFoundException":
1157
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1158
- case "ServiceUnavailableException":
1159
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1160
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1161
- case "TooManyRequestsException":
1162
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1163
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1164
- case "UnprocessableEntityException":
1165
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1166
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1167
- default:
1168
- const parsedBody = parsedOutput.body;
1169
- throwDefaultError({
1170
- output,
1171
- parsedBody,
1172
- exceptionCtor: __BaseException,
1173
- errorCode,
1174
- });
1175
- }
1176
- };
1177
- export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
1178
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1179
- return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
1180
- }
1181
- const contents = map({
1182
- $metadata: deserializeMetadata(output),
1027
+ }); };
1028
+ export var deserializeAws_restJson1DescribeChannelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1029
+ var contents, data, _a, _b;
1030
+ return __generator(this, function (_c) {
1031
+ switch (_c.label) {
1032
+ case 0:
1033
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1034
+ return [2, deserializeAws_restJson1DescribeChannelCommandError(output, context)];
1035
+ }
1036
+ contents = map({
1037
+ $metadata: deserializeMetadata(output),
1038
+ });
1039
+ _a = __expectNonNull;
1040
+ _b = __expectObject;
1041
+ return [4, parseBody(output.body, context)];
1042
+ case 1:
1043
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1044
+ if (data.arn != null) {
1045
+ contents.Arn = __expectString(data.arn);
1046
+ }
1047
+ if (data.description != null) {
1048
+ contents.Description = __expectString(data.description);
1049
+ }
1050
+ if (data.egressAccessLogs != null) {
1051
+ contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
1052
+ }
1053
+ if (data.hlsIngest != null) {
1054
+ contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
1055
+ }
1056
+ if (data.id != null) {
1057
+ contents.Id = __expectString(data.id);
1058
+ }
1059
+ if (data.ingressAccessLogs != null) {
1060
+ contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
1061
+ }
1062
+ if (data.tags != null) {
1063
+ contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
1064
+ }
1065
+ return [2, contents];
1066
+ }
1183
1067
  });
1184
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1185
- if (data.tags != null) {
1186
- contents.Tags = deserializeAws_restJson1__mapOf__string(data.tags, context);
1187
- }
1188
- return contents;
1189
- };
1190
- const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1191
- const parsedOutput = {
1192
- ...output,
1193
- body: await parseErrorBody(output.body, context),
1194
- };
1195
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1196
- const parsedBody = parsedOutput.body;
1197
- throwDefaultError({
1198
- output,
1199
- parsedBody,
1200
- exceptionCtor: __BaseException,
1201
- errorCode,
1068
+ }); };
1069
+ var deserializeAws_restJson1DescribeChannelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1070
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1071
+ var _c;
1072
+ return __generator(this, function (_d) {
1073
+ switch (_d.label) {
1074
+ case 0:
1075
+ _a = [__assign({}, output)];
1076
+ _c = {};
1077
+ return [4, parseErrorBody(output.body, context)];
1078
+ case 1:
1079
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1080
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1081
+ _b = errorCode;
1082
+ switch (_b) {
1083
+ case "ForbiddenException": return [3, 2];
1084
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
1085
+ case "InternalServerErrorException": return [3, 4];
1086
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
1087
+ case "NotFoundException": return [3, 6];
1088
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
1089
+ case "ServiceUnavailableException": return [3, 8];
1090
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
1091
+ case "TooManyRequestsException": return [3, 10];
1092
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
1093
+ case "UnprocessableEntityException": return [3, 12];
1094
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1095
+ }
1096
+ return [3, 14];
1097
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1098
+ case 3: throw _d.sent();
1099
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1100
+ case 5: throw _d.sent();
1101
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1102
+ case 7: throw _d.sent();
1103
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1104
+ case 9: throw _d.sent();
1105
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1106
+ case 11: throw _d.sent();
1107
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1108
+ case 13: throw _d.sent();
1109
+ case 14:
1110
+ parsedBody = parsedOutput.body;
1111
+ throwDefaultError({
1112
+ output: output,
1113
+ parsedBody: parsedBody,
1114
+ exceptionCtor: __BaseException,
1115
+ errorCode: errorCode,
1116
+ });
1117
+ _d.label = 15;
1118
+ case 15: return [2];
1119
+ }
1202
1120
  });
1203
- };
1204
- export const deserializeAws_restJson1RotateChannelCredentialsCommand = async (output, context) => {
1205
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1206
- return deserializeAws_restJson1RotateChannelCredentialsCommandError(output, context);
1207
- }
1208
- const contents = map({
1209
- $metadata: deserializeMetadata(output),
1121
+ }); };
1122
+ export var deserializeAws_restJson1DescribeHarvestJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1123
+ var contents, data, _a, _b;
1124
+ return __generator(this, function (_c) {
1125
+ switch (_c.label) {
1126
+ case 0:
1127
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1128
+ return [2, deserializeAws_restJson1DescribeHarvestJobCommandError(output, context)];
1129
+ }
1130
+ contents = map({
1131
+ $metadata: deserializeMetadata(output),
1132
+ });
1133
+ _a = __expectNonNull;
1134
+ _b = __expectObject;
1135
+ return [4, parseBody(output.body, context)];
1136
+ case 1:
1137
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1138
+ if (data.arn != null) {
1139
+ contents.Arn = __expectString(data.arn);
1140
+ }
1141
+ if (data.channelId != null) {
1142
+ contents.ChannelId = __expectString(data.channelId);
1143
+ }
1144
+ if (data.createdAt != null) {
1145
+ contents.CreatedAt = __expectString(data.createdAt);
1146
+ }
1147
+ if (data.endTime != null) {
1148
+ contents.EndTime = __expectString(data.endTime);
1149
+ }
1150
+ if (data.id != null) {
1151
+ contents.Id = __expectString(data.id);
1152
+ }
1153
+ if (data.originEndpointId != null) {
1154
+ contents.OriginEndpointId = __expectString(data.originEndpointId);
1155
+ }
1156
+ if (data.s3Destination != null) {
1157
+ contents.S3Destination = deserializeAws_restJson1S3Destination(data.s3Destination, context);
1158
+ }
1159
+ if (data.startTime != null) {
1160
+ contents.StartTime = __expectString(data.startTime);
1161
+ }
1162
+ if (data.status != null) {
1163
+ contents.Status = __expectString(data.status);
1164
+ }
1165
+ return [2, contents];
1166
+ }
1210
1167
  });
1211
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1212
- if (data.arn != null) {
1213
- contents.Arn = __expectString(data.arn);
1214
- }
1215
- if (data.description != null) {
1216
- contents.Description = __expectString(data.description);
1217
- }
1218
- if (data.egressAccessLogs != null) {
1219
- contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
1220
- }
1221
- if (data.hlsIngest != null) {
1222
- contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
1223
- }
1224
- if (data.id != null) {
1225
- contents.Id = __expectString(data.id);
1226
- }
1227
- if (data.ingressAccessLogs != null) {
1228
- contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
1229
- }
1230
- if (data.tags != null) {
1231
- contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
1232
- }
1233
- return contents;
1234
- };
1235
- const deserializeAws_restJson1RotateChannelCredentialsCommandError = async (output, context) => {
1236
- const parsedOutput = {
1237
- ...output,
1238
- body: await parseErrorBody(output.body, context),
1239
- };
1240
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1241
- switch (errorCode) {
1242
- case "ForbiddenException":
1243
- case "com.amazonaws.mediapackage#ForbiddenException":
1244
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1245
- case "InternalServerErrorException":
1246
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1247
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1248
- case "NotFoundException":
1249
- case "com.amazonaws.mediapackage#NotFoundException":
1250
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1251
- case "ServiceUnavailableException":
1252
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1253
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1254
- case "TooManyRequestsException":
1255
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1256
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1257
- case "UnprocessableEntityException":
1258
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1259
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1260
- default:
1261
- const parsedBody = parsedOutput.body;
1262
- throwDefaultError({
1263
- output,
1264
- parsedBody,
1265
- exceptionCtor: __BaseException,
1266
- errorCode,
1267
- });
1268
- }
1269
- };
1270
- export const deserializeAws_restJson1RotateIngestEndpointCredentialsCommand = async (output, context) => {
1271
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1272
- return deserializeAws_restJson1RotateIngestEndpointCredentialsCommandError(output, context);
1273
- }
1274
- const contents = map({
1275
- $metadata: deserializeMetadata(output),
1168
+ }); };
1169
+ var deserializeAws_restJson1DescribeHarvestJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1170
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1171
+ var _c;
1172
+ return __generator(this, function (_d) {
1173
+ switch (_d.label) {
1174
+ case 0:
1175
+ _a = [__assign({}, output)];
1176
+ _c = {};
1177
+ return [4, parseErrorBody(output.body, context)];
1178
+ case 1:
1179
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1180
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1181
+ _b = errorCode;
1182
+ switch (_b) {
1183
+ case "ForbiddenException": return [3, 2];
1184
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
1185
+ case "InternalServerErrorException": return [3, 4];
1186
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
1187
+ case "NotFoundException": return [3, 6];
1188
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
1189
+ case "ServiceUnavailableException": return [3, 8];
1190
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
1191
+ case "TooManyRequestsException": return [3, 10];
1192
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
1193
+ case "UnprocessableEntityException": return [3, 12];
1194
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1195
+ }
1196
+ return [3, 14];
1197
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1198
+ case 3: throw _d.sent();
1199
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1200
+ case 5: throw _d.sent();
1201
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1202
+ case 7: throw _d.sent();
1203
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1204
+ case 9: throw _d.sent();
1205
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1206
+ case 11: throw _d.sent();
1207
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1208
+ case 13: throw _d.sent();
1209
+ case 14:
1210
+ parsedBody = parsedOutput.body;
1211
+ throwDefaultError({
1212
+ output: output,
1213
+ parsedBody: parsedBody,
1214
+ exceptionCtor: __BaseException,
1215
+ errorCode: errorCode,
1216
+ });
1217
+ _d.label = 15;
1218
+ case 15: return [2];
1219
+ }
1276
1220
  });
1277
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1278
- if (data.arn != null) {
1279
- contents.Arn = __expectString(data.arn);
1280
- }
1281
- if (data.description != null) {
1282
- contents.Description = __expectString(data.description);
1283
- }
1284
- if (data.egressAccessLogs != null) {
1285
- contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
1286
- }
1287
- if (data.hlsIngest != null) {
1288
- contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
1289
- }
1290
- if (data.id != null) {
1291
- contents.Id = __expectString(data.id);
1292
- }
1293
- if (data.ingressAccessLogs != null) {
1294
- contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
1295
- }
1296
- if (data.tags != null) {
1297
- contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
1298
- }
1299
- return contents;
1300
- };
1301
- const deserializeAws_restJson1RotateIngestEndpointCredentialsCommandError = async (output, context) => {
1302
- const parsedOutput = {
1303
- ...output,
1304
- body: await parseErrorBody(output.body, context),
1305
- };
1306
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1307
- switch (errorCode) {
1308
- case "ForbiddenException":
1309
- case "com.amazonaws.mediapackage#ForbiddenException":
1310
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1311
- case "InternalServerErrorException":
1312
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1313
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1314
- case "NotFoundException":
1315
- case "com.amazonaws.mediapackage#NotFoundException":
1316
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1317
- case "ServiceUnavailableException":
1318
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1319
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1320
- case "TooManyRequestsException":
1321
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1322
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1323
- case "UnprocessableEntityException":
1324
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1325
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1326
- default:
1327
- const parsedBody = parsedOutput.body;
1328
- throwDefaultError({
1329
- output,
1330
- parsedBody,
1331
- exceptionCtor: __BaseException,
1332
- errorCode,
1333
- });
1334
- }
1335
- };
1336
- export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
1337
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1338
- return deserializeAws_restJson1TagResourceCommandError(output, context);
1339
- }
1340
- const contents = map({
1341
- $metadata: deserializeMetadata(output),
1221
+ }); };
1222
+ export var deserializeAws_restJson1DescribeOriginEndpointCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1223
+ var contents, data, _a, _b;
1224
+ return __generator(this, function (_c) {
1225
+ switch (_c.label) {
1226
+ case 0:
1227
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1228
+ return [2, deserializeAws_restJson1DescribeOriginEndpointCommandError(output, context)];
1229
+ }
1230
+ contents = map({
1231
+ $metadata: deserializeMetadata(output),
1232
+ });
1233
+ _a = __expectNonNull;
1234
+ _b = __expectObject;
1235
+ return [4, parseBody(output.body, context)];
1236
+ case 1:
1237
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1238
+ if (data.arn != null) {
1239
+ contents.Arn = __expectString(data.arn);
1240
+ }
1241
+ if (data.authorization != null) {
1242
+ contents.Authorization = deserializeAws_restJson1Authorization(data.authorization, context);
1243
+ }
1244
+ if (data.channelId != null) {
1245
+ contents.ChannelId = __expectString(data.channelId);
1246
+ }
1247
+ if (data.cmafPackage != null) {
1248
+ contents.CmafPackage = deserializeAws_restJson1CmafPackage(data.cmafPackage, context);
1249
+ }
1250
+ if (data.dashPackage != null) {
1251
+ contents.DashPackage = deserializeAws_restJson1DashPackage(data.dashPackage, context);
1252
+ }
1253
+ if (data.description != null) {
1254
+ contents.Description = __expectString(data.description);
1255
+ }
1256
+ if (data.hlsPackage != null) {
1257
+ contents.HlsPackage = deserializeAws_restJson1HlsPackage(data.hlsPackage, context);
1258
+ }
1259
+ if (data.id != null) {
1260
+ contents.Id = __expectString(data.id);
1261
+ }
1262
+ if (data.manifestName != null) {
1263
+ contents.ManifestName = __expectString(data.manifestName);
1264
+ }
1265
+ if (data.mssPackage != null) {
1266
+ contents.MssPackage = deserializeAws_restJson1MssPackage(data.mssPackage, context);
1267
+ }
1268
+ if (data.origination != null) {
1269
+ contents.Origination = __expectString(data.origination);
1270
+ }
1271
+ if (data.startoverWindowSeconds != null) {
1272
+ contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds);
1273
+ }
1274
+ if (data.tags != null) {
1275
+ contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
1276
+ }
1277
+ if (data.timeDelaySeconds != null) {
1278
+ contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds);
1279
+ }
1280
+ if (data.url != null) {
1281
+ contents.Url = __expectString(data.url);
1282
+ }
1283
+ if (data.whitelist != null) {
1284
+ contents.Whitelist = deserializeAws_restJson1__listOf__string(data.whitelist, context);
1285
+ }
1286
+ return [2, contents];
1287
+ }
1342
1288
  });
1343
- await collectBody(output.body, context);
1344
- return contents;
1345
- };
1346
- const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
1347
- const parsedOutput = {
1348
- ...output,
1349
- body: await parseErrorBody(output.body, context),
1350
- };
1351
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1352
- const parsedBody = parsedOutput.body;
1353
- throwDefaultError({
1354
- output,
1355
- parsedBody,
1356
- exceptionCtor: __BaseException,
1357
- errorCode,
1289
+ }); };
1290
+ var deserializeAws_restJson1DescribeOriginEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1291
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1292
+ var _c;
1293
+ return __generator(this, function (_d) {
1294
+ switch (_d.label) {
1295
+ case 0:
1296
+ _a = [__assign({}, output)];
1297
+ _c = {};
1298
+ return [4, parseErrorBody(output.body, context)];
1299
+ case 1:
1300
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1301
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1302
+ _b = errorCode;
1303
+ switch (_b) {
1304
+ case "ForbiddenException": return [3, 2];
1305
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
1306
+ case "InternalServerErrorException": return [3, 4];
1307
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
1308
+ case "NotFoundException": return [3, 6];
1309
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
1310
+ case "ServiceUnavailableException": return [3, 8];
1311
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
1312
+ case "TooManyRequestsException": return [3, 10];
1313
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
1314
+ case "UnprocessableEntityException": return [3, 12];
1315
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1316
+ }
1317
+ return [3, 14];
1318
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1319
+ case 3: throw _d.sent();
1320
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1321
+ case 5: throw _d.sent();
1322
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1323
+ case 7: throw _d.sent();
1324
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1325
+ case 9: throw _d.sent();
1326
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1327
+ case 11: throw _d.sent();
1328
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1329
+ case 13: throw _d.sent();
1330
+ case 14:
1331
+ parsedBody = parsedOutput.body;
1332
+ throwDefaultError({
1333
+ output: output,
1334
+ parsedBody: parsedBody,
1335
+ exceptionCtor: __BaseException,
1336
+ errorCode: errorCode,
1337
+ });
1338
+ _d.label = 15;
1339
+ case 15: return [2];
1340
+ }
1358
1341
  });
1359
- };
1360
- export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
1361
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1362
- return deserializeAws_restJson1UntagResourceCommandError(output, context);
1363
- }
1364
- const contents = map({
1365
- $metadata: deserializeMetadata(output),
1342
+ }); };
1343
+ export var deserializeAws_restJson1ListChannelsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1344
+ var contents, data, _a, _b;
1345
+ return __generator(this, function (_c) {
1346
+ switch (_c.label) {
1347
+ case 0:
1348
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1349
+ return [2, deserializeAws_restJson1ListChannelsCommandError(output, context)];
1350
+ }
1351
+ contents = map({
1352
+ $metadata: deserializeMetadata(output),
1353
+ });
1354
+ _a = __expectNonNull;
1355
+ _b = __expectObject;
1356
+ return [4, parseBody(output.body, context)];
1357
+ case 1:
1358
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1359
+ if (data.channels != null) {
1360
+ contents.Channels = deserializeAws_restJson1__listOfChannel(data.channels, context);
1361
+ }
1362
+ if (data.nextToken != null) {
1363
+ contents.NextToken = __expectString(data.nextToken);
1364
+ }
1365
+ return [2, contents];
1366
+ }
1366
1367
  });
1367
- await collectBody(output.body, context);
1368
- return contents;
1369
- };
1370
- const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
1371
- const parsedOutput = {
1372
- ...output,
1373
- body: await parseErrorBody(output.body, context),
1374
- };
1375
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1376
- const parsedBody = parsedOutput.body;
1377
- throwDefaultError({
1378
- output,
1379
- parsedBody,
1380
- exceptionCtor: __BaseException,
1381
- errorCode,
1368
+ }); };
1369
+ var deserializeAws_restJson1ListChannelsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1370
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1371
+ var _c;
1372
+ return __generator(this, function (_d) {
1373
+ switch (_d.label) {
1374
+ case 0:
1375
+ _a = [__assign({}, output)];
1376
+ _c = {};
1377
+ return [4, parseErrorBody(output.body, context)];
1378
+ case 1:
1379
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1380
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1381
+ _b = errorCode;
1382
+ switch (_b) {
1383
+ case "ForbiddenException": return [3, 2];
1384
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
1385
+ case "InternalServerErrorException": return [3, 4];
1386
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
1387
+ case "NotFoundException": return [3, 6];
1388
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
1389
+ case "ServiceUnavailableException": return [3, 8];
1390
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
1391
+ case "TooManyRequestsException": return [3, 10];
1392
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
1393
+ case "UnprocessableEntityException": return [3, 12];
1394
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1395
+ }
1396
+ return [3, 14];
1397
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1398
+ case 3: throw _d.sent();
1399
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1400
+ case 5: throw _d.sent();
1401
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1402
+ case 7: throw _d.sent();
1403
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1404
+ case 9: throw _d.sent();
1405
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1406
+ case 11: throw _d.sent();
1407
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1408
+ case 13: throw _d.sent();
1409
+ case 14:
1410
+ parsedBody = parsedOutput.body;
1411
+ throwDefaultError({
1412
+ output: output,
1413
+ parsedBody: parsedBody,
1414
+ exceptionCtor: __BaseException,
1415
+ errorCode: errorCode,
1416
+ });
1417
+ _d.label = 15;
1418
+ case 15: return [2];
1419
+ }
1382
1420
  });
1383
- };
1384
- export const deserializeAws_restJson1UpdateChannelCommand = async (output, context) => {
1385
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1386
- return deserializeAws_restJson1UpdateChannelCommandError(output, context);
1387
- }
1388
- const contents = map({
1389
- $metadata: deserializeMetadata(output),
1421
+ }); };
1422
+ export var deserializeAws_restJson1ListHarvestJobsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1423
+ var contents, data, _a, _b;
1424
+ return __generator(this, function (_c) {
1425
+ switch (_c.label) {
1426
+ case 0:
1427
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1428
+ return [2, deserializeAws_restJson1ListHarvestJobsCommandError(output, context)];
1429
+ }
1430
+ contents = map({
1431
+ $metadata: deserializeMetadata(output),
1432
+ });
1433
+ _a = __expectNonNull;
1434
+ _b = __expectObject;
1435
+ return [4, parseBody(output.body, context)];
1436
+ case 1:
1437
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1438
+ if (data.harvestJobs != null) {
1439
+ contents.HarvestJobs = deserializeAws_restJson1__listOfHarvestJob(data.harvestJobs, context);
1440
+ }
1441
+ if (data.nextToken != null) {
1442
+ contents.NextToken = __expectString(data.nextToken);
1443
+ }
1444
+ return [2, contents];
1445
+ }
1390
1446
  });
1391
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1392
- if (data.arn != null) {
1393
- contents.Arn = __expectString(data.arn);
1394
- }
1395
- if (data.description != null) {
1396
- contents.Description = __expectString(data.description);
1397
- }
1398
- if (data.egressAccessLogs != null) {
1399
- contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
1400
- }
1401
- if (data.hlsIngest != null) {
1402
- contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
1403
- }
1404
- if (data.id != null) {
1405
- contents.Id = __expectString(data.id);
1406
- }
1407
- if (data.ingressAccessLogs != null) {
1408
- contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
1409
- }
1410
- if (data.tags != null) {
1411
- contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
1412
- }
1413
- return contents;
1414
- };
1415
- const deserializeAws_restJson1UpdateChannelCommandError = async (output, context) => {
1416
- const parsedOutput = {
1417
- ...output,
1418
- body: await parseErrorBody(output.body, context),
1419
- };
1420
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1421
- switch (errorCode) {
1422
- case "ForbiddenException":
1423
- case "com.amazonaws.mediapackage#ForbiddenException":
1424
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1425
- case "InternalServerErrorException":
1426
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1427
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1428
- case "NotFoundException":
1429
- case "com.amazonaws.mediapackage#NotFoundException":
1430
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1431
- case "ServiceUnavailableException":
1432
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1433
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1434
- case "TooManyRequestsException":
1435
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1436
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1437
- case "UnprocessableEntityException":
1438
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1439
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1440
- default:
1441
- const parsedBody = parsedOutput.body;
1442
- throwDefaultError({
1443
- output,
1444
- parsedBody,
1445
- exceptionCtor: __BaseException,
1446
- errorCode,
1447
- });
1448
- }
1449
- };
1450
- export const deserializeAws_restJson1UpdateOriginEndpointCommand = async (output, context) => {
1451
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1452
- return deserializeAws_restJson1UpdateOriginEndpointCommandError(output, context);
1453
- }
1454
- const contents = map({
1455
- $metadata: deserializeMetadata(output),
1447
+ }); };
1448
+ var deserializeAws_restJson1ListHarvestJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1449
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1450
+ var _c;
1451
+ return __generator(this, function (_d) {
1452
+ switch (_d.label) {
1453
+ case 0:
1454
+ _a = [__assign({}, output)];
1455
+ _c = {};
1456
+ return [4, parseErrorBody(output.body, context)];
1457
+ case 1:
1458
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1459
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1460
+ _b = errorCode;
1461
+ switch (_b) {
1462
+ case "ForbiddenException": return [3, 2];
1463
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
1464
+ case "InternalServerErrorException": return [3, 4];
1465
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
1466
+ case "NotFoundException": return [3, 6];
1467
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
1468
+ case "ServiceUnavailableException": return [3, 8];
1469
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
1470
+ case "TooManyRequestsException": return [3, 10];
1471
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
1472
+ case "UnprocessableEntityException": return [3, 12];
1473
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1474
+ }
1475
+ return [3, 14];
1476
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1477
+ case 3: throw _d.sent();
1478
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1479
+ case 5: throw _d.sent();
1480
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1481
+ case 7: throw _d.sent();
1482
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1483
+ case 9: throw _d.sent();
1484
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1485
+ case 11: throw _d.sent();
1486
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1487
+ case 13: throw _d.sent();
1488
+ case 14:
1489
+ parsedBody = parsedOutput.body;
1490
+ throwDefaultError({
1491
+ output: output,
1492
+ parsedBody: parsedBody,
1493
+ exceptionCtor: __BaseException,
1494
+ errorCode: errorCode,
1495
+ });
1496
+ _d.label = 15;
1497
+ case 15: return [2];
1498
+ }
1456
1499
  });
1457
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1458
- if (data.arn != null) {
1459
- contents.Arn = __expectString(data.arn);
1460
- }
1461
- if (data.authorization != null) {
1462
- contents.Authorization = deserializeAws_restJson1Authorization(data.authorization, context);
1463
- }
1464
- if (data.channelId != null) {
1465
- contents.ChannelId = __expectString(data.channelId);
1466
- }
1467
- if (data.cmafPackage != null) {
1468
- contents.CmafPackage = deserializeAws_restJson1CmafPackage(data.cmafPackage, context);
1469
- }
1470
- if (data.dashPackage != null) {
1471
- contents.DashPackage = deserializeAws_restJson1DashPackage(data.dashPackage, context);
1472
- }
1473
- if (data.description != null) {
1474
- contents.Description = __expectString(data.description);
1475
- }
1476
- if (data.hlsPackage != null) {
1477
- contents.HlsPackage = deserializeAws_restJson1HlsPackage(data.hlsPackage, context);
1478
- }
1479
- if (data.id != null) {
1480
- contents.Id = __expectString(data.id);
1481
- }
1482
- if (data.manifestName != null) {
1483
- contents.ManifestName = __expectString(data.manifestName);
1484
- }
1485
- if (data.mssPackage != null) {
1486
- contents.MssPackage = deserializeAws_restJson1MssPackage(data.mssPackage, context);
1487
- }
1488
- if (data.origination != null) {
1489
- contents.Origination = __expectString(data.origination);
1490
- }
1491
- if (data.startoverWindowSeconds != null) {
1492
- contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds);
1493
- }
1494
- if (data.tags != null) {
1495
- contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
1496
- }
1497
- if (data.timeDelaySeconds != null) {
1498
- contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds);
1499
- }
1500
- if (data.url != null) {
1501
- contents.Url = __expectString(data.url);
1502
- }
1503
- if (data.whitelist != null) {
1504
- contents.Whitelist = deserializeAws_restJson1__listOf__string(data.whitelist, context);
1505
- }
1506
- return contents;
1507
- };
1508
- const deserializeAws_restJson1UpdateOriginEndpointCommandError = async (output, context) => {
1509
- const parsedOutput = {
1510
- ...output,
1511
- body: await parseErrorBody(output.body, context),
1512
- };
1513
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1514
- switch (errorCode) {
1515
- case "ForbiddenException":
1516
- case "com.amazonaws.mediapackage#ForbiddenException":
1517
- throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1518
- case "InternalServerErrorException":
1519
- case "com.amazonaws.mediapackage#InternalServerErrorException":
1520
- throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1521
- case "NotFoundException":
1522
- case "com.amazonaws.mediapackage#NotFoundException":
1523
- throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1524
- case "ServiceUnavailableException":
1525
- case "com.amazonaws.mediapackage#ServiceUnavailableException":
1526
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
1527
- case "TooManyRequestsException":
1528
- case "com.amazonaws.mediapackage#TooManyRequestsException":
1529
- throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1530
- case "UnprocessableEntityException":
1531
- case "com.amazonaws.mediapackage#UnprocessableEntityException":
1532
- throw await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context);
1533
- default:
1534
- const parsedBody = parsedOutput.body;
1535
- throwDefaultError({
1536
- output,
1537
- parsedBody,
1538
- exceptionCtor: __BaseException,
1539
- errorCode,
1540
- });
1541
- }
1542
- };
1543
- const map = __map;
1544
- const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
1545
- const contents = map({});
1546
- const data = parsedOutput.body;
1547
- if (data.message != null) {
1548
- contents.Message = __expectString(data.message);
1549
- }
1550
- const exception = new ForbiddenException({
1551
- $metadata: deserializeMetadata(parsedOutput),
1552
- ...contents,
1500
+ }); };
1501
+ export var deserializeAws_restJson1ListOriginEndpointsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1502
+ var contents, data, _a, _b;
1503
+ return __generator(this, function (_c) {
1504
+ switch (_c.label) {
1505
+ case 0:
1506
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1507
+ return [2, deserializeAws_restJson1ListOriginEndpointsCommandError(output, context)];
1508
+ }
1509
+ contents = map({
1510
+ $metadata: deserializeMetadata(output),
1511
+ });
1512
+ _a = __expectNonNull;
1513
+ _b = __expectObject;
1514
+ return [4, parseBody(output.body, context)];
1515
+ case 1:
1516
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1517
+ if (data.nextToken != null) {
1518
+ contents.NextToken = __expectString(data.nextToken);
1519
+ }
1520
+ if (data.originEndpoints != null) {
1521
+ contents.OriginEndpoints = deserializeAws_restJson1__listOfOriginEndpoint(data.originEndpoints, context);
1522
+ }
1523
+ return [2, contents];
1524
+ }
1553
1525
  });
1554
- return __decorateServiceException(exception, parsedOutput.body);
1555
- };
1556
- const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
1557
- const contents = map({});
1558
- const data = parsedOutput.body;
1559
- if (data.message != null) {
1560
- contents.Message = __expectString(data.message);
1561
- }
1562
- const exception = new InternalServerErrorException({
1563
- $metadata: deserializeMetadata(parsedOutput),
1564
- ...contents,
1526
+ }); };
1527
+ var deserializeAws_restJson1ListOriginEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1528
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1529
+ var _c;
1530
+ return __generator(this, function (_d) {
1531
+ switch (_d.label) {
1532
+ case 0:
1533
+ _a = [__assign({}, output)];
1534
+ _c = {};
1535
+ return [4, parseErrorBody(output.body, context)];
1536
+ case 1:
1537
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1538
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1539
+ _b = errorCode;
1540
+ switch (_b) {
1541
+ case "ForbiddenException": return [3, 2];
1542
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
1543
+ case "InternalServerErrorException": return [3, 4];
1544
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
1545
+ case "NotFoundException": return [3, 6];
1546
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
1547
+ case "ServiceUnavailableException": return [3, 8];
1548
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
1549
+ case "TooManyRequestsException": return [3, 10];
1550
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
1551
+ case "UnprocessableEntityException": return [3, 12];
1552
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1553
+ }
1554
+ return [3, 14];
1555
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1556
+ case 3: throw _d.sent();
1557
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1558
+ case 5: throw _d.sent();
1559
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1560
+ case 7: throw _d.sent();
1561
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1562
+ case 9: throw _d.sent();
1563
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1564
+ case 11: throw _d.sent();
1565
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1566
+ case 13: throw _d.sent();
1567
+ case 14:
1568
+ parsedBody = parsedOutput.body;
1569
+ throwDefaultError({
1570
+ output: output,
1571
+ parsedBody: parsedBody,
1572
+ exceptionCtor: __BaseException,
1573
+ errorCode: errorCode,
1574
+ });
1575
+ _d.label = 15;
1576
+ case 15: return [2];
1577
+ }
1565
1578
  });
1566
- return __decorateServiceException(exception, parsedOutput.body);
1567
- };
1568
- const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
1569
- const contents = map({});
1570
- const data = parsedOutput.body;
1571
- if (data.message != null) {
1572
- contents.Message = __expectString(data.message);
1573
- }
1574
- const exception = new NotFoundException({
1575
- $metadata: deserializeMetadata(parsedOutput),
1576
- ...contents,
1579
+ }); };
1580
+ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1581
+ var contents, data, _a, _b;
1582
+ return __generator(this, function (_c) {
1583
+ switch (_c.label) {
1584
+ case 0:
1585
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1586
+ return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
1587
+ }
1588
+ contents = map({
1589
+ $metadata: deserializeMetadata(output),
1590
+ });
1591
+ _a = __expectNonNull;
1592
+ _b = __expectObject;
1593
+ return [4, parseBody(output.body, context)];
1594
+ case 1:
1595
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1596
+ if (data.tags != null) {
1597
+ contents.Tags = deserializeAws_restJson1__mapOf__string(data.tags, context);
1598
+ }
1599
+ return [2, contents];
1600
+ }
1577
1601
  });
1578
- return __decorateServiceException(exception, parsedOutput.body);
1579
- };
1580
- const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
1581
- const contents = map({});
1582
- const data = parsedOutput.body;
1583
- if (data.message != null) {
1584
- contents.Message = __expectString(data.message);
1585
- }
1586
- const exception = new ServiceUnavailableException({
1587
- $metadata: deserializeMetadata(parsedOutput),
1588
- ...contents,
1602
+ }); };
1603
+ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1604
+ var parsedOutput, _a, errorCode, parsedBody;
1605
+ var _b;
1606
+ return __generator(this, function (_c) {
1607
+ switch (_c.label) {
1608
+ case 0:
1609
+ _a = [__assign({}, output)];
1610
+ _b = {};
1611
+ return [4, parseErrorBody(output.body, context)];
1612
+ case 1:
1613
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
1614
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1615
+ parsedBody = parsedOutput.body;
1616
+ throwDefaultError({
1617
+ output: output,
1618
+ parsedBody: parsedBody,
1619
+ exceptionCtor: __BaseException,
1620
+ errorCode: errorCode,
1621
+ });
1622
+ return [2];
1623
+ }
1589
1624
  });
1590
- return __decorateServiceException(exception, parsedOutput.body);
1591
- };
1592
- const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
1593
- const contents = map({});
1594
- const data = parsedOutput.body;
1595
- if (data.message != null) {
1596
- contents.Message = __expectString(data.message);
1597
- }
1598
- const exception = new TooManyRequestsException({
1599
- $metadata: deserializeMetadata(parsedOutput),
1600
- ...contents,
1625
+ }); };
1626
+ export var deserializeAws_restJson1RotateChannelCredentialsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1627
+ var contents, data, _a, _b;
1628
+ return __generator(this, function (_c) {
1629
+ switch (_c.label) {
1630
+ case 0:
1631
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1632
+ return [2, deserializeAws_restJson1RotateChannelCredentialsCommandError(output, context)];
1633
+ }
1634
+ contents = map({
1635
+ $metadata: deserializeMetadata(output),
1636
+ });
1637
+ _a = __expectNonNull;
1638
+ _b = __expectObject;
1639
+ return [4, parseBody(output.body, context)];
1640
+ case 1:
1641
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1642
+ if (data.arn != null) {
1643
+ contents.Arn = __expectString(data.arn);
1644
+ }
1645
+ if (data.description != null) {
1646
+ contents.Description = __expectString(data.description);
1647
+ }
1648
+ if (data.egressAccessLogs != null) {
1649
+ contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
1650
+ }
1651
+ if (data.hlsIngest != null) {
1652
+ contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
1653
+ }
1654
+ if (data.id != null) {
1655
+ contents.Id = __expectString(data.id);
1656
+ }
1657
+ if (data.ingressAccessLogs != null) {
1658
+ contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
1659
+ }
1660
+ if (data.tags != null) {
1661
+ contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
1662
+ }
1663
+ return [2, contents];
1664
+ }
1601
1665
  });
1602
- return __decorateServiceException(exception, parsedOutput.body);
1603
- };
1604
- const deserializeAws_restJson1UnprocessableEntityExceptionResponse = async (parsedOutput, context) => {
1605
- const contents = map({});
1606
- const data = parsedOutput.body;
1607
- if (data.message != null) {
1608
- contents.Message = __expectString(data.message);
1609
- }
1610
- const exception = new UnprocessableEntityException({
1611
- $metadata: deserializeMetadata(parsedOutput),
1612
- ...contents,
1666
+ }); };
1667
+ var deserializeAws_restJson1RotateChannelCredentialsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1668
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1669
+ var _c;
1670
+ return __generator(this, function (_d) {
1671
+ switch (_d.label) {
1672
+ case 0:
1673
+ _a = [__assign({}, output)];
1674
+ _c = {};
1675
+ return [4, parseErrorBody(output.body, context)];
1676
+ case 1:
1677
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1678
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1679
+ _b = errorCode;
1680
+ switch (_b) {
1681
+ case "ForbiddenException": return [3, 2];
1682
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
1683
+ case "InternalServerErrorException": return [3, 4];
1684
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
1685
+ case "NotFoundException": return [3, 6];
1686
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
1687
+ case "ServiceUnavailableException": return [3, 8];
1688
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
1689
+ case "TooManyRequestsException": return [3, 10];
1690
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
1691
+ case "UnprocessableEntityException": return [3, 12];
1692
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1693
+ }
1694
+ return [3, 14];
1695
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1696
+ case 3: throw _d.sent();
1697
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1698
+ case 5: throw _d.sent();
1699
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1700
+ case 7: throw _d.sent();
1701
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1702
+ case 9: throw _d.sent();
1703
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1704
+ case 11: throw _d.sent();
1705
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1706
+ case 13: throw _d.sent();
1707
+ case 14:
1708
+ parsedBody = parsedOutput.body;
1709
+ throwDefaultError({
1710
+ output: output,
1711
+ parsedBody: parsedBody,
1712
+ exceptionCtor: __BaseException,
1713
+ errorCode: errorCode,
1714
+ });
1715
+ _d.label = 15;
1716
+ case 15: return [2];
1717
+ }
1613
1718
  });
1614
- return __decorateServiceException(exception, parsedOutput.body);
1615
- };
1616
- const serializeAws_restJson1__listOf__PeriodTriggersElement = (input, context) => {
1719
+ }); };
1720
+ export var deserializeAws_restJson1RotateIngestEndpointCredentialsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1721
+ var contents, data, _a, _b;
1722
+ return __generator(this, function (_c) {
1723
+ switch (_c.label) {
1724
+ case 0:
1725
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1726
+ return [2, deserializeAws_restJson1RotateIngestEndpointCredentialsCommandError(output, context)];
1727
+ }
1728
+ contents = map({
1729
+ $metadata: deserializeMetadata(output),
1730
+ });
1731
+ _a = __expectNonNull;
1732
+ _b = __expectObject;
1733
+ return [4, parseBody(output.body, context)];
1734
+ case 1:
1735
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1736
+ if (data.arn != null) {
1737
+ contents.Arn = __expectString(data.arn);
1738
+ }
1739
+ if (data.description != null) {
1740
+ contents.Description = __expectString(data.description);
1741
+ }
1742
+ if (data.egressAccessLogs != null) {
1743
+ contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
1744
+ }
1745
+ if (data.hlsIngest != null) {
1746
+ contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
1747
+ }
1748
+ if (data.id != null) {
1749
+ contents.Id = __expectString(data.id);
1750
+ }
1751
+ if (data.ingressAccessLogs != null) {
1752
+ contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
1753
+ }
1754
+ if (data.tags != null) {
1755
+ contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
1756
+ }
1757
+ return [2, contents];
1758
+ }
1759
+ });
1760
+ }); };
1761
+ var deserializeAws_restJson1RotateIngestEndpointCredentialsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1762
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1763
+ var _c;
1764
+ return __generator(this, function (_d) {
1765
+ switch (_d.label) {
1766
+ case 0:
1767
+ _a = [__assign({}, output)];
1768
+ _c = {};
1769
+ return [4, parseErrorBody(output.body, context)];
1770
+ case 1:
1771
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1772
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1773
+ _b = errorCode;
1774
+ switch (_b) {
1775
+ case "ForbiddenException": return [3, 2];
1776
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
1777
+ case "InternalServerErrorException": return [3, 4];
1778
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
1779
+ case "NotFoundException": return [3, 6];
1780
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
1781
+ case "ServiceUnavailableException": return [3, 8];
1782
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
1783
+ case "TooManyRequestsException": return [3, 10];
1784
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
1785
+ case "UnprocessableEntityException": return [3, 12];
1786
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1787
+ }
1788
+ return [3, 14];
1789
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1790
+ case 3: throw _d.sent();
1791
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1792
+ case 5: throw _d.sent();
1793
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1794
+ case 7: throw _d.sent();
1795
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1796
+ case 9: throw _d.sent();
1797
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1798
+ case 11: throw _d.sent();
1799
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1800
+ case 13: throw _d.sent();
1801
+ case 14:
1802
+ parsedBody = parsedOutput.body;
1803
+ throwDefaultError({
1804
+ output: output,
1805
+ parsedBody: parsedBody,
1806
+ exceptionCtor: __BaseException,
1807
+ errorCode: errorCode,
1808
+ });
1809
+ _d.label = 15;
1810
+ case 15: return [2];
1811
+ }
1812
+ });
1813
+ }); };
1814
+ export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1815
+ var contents;
1816
+ return __generator(this, function (_a) {
1817
+ switch (_a.label) {
1818
+ case 0:
1819
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1820
+ return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
1821
+ }
1822
+ contents = map({
1823
+ $metadata: deserializeMetadata(output),
1824
+ });
1825
+ return [4, collectBody(output.body, context)];
1826
+ case 1:
1827
+ _a.sent();
1828
+ return [2, contents];
1829
+ }
1830
+ });
1831
+ }); };
1832
+ var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1833
+ var parsedOutput, _a, errorCode, parsedBody;
1834
+ var _b;
1835
+ return __generator(this, function (_c) {
1836
+ switch (_c.label) {
1837
+ case 0:
1838
+ _a = [__assign({}, output)];
1839
+ _b = {};
1840
+ return [4, parseErrorBody(output.body, context)];
1841
+ case 1:
1842
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
1843
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1844
+ parsedBody = parsedOutput.body;
1845
+ throwDefaultError({
1846
+ output: output,
1847
+ parsedBody: parsedBody,
1848
+ exceptionCtor: __BaseException,
1849
+ errorCode: errorCode,
1850
+ });
1851
+ return [2];
1852
+ }
1853
+ });
1854
+ }); };
1855
+ export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1856
+ var contents;
1857
+ return __generator(this, function (_a) {
1858
+ switch (_a.label) {
1859
+ case 0:
1860
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1861
+ return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
1862
+ }
1863
+ contents = map({
1864
+ $metadata: deserializeMetadata(output),
1865
+ });
1866
+ return [4, collectBody(output.body, context)];
1867
+ case 1:
1868
+ _a.sent();
1869
+ return [2, contents];
1870
+ }
1871
+ });
1872
+ }); };
1873
+ var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1874
+ var parsedOutput, _a, errorCode, parsedBody;
1875
+ var _b;
1876
+ return __generator(this, function (_c) {
1877
+ switch (_c.label) {
1878
+ case 0:
1879
+ _a = [__assign({}, output)];
1880
+ _b = {};
1881
+ return [4, parseErrorBody(output.body, context)];
1882
+ case 1:
1883
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
1884
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1885
+ parsedBody = parsedOutput.body;
1886
+ throwDefaultError({
1887
+ output: output,
1888
+ parsedBody: parsedBody,
1889
+ exceptionCtor: __BaseException,
1890
+ errorCode: errorCode,
1891
+ });
1892
+ return [2];
1893
+ }
1894
+ });
1895
+ }); };
1896
+ export var deserializeAws_restJson1UpdateChannelCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1897
+ var contents, data, _a, _b;
1898
+ return __generator(this, function (_c) {
1899
+ switch (_c.label) {
1900
+ case 0:
1901
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1902
+ return [2, deserializeAws_restJson1UpdateChannelCommandError(output, context)];
1903
+ }
1904
+ contents = map({
1905
+ $metadata: deserializeMetadata(output),
1906
+ });
1907
+ _a = __expectNonNull;
1908
+ _b = __expectObject;
1909
+ return [4, parseBody(output.body, context)];
1910
+ case 1:
1911
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1912
+ if (data.arn != null) {
1913
+ contents.Arn = __expectString(data.arn);
1914
+ }
1915
+ if (data.description != null) {
1916
+ contents.Description = __expectString(data.description);
1917
+ }
1918
+ if (data.egressAccessLogs != null) {
1919
+ contents.EgressAccessLogs = deserializeAws_restJson1EgressAccessLogs(data.egressAccessLogs, context);
1920
+ }
1921
+ if (data.hlsIngest != null) {
1922
+ contents.HlsIngest = deserializeAws_restJson1HlsIngest(data.hlsIngest, context);
1923
+ }
1924
+ if (data.id != null) {
1925
+ contents.Id = __expectString(data.id);
1926
+ }
1927
+ if (data.ingressAccessLogs != null) {
1928
+ contents.IngressAccessLogs = deserializeAws_restJson1IngressAccessLogs(data.ingressAccessLogs, context);
1929
+ }
1930
+ if (data.tags != null) {
1931
+ contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
1932
+ }
1933
+ return [2, contents];
1934
+ }
1935
+ });
1936
+ }); };
1937
+ var deserializeAws_restJson1UpdateChannelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1938
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1939
+ var _c;
1940
+ return __generator(this, function (_d) {
1941
+ switch (_d.label) {
1942
+ case 0:
1943
+ _a = [__assign({}, output)];
1944
+ _c = {};
1945
+ return [4, parseErrorBody(output.body, context)];
1946
+ case 1:
1947
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1948
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1949
+ _b = errorCode;
1950
+ switch (_b) {
1951
+ case "ForbiddenException": return [3, 2];
1952
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
1953
+ case "InternalServerErrorException": return [3, 4];
1954
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
1955
+ case "NotFoundException": return [3, 6];
1956
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
1957
+ case "ServiceUnavailableException": return [3, 8];
1958
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
1959
+ case "TooManyRequestsException": return [3, 10];
1960
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
1961
+ case "UnprocessableEntityException": return [3, 12];
1962
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
1963
+ }
1964
+ return [3, 14];
1965
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1966
+ case 3: throw _d.sent();
1967
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1968
+ case 5: throw _d.sent();
1969
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1970
+ case 7: throw _d.sent();
1971
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1972
+ case 9: throw _d.sent();
1973
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1974
+ case 11: throw _d.sent();
1975
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
1976
+ case 13: throw _d.sent();
1977
+ case 14:
1978
+ parsedBody = parsedOutput.body;
1979
+ throwDefaultError({
1980
+ output: output,
1981
+ parsedBody: parsedBody,
1982
+ exceptionCtor: __BaseException,
1983
+ errorCode: errorCode,
1984
+ });
1985
+ _d.label = 15;
1986
+ case 15: return [2];
1987
+ }
1988
+ });
1989
+ }); };
1990
+ export var deserializeAws_restJson1UpdateOriginEndpointCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1991
+ var contents, data, _a, _b;
1992
+ return __generator(this, function (_c) {
1993
+ switch (_c.label) {
1994
+ case 0:
1995
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1996
+ return [2, deserializeAws_restJson1UpdateOriginEndpointCommandError(output, context)];
1997
+ }
1998
+ contents = map({
1999
+ $metadata: deserializeMetadata(output),
2000
+ });
2001
+ _a = __expectNonNull;
2002
+ _b = __expectObject;
2003
+ return [4, parseBody(output.body, context)];
2004
+ case 1:
2005
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2006
+ if (data.arn != null) {
2007
+ contents.Arn = __expectString(data.arn);
2008
+ }
2009
+ if (data.authorization != null) {
2010
+ contents.Authorization = deserializeAws_restJson1Authorization(data.authorization, context);
2011
+ }
2012
+ if (data.channelId != null) {
2013
+ contents.ChannelId = __expectString(data.channelId);
2014
+ }
2015
+ if (data.cmafPackage != null) {
2016
+ contents.CmafPackage = deserializeAws_restJson1CmafPackage(data.cmafPackage, context);
2017
+ }
2018
+ if (data.dashPackage != null) {
2019
+ contents.DashPackage = deserializeAws_restJson1DashPackage(data.dashPackage, context);
2020
+ }
2021
+ if (data.description != null) {
2022
+ contents.Description = __expectString(data.description);
2023
+ }
2024
+ if (data.hlsPackage != null) {
2025
+ contents.HlsPackage = deserializeAws_restJson1HlsPackage(data.hlsPackage, context);
2026
+ }
2027
+ if (data.id != null) {
2028
+ contents.Id = __expectString(data.id);
2029
+ }
2030
+ if (data.manifestName != null) {
2031
+ contents.ManifestName = __expectString(data.manifestName);
2032
+ }
2033
+ if (data.mssPackage != null) {
2034
+ contents.MssPackage = deserializeAws_restJson1MssPackage(data.mssPackage, context);
2035
+ }
2036
+ if (data.origination != null) {
2037
+ contents.Origination = __expectString(data.origination);
2038
+ }
2039
+ if (data.startoverWindowSeconds != null) {
2040
+ contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds);
2041
+ }
2042
+ if (data.tags != null) {
2043
+ contents.Tags = deserializeAws_restJson1Tags(data.tags, context);
2044
+ }
2045
+ if (data.timeDelaySeconds != null) {
2046
+ contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds);
2047
+ }
2048
+ if (data.url != null) {
2049
+ contents.Url = __expectString(data.url);
2050
+ }
2051
+ if (data.whitelist != null) {
2052
+ contents.Whitelist = deserializeAws_restJson1__listOf__string(data.whitelist, context);
2053
+ }
2054
+ return [2, contents];
2055
+ }
2056
+ });
2057
+ }); };
2058
+ var deserializeAws_restJson1UpdateOriginEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2059
+ var parsedOutput, _a, errorCode, _b, parsedBody;
2060
+ var _c;
2061
+ return __generator(this, function (_d) {
2062
+ switch (_d.label) {
2063
+ case 0:
2064
+ _a = [__assign({}, output)];
2065
+ _c = {};
2066
+ return [4, parseErrorBody(output.body, context)];
2067
+ case 1:
2068
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2069
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2070
+ _b = errorCode;
2071
+ switch (_b) {
2072
+ case "ForbiddenException": return [3, 2];
2073
+ case "com.amazonaws.mediapackage#ForbiddenException": return [3, 2];
2074
+ case "InternalServerErrorException": return [3, 4];
2075
+ case "com.amazonaws.mediapackage#InternalServerErrorException": return [3, 4];
2076
+ case "NotFoundException": return [3, 6];
2077
+ case "com.amazonaws.mediapackage#NotFoundException": return [3, 6];
2078
+ case "ServiceUnavailableException": return [3, 8];
2079
+ case "com.amazonaws.mediapackage#ServiceUnavailableException": return [3, 8];
2080
+ case "TooManyRequestsException": return [3, 10];
2081
+ case "com.amazonaws.mediapackage#TooManyRequestsException": return [3, 10];
2082
+ case "UnprocessableEntityException": return [3, 12];
2083
+ case "com.amazonaws.mediapackage#UnprocessableEntityException": return [3, 12];
2084
+ }
2085
+ return [3, 14];
2086
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
2087
+ case 3: throw _d.sent();
2088
+ case 4: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
2089
+ case 5: throw _d.sent();
2090
+ case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
2091
+ case 7: throw _d.sent();
2092
+ case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
2093
+ case 9: throw _d.sent();
2094
+ case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
2095
+ case 11: throw _d.sent();
2096
+ case 12: return [4, deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)];
2097
+ case 13: throw _d.sent();
2098
+ case 14:
2099
+ parsedBody = parsedOutput.body;
2100
+ throwDefaultError({
2101
+ output: output,
2102
+ parsedBody: parsedBody,
2103
+ exceptionCtor: __BaseException,
2104
+ errorCode: errorCode,
2105
+ });
2106
+ _d.label = 15;
2107
+ case 15: return [2];
2108
+ }
2109
+ });
2110
+ }); };
2111
+ var map = __map;
2112
+ var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2113
+ var contents, data, exception;
2114
+ return __generator(this, function (_a) {
2115
+ contents = map({});
2116
+ data = parsedOutput.body;
2117
+ if (data.message != null) {
2118
+ contents.Message = __expectString(data.message);
2119
+ }
2120
+ exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
2121
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
2122
+ });
2123
+ }); };
2124
+ var deserializeAws_restJson1InternalServerErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2125
+ var contents, data, exception;
2126
+ return __generator(this, function (_a) {
2127
+ contents = map({});
2128
+ data = parsedOutput.body;
2129
+ if (data.message != null) {
2130
+ contents.Message = __expectString(data.message);
2131
+ }
2132
+ exception = new InternalServerErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
2133
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
2134
+ });
2135
+ }); };
2136
+ var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2137
+ var contents, data, exception;
2138
+ return __generator(this, function (_a) {
2139
+ contents = map({});
2140
+ data = parsedOutput.body;
2141
+ if (data.message != null) {
2142
+ contents.Message = __expectString(data.message);
2143
+ }
2144
+ exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
2145
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
2146
+ });
2147
+ }); };
2148
+ var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2149
+ var contents, data, exception;
2150
+ return __generator(this, function (_a) {
2151
+ contents = map({});
2152
+ data = parsedOutput.body;
2153
+ if (data.message != null) {
2154
+ contents.Message = __expectString(data.message);
2155
+ }
2156
+ exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
2157
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
2158
+ });
2159
+ }); };
2160
+ var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2161
+ var contents, data, exception;
2162
+ return __generator(this, function (_a) {
2163
+ contents = map({});
2164
+ data = parsedOutput.body;
2165
+ if (data.message != null) {
2166
+ contents.Message = __expectString(data.message);
2167
+ }
2168
+ exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
2169
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
2170
+ });
2171
+ }); };
2172
+ var deserializeAws_restJson1UnprocessableEntityExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2173
+ var contents, data, exception;
2174
+ return __generator(this, function (_a) {
2175
+ contents = map({});
2176
+ data = parsedOutput.body;
2177
+ if (data.message != null) {
2178
+ contents.Message = __expectString(data.message);
2179
+ }
2180
+ exception = new UnprocessableEntityException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
2181
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
2182
+ });
2183
+ }); };
2184
+ var serializeAws_restJson1__listOf__PeriodTriggersElement = function (input, context) {
1617
2185
  return input
1618
- .filter((e) => e != null)
1619
- .map((entry) => {
2186
+ .filter(function (e) { return e != null; })
2187
+ .map(function (entry) {
1620
2188
  return entry;
1621
2189
  });
1622
2190
  };
1623
- const serializeAws_restJson1__listOf__string = (input, context) => {
2191
+ var serializeAws_restJson1__listOf__string = function (input, context) {
1624
2192
  return input
1625
- .filter((e) => e != null)
1626
- .map((entry) => {
2193
+ .filter(function (e) { return e != null; })
2194
+ .map(function (entry) {
1627
2195
  return entry;
1628
2196
  });
1629
2197
  };
1630
- const serializeAws_restJson1__listOfHlsManifestCreateOrUpdateParameters = (input, context) => {
2198
+ var serializeAws_restJson1__listOfHlsManifestCreateOrUpdateParameters = function (input, context) {
1631
2199
  return input
1632
- .filter((e) => e != null)
1633
- .map((entry) => {
2200
+ .filter(function (e) { return e != null; })
2201
+ .map(function (entry) {
1634
2202
  return serializeAws_restJson1HlsManifestCreateOrUpdateParameters(entry, context);
1635
2203
  });
1636
2204
  };
1637
- const serializeAws_restJson1__mapOf__string = (input, context) => {
1638
- return Object.entries(input).reduce((acc, [key, value]) => {
2205
+ var serializeAws_restJson1__mapOf__string = function (input, context) {
2206
+ return Object.entries(input).reduce(function (acc, _a) {
2207
+ var _b;
2208
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1639
2209
  if (value === null) {
1640
2210
  return acc;
1641
2211
  }
1642
- return {
1643
- ...acc,
1644
- [key]: value,
1645
- };
2212
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
1646
2213
  }, {});
1647
2214
  };
1648
- const serializeAws_restJson1AdTriggers = (input, context) => {
2215
+ var serializeAws_restJson1AdTriggers = function (input, context) {
1649
2216
  return input
1650
- .filter((e) => e != null)
1651
- .map((entry) => {
2217
+ .filter(function (e) { return e != null; })
2218
+ .map(function (entry) {
1652
2219
  return entry;
1653
2220
  });
1654
2221
  };
1655
- const serializeAws_restJson1Authorization = (input, context) => {
1656
- return {
1657
- ...(input.CdnIdentifierSecret != null && { cdnIdentifierSecret: input.CdnIdentifierSecret }),
1658
- ...(input.SecretsRoleArn != null && { secretsRoleArn: input.SecretsRoleArn }),
1659
- };
1660
- };
1661
- const serializeAws_restJson1CmafEncryption = (input, context) => {
1662
- return {
1663
- ...(input.ConstantInitializationVector != null && {
1664
- constantInitializationVector: input.ConstantInitializationVector,
1665
- }),
1666
- ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }),
1667
- ...(input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }),
1668
- ...(input.SpekeKeyProvider != null && {
1669
- spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
1670
- }),
1671
- };
1672
- };
1673
- const serializeAws_restJson1CmafPackageCreateOrUpdateParameters = (input, context) => {
1674
- return {
1675
- ...(input.Encryption != null && { encryption: serializeAws_restJson1CmafEncryption(input.Encryption, context) }),
1676
- ...(input.HlsManifests != null && {
1677
- hlsManifests: serializeAws_restJson1__listOfHlsManifestCreateOrUpdateParameters(input.HlsManifests, context),
1678
- }),
1679
- ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1680
- ...(input.SegmentPrefix != null && { segmentPrefix: input.SegmentPrefix }),
1681
- ...(input.StreamSelection != null && {
1682
- streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
1683
- }),
1684
- };
1685
- };
1686
- const serializeAws_restJson1DashEncryption = (input, context) => {
1687
- return {
1688
- ...(input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }),
1689
- ...(input.SpekeKeyProvider != null && {
1690
- spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
1691
- }),
1692
- };
1693
- };
1694
- const serializeAws_restJson1DashPackage = (input, context) => {
1695
- return {
1696
- ...(input.AdTriggers != null && { adTriggers: serializeAws_restJson1AdTriggers(input.AdTriggers, context) }),
1697
- ...(input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }),
1698
- ...(input.Encryption != null && { encryption: serializeAws_restJson1DashEncryption(input.Encryption, context) }),
1699
- ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
1700
- ...(input.ManifestLayout != null && { manifestLayout: input.ManifestLayout }),
1701
- ...(input.ManifestWindowSeconds != null && { manifestWindowSeconds: input.ManifestWindowSeconds }),
1702
- ...(input.MinBufferTimeSeconds != null && { minBufferTimeSeconds: input.MinBufferTimeSeconds }),
1703
- ...(input.MinUpdatePeriodSeconds != null && { minUpdatePeriodSeconds: input.MinUpdatePeriodSeconds }),
1704
- ...(input.PeriodTriggers != null && {
1705
- periodTriggers: serializeAws_restJson1__listOf__PeriodTriggersElement(input.PeriodTriggers, context),
1706
- }),
1707
- ...(input.Profile != null && { profile: input.Profile }),
1708
- ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1709
- ...(input.SegmentTemplateFormat != null && { segmentTemplateFormat: input.SegmentTemplateFormat }),
1710
- ...(input.StreamSelection != null && {
1711
- streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
1712
- }),
1713
- ...(input.SuggestedPresentationDelaySeconds != null && {
1714
- suggestedPresentationDelaySeconds: input.SuggestedPresentationDelaySeconds,
1715
- }),
1716
- ...(input.UtcTiming != null && { utcTiming: input.UtcTiming }),
1717
- ...(input.UtcTimingUri != null && { utcTimingUri: input.UtcTimingUri }),
1718
- };
1719
- };
1720
- const serializeAws_restJson1EgressAccessLogs = (input, context) => {
1721
- return {
1722
- ...(input.LogGroupName != null && { logGroupName: input.LogGroupName }),
1723
- };
1724
- };
1725
- const serializeAws_restJson1EncryptionContractConfiguration = (input, context) => {
1726
- return {
1727
- ...(input.PresetSpeke20Audio != null && { presetSpeke20Audio: input.PresetSpeke20Audio }),
1728
- ...(input.PresetSpeke20Video != null && { presetSpeke20Video: input.PresetSpeke20Video }),
1729
- };
1730
- };
1731
- const serializeAws_restJson1HlsEncryption = (input, context) => {
1732
- return {
1733
- ...(input.ConstantInitializationVector != null && {
1734
- constantInitializationVector: input.ConstantInitializationVector,
1735
- }),
1736
- ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }),
1737
- ...(input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }),
1738
- ...(input.RepeatExtXKey != null && { repeatExtXKey: input.RepeatExtXKey }),
1739
- ...(input.SpekeKeyProvider != null && {
1740
- spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
1741
- }),
1742
- };
1743
- };
1744
- const serializeAws_restJson1HlsManifestCreateOrUpdateParameters = (input, context) => {
1745
- return {
1746
- ...(input.AdMarkers != null && { adMarkers: input.AdMarkers }),
1747
- ...(input.AdTriggers != null && { adTriggers: serializeAws_restJson1AdTriggers(input.AdTriggers, context) }),
1748
- ...(input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }),
1749
- ...(input.Id != null && { id: input.Id }),
1750
- ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
1751
- ...(input.ManifestName != null && { manifestName: input.ManifestName }),
1752
- ...(input.PlaylistType != null && { playlistType: input.PlaylistType }),
1753
- ...(input.PlaylistWindowSeconds != null && { playlistWindowSeconds: input.PlaylistWindowSeconds }),
1754
- ...(input.ProgramDateTimeIntervalSeconds != null && {
1755
- programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds,
1756
- }),
1757
- };
1758
- };
1759
- const serializeAws_restJson1HlsPackage = (input, context) => {
1760
- return {
1761
- ...(input.AdMarkers != null && { adMarkers: input.AdMarkers }),
1762
- ...(input.AdTriggers != null && { adTriggers: serializeAws_restJson1AdTriggers(input.AdTriggers, context) }),
1763
- ...(input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }),
1764
- ...(input.Encryption != null && { encryption: serializeAws_restJson1HlsEncryption(input.Encryption, context) }),
1765
- ...(input.IncludeDvbSubtitles != null && { includeDvbSubtitles: input.IncludeDvbSubtitles }),
1766
- ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }),
1767
- ...(input.PlaylistType != null && { playlistType: input.PlaylistType }),
1768
- ...(input.PlaylistWindowSeconds != null && { playlistWindowSeconds: input.PlaylistWindowSeconds }),
1769
- ...(input.ProgramDateTimeIntervalSeconds != null && {
1770
- programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds,
1771
- }),
1772
- ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1773
- ...(input.StreamSelection != null && {
1774
- streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
1775
- }),
1776
- ...(input.UseAudioRenditionGroup != null && { useAudioRenditionGroup: input.UseAudioRenditionGroup }),
1777
- };
1778
- };
1779
- const serializeAws_restJson1IngressAccessLogs = (input, context) => {
1780
- return {
1781
- ...(input.LogGroupName != null && { logGroupName: input.LogGroupName }),
1782
- };
1783
- };
1784
- const serializeAws_restJson1MssEncryption = (input, context) => {
1785
- return {
1786
- ...(input.SpekeKeyProvider != null && {
1787
- spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
1788
- }),
1789
- };
1790
- };
1791
- const serializeAws_restJson1MssPackage = (input, context) => {
1792
- return {
1793
- ...(input.Encryption != null && { encryption: serializeAws_restJson1MssEncryption(input.Encryption, context) }),
1794
- ...(input.ManifestWindowSeconds != null && { manifestWindowSeconds: input.ManifestWindowSeconds }),
1795
- ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }),
1796
- ...(input.StreamSelection != null && {
1797
- streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
1798
- }),
1799
- };
1800
- };
1801
- const serializeAws_restJson1S3Destination = (input, context) => {
1802
- return {
1803
- ...(input.BucketName != null && { bucketName: input.BucketName }),
1804
- ...(input.ManifestKey != null && { manifestKey: input.ManifestKey }),
1805
- ...(input.RoleArn != null && { roleArn: input.RoleArn }),
1806
- };
1807
- };
1808
- const serializeAws_restJson1SpekeKeyProvider = (input, context) => {
1809
- return {
1810
- ...(input.CertificateArn != null && { certificateArn: input.CertificateArn }),
1811
- ...(input.EncryptionContractConfiguration != null && {
1812
- encryptionContractConfiguration: serializeAws_restJson1EncryptionContractConfiguration(input.EncryptionContractConfiguration, context),
1813
- }),
1814
- ...(input.ResourceId != null && { resourceId: input.ResourceId }),
1815
- ...(input.RoleArn != null && { roleArn: input.RoleArn }),
1816
- ...(input.SystemIds != null && { systemIds: serializeAws_restJson1__listOf__string(input.SystemIds, context) }),
1817
- ...(input.Url != null && { url: input.Url }),
1818
- };
1819
- };
1820
- const serializeAws_restJson1StreamSelection = (input, context) => {
1821
- return {
1822
- ...(input.MaxVideoBitsPerSecond != null && { maxVideoBitsPerSecond: input.MaxVideoBitsPerSecond }),
1823
- ...(input.MinVideoBitsPerSecond != null && { minVideoBitsPerSecond: input.MinVideoBitsPerSecond }),
1824
- ...(input.StreamOrder != null && { streamOrder: input.StreamOrder }),
1825
- };
1826
- };
1827
- const serializeAws_restJson1Tags = (input, context) => {
1828
- return Object.entries(input).reduce((acc, [key, value]) => {
2222
+ var serializeAws_restJson1Authorization = function (input, context) {
2223
+ return __assign(__assign({}, (input.CdnIdentifierSecret != null && { cdnIdentifierSecret: input.CdnIdentifierSecret })), (input.SecretsRoleArn != null && { secretsRoleArn: input.SecretsRoleArn }));
2224
+ };
2225
+ var serializeAws_restJson1CmafEncryption = function (input, context) {
2226
+ return __assign(__assign(__assign(__assign({}, (input.ConstantInitializationVector != null && {
2227
+ constantInitializationVector: input.ConstantInitializationVector,
2228
+ })), (input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod })), (input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds })), (input.SpekeKeyProvider != null && {
2229
+ spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
2230
+ }));
2231
+ };
2232
+ var serializeAws_restJson1CmafPackageCreateOrUpdateParameters = function (input, context) {
2233
+ return __assign(__assign(__assign(__assign(__assign({}, (input.Encryption != null && { encryption: serializeAws_restJson1CmafEncryption(input.Encryption, context) })), (input.HlsManifests != null && {
2234
+ hlsManifests: serializeAws_restJson1__listOfHlsManifestCreateOrUpdateParameters(input.HlsManifests, context),
2235
+ })), (input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds })), (input.SegmentPrefix != null && { segmentPrefix: input.SegmentPrefix })), (input.StreamSelection != null && {
2236
+ streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
2237
+ }));
2238
+ };
2239
+ var serializeAws_restJson1DashEncryption = function (input, context) {
2240
+ return __assign(__assign({}, (input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds })), (input.SpekeKeyProvider != null && {
2241
+ spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
2242
+ }));
2243
+ };
2244
+ var serializeAws_restJson1DashPackage = function (input, context) {
2245
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AdTriggers != null && { adTriggers: serializeAws_restJson1AdTriggers(input.AdTriggers, context) })), (input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions })), (input.Encryption != null && { encryption: serializeAws_restJson1DashEncryption(input.Encryption, context) })), (input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream })), (input.ManifestLayout != null && { manifestLayout: input.ManifestLayout })), (input.ManifestWindowSeconds != null && { manifestWindowSeconds: input.ManifestWindowSeconds })), (input.MinBufferTimeSeconds != null && { minBufferTimeSeconds: input.MinBufferTimeSeconds })), (input.MinUpdatePeriodSeconds != null && { minUpdatePeriodSeconds: input.MinUpdatePeriodSeconds })), (input.PeriodTriggers != null && {
2246
+ periodTriggers: serializeAws_restJson1__listOf__PeriodTriggersElement(input.PeriodTriggers, context),
2247
+ })), (input.Profile != null && { profile: input.Profile })), (input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds })), (input.SegmentTemplateFormat != null && { segmentTemplateFormat: input.SegmentTemplateFormat })), (input.StreamSelection != null && {
2248
+ streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
2249
+ })), (input.SuggestedPresentationDelaySeconds != null && {
2250
+ suggestedPresentationDelaySeconds: input.SuggestedPresentationDelaySeconds,
2251
+ })), (input.UtcTiming != null && { utcTiming: input.UtcTiming })), (input.UtcTimingUri != null && { utcTimingUri: input.UtcTimingUri }));
2252
+ };
2253
+ var serializeAws_restJson1EgressAccessLogs = function (input, context) {
2254
+ return __assign({}, (input.LogGroupName != null && { logGroupName: input.LogGroupName }));
2255
+ };
2256
+ var serializeAws_restJson1EncryptionContractConfiguration = function (input, context) {
2257
+ return __assign(__assign({}, (input.PresetSpeke20Audio != null && { presetSpeke20Audio: input.PresetSpeke20Audio })), (input.PresetSpeke20Video != null && { presetSpeke20Video: input.PresetSpeke20Video }));
2258
+ };
2259
+ var serializeAws_restJson1HlsEncryption = function (input, context) {
2260
+ return __assign(__assign(__assign(__assign(__assign({}, (input.ConstantInitializationVector != null && {
2261
+ constantInitializationVector: input.ConstantInitializationVector,
2262
+ })), (input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod })), (input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds })), (input.RepeatExtXKey != null && { repeatExtXKey: input.RepeatExtXKey })), (input.SpekeKeyProvider != null && {
2263
+ spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
2264
+ }));
2265
+ };
2266
+ var serializeAws_restJson1HlsManifestCreateOrUpdateParameters = function (input, context) {
2267
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AdMarkers != null && { adMarkers: input.AdMarkers })), (input.AdTriggers != null && { adTriggers: serializeAws_restJson1AdTriggers(input.AdTriggers, context) })), (input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions })), (input.Id != null && { id: input.Id })), (input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream })), (input.ManifestName != null && { manifestName: input.ManifestName })), (input.PlaylistType != null && { playlistType: input.PlaylistType })), (input.PlaylistWindowSeconds != null && { playlistWindowSeconds: input.PlaylistWindowSeconds })), (input.ProgramDateTimeIntervalSeconds != null && {
2268
+ programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds,
2269
+ }));
2270
+ };
2271
+ var serializeAws_restJson1HlsPackage = function (input, context) {
2272
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AdMarkers != null && { adMarkers: input.AdMarkers })), (input.AdTriggers != null && { adTriggers: serializeAws_restJson1AdTriggers(input.AdTriggers, context) })), (input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions })), (input.Encryption != null && { encryption: serializeAws_restJson1HlsEncryption(input.Encryption, context) })), (input.IncludeDvbSubtitles != null && { includeDvbSubtitles: input.IncludeDvbSubtitles })), (input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream })), (input.PlaylistType != null && { playlistType: input.PlaylistType })), (input.PlaylistWindowSeconds != null && { playlistWindowSeconds: input.PlaylistWindowSeconds })), (input.ProgramDateTimeIntervalSeconds != null && {
2273
+ programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds,
2274
+ })), (input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds })), (input.StreamSelection != null && {
2275
+ streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
2276
+ })), (input.UseAudioRenditionGroup != null && { useAudioRenditionGroup: input.UseAudioRenditionGroup }));
2277
+ };
2278
+ var serializeAws_restJson1IngressAccessLogs = function (input, context) {
2279
+ return __assign({}, (input.LogGroupName != null && { logGroupName: input.LogGroupName }));
2280
+ };
2281
+ var serializeAws_restJson1MssEncryption = function (input, context) {
2282
+ return __assign({}, (input.SpekeKeyProvider != null && {
2283
+ spekeKeyProvider: serializeAws_restJson1SpekeKeyProvider(input.SpekeKeyProvider, context),
2284
+ }));
2285
+ };
2286
+ var serializeAws_restJson1MssPackage = function (input, context) {
2287
+ return __assign(__assign(__assign(__assign({}, (input.Encryption != null && { encryption: serializeAws_restJson1MssEncryption(input.Encryption, context) })), (input.ManifestWindowSeconds != null && { manifestWindowSeconds: input.ManifestWindowSeconds })), (input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds })), (input.StreamSelection != null && {
2288
+ streamSelection: serializeAws_restJson1StreamSelection(input.StreamSelection, context),
2289
+ }));
2290
+ };
2291
+ var serializeAws_restJson1S3Destination = function (input, context) {
2292
+ return __assign(__assign(__assign({}, (input.BucketName != null && { bucketName: input.BucketName })), (input.ManifestKey != null && { manifestKey: input.ManifestKey })), (input.RoleArn != null && { roleArn: input.RoleArn }));
2293
+ };
2294
+ var serializeAws_restJson1SpekeKeyProvider = function (input, context) {
2295
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.CertificateArn != null && { certificateArn: input.CertificateArn })), (input.EncryptionContractConfiguration != null && {
2296
+ encryptionContractConfiguration: serializeAws_restJson1EncryptionContractConfiguration(input.EncryptionContractConfiguration, context),
2297
+ })), (input.ResourceId != null && { resourceId: input.ResourceId })), (input.RoleArn != null && { roleArn: input.RoleArn })), (input.SystemIds != null && { systemIds: serializeAws_restJson1__listOf__string(input.SystemIds, context) })), (input.Url != null && { url: input.Url }));
2298
+ };
2299
+ var serializeAws_restJson1StreamSelection = function (input, context) {
2300
+ return __assign(__assign(__assign({}, (input.MaxVideoBitsPerSecond != null && { maxVideoBitsPerSecond: input.MaxVideoBitsPerSecond })), (input.MinVideoBitsPerSecond != null && { minVideoBitsPerSecond: input.MinVideoBitsPerSecond })), (input.StreamOrder != null && { streamOrder: input.StreamOrder }));
2301
+ };
2302
+ var serializeAws_restJson1Tags = function (input, context) {
2303
+ return Object.entries(input).reduce(function (acc, _a) {
2304
+ var _b;
2305
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1829
2306
  if (value === null) {
1830
2307
  return acc;
1831
2308
  }
1832
- return {
1833
- ...acc,
1834
- [key]: value,
1835
- };
2309
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
1836
2310
  }, {});
1837
2311
  };
1838
- const deserializeAws_restJson1__listOf__PeriodTriggersElement = (output, context) => {
1839
- const retVal = (output || [])
1840
- .filter((e) => e != null)
1841
- .map((entry) => {
2312
+ var deserializeAws_restJson1__listOf__PeriodTriggersElement = function (output, context) {
2313
+ var retVal = (output || [])
2314
+ .filter(function (e) { return e != null; })
2315
+ .map(function (entry) {
1842
2316
  if (entry === null) {
1843
2317
  return null;
1844
2318
  }
@@ -1846,10 +2320,10 @@ const deserializeAws_restJson1__listOf__PeriodTriggersElement = (output, context
1846
2320
  });
1847
2321
  return retVal;
1848
2322
  };
1849
- const deserializeAws_restJson1__listOf__string = (output, context) => {
1850
- const retVal = (output || [])
1851
- .filter((e) => e != null)
1852
- .map((entry) => {
2323
+ var deserializeAws_restJson1__listOf__string = function (output, context) {
2324
+ var retVal = (output || [])
2325
+ .filter(function (e) { return e != null; })
2326
+ .map(function (entry) {
1853
2327
  if (entry === null) {
1854
2328
  return null;
1855
2329
  }
@@ -1857,10 +2331,10 @@ const deserializeAws_restJson1__listOf__string = (output, context) => {
1857
2331
  });
1858
2332
  return retVal;
1859
2333
  };
1860
- const deserializeAws_restJson1__listOfChannel = (output, context) => {
1861
- const retVal = (output || [])
1862
- .filter((e) => e != null)
1863
- .map((entry) => {
2334
+ var deserializeAws_restJson1__listOfChannel = function (output, context) {
2335
+ var retVal = (output || [])
2336
+ .filter(function (e) { return e != null; })
2337
+ .map(function (entry) {
1864
2338
  if (entry === null) {
1865
2339
  return null;
1866
2340
  }
@@ -1868,10 +2342,10 @@ const deserializeAws_restJson1__listOfChannel = (output, context) => {
1868
2342
  });
1869
2343
  return retVal;
1870
2344
  };
1871
- const deserializeAws_restJson1__listOfHarvestJob = (output, context) => {
1872
- const retVal = (output || [])
1873
- .filter((e) => e != null)
1874
- .map((entry) => {
2345
+ var deserializeAws_restJson1__listOfHarvestJob = function (output, context) {
2346
+ var retVal = (output || [])
2347
+ .filter(function (e) { return e != null; })
2348
+ .map(function (entry) {
1875
2349
  if (entry === null) {
1876
2350
  return null;
1877
2351
  }
@@ -1879,10 +2353,10 @@ const deserializeAws_restJson1__listOfHarvestJob = (output, context) => {
1879
2353
  });
1880
2354
  return retVal;
1881
2355
  };
1882
- const deserializeAws_restJson1__listOfHlsManifest = (output, context) => {
1883
- const retVal = (output || [])
1884
- .filter((e) => e != null)
1885
- .map((entry) => {
2356
+ var deserializeAws_restJson1__listOfHlsManifest = function (output, context) {
2357
+ var retVal = (output || [])
2358
+ .filter(function (e) { return e != null; })
2359
+ .map(function (entry) {
1886
2360
  if (entry === null) {
1887
2361
  return null;
1888
2362
  }
@@ -1890,10 +2364,10 @@ const deserializeAws_restJson1__listOfHlsManifest = (output, context) => {
1890
2364
  });
1891
2365
  return retVal;
1892
2366
  };
1893
- const deserializeAws_restJson1__listOfIngestEndpoint = (output, context) => {
1894
- const retVal = (output || [])
1895
- .filter((e) => e != null)
1896
- .map((entry) => {
2367
+ var deserializeAws_restJson1__listOfIngestEndpoint = function (output, context) {
2368
+ var retVal = (output || [])
2369
+ .filter(function (e) { return e != null; })
2370
+ .map(function (entry) {
1897
2371
  if (entry === null) {
1898
2372
  return null;
1899
2373
  }
@@ -1901,10 +2375,10 @@ const deserializeAws_restJson1__listOfIngestEndpoint = (output, context) => {
1901
2375
  });
1902
2376
  return retVal;
1903
2377
  };
1904
- const deserializeAws_restJson1__listOfOriginEndpoint = (output, context) => {
1905
- const retVal = (output || [])
1906
- .filter((e) => e != null)
1907
- .map((entry) => {
2378
+ var deserializeAws_restJson1__listOfOriginEndpoint = function (output, context) {
2379
+ var retVal = (output || [])
2380
+ .filter(function (e) { return e != null; })
2381
+ .map(function (entry) {
1908
2382
  if (entry === null) {
1909
2383
  return null;
1910
2384
  }
@@ -1912,21 +2386,20 @@ const deserializeAws_restJson1__listOfOriginEndpoint = (output, context) => {
1912
2386
  });
1913
2387
  return retVal;
1914
2388
  };
1915
- const deserializeAws_restJson1__mapOf__string = (output, context) => {
1916
- return Object.entries(output).reduce((acc, [key, value]) => {
2389
+ var deserializeAws_restJson1__mapOf__string = function (output, context) {
2390
+ return Object.entries(output).reduce(function (acc, _a) {
2391
+ var _b;
2392
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1917
2393
  if (value === null) {
1918
2394
  return acc;
1919
2395
  }
1920
- return {
1921
- ...acc,
1922
- [key]: __expectString(value),
1923
- };
2396
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1924
2397
  }, {});
1925
2398
  };
1926
- const deserializeAws_restJson1AdTriggers = (output, context) => {
1927
- const retVal = (output || [])
1928
- .filter((e) => e != null)
1929
- .map((entry) => {
2399
+ var deserializeAws_restJson1AdTriggers = function (output, context) {
2400
+ var retVal = (output || [])
2401
+ .filter(function (e) { return e != null; })
2402
+ .map(function (entry) {
1930
2403
  if (entry === null) {
1931
2404
  return null;
1932
2405
  }
@@ -1934,13 +2407,13 @@ const deserializeAws_restJson1AdTriggers = (output, context) => {
1934
2407
  });
1935
2408
  return retVal;
1936
2409
  };
1937
- const deserializeAws_restJson1Authorization = (output, context) => {
2410
+ var deserializeAws_restJson1Authorization = function (output, context) {
1938
2411
  return {
1939
2412
  CdnIdentifierSecret: __expectString(output.cdnIdentifierSecret),
1940
2413
  SecretsRoleArn: __expectString(output.secretsRoleArn),
1941
2414
  };
1942
2415
  };
1943
- const deserializeAws_restJson1Channel = (output, context) => {
2416
+ var deserializeAws_restJson1Channel = function (output, context) {
1944
2417
  return {
1945
2418
  Arn: __expectString(output.arn),
1946
2419
  Description: __expectString(output.description),
@@ -1955,7 +2428,7 @@ const deserializeAws_restJson1Channel = (output, context) => {
1955
2428
  Tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
1956
2429
  };
1957
2430
  };
1958
- const deserializeAws_restJson1CmafEncryption = (output, context) => {
2431
+ var deserializeAws_restJson1CmafEncryption = function (output, context) {
1959
2432
  return {
1960
2433
  ConstantInitializationVector: __expectString(output.constantInitializationVector),
1961
2434
  EncryptionMethod: __expectString(output.encryptionMethod),
@@ -1965,7 +2438,7 @@ const deserializeAws_restJson1CmafEncryption = (output, context) => {
1965
2438
  : undefined,
1966
2439
  };
1967
2440
  };
1968
- const deserializeAws_restJson1CmafPackage = (output, context) => {
2441
+ var deserializeAws_restJson1CmafPackage = function (output, context) {
1969
2442
  return {
1970
2443
  Encryption: output.encryption != null ? deserializeAws_restJson1CmafEncryption(output.encryption, context) : undefined,
1971
2444
  HlsManifests: output.hlsManifests != null
@@ -1978,7 +2451,7 @@ const deserializeAws_restJson1CmafPackage = (output, context) => {
1978
2451
  : undefined,
1979
2452
  };
1980
2453
  };
1981
- const deserializeAws_restJson1DashEncryption = (output, context) => {
2454
+ var deserializeAws_restJson1DashEncryption = function (output, context) {
1982
2455
  return {
1983
2456
  KeyRotationIntervalSeconds: __expectInt32(output.keyRotationIntervalSeconds),
1984
2457
  SpekeKeyProvider: output.spekeKeyProvider != null
@@ -1986,7 +2459,7 @@ const deserializeAws_restJson1DashEncryption = (output, context) => {
1986
2459
  : undefined,
1987
2460
  };
1988
2461
  };
1989
- const deserializeAws_restJson1DashPackage = (output, context) => {
2462
+ var deserializeAws_restJson1DashPackage = function (output, context) {
1990
2463
  return {
1991
2464
  AdTriggers: output.adTriggers != null ? deserializeAws_restJson1AdTriggers(output.adTriggers, context) : undefined,
1992
2465
  AdsOnDeliveryRestrictions: __expectString(output.adsOnDeliveryRestrictions),
@@ -2010,18 +2483,18 @@ const deserializeAws_restJson1DashPackage = (output, context) => {
2010
2483
  UtcTimingUri: __expectString(output.utcTimingUri),
2011
2484
  };
2012
2485
  };
2013
- const deserializeAws_restJson1EgressAccessLogs = (output, context) => {
2486
+ var deserializeAws_restJson1EgressAccessLogs = function (output, context) {
2014
2487
  return {
2015
2488
  LogGroupName: __expectString(output.logGroupName),
2016
2489
  };
2017
2490
  };
2018
- const deserializeAws_restJson1EncryptionContractConfiguration = (output, context) => {
2491
+ var deserializeAws_restJson1EncryptionContractConfiguration = function (output, context) {
2019
2492
  return {
2020
2493
  PresetSpeke20Audio: __expectString(output.presetSpeke20Audio),
2021
2494
  PresetSpeke20Video: __expectString(output.presetSpeke20Video),
2022
2495
  };
2023
2496
  };
2024
- const deserializeAws_restJson1HarvestJob = (output, context) => {
2497
+ var deserializeAws_restJson1HarvestJob = function (output, context) {
2025
2498
  return {
2026
2499
  Arn: __expectString(output.arn),
2027
2500
  ChannelId: __expectString(output.channelId),
@@ -2034,7 +2507,7 @@ const deserializeAws_restJson1HarvestJob = (output, context) => {
2034
2507
  Status: __expectString(output.status),
2035
2508
  };
2036
2509
  };
2037
- const deserializeAws_restJson1HlsEncryption = (output, context) => {
2510
+ var deserializeAws_restJson1HlsEncryption = function (output, context) {
2038
2511
  return {
2039
2512
  ConstantInitializationVector: __expectString(output.constantInitializationVector),
2040
2513
  EncryptionMethod: __expectString(output.encryptionMethod),
@@ -2045,14 +2518,14 @@ const deserializeAws_restJson1HlsEncryption = (output, context) => {
2045
2518
  : undefined,
2046
2519
  };
2047
2520
  };
2048
- const deserializeAws_restJson1HlsIngest = (output, context) => {
2521
+ var deserializeAws_restJson1HlsIngest = function (output, context) {
2049
2522
  return {
2050
2523
  IngestEndpoints: output.ingestEndpoints != null
2051
2524
  ? deserializeAws_restJson1__listOfIngestEndpoint(output.ingestEndpoints, context)
2052
2525
  : undefined,
2053
2526
  };
2054
2527
  };
2055
- const deserializeAws_restJson1HlsManifest = (output, context) => {
2528
+ var deserializeAws_restJson1HlsManifest = function (output, context) {
2056
2529
  return {
2057
2530
  AdMarkers: __expectString(output.adMarkers),
2058
2531
  AdTriggers: output.adTriggers != null ? deserializeAws_restJson1AdTriggers(output.adTriggers, context) : undefined,
@@ -2066,7 +2539,7 @@ const deserializeAws_restJson1HlsManifest = (output, context) => {
2066
2539
  Url: __expectString(output.url),
2067
2540
  };
2068
2541
  };
2069
- const deserializeAws_restJson1HlsPackage = (output, context) => {
2542
+ var deserializeAws_restJson1HlsPackage = function (output, context) {
2070
2543
  return {
2071
2544
  AdMarkers: __expectString(output.adMarkers),
2072
2545
  AdTriggers: output.adTriggers != null ? deserializeAws_restJson1AdTriggers(output.adTriggers, context) : undefined,
@@ -2084,7 +2557,7 @@ const deserializeAws_restJson1HlsPackage = (output, context) => {
2084
2557
  UseAudioRenditionGroup: __expectBoolean(output.useAudioRenditionGroup),
2085
2558
  };
2086
2559
  };
2087
- const deserializeAws_restJson1IngestEndpoint = (output, context) => {
2560
+ var deserializeAws_restJson1IngestEndpoint = function (output, context) {
2088
2561
  return {
2089
2562
  Id: __expectString(output.id),
2090
2563
  Password: __expectString(output.password),
@@ -2092,19 +2565,19 @@ const deserializeAws_restJson1IngestEndpoint = (output, context) => {
2092
2565
  Username: __expectString(output.username),
2093
2566
  };
2094
2567
  };
2095
- const deserializeAws_restJson1IngressAccessLogs = (output, context) => {
2568
+ var deserializeAws_restJson1IngressAccessLogs = function (output, context) {
2096
2569
  return {
2097
2570
  LogGroupName: __expectString(output.logGroupName),
2098
2571
  };
2099
2572
  };
2100
- const deserializeAws_restJson1MssEncryption = (output, context) => {
2573
+ var deserializeAws_restJson1MssEncryption = function (output, context) {
2101
2574
  return {
2102
2575
  SpekeKeyProvider: output.spekeKeyProvider != null
2103
2576
  ? deserializeAws_restJson1SpekeKeyProvider(output.spekeKeyProvider, context)
2104
2577
  : undefined,
2105
2578
  };
2106
2579
  };
2107
- const deserializeAws_restJson1MssPackage = (output, context) => {
2580
+ var deserializeAws_restJson1MssPackage = function (output, context) {
2108
2581
  return {
2109
2582
  Encryption: output.encryption != null ? deserializeAws_restJson1MssEncryption(output.encryption, context) : undefined,
2110
2583
  ManifestWindowSeconds: __expectInt32(output.manifestWindowSeconds),
@@ -2114,7 +2587,7 @@ const deserializeAws_restJson1MssPackage = (output, context) => {
2114
2587
  : undefined,
2115
2588
  };
2116
2589
  };
2117
- const deserializeAws_restJson1OriginEndpoint = (output, context) => {
2590
+ var deserializeAws_restJson1OriginEndpoint = function (output, context) {
2118
2591
  return {
2119
2592
  Arn: __expectString(output.arn),
2120
2593
  Authorization: output.authorization != null ? deserializeAws_restJson1Authorization(output.authorization, context) : undefined,
@@ -2134,14 +2607,14 @@ const deserializeAws_restJson1OriginEndpoint = (output, context) => {
2134
2607
  Whitelist: output.whitelist != null ? deserializeAws_restJson1__listOf__string(output.whitelist, context) : undefined,
2135
2608
  };
2136
2609
  };
2137
- const deserializeAws_restJson1S3Destination = (output, context) => {
2610
+ var deserializeAws_restJson1S3Destination = function (output, context) {
2138
2611
  return {
2139
2612
  BucketName: __expectString(output.bucketName),
2140
2613
  ManifestKey: __expectString(output.manifestKey),
2141
2614
  RoleArn: __expectString(output.roleArn),
2142
2615
  };
2143
2616
  };
2144
- const deserializeAws_restJson1SpekeKeyProvider = (output, context) => {
2617
+ var deserializeAws_restJson1SpekeKeyProvider = function (output, context) {
2145
2618
  return {
2146
2619
  CertificateArn: __expectString(output.certificateArn),
2147
2620
  EncryptionContractConfiguration: output.encryptionContractConfiguration != null
@@ -2153,57 +2626,74 @@ const deserializeAws_restJson1SpekeKeyProvider = (output, context) => {
2153
2626
  Url: __expectString(output.url),
2154
2627
  };
2155
2628
  };
2156
- const deserializeAws_restJson1StreamSelection = (output, context) => {
2629
+ var deserializeAws_restJson1StreamSelection = function (output, context) {
2157
2630
  return {
2158
2631
  MaxVideoBitsPerSecond: __expectInt32(output.maxVideoBitsPerSecond),
2159
2632
  MinVideoBitsPerSecond: __expectInt32(output.minVideoBitsPerSecond),
2160
2633
  StreamOrder: __expectString(output.streamOrder),
2161
2634
  };
2162
2635
  };
2163
- const deserializeAws_restJson1Tags = (output, context) => {
2164
- return Object.entries(output).reduce((acc, [key, value]) => {
2636
+ var deserializeAws_restJson1Tags = function (output, context) {
2637
+ return Object.entries(output).reduce(function (acc, _a) {
2638
+ var _b;
2639
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
2165
2640
  if (value === null) {
2166
2641
  return acc;
2167
2642
  }
2168
- return {
2169
- ...acc,
2170
- [key]: __expectString(value),
2171
- };
2643
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
2172
2644
  }, {});
2173
2645
  };
2174
- const deserializeMetadata = (output) => ({
2175
- httpStatusCode: output.statusCode,
2176
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2177
- extendedRequestId: output.headers["x-amz-id-2"],
2178
- cfId: output.headers["x-amz-cf-id"],
2179
- });
2180
- const collectBody = (streamBody = new Uint8Array(), context) => {
2646
+ var deserializeMetadata = function (output) {
2647
+ var _a, _b;
2648
+ return ({
2649
+ httpStatusCode: output.statusCode,
2650
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
2651
+ extendedRequestId: output.headers["x-amz-id-2"],
2652
+ cfId: output.headers["x-amz-cf-id"],
2653
+ });
2654
+ };
2655
+ var collectBody = function (streamBody, context) {
2656
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
2181
2657
  if (streamBody instanceof Uint8Array) {
2182
2658
  return Promise.resolve(streamBody);
2183
2659
  }
2184
2660
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2185
2661
  };
2186
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2187
- const isSerializableHeaderValue = (value) => value !== undefined &&
2188
- value !== null &&
2189
- value !== "" &&
2190
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2191
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2192
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2193
- if (encoded.length) {
2194
- return JSON.parse(encoded);
2195
- }
2196
- return {};
2197
- });
2198
- const parseErrorBody = async (errorBody, context) => {
2199
- const value = await parseBody(errorBody, context);
2200
- value.message = value.message ?? value.Message;
2201
- return value;
2662
+ var collectBodyString = function (streamBody, context) {
2663
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2664
+ };
2665
+ var isSerializableHeaderValue = function (value) {
2666
+ return value !== undefined &&
2667
+ value !== null &&
2668
+ value !== "" &&
2669
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2670
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2202
2671
  };
2203
- const loadRestJsonErrorCode = (output, data) => {
2204
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2205
- const sanitizeErrorCode = (rawValue) => {
2206
- let cleanValue = rawValue;
2672
+ var parseBody = function (streamBody, context) {
2673
+ return collectBodyString(streamBody, context).then(function (encoded) {
2674
+ if (encoded.length) {
2675
+ return JSON.parse(encoded);
2676
+ }
2677
+ return {};
2678
+ });
2679
+ };
2680
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2681
+ var value;
2682
+ var _a;
2683
+ return __generator(this, function (_b) {
2684
+ switch (_b.label) {
2685
+ case 0: return [4, parseBody(errorBody, context)];
2686
+ case 1:
2687
+ value = _b.sent();
2688
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2689
+ return [2, value];
2690
+ }
2691
+ });
2692
+ }); };
2693
+ var loadRestJsonErrorCode = function (output, data) {
2694
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2695
+ var sanitizeErrorCode = function (rawValue) {
2696
+ var cleanValue = rawValue;
2207
2697
  if (typeof cleanValue === "number") {
2208
2698
  cleanValue = cleanValue.toString();
2209
2699
  }
@@ -2218,7 +2708,7 @@ const loadRestJsonErrorCode = (output, data) => {
2218
2708
  }
2219
2709
  return cleanValue;
2220
2710
  };
2221
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2711
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
2222
2712
  if (headerKey !== undefined) {
2223
2713
  return sanitizeErrorCode(output.headers[headerKey]);
2224
2714
  }