@aws-sdk/client-chime-sdk-media-pipelines 3.181.0 → 3.183.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 (26) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist-es/ChimeSDKMediaPipelines.js +50 -57
  3. package/dist-es/ChimeSDKMediaPipelinesClient.js +22 -28
  4. package/dist-es/commands/CreateMediaCapturePipelineCommand.js +21 -28
  5. package/dist-es/commands/CreateMediaConcatenationPipelineCommand.js +21 -28
  6. package/dist-es/commands/CreateMediaLiveConnectorPipelineCommand.js +21 -28
  7. package/dist-es/commands/DeleteMediaCapturePipelineCommand.js +22 -29
  8. package/dist-es/commands/DeleteMediaPipelineCommand.js +22 -29
  9. package/dist-es/commands/GetMediaCapturePipelineCommand.js +21 -28
  10. package/dist-es/commands/GetMediaPipelineCommand.js +21 -28
  11. package/dist-es/commands/ListMediaCapturePipelinesCommand.js +21 -28
  12. package/dist-es/commands/ListMediaPipelinesCommand.js +21 -28
  13. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  14. package/dist-es/commands/TagResourceCommand.js +21 -28
  15. package/dist-es/commands/UntagResourceCommand.js +21 -28
  16. package/dist-es/endpoints.js +8 -8
  17. package/dist-es/models/ChimeSDKMediaPipelinesServiceException.js +5 -10
  18. package/dist-es/models/models_0.js +349 -201
  19. package/dist-es/pagination/ListMediaCapturePipelinesPaginator.js +25 -68
  20. package/dist-es/pagination/ListMediaPipelinesPaginator.js +25 -68
  21. package/dist-es/protocols/Aws_restJson1.js +1294 -1621
  22. package/dist-es/runtimeConfig.browser.js +26 -12
  23. package/dist-es/runtimeConfig.js +30 -12
  24. package/dist-es/runtimeConfig.native.js +8 -5
  25. package/dist-es/runtimeConfig.shared.js +8 -11
  26. package/package.json +33 -33
@@ -1,1583 +1,1274 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
2
  import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { v4 as generateIdempotencyToken } from "uuid";
5
4
  import { ChimeSDKMediaPipelinesServiceException as __BaseException } from "../models/ChimeSDKMediaPipelinesServiceException";
6
5
  import { BadRequestException, ForbiddenException, NotFoundException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, } from "../models/models_0";
7
- export var serializeAws_restJson1CreateMediaCapturePipelineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
8
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
9
- var _c;
10
- return __generator(this, function (_d) {
11
- switch (_d.label) {
12
- case 0: return [4, context.endpoint()];
13
- case 1:
14
- _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
15
- headers = {
16
- "content-type": "application/json",
17
- };
18
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sdk-media-capture-pipelines";
19
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ChimeSdkMeetingConfiguration != null && {
20
- ChimeSdkMeetingConfiguration: serializeAws_restJson1ChimeSdkMeetingConfiguration(input.ChimeSdkMeetingConfiguration, context),
21
- })), { ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.SinkArn != null && { SinkArn: input.SinkArn })), (input.SinkType != null && { SinkType: input.SinkType })), (input.SourceArn != null && { SourceArn: input.SourceArn })), (input.SourceType != null && { SourceType: input.SourceType })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
22
- return [2, new __HttpRequest({
23
- protocol: protocol,
24
- hostname: hostname,
25
- port: port,
26
- method: "POST",
27
- headers: headers,
28
- path: resolvedPath,
29
- body: body,
30
- })];
31
- }
32
- });
33
- }); };
34
- export var serializeAws_restJson1CreateMediaConcatenationPipelineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
35
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
36
- var _c;
37
- return __generator(this, function (_d) {
38
- switch (_d.label) {
39
- case 0: return [4, context.endpoint()];
40
- case 1:
41
- _a = _d.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 || "") + "/sdk-media-concatenation-pipelines";
46
- body = JSON.stringify(__assign(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Sinks != null && { Sinks: serializeAws_restJson1ConcatenationSinkList(input.Sinks, context) })), (input.Sources != null && { Sources: serializeAws_restJson1ConcatenationSourceList(input.Sources, context) })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(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
- }
57
- });
58
- }); };
59
- export var serializeAws_restJson1CreateMediaLiveConnectorPipelineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
60
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
61
- var _c;
62
- return __generator(this, function (_d) {
63
- switch (_d.label) {
64
- case 0: return [4, context.endpoint()];
65
- case 1:
66
- _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
67
- headers = {
68
- "content-type": "application/json",
69
- };
70
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sdk-media-live-connector-pipelines";
71
- body = JSON.stringify(__assign(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Sinks != null && { Sinks: serializeAws_restJson1LiveConnectorSinkList(input.Sinks, context) })), (input.Sources != null && { Sources: serializeAws_restJson1LiveConnectorSourceList(input.Sources, context) })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
72
- return [2, new __HttpRequest({
73
- protocol: protocol,
74
- hostname: hostname,
75
- port: port,
76
- method: "POST",
77
- headers: headers,
78
- path: resolvedPath,
79
- body: body,
80
- })];
81
- }
82
- });
83
- }); };
84
- export var serializeAws_restJson1DeleteMediaCapturePipelineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
85
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
86
- return __generator(this, function (_c) {
87
- switch (_c.label) {
88
- case 0: return [4, context.endpoint()];
89
- case 1:
90
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
91
- headers = {};
92
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
93
- "/sdk-media-capture-pipelines/{MediaPipelineId}";
94
- resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", function () { return input.MediaPipelineId; }, "{MediaPipelineId}", false);
95
- return [2, new __HttpRequest({
96
- protocol: protocol,
97
- hostname: hostname,
98
- port: port,
99
- method: "DELETE",
100
- headers: headers,
101
- path: resolvedPath,
102
- body: body,
103
- })];
104
- }
105
- });
106
- }); };
107
- export var serializeAws_restJson1DeleteMediaPipelineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
108
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
109
- return __generator(this, function (_c) {
110
- switch (_c.label) {
111
- case 0: return [4, context.endpoint()];
112
- case 1:
113
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
114
- headers = {};
115
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sdk-media-pipelines/{MediaPipelineId}";
116
- resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", function () { return input.MediaPipelineId; }, "{MediaPipelineId}", false);
117
- return [2, new __HttpRequest({
118
- protocol: protocol,
119
- hostname: hostname,
120
- port: port,
121
- method: "DELETE",
122
- headers: headers,
123
- path: resolvedPath,
124
- body: body,
125
- })];
126
- }
127
- });
128
- }); };
129
- export var serializeAws_restJson1GetMediaCapturePipelineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
130
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
131
- return __generator(this, function (_c) {
132
- switch (_c.label) {
133
- case 0: return [4, context.endpoint()];
134
- case 1:
135
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
136
- headers = {};
137
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
138
- "/sdk-media-capture-pipelines/{MediaPipelineId}";
139
- resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", function () { return input.MediaPipelineId; }, "{MediaPipelineId}", false);
140
- return [2, new __HttpRequest({
141
- protocol: protocol,
142
- hostname: hostname,
143
- port: port,
144
- method: "GET",
145
- headers: headers,
146
- path: resolvedPath,
147
- body: body,
148
- })];
149
- }
150
- });
151
- }); };
152
- export var serializeAws_restJson1GetMediaPipelineCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
153
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
154
- return __generator(this, function (_c) {
155
- switch (_c.label) {
156
- case 0: return [4, context.endpoint()];
157
- case 1:
158
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
159
- headers = {};
160
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sdk-media-pipelines/{MediaPipelineId}";
161
- resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", function () { return input.MediaPipelineId; }, "{MediaPipelineId}", false);
162
- return [2, new __HttpRequest({
163
- protocol: protocol,
164
- hostname: hostname,
165
- port: port,
166
- method: "GET",
167
- headers: headers,
168
- path: resolvedPath,
169
- body: body,
170
- })];
171
- }
172
- });
173
- }); };
174
- export var serializeAws_restJson1ListMediaCapturePipelinesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
175
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
176
- return __generator(this, function (_c) {
177
- switch (_c.label) {
178
- case 0: return [4, context.endpoint()];
179
- case 1:
180
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
181
- headers = {};
182
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sdk-media-capture-pipelines";
183
- query = map({
184
- "next-token": [, input.NextToken],
185
- "max-results": [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
186
- });
187
- return [2, new __HttpRequest({
188
- protocol: protocol,
189
- hostname: hostname,
190
- port: port,
191
- method: "GET",
192
- headers: headers,
193
- path: resolvedPath,
194
- query: query,
195
- body: body,
196
- })];
197
- }
198
- });
199
- }); };
200
- export var serializeAws_restJson1ListMediaPipelinesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
201
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
202
- return __generator(this, function (_c) {
203
- switch (_c.label) {
204
- case 0: return [4, context.endpoint()];
205
- case 1:
206
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
207
- headers = {};
208
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sdk-media-pipelines";
209
- query = map({
210
- "next-token": [, input.NextToken],
211
- "max-results": [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
212
- });
213
- return [2, new __HttpRequest({
214
- protocol: protocol,
215
- hostname: hostname,
216
- port: port,
217
- method: "GET",
218
- headers: headers,
219
- path: resolvedPath,
220
- query: query,
221
- body: body,
222
- })];
223
- }
224
- });
225
- }); };
226
- export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
227
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
228
- return __generator(this, function (_c) {
229
- switch (_c.label) {
230
- case 0: return [4, context.endpoint()];
231
- case 1:
232
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
233
- headers = {};
234
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags";
235
- query = map({
236
- arn: [, input.ResourceARN],
237
- });
238
- return [2, new __HttpRequest({
239
- protocol: protocol,
240
- hostname: hostname,
241
- port: port,
242
- method: "GET",
243
- headers: headers,
244
- path: resolvedPath,
245
- query: query,
246
- body: body,
247
- })];
248
- }
249
- });
250
- }); };
251
- export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
252
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
253
- return __generator(this, function (_c) {
254
- switch (_c.label) {
255
- case 0: return [4, context.endpoint()];
256
- case 1:
257
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
258
- headers = {
259
- "content-type": "application/json",
260
- };
261
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags";
262
- query = map({
263
- operation: [, "tag-resource"],
264
- });
265
- body = JSON.stringify(__assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
266
- return [2, new __HttpRequest({
267
- protocol: protocol,
268
- hostname: hostname,
269
- port: port,
270
- method: "POST",
271
- headers: headers,
272
- path: resolvedPath,
273
- query: query,
274
- body: body,
275
- })];
276
- }
277
- });
278
- }); };
279
- export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
280
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
281
- return __generator(this, function (_c) {
282
- switch (_c.label) {
283
- case 0: return [4, context.endpoint()];
284
- case 1:
285
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
286
- headers = {
287
- "content-type": "application/json",
288
- };
289
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags";
290
- query = map({
291
- operation: [, "untag-resource"],
292
- });
293
- body = JSON.stringify(__assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) })));
294
- return [2, new __HttpRequest({
295
- protocol: protocol,
296
- hostname: hostname,
297
- port: port,
298
- method: "POST",
299
- headers: headers,
300
- path: resolvedPath,
301
- query: query,
302
- body: body,
303
- })];
304
- }
305
- });
306
- }); };
307
- export var deserializeAws_restJson1CreateMediaCapturePipelineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
308
- var contents, data, _a, _b;
309
- return __generator(this, function (_c) {
310
- switch (_c.label) {
311
- case 0:
312
- if (output.statusCode !== 201 && output.statusCode >= 300) {
313
- return [2, deserializeAws_restJson1CreateMediaCapturePipelineCommandError(output, context)];
314
- }
315
- contents = map({
316
- $metadata: deserializeMetadata(output),
317
- });
318
- _a = __expectNonNull;
319
- _b = __expectObject;
320
- return [4, parseBody(output.body, context)];
321
- case 1:
322
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
323
- if (data.MediaCapturePipeline != null) {
324
- contents.MediaCapturePipeline = deserializeAws_restJson1MediaCapturePipeline(data.MediaCapturePipeline, context);
325
- }
326
- return [2, contents];
327
- }
328
- });
329
- }); };
330
- var deserializeAws_restJson1CreateMediaCapturePipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
331
- var parsedOutput, _a, errorCode, _b, parsedBody;
332
- var _c;
333
- return __generator(this, function (_d) {
334
- switch (_d.label) {
335
- case 0:
336
- _a = [__assign({}, output)];
337
- _c = {};
338
- return [4, parseErrorBody(output.body, context)];
339
- case 1:
340
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
341
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
342
- _b = errorCode;
343
- switch (_b) {
344
- case "BadRequestException": return [3, 2];
345
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
346
- case "ForbiddenException": return [3, 4];
347
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
348
- case "ResourceLimitExceededException": return [3, 6];
349
- case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException": return [3, 6];
350
- case "ServiceFailureException": return [3, 8];
351
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
352
- case "ServiceUnavailableException": return [3, 10];
353
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
354
- case "ThrottledClientException": return [3, 12];
355
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
356
- case "UnauthorizedClientException": return [3, 14];
357
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
358
- }
359
- return [3, 16];
360
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
361
- case 3: throw _d.sent();
362
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
363
- case 5: throw _d.sent();
364
- case 6: return [4, deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)];
365
- case 7: throw _d.sent();
366
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
367
- case 9: throw _d.sent();
368
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
369
- case 11: throw _d.sent();
370
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
371
- case 13: throw _d.sent();
372
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
373
- case 15: throw _d.sent();
374
- case 16:
375
- parsedBody = parsedOutput.body;
376
- throwDefaultError({
377
- output: output,
378
- parsedBody: parsedBody,
379
- exceptionCtor: __BaseException,
380
- errorCode: errorCode,
381
- });
382
- _d.label = 17;
383
- case 17: return [2];
384
- }
385
- });
386
- }); };
387
- export var deserializeAws_restJson1CreateMediaConcatenationPipelineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
388
- var contents, data, _a, _b;
389
- return __generator(this, function (_c) {
390
- switch (_c.label) {
391
- case 0:
392
- if (output.statusCode !== 201 && output.statusCode >= 300) {
393
- return [2, deserializeAws_restJson1CreateMediaConcatenationPipelineCommandError(output, context)];
394
- }
395
- contents = map({
396
- $metadata: deserializeMetadata(output),
397
- });
398
- _a = __expectNonNull;
399
- _b = __expectObject;
400
- return [4, parseBody(output.body, context)];
401
- case 1:
402
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
403
- if (data.MediaConcatenationPipeline != null) {
404
- contents.MediaConcatenationPipeline = deserializeAws_restJson1MediaConcatenationPipeline(data.MediaConcatenationPipeline, context);
405
- }
406
- return [2, contents];
407
- }
408
- });
409
- }); };
410
- var deserializeAws_restJson1CreateMediaConcatenationPipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
411
- var parsedOutput, _a, errorCode, _b, parsedBody;
412
- var _c;
413
- return __generator(this, function (_d) {
414
- switch (_d.label) {
415
- case 0:
416
- _a = [__assign({}, output)];
417
- _c = {};
418
- return [4, parseErrorBody(output.body, context)];
419
- case 1:
420
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
421
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
422
- _b = errorCode;
423
- switch (_b) {
424
- case "BadRequestException": return [3, 2];
425
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
426
- case "ForbiddenException": return [3, 4];
427
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
428
- case "ResourceLimitExceededException": return [3, 6];
429
- case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException": return [3, 6];
430
- case "ServiceFailureException": return [3, 8];
431
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
432
- case "ServiceUnavailableException": return [3, 10];
433
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
434
- case "ThrottledClientException": return [3, 12];
435
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
436
- case "UnauthorizedClientException": return [3, 14];
437
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
438
- }
439
- return [3, 16];
440
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
441
- case 3: throw _d.sent();
442
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
443
- case 5: throw _d.sent();
444
- case 6: return [4, deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)];
445
- case 7: throw _d.sent();
446
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
447
- case 9: throw _d.sent();
448
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
449
- case 11: throw _d.sent();
450
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
451
- case 13: throw _d.sent();
452
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
453
- case 15: throw _d.sent();
454
- case 16:
455
- parsedBody = parsedOutput.body;
456
- throwDefaultError({
457
- output: output,
458
- parsedBody: parsedBody,
459
- exceptionCtor: __BaseException,
460
- errorCode: errorCode,
461
- });
462
- _d.label = 17;
463
- case 17: return [2];
464
- }
465
- });
466
- }); };
467
- export var deserializeAws_restJson1CreateMediaLiveConnectorPipelineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
468
- var contents, data, _a, _b;
469
- return __generator(this, function (_c) {
470
- switch (_c.label) {
471
- case 0:
472
- if (output.statusCode !== 201 && output.statusCode >= 300) {
473
- return [2, deserializeAws_restJson1CreateMediaLiveConnectorPipelineCommandError(output, context)];
474
- }
475
- contents = map({
476
- $metadata: deserializeMetadata(output),
477
- });
478
- _a = __expectNonNull;
479
- _b = __expectObject;
480
- return [4, parseBody(output.body, context)];
481
- case 1:
482
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
483
- if (data.MediaLiveConnectorPipeline != null) {
484
- contents.MediaLiveConnectorPipeline = deserializeAws_restJson1MediaLiveConnectorPipeline(data.MediaLiveConnectorPipeline, context);
485
- }
486
- return [2, contents];
487
- }
488
- });
489
- }); };
490
- var deserializeAws_restJson1CreateMediaLiveConnectorPipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
491
- var parsedOutput, _a, errorCode, _b, parsedBody;
492
- var _c;
493
- return __generator(this, function (_d) {
494
- switch (_d.label) {
495
- case 0:
496
- _a = [__assign({}, output)];
497
- _c = {};
498
- return [4, parseErrorBody(output.body, context)];
499
- case 1:
500
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
501
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
502
- _b = errorCode;
503
- switch (_b) {
504
- case "BadRequestException": return [3, 2];
505
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
506
- case "ForbiddenException": return [3, 4];
507
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
508
- case "ResourceLimitExceededException": return [3, 6];
509
- case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException": return [3, 6];
510
- case "ServiceFailureException": return [3, 8];
511
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
512
- case "ServiceUnavailableException": return [3, 10];
513
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
514
- case "ThrottledClientException": return [3, 12];
515
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
516
- case "UnauthorizedClientException": return [3, 14];
517
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
518
- }
519
- return [3, 16];
520
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
521
- case 3: throw _d.sent();
522
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
523
- case 5: throw _d.sent();
524
- case 6: return [4, deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)];
525
- case 7: throw _d.sent();
526
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
527
- case 9: throw _d.sent();
528
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
529
- case 11: throw _d.sent();
530
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
531
- case 13: throw _d.sent();
532
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
533
- case 15: throw _d.sent();
534
- case 16:
535
- parsedBody = parsedOutput.body;
536
- throwDefaultError({
537
- output: output,
538
- parsedBody: parsedBody,
539
- exceptionCtor: __BaseException,
540
- errorCode: errorCode,
541
- });
542
- _d.label = 17;
543
- case 17: return [2];
544
- }
545
- });
546
- }); };
547
- export var deserializeAws_restJson1DeleteMediaCapturePipelineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
548
- var contents;
549
- return __generator(this, function (_a) {
550
- switch (_a.label) {
551
- case 0:
552
- if (output.statusCode !== 204 && output.statusCode >= 300) {
553
- return [2, deserializeAws_restJson1DeleteMediaCapturePipelineCommandError(output, context)];
554
- }
555
- contents = map({
556
- $metadata: deserializeMetadata(output),
557
- });
558
- return [4, collectBody(output.body, context)];
559
- case 1:
560
- _a.sent();
561
- return [2, contents];
562
- }
563
- });
564
- }); };
565
- var deserializeAws_restJson1DeleteMediaCapturePipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
566
- var parsedOutput, _a, errorCode, _b, parsedBody;
567
- var _c;
568
- return __generator(this, function (_d) {
569
- switch (_d.label) {
570
- case 0:
571
- _a = [__assign({}, output)];
572
- _c = {};
573
- return [4, parseErrorBody(output.body, context)];
574
- case 1:
575
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
576
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
577
- _b = errorCode;
578
- switch (_b) {
579
- case "BadRequestException": return [3, 2];
580
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
581
- case "ForbiddenException": return [3, 4];
582
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
583
- case "NotFoundException": return [3, 6];
584
- case "com.amazonaws.chimesdkmediapipelines#NotFoundException": return [3, 6];
585
- case "ServiceFailureException": return [3, 8];
586
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
587
- case "ServiceUnavailableException": return [3, 10];
588
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
589
- case "ThrottledClientException": return [3, 12];
590
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
591
- case "UnauthorizedClientException": return [3, 14];
592
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
593
- }
594
- return [3, 16];
595
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
596
- case 3: throw _d.sent();
597
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
598
- case 5: throw _d.sent();
599
- case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
600
- case 7: throw _d.sent();
601
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
602
- case 9: throw _d.sent();
603
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
604
- case 11: throw _d.sent();
605
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
606
- case 13: throw _d.sent();
607
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
608
- case 15: throw _d.sent();
609
- case 16:
610
- parsedBody = parsedOutput.body;
611
- throwDefaultError({
612
- output: output,
613
- parsedBody: parsedBody,
614
- exceptionCtor: __BaseException,
615
- errorCode: errorCode,
616
- });
617
- _d.label = 17;
618
- case 17: return [2];
619
- }
620
- });
621
- }); };
622
- export var deserializeAws_restJson1DeleteMediaPipelineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
623
- var contents;
624
- return __generator(this, function (_a) {
625
- switch (_a.label) {
626
- case 0:
627
- if (output.statusCode !== 204 && output.statusCode >= 300) {
628
- return [2, deserializeAws_restJson1DeleteMediaPipelineCommandError(output, context)];
629
- }
630
- contents = map({
631
- $metadata: deserializeMetadata(output),
632
- });
633
- return [4, collectBody(output.body, context)];
634
- case 1:
635
- _a.sent();
636
- return [2, contents];
637
- }
638
- });
639
- }); };
640
- var deserializeAws_restJson1DeleteMediaPipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
641
- var parsedOutput, _a, errorCode, _b, parsedBody;
642
- var _c;
643
- return __generator(this, function (_d) {
644
- switch (_d.label) {
645
- case 0:
646
- _a = [__assign({}, output)];
647
- _c = {};
648
- return [4, parseErrorBody(output.body, context)];
649
- case 1:
650
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
651
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
652
- _b = errorCode;
653
- switch (_b) {
654
- case "BadRequestException": return [3, 2];
655
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
656
- case "ForbiddenException": return [3, 4];
657
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
658
- case "NotFoundException": return [3, 6];
659
- case "com.amazonaws.chimesdkmediapipelines#NotFoundException": return [3, 6];
660
- case "ServiceFailureException": return [3, 8];
661
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
662
- case "ServiceUnavailableException": return [3, 10];
663
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
664
- case "ThrottledClientException": return [3, 12];
665
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
666
- case "UnauthorizedClientException": return [3, 14];
667
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
668
- }
669
- return [3, 16];
670
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
671
- case 3: throw _d.sent();
672
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
673
- case 5: throw _d.sent();
674
- case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
675
- case 7: throw _d.sent();
676
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
677
- case 9: throw _d.sent();
678
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
679
- case 11: throw _d.sent();
680
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
681
- case 13: throw _d.sent();
682
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
683
- case 15: throw _d.sent();
684
- case 16:
685
- parsedBody = parsedOutput.body;
686
- throwDefaultError({
687
- output: output,
688
- parsedBody: parsedBody,
689
- exceptionCtor: __BaseException,
690
- errorCode: errorCode,
691
- });
692
- _d.label = 17;
693
- case 17: return [2];
694
- }
695
- });
696
- }); };
697
- export var deserializeAws_restJson1GetMediaCapturePipelineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
698
- var contents, data, _a, _b;
699
- return __generator(this, function (_c) {
700
- switch (_c.label) {
701
- case 0:
702
- if (output.statusCode !== 200 && output.statusCode >= 300) {
703
- return [2, deserializeAws_restJson1GetMediaCapturePipelineCommandError(output, context)];
704
- }
705
- contents = map({
706
- $metadata: deserializeMetadata(output),
707
- });
708
- _a = __expectNonNull;
709
- _b = __expectObject;
710
- return [4, parseBody(output.body, context)];
711
- case 1:
712
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
713
- if (data.MediaCapturePipeline != null) {
714
- contents.MediaCapturePipeline = deserializeAws_restJson1MediaCapturePipeline(data.MediaCapturePipeline, context);
715
- }
716
- return [2, contents];
717
- }
718
- });
719
- }); };
720
- var deserializeAws_restJson1GetMediaCapturePipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
721
- var parsedOutput, _a, errorCode, _b, parsedBody;
722
- var _c;
723
- return __generator(this, function (_d) {
724
- switch (_d.label) {
725
- case 0:
726
- _a = [__assign({}, output)];
727
- _c = {};
728
- return [4, parseErrorBody(output.body, context)];
729
- case 1:
730
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
731
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
732
- _b = errorCode;
733
- switch (_b) {
734
- case "BadRequestException": return [3, 2];
735
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
736
- case "ForbiddenException": return [3, 4];
737
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
738
- case "NotFoundException": return [3, 6];
739
- case "com.amazonaws.chimesdkmediapipelines#NotFoundException": return [3, 6];
740
- case "ServiceFailureException": return [3, 8];
741
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
742
- case "ServiceUnavailableException": return [3, 10];
743
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
744
- case "ThrottledClientException": return [3, 12];
745
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
746
- case "UnauthorizedClientException": return [3, 14];
747
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
748
- }
749
- return [3, 16];
750
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
751
- case 3: throw _d.sent();
752
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
753
- case 5: throw _d.sent();
754
- case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
755
- case 7: throw _d.sent();
756
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
757
- case 9: throw _d.sent();
758
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
759
- case 11: throw _d.sent();
760
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
761
- case 13: throw _d.sent();
762
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
763
- case 15: throw _d.sent();
764
- case 16:
765
- parsedBody = parsedOutput.body;
766
- throwDefaultError({
767
- output: output,
768
- parsedBody: parsedBody,
769
- exceptionCtor: __BaseException,
770
- errorCode: errorCode,
771
- });
772
- _d.label = 17;
773
- case 17: return [2];
774
- }
775
- });
776
- }); };
777
- export var deserializeAws_restJson1GetMediaPipelineCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
778
- var contents, data, _a, _b;
779
- return __generator(this, function (_c) {
780
- switch (_c.label) {
781
- case 0:
782
- if (output.statusCode !== 200 && output.statusCode >= 300) {
783
- return [2, deserializeAws_restJson1GetMediaPipelineCommandError(output, context)];
784
- }
785
- contents = map({
786
- $metadata: deserializeMetadata(output),
787
- });
788
- _a = __expectNonNull;
789
- _b = __expectObject;
790
- return [4, parseBody(output.body, context)];
791
- case 1:
792
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
793
- if (data.MediaPipeline != null) {
794
- contents.MediaPipeline = deserializeAws_restJson1MediaPipeline(data.MediaPipeline, context);
795
- }
796
- return [2, contents];
797
- }
6
+ export const serializeAws_restJson1CreateMediaCapturePipelineCommand = async (input, context) => {
7
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const headers = {
9
+ "content-type": "application/json",
10
+ };
11
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-capture-pipelines";
12
+ let body;
13
+ body = JSON.stringify({
14
+ ...(input.ChimeSdkMeetingConfiguration != null && {
15
+ ChimeSdkMeetingConfiguration: serializeAws_restJson1ChimeSdkMeetingConfiguration(input.ChimeSdkMeetingConfiguration, context),
16
+ }),
17
+ ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
18
+ ...(input.SinkArn != null && { SinkArn: input.SinkArn }),
19
+ ...(input.SinkType != null && { SinkType: input.SinkType }),
20
+ ...(input.SourceArn != null && { SourceArn: input.SourceArn }),
21
+ ...(input.SourceType != null && { SourceType: input.SourceType }),
22
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
23
+ });
24
+ return new __HttpRequest({
25
+ protocol,
26
+ hostname,
27
+ port,
28
+ method: "POST",
29
+ headers,
30
+ path: resolvedPath,
31
+ body,
32
+ });
33
+ };
34
+ export const serializeAws_restJson1CreateMediaConcatenationPipelineCommand = async (input, context) => {
35
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
36
+ const headers = {
37
+ "content-type": "application/json",
38
+ };
39
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-concatenation-pipelines";
40
+ let body;
41
+ body = JSON.stringify({
42
+ ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
43
+ ...(input.Sinks != null && { Sinks: serializeAws_restJson1ConcatenationSinkList(input.Sinks, context) }),
44
+ ...(input.Sources != null && { Sources: serializeAws_restJson1ConcatenationSourceList(input.Sources, context) }),
45
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
46
+ });
47
+ return new __HttpRequest({
48
+ protocol,
49
+ hostname,
50
+ port,
51
+ method: "POST",
52
+ headers,
53
+ path: resolvedPath,
54
+ body,
55
+ });
56
+ };
57
+ export const serializeAws_restJson1CreateMediaLiveConnectorPipelineCommand = async (input, context) => {
58
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
59
+ const headers = {
60
+ "content-type": "application/json",
61
+ };
62
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-live-connector-pipelines";
63
+ let body;
64
+ body = JSON.stringify({
65
+ ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
66
+ ...(input.Sinks != null && { Sinks: serializeAws_restJson1LiveConnectorSinkList(input.Sinks, context) }),
67
+ ...(input.Sources != null && { Sources: serializeAws_restJson1LiveConnectorSourceList(input.Sources, context) }),
68
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
69
+ });
70
+ return new __HttpRequest({
71
+ protocol,
72
+ hostname,
73
+ port,
74
+ method: "POST",
75
+ headers,
76
+ path: resolvedPath,
77
+ body,
78
+ });
79
+ };
80
+ export const serializeAws_restJson1DeleteMediaCapturePipelineCommand = async (input, context) => {
81
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const headers = {};
83
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
84
+ "/sdk-media-capture-pipelines/{MediaPipelineId}";
85
+ resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
86
+ let body;
87
+ return new __HttpRequest({
88
+ protocol,
89
+ hostname,
90
+ port,
91
+ method: "DELETE",
92
+ headers,
93
+ path: resolvedPath,
94
+ body,
95
+ });
96
+ };
97
+ export const serializeAws_restJson1DeleteMediaPipelineCommand = async (input, context) => {
98
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const headers = {};
100
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-pipelines/{MediaPipelineId}";
101
+ resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
102
+ let body;
103
+ return new __HttpRequest({
104
+ protocol,
105
+ hostname,
106
+ port,
107
+ method: "DELETE",
108
+ headers,
109
+ path: resolvedPath,
110
+ body,
111
+ });
112
+ };
113
+ export const serializeAws_restJson1GetMediaCapturePipelineCommand = async (input, context) => {
114
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
115
+ const headers = {};
116
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
117
+ "/sdk-media-capture-pipelines/{MediaPipelineId}";
118
+ resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
119
+ let body;
120
+ return new __HttpRequest({
121
+ protocol,
122
+ hostname,
123
+ port,
124
+ method: "GET",
125
+ headers,
126
+ path: resolvedPath,
127
+ body,
128
+ });
129
+ };
130
+ export const serializeAws_restJson1GetMediaPipelineCommand = async (input, context) => {
131
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
132
+ const headers = {};
133
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-pipelines/{MediaPipelineId}";
134
+ resolvedPath = __resolvedPath(resolvedPath, input, "MediaPipelineId", () => input.MediaPipelineId, "{MediaPipelineId}", false);
135
+ let body;
136
+ return new __HttpRequest({
137
+ protocol,
138
+ hostname,
139
+ port,
140
+ method: "GET",
141
+ headers,
142
+ path: resolvedPath,
143
+ body,
144
+ });
145
+ };
146
+ export const serializeAws_restJson1ListMediaCapturePipelinesCommand = async (input, context) => {
147
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
148
+ const headers = {};
149
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-capture-pipelines";
150
+ const query = map({
151
+ "next-token": [, input.NextToken],
152
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
153
+ });
154
+ let body;
155
+ return new __HttpRequest({
156
+ protocol,
157
+ hostname,
158
+ port,
159
+ method: "GET",
160
+ headers,
161
+ path: resolvedPath,
162
+ query,
163
+ body,
164
+ });
165
+ };
166
+ export const serializeAws_restJson1ListMediaPipelinesCommand = async (input, context) => {
167
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const headers = {};
169
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-pipelines";
170
+ const query = map({
171
+ "next-token": [, input.NextToken],
172
+ "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
173
+ });
174
+ let body;
175
+ return new __HttpRequest({
176
+ protocol,
177
+ hostname,
178
+ port,
179
+ method: "GET",
180
+ headers,
181
+ path: resolvedPath,
182
+ query,
183
+ body,
184
+ });
185
+ };
186
+ export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
187
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
188
+ const headers = {};
189
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
190
+ const query = map({
191
+ arn: [, input.ResourceARN],
192
+ });
193
+ let body;
194
+ return new __HttpRequest({
195
+ protocol,
196
+ hostname,
197
+ port,
198
+ method: "GET",
199
+ headers,
200
+ path: resolvedPath,
201
+ query,
202
+ body,
203
+ });
204
+ };
205
+ export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
206
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
207
+ const headers = {
208
+ "content-type": "application/json",
209
+ };
210
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
211
+ const query = map({
212
+ operation: [, "tag-resource"],
213
+ });
214
+ let body;
215
+ body = JSON.stringify({
216
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
217
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
218
+ });
219
+ return new __HttpRequest({
220
+ protocol,
221
+ hostname,
222
+ port,
223
+ method: "POST",
224
+ headers,
225
+ path: resolvedPath,
226
+ query,
227
+ body,
228
+ });
229
+ };
230
+ export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
231
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
232
+ const headers = {
233
+ "content-type": "application/json",
234
+ };
235
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
236
+ const query = map({
237
+ operation: [, "untag-resource"],
238
+ });
239
+ let body;
240
+ body = JSON.stringify({
241
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
242
+ ...(input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) }),
243
+ });
244
+ return new __HttpRequest({
245
+ protocol,
246
+ hostname,
247
+ port,
248
+ method: "POST",
249
+ headers,
250
+ path: resolvedPath,
251
+ query,
252
+ body,
253
+ });
254
+ };
255
+ export const deserializeAws_restJson1CreateMediaCapturePipelineCommand = async (output, context) => {
256
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
257
+ return deserializeAws_restJson1CreateMediaCapturePipelineCommandError(output, context);
258
+ }
259
+ const contents = map({
260
+ $metadata: deserializeMetadata(output),
798
261
  });
799
- }); };
800
- var deserializeAws_restJson1GetMediaPipelineCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
801
- var parsedOutput, _a, errorCode, _b, parsedBody;
802
- var _c;
803
- return __generator(this, function (_d) {
804
- switch (_d.label) {
805
- case 0:
806
- _a = [__assign({}, output)];
807
- _c = {};
808
- return [4, parseErrorBody(output.body, context)];
809
- case 1:
810
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
811
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
812
- _b = errorCode;
813
- switch (_b) {
814
- case "BadRequestException": return [3, 2];
815
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
816
- case "ForbiddenException": return [3, 4];
817
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
818
- case "NotFoundException": return [3, 6];
819
- case "com.amazonaws.chimesdkmediapipelines#NotFoundException": return [3, 6];
820
- case "ServiceFailureException": return [3, 8];
821
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
822
- case "ServiceUnavailableException": return [3, 10];
823
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
824
- case "ThrottledClientException": return [3, 12];
825
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
826
- case "UnauthorizedClientException": return [3, 14];
827
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
828
- }
829
- return [3, 16];
830
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
831
- case 3: throw _d.sent();
832
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
833
- case 5: throw _d.sent();
834
- case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
835
- case 7: throw _d.sent();
836
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
837
- case 9: throw _d.sent();
838
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
839
- case 11: throw _d.sent();
840
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
841
- case 13: throw _d.sent();
842
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
843
- case 15: throw _d.sent();
844
- case 16:
845
- parsedBody = parsedOutput.body;
846
- throwDefaultError({
847
- output: output,
848
- parsedBody: parsedBody,
849
- exceptionCtor: __BaseException,
850
- errorCode: errorCode,
851
- });
852
- _d.label = 17;
853
- case 17: return [2];
854
- }
262
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
263
+ if (data.MediaCapturePipeline != null) {
264
+ contents.MediaCapturePipeline = deserializeAws_restJson1MediaCapturePipeline(data.MediaCapturePipeline, context);
265
+ }
266
+ return contents;
267
+ };
268
+ const deserializeAws_restJson1CreateMediaCapturePipelineCommandError = async (output, context) => {
269
+ const parsedOutput = {
270
+ ...output,
271
+ body: await parseErrorBody(output.body, context),
272
+ };
273
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
274
+ switch (errorCode) {
275
+ case "BadRequestException":
276
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
277
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
278
+ case "ForbiddenException":
279
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
280
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
281
+ case "ResourceLimitExceededException":
282
+ case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException":
283
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
284
+ case "ServiceFailureException":
285
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
286
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
287
+ case "ServiceUnavailableException":
288
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
289
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
290
+ case "ThrottledClientException":
291
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
292
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
293
+ case "UnauthorizedClientException":
294
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
295
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
296
+ default:
297
+ const parsedBody = parsedOutput.body;
298
+ throwDefaultError({
299
+ output,
300
+ parsedBody,
301
+ exceptionCtor: __BaseException,
302
+ errorCode,
303
+ });
304
+ }
305
+ };
306
+ export const deserializeAws_restJson1CreateMediaConcatenationPipelineCommand = async (output, context) => {
307
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
308
+ return deserializeAws_restJson1CreateMediaConcatenationPipelineCommandError(output, context);
309
+ }
310
+ const contents = map({
311
+ $metadata: deserializeMetadata(output),
855
312
  });
856
- }); };
857
- export var deserializeAws_restJson1ListMediaCapturePipelinesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
858
- var contents, data, _a, _b;
859
- return __generator(this, function (_c) {
860
- switch (_c.label) {
861
- case 0:
862
- if (output.statusCode !== 200 && output.statusCode >= 300) {
863
- return [2, deserializeAws_restJson1ListMediaCapturePipelinesCommandError(output, context)];
864
- }
865
- contents = map({
866
- $metadata: deserializeMetadata(output),
867
- });
868
- _a = __expectNonNull;
869
- _b = __expectObject;
870
- return [4, parseBody(output.body, context)];
871
- case 1:
872
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
873
- if (data.MediaCapturePipelines != null) {
874
- contents.MediaCapturePipelines = deserializeAws_restJson1MediaCapturePipelineSummaryList(data.MediaCapturePipelines, context);
875
- }
876
- if (data.NextToken != null) {
877
- contents.NextToken = __expectString(data.NextToken);
878
- }
879
- return [2, contents];
880
- }
313
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
314
+ if (data.MediaConcatenationPipeline != null) {
315
+ contents.MediaConcatenationPipeline = deserializeAws_restJson1MediaConcatenationPipeline(data.MediaConcatenationPipeline, context);
316
+ }
317
+ return contents;
318
+ };
319
+ const deserializeAws_restJson1CreateMediaConcatenationPipelineCommandError = async (output, context) => {
320
+ const parsedOutput = {
321
+ ...output,
322
+ body: await parseErrorBody(output.body, context),
323
+ };
324
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
325
+ switch (errorCode) {
326
+ case "BadRequestException":
327
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
328
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
329
+ case "ForbiddenException":
330
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
331
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
332
+ case "ResourceLimitExceededException":
333
+ case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException":
334
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
335
+ case "ServiceFailureException":
336
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
337
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
338
+ case "ServiceUnavailableException":
339
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
340
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
341
+ case "ThrottledClientException":
342
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
343
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
344
+ case "UnauthorizedClientException":
345
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
346
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
347
+ default:
348
+ const parsedBody = parsedOutput.body;
349
+ throwDefaultError({
350
+ output,
351
+ parsedBody,
352
+ exceptionCtor: __BaseException,
353
+ errorCode,
354
+ });
355
+ }
356
+ };
357
+ export const deserializeAws_restJson1CreateMediaLiveConnectorPipelineCommand = async (output, context) => {
358
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
359
+ return deserializeAws_restJson1CreateMediaLiveConnectorPipelineCommandError(output, context);
360
+ }
361
+ const contents = map({
362
+ $metadata: deserializeMetadata(output),
881
363
  });
882
- }); };
883
- var deserializeAws_restJson1ListMediaCapturePipelinesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
884
- var parsedOutput, _a, errorCode, _b, parsedBody;
885
- var _c;
886
- return __generator(this, function (_d) {
887
- switch (_d.label) {
888
- case 0:
889
- _a = [__assign({}, output)];
890
- _c = {};
891
- return [4, parseErrorBody(output.body, context)];
892
- case 1:
893
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
894
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
895
- _b = errorCode;
896
- switch (_b) {
897
- case "BadRequestException": return [3, 2];
898
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
899
- case "ForbiddenException": return [3, 4];
900
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
901
- case "ResourceLimitExceededException": return [3, 6];
902
- case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException": return [3, 6];
903
- case "ServiceFailureException": return [3, 8];
904
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
905
- case "ServiceUnavailableException": return [3, 10];
906
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
907
- case "ThrottledClientException": return [3, 12];
908
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
909
- case "UnauthorizedClientException": return [3, 14];
910
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
911
- }
912
- return [3, 16];
913
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
914
- case 3: throw _d.sent();
915
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
916
- case 5: throw _d.sent();
917
- case 6: return [4, deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)];
918
- case 7: throw _d.sent();
919
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
920
- case 9: throw _d.sent();
921
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
922
- case 11: throw _d.sent();
923
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
924
- case 13: throw _d.sent();
925
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
926
- case 15: throw _d.sent();
927
- case 16:
928
- parsedBody = parsedOutput.body;
929
- throwDefaultError({
930
- output: output,
931
- parsedBody: parsedBody,
932
- exceptionCtor: __BaseException,
933
- errorCode: errorCode,
934
- });
935
- _d.label = 17;
936
- case 17: return [2];
937
- }
364
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
365
+ if (data.MediaLiveConnectorPipeline != null) {
366
+ contents.MediaLiveConnectorPipeline = deserializeAws_restJson1MediaLiveConnectorPipeline(data.MediaLiveConnectorPipeline, context);
367
+ }
368
+ return contents;
369
+ };
370
+ const deserializeAws_restJson1CreateMediaLiveConnectorPipelineCommandError = async (output, context) => {
371
+ const parsedOutput = {
372
+ ...output,
373
+ body: await parseErrorBody(output.body, context),
374
+ };
375
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
376
+ switch (errorCode) {
377
+ case "BadRequestException":
378
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
379
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
380
+ case "ForbiddenException":
381
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
382
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
383
+ case "ResourceLimitExceededException":
384
+ case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException":
385
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
386
+ case "ServiceFailureException":
387
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
388
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
389
+ case "ServiceUnavailableException":
390
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
391
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
392
+ case "ThrottledClientException":
393
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
394
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
395
+ case "UnauthorizedClientException":
396
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
397
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
398
+ default:
399
+ const parsedBody = parsedOutput.body;
400
+ throwDefaultError({
401
+ output,
402
+ parsedBody,
403
+ exceptionCtor: __BaseException,
404
+ errorCode,
405
+ });
406
+ }
407
+ };
408
+ export const deserializeAws_restJson1DeleteMediaCapturePipelineCommand = async (output, context) => {
409
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
410
+ return deserializeAws_restJson1DeleteMediaCapturePipelineCommandError(output, context);
411
+ }
412
+ const contents = map({
413
+ $metadata: deserializeMetadata(output),
938
414
  });
939
- }); };
940
- export var deserializeAws_restJson1ListMediaPipelinesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
941
- var contents, data, _a, _b;
942
- return __generator(this, function (_c) {
943
- switch (_c.label) {
944
- case 0:
945
- if (output.statusCode !== 200 && output.statusCode >= 300) {
946
- return [2, deserializeAws_restJson1ListMediaPipelinesCommandError(output, context)];
947
- }
948
- contents = map({
949
- $metadata: deserializeMetadata(output),
950
- });
951
- _a = __expectNonNull;
952
- _b = __expectObject;
953
- return [4, parseBody(output.body, context)];
954
- case 1:
955
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
956
- if (data.MediaPipelines != null) {
957
- contents.MediaPipelines = deserializeAws_restJson1MediaPipelineList(data.MediaPipelines, context);
958
- }
959
- if (data.NextToken != null) {
960
- contents.NextToken = __expectString(data.NextToken);
961
- }
962
- return [2, contents];
963
- }
415
+ await collectBody(output.body, context);
416
+ return contents;
417
+ };
418
+ const deserializeAws_restJson1DeleteMediaCapturePipelineCommandError = async (output, context) => {
419
+ const parsedOutput = {
420
+ ...output,
421
+ body: await parseErrorBody(output.body, context),
422
+ };
423
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
424
+ switch (errorCode) {
425
+ case "BadRequestException":
426
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
427
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
428
+ case "ForbiddenException":
429
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
430
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
431
+ case "NotFoundException":
432
+ case "com.amazonaws.chimesdkmediapipelines#NotFoundException":
433
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
434
+ case "ServiceFailureException":
435
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
436
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
437
+ case "ServiceUnavailableException":
438
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
439
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
440
+ case "ThrottledClientException":
441
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
442
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
443
+ case "UnauthorizedClientException":
444
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
445
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
446
+ default:
447
+ const parsedBody = parsedOutput.body;
448
+ throwDefaultError({
449
+ output,
450
+ parsedBody,
451
+ exceptionCtor: __BaseException,
452
+ errorCode,
453
+ });
454
+ }
455
+ };
456
+ export const deserializeAws_restJson1DeleteMediaPipelineCommand = async (output, context) => {
457
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
458
+ return deserializeAws_restJson1DeleteMediaPipelineCommandError(output, context);
459
+ }
460
+ const contents = map({
461
+ $metadata: deserializeMetadata(output),
964
462
  });
965
- }); };
966
- var deserializeAws_restJson1ListMediaPipelinesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
967
- var parsedOutput, _a, errorCode, _b, parsedBody;
968
- var _c;
969
- return __generator(this, function (_d) {
970
- switch (_d.label) {
971
- case 0:
972
- _a = [__assign({}, output)];
973
- _c = {};
974
- return [4, parseErrorBody(output.body, context)];
975
- case 1:
976
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
977
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
978
- _b = errorCode;
979
- switch (_b) {
980
- case "BadRequestException": return [3, 2];
981
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
982
- case "ForbiddenException": return [3, 4];
983
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
984
- case "ResourceLimitExceededException": return [3, 6];
985
- case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException": return [3, 6];
986
- case "ServiceFailureException": return [3, 8];
987
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
988
- case "ServiceUnavailableException": return [3, 10];
989
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
990
- case "ThrottledClientException": return [3, 12];
991
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
992
- case "UnauthorizedClientException": return [3, 14];
993
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
994
- }
995
- return [3, 16];
996
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
997
- case 3: throw _d.sent();
998
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
999
- case 5: throw _d.sent();
1000
- case 6: return [4, deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)];
1001
- case 7: throw _d.sent();
1002
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
1003
- case 9: throw _d.sent();
1004
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1005
- case 11: throw _d.sent();
1006
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
1007
- case 13: throw _d.sent();
1008
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
1009
- case 15: throw _d.sent();
1010
- case 16:
1011
- parsedBody = parsedOutput.body;
1012
- throwDefaultError({
1013
- output: output,
1014
- parsedBody: parsedBody,
1015
- exceptionCtor: __BaseException,
1016
- errorCode: errorCode,
1017
- });
1018
- _d.label = 17;
1019
- case 17: return [2];
1020
- }
463
+ await collectBody(output.body, context);
464
+ return contents;
465
+ };
466
+ const deserializeAws_restJson1DeleteMediaPipelineCommandError = async (output, context) => {
467
+ const parsedOutput = {
468
+ ...output,
469
+ body: await parseErrorBody(output.body, context),
470
+ };
471
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
472
+ switch (errorCode) {
473
+ case "BadRequestException":
474
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
475
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
476
+ case "ForbiddenException":
477
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
478
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
479
+ case "NotFoundException":
480
+ case "com.amazonaws.chimesdkmediapipelines#NotFoundException":
481
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
482
+ case "ServiceFailureException":
483
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
484
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
485
+ case "ServiceUnavailableException":
486
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
487
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
488
+ case "ThrottledClientException":
489
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
490
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
491
+ case "UnauthorizedClientException":
492
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
493
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
494
+ default:
495
+ const parsedBody = parsedOutput.body;
496
+ throwDefaultError({
497
+ output,
498
+ parsedBody,
499
+ exceptionCtor: __BaseException,
500
+ errorCode,
501
+ });
502
+ }
503
+ };
504
+ export const deserializeAws_restJson1GetMediaCapturePipelineCommand = async (output, context) => {
505
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
506
+ return deserializeAws_restJson1GetMediaCapturePipelineCommandError(output, context);
507
+ }
508
+ const contents = map({
509
+ $metadata: deserializeMetadata(output),
1021
510
  });
1022
- }); };
1023
- export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1024
- var contents, data, _a, _b;
1025
- return __generator(this, function (_c) {
1026
- switch (_c.label) {
1027
- case 0:
1028
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1029
- return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
1030
- }
1031
- contents = map({
1032
- $metadata: deserializeMetadata(output),
1033
- });
1034
- _a = __expectNonNull;
1035
- _b = __expectObject;
1036
- return [4, parseBody(output.body, context)];
1037
- case 1:
1038
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1039
- if (data.Tags != null) {
1040
- contents.Tags = deserializeAws_restJson1TagList(data.Tags, context);
1041
- }
1042
- return [2, contents];
1043
- }
511
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
512
+ if (data.MediaCapturePipeline != null) {
513
+ contents.MediaCapturePipeline = deserializeAws_restJson1MediaCapturePipeline(data.MediaCapturePipeline, context);
514
+ }
515
+ return contents;
516
+ };
517
+ const deserializeAws_restJson1GetMediaCapturePipelineCommandError = async (output, context) => {
518
+ const parsedOutput = {
519
+ ...output,
520
+ body: await parseErrorBody(output.body, context),
521
+ };
522
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
523
+ switch (errorCode) {
524
+ case "BadRequestException":
525
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
526
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
527
+ case "ForbiddenException":
528
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
529
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
530
+ case "NotFoundException":
531
+ case "com.amazonaws.chimesdkmediapipelines#NotFoundException":
532
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
533
+ case "ServiceFailureException":
534
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
535
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
536
+ case "ServiceUnavailableException":
537
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
538
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
539
+ case "ThrottledClientException":
540
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
541
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
542
+ case "UnauthorizedClientException":
543
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
544
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
545
+ default:
546
+ const parsedBody = parsedOutput.body;
547
+ throwDefaultError({
548
+ output,
549
+ parsedBody,
550
+ exceptionCtor: __BaseException,
551
+ errorCode,
552
+ });
553
+ }
554
+ };
555
+ export const deserializeAws_restJson1GetMediaPipelineCommand = async (output, context) => {
556
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
557
+ return deserializeAws_restJson1GetMediaPipelineCommandError(output, context);
558
+ }
559
+ const contents = map({
560
+ $metadata: deserializeMetadata(output),
1044
561
  });
1045
- }); };
1046
- var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1047
- var parsedOutput, _a, errorCode, _b, parsedBody;
1048
- var _c;
1049
- return __generator(this, function (_d) {
1050
- switch (_d.label) {
1051
- case 0:
1052
- _a = [__assign({}, output)];
1053
- _c = {};
1054
- return [4, parseErrorBody(output.body, context)];
1055
- case 1:
1056
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1057
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1058
- _b = errorCode;
1059
- switch (_b) {
1060
- case "BadRequestException": return [3, 2];
1061
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
1062
- case "ForbiddenException": return [3, 4];
1063
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
1064
- case "NotFoundException": return [3, 6];
1065
- case "com.amazonaws.chimesdkmediapipelines#NotFoundException": return [3, 6];
1066
- case "ServiceFailureException": return [3, 8];
1067
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
1068
- case "ServiceUnavailableException": return [3, 10];
1069
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
1070
- case "ThrottledClientException": return [3, 12];
1071
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
1072
- case "UnauthorizedClientException": return [3, 14];
1073
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
1074
- }
1075
- return [3, 16];
1076
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
1077
- case 3: throw _d.sent();
1078
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1079
- case 5: throw _d.sent();
1080
- case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1081
- case 7: throw _d.sent();
1082
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
1083
- case 9: throw _d.sent();
1084
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1085
- case 11: throw _d.sent();
1086
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
1087
- case 13: throw _d.sent();
1088
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
1089
- case 15: throw _d.sent();
1090
- case 16:
1091
- parsedBody = parsedOutput.body;
1092
- throwDefaultError({
1093
- output: output,
1094
- parsedBody: parsedBody,
1095
- exceptionCtor: __BaseException,
1096
- errorCode: errorCode,
1097
- });
1098
- _d.label = 17;
1099
- case 17: return [2];
1100
- }
562
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
563
+ if (data.MediaPipeline != null) {
564
+ contents.MediaPipeline = deserializeAws_restJson1MediaPipeline(data.MediaPipeline, context);
565
+ }
566
+ return contents;
567
+ };
568
+ const deserializeAws_restJson1GetMediaPipelineCommandError = async (output, context) => {
569
+ const parsedOutput = {
570
+ ...output,
571
+ body: await parseErrorBody(output.body, context),
572
+ };
573
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
574
+ switch (errorCode) {
575
+ case "BadRequestException":
576
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
577
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
578
+ case "ForbiddenException":
579
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
580
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
581
+ case "NotFoundException":
582
+ case "com.amazonaws.chimesdkmediapipelines#NotFoundException":
583
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
584
+ case "ServiceFailureException":
585
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
586
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
587
+ case "ServiceUnavailableException":
588
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
589
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
590
+ case "ThrottledClientException":
591
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
592
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
593
+ case "UnauthorizedClientException":
594
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
595
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
596
+ default:
597
+ const parsedBody = parsedOutput.body;
598
+ throwDefaultError({
599
+ output,
600
+ parsedBody,
601
+ exceptionCtor: __BaseException,
602
+ errorCode,
603
+ });
604
+ }
605
+ };
606
+ export const deserializeAws_restJson1ListMediaCapturePipelinesCommand = async (output, context) => {
607
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
608
+ return deserializeAws_restJson1ListMediaCapturePipelinesCommandError(output, context);
609
+ }
610
+ const contents = map({
611
+ $metadata: deserializeMetadata(output),
1101
612
  });
1102
- }); };
1103
- export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1104
- var contents;
1105
- return __generator(this, function (_a) {
1106
- switch (_a.label) {
1107
- case 0:
1108
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1109
- return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
1110
- }
1111
- contents = map({
1112
- $metadata: deserializeMetadata(output),
1113
- });
1114
- return [4, collectBody(output.body, context)];
1115
- case 1:
1116
- _a.sent();
1117
- return [2, contents];
1118
- }
613
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
614
+ if (data.MediaCapturePipelines != null) {
615
+ contents.MediaCapturePipelines = deserializeAws_restJson1MediaCapturePipelineSummaryList(data.MediaCapturePipelines, context);
616
+ }
617
+ if (data.NextToken != null) {
618
+ contents.NextToken = __expectString(data.NextToken);
619
+ }
620
+ return contents;
621
+ };
622
+ const deserializeAws_restJson1ListMediaCapturePipelinesCommandError = async (output, context) => {
623
+ const parsedOutput = {
624
+ ...output,
625
+ body: await parseErrorBody(output.body, context),
626
+ };
627
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
628
+ switch (errorCode) {
629
+ case "BadRequestException":
630
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
631
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
632
+ case "ForbiddenException":
633
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
634
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
635
+ case "ResourceLimitExceededException":
636
+ case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException":
637
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
638
+ case "ServiceFailureException":
639
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
640
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
641
+ case "ServiceUnavailableException":
642
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
643
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
644
+ case "ThrottledClientException":
645
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
646
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
647
+ case "UnauthorizedClientException":
648
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
649
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
650
+ default:
651
+ const parsedBody = parsedOutput.body;
652
+ throwDefaultError({
653
+ output,
654
+ parsedBody,
655
+ exceptionCtor: __BaseException,
656
+ errorCode,
657
+ });
658
+ }
659
+ };
660
+ export const deserializeAws_restJson1ListMediaPipelinesCommand = async (output, context) => {
661
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
662
+ return deserializeAws_restJson1ListMediaPipelinesCommandError(output, context);
663
+ }
664
+ const contents = map({
665
+ $metadata: deserializeMetadata(output),
1119
666
  });
1120
- }); };
1121
- var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1122
- var parsedOutput, _a, errorCode, _b, parsedBody;
1123
- var _c;
1124
- return __generator(this, function (_d) {
1125
- switch (_d.label) {
1126
- case 0:
1127
- _a = [__assign({}, output)];
1128
- _c = {};
1129
- return [4, parseErrorBody(output.body, context)];
1130
- case 1:
1131
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1132
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1133
- _b = errorCode;
1134
- switch (_b) {
1135
- case "BadRequestException": return [3, 2];
1136
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
1137
- case "ForbiddenException": return [3, 4];
1138
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
1139
- case "NotFoundException": return [3, 6];
1140
- case "com.amazonaws.chimesdkmediapipelines#NotFoundException": return [3, 6];
1141
- case "ServiceFailureException": return [3, 8];
1142
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
1143
- case "ServiceUnavailableException": return [3, 10];
1144
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
1145
- case "ThrottledClientException": return [3, 12];
1146
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
1147
- case "UnauthorizedClientException": return [3, 14];
1148
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
1149
- }
1150
- return [3, 16];
1151
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
1152
- case 3: throw _d.sent();
1153
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1154
- case 5: throw _d.sent();
1155
- case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1156
- case 7: throw _d.sent();
1157
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
1158
- case 9: throw _d.sent();
1159
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1160
- case 11: throw _d.sent();
1161
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
1162
- case 13: throw _d.sent();
1163
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
1164
- case 15: throw _d.sent();
1165
- case 16:
1166
- parsedBody = parsedOutput.body;
1167
- throwDefaultError({
1168
- output: output,
1169
- parsedBody: parsedBody,
1170
- exceptionCtor: __BaseException,
1171
- errorCode: errorCode,
1172
- });
1173
- _d.label = 17;
1174
- case 17: return [2];
1175
- }
667
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
668
+ if (data.MediaPipelines != null) {
669
+ contents.MediaPipelines = deserializeAws_restJson1MediaPipelineList(data.MediaPipelines, context);
670
+ }
671
+ if (data.NextToken != null) {
672
+ contents.NextToken = __expectString(data.NextToken);
673
+ }
674
+ return contents;
675
+ };
676
+ const deserializeAws_restJson1ListMediaPipelinesCommandError = async (output, context) => {
677
+ const parsedOutput = {
678
+ ...output,
679
+ body: await parseErrorBody(output.body, context),
680
+ };
681
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
682
+ switch (errorCode) {
683
+ case "BadRequestException":
684
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
685
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
686
+ case "ForbiddenException":
687
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
688
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
689
+ case "ResourceLimitExceededException":
690
+ case "com.amazonaws.chimesdkmediapipelines#ResourceLimitExceededException":
691
+ throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
692
+ case "ServiceFailureException":
693
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
694
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
695
+ case "ServiceUnavailableException":
696
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
697
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
698
+ case "ThrottledClientException":
699
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
700
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
701
+ case "UnauthorizedClientException":
702
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
703
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
704
+ default:
705
+ const parsedBody = parsedOutput.body;
706
+ throwDefaultError({
707
+ output,
708
+ parsedBody,
709
+ exceptionCtor: __BaseException,
710
+ errorCode,
711
+ });
712
+ }
713
+ };
714
+ export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
715
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
716
+ return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
717
+ }
718
+ const contents = map({
719
+ $metadata: deserializeMetadata(output),
1176
720
  });
1177
- }); };
1178
- export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1179
- var contents;
1180
- return __generator(this, function (_a) {
1181
- switch (_a.label) {
1182
- case 0:
1183
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1184
- return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
1185
- }
1186
- contents = map({
1187
- $metadata: deserializeMetadata(output),
1188
- });
1189
- return [4, collectBody(output.body, context)];
1190
- case 1:
1191
- _a.sent();
1192
- return [2, contents];
1193
- }
721
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
722
+ if (data.Tags != null) {
723
+ contents.Tags = deserializeAws_restJson1TagList(data.Tags, context);
724
+ }
725
+ return contents;
726
+ };
727
+ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
728
+ const parsedOutput = {
729
+ ...output,
730
+ body: await parseErrorBody(output.body, context),
731
+ };
732
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
733
+ switch (errorCode) {
734
+ case "BadRequestException":
735
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
736
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
737
+ case "ForbiddenException":
738
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
739
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
740
+ case "NotFoundException":
741
+ case "com.amazonaws.chimesdkmediapipelines#NotFoundException":
742
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
743
+ case "ServiceFailureException":
744
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
745
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
746
+ case "ServiceUnavailableException":
747
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
748
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
749
+ case "ThrottledClientException":
750
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
751
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
752
+ case "UnauthorizedClientException":
753
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
754
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
755
+ default:
756
+ const parsedBody = parsedOutput.body;
757
+ throwDefaultError({
758
+ output,
759
+ parsedBody,
760
+ exceptionCtor: __BaseException,
761
+ errorCode,
762
+ });
763
+ }
764
+ };
765
+ export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
766
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
767
+ return deserializeAws_restJson1TagResourceCommandError(output, context);
768
+ }
769
+ const contents = map({
770
+ $metadata: deserializeMetadata(output),
1194
771
  });
1195
- }); };
1196
- var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1197
- var parsedOutput, _a, errorCode, _b, parsedBody;
1198
- var _c;
1199
- return __generator(this, function (_d) {
1200
- switch (_d.label) {
1201
- case 0:
1202
- _a = [__assign({}, output)];
1203
- _c = {};
1204
- return [4, parseErrorBody(output.body, context)];
1205
- case 1:
1206
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1207
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1208
- _b = errorCode;
1209
- switch (_b) {
1210
- case "BadRequestException": return [3, 2];
1211
- case "com.amazonaws.chimesdkmediapipelines#BadRequestException": return [3, 2];
1212
- case "ForbiddenException": return [3, 4];
1213
- case "com.amazonaws.chimesdkmediapipelines#ForbiddenException": return [3, 4];
1214
- case "NotFoundException": return [3, 6];
1215
- case "com.amazonaws.chimesdkmediapipelines#NotFoundException": return [3, 6];
1216
- case "ServiceFailureException": return [3, 8];
1217
- case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException": return [3, 8];
1218
- case "ServiceUnavailableException": return [3, 10];
1219
- case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException": return [3, 10];
1220
- case "ThrottledClientException": return [3, 12];
1221
- case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException": return [3, 12];
1222
- case "UnauthorizedClientException": return [3, 14];
1223
- case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException": return [3, 14];
1224
- }
1225
- return [3, 16];
1226
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
1227
- case 3: throw _d.sent();
1228
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1229
- case 5: throw _d.sent();
1230
- case 6: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1231
- case 7: throw _d.sent();
1232
- case 8: return [4, deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context)];
1233
- case 9: throw _d.sent();
1234
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1235
- case 11: throw _d.sent();
1236
- case 12: return [4, deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context)];
1237
- case 13: throw _d.sent();
1238
- case 14: return [4, deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context)];
1239
- case 15: throw _d.sent();
1240
- case 16:
1241
- parsedBody = parsedOutput.body;
1242
- throwDefaultError({
1243
- output: output,
1244
- parsedBody: parsedBody,
1245
- exceptionCtor: __BaseException,
1246
- errorCode: errorCode,
1247
- });
1248
- _d.label = 17;
1249
- case 17: return [2];
1250
- }
772
+ await collectBody(output.body, context);
773
+ return contents;
774
+ };
775
+ const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
776
+ const parsedOutput = {
777
+ ...output,
778
+ body: await parseErrorBody(output.body, context),
779
+ };
780
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
781
+ switch (errorCode) {
782
+ case "BadRequestException":
783
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
784
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
785
+ case "ForbiddenException":
786
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
787
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
788
+ case "NotFoundException":
789
+ case "com.amazonaws.chimesdkmediapipelines#NotFoundException":
790
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
791
+ case "ServiceFailureException":
792
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
793
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
794
+ case "ServiceUnavailableException":
795
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
796
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
797
+ case "ThrottledClientException":
798
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
799
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
800
+ case "UnauthorizedClientException":
801
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
802
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
803
+ default:
804
+ const parsedBody = parsedOutput.body;
805
+ throwDefaultError({
806
+ output,
807
+ parsedBody,
808
+ exceptionCtor: __BaseException,
809
+ errorCode,
810
+ });
811
+ }
812
+ };
813
+ export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
814
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
815
+ return deserializeAws_restJson1UntagResourceCommandError(output, context);
816
+ }
817
+ const contents = map({
818
+ $metadata: deserializeMetadata(output),
1251
819
  });
1252
- }); };
1253
- var map = __map;
1254
- var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1255
- var contents, data, exception;
1256
- return __generator(this, function (_a) {
1257
- contents = map({});
1258
- data = parsedOutput.body;
1259
- if (data.Code != null) {
1260
- contents.Code = __expectString(data.Code);
1261
- }
1262
- if (data.Message != null) {
1263
- contents.Message = __expectString(data.Message);
1264
- }
1265
- if (data.RequestId != null) {
1266
- contents.RequestId = __expectString(data.RequestId);
1267
- }
1268
- exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1269
- return [2, __decorateServiceException(exception, parsedOutput.body)];
820
+ await collectBody(output.body, context);
821
+ return contents;
822
+ };
823
+ const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
824
+ const parsedOutput = {
825
+ ...output,
826
+ body: await parseErrorBody(output.body, context),
827
+ };
828
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
829
+ switch (errorCode) {
830
+ case "BadRequestException":
831
+ case "com.amazonaws.chimesdkmediapipelines#BadRequestException":
832
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
833
+ case "ForbiddenException":
834
+ case "com.amazonaws.chimesdkmediapipelines#ForbiddenException":
835
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
836
+ case "NotFoundException":
837
+ case "com.amazonaws.chimesdkmediapipelines#NotFoundException":
838
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
839
+ case "ServiceFailureException":
840
+ case "com.amazonaws.chimesdkmediapipelines#ServiceFailureException":
841
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
842
+ case "ServiceUnavailableException":
843
+ case "com.amazonaws.chimesdkmediapipelines#ServiceUnavailableException":
844
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
845
+ case "ThrottledClientException":
846
+ case "com.amazonaws.chimesdkmediapipelines#ThrottledClientException":
847
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
848
+ case "UnauthorizedClientException":
849
+ case "com.amazonaws.chimesdkmediapipelines#UnauthorizedClientException":
850
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
851
+ default:
852
+ const parsedBody = parsedOutput.body;
853
+ throwDefaultError({
854
+ output,
855
+ parsedBody,
856
+ exceptionCtor: __BaseException,
857
+ errorCode,
858
+ });
859
+ }
860
+ };
861
+ const map = __map;
862
+ const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
863
+ const contents = map({});
864
+ const data = parsedOutput.body;
865
+ if (data.Code != null) {
866
+ contents.Code = __expectString(data.Code);
867
+ }
868
+ if (data.Message != null) {
869
+ contents.Message = __expectString(data.Message);
870
+ }
871
+ if (data.RequestId != null) {
872
+ contents.RequestId = __expectString(data.RequestId);
873
+ }
874
+ const exception = new BadRequestException({
875
+ $metadata: deserializeMetadata(parsedOutput),
876
+ ...contents,
1270
877
  });
1271
- }); };
1272
- var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1273
- var contents, data, exception;
1274
- return __generator(this, function (_a) {
1275
- contents = map({});
1276
- data = parsedOutput.body;
1277
- if (data.Code != null) {
1278
- contents.Code = __expectString(data.Code);
1279
- }
1280
- if (data.Message != null) {
1281
- contents.Message = __expectString(data.Message);
1282
- }
1283
- if (data.RequestId != null) {
1284
- contents.RequestId = __expectString(data.RequestId);
1285
- }
1286
- exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1287
- return [2, __decorateServiceException(exception, parsedOutput.body)];
878
+ return __decorateServiceException(exception, parsedOutput.body);
879
+ };
880
+ const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
881
+ const contents = map({});
882
+ const data = parsedOutput.body;
883
+ if (data.Code != null) {
884
+ contents.Code = __expectString(data.Code);
885
+ }
886
+ if (data.Message != null) {
887
+ contents.Message = __expectString(data.Message);
888
+ }
889
+ if (data.RequestId != null) {
890
+ contents.RequestId = __expectString(data.RequestId);
891
+ }
892
+ const exception = new ForbiddenException({
893
+ $metadata: deserializeMetadata(parsedOutput),
894
+ ...contents,
1288
895
  });
1289
- }); };
1290
- var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1291
- var contents, data, exception;
1292
- return __generator(this, function (_a) {
1293
- contents = map({});
1294
- data = parsedOutput.body;
1295
- if (data.Code != null) {
1296
- contents.Code = __expectString(data.Code);
1297
- }
1298
- if (data.Message != null) {
1299
- contents.Message = __expectString(data.Message);
1300
- }
1301
- if (data.RequestId != null) {
1302
- contents.RequestId = __expectString(data.RequestId);
1303
- }
1304
- exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1305
- return [2, __decorateServiceException(exception, parsedOutput.body)];
896
+ return __decorateServiceException(exception, parsedOutput.body);
897
+ };
898
+ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
899
+ const contents = map({});
900
+ const data = parsedOutput.body;
901
+ if (data.Code != null) {
902
+ contents.Code = __expectString(data.Code);
903
+ }
904
+ if (data.Message != null) {
905
+ contents.Message = __expectString(data.Message);
906
+ }
907
+ if (data.RequestId != null) {
908
+ contents.RequestId = __expectString(data.RequestId);
909
+ }
910
+ const exception = new NotFoundException({
911
+ $metadata: deserializeMetadata(parsedOutput),
912
+ ...contents,
1306
913
  });
1307
- }); };
1308
- var deserializeAws_restJson1ResourceLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1309
- var contents, data, exception;
1310
- return __generator(this, function (_a) {
1311
- contents = map({});
1312
- data = parsedOutput.body;
1313
- if (data.Code != null) {
1314
- contents.Code = __expectString(data.Code);
1315
- }
1316
- if (data.Message != null) {
1317
- contents.Message = __expectString(data.Message);
1318
- }
1319
- if (data.RequestId != null) {
1320
- contents.RequestId = __expectString(data.RequestId);
1321
- }
1322
- exception = new ResourceLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1323
- return [2, __decorateServiceException(exception, parsedOutput.body)];
914
+ return __decorateServiceException(exception, parsedOutput.body);
915
+ };
916
+ const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (parsedOutput, context) => {
917
+ const contents = map({});
918
+ const data = parsedOutput.body;
919
+ if (data.Code != null) {
920
+ contents.Code = __expectString(data.Code);
921
+ }
922
+ if (data.Message != null) {
923
+ contents.Message = __expectString(data.Message);
924
+ }
925
+ if (data.RequestId != null) {
926
+ contents.RequestId = __expectString(data.RequestId);
927
+ }
928
+ const exception = new ResourceLimitExceededException({
929
+ $metadata: deserializeMetadata(parsedOutput),
930
+ ...contents,
1324
931
  });
1325
- }); };
1326
- var deserializeAws_restJson1ServiceFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1327
- var contents, data, exception;
1328
- return __generator(this, function (_a) {
1329
- contents = map({});
1330
- data = parsedOutput.body;
1331
- if (data.Code != null) {
1332
- contents.Code = __expectString(data.Code);
1333
- }
1334
- if (data.Message != null) {
1335
- contents.Message = __expectString(data.Message);
1336
- }
1337
- if (data.RequestId != null) {
1338
- contents.RequestId = __expectString(data.RequestId);
1339
- }
1340
- exception = new ServiceFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1341
- return [2, __decorateServiceException(exception, parsedOutput.body)];
932
+ return __decorateServiceException(exception, parsedOutput.body);
933
+ };
934
+ const deserializeAws_restJson1ServiceFailureExceptionResponse = async (parsedOutput, context) => {
935
+ const contents = map({});
936
+ const data = parsedOutput.body;
937
+ if (data.Code != null) {
938
+ contents.Code = __expectString(data.Code);
939
+ }
940
+ if (data.Message != null) {
941
+ contents.Message = __expectString(data.Message);
942
+ }
943
+ if (data.RequestId != null) {
944
+ contents.RequestId = __expectString(data.RequestId);
945
+ }
946
+ const exception = new ServiceFailureException({
947
+ $metadata: deserializeMetadata(parsedOutput),
948
+ ...contents,
1342
949
  });
1343
- }); };
1344
- var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1345
- var contents, data, exception;
1346
- return __generator(this, function (_a) {
1347
- contents = map({});
1348
- data = parsedOutput.body;
1349
- if (data.Code != null) {
1350
- contents.Code = __expectString(data.Code);
1351
- }
1352
- if (data.Message != null) {
1353
- contents.Message = __expectString(data.Message);
1354
- }
1355
- if (data.RequestId != null) {
1356
- contents.RequestId = __expectString(data.RequestId);
1357
- }
1358
- exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1359
- return [2, __decorateServiceException(exception, parsedOutput.body)];
950
+ return __decorateServiceException(exception, parsedOutput.body);
951
+ };
952
+ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
953
+ const contents = map({});
954
+ const data = parsedOutput.body;
955
+ if (data.Code != null) {
956
+ contents.Code = __expectString(data.Code);
957
+ }
958
+ if (data.Message != null) {
959
+ contents.Message = __expectString(data.Message);
960
+ }
961
+ if (data.RequestId != null) {
962
+ contents.RequestId = __expectString(data.RequestId);
963
+ }
964
+ const exception = new ServiceUnavailableException({
965
+ $metadata: deserializeMetadata(parsedOutput),
966
+ ...contents,
1360
967
  });
1361
- }); };
1362
- var deserializeAws_restJson1ThrottledClientExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1363
- var contents, data, exception;
1364
- return __generator(this, function (_a) {
1365
- contents = map({});
1366
- data = parsedOutput.body;
1367
- if (data.Code != null) {
1368
- contents.Code = __expectString(data.Code);
1369
- }
1370
- if (data.Message != null) {
1371
- contents.Message = __expectString(data.Message);
1372
- }
1373
- if (data.RequestId != null) {
1374
- contents.RequestId = __expectString(data.RequestId);
1375
- }
1376
- exception = new ThrottledClientException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1377
- return [2, __decorateServiceException(exception, parsedOutput.body)];
968
+ return __decorateServiceException(exception, parsedOutput.body);
969
+ };
970
+ const deserializeAws_restJson1ThrottledClientExceptionResponse = async (parsedOutput, context) => {
971
+ const contents = map({});
972
+ const data = parsedOutput.body;
973
+ if (data.Code != null) {
974
+ contents.Code = __expectString(data.Code);
975
+ }
976
+ if (data.Message != null) {
977
+ contents.Message = __expectString(data.Message);
978
+ }
979
+ if (data.RequestId != null) {
980
+ contents.RequestId = __expectString(data.RequestId);
981
+ }
982
+ const exception = new ThrottledClientException({
983
+ $metadata: deserializeMetadata(parsedOutput),
984
+ ...contents,
1378
985
  });
1379
- }); };
1380
- var deserializeAws_restJson1UnauthorizedClientExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1381
- var contents, data, exception;
1382
- return __generator(this, function (_a) {
1383
- contents = map({});
1384
- data = parsedOutput.body;
1385
- if (data.Code != null) {
1386
- contents.Code = __expectString(data.Code);
1387
- }
1388
- if (data.Message != null) {
1389
- contents.Message = __expectString(data.Message);
1390
- }
1391
- if (data.RequestId != null) {
1392
- contents.RequestId = __expectString(data.RequestId);
1393
- }
1394
- exception = new UnauthorizedClientException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1395
- return [2, __decorateServiceException(exception, parsedOutput.body)];
986
+ return __decorateServiceException(exception, parsedOutput.body);
987
+ };
988
+ const deserializeAws_restJson1UnauthorizedClientExceptionResponse = async (parsedOutput, context) => {
989
+ const contents = map({});
990
+ const data = parsedOutput.body;
991
+ if (data.Code != null) {
992
+ contents.Code = __expectString(data.Code);
993
+ }
994
+ if (data.Message != null) {
995
+ contents.Message = __expectString(data.Message);
996
+ }
997
+ if (data.RequestId != null) {
998
+ contents.RequestId = __expectString(data.RequestId);
999
+ }
1000
+ const exception = new UnauthorizedClientException({
1001
+ $metadata: deserializeMetadata(parsedOutput),
1002
+ ...contents,
1396
1003
  });
1397
- }); };
1398
- var serializeAws_restJson1ArtifactsConcatenationConfiguration = function (input, context) {
1399
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Audio != null && { Audio: serializeAws_restJson1AudioConcatenationConfiguration(input.Audio, context) })), (input.CompositedVideo != null && {
1400
- CompositedVideo: serializeAws_restJson1CompositedVideoConcatenationConfiguration(input.CompositedVideo, context),
1401
- })), (input.Content != null && {
1402
- Content: serializeAws_restJson1ContentConcatenationConfiguration(input.Content, context),
1403
- })), (input.DataChannel != null && {
1404
- DataChannel: serializeAws_restJson1DataChannelConcatenationConfiguration(input.DataChannel, context),
1405
- })), (input.MeetingEvents != null && {
1406
- MeetingEvents: serializeAws_restJson1MeetingEventsConcatenationConfiguration(input.MeetingEvents, context),
1407
- })), (input.TranscriptionMessages != null && {
1408
- TranscriptionMessages: serializeAws_restJson1TranscriptionMessagesConcatenationConfiguration(input.TranscriptionMessages, context),
1409
- })), (input.Video != null && { Video: serializeAws_restJson1VideoConcatenationConfiguration(input.Video, context) }));
1410
- };
1411
- var serializeAws_restJson1ArtifactsConfiguration = function (input, context) {
1412
- return __assign(__assign(__assign(__assign({}, (input.Audio != null && { Audio: serializeAws_restJson1AudioArtifactsConfiguration(input.Audio, context) })), (input.CompositedVideo != null && {
1413
- CompositedVideo: serializeAws_restJson1CompositedVideoArtifactsConfiguration(input.CompositedVideo, context),
1414
- })), (input.Content != null && {
1415
- Content: serializeAws_restJson1ContentArtifactsConfiguration(input.Content, context),
1416
- })), (input.Video != null && { Video: serializeAws_restJson1VideoArtifactsConfiguration(input.Video, context) }));
1417
- };
1418
- var serializeAws_restJson1AttendeeIdList = function (input, context) {
1004
+ return __decorateServiceException(exception, parsedOutput.body);
1005
+ };
1006
+ const serializeAws_restJson1ArtifactsConcatenationConfiguration = (input, context) => {
1007
+ return {
1008
+ ...(input.Audio != null && { Audio: serializeAws_restJson1AudioConcatenationConfiguration(input.Audio, context) }),
1009
+ ...(input.CompositedVideo != null && {
1010
+ CompositedVideo: serializeAws_restJson1CompositedVideoConcatenationConfiguration(input.CompositedVideo, context),
1011
+ }),
1012
+ ...(input.Content != null && {
1013
+ Content: serializeAws_restJson1ContentConcatenationConfiguration(input.Content, context),
1014
+ }),
1015
+ ...(input.DataChannel != null && {
1016
+ DataChannel: serializeAws_restJson1DataChannelConcatenationConfiguration(input.DataChannel, context),
1017
+ }),
1018
+ ...(input.MeetingEvents != null && {
1019
+ MeetingEvents: serializeAws_restJson1MeetingEventsConcatenationConfiguration(input.MeetingEvents, context),
1020
+ }),
1021
+ ...(input.TranscriptionMessages != null && {
1022
+ TranscriptionMessages: serializeAws_restJson1TranscriptionMessagesConcatenationConfiguration(input.TranscriptionMessages, context),
1023
+ }),
1024
+ ...(input.Video != null && { Video: serializeAws_restJson1VideoConcatenationConfiguration(input.Video, context) }),
1025
+ };
1026
+ };
1027
+ const serializeAws_restJson1ArtifactsConfiguration = (input, context) => {
1028
+ return {
1029
+ ...(input.Audio != null && { Audio: serializeAws_restJson1AudioArtifactsConfiguration(input.Audio, context) }),
1030
+ ...(input.CompositedVideo != null && {
1031
+ CompositedVideo: serializeAws_restJson1CompositedVideoArtifactsConfiguration(input.CompositedVideo, context),
1032
+ }),
1033
+ ...(input.Content != null && {
1034
+ Content: serializeAws_restJson1ContentArtifactsConfiguration(input.Content, context),
1035
+ }),
1036
+ ...(input.Video != null && { Video: serializeAws_restJson1VideoArtifactsConfiguration(input.Video, context) }),
1037
+ };
1038
+ };
1039
+ const serializeAws_restJson1AttendeeIdList = (input, context) => {
1419
1040
  return input
1420
- .filter(function (e) { return e != null; })
1421
- .map(function (entry) {
1041
+ .filter((e) => e != null)
1042
+ .map((entry) => {
1422
1043
  return entry;
1423
1044
  });
1424
1045
  };
1425
- var serializeAws_restJson1AudioArtifactsConfiguration = function (input, context) {
1426
- return __assign({}, (input.MuxType != null && { MuxType: input.MuxType }));
1427
- };
1428
- var serializeAws_restJson1AudioConcatenationConfiguration = function (input, context) {
1429
- return __assign({}, (input.State != null && { State: input.State }));
1430
- };
1431
- var serializeAws_restJson1ChimeSdkMeetingConcatenationConfiguration = function (input, context) {
1432
- return __assign({}, (input.ArtifactsConfiguration != null && {
1433
- ArtifactsConfiguration: serializeAws_restJson1ArtifactsConcatenationConfiguration(input.ArtifactsConfiguration, context),
1434
- }));
1435
- };
1436
- var serializeAws_restJson1ChimeSdkMeetingConfiguration = function (input, context) {
1437
- return __assign(__assign({}, (input.ArtifactsConfiguration != null && {
1438
- ArtifactsConfiguration: serializeAws_restJson1ArtifactsConfiguration(input.ArtifactsConfiguration, context),
1439
- })), (input.SourceConfiguration != null && {
1440
- SourceConfiguration: serializeAws_restJson1SourceConfiguration(input.SourceConfiguration, context),
1441
- }));
1442
- };
1443
- var serializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration = function (input, context) {
1444
- return __assign(__assign(__assign(__assign({}, (input.Arn != null && { Arn: input.Arn })), (input.CompositedVideo != null && {
1445
- CompositedVideo: serializeAws_restJson1CompositedVideoArtifactsConfiguration(input.CompositedVideo, context),
1446
- })), (input.MuxType != null && { MuxType: input.MuxType })), (input.SourceConfiguration != null && {
1447
- SourceConfiguration: serializeAws_restJson1SourceConfiguration(input.SourceConfiguration, context),
1448
- }));
1449
- };
1450
- var serializeAws_restJson1CompositedVideoArtifactsConfiguration = function (input, context) {
1451
- return __assign(__assign(__assign({}, (input.GridViewConfiguration != null && {
1452
- GridViewConfiguration: serializeAws_restJson1GridViewConfiguration(input.GridViewConfiguration, context),
1453
- })), (input.Layout != null && { Layout: input.Layout })), (input.Resolution != null && { Resolution: input.Resolution }));
1454
- };
1455
- var serializeAws_restJson1CompositedVideoConcatenationConfiguration = function (input, context) {
1456
- return __assign({}, (input.State != null && { State: input.State }));
1457
- };
1458
- var serializeAws_restJson1ConcatenationSink = function (input, context) {
1459
- return __assign(__assign({}, (input.S3BucketSinkConfiguration != null && {
1460
- S3BucketSinkConfiguration: serializeAws_restJson1S3BucketSinkConfiguration(input.S3BucketSinkConfiguration, context),
1461
- })), (input.Type != null && { Type: input.Type }));
1462
- };
1463
- var serializeAws_restJson1ConcatenationSinkList = function (input, context) {
1046
+ const serializeAws_restJson1AudioArtifactsConfiguration = (input, context) => {
1047
+ return {
1048
+ ...(input.MuxType != null && { MuxType: input.MuxType }),
1049
+ };
1050
+ };
1051
+ const serializeAws_restJson1AudioConcatenationConfiguration = (input, context) => {
1052
+ return {
1053
+ ...(input.State != null && { State: input.State }),
1054
+ };
1055
+ };
1056
+ const serializeAws_restJson1ChimeSdkMeetingConcatenationConfiguration = (input, context) => {
1057
+ return {
1058
+ ...(input.ArtifactsConfiguration != null && {
1059
+ ArtifactsConfiguration: serializeAws_restJson1ArtifactsConcatenationConfiguration(input.ArtifactsConfiguration, context),
1060
+ }),
1061
+ };
1062
+ };
1063
+ const serializeAws_restJson1ChimeSdkMeetingConfiguration = (input, context) => {
1064
+ return {
1065
+ ...(input.ArtifactsConfiguration != null && {
1066
+ ArtifactsConfiguration: serializeAws_restJson1ArtifactsConfiguration(input.ArtifactsConfiguration, context),
1067
+ }),
1068
+ ...(input.SourceConfiguration != null && {
1069
+ SourceConfiguration: serializeAws_restJson1SourceConfiguration(input.SourceConfiguration, context),
1070
+ }),
1071
+ };
1072
+ };
1073
+ const serializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration = (input, context) => {
1074
+ return {
1075
+ ...(input.Arn != null && { Arn: input.Arn }),
1076
+ ...(input.CompositedVideo != null && {
1077
+ CompositedVideo: serializeAws_restJson1CompositedVideoArtifactsConfiguration(input.CompositedVideo, context),
1078
+ }),
1079
+ ...(input.MuxType != null && { MuxType: input.MuxType }),
1080
+ ...(input.SourceConfiguration != null && {
1081
+ SourceConfiguration: serializeAws_restJson1SourceConfiguration(input.SourceConfiguration, context),
1082
+ }),
1083
+ };
1084
+ };
1085
+ const serializeAws_restJson1CompositedVideoArtifactsConfiguration = (input, context) => {
1086
+ return {
1087
+ ...(input.GridViewConfiguration != null && {
1088
+ GridViewConfiguration: serializeAws_restJson1GridViewConfiguration(input.GridViewConfiguration, context),
1089
+ }),
1090
+ ...(input.Layout != null && { Layout: input.Layout }),
1091
+ ...(input.Resolution != null && { Resolution: input.Resolution }),
1092
+ };
1093
+ };
1094
+ const serializeAws_restJson1CompositedVideoConcatenationConfiguration = (input, context) => {
1095
+ return {
1096
+ ...(input.State != null && { State: input.State }),
1097
+ };
1098
+ };
1099
+ const serializeAws_restJson1ConcatenationSink = (input, context) => {
1100
+ return {
1101
+ ...(input.S3BucketSinkConfiguration != null && {
1102
+ S3BucketSinkConfiguration: serializeAws_restJson1S3BucketSinkConfiguration(input.S3BucketSinkConfiguration, context),
1103
+ }),
1104
+ ...(input.Type != null && { Type: input.Type }),
1105
+ };
1106
+ };
1107
+ const serializeAws_restJson1ConcatenationSinkList = (input, context) => {
1464
1108
  return input
1465
- .filter(function (e) { return e != null; })
1466
- .map(function (entry) {
1109
+ .filter((e) => e != null)
1110
+ .map((entry) => {
1467
1111
  return serializeAws_restJson1ConcatenationSink(entry, context);
1468
1112
  });
1469
1113
  };
1470
- var serializeAws_restJson1ConcatenationSource = function (input, context) {
1471
- return __assign(__assign({}, (input.MediaCapturePipelineSourceConfiguration != null && {
1472
- MediaCapturePipelineSourceConfiguration: serializeAws_restJson1MediaCapturePipelineSourceConfiguration(input.MediaCapturePipelineSourceConfiguration, context),
1473
- })), (input.Type != null && { Type: input.Type }));
1114
+ const serializeAws_restJson1ConcatenationSource = (input, context) => {
1115
+ return {
1116
+ ...(input.MediaCapturePipelineSourceConfiguration != null && {
1117
+ MediaCapturePipelineSourceConfiguration: serializeAws_restJson1MediaCapturePipelineSourceConfiguration(input.MediaCapturePipelineSourceConfiguration, context),
1118
+ }),
1119
+ ...(input.Type != null && { Type: input.Type }),
1120
+ };
1474
1121
  };
1475
- var serializeAws_restJson1ConcatenationSourceList = function (input, context) {
1122
+ const serializeAws_restJson1ConcatenationSourceList = (input, context) => {
1476
1123
  return input
1477
- .filter(function (e) { return e != null; })
1478
- .map(function (entry) {
1124
+ .filter((e) => e != null)
1125
+ .map((entry) => {
1479
1126
  return serializeAws_restJson1ConcatenationSource(entry, context);
1480
1127
  });
1481
1128
  };
1482
- var serializeAws_restJson1ContentArtifactsConfiguration = function (input, context) {
1483
- return __assign(__assign({}, (input.MuxType != null && { MuxType: input.MuxType })), (input.State != null && { State: input.State }));
1129
+ const serializeAws_restJson1ContentArtifactsConfiguration = (input, context) => {
1130
+ return {
1131
+ ...(input.MuxType != null && { MuxType: input.MuxType }),
1132
+ ...(input.State != null && { State: input.State }),
1133
+ };
1484
1134
  };
1485
- var serializeAws_restJson1ContentConcatenationConfiguration = function (input, context) {
1486
- return __assign({}, (input.State != null && { State: input.State }));
1135
+ const serializeAws_restJson1ContentConcatenationConfiguration = (input, context) => {
1136
+ return {
1137
+ ...(input.State != null && { State: input.State }),
1138
+ };
1487
1139
  };
1488
- var serializeAws_restJson1DataChannelConcatenationConfiguration = function (input, context) {
1489
- return __assign({}, (input.State != null && { State: input.State }));
1140
+ const serializeAws_restJson1DataChannelConcatenationConfiguration = (input, context) => {
1141
+ return {
1142
+ ...(input.State != null && { State: input.State }),
1143
+ };
1490
1144
  };
1491
- var serializeAws_restJson1ExternalUserIdList = function (input, context) {
1145
+ const serializeAws_restJson1ExternalUserIdList = (input, context) => {
1492
1146
  return input
1493
- .filter(function (e) { return e != null; })
1494
- .map(function (entry) {
1147
+ .filter((e) => e != null)
1148
+ .map((entry) => {
1495
1149
  return entry;
1496
1150
  });
1497
1151
  };
1498
- var serializeAws_restJson1GridViewConfiguration = function (input, context) {
1499
- return __assign(__assign({}, (input.ContentShareLayout != null && { ContentShareLayout: input.ContentShareLayout })), (input.PresenterOnlyConfiguration != null && {
1500
- PresenterOnlyConfiguration: serializeAws_restJson1PresenterOnlyConfiguration(input.PresenterOnlyConfiguration, context),
1501
- }));
1152
+ const serializeAws_restJson1GridViewConfiguration = (input, context) => {
1153
+ return {
1154
+ ...(input.ContentShareLayout != null && { ContentShareLayout: input.ContentShareLayout }),
1155
+ ...(input.PresenterOnlyConfiguration != null && {
1156
+ PresenterOnlyConfiguration: serializeAws_restJson1PresenterOnlyConfiguration(input.PresenterOnlyConfiguration, context),
1157
+ }),
1158
+ };
1502
1159
  };
1503
- var serializeAws_restJson1LiveConnectorRTMPConfiguration = function (input, context) {
1504
- return __assign(__assign(__assign({}, (input.AudioChannels != null && { AudioChannels: input.AudioChannels })), (input.AudioSampleRate != null && { AudioSampleRate: input.AudioSampleRate })), (input.Url != null && { Url: input.Url }));
1160
+ const serializeAws_restJson1LiveConnectorRTMPConfiguration = (input, context) => {
1161
+ return {
1162
+ ...(input.AudioChannels != null && { AudioChannels: input.AudioChannels }),
1163
+ ...(input.AudioSampleRate != null && { AudioSampleRate: input.AudioSampleRate }),
1164
+ ...(input.Url != null && { Url: input.Url }),
1165
+ };
1505
1166
  };
1506
- var serializeAws_restJson1LiveConnectorSinkConfiguration = function (input, context) {
1507
- return __assign(__assign({}, (input.RTMPConfiguration != null && {
1508
- RTMPConfiguration: serializeAws_restJson1LiveConnectorRTMPConfiguration(input.RTMPConfiguration, context),
1509
- })), (input.SinkType != null && { SinkType: input.SinkType }));
1167
+ const serializeAws_restJson1LiveConnectorSinkConfiguration = (input, context) => {
1168
+ return {
1169
+ ...(input.RTMPConfiguration != null && {
1170
+ RTMPConfiguration: serializeAws_restJson1LiveConnectorRTMPConfiguration(input.RTMPConfiguration, context),
1171
+ }),
1172
+ ...(input.SinkType != null && { SinkType: input.SinkType }),
1173
+ };
1510
1174
  };
1511
- var serializeAws_restJson1LiveConnectorSinkList = function (input, context) {
1175
+ const serializeAws_restJson1LiveConnectorSinkList = (input, context) => {
1512
1176
  return input
1513
- .filter(function (e) { return e != null; })
1514
- .map(function (entry) {
1177
+ .filter((e) => e != null)
1178
+ .map((entry) => {
1515
1179
  return serializeAws_restJson1LiveConnectorSinkConfiguration(entry, context);
1516
1180
  });
1517
1181
  };
1518
- var serializeAws_restJson1LiveConnectorSourceConfiguration = function (input, context) {
1519
- return __assign(__assign({}, (input.ChimeSdkMeetingLiveConnectorConfiguration != null && {
1520
- ChimeSdkMeetingLiveConnectorConfiguration: serializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration(input.ChimeSdkMeetingLiveConnectorConfiguration, context),
1521
- })), (input.SourceType != null && { SourceType: input.SourceType }));
1182
+ const serializeAws_restJson1LiveConnectorSourceConfiguration = (input, context) => {
1183
+ return {
1184
+ ...(input.ChimeSdkMeetingLiveConnectorConfiguration != null && {
1185
+ ChimeSdkMeetingLiveConnectorConfiguration: serializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration(input.ChimeSdkMeetingLiveConnectorConfiguration, context),
1186
+ }),
1187
+ ...(input.SourceType != null && { SourceType: input.SourceType }),
1188
+ };
1522
1189
  };
1523
- var serializeAws_restJson1LiveConnectorSourceList = function (input, context) {
1190
+ const serializeAws_restJson1LiveConnectorSourceList = (input, context) => {
1524
1191
  return input
1525
- .filter(function (e) { return e != null; })
1526
- .map(function (entry) {
1192
+ .filter((e) => e != null)
1193
+ .map((entry) => {
1527
1194
  return serializeAws_restJson1LiveConnectorSourceConfiguration(entry, context);
1528
1195
  });
1529
1196
  };
1530
- var serializeAws_restJson1MediaCapturePipelineSourceConfiguration = function (input, context) {
1531
- return __assign(__assign({}, (input.ChimeSdkMeetingConfiguration != null && {
1532
- ChimeSdkMeetingConfiguration: serializeAws_restJson1ChimeSdkMeetingConcatenationConfiguration(input.ChimeSdkMeetingConfiguration, context),
1533
- })), (input.MediaPipelineArn != null && { MediaPipelineArn: input.MediaPipelineArn }));
1197
+ const serializeAws_restJson1MediaCapturePipelineSourceConfiguration = (input, context) => {
1198
+ return {
1199
+ ...(input.ChimeSdkMeetingConfiguration != null && {
1200
+ ChimeSdkMeetingConfiguration: serializeAws_restJson1ChimeSdkMeetingConcatenationConfiguration(input.ChimeSdkMeetingConfiguration, context),
1201
+ }),
1202
+ ...(input.MediaPipelineArn != null && { MediaPipelineArn: input.MediaPipelineArn }),
1203
+ };
1534
1204
  };
1535
- var serializeAws_restJson1MeetingEventsConcatenationConfiguration = function (input, context) {
1536
- return __assign({}, (input.State != null && { State: input.State }));
1205
+ const serializeAws_restJson1MeetingEventsConcatenationConfiguration = (input, context) => {
1206
+ return {
1207
+ ...(input.State != null && { State: input.State }),
1208
+ };
1537
1209
  };
1538
- var serializeAws_restJson1PresenterOnlyConfiguration = function (input, context) {
1539
- return __assign({}, (input.PresenterPosition != null && { PresenterPosition: input.PresenterPosition }));
1210
+ const serializeAws_restJson1PresenterOnlyConfiguration = (input, context) => {
1211
+ return {
1212
+ ...(input.PresenterPosition != null && { PresenterPosition: input.PresenterPosition }),
1213
+ };
1540
1214
  };
1541
- var serializeAws_restJson1S3BucketSinkConfiguration = function (input, context) {
1542
- return __assign({}, (input.Destination != null && { Destination: input.Destination }));
1215
+ const serializeAws_restJson1S3BucketSinkConfiguration = (input, context) => {
1216
+ return {
1217
+ ...(input.Destination != null && { Destination: input.Destination }),
1218
+ };
1543
1219
  };
1544
- var serializeAws_restJson1SelectedVideoStreams = function (input, context) {
1545
- return __assign(__assign({}, (input.AttendeeIds != null && { AttendeeIds: serializeAws_restJson1AttendeeIdList(input.AttendeeIds, context) })), (input.ExternalUserIds != null && {
1546
- ExternalUserIds: serializeAws_restJson1ExternalUserIdList(input.ExternalUserIds, context),
1547
- }));
1220
+ const serializeAws_restJson1SelectedVideoStreams = (input, context) => {
1221
+ return {
1222
+ ...(input.AttendeeIds != null && { AttendeeIds: serializeAws_restJson1AttendeeIdList(input.AttendeeIds, context) }),
1223
+ ...(input.ExternalUserIds != null && {
1224
+ ExternalUserIds: serializeAws_restJson1ExternalUserIdList(input.ExternalUserIds, context),
1225
+ }),
1226
+ };
1548
1227
  };
1549
- var serializeAws_restJson1SourceConfiguration = function (input, context) {
1550
- return __assign({}, (input.SelectedVideoStreams != null && {
1551
- SelectedVideoStreams: serializeAws_restJson1SelectedVideoStreams(input.SelectedVideoStreams, context),
1552
- }));
1228
+ const serializeAws_restJson1SourceConfiguration = (input, context) => {
1229
+ return {
1230
+ ...(input.SelectedVideoStreams != null && {
1231
+ SelectedVideoStreams: serializeAws_restJson1SelectedVideoStreams(input.SelectedVideoStreams, context),
1232
+ }),
1233
+ };
1553
1234
  };
1554
- var serializeAws_restJson1Tag = function (input, context) {
1555
- return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
1235
+ const serializeAws_restJson1Tag = (input, context) => {
1236
+ return {
1237
+ ...(input.Key != null && { Key: input.Key }),
1238
+ ...(input.Value != null && { Value: input.Value }),
1239
+ };
1556
1240
  };
1557
- var serializeAws_restJson1TagKeyList = function (input, context) {
1241
+ const serializeAws_restJson1TagKeyList = (input, context) => {
1558
1242
  return input
1559
- .filter(function (e) { return e != null; })
1560
- .map(function (entry) {
1243
+ .filter((e) => e != null)
1244
+ .map((entry) => {
1561
1245
  return entry;
1562
1246
  });
1563
1247
  };
1564
- var serializeAws_restJson1TagList = function (input, context) {
1248
+ const serializeAws_restJson1TagList = (input, context) => {
1565
1249
  return input
1566
- .filter(function (e) { return e != null; })
1567
- .map(function (entry) {
1250
+ .filter((e) => e != null)
1251
+ .map((entry) => {
1568
1252
  return serializeAws_restJson1Tag(entry, context);
1569
1253
  });
1570
1254
  };
1571
- var serializeAws_restJson1TranscriptionMessagesConcatenationConfiguration = function (input, context) {
1572
- return __assign({}, (input.State != null && { State: input.State }));
1255
+ const serializeAws_restJson1TranscriptionMessagesConcatenationConfiguration = (input, context) => {
1256
+ return {
1257
+ ...(input.State != null && { State: input.State }),
1258
+ };
1573
1259
  };
1574
- var serializeAws_restJson1VideoArtifactsConfiguration = function (input, context) {
1575
- return __assign(__assign({}, (input.MuxType != null && { MuxType: input.MuxType })), (input.State != null && { State: input.State }));
1260
+ const serializeAws_restJson1VideoArtifactsConfiguration = (input, context) => {
1261
+ return {
1262
+ ...(input.MuxType != null && { MuxType: input.MuxType }),
1263
+ ...(input.State != null && { State: input.State }),
1264
+ };
1576
1265
  };
1577
- var serializeAws_restJson1VideoConcatenationConfiguration = function (input, context) {
1578
- return __assign({}, (input.State != null && { State: input.State }));
1266
+ const serializeAws_restJson1VideoConcatenationConfiguration = (input, context) => {
1267
+ return {
1268
+ ...(input.State != null && { State: input.State }),
1269
+ };
1579
1270
  };
1580
- var deserializeAws_restJson1ArtifactsConcatenationConfiguration = function (output, context) {
1271
+ const deserializeAws_restJson1ArtifactsConcatenationConfiguration = (output, context) => {
1581
1272
  return {
1582
1273
  Audio: output.Audio != null ? deserializeAws_restJson1AudioConcatenationConfiguration(output.Audio, context) : undefined,
1583
1274
  CompositedVideo: output.CompositedVideo != null
@@ -1598,7 +1289,7 @@ var deserializeAws_restJson1ArtifactsConcatenationConfiguration = function (outp
1598
1289
  Video: output.Video != null ? deserializeAws_restJson1VideoConcatenationConfiguration(output.Video, context) : undefined,
1599
1290
  };
1600
1291
  };
1601
- var deserializeAws_restJson1ArtifactsConfiguration = function (output, context) {
1292
+ const deserializeAws_restJson1ArtifactsConfiguration = (output, context) => {
1602
1293
  return {
1603
1294
  Audio: output.Audio != null ? deserializeAws_restJson1AudioArtifactsConfiguration(output.Audio, context) : undefined,
1604
1295
  CompositedVideo: output.CompositedVideo != null
@@ -1610,10 +1301,10 @@ var deserializeAws_restJson1ArtifactsConfiguration = function (output, context)
1610
1301
  Video: output.Video != null ? deserializeAws_restJson1VideoArtifactsConfiguration(output.Video, context) : undefined,
1611
1302
  };
1612
1303
  };
1613
- var deserializeAws_restJson1AttendeeIdList = function (output, context) {
1614
- var retVal = (output || [])
1615
- .filter(function (e) { return e != null; })
1616
- .map(function (entry) {
1304
+ const deserializeAws_restJson1AttendeeIdList = (output, context) => {
1305
+ const retVal = (output || [])
1306
+ .filter((e) => e != null)
1307
+ .map((entry) => {
1617
1308
  if (entry === null) {
1618
1309
  return null;
1619
1310
  }
@@ -1621,24 +1312,24 @@ var deserializeAws_restJson1AttendeeIdList = function (output, context) {
1621
1312
  });
1622
1313
  return retVal;
1623
1314
  };
1624
- var deserializeAws_restJson1AudioArtifactsConfiguration = function (output, context) {
1315
+ const deserializeAws_restJson1AudioArtifactsConfiguration = (output, context) => {
1625
1316
  return {
1626
1317
  MuxType: __expectString(output.MuxType),
1627
1318
  };
1628
1319
  };
1629
- var deserializeAws_restJson1AudioConcatenationConfiguration = function (output, context) {
1320
+ const deserializeAws_restJson1AudioConcatenationConfiguration = (output, context) => {
1630
1321
  return {
1631
1322
  State: __expectString(output.State),
1632
1323
  };
1633
1324
  };
1634
- var deserializeAws_restJson1ChimeSdkMeetingConcatenationConfiguration = function (output, context) {
1325
+ const deserializeAws_restJson1ChimeSdkMeetingConcatenationConfiguration = (output, context) => {
1635
1326
  return {
1636
1327
  ArtifactsConfiguration: output.ArtifactsConfiguration != null
1637
1328
  ? deserializeAws_restJson1ArtifactsConcatenationConfiguration(output.ArtifactsConfiguration, context)
1638
1329
  : undefined,
1639
1330
  };
1640
1331
  };
1641
- var deserializeAws_restJson1ChimeSdkMeetingConfiguration = function (output, context) {
1332
+ const deserializeAws_restJson1ChimeSdkMeetingConfiguration = (output, context) => {
1642
1333
  return {
1643
1334
  ArtifactsConfiguration: output.ArtifactsConfiguration != null
1644
1335
  ? deserializeAws_restJson1ArtifactsConfiguration(output.ArtifactsConfiguration, context)
@@ -1648,7 +1339,7 @@ var deserializeAws_restJson1ChimeSdkMeetingConfiguration = function (output, con
1648
1339
  : undefined,
1649
1340
  };
1650
1341
  };
1651
- var deserializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration = function (output, context) {
1342
+ const deserializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration = (output, context) => {
1652
1343
  return {
1653
1344
  Arn: __expectString(output.Arn),
1654
1345
  CompositedVideo: output.CompositedVideo != null
@@ -1660,7 +1351,7 @@ var deserializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration = function
1660
1351
  : undefined,
1661
1352
  };
1662
1353
  };
1663
- var deserializeAws_restJson1CompositedVideoArtifactsConfiguration = function (output, context) {
1354
+ const deserializeAws_restJson1CompositedVideoArtifactsConfiguration = (output, context) => {
1664
1355
  return {
1665
1356
  GridViewConfiguration: output.GridViewConfiguration != null
1666
1357
  ? deserializeAws_restJson1GridViewConfiguration(output.GridViewConfiguration, context)
@@ -1669,12 +1360,12 @@ var deserializeAws_restJson1CompositedVideoArtifactsConfiguration = function (ou
1669
1360
  Resolution: __expectString(output.Resolution),
1670
1361
  };
1671
1362
  };
1672
- var deserializeAws_restJson1CompositedVideoConcatenationConfiguration = function (output, context) {
1363
+ const deserializeAws_restJson1CompositedVideoConcatenationConfiguration = (output, context) => {
1673
1364
  return {
1674
1365
  State: __expectString(output.State),
1675
1366
  };
1676
1367
  };
1677
- var deserializeAws_restJson1ConcatenationSink = function (output, context) {
1368
+ const deserializeAws_restJson1ConcatenationSink = (output, context) => {
1678
1369
  return {
1679
1370
  S3BucketSinkConfiguration: output.S3BucketSinkConfiguration != null
1680
1371
  ? deserializeAws_restJson1S3BucketSinkConfiguration(output.S3BucketSinkConfiguration, context)
@@ -1682,10 +1373,10 @@ var deserializeAws_restJson1ConcatenationSink = function (output, context) {
1682
1373
  Type: __expectString(output.Type),
1683
1374
  };
1684
1375
  };
1685
- var deserializeAws_restJson1ConcatenationSinkList = function (output, context) {
1686
- var retVal = (output || [])
1687
- .filter(function (e) { return e != null; })
1688
- .map(function (entry) {
1376
+ const deserializeAws_restJson1ConcatenationSinkList = (output, context) => {
1377
+ const retVal = (output || [])
1378
+ .filter((e) => e != null)
1379
+ .map((entry) => {
1689
1380
  if (entry === null) {
1690
1381
  return null;
1691
1382
  }
@@ -1693,7 +1384,7 @@ var deserializeAws_restJson1ConcatenationSinkList = function (output, context) {
1693
1384
  });
1694
1385
  return retVal;
1695
1386
  };
1696
- var deserializeAws_restJson1ConcatenationSource = function (output, context) {
1387
+ const deserializeAws_restJson1ConcatenationSource = (output, context) => {
1697
1388
  return {
1698
1389
  MediaCapturePipelineSourceConfiguration: output.MediaCapturePipelineSourceConfiguration != null
1699
1390
  ? deserializeAws_restJson1MediaCapturePipelineSourceConfiguration(output.MediaCapturePipelineSourceConfiguration, context)
@@ -1701,10 +1392,10 @@ var deserializeAws_restJson1ConcatenationSource = function (output, context) {
1701
1392
  Type: __expectString(output.Type),
1702
1393
  };
1703
1394
  };
1704
- var deserializeAws_restJson1ConcatenationSourceList = function (output, context) {
1705
- var retVal = (output || [])
1706
- .filter(function (e) { return e != null; })
1707
- .map(function (entry) {
1395
+ const deserializeAws_restJson1ConcatenationSourceList = (output, context) => {
1396
+ const retVal = (output || [])
1397
+ .filter((e) => e != null)
1398
+ .map((entry) => {
1708
1399
  if (entry === null) {
1709
1400
  return null;
1710
1401
  }
@@ -1712,26 +1403,26 @@ var deserializeAws_restJson1ConcatenationSourceList = function (output, context)
1712
1403
  });
1713
1404
  return retVal;
1714
1405
  };
1715
- var deserializeAws_restJson1ContentArtifactsConfiguration = function (output, context) {
1406
+ const deserializeAws_restJson1ContentArtifactsConfiguration = (output, context) => {
1716
1407
  return {
1717
1408
  MuxType: __expectString(output.MuxType),
1718
1409
  State: __expectString(output.State),
1719
1410
  };
1720
1411
  };
1721
- var deserializeAws_restJson1ContentConcatenationConfiguration = function (output, context) {
1412
+ const deserializeAws_restJson1ContentConcatenationConfiguration = (output, context) => {
1722
1413
  return {
1723
1414
  State: __expectString(output.State),
1724
1415
  };
1725
1416
  };
1726
- var deserializeAws_restJson1DataChannelConcatenationConfiguration = function (output, context) {
1417
+ const deserializeAws_restJson1DataChannelConcatenationConfiguration = (output, context) => {
1727
1418
  return {
1728
1419
  State: __expectString(output.State),
1729
1420
  };
1730
1421
  };
1731
- var deserializeAws_restJson1ExternalUserIdList = function (output, context) {
1732
- var retVal = (output || [])
1733
- .filter(function (e) { return e != null; })
1734
- .map(function (entry) {
1422
+ const deserializeAws_restJson1ExternalUserIdList = (output, context) => {
1423
+ const retVal = (output || [])
1424
+ .filter((e) => e != null)
1425
+ .map((entry) => {
1735
1426
  if (entry === null) {
1736
1427
  return null;
1737
1428
  }
@@ -1739,7 +1430,7 @@ var deserializeAws_restJson1ExternalUserIdList = function (output, context) {
1739
1430
  });
1740
1431
  return retVal;
1741
1432
  };
1742
- var deserializeAws_restJson1GridViewConfiguration = function (output, context) {
1433
+ const deserializeAws_restJson1GridViewConfiguration = (output, context) => {
1743
1434
  return {
1744
1435
  ContentShareLayout: __expectString(output.ContentShareLayout),
1745
1436
  PresenterOnlyConfiguration: output.PresenterOnlyConfiguration != null
@@ -1747,14 +1438,14 @@ var deserializeAws_restJson1GridViewConfiguration = function (output, context) {
1747
1438
  : undefined,
1748
1439
  };
1749
1440
  };
1750
- var deserializeAws_restJson1LiveConnectorRTMPConfiguration = function (output, context) {
1441
+ const deserializeAws_restJson1LiveConnectorRTMPConfiguration = (output, context) => {
1751
1442
  return {
1752
1443
  AudioChannels: __expectString(output.AudioChannels),
1753
1444
  AudioSampleRate: __expectString(output.AudioSampleRate),
1754
1445
  Url: __expectString(output.Url),
1755
1446
  };
1756
1447
  };
1757
- var deserializeAws_restJson1LiveConnectorSinkConfiguration = function (output, context) {
1448
+ const deserializeAws_restJson1LiveConnectorSinkConfiguration = (output, context) => {
1758
1449
  return {
1759
1450
  RTMPConfiguration: output.RTMPConfiguration != null
1760
1451
  ? deserializeAws_restJson1LiveConnectorRTMPConfiguration(output.RTMPConfiguration, context)
@@ -1762,10 +1453,10 @@ var deserializeAws_restJson1LiveConnectorSinkConfiguration = function (output, c
1762
1453
  SinkType: __expectString(output.SinkType),
1763
1454
  };
1764
1455
  };
1765
- var deserializeAws_restJson1LiveConnectorSinkList = function (output, context) {
1766
- var retVal = (output || [])
1767
- .filter(function (e) { return e != null; })
1768
- .map(function (entry) {
1456
+ const deserializeAws_restJson1LiveConnectorSinkList = (output, context) => {
1457
+ const retVal = (output || [])
1458
+ .filter((e) => e != null)
1459
+ .map((entry) => {
1769
1460
  if (entry === null) {
1770
1461
  return null;
1771
1462
  }
@@ -1773,7 +1464,7 @@ var deserializeAws_restJson1LiveConnectorSinkList = function (output, context) {
1773
1464
  });
1774
1465
  return retVal;
1775
1466
  };
1776
- var deserializeAws_restJson1LiveConnectorSourceConfiguration = function (output, context) {
1467
+ const deserializeAws_restJson1LiveConnectorSourceConfiguration = (output, context) => {
1777
1468
  return {
1778
1469
  ChimeSdkMeetingLiveConnectorConfiguration: output.ChimeSdkMeetingLiveConnectorConfiguration != null
1779
1470
  ? deserializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration(output.ChimeSdkMeetingLiveConnectorConfiguration, context)
@@ -1781,10 +1472,10 @@ var deserializeAws_restJson1LiveConnectorSourceConfiguration = function (output,
1781
1472
  SourceType: __expectString(output.SourceType),
1782
1473
  };
1783
1474
  };
1784
- var deserializeAws_restJson1LiveConnectorSourceList = function (output, context) {
1785
- var retVal = (output || [])
1786
- .filter(function (e) { return e != null; })
1787
- .map(function (entry) {
1475
+ const deserializeAws_restJson1LiveConnectorSourceList = (output, context) => {
1476
+ const retVal = (output || [])
1477
+ .filter((e) => e != null)
1478
+ .map((entry) => {
1788
1479
  if (entry === null) {
1789
1480
  return null;
1790
1481
  }
@@ -1792,7 +1483,7 @@ var deserializeAws_restJson1LiveConnectorSourceList = function (output, context)
1792
1483
  });
1793
1484
  return retVal;
1794
1485
  };
1795
- var deserializeAws_restJson1MediaCapturePipeline = function (output, context) {
1486
+ const deserializeAws_restJson1MediaCapturePipeline = (output, context) => {
1796
1487
  return {
1797
1488
  ChimeSdkMeetingConfiguration: output.ChimeSdkMeetingConfiguration != null
1798
1489
  ? deserializeAws_restJson1ChimeSdkMeetingConfiguration(output.ChimeSdkMeetingConfiguration, context)
@@ -1808,7 +1499,7 @@ var deserializeAws_restJson1MediaCapturePipeline = function (output, context) {
1808
1499
  UpdatedTimestamp: output.UpdatedTimestamp != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdatedTimestamp)) : undefined,
1809
1500
  };
1810
1501
  };
1811
- var deserializeAws_restJson1MediaCapturePipelineSourceConfiguration = function (output, context) {
1502
+ const deserializeAws_restJson1MediaCapturePipelineSourceConfiguration = (output, context) => {
1812
1503
  return {
1813
1504
  ChimeSdkMeetingConfiguration: output.ChimeSdkMeetingConfiguration != null
1814
1505
  ? deserializeAws_restJson1ChimeSdkMeetingConcatenationConfiguration(output.ChimeSdkMeetingConfiguration, context)
@@ -1816,16 +1507,16 @@ var deserializeAws_restJson1MediaCapturePipelineSourceConfiguration = function (
1816
1507
  MediaPipelineArn: __expectString(output.MediaPipelineArn),
1817
1508
  };
1818
1509
  };
1819
- var deserializeAws_restJson1MediaCapturePipelineSummary = function (output, context) {
1510
+ const deserializeAws_restJson1MediaCapturePipelineSummary = (output, context) => {
1820
1511
  return {
1821
1512
  MediaPipelineArn: __expectString(output.MediaPipelineArn),
1822
1513
  MediaPipelineId: __expectString(output.MediaPipelineId),
1823
1514
  };
1824
1515
  };
1825
- var deserializeAws_restJson1MediaCapturePipelineSummaryList = function (output, context) {
1826
- var retVal = (output || [])
1827
- .filter(function (e) { return e != null; })
1828
- .map(function (entry) {
1516
+ const deserializeAws_restJson1MediaCapturePipelineSummaryList = (output, context) => {
1517
+ const retVal = (output || [])
1518
+ .filter((e) => e != null)
1519
+ .map((entry) => {
1829
1520
  if (entry === null) {
1830
1521
  return null;
1831
1522
  }
@@ -1833,7 +1524,7 @@ var deserializeAws_restJson1MediaCapturePipelineSummaryList = function (output,
1833
1524
  });
1834
1525
  return retVal;
1835
1526
  };
1836
- var deserializeAws_restJson1MediaConcatenationPipeline = function (output, context) {
1527
+ const deserializeAws_restJson1MediaConcatenationPipeline = (output, context) => {
1837
1528
  return {
1838
1529
  CreatedTimestamp: output.CreatedTimestamp != null ? __expectNonNull(__parseRfc3339DateTime(output.CreatedTimestamp)) : undefined,
1839
1530
  MediaPipelineArn: __expectString(output.MediaPipelineArn),
@@ -1844,7 +1535,7 @@ var deserializeAws_restJson1MediaConcatenationPipeline = function (output, conte
1844
1535
  UpdatedTimestamp: output.UpdatedTimestamp != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdatedTimestamp)) : undefined,
1845
1536
  };
1846
1537
  };
1847
- var deserializeAws_restJson1MediaLiveConnectorPipeline = function (output, context) {
1538
+ const deserializeAws_restJson1MediaLiveConnectorPipeline = (output, context) => {
1848
1539
  return {
1849
1540
  CreatedTimestamp: output.CreatedTimestamp != null ? __expectNonNull(__parseRfc3339DateTime(output.CreatedTimestamp)) : undefined,
1850
1541
  MediaPipelineArn: __expectString(output.MediaPipelineArn),
@@ -1855,7 +1546,7 @@ var deserializeAws_restJson1MediaLiveConnectorPipeline = function (output, conte
1855
1546
  UpdatedTimestamp: output.UpdatedTimestamp != null ? __expectNonNull(__parseRfc3339DateTime(output.UpdatedTimestamp)) : undefined,
1856
1547
  };
1857
1548
  };
1858
- var deserializeAws_restJson1MediaPipeline = function (output, context) {
1549
+ const deserializeAws_restJson1MediaPipeline = (output, context) => {
1859
1550
  return {
1860
1551
  MediaCapturePipeline: output.MediaCapturePipeline != null
1861
1552
  ? deserializeAws_restJson1MediaCapturePipeline(output.MediaCapturePipeline, context)
@@ -1868,10 +1559,10 @@ var deserializeAws_restJson1MediaPipeline = function (output, context) {
1868
1559
  : undefined,
1869
1560
  };
1870
1561
  };
1871
- var deserializeAws_restJson1MediaPipelineList = function (output, context) {
1872
- var retVal = (output || [])
1873
- .filter(function (e) { return e != null; })
1874
- .map(function (entry) {
1562
+ const deserializeAws_restJson1MediaPipelineList = (output, context) => {
1563
+ const retVal = (output || [])
1564
+ .filter((e) => e != null)
1565
+ .map((entry) => {
1875
1566
  if (entry === null) {
1876
1567
  return null;
1877
1568
  }
@@ -1879,28 +1570,28 @@ var deserializeAws_restJson1MediaPipelineList = function (output, context) {
1879
1570
  });
1880
1571
  return retVal;
1881
1572
  };
1882
- var deserializeAws_restJson1MediaPipelineSummary = function (output, context) {
1573
+ const deserializeAws_restJson1MediaPipelineSummary = (output, context) => {
1883
1574
  return {
1884
1575
  MediaPipelineArn: __expectString(output.MediaPipelineArn),
1885
1576
  MediaPipelineId: __expectString(output.MediaPipelineId),
1886
1577
  };
1887
1578
  };
1888
- var deserializeAws_restJson1MeetingEventsConcatenationConfiguration = function (output, context) {
1579
+ const deserializeAws_restJson1MeetingEventsConcatenationConfiguration = (output, context) => {
1889
1580
  return {
1890
1581
  State: __expectString(output.State),
1891
1582
  };
1892
1583
  };
1893
- var deserializeAws_restJson1PresenterOnlyConfiguration = function (output, context) {
1584
+ const deserializeAws_restJson1PresenterOnlyConfiguration = (output, context) => {
1894
1585
  return {
1895
1586
  PresenterPosition: __expectString(output.PresenterPosition),
1896
1587
  };
1897
1588
  };
1898
- var deserializeAws_restJson1S3BucketSinkConfiguration = function (output, context) {
1589
+ const deserializeAws_restJson1S3BucketSinkConfiguration = (output, context) => {
1899
1590
  return {
1900
1591
  Destination: __expectString(output.Destination),
1901
1592
  };
1902
1593
  };
1903
- var deserializeAws_restJson1SelectedVideoStreams = function (output, context) {
1594
+ const deserializeAws_restJson1SelectedVideoStreams = (output, context) => {
1904
1595
  return {
1905
1596
  AttendeeIds: output.AttendeeIds != null ? deserializeAws_restJson1AttendeeIdList(output.AttendeeIds, context) : undefined,
1906
1597
  ExternalUserIds: output.ExternalUserIds != null
@@ -1908,23 +1599,23 @@ var deserializeAws_restJson1SelectedVideoStreams = function (output, context) {
1908
1599
  : undefined,
1909
1600
  };
1910
1601
  };
1911
- var deserializeAws_restJson1SourceConfiguration = function (output, context) {
1602
+ const deserializeAws_restJson1SourceConfiguration = (output, context) => {
1912
1603
  return {
1913
1604
  SelectedVideoStreams: output.SelectedVideoStreams != null
1914
1605
  ? deserializeAws_restJson1SelectedVideoStreams(output.SelectedVideoStreams, context)
1915
1606
  : undefined,
1916
1607
  };
1917
1608
  };
1918
- var deserializeAws_restJson1Tag = function (output, context) {
1609
+ const deserializeAws_restJson1Tag = (output, context) => {
1919
1610
  return {
1920
1611
  Key: __expectString(output.Key),
1921
1612
  Value: __expectString(output.Value),
1922
1613
  };
1923
1614
  };
1924
- var deserializeAws_restJson1TagList = function (output, context) {
1925
- var retVal = (output || [])
1926
- .filter(function (e) { return e != null; })
1927
- .map(function (entry) {
1615
+ const deserializeAws_restJson1TagList = (output, context) => {
1616
+ const retVal = (output || [])
1617
+ .filter((e) => e != null)
1618
+ .map((entry) => {
1928
1619
  if (entry === null) {
1929
1620
  return null;
1930
1621
  }
@@ -1932,73 +1623,55 @@ var deserializeAws_restJson1TagList = function (output, context) {
1932
1623
  });
1933
1624
  return retVal;
1934
1625
  };
1935
- var deserializeAws_restJson1TranscriptionMessagesConcatenationConfiguration = function (output, context) {
1626
+ const deserializeAws_restJson1TranscriptionMessagesConcatenationConfiguration = (output, context) => {
1936
1627
  return {
1937
1628
  State: __expectString(output.State),
1938
1629
  };
1939
1630
  };
1940
- var deserializeAws_restJson1VideoArtifactsConfiguration = function (output, context) {
1631
+ const deserializeAws_restJson1VideoArtifactsConfiguration = (output, context) => {
1941
1632
  return {
1942
1633
  MuxType: __expectString(output.MuxType),
1943
1634
  State: __expectString(output.State),
1944
1635
  };
1945
1636
  };
1946
- var deserializeAws_restJson1VideoConcatenationConfiguration = function (output, context) {
1637
+ const deserializeAws_restJson1VideoConcatenationConfiguration = (output, context) => {
1947
1638
  return {
1948
1639
  State: __expectString(output.State),
1949
1640
  };
1950
1641
  };
1951
- var deserializeMetadata = function (output) {
1952
- var _a;
1953
- return ({
1954
- httpStatusCode: output.statusCode,
1955
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
1956
- extendedRequestId: output.headers["x-amz-id-2"],
1957
- cfId: output.headers["x-amz-cf-id"],
1958
- });
1959
- };
1960
- var collectBody = function (streamBody, context) {
1961
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
1642
+ const deserializeMetadata = (output) => ({
1643
+ httpStatusCode: output.statusCode,
1644
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
1645
+ extendedRequestId: output.headers["x-amz-id-2"],
1646
+ cfId: output.headers["x-amz-cf-id"],
1647
+ });
1648
+ const collectBody = (streamBody = new Uint8Array(), context) => {
1962
1649
  if (streamBody instanceof Uint8Array) {
1963
1650
  return Promise.resolve(streamBody);
1964
1651
  }
1965
1652
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1966
1653
  };
1967
- var collectBodyString = function (streamBody, context) {
1968
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1969
- };
1970
- var isSerializableHeaderValue = function (value) {
1971
- return value !== undefined &&
1972
- value !== null &&
1973
- value !== "" &&
1974
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1975
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1976
- };
1977
- var parseBody = function (streamBody, context) {
1978
- return collectBodyString(streamBody, context).then(function (encoded) {
1979
- if (encoded.length) {
1980
- return JSON.parse(encoded);
1981
- }
1982
- return {};
1983
- });
1984
- };
1985
- var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
1986
- var value;
1987
- var _a;
1988
- return __generator(this, function (_b) {
1989
- switch (_b.label) {
1990
- case 0: return [4, parseBody(errorBody, context)];
1991
- case 1:
1992
- value = _b.sent();
1993
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1994
- return [2, value];
1995
- }
1996
- });
1997
- }); };
1998
- var loadRestJsonErrorCode = function (output, data) {
1999
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2000
- var sanitizeErrorCode = function (rawValue) {
2001
- var cleanValue = rawValue;
1654
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1655
+ const isSerializableHeaderValue = (value) => value !== undefined &&
1656
+ value !== null &&
1657
+ value !== "" &&
1658
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1659
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1660
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1661
+ if (encoded.length) {
1662
+ return JSON.parse(encoded);
1663
+ }
1664
+ return {};
1665
+ });
1666
+ const parseErrorBody = async (errorBody, context) => {
1667
+ const value = await parseBody(errorBody, context);
1668
+ value.message = value.message ?? value.Message;
1669
+ return value;
1670
+ };
1671
+ const loadRestJsonErrorCode = (output, data) => {
1672
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1673
+ const sanitizeErrorCode = (rawValue) => {
1674
+ let cleanValue = rawValue;
2002
1675
  if (typeof cleanValue === "number") {
2003
1676
  cleanValue = cleanValue.toString();
2004
1677
  }
@@ -2013,7 +1686,7 @@ var loadRestJsonErrorCode = function (output, data) {
2013
1686
  }
2014
1687
  return cleanValue;
2015
1688
  };
2016
- var headerKey = findKey(output.headers, "x-amzn-errortype");
1689
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2017
1690
  if (headerKey !== undefined) {
2018
1691
  return sanitizeErrorCode(output.headers[headerKey]);
2019
1692
  }