@aws-sdk/client-ivs-realtime 3.490.0 → 3.496.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 (48) hide show
  1. package/dist-cjs/IVSRealTime.js +1 -65
  2. package/dist-cjs/IVSRealTimeClient.js +1 -43
  3. package/dist-cjs/commands/CreateEncoderConfigurationCommand.js +1 -28
  4. package/dist-cjs/commands/CreateParticipantTokenCommand.js +1 -29
  5. package/dist-cjs/commands/CreateStageCommand.js +1 -29
  6. package/dist-cjs/commands/CreateStorageConfigurationCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteEncoderConfigurationCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteStageCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteStorageConfigurationCommand.js +1 -28
  10. package/dist-cjs/commands/DisconnectParticipantCommand.js +1 -28
  11. package/dist-cjs/commands/GetCompositionCommand.js +1 -28
  12. package/dist-cjs/commands/GetEncoderConfigurationCommand.js +1 -28
  13. package/dist-cjs/commands/GetParticipantCommand.js +1 -28
  14. package/dist-cjs/commands/GetStageCommand.js +1 -28
  15. package/dist-cjs/commands/GetStageSessionCommand.js +1 -28
  16. package/dist-cjs/commands/GetStorageConfigurationCommand.js +1 -28
  17. package/dist-cjs/commands/ListCompositionsCommand.js +1 -28
  18. package/dist-cjs/commands/ListEncoderConfigurationsCommand.js +1 -28
  19. package/dist-cjs/commands/ListParticipantEventsCommand.js +1 -28
  20. package/dist-cjs/commands/ListParticipantsCommand.js +1 -28
  21. package/dist-cjs/commands/ListStageSessionsCommand.js +1 -28
  22. package/dist-cjs/commands/ListStagesCommand.js +1 -28
  23. package/dist-cjs/commands/ListStorageConfigurationsCommand.js +1 -28
  24. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  25. package/dist-cjs/commands/StartCompositionCommand.js +1 -28
  26. package/dist-cjs/commands/StopCompositionCommand.js +1 -28
  27. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  28. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  29. package/dist-cjs/commands/UpdateStageCommand.js +1 -28
  30. package/dist-cjs/commands/index.js +1 -30
  31. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  32. package/dist-cjs/extensionConfiguration.js +1 -2
  33. package/dist-cjs/index.js +2861 -11
  34. package/dist-cjs/models/IVSRealTimeServiceException.js +1 -12
  35. package/dist-cjs/models/index.js +1 -4
  36. package/dist-cjs/models/models_0.js +1 -162
  37. package/dist-cjs/pagination/Interfaces.js +1 -2
  38. package/dist-cjs/pagination/ListCompositionsPaginator.js +1 -7
  39. package/dist-cjs/pagination/ListEncoderConfigurationsPaginator.js +1 -7
  40. package/dist-cjs/pagination/ListParticipantEventsPaginator.js +1 -7
  41. package/dist-cjs/pagination/ListParticipantsPaginator.js +1 -7
  42. package/dist-cjs/pagination/ListStageSessionsPaginator.js +1 -7
  43. package/dist-cjs/pagination/ListStagesPaginator.js +1 -7
  44. package/dist-cjs/pagination/ListStorageConfigurationsPaginator.js +1 -7
  45. package/dist-cjs/pagination/index.js +1 -11
  46. package/dist-cjs/protocols/Aws_restJson1.js +1 -1932
  47. package/dist-cjs/runtimeExtensions.js +1 -22
  48. package/package.json +40 -40
@@ -1,1932 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_StartCompositionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStorageConfigurationsCommand = exports.de_ListStageSessionsCommand = exports.de_ListStagesCommand = exports.de_ListParticipantsCommand = exports.de_ListParticipantEventsCommand = exports.de_ListEncoderConfigurationsCommand = exports.de_ListCompositionsCommand = exports.de_GetStorageConfigurationCommand = exports.de_GetStageSessionCommand = exports.de_GetStageCommand = exports.de_GetParticipantCommand = exports.de_GetEncoderConfigurationCommand = exports.de_GetCompositionCommand = exports.de_DisconnectParticipantCommand = exports.de_DeleteStorageConfigurationCommand = exports.de_DeleteStageCommand = exports.de_DeleteEncoderConfigurationCommand = exports.de_CreateStorageConfigurationCommand = exports.de_CreateStageCommand = exports.de_CreateParticipantTokenCommand = exports.de_CreateEncoderConfigurationCommand = exports.se_UpdateStageCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopCompositionCommand = exports.se_StartCompositionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStorageConfigurationsCommand = exports.se_ListStageSessionsCommand = exports.se_ListStagesCommand = exports.se_ListParticipantsCommand = exports.se_ListParticipantEventsCommand = exports.se_ListEncoderConfigurationsCommand = exports.se_ListCompositionsCommand = exports.se_GetStorageConfigurationCommand = exports.se_GetStageSessionCommand = exports.se_GetStageCommand = exports.se_GetParticipantCommand = exports.se_GetEncoderConfigurationCommand = exports.se_GetCompositionCommand = exports.se_DisconnectParticipantCommand = exports.se_DeleteStorageConfigurationCommand = exports.se_DeleteStageCommand = exports.se_DeleteEncoderConfigurationCommand = exports.se_CreateStorageConfigurationCommand = exports.se_CreateStageCommand = exports.se_CreateParticipantTokenCommand = exports.se_CreateEncoderConfigurationCommand = void 0;
4
- exports.de_UpdateStageCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopCompositionCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const uuid_1 = require("uuid");
8
- const IVSRealTimeServiceException_1 = require("../models/IVSRealTimeServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_CreateEncoderConfigurationCommand = async (input, context) => {
11
- const b = (0, core_1.requestBuilder)(input, context);
12
- const headers = {
13
- "content-type": "application/json",
14
- };
15
- b.bp("/CreateEncoderConfiguration");
16
- let body;
17
- body = JSON.stringify((0, smithy_client_1.take)(input, {
18
- name: [],
19
- tags: (_) => (0, smithy_client_1._json)(_),
20
- video: (_) => se_Video(_, context),
21
- }));
22
- b.m("POST").h(headers).b(body);
23
- return b.build();
24
- };
25
- exports.se_CreateEncoderConfigurationCommand = se_CreateEncoderConfigurationCommand;
26
- const se_CreateParticipantTokenCommand = async (input, context) => {
27
- const b = (0, core_1.requestBuilder)(input, context);
28
- const headers = {
29
- "content-type": "application/json",
30
- };
31
- b.bp("/CreateParticipantToken");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1.take)(input, {
34
- attributes: (_) => (0, smithy_client_1._json)(_),
35
- capabilities: (_) => (0, smithy_client_1._json)(_),
36
- duration: [],
37
- stageArn: [],
38
- userId: [],
39
- }));
40
- b.m("POST").h(headers).b(body);
41
- return b.build();
42
- };
43
- exports.se_CreateParticipantTokenCommand = se_CreateParticipantTokenCommand;
44
- const se_CreateStageCommand = async (input, context) => {
45
- const b = (0, core_1.requestBuilder)(input, context);
46
- const headers = {
47
- "content-type": "application/json",
48
- };
49
- b.bp("/CreateStage");
50
- let body;
51
- body = JSON.stringify((0, smithy_client_1.take)(input, {
52
- name: [],
53
- participantTokenConfigurations: (_) => (0, smithy_client_1._json)(_),
54
- tags: (_) => (0, smithy_client_1._json)(_),
55
- }));
56
- b.m("POST").h(headers).b(body);
57
- return b.build();
58
- };
59
- exports.se_CreateStageCommand = se_CreateStageCommand;
60
- const se_CreateStorageConfigurationCommand = async (input, context) => {
61
- const b = (0, core_1.requestBuilder)(input, context);
62
- const headers = {
63
- "content-type": "application/json",
64
- };
65
- b.bp("/CreateStorageConfiguration");
66
- let body;
67
- body = JSON.stringify((0, smithy_client_1.take)(input, {
68
- name: [],
69
- s3: (_) => (0, smithy_client_1._json)(_),
70
- tags: (_) => (0, smithy_client_1._json)(_),
71
- }));
72
- b.m("POST").h(headers).b(body);
73
- return b.build();
74
- };
75
- exports.se_CreateStorageConfigurationCommand = se_CreateStorageConfigurationCommand;
76
- const se_DeleteEncoderConfigurationCommand = async (input, context) => {
77
- const b = (0, core_1.requestBuilder)(input, context);
78
- const headers = {
79
- "content-type": "application/json",
80
- };
81
- b.bp("/DeleteEncoderConfiguration");
82
- let body;
83
- body = JSON.stringify((0, smithy_client_1.take)(input, {
84
- arn: [],
85
- }));
86
- b.m("POST").h(headers).b(body);
87
- return b.build();
88
- };
89
- exports.se_DeleteEncoderConfigurationCommand = se_DeleteEncoderConfigurationCommand;
90
- const se_DeleteStageCommand = async (input, context) => {
91
- const b = (0, core_1.requestBuilder)(input, context);
92
- const headers = {
93
- "content-type": "application/json",
94
- };
95
- b.bp("/DeleteStage");
96
- let body;
97
- body = JSON.stringify((0, smithy_client_1.take)(input, {
98
- arn: [],
99
- }));
100
- b.m("POST").h(headers).b(body);
101
- return b.build();
102
- };
103
- exports.se_DeleteStageCommand = se_DeleteStageCommand;
104
- const se_DeleteStorageConfigurationCommand = async (input, context) => {
105
- const b = (0, core_1.requestBuilder)(input, context);
106
- const headers = {
107
- "content-type": "application/json",
108
- };
109
- b.bp("/DeleteStorageConfiguration");
110
- let body;
111
- body = JSON.stringify((0, smithy_client_1.take)(input, {
112
- arn: [],
113
- }));
114
- b.m("POST").h(headers).b(body);
115
- return b.build();
116
- };
117
- exports.se_DeleteStorageConfigurationCommand = se_DeleteStorageConfigurationCommand;
118
- const se_DisconnectParticipantCommand = async (input, context) => {
119
- const b = (0, core_1.requestBuilder)(input, context);
120
- const headers = {
121
- "content-type": "application/json",
122
- };
123
- b.bp("/DisconnectParticipant");
124
- let body;
125
- body = JSON.stringify((0, smithy_client_1.take)(input, {
126
- participantId: [],
127
- reason: [],
128
- stageArn: [],
129
- }));
130
- b.m("POST").h(headers).b(body);
131
- return b.build();
132
- };
133
- exports.se_DisconnectParticipantCommand = se_DisconnectParticipantCommand;
134
- const se_GetCompositionCommand = async (input, context) => {
135
- const b = (0, core_1.requestBuilder)(input, context);
136
- const headers = {
137
- "content-type": "application/json",
138
- };
139
- b.bp("/GetComposition");
140
- let body;
141
- body = JSON.stringify((0, smithy_client_1.take)(input, {
142
- arn: [],
143
- }));
144
- b.m("POST").h(headers).b(body);
145
- return b.build();
146
- };
147
- exports.se_GetCompositionCommand = se_GetCompositionCommand;
148
- const se_GetEncoderConfigurationCommand = async (input, context) => {
149
- const b = (0, core_1.requestBuilder)(input, context);
150
- const headers = {
151
- "content-type": "application/json",
152
- };
153
- b.bp("/GetEncoderConfiguration");
154
- let body;
155
- body = JSON.stringify((0, smithy_client_1.take)(input, {
156
- arn: [],
157
- }));
158
- b.m("POST").h(headers).b(body);
159
- return b.build();
160
- };
161
- exports.se_GetEncoderConfigurationCommand = se_GetEncoderConfigurationCommand;
162
- const se_GetParticipantCommand = async (input, context) => {
163
- const b = (0, core_1.requestBuilder)(input, context);
164
- const headers = {
165
- "content-type": "application/json",
166
- };
167
- b.bp("/GetParticipant");
168
- let body;
169
- body = JSON.stringify((0, smithy_client_1.take)(input, {
170
- participantId: [],
171
- sessionId: [],
172
- stageArn: [],
173
- }));
174
- b.m("POST").h(headers).b(body);
175
- return b.build();
176
- };
177
- exports.se_GetParticipantCommand = se_GetParticipantCommand;
178
- const se_GetStageCommand = async (input, context) => {
179
- const b = (0, core_1.requestBuilder)(input, context);
180
- const headers = {
181
- "content-type": "application/json",
182
- };
183
- b.bp("/GetStage");
184
- let body;
185
- body = JSON.stringify((0, smithy_client_1.take)(input, {
186
- arn: [],
187
- }));
188
- b.m("POST").h(headers).b(body);
189
- return b.build();
190
- };
191
- exports.se_GetStageCommand = se_GetStageCommand;
192
- const se_GetStageSessionCommand = async (input, context) => {
193
- const b = (0, core_1.requestBuilder)(input, context);
194
- const headers = {
195
- "content-type": "application/json",
196
- };
197
- b.bp("/GetStageSession");
198
- let body;
199
- body = JSON.stringify((0, smithy_client_1.take)(input, {
200
- sessionId: [],
201
- stageArn: [],
202
- }));
203
- b.m("POST").h(headers).b(body);
204
- return b.build();
205
- };
206
- exports.se_GetStageSessionCommand = se_GetStageSessionCommand;
207
- const se_GetStorageConfigurationCommand = async (input, context) => {
208
- const b = (0, core_1.requestBuilder)(input, context);
209
- const headers = {
210
- "content-type": "application/json",
211
- };
212
- b.bp("/GetStorageConfiguration");
213
- let body;
214
- body = JSON.stringify((0, smithy_client_1.take)(input, {
215
- arn: [],
216
- }));
217
- b.m("POST").h(headers).b(body);
218
- return b.build();
219
- };
220
- exports.se_GetStorageConfigurationCommand = se_GetStorageConfigurationCommand;
221
- const se_ListCompositionsCommand = async (input, context) => {
222
- const b = (0, core_1.requestBuilder)(input, context);
223
- const headers = {
224
- "content-type": "application/json",
225
- };
226
- b.bp("/ListCompositions");
227
- let body;
228
- body = JSON.stringify((0, smithy_client_1.take)(input, {
229
- filterByEncoderConfigurationArn: [],
230
- filterByStageArn: [],
231
- maxResults: [],
232
- nextToken: [],
233
- }));
234
- b.m("POST").h(headers).b(body);
235
- return b.build();
236
- };
237
- exports.se_ListCompositionsCommand = se_ListCompositionsCommand;
238
- const se_ListEncoderConfigurationsCommand = async (input, context) => {
239
- const b = (0, core_1.requestBuilder)(input, context);
240
- const headers = {
241
- "content-type": "application/json",
242
- };
243
- b.bp("/ListEncoderConfigurations");
244
- let body;
245
- body = JSON.stringify((0, smithy_client_1.take)(input, {
246
- maxResults: [],
247
- nextToken: [],
248
- }));
249
- b.m("POST").h(headers).b(body);
250
- return b.build();
251
- };
252
- exports.se_ListEncoderConfigurationsCommand = se_ListEncoderConfigurationsCommand;
253
- const se_ListParticipantEventsCommand = async (input, context) => {
254
- const b = (0, core_1.requestBuilder)(input, context);
255
- const headers = {
256
- "content-type": "application/json",
257
- };
258
- b.bp("/ListParticipantEvents");
259
- let body;
260
- body = JSON.stringify((0, smithy_client_1.take)(input, {
261
- maxResults: [],
262
- nextToken: [],
263
- participantId: [],
264
- sessionId: [],
265
- stageArn: [],
266
- }));
267
- b.m("POST").h(headers).b(body);
268
- return b.build();
269
- };
270
- exports.se_ListParticipantEventsCommand = se_ListParticipantEventsCommand;
271
- const se_ListParticipantsCommand = async (input, context) => {
272
- const b = (0, core_1.requestBuilder)(input, context);
273
- const headers = {
274
- "content-type": "application/json",
275
- };
276
- b.bp("/ListParticipants");
277
- let body;
278
- body = JSON.stringify((0, smithy_client_1.take)(input, {
279
- filterByPublished: [],
280
- filterByState: [],
281
- filterByUserId: [],
282
- maxResults: [],
283
- nextToken: [],
284
- sessionId: [],
285
- stageArn: [],
286
- }));
287
- b.m("POST").h(headers).b(body);
288
- return b.build();
289
- };
290
- exports.se_ListParticipantsCommand = se_ListParticipantsCommand;
291
- const se_ListStagesCommand = async (input, context) => {
292
- const b = (0, core_1.requestBuilder)(input, context);
293
- const headers = {
294
- "content-type": "application/json",
295
- };
296
- b.bp("/ListStages");
297
- let body;
298
- body = JSON.stringify((0, smithy_client_1.take)(input, {
299
- maxResults: [],
300
- nextToken: [],
301
- }));
302
- b.m("POST").h(headers).b(body);
303
- return b.build();
304
- };
305
- exports.se_ListStagesCommand = se_ListStagesCommand;
306
- const se_ListStageSessionsCommand = async (input, context) => {
307
- const b = (0, core_1.requestBuilder)(input, context);
308
- const headers = {
309
- "content-type": "application/json",
310
- };
311
- b.bp("/ListStageSessions");
312
- let body;
313
- body = JSON.stringify((0, smithy_client_1.take)(input, {
314
- maxResults: [],
315
- nextToken: [],
316
- stageArn: [],
317
- }));
318
- b.m("POST").h(headers).b(body);
319
- return b.build();
320
- };
321
- exports.se_ListStageSessionsCommand = se_ListStageSessionsCommand;
322
- const se_ListStorageConfigurationsCommand = async (input, context) => {
323
- const b = (0, core_1.requestBuilder)(input, context);
324
- const headers = {
325
- "content-type": "application/json",
326
- };
327
- b.bp("/ListStorageConfigurations");
328
- let body;
329
- body = JSON.stringify((0, smithy_client_1.take)(input, {
330
- maxResults: [],
331
- nextToken: [],
332
- }));
333
- b.m("POST").h(headers).b(body);
334
- return b.build();
335
- };
336
- exports.se_ListStorageConfigurationsCommand = se_ListStorageConfigurationsCommand;
337
- const se_ListTagsForResourceCommand = async (input, context) => {
338
- const b = (0, core_1.requestBuilder)(input, context);
339
- const headers = {};
340
- b.bp("/tags/{resourceArn}");
341
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
342
- let body;
343
- b.m("GET").h(headers).b(body);
344
- return b.build();
345
- };
346
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
347
- const se_StartCompositionCommand = async (input, context) => {
348
- const b = (0, core_1.requestBuilder)(input, context);
349
- const headers = {
350
- "content-type": "application/json",
351
- };
352
- b.bp("/StartComposition");
353
- let body;
354
- body = JSON.stringify((0, smithy_client_1.take)(input, {
355
- destinations: (_) => (0, smithy_client_1._json)(_),
356
- idempotencyToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
357
- layout: (_) => (0, smithy_client_1._json)(_),
358
- stageArn: [],
359
- tags: (_) => (0, smithy_client_1._json)(_),
360
- }));
361
- b.m("POST").h(headers).b(body);
362
- return b.build();
363
- };
364
- exports.se_StartCompositionCommand = se_StartCompositionCommand;
365
- const se_StopCompositionCommand = async (input, context) => {
366
- const b = (0, core_1.requestBuilder)(input, context);
367
- const headers = {
368
- "content-type": "application/json",
369
- };
370
- b.bp("/StopComposition");
371
- let body;
372
- body = JSON.stringify((0, smithy_client_1.take)(input, {
373
- arn: [],
374
- }));
375
- b.m("POST").h(headers).b(body);
376
- return b.build();
377
- };
378
- exports.se_StopCompositionCommand = se_StopCompositionCommand;
379
- const se_TagResourceCommand = async (input, context) => {
380
- const b = (0, core_1.requestBuilder)(input, context);
381
- const headers = {
382
- "content-type": "application/json",
383
- };
384
- b.bp("/tags/{resourceArn}");
385
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
386
- let body;
387
- body = JSON.stringify((0, smithy_client_1.take)(input, {
388
- tags: (_) => (0, smithy_client_1._json)(_),
389
- }));
390
- b.m("POST").h(headers).b(body);
391
- return b.build();
392
- };
393
- exports.se_TagResourceCommand = se_TagResourceCommand;
394
- const se_UntagResourceCommand = async (input, context) => {
395
- const b = (0, core_1.requestBuilder)(input, context);
396
- const headers = {};
397
- b.bp("/tags/{resourceArn}");
398
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
399
- const query = (0, smithy_client_1.map)({
400
- [_tK]: [
401
- (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
402
- () => (input[_tK] || []).map((_entry) => _entry),
403
- ],
404
- });
405
- let body;
406
- b.m("DELETE").h(headers).q(query).b(body);
407
- return b.build();
408
- };
409
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
410
- const se_UpdateStageCommand = async (input, context) => {
411
- const b = (0, core_1.requestBuilder)(input, context);
412
- const headers = {
413
- "content-type": "application/json",
414
- };
415
- b.bp("/UpdateStage");
416
- let body;
417
- body = JSON.stringify((0, smithy_client_1.take)(input, {
418
- arn: [],
419
- name: [],
420
- }));
421
- b.m("POST").h(headers).b(body);
422
- return b.build();
423
- };
424
- exports.se_UpdateStageCommand = se_UpdateStageCommand;
425
- const de_CreateEncoderConfigurationCommand = async (output, context) => {
426
- if (output.statusCode !== 200 && output.statusCode >= 300) {
427
- return de_CreateEncoderConfigurationCommandError(output, context);
428
- }
429
- const contents = (0, smithy_client_1.map)({
430
- $metadata: deserializeMetadata(output),
431
- });
432
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
433
- const doc = (0, smithy_client_1.take)(data, {
434
- encoderConfiguration: (_) => de_EncoderConfiguration(_, context),
435
- });
436
- Object.assign(contents, doc);
437
- return contents;
438
- };
439
- exports.de_CreateEncoderConfigurationCommand = de_CreateEncoderConfigurationCommand;
440
- const de_CreateEncoderConfigurationCommandError = async (output, context) => {
441
- const parsedOutput = {
442
- ...output,
443
- body: await parseErrorBody(output.body, context),
444
- };
445
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
446
- switch (errorCode) {
447
- case "AccessDeniedException":
448
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
449
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
450
- case "ConflictException":
451
- case "com.amazonaws.ivsrealtime#ConflictException":
452
- throw await de_ConflictExceptionRes(parsedOutput, context);
453
- case "InternalServerException":
454
- case "com.amazonaws.ivsrealtime#InternalServerException":
455
- throw await de_InternalServerExceptionRes(parsedOutput, context);
456
- case "PendingVerification":
457
- case "com.amazonaws.ivsrealtime#PendingVerification":
458
- throw await de_PendingVerificationRes(parsedOutput, context);
459
- case "ResourceNotFoundException":
460
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
461
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
462
- case "ServiceQuotaExceededException":
463
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
464
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
465
- case "ValidationException":
466
- case "com.amazonaws.ivsrealtime#ValidationException":
467
- throw await de_ValidationExceptionRes(parsedOutput, context);
468
- default:
469
- const parsedBody = parsedOutput.body;
470
- return throwDefaultError({
471
- output,
472
- parsedBody,
473
- errorCode,
474
- });
475
- }
476
- };
477
- const de_CreateParticipantTokenCommand = async (output, context) => {
478
- if (output.statusCode !== 200 && output.statusCode >= 300) {
479
- return de_CreateParticipantTokenCommandError(output, context);
480
- }
481
- const contents = (0, smithy_client_1.map)({
482
- $metadata: deserializeMetadata(output),
483
- });
484
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
485
- const doc = (0, smithy_client_1.take)(data, {
486
- participantToken: (_) => de_ParticipantToken(_, context),
487
- });
488
- Object.assign(contents, doc);
489
- return contents;
490
- };
491
- exports.de_CreateParticipantTokenCommand = de_CreateParticipantTokenCommand;
492
- const de_CreateParticipantTokenCommandError = async (output, context) => {
493
- const parsedOutput = {
494
- ...output,
495
- body: await parseErrorBody(output.body, context),
496
- };
497
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
498
- switch (errorCode) {
499
- case "AccessDeniedException":
500
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
501
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
502
- case "PendingVerification":
503
- case "com.amazonaws.ivsrealtime#PendingVerification":
504
- throw await de_PendingVerificationRes(parsedOutput, context);
505
- case "ResourceNotFoundException":
506
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
507
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
508
- case "ServiceQuotaExceededException":
509
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
510
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
511
- case "ValidationException":
512
- case "com.amazonaws.ivsrealtime#ValidationException":
513
- throw await de_ValidationExceptionRes(parsedOutput, context);
514
- default:
515
- const parsedBody = parsedOutput.body;
516
- return throwDefaultError({
517
- output,
518
- parsedBody,
519
- errorCode,
520
- });
521
- }
522
- };
523
- const de_CreateStageCommand = async (output, context) => {
524
- if (output.statusCode !== 200 && output.statusCode >= 300) {
525
- return de_CreateStageCommandError(output, context);
526
- }
527
- const contents = (0, smithy_client_1.map)({
528
- $metadata: deserializeMetadata(output),
529
- });
530
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
531
- const doc = (0, smithy_client_1.take)(data, {
532
- participantTokens: (_) => de_ParticipantTokenList(_, context),
533
- stage: smithy_client_1._json,
534
- });
535
- Object.assign(contents, doc);
536
- return contents;
537
- };
538
- exports.de_CreateStageCommand = de_CreateStageCommand;
539
- const de_CreateStageCommandError = async (output, context) => {
540
- const parsedOutput = {
541
- ...output,
542
- body: await parseErrorBody(output.body, context),
543
- };
544
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
545
- switch (errorCode) {
546
- case "AccessDeniedException":
547
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
548
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
549
- case "PendingVerification":
550
- case "com.amazonaws.ivsrealtime#PendingVerification":
551
- throw await de_PendingVerificationRes(parsedOutput, context);
552
- case "ServiceQuotaExceededException":
553
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
554
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
555
- case "ValidationException":
556
- case "com.amazonaws.ivsrealtime#ValidationException":
557
- throw await de_ValidationExceptionRes(parsedOutput, context);
558
- default:
559
- const parsedBody = parsedOutput.body;
560
- return throwDefaultError({
561
- output,
562
- parsedBody,
563
- errorCode,
564
- });
565
- }
566
- };
567
- const de_CreateStorageConfigurationCommand = async (output, context) => {
568
- if (output.statusCode !== 200 && output.statusCode >= 300) {
569
- return de_CreateStorageConfigurationCommandError(output, context);
570
- }
571
- const contents = (0, smithy_client_1.map)({
572
- $metadata: deserializeMetadata(output),
573
- });
574
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
575
- const doc = (0, smithy_client_1.take)(data, {
576
- storageConfiguration: smithy_client_1._json,
577
- });
578
- Object.assign(contents, doc);
579
- return contents;
580
- };
581
- exports.de_CreateStorageConfigurationCommand = de_CreateStorageConfigurationCommand;
582
- const de_CreateStorageConfigurationCommandError = async (output, context) => {
583
- const parsedOutput = {
584
- ...output,
585
- body: await parseErrorBody(output.body, context),
586
- };
587
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
588
- switch (errorCode) {
589
- case "AccessDeniedException":
590
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
591
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
592
- case "ConflictException":
593
- case "com.amazonaws.ivsrealtime#ConflictException":
594
- throw await de_ConflictExceptionRes(parsedOutput, context);
595
- case "InternalServerException":
596
- case "com.amazonaws.ivsrealtime#InternalServerException":
597
- throw await de_InternalServerExceptionRes(parsedOutput, context);
598
- case "PendingVerification":
599
- case "com.amazonaws.ivsrealtime#PendingVerification":
600
- throw await de_PendingVerificationRes(parsedOutput, context);
601
- case "ResourceNotFoundException":
602
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
603
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
604
- case "ServiceQuotaExceededException":
605
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
606
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
607
- case "ValidationException":
608
- case "com.amazonaws.ivsrealtime#ValidationException":
609
- throw await de_ValidationExceptionRes(parsedOutput, context);
610
- default:
611
- const parsedBody = parsedOutput.body;
612
- return throwDefaultError({
613
- output,
614
- parsedBody,
615
- errorCode,
616
- });
617
- }
618
- };
619
- const de_DeleteEncoderConfigurationCommand = async (output, context) => {
620
- if (output.statusCode !== 200 && output.statusCode >= 300) {
621
- return de_DeleteEncoderConfigurationCommandError(output, context);
622
- }
623
- const contents = (0, smithy_client_1.map)({
624
- $metadata: deserializeMetadata(output),
625
- });
626
- await (0, smithy_client_1.collectBody)(output.body, context);
627
- return contents;
628
- };
629
- exports.de_DeleteEncoderConfigurationCommand = de_DeleteEncoderConfigurationCommand;
630
- const de_DeleteEncoderConfigurationCommandError = async (output, context) => {
631
- const parsedOutput = {
632
- ...output,
633
- body: await parseErrorBody(output.body, context),
634
- };
635
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
636
- switch (errorCode) {
637
- case "AccessDeniedException":
638
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
639
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
640
- case "ConflictException":
641
- case "com.amazonaws.ivsrealtime#ConflictException":
642
- throw await de_ConflictExceptionRes(parsedOutput, context);
643
- case "InternalServerException":
644
- case "com.amazonaws.ivsrealtime#InternalServerException":
645
- throw await de_InternalServerExceptionRes(parsedOutput, context);
646
- case "ResourceNotFoundException":
647
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
648
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
649
- case "ServiceQuotaExceededException":
650
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
651
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
652
- case "ValidationException":
653
- case "com.amazonaws.ivsrealtime#ValidationException":
654
- throw await de_ValidationExceptionRes(parsedOutput, context);
655
- default:
656
- const parsedBody = parsedOutput.body;
657
- return throwDefaultError({
658
- output,
659
- parsedBody,
660
- errorCode,
661
- });
662
- }
663
- };
664
- const de_DeleteStageCommand = async (output, context) => {
665
- if (output.statusCode !== 200 && output.statusCode >= 300) {
666
- return de_DeleteStageCommandError(output, context);
667
- }
668
- const contents = (0, smithy_client_1.map)({
669
- $metadata: deserializeMetadata(output),
670
- });
671
- await (0, smithy_client_1.collectBody)(output.body, context);
672
- return contents;
673
- };
674
- exports.de_DeleteStageCommand = de_DeleteStageCommand;
675
- const de_DeleteStageCommandError = async (output, context) => {
676
- const parsedOutput = {
677
- ...output,
678
- body: await parseErrorBody(output.body, context),
679
- };
680
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
681
- switch (errorCode) {
682
- case "AccessDeniedException":
683
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
684
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
685
- case "ConflictException":
686
- case "com.amazonaws.ivsrealtime#ConflictException":
687
- throw await de_ConflictExceptionRes(parsedOutput, context);
688
- case "PendingVerification":
689
- case "com.amazonaws.ivsrealtime#PendingVerification":
690
- throw await de_PendingVerificationRes(parsedOutput, context);
691
- case "ResourceNotFoundException":
692
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
693
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
694
- case "ValidationException":
695
- case "com.amazonaws.ivsrealtime#ValidationException":
696
- throw await de_ValidationExceptionRes(parsedOutput, context);
697
- default:
698
- const parsedBody = parsedOutput.body;
699
- return throwDefaultError({
700
- output,
701
- parsedBody,
702
- errorCode,
703
- });
704
- }
705
- };
706
- const de_DeleteStorageConfigurationCommand = async (output, context) => {
707
- if (output.statusCode !== 200 && output.statusCode >= 300) {
708
- return de_DeleteStorageConfigurationCommandError(output, context);
709
- }
710
- const contents = (0, smithy_client_1.map)({
711
- $metadata: deserializeMetadata(output),
712
- });
713
- await (0, smithy_client_1.collectBody)(output.body, context);
714
- return contents;
715
- };
716
- exports.de_DeleteStorageConfigurationCommand = de_DeleteStorageConfigurationCommand;
717
- const de_DeleteStorageConfigurationCommandError = async (output, context) => {
718
- const parsedOutput = {
719
- ...output,
720
- body: await parseErrorBody(output.body, context),
721
- };
722
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
723
- switch (errorCode) {
724
- case "AccessDeniedException":
725
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
726
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
727
- case "ConflictException":
728
- case "com.amazonaws.ivsrealtime#ConflictException":
729
- throw await de_ConflictExceptionRes(parsedOutput, context);
730
- case "InternalServerException":
731
- case "com.amazonaws.ivsrealtime#InternalServerException":
732
- throw await de_InternalServerExceptionRes(parsedOutput, context);
733
- case "ResourceNotFoundException":
734
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
735
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
736
- case "ServiceQuotaExceededException":
737
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
738
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
739
- case "ValidationException":
740
- case "com.amazonaws.ivsrealtime#ValidationException":
741
- throw await de_ValidationExceptionRes(parsedOutput, context);
742
- default:
743
- const parsedBody = parsedOutput.body;
744
- return throwDefaultError({
745
- output,
746
- parsedBody,
747
- errorCode,
748
- });
749
- }
750
- };
751
- const de_DisconnectParticipantCommand = async (output, context) => {
752
- if (output.statusCode !== 200 && output.statusCode >= 300) {
753
- return de_DisconnectParticipantCommandError(output, context);
754
- }
755
- const contents = (0, smithy_client_1.map)({
756
- $metadata: deserializeMetadata(output),
757
- });
758
- await (0, smithy_client_1.collectBody)(output.body, context);
759
- return contents;
760
- };
761
- exports.de_DisconnectParticipantCommand = de_DisconnectParticipantCommand;
762
- const de_DisconnectParticipantCommandError = async (output, context) => {
763
- const parsedOutput = {
764
- ...output,
765
- body: await parseErrorBody(output.body, context),
766
- };
767
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
768
- switch (errorCode) {
769
- case "AccessDeniedException":
770
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
771
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
772
- case "PendingVerification":
773
- case "com.amazonaws.ivsrealtime#PendingVerification":
774
- throw await de_PendingVerificationRes(parsedOutput, context);
775
- case "ResourceNotFoundException":
776
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
777
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
778
- case "ValidationException":
779
- case "com.amazonaws.ivsrealtime#ValidationException":
780
- throw await de_ValidationExceptionRes(parsedOutput, context);
781
- default:
782
- const parsedBody = parsedOutput.body;
783
- return throwDefaultError({
784
- output,
785
- parsedBody,
786
- errorCode,
787
- });
788
- }
789
- };
790
- const de_GetCompositionCommand = async (output, context) => {
791
- if (output.statusCode !== 200 && output.statusCode >= 300) {
792
- return de_GetCompositionCommandError(output, context);
793
- }
794
- const contents = (0, smithy_client_1.map)({
795
- $metadata: deserializeMetadata(output),
796
- });
797
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
798
- const doc = (0, smithy_client_1.take)(data, {
799
- composition: (_) => de_Composition(_, context),
800
- });
801
- Object.assign(contents, doc);
802
- return contents;
803
- };
804
- exports.de_GetCompositionCommand = de_GetCompositionCommand;
805
- const de_GetCompositionCommandError = async (output, context) => {
806
- const parsedOutput = {
807
- ...output,
808
- body: await parseErrorBody(output.body, context),
809
- };
810
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
811
- switch (errorCode) {
812
- case "AccessDeniedException":
813
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
814
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
815
- case "ConflictException":
816
- case "com.amazonaws.ivsrealtime#ConflictException":
817
- throw await de_ConflictExceptionRes(parsedOutput, context);
818
- case "InternalServerException":
819
- case "com.amazonaws.ivsrealtime#InternalServerException":
820
- throw await de_InternalServerExceptionRes(parsedOutput, context);
821
- case "ResourceNotFoundException":
822
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
823
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
824
- case "ServiceQuotaExceededException":
825
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
826
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
827
- case "ValidationException":
828
- case "com.amazonaws.ivsrealtime#ValidationException":
829
- throw await de_ValidationExceptionRes(parsedOutput, context);
830
- default:
831
- const parsedBody = parsedOutput.body;
832
- return throwDefaultError({
833
- output,
834
- parsedBody,
835
- errorCode,
836
- });
837
- }
838
- };
839
- const de_GetEncoderConfigurationCommand = async (output, context) => {
840
- if (output.statusCode !== 200 && output.statusCode >= 300) {
841
- return de_GetEncoderConfigurationCommandError(output, context);
842
- }
843
- const contents = (0, smithy_client_1.map)({
844
- $metadata: deserializeMetadata(output),
845
- });
846
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
847
- const doc = (0, smithy_client_1.take)(data, {
848
- encoderConfiguration: (_) => de_EncoderConfiguration(_, context),
849
- });
850
- Object.assign(contents, doc);
851
- return contents;
852
- };
853
- exports.de_GetEncoderConfigurationCommand = de_GetEncoderConfigurationCommand;
854
- const de_GetEncoderConfigurationCommandError = async (output, context) => {
855
- const parsedOutput = {
856
- ...output,
857
- body: await parseErrorBody(output.body, context),
858
- };
859
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
860
- switch (errorCode) {
861
- case "AccessDeniedException":
862
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
863
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
864
- case "ConflictException":
865
- case "com.amazonaws.ivsrealtime#ConflictException":
866
- throw await de_ConflictExceptionRes(parsedOutput, context);
867
- case "InternalServerException":
868
- case "com.amazonaws.ivsrealtime#InternalServerException":
869
- throw await de_InternalServerExceptionRes(parsedOutput, context);
870
- case "ResourceNotFoundException":
871
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
872
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
873
- case "ServiceQuotaExceededException":
874
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
875
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
876
- case "ValidationException":
877
- case "com.amazonaws.ivsrealtime#ValidationException":
878
- throw await de_ValidationExceptionRes(parsedOutput, context);
879
- default:
880
- const parsedBody = parsedOutput.body;
881
- return throwDefaultError({
882
- output,
883
- parsedBody,
884
- errorCode,
885
- });
886
- }
887
- };
888
- const de_GetParticipantCommand = async (output, context) => {
889
- if (output.statusCode !== 200 && output.statusCode >= 300) {
890
- return de_GetParticipantCommandError(output, context);
891
- }
892
- const contents = (0, smithy_client_1.map)({
893
- $metadata: deserializeMetadata(output),
894
- });
895
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
896
- const doc = (0, smithy_client_1.take)(data, {
897
- participant: (_) => de_Participant(_, context),
898
- });
899
- Object.assign(contents, doc);
900
- return contents;
901
- };
902
- exports.de_GetParticipantCommand = de_GetParticipantCommand;
903
- const de_GetParticipantCommandError = async (output, context) => {
904
- const parsedOutput = {
905
- ...output,
906
- body: await parseErrorBody(output.body, context),
907
- };
908
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
909
- switch (errorCode) {
910
- case "AccessDeniedException":
911
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
912
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
913
- case "ResourceNotFoundException":
914
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
915
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
916
- case "ValidationException":
917
- case "com.amazonaws.ivsrealtime#ValidationException":
918
- throw await de_ValidationExceptionRes(parsedOutput, context);
919
- default:
920
- const parsedBody = parsedOutput.body;
921
- return throwDefaultError({
922
- output,
923
- parsedBody,
924
- errorCode,
925
- });
926
- }
927
- };
928
- const de_GetStageCommand = async (output, context) => {
929
- if (output.statusCode !== 200 && output.statusCode >= 300) {
930
- return de_GetStageCommandError(output, context);
931
- }
932
- const contents = (0, smithy_client_1.map)({
933
- $metadata: deserializeMetadata(output),
934
- });
935
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
936
- const doc = (0, smithy_client_1.take)(data, {
937
- stage: smithy_client_1._json,
938
- });
939
- Object.assign(contents, doc);
940
- return contents;
941
- };
942
- exports.de_GetStageCommand = de_GetStageCommand;
943
- const de_GetStageCommandError = async (output, context) => {
944
- const parsedOutput = {
945
- ...output,
946
- body: await parseErrorBody(output.body, context),
947
- };
948
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
949
- switch (errorCode) {
950
- case "AccessDeniedException":
951
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
952
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
953
- case "ResourceNotFoundException":
954
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
955
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
956
- case "ValidationException":
957
- case "com.amazonaws.ivsrealtime#ValidationException":
958
- throw await de_ValidationExceptionRes(parsedOutput, context);
959
- default:
960
- const parsedBody = parsedOutput.body;
961
- return throwDefaultError({
962
- output,
963
- parsedBody,
964
- errorCode,
965
- });
966
- }
967
- };
968
- const de_GetStageSessionCommand = async (output, context) => {
969
- if (output.statusCode !== 200 && output.statusCode >= 300) {
970
- return de_GetStageSessionCommandError(output, context);
971
- }
972
- const contents = (0, smithy_client_1.map)({
973
- $metadata: deserializeMetadata(output),
974
- });
975
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
976
- const doc = (0, smithy_client_1.take)(data, {
977
- stageSession: (_) => de_StageSession(_, context),
978
- });
979
- Object.assign(contents, doc);
980
- return contents;
981
- };
982
- exports.de_GetStageSessionCommand = de_GetStageSessionCommand;
983
- const de_GetStageSessionCommandError = async (output, context) => {
984
- const parsedOutput = {
985
- ...output,
986
- body: await parseErrorBody(output.body, context),
987
- };
988
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
989
- switch (errorCode) {
990
- case "AccessDeniedException":
991
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
992
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
993
- case "ResourceNotFoundException":
994
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
995
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
996
- case "ValidationException":
997
- case "com.amazonaws.ivsrealtime#ValidationException":
998
- throw await de_ValidationExceptionRes(parsedOutput, context);
999
- default:
1000
- const parsedBody = parsedOutput.body;
1001
- return throwDefaultError({
1002
- output,
1003
- parsedBody,
1004
- errorCode,
1005
- });
1006
- }
1007
- };
1008
- const de_GetStorageConfigurationCommand = async (output, context) => {
1009
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1010
- return de_GetStorageConfigurationCommandError(output, context);
1011
- }
1012
- const contents = (0, smithy_client_1.map)({
1013
- $metadata: deserializeMetadata(output),
1014
- });
1015
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1016
- const doc = (0, smithy_client_1.take)(data, {
1017
- storageConfiguration: smithy_client_1._json,
1018
- });
1019
- Object.assign(contents, doc);
1020
- return contents;
1021
- };
1022
- exports.de_GetStorageConfigurationCommand = de_GetStorageConfigurationCommand;
1023
- const de_GetStorageConfigurationCommandError = async (output, context) => {
1024
- const parsedOutput = {
1025
- ...output,
1026
- body: await parseErrorBody(output.body, context),
1027
- };
1028
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1029
- switch (errorCode) {
1030
- case "AccessDeniedException":
1031
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1032
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1033
- case "ConflictException":
1034
- case "com.amazonaws.ivsrealtime#ConflictException":
1035
- throw await de_ConflictExceptionRes(parsedOutput, context);
1036
- case "InternalServerException":
1037
- case "com.amazonaws.ivsrealtime#InternalServerException":
1038
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1039
- case "ResourceNotFoundException":
1040
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
1041
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1042
- case "ServiceQuotaExceededException":
1043
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
1044
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1045
- case "ValidationException":
1046
- case "com.amazonaws.ivsrealtime#ValidationException":
1047
- throw await de_ValidationExceptionRes(parsedOutput, context);
1048
- default:
1049
- const parsedBody = parsedOutput.body;
1050
- return throwDefaultError({
1051
- output,
1052
- parsedBody,
1053
- errorCode,
1054
- });
1055
- }
1056
- };
1057
- const de_ListCompositionsCommand = async (output, context) => {
1058
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1059
- return de_ListCompositionsCommandError(output, context);
1060
- }
1061
- const contents = (0, smithy_client_1.map)({
1062
- $metadata: deserializeMetadata(output),
1063
- });
1064
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1065
- const doc = (0, smithy_client_1.take)(data, {
1066
- compositions: (_) => de_CompositionSummaryList(_, context),
1067
- nextToken: smithy_client_1.expectString,
1068
- });
1069
- Object.assign(contents, doc);
1070
- return contents;
1071
- };
1072
- exports.de_ListCompositionsCommand = de_ListCompositionsCommand;
1073
- const de_ListCompositionsCommandError = async (output, context) => {
1074
- const parsedOutput = {
1075
- ...output,
1076
- body: await parseErrorBody(output.body, context),
1077
- };
1078
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1079
- switch (errorCode) {
1080
- case "AccessDeniedException":
1081
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1082
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1083
- case "ConflictException":
1084
- case "com.amazonaws.ivsrealtime#ConflictException":
1085
- throw await de_ConflictExceptionRes(parsedOutput, context);
1086
- case "InternalServerException":
1087
- case "com.amazonaws.ivsrealtime#InternalServerException":
1088
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1089
- case "ServiceQuotaExceededException":
1090
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
1091
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1092
- case "ValidationException":
1093
- case "com.amazonaws.ivsrealtime#ValidationException":
1094
- throw await de_ValidationExceptionRes(parsedOutput, context);
1095
- default:
1096
- const parsedBody = parsedOutput.body;
1097
- return throwDefaultError({
1098
- output,
1099
- parsedBody,
1100
- errorCode,
1101
- });
1102
- }
1103
- };
1104
- const de_ListEncoderConfigurationsCommand = async (output, context) => {
1105
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1106
- return de_ListEncoderConfigurationsCommandError(output, context);
1107
- }
1108
- const contents = (0, smithy_client_1.map)({
1109
- $metadata: deserializeMetadata(output),
1110
- });
1111
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1112
- const doc = (0, smithy_client_1.take)(data, {
1113
- encoderConfigurations: smithy_client_1._json,
1114
- nextToken: smithy_client_1.expectString,
1115
- });
1116
- Object.assign(contents, doc);
1117
- return contents;
1118
- };
1119
- exports.de_ListEncoderConfigurationsCommand = de_ListEncoderConfigurationsCommand;
1120
- const de_ListEncoderConfigurationsCommandError = async (output, context) => {
1121
- const parsedOutput = {
1122
- ...output,
1123
- body: await parseErrorBody(output.body, context),
1124
- };
1125
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1126
- switch (errorCode) {
1127
- case "AccessDeniedException":
1128
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1129
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1130
- case "ConflictException":
1131
- case "com.amazonaws.ivsrealtime#ConflictException":
1132
- throw await de_ConflictExceptionRes(parsedOutput, context);
1133
- case "InternalServerException":
1134
- case "com.amazonaws.ivsrealtime#InternalServerException":
1135
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1136
- case "ServiceQuotaExceededException":
1137
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
1138
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1139
- case "ValidationException":
1140
- case "com.amazonaws.ivsrealtime#ValidationException":
1141
- throw await de_ValidationExceptionRes(parsedOutput, context);
1142
- default:
1143
- const parsedBody = parsedOutput.body;
1144
- return throwDefaultError({
1145
- output,
1146
- parsedBody,
1147
- errorCode,
1148
- });
1149
- }
1150
- };
1151
- const de_ListParticipantEventsCommand = async (output, context) => {
1152
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1153
- return de_ListParticipantEventsCommandError(output, context);
1154
- }
1155
- const contents = (0, smithy_client_1.map)({
1156
- $metadata: deserializeMetadata(output),
1157
- });
1158
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1159
- const doc = (0, smithy_client_1.take)(data, {
1160
- events: (_) => de_EventList(_, context),
1161
- nextToken: smithy_client_1.expectString,
1162
- });
1163
- Object.assign(contents, doc);
1164
- return contents;
1165
- };
1166
- exports.de_ListParticipantEventsCommand = de_ListParticipantEventsCommand;
1167
- const de_ListParticipantEventsCommandError = async (output, context) => {
1168
- const parsedOutput = {
1169
- ...output,
1170
- body: await parseErrorBody(output.body, context),
1171
- };
1172
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1173
- switch (errorCode) {
1174
- case "AccessDeniedException":
1175
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1176
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1177
- case "ValidationException":
1178
- case "com.amazonaws.ivsrealtime#ValidationException":
1179
- throw await de_ValidationExceptionRes(parsedOutput, context);
1180
- default:
1181
- const parsedBody = parsedOutput.body;
1182
- return throwDefaultError({
1183
- output,
1184
- parsedBody,
1185
- errorCode,
1186
- });
1187
- }
1188
- };
1189
- const de_ListParticipantsCommand = async (output, context) => {
1190
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1191
- return de_ListParticipantsCommandError(output, context);
1192
- }
1193
- const contents = (0, smithy_client_1.map)({
1194
- $metadata: deserializeMetadata(output),
1195
- });
1196
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1197
- const doc = (0, smithy_client_1.take)(data, {
1198
- nextToken: smithy_client_1.expectString,
1199
- participants: (_) => de_ParticipantList(_, context),
1200
- });
1201
- Object.assign(contents, doc);
1202
- return contents;
1203
- };
1204
- exports.de_ListParticipantsCommand = de_ListParticipantsCommand;
1205
- const de_ListParticipantsCommandError = async (output, context) => {
1206
- const parsedOutput = {
1207
- ...output,
1208
- body: await parseErrorBody(output.body, context),
1209
- };
1210
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1211
- switch (errorCode) {
1212
- case "AccessDeniedException":
1213
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1214
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1215
- case "ValidationException":
1216
- case "com.amazonaws.ivsrealtime#ValidationException":
1217
- throw await de_ValidationExceptionRes(parsedOutput, context);
1218
- default:
1219
- const parsedBody = parsedOutput.body;
1220
- return throwDefaultError({
1221
- output,
1222
- parsedBody,
1223
- errorCode,
1224
- });
1225
- }
1226
- };
1227
- const de_ListStagesCommand = async (output, context) => {
1228
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1229
- return de_ListStagesCommandError(output, context);
1230
- }
1231
- const contents = (0, smithy_client_1.map)({
1232
- $metadata: deserializeMetadata(output),
1233
- });
1234
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1235
- const doc = (0, smithy_client_1.take)(data, {
1236
- nextToken: smithy_client_1.expectString,
1237
- stages: smithy_client_1._json,
1238
- });
1239
- Object.assign(contents, doc);
1240
- return contents;
1241
- };
1242
- exports.de_ListStagesCommand = de_ListStagesCommand;
1243
- const de_ListStagesCommandError = async (output, context) => {
1244
- const parsedOutput = {
1245
- ...output,
1246
- body: await parseErrorBody(output.body, context),
1247
- };
1248
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1249
- switch (errorCode) {
1250
- case "AccessDeniedException":
1251
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1252
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1253
- case "ConflictException":
1254
- case "com.amazonaws.ivsrealtime#ConflictException":
1255
- throw await de_ConflictExceptionRes(parsedOutput, context);
1256
- case "ValidationException":
1257
- case "com.amazonaws.ivsrealtime#ValidationException":
1258
- throw await de_ValidationExceptionRes(parsedOutput, context);
1259
- default:
1260
- const parsedBody = parsedOutput.body;
1261
- return throwDefaultError({
1262
- output,
1263
- parsedBody,
1264
- errorCode,
1265
- });
1266
- }
1267
- };
1268
- const de_ListStageSessionsCommand = async (output, context) => {
1269
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1270
- return de_ListStageSessionsCommandError(output, context);
1271
- }
1272
- const contents = (0, smithy_client_1.map)({
1273
- $metadata: deserializeMetadata(output),
1274
- });
1275
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1276
- const doc = (0, smithy_client_1.take)(data, {
1277
- nextToken: smithy_client_1.expectString,
1278
- stageSessions: (_) => de_StageSessionList(_, context),
1279
- });
1280
- Object.assign(contents, doc);
1281
- return contents;
1282
- };
1283
- exports.de_ListStageSessionsCommand = de_ListStageSessionsCommand;
1284
- const de_ListStageSessionsCommandError = async (output, context) => {
1285
- const parsedOutput = {
1286
- ...output,
1287
- body: await parseErrorBody(output.body, context),
1288
- };
1289
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1290
- switch (errorCode) {
1291
- case "AccessDeniedException":
1292
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1293
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1294
- case "ValidationException":
1295
- case "com.amazonaws.ivsrealtime#ValidationException":
1296
- throw await de_ValidationExceptionRes(parsedOutput, context);
1297
- default:
1298
- const parsedBody = parsedOutput.body;
1299
- return throwDefaultError({
1300
- output,
1301
- parsedBody,
1302
- errorCode,
1303
- });
1304
- }
1305
- };
1306
- const de_ListStorageConfigurationsCommand = async (output, context) => {
1307
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1308
- return de_ListStorageConfigurationsCommandError(output, context);
1309
- }
1310
- const contents = (0, smithy_client_1.map)({
1311
- $metadata: deserializeMetadata(output),
1312
- });
1313
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1314
- const doc = (0, smithy_client_1.take)(data, {
1315
- nextToken: smithy_client_1.expectString,
1316
- storageConfigurations: smithy_client_1._json,
1317
- });
1318
- Object.assign(contents, doc);
1319
- return contents;
1320
- };
1321
- exports.de_ListStorageConfigurationsCommand = de_ListStorageConfigurationsCommand;
1322
- const de_ListStorageConfigurationsCommandError = async (output, context) => {
1323
- const parsedOutput = {
1324
- ...output,
1325
- body: await parseErrorBody(output.body, context),
1326
- };
1327
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1328
- switch (errorCode) {
1329
- case "AccessDeniedException":
1330
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1331
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1332
- case "ConflictException":
1333
- case "com.amazonaws.ivsrealtime#ConflictException":
1334
- throw await de_ConflictExceptionRes(parsedOutput, context);
1335
- case "InternalServerException":
1336
- case "com.amazonaws.ivsrealtime#InternalServerException":
1337
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1338
- case "ServiceQuotaExceededException":
1339
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
1340
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1341
- case "ValidationException":
1342
- case "com.amazonaws.ivsrealtime#ValidationException":
1343
- throw await de_ValidationExceptionRes(parsedOutput, context);
1344
- default:
1345
- const parsedBody = parsedOutput.body;
1346
- return throwDefaultError({
1347
- output,
1348
- parsedBody,
1349
- errorCode,
1350
- });
1351
- }
1352
- };
1353
- const de_ListTagsForResourceCommand = async (output, context) => {
1354
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1355
- return de_ListTagsForResourceCommandError(output, context);
1356
- }
1357
- const contents = (0, smithy_client_1.map)({
1358
- $metadata: deserializeMetadata(output),
1359
- });
1360
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1361
- const doc = (0, smithy_client_1.take)(data, {
1362
- tags: smithy_client_1._json,
1363
- });
1364
- Object.assign(contents, doc);
1365
- return contents;
1366
- };
1367
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1368
- const de_ListTagsForResourceCommandError = async (output, context) => {
1369
- const parsedOutput = {
1370
- ...output,
1371
- body: await parseErrorBody(output.body, context),
1372
- };
1373
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1374
- switch (errorCode) {
1375
- case "InternalServerException":
1376
- case "com.amazonaws.ivsrealtime#InternalServerException":
1377
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1378
- case "ResourceNotFoundException":
1379
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
1380
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1381
- case "ValidationException":
1382
- case "com.amazonaws.ivsrealtime#ValidationException":
1383
- throw await de_ValidationExceptionRes(parsedOutput, context);
1384
- default:
1385
- const parsedBody = parsedOutput.body;
1386
- return throwDefaultError({
1387
- output,
1388
- parsedBody,
1389
- errorCode,
1390
- });
1391
- }
1392
- };
1393
- const de_StartCompositionCommand = async (output, context) => {
1394
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1395
- return de_StartCompositionCommandError(output, context);
1396
- }
1397
- const contents = (0, smithy_client_1.map)({
1398
- $metadata: deserializeMetadata(output),
1399
- });
1400
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1401
- const doc = (0, smithy_client_1.take)(data, {
1402
- composition: (_) => de_Composition(_, context),
1403
- });
1404
- Object.assign(contents, doc);
1405
- return contents;
1406
- };
1407
- exports.de_StartCompositionCommand = de_StartCompositionCommand;
1408
- const de_StartCompositionCommandError = async (output, context) => {
1409
- const parsedOutput = {
1410
- ...output,
1411
- body: await parseErrorBody(output.body, context),
1412
- };
1413
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1414
- switch (errorCode) {
1415
- case "AccessDeniedException":
1416
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1417
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1418
- case "ConflictException":
1419
- case "com.amazonaws.ivsrealtime#ConflictException":
1420
- throw await de_ConflictExceptionRes(parsedOutput, context);
1421
- case "InternalServerException":
1422
- case "com.amazonaws.ivsrealtime#InternalServerException":
1423
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1424
- case "PendingVerification":
1425
- case "com.amazonaws.ivsrealtime#PendingVerification":
1426
- throw await de_PendingVerificationRes(parsedOutput, context);
1427
- case "ResourceNotFoundException":
1428
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
1429
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1430
- case "ServiceQuotaExceededException":
1431
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
1432
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1433
- case "ValidationException":
1434
- case "com.amazonaws.ivsrealtime#ValidationException":
1435
- throw await de_ValidationExceptionRes(parsedOutput, context);
1436
- default:
1437
- const parsedBody = parsedOutput.body;
1438
- return throwDefaultError({
1439
- output,
1440
- parsedBody,
1441
- errorCode,
1442
- });
1443
- }
1444
- };
1445
- const de_StopCompositionCommand = async (output, context) => {
1446
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1447
- return de_StopCompositionCommandError(output, context);
1448
- }
1449
- const contents = (0, smithy_client_1.map)({
1450
- $metadata: deserializeMetadata(output),
1451
- });
1452
- await (0, smithy_client_1.collectBody)(output.body, context);
1453
- return contents;
1454
- };
1455
- exports.de_StopCompositionCommand = de_StopCompositionCommand;
1456
- const de_StopCompositionCommandError = async (output, context) => {
1457
- const parsedOutput = {
1458
- ...output,
1459
- body: await parseErrorBody(output.body, context),
1460
- };
1461
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1462
- switch (errorCode) {
1463
- case "AccessDeniedException":
1464
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1465
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1466
- case "ConflictException":
1467
- case "com.amazonaws.ivsrealtime#ConflictException":
1468
- throw await de_ConflictExceptionRes(parsedOutput, context);
1469
- case "InternalServerException":
1470
- case "com.amazonaws.ivsrealtime#InternalServerException":
1471
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1472
- case "ResourceNotFoundException":
1473
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
1474
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1475
- case "ServiceQuotaExceededException":
1476
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
1477
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1478
- case "ValidationException":
1479
- case "com.amazonaws.ivsrealtime#ValidationException":
1480
- throw await de_ValidationExceptionRes(parsedOutput, context);
1481
- default:
1482
- const parsedBody = parsedOutput.body;
1483
- return throwDefaultError({
1484
- output,
1485
- parsedBody,
1486
- errorCode,
1487
- });
1488
- }
1489
- };
1490
- const de_TagResourceCommand = async (output, context) => {
1491
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1492
- return de_TagResourceCommandError(output, context);
1493
- }
1494
- const contents = (0, smithy_client_1.map)({
1495
- $metadata: deserializeMetadata(output),
1496
- });
1497
- await (0, smithy_client_1.collectBody)(output.body, context);
1498
- return contents;
1499
- };
1500
- exports.de_TagResourceCommand = de_TagResourceCommand;
1501
- const de_TagResourceCommandError = async (output, context) => {
1502
- const parsedOutput = {
1503
- ...output,
1504
- body: await parseErrorBody(output.body, context),
1505
- };
1506
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1507
- switch (errorCode) {
1508
- case "InternalServerException":
1509
- case "com.amazonaws.ivsrealtime#InternalServerException":
1510
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1511
- case "ResourceNotFoundException":
1512
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
1513
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1514
- case "ValidationException":
1515
- case "com.amazonaws.ivsrealtime#ValidationException":
1516
- throw await de_ValidationExceptionRes(parsedOutput, context);
1517
- default:
1518
- const parsedBody = parsedOutput.body;
1519
- return throwDefaultError({
1520
- output,
1521
- parsedBody,
1522
- errorCode,
1523
- });
1524
- }
1525
- };
1526
- const de_UntagResourceCommand = async (output, context) => {
1527
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1528
- return de_UntagResourceCommandError(output, context);
1529
- }
1530
- const contents = (0, smithy_client_1.map)({
1531
- $metadata: deserializeMetadata(output),
1532
- });
1533
- await (0, smithy_client_1.collectBody)(output.body, context);
1534
- return contents;
1535
- };
1536
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1537
- const de_UntagResourceCommandError = async (output, context) => {
1538
- const parsedOutput = {
1539
- ...output,
1540
- body: await parseErrorBody(output.body, context),
1541
- };
1542
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1543
- switch (errorCode) {
1544
- case "InternalServerException":
1545
- case "com.amazonaws.ivsrealtime#InternalServerException":
1546
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1547
- case "ResourceNotFoundException":
1548
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
1549
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1550
- case "ValidationException":
1551
- case "com.amazonaws.ivsrealtime#ValidationException":
1552
- throw await de_ValidationExceptionRes(parsedOutput, context);
1553
- default:
1554
- const parsedBody = parsedOutput.body;
1555
- return throwDefaultError({
1556
- output,
1557
- parsedBody,
1558
- errorCode,
1559
- });
1560
- }
1561
- };
1562
- const de_UpdateStageCommand = async (output, context) => {
1563
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1564
- return de_UpdateStageCommandError(output, context);
1565
- }
1566
- const contents = (0, smithy_client_1.map)({
1567
- $metadata: deserializeMetadata(output),
1568
- });
1569
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1570
- const doc = (0, smithy_client_1.take)(data, {
1571
- stage: smithy_client_1._json,
1572
- });
1573
- Object.assign(contents, doc);
1574
- return contents;
1575
- };
1576
- exports.de_UpdateStageCommand = de_UpdateStageCommand;
1577
- const de_UpdateStageCommandError = async (output, context) => {
1578
- const parsedOutput = {
1579
- ...output,
1580
- body: await parseErrorBody(output.body, context),
1581
- };
1582
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1583
- switch (errorCode) {
1584
- case "AccessDeniedException":
1585
- case "com.amazonaws.ivsrealtime#AccessDeniedException":
1586
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1587
- case "PendingVerification":
1588
- case "com.amazonaws.ivsrealtime#PendingVerification":
1589
- throw await de_PendingVerificationRes(parsedOutput, context);
1590
- case "ResourceNotFoundException":
1591
- case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
1592
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1593
- case "ServiceQuotaExceededException":
1594
- case "com.amazonaws.ivsrealtime#ServiceQuotaExceededException":
1595
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1596
- case "ValidationException":
1597
- case "com.amazonaws.ivsrealtime#ValidationException":
1598
- throw await de_ValidationExceptionRes(parsedOutput, context);
1599
- default:
1600
- const parsedBody = parsedOutput.body;
1601
- return throwDefaultError({
1602
- output,
1603
- parsedBody,
1604
- errorCode,
1605
- });
1606
- }
1607
- };
1608
- const throwDefaultError = (0, smithy_client_1.withBaseException)(IVSRealTimeServiceException_1.IVSRealTimeServiceException);
1609
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1610
- const contents = (0, smithy_client_1.map)({});
1611
- const data = parsedOutput.body;
1612
- const doc = (0, smithy_client_1.take)(data, {
1613
- exceptionMessage: smithy_client_1.expectString,
1614
- });
1615
- Object.assign(contents, doc);
1616
- const exception = new models_0_1.AccessDeniedException({
1617
- $metadata: deserializeMetadata(parsedOutput),
1618
- ...contents,
1619
- });
1620
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1621
- };
1622
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1623
- const contents = (0, smithy_client_1.map)({});
1624
- const data = parsedOutput.body;
1625
- const doc = (0, smithy_client_1.take)(data, {
1626
- exceptionMessage: smithy_client_1.expectString,
1627
- });
1628
- Object.assign(contents, doc);
1629
- const exception = new models_0_1.ConflictException({
1630
- $metadata: deserializeMetadata(parsedOutput),
1631
- ...contents,
1632
- });
1633
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1634
- };
1635
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1636
- const contents = (0, smithy_client_1.map)({});
1637
- const data = parsedOutput.body;
1638
- const doc = (0, smithy_client_1.take)(data, {
1639
- exceptionMessage: smithy_client_1.expectString,
1640
- });
1641
- Object.assign(contents, doc);
1642
- const exception = new models_0_1.InternalServerException({
1643
- $metadata: deserializeMetadata(parsedOutput),
1644
- ...contents,
1645
- });
1646
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1647
- };
1648
- const de_PendingVerificationRes = async (parsedOutput, context) => {
1649
- const contents = (0, smithy_client_1.map)({});
1650
- const data = parsedOutput.body;
1651
- const doc = (0, smithy_client_1.take)(data, {
1652
- exceptionMessage: smithy_client_1.expectString,
1653
- });
1654
- Object.assign(contents, doc);
1655
- const exception = new models_0_1.PendingVerification({
1656
- $metadata: deserializeMetadata(parsedOutput),
1657
- ...contents,
1658
- });
1659
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1660
- };
1661
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1662
- const contents = (0, smithy_client_1.map)({});
1663
- const data = parsedOutput.body;
1664
- const doc = (0, smithy_client_1.take)(data, {
1665
- exceptionMessage: smithy_client_1.expectString,
1666
- });
1667
- Object.assign(contents, doc);
1668
- const exception = new models_0_1.ResourceNotFoundException({
1669
- $metadata: deserializeMetadata(parsedOutput),
1670
- ...contents,
1671
- });
1672
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1673
- };
1674
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1675
- const contents = (0, smithy_client_1.map)({});
1676
- const data = parsedOutput.body;
1677
- const doc = (0, smithy_client_1.take)(data, {
1678
- exceptionMessage: smithy_client_1.expectString,
1679
- });
1680
- Object.assign(contents, doc);
1681
- const exception = new models_0_1.ServiceQuotaExceededException({
1682
- $metadata: deserializeMetadata(parsedOutput),
1683
- ...contents,
1684
- });
1685
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1686
- };
1687
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1688
- const contents = (0, smithy_client_1.map)({});
1689
- const data = parsedOutput.body;
1690
- const doc = (0, smithy_client_1.take)(data, {
1691
- exceptionMessage: smithy_client_1.expectString,
1692
- });
1693
- Object.assign(contents, doc);
1694
- const exception = new models_0_1.ValidationException({
1695
- $metadata: deserializeMetadata(parsedOutput),
1696
- ...contents,
1697
- });
1698
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1699
- };
1700
- const se_Video = (input, context) => {
1701
- return (0, smithy_client_1.take)(input, {
1702
- bitrate: [],
1703
- framerate: smithy_client_1.serializeFloat,
1704
- height: [],
1705
- width: [],
1706
- });
1707
- };
1708
- const de_Composition = (output, context) => {
1709
- return (0, smithy_client_1.take)(output, {
1710
- arn: smithy_client_1.expectString,
1711
- destinations: (_) => de_DestinationList(_, context),
1712
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1713
- layout: smithy_client_1._json,
1714
- stageArn: smithy_client_1.expectString,
1715
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1716
- state: smithy_client_1.expectString,
1717
- tags: smithy_client_1._json,
1718
- });
1719
- };
1720
- const de_CompositionSummary = (output, context) => {
1721
- return (0, smithy_client_1.take)(output, {
1722
- arn: smithy_client_1.expectString,
1723
- destinations: (_) => de_DestinationSummaryList(_, context),
1724
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1725
- stageArn: smithy_client_1.expectString,
1726
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1727
- state: smithy_client_1.expectString,
1728
- tags: smithy_client_1._json,
1729
- });
1730
- };
1731
- const de_CompositionSummaryList = (output, context) => {
1732
- const retVal = (output || [])
1733
- .filter((e) => e != null)
1734
- .map((entry) => {
1735
- return de_CompositionSummary(entry, context);
1736
- });
1737
- return retVal;
1738
- };
1739
- const de_Destination = (output, context) => {
1740
- return (0, smithy_client_1.take)(output, {
1741
- configuration: smithy_client_1._json,
1742
- detail: smithy_client_1._json,
1743
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1744
- id: smithy_client_1.expectString,
1745
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1746
- state: smithy_client_1.expectString,
1747
- });
1748
- };
1749
- const de_DestinationList = (output, context) => {
1750
- const retVal = (output || [])
1751
- .filter((e) => e != null)
1752
- .map((entry) => {
1753
- return de_Destination(entry, context);
1754
- });
1755
- return retVal;
1756
- };
1757
- const de_DestinationSummary = (output, context) => {
1758
- return (0, smithy_client_1.take)(output, {
1759
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1760
- id: smithy_client_1.expectString,
1761
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1762
- state: smithy_client_1.expectString,
1763
- });
1764
- };
1765
- const de_DestinationSummaryList = (output, context) => {
1766
- const retVal = (output || [])
1767
- .filter((e) => e != null)
1768
- .map((entry) => {
1769
- return de_DestinationSummary(entry, context);
1770
- });
1771
- return retVal;
1772
- };
1773
- const de_EncoderConfiguration = (output, context) => {
1774
- return (0, smithy_client_1.take)(output, {
1775
- arn: smithy_client_1.expectString,
1776
- name: smithy_client_1.expectString,
1777
- tags: smithy_client_1._json,
1778
- video: (_) => de_Video(_, context),
1779
- });
1780
- };
1781
- const de_Event = (output, context) => {
1782
- return (0, smithy_client_1.take)(output, {
1783
- errorCode: smithy_client_1.expectString,
1784
- eventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1785
- name: smithy_client_1.expectString,
1786
- participantId: smithy_client_1.expectString,
1787
- remoteParticipantId: smithy_client_1.expectString,
1788
- });
1789
- };
1790
- const de_EventList = (output, context) => {
1791
- const retVal = (output || [])
1792
- .filter((e) => e != null)
1793
- .map((entry) => {
1794
- return de_Event(entry, context);
1795
- });
1796
- return retVal;
1797
- };
1798
- const de_Participant = (output, context) => {
1799
- return (0, smithy_client_1.take)(output, {
1800
- attributes: smithy_client_1._json,
1801
- browserName: smithy_client_1.expectString,
1802
- browserVersion: smithy_client_1.expectString,
1803
- firstJoinTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1804
- ispName: smithy_client_1.expectString,
1805
- osName: smithy_client_1.expectString,
1806
- osVersion: smithy_client_1.expectString,
1807
- participantId: smithy_client_1.expectString,
1808
- published: smithy_client_1.expectBoolean,
1809
- sdkVersion: smithy_client_1.expectString,
1810
- state: smithy_client_1.expectString,
1811
- userId: smithy_client_1.expectString,
1812
- });
1813
- };
1814
- const de_ParticipantList = (output, context) => {
1815
- const retVal = (output || [])
1816
- .filter((e) => e != null)
1817
- .map((entry) => {
1818
- return de_ParticipantSummary(entry, context);
1819
- });
1820
- return retVal;
1821
- };
1822
- const de_ParticipantSummary = (output, context) => {
1823
- return (0, smithy_client_1.take)(output, {
1824
- firstJoinTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1825
- participantId: smithy_client_1.expectString,
1826
- published: smithy_client_1.expectBoolean,
1827
- state: smithy_client_1.expectString,
1828
- userId: smithy_client_1.expectString,
1829
- });
1830
- };
1831
- const de_ParticipantToken = (output, context) => {
1832
- return (0, smithy_client_1.take)(output, {
1833
- attributes: smithy_client_1._json,
1834
- capabilities: smithy_client_1._json,
1835
- duration: smithy_client_1.expectInt32,
1836
- expirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1837
- participantId: smithy_client_1.expectString,
1838
- token: smithy_client_1.expectString,
1839
- userId: smithy_client_1.expectString,
1840
- });
1841
- };
1842
- const de_ParticipantTokenList = (output, context) => {
1843
- const retVal = (output || [])
1844
- .filter((e) => e != null)
1845
- .map((entry) => {
1846
- return de_ParticipantToken(entry, context);
1847
- });
1848
- return retVal;
1849
- };
1850
- const de_StageSession = (output, context) => {
1851
- return (0, smithy_client_1.take)(output, {
1852
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1853
- sessionId: smithy_client_1.expectString,
1854
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1855
- });
1856
- };
1857
- const de_StageSessionList = (output, context) => {
1858
- const retVal = (output || [])
1859
- .filter((e) => e != null)
1860
- .map((entry) => {
1861
- return de_StageSessionSummary(entry, context);
1862
- });
1863
- return retVal;
1864
- };
1865
- const de_StageSessionSummary = (output, context) => {
1866
- return (0, smithy_client_1.take)(output, {
1867
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1868
- sessionId: smithy_client_1.expectString,
1869
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1870
- });
1871
- };
1872
- const de_Video = (output, context) => {
1873
- return (0, smithy_client_1.take)(output, {
1874
- bitrate: smithy_client_1.expectInt32,
1875
- framerate: smithy_client_1.limitedParseFloat32,
1876
- height: smithy_client_1.expectInt32,
1877
- width: smithy_client_1.expectInt32,
1878
- });
1879
- };
1880
- const deserializeMetadata = (output) => ({
1881
- httpStatusCode: output.statusCode,
1882
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1883
- extendedRequestId: output.headers["x-amz-id-2"],
1884
- cfId: output.headers["x-amz-cf-id"],
1885
- });
1886
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1887
- const isSerializableHeaderValue = (value) => value !== undefined &&
1888
- value !== null &&
1889
- value !== "" &&
1890
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1891
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1892
- const _tK = "tagKeys";
1893
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1894
- if (encoded.length) {
1895
- return JSON.parse(encoded);
1896
- }
1897
- return {};
1898
- });
1899
- const parseErrorBody = async (errorBody, context) => {
1900
- const value = await parseBody(errorBody, context);
1901
- value.message = value.message ?? value.Message;
1902
- return value;
1903
- };
1904
- const loadRestJsonErrorCode = (output, data) => {
1905
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1906
- const sanitizeErrorCode = (rawValue) => {
1907
- let cleanValue = rawValue;
1908
- if (typeof cleanValue === "number") {
1909
- cleanValue = cleanValue.toString();
1910
- }
1911
- if (cleanValue.indexOf(",") >= 0) {
1912
- cleanValue = cleanValue.split(",")[0];
1913
- }
1914
- if (cleanValue.indexOf(":") >= 0) {
1915
- cleanValue = cleanValue.split(":")[0];
1916
- }
1917
- if (cleanValue.indexOf("#") >= 0) {
1918
- cleanValue = cleanValue.split("#")[1];
1919
- }
1920
- return cleanValue;
1921
- };
1922
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1923
- if (headerKey !== undefined) {
1924
- return sanitizeErrorCode(output.headers[headerKey]);
1925
- }
1926
- if (data.code !== undefined) {
1927
- return sanitizeErrorCode(data.code);
1928
- }
1929
- if (data["__type"] !== undefined) {
1930
- return sanitizeErrorCode(data["__type"]);
1931
- }
1932
- };
1
+ module.exports = require("../index.js");