@aws-sdk/client-transcribe-streaming 3.33.0 → 3.34.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.
@@ -6,7 +6,7 @@ export var serializeAws_restJson1StartMedicalStreamTranscriptionCommand = functi
6
6
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
7
7
  return __generator(this, function (_c) {
8
8
  switch (_c.label) {
9
- case 0: return [4 /*yield*/, context.endpoint()];
9
+ case 0: return [4, context.endpoint()];
10
10
  case 1:
11
11
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
12
12
  headers = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.LanguageCode) && { "x-amzn-transcribe-language-code": input.LanguageCode })), (isSerializableHeaderValue(input.MediaSampleRateHertz) && {
@@ -28,7 +28,7 @@ export var serializeAws_restJson1StartMedicalStreamTranscriptionCommand = functi
28
28
  return serializeAws_restJson1AudioStream_event(event, context);
29
29
  });
30
30
  }
31
- return [2 /*return*/, new __HttpRequest({
31
+ return [2, new __HttpRequest({
32
32
  protocol: protocol,
33
33
  hostname: hostname,
34
34
  port: port,
@@ -44,7 +44,7 @@ export var serializeAws_restJson1StartStreamTranscriptionCommand = function (inp
44
44
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
45
45
  return __generator(this, function (_c) {
46
46
  switch (_c.label) {
47
- case 0: return [4 /*yield*/, context.endpoint()];
47
+ case 0: return [4, context.endpoint()];
48
48
  case 1:
49
49
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
50
50
  headers = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.LanguageCode) && { "x-amzn-transcribe-language-code": input.LanguageCode })), (isSerializableHeaderValue(input.MediaSampleRateHertz) && {
@@ -78,7 +78,7 @@ export var serializeAws_restJson1StartStreamTranscriptionCommand = function (inp
78
78
  return serializeAws_restJson1AudioStream_event(event, context);
79
79
  });
80
80
  }
81
- return [2 /*return*/, new __HttpRequest({
81
+ return [2, new __HttpRequest({
82
82
  protocol: protocol,
83
83
  hostname: hostname,
84
84
  port: port,
@@ -94,7 +94,7 @@ export var deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = func
94
94
  var contents, data;
95
95
  return __generator(this, function (_a) {
96
96
  if (output.statusCode !== 200 && output.statusCode >= 300) {
97
- return [2 /*return*/, deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError(output, context)];
97
+ return [2, deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError(output, context)];
98
98
  }
99
99
  contents = {
100
100
  $metadata: deserializeMetadata(output),
@@ -166,13 +166,13 @@ export var deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = func
166
166
  parsedEvent = (_a = {},
167
167
  _a[eventName] = eventMessage,
168
168
  _a);
169
- return [4 /*yield*/, deserializeAws_restJson1MedicalTranscriptResultStream_event(parsedEvent, context)];
170
- case 1: return [2 /*return*/, _b.sent()];
169
+ return [4, deserializeAws_restJson1MedicalTranscriptResultStream_event(parsedEvent, context)];
170
+ case 1: return [2, _b.sent()];
171
171
  }
172
172
  });
173
173
  }); });
174
174
  contents.TranscriptResultStream = data;
175
- return [2 /*return*/, Promise.resolve(contents)];
175
+ return [2, Promise.resolve(contents)];
176
176
  });
177
177
  }); };
178
178
  var deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -183,55 +183,55 @@ var deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = functi
183
183
  case 0:
184
184
  _a = [__assign({}, output)];
185
185
  _h = {};
186
- return [4 /*yield*/, parseBody(output.body, context)];
186
+ return [4, parseBody(output.body, context)];
187
187
  case 1:
188
188
  parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
189
189
  errorCode = "UnknownError";
190
190
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
191
191
  _b = errorCode;
192
192
  switch (_b) {
193
- case "BadRequestException": return [3 /*break*/, 2];
194
- case "com.amazonaws.transcribestreaming#BadRequestException": return [3 /*break*/, 2];
195
- case "ConflictException": return [3 /*break*/, 4];
196
- case "com.amazonaws.transcribestreaming#ConflictException": return [3 /*break*/, 4];
197
- case "InternalFailureException": return [3 /*break*/, 6];
198
- case "com.amazonaws.transcribestreaming#InternalFailureException": return [3 /*break*/, 6];
199
- case "LimitExceededException": return [3 /*break*/, 8];
200
- case "com.amazonaws.transcribestreaming#LimitExceededException": return [3 /*break*/, 8];
201
- case "ServiceUnavailableException": return [3 /*break*/, 10];
202
- case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3 /*break*/, 10];
193
+ case "BadRequestException": return [3, 2];
194
+ case "com.amazonaws.transcribestreaming#BadRequestException": return [3, 2];
195
+ case "ConflictException": return [3, 4];
196
+ case "com.amazonaws.transcribestreaming#ConflictException": return [3, 4];
197
+ case "InternalFailureException": return [3, 6];
198
+ case "com.amazonaws.transcribestreaming#InternalFailureException": return [3, 6];
199
+ case "LimitExceededException": return [3, 8];
200
+ case "com.amazonaws.transcribestreaming#LimitExceededException": return [3, 8];
201
+ case "ServiceUnavailableException": return [3, 10];
202
+ case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3, 10];
203
203
  }
204
- return [3 /*break*/, 12];
204
+ return [3, 12];
205
205
  case 2:
206
206
  _c = [{}];
207
- return [4 /*yield*/, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
207
+ return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
208
208
  case 3:
209
209
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
210
- return [3 /*break*/, 13];
210
+ return [3, 13];
211
211
  case 4:
212
212
  _d = [{}];
213
- return [4 /*yield*/, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
213
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
214
214
  case 5:
215
215
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
216
- return [3 /*break*/, 13];
216
+ return [3, 13];
217
217
  case 6:
218
218
  _e = [{}];
219
- return [4 /*yield*/, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
219
+ return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
220
220
  case 7:
221
221
  response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
222
- return [3 /*break*/, 13];
222
+ return [3, 13];
223
223
  case 8:
224
224
  _f = [{}];
225
- return [4 /*yield*/, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
225
+ return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
226
226
  case 9:
227
227
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
228
- return [3 /*break*/, 13];
228
+ return [3, 13];
229
229
  case 10:
230
230
  _g = [{}];
231
- return [4 /*yield*/, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
231
+ return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
232
232
  case 11:
233
233
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
234
- return [3 /*break*/, 13];
234
+ return [3, 13];
235
235
  case 12:
236
236
  parsedBody = parsedOutput.body;
237
237
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -241,7 +241,7 @@ var deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = functi
241
241
  message = response.message || response.Message || errorCode;
242
242
  response.message = message;
243
243
  delete response.Message;
244
- return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];
244
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
245
245
  }
246
246
  });
247
247
  }); };
@@ -249,7 +249,7 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
249
249
  var contents, data;
250
250
  return __generator(this, function (_a) {
251
251
  if (output.statusCode !== 200 && output.statusCode >= 300) {
252
- return [2 /*return*/, deserializeAws_restJson1StartStreamTranscriptionCommandError(output, context)];
252
+ return [2, deserializeAws_restJson1StartStreamTranscriptionCommandError(output, context)];
253
253
  }
254
254
  contents = {
255
255
  $metadata: deserializeMetadata(output),
@@ -337,13 +337,13 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
337
337
  parsedEvent = (_a = {},
338
338
  _a[eventName] = eventMessage,
339
339
  _a);
340
- return [4 /*yield*/, deserializeAws_restJson1TranscriptResultStream_event(parsedEvent, context)];
341
- case 1: return [2 /*return*/, _b.sent()];
340
+ return [4, deserializeAws_restJson1TranscriptResultStream_event(parsedEvent, context)];
341
+ case 1: return [2, _b.sent()];
342
342
  }
343
343
  });
344
344
  }); });
345
345
  contents.TranscriptResultStream = data;
346
- return [2 /*return*/, Promise.resolve(contents)];
346
+ return [2, Promise.resolve(contents)];
347
347
  });
348
348
  }); };
349
349
  var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -354,55 +354,55 @@ var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (out
354
354
  case 0:
355
355
  _a = [__assign({}, output)];
356
356
  _h = {};
357
- return [4 /*yield*/, parseBody(output.body, context)];
357
+ return [4, parseBody(output.body, context)];
358
358
  case 1:
359
359
  parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
360
360
  errorCode = "UnknownError";
361
361
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
362
362
  _b = errorCode;
363
363
  switch (_b) {
364
- case "BadRequestException": return [3 /*break*/, 2];
365
- case "com.amazonaws.transcribestreaming#BadRequestException": return [3 /*break*/, 2];
366
- case "ConflictException": return [3 /*break*/, 4];
367
- case "com.amazonaws.transcribestreaming#ConflictException": return [3 /*break*/, 4];
368
- case "InternalFailureException": return [3 /*break*/, 6];
369
- case "com.amazonaws.transcribestreaming#InternalFailureException": return [3 /*break*/, 6];
370
- case "LimitExceededException": return [3 /*break*/, 8];
371
- case "com.amazonaws.transcribestreaming#LimitExceededException": return [3 /*break*/, 8];
372
- case "ServiceUnavailableException": return [3 /*break*/, 10];
373
- case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3 /*break*/, 10];
364
+ case "BadRequestException": return [3, 2];
365
+ case "com.amazonaws.transcribestreaming#BadRequestException": return [3, 2];
366
+ case "ConflictException": return [3, 4];
367
+ case "com.amazonaws.transcribestreaming#ConflictException": return [3, 4];
368
+ case "InternalFailureException": return [3, 6];
369
+ case "com.amazonaws.transcribestreaming#InternalFailureException": return [3, 6];
370
+ case "LimitExceededException": return [3, 8];
371
+ case "com.amazonaws.transcribestreaming#LimitExceededException": return [3, 8];
372
+ case "ServiceUnavailableException": return [3, 10];
373
+ case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3, 10];
374
374
  }
375
- return [3 /*break*/, 12];
375
+ return [3, 12];
376
376
  case 2:
377
377
  _c = [{}];
378
- return [4 /*yield*/, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
378
+ return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
379
379
  case 3:
380
380
  response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
381
- return [3 /*break*/, 13];
381
+ return [3, 13];
382
382
  case 4:
383
383
  _d = [{}];
384
- return [4 /*yield*/, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
384
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
385
385
  case 5:
386
386
  response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
387
- return [3 /*break*/, 13];
387
+ return [3, 13];
388
388
  case 6:
389
389
  _e = [{}];
390
- return [4 /*yield*/, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
390
+ return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
391
391
  case 7:
392
392
  response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
393
- return [3 /*break*/, 13];
393
+ return [3, 13];
394
394
  case 8:
395
395
  _f = [{}];
396
- return [4 /*yield*/, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
396
+ return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
397
397
  case 9:
398
398
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
399
- return [3 /*break*/, 13];
399
+ return [3, 13];
400
400
  case 10:
401
401
  _g = [{}];
402
- return [4 /*yield*/, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
402
+ return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
403
403
  case 11:
404
404
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
405
- return [3 /*break*/, 13];
405
+ return [3, 13];
406
406
  case 12:
407
407
  parsedBody = parsedOutput.body;
408
408
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -412,7 +412,7 @@ var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (out
412
412
  message = response.message || response.Message || errorCode;
413
413
  response.message = message;
414
414
  delete response.Message;
415
- return [2 /*return*/, Promise.reject(Object.assign(new Error(message), response))];
415
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
416
416
  }
417
417
  });
418
418
  }); };
@@ -427,42 +427,42 @@ var deserializeAws_restJson1MedicalTranscriptResultStream_event = function (outp
427
427
  return __generator(this, function (_g) {
428
428
  switch (_g.label) {
429
429
  case 0:
430
- if (!(output["TranscriptEvent"] !== undefined)) return [3 /*break*/, 2];
430
+ if (!(output["TranscriptEvent"] !== undefined)) return [3, 2];
431
431
  _a = {};
432
- return [4 /*yield*/, deserializeAws_restJson1MedicalTranscriptEvent_event(output["TranscriptEvent"], context)];
433
- case 1: return [2 /*return*/, (_a.TranscriptEvent = _g.sent(),
432
+ return [4, deserializeAws_restJson1MedicalTranscriptEvent_event(output["TranscriptEvent"], context)];
433
+ case 1: return [2, (_a.TranscriptEvent = _g.sent(),
434
434
  _a)];
435
435
  case 2:
436
- if (!(output["BadRequestException"] !== undefined)) return [3 /*break*/, 4];
436
+ if (!(output["BadRequestException"] !== undefined)) return [3, 4];
437
437
  _b = {};
438
- return [4 /*yield*/, deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context)];
439
- case 3: return [2 /*return*/, (_b.BadRequestException = _g.sent(),
438
+ return [4, deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context)];
439
+ case 3: return [2, (_b.BadRequestException = _g.sent(),
440
440
  _b)];
441
441
  case 4:
442
- if (!(output["LimitExceededException"] !== undefined)) return [3 /*break*/, 6];
442
+ if (!(output["LimitExceededException"] !== undefined)) return [3, 6];
443
443
  _c = {};
444
- return [4 /*yield*/, deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context)];
445
- case 5: return [2 /*return*/, (_c.LimitExceededException = _g.sent(),
444
+ return [4, deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context)];
445
+ case 5: return [2, (_c.LimitExceededException = _g.sent(),
446
446
  _c)];
447
447
  case 6:
448
- if (!(output["InternalFailureException"] !== undefined)) return [3 /*break*/, 8];
448
+ if (!(output["InternalFailureException"] !== undefined)) return [3, 8];
449
449
  _d = {};
450
- return [4 /*yield*/, deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context)];
451
- case 7: return [2 /*return*/, (_d.InternalFailureException = _g.sent(),
450
+ return [4, deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context)];
451
+ case 7: return [2, (_d.InternalFailureException = _g.sent(),
452
452
  _d)];
453
453
  case 8:
454
- if (!(output["ConflictException"] !== undefined)) return [3 /*break*/, 10];
454
+ if (!(output["ConflictException"] !== undefined)) return [3, 10];
455
455
  _e = {};
456
- return [4 /*yield*/, deserializeAws_restJson1ConflictException_event(output["ConflictException"], context)];
457
- case 9: return [2 /*return*/, (_e.ConflictException = _g.sent(),
456
+ return [4, deserializeAws_restJson1ConflictException_event(output["ConflictException"], context)];
457
+ case 9: return [2, (_e.ConflictException = _g.sent(),
458
458
  _e)];
459
459
  case 10:
460
- if (!(output["ServiceUnavailableException"] !== undefined)) return [3 /*break*/, 12];
460
+ if (!(output["ServiceUnavailableException"] !== undefined)) return [3, 12];
461
461
  _f = {};
462
- return [4 /*yield*/, deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context)];
463
- case 11: return [2 /*return*/, (_f.ServiceUnavailableException = _g.sent(),
462
+ return [4, deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context)];
463
+ case 11: return [2, (_f.ServiceUnavailableException = _g.sent(),
464
464
  _f)];
465
- case 12: return [2 /*return*/, { $unknown: output }];
465
+ case 12: return [2, { $unknown: output }];
466
466
  }
467
467
  });
468
468
  }); };
@@ -471,42 +471,42 @@ var deserializeAws_restJson1TranscriptResultStream_event = function (output, con
471
471
  return __generator(this, function (_g) {
472
472
  switch (_g.label) {
473
473
  case 0:
474
- if (!(output["TranscriptEvent"] !== undefined)) return [3 /*break*/, 2];
474
+ if (!(output["TranscriptEvent"] !== undefined)) return [3, 2];
475
475
  _a = {};
476
- return [4 /*yield*/, deserializeAws_restJson1TranscriptEvent_event(output["TranscriptEvent"], context)];
477
- case 1: return [2 /*return*/, (_a.TranscriptEvent = _g.sent(),
476
+ return [4, deserializeAws_restJson1TranscriptEvent_event(output["TranscriptEvent"], context)];
477
+ case 1: return [2, (_a.TranscriptEvent = _g.sent(),
478
478
  _a)];
479
479
  case 2:
480
- if (!(output["BadRequestException"] !== undefined)) return [3 /*break*/, 4];
480
+ if (!(output["BadRequestException"] !== undefined)) return [3, 4];
481
481
  _b = {};
482
- return [4 /*yield*/, deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context)];
483
- case 3: return [2 /*return*/, (_b.BadRequestException = _g.sent(),
482
+ return [4, deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context)];
483
+ case 3: return [2, (_b.BadRequestException = _g.sent(),
484
484
  _b)];
485
485
  case 4:
486
- if (!(output["LimitExceededException"] !== undefined)) return [3 /*break*/, 6];
486
+ if (!(output["LimitExceededException"] !== undefined)) return [3, 6];
487
487
  _c = {};
488
- return [4 /*yield*/, deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context)];
489
- case 5: return [2 /*return*/, (_c.LimitExceededException = _g.sent(),
488
+ return [4, deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context)];
489
+ case 5: return [2, (_c.LimitExceededException = _g.sent(),
490
490
  _c)];
491
491
  case 6:
492
- if (!(output["InternalFailureException"] !== undefined)) return [3 /*break*/, 8];
492
+ if (!(output["InternalFailureException"] !== undefined)) return [3, 8];
493
493
  _d = {};
494
- return [4 /*yield*/, deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context)];
495
- case 7: return [2 /*return*/, (_d.InternalFailureException = _g.sent(),
494
+ return [4, deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context)];
495
+ case 7: return [2, (_d.InternalFailureException = _g.sent(),
496
496
  _d)];
497
497
  case 8:
498
- if (!(output["ConflictException"] !== undefined)) return [3 /*break*/, 10];
498
+ if (!(output["ConflictException"] !== undefined)) return [3, 10];
499
499
  _e = {};
500
- return [4 /*yield*/, deserializeAws_restJson1ConflictException_event(output["ConflictException"], context)];
501
- case 9: return [2 /*return*/, (_e.ConflictException = _g.sent(),
500
+ return [4, deserializeAws_restJson1ConflictException_event(output["ConflictException"], context)];
501
+ case 9: return [2, (_e.ConflictException = _g.sent(),
502
502
  _e)];
503
503
  case 10:
504
- if (!(output["ServiceUnavailableException"] !== undefined)) return [3 /*break*/, 12];
504
+ if (!(output["ServiceUnavailableException"] !== undefined)) return [3, 12];
505
505
  _f = {};
506
- return [4 /*yield*/, deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context)];
507
- case 11: return [2 /*return*/, (_f.ServiceUnavailableException = _g.sent(),
506
+ return [4, deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context)];
507
+ case 11: return [2, (_f.ServiceUnavailableException = _g.sent(),
508
508
  _f)];
509
- case 12: return [2 /*return*/, { $unknown: output }];
509
+ case 12: return [2, { $unknown: output }];
510
510
  }
511
511
  });
512
512
  }); };
@@ -529,10 +529,10 @@ var deserializeAws_restJson1BadRequestException_event = function (output, contex
529
529
  case 0:
530
530
  _a = [__assign({}, output)];
531
531
  _b = {};
532
- return [4 /*yield*/, parseBody(output.body, context)];
532
+ return [4, parseBody(output.body, context)];
533
533
  case 1:
534
534
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
535
- return [2 /*return*/, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
535
+ return [2, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
536
536
  }
537
537
  });
538
538
  }); };
@@ -544,10 +544,10 @@ var deserializeAws_restJson1ConflictException_event = function (output, context)
544
544
  case 0:
545
545
  _a = [__assign({}, output)];
546
546
  _b = {};
547
- return [4 /*yield*/, parseBody(output.body, context)];
547
+ return [4, parseBody(output.body, context)];
548
548
  case 1:
549
549
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
550
- return [2 /*return*/, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
550
+ return [2, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
551
551
  }
552
552
  });
553
553
  }); };
@@ -559,10 +559,10 @@ var deserializeAws_restJson1InternalFailureException_event = function (output, c
559
559
  case 0:
560
560
  _a = [__assign({}, output)];
561
561
  _b = {};
562
- return [4 /*yield*/, parseBody(output.body, context)];
562
+ return [4, parseBody(output.body, context)];
563
563
  case 1:
564
564
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
565
- return [2 /*return*/, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
565
+ return [2, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
566
566
  }
567
567
  });
568
568
  }); };
@@ -574,10 +574,10 @@ var deserializeAws_restJson1LimitExceededException_event = function (output, con
574
574
  case 0:
575
575
  _a = [__assign({}, output)];
576
576
  _b = {};
577
- return [4 /*yield*/, parseBody(output.body, context)];
577
+ return [4, parseBody(output.body, context)];
578
578
  case 1:
579
579
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
580
- return [2 /*return*/, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
580
+ return [2, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
581
581
  }
582
582
  });
583
583
  }); };
@@ -587,11 +587,11 @@ var deserializeAws_restJson1MedicalTranscriptEvent_event = function (output, con
587
587
  switch (_a.label) {
588
588
  case 0:
589
589
  contents = {};
590
- return [4 /*yield*/, parseBody(output.body, context)];
590
+ return [4, parseBody(output.body, context)];
591
591
  case 1:
592
592
  data = _a.sent();
593
593
  contents = __assign(__assign({}, contents), deserializeAws_restJson1MedicalTranscriptEvent(data, context));
594
- return [2 /*return*/, contents];
594
+ return [2, contents];
595
595
  }
596
596
  });
597
597
  }); };
@@ -603,10 +603,10 @@ var deserializeAws_restJson1ServiceUnavailableException_event = function (output
603
603
  case 0:
604
604
  _a = [__assign({}, output)];
605
605
  _b = {};
606
- return [4 /*yield*/, parseBody(output.body, context)];
606
+ return [4, parseBody(output.body, context)];
607
607
  case 1:
608
608
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
609
- return [2 /*return*/, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
609
+ return [2, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
610
610
  }
611
611
  });
612
612
  }); };
@@ -616,11 +616,11 @@ var deserializeAws_restJson1TranscriptEvent_event = function (output, context) {
616
616
  switch (_a.label) {
617
617
  case 0:
618
618
  contents = {};
619
- return [4 /*yield*/, parseBody(output.body, context)];
619
+ return [4, parseBody(output.body, context)];
620
620
  case 1:
621
621
  data = _a.sent();
622
622
  contents = __assign(__assign({}, contents), deserializeAws_restJson1TranscriptEvent(data, context));
623
- return [2 /*return*/, contents];
623
+ return [2, contents];
624
624
  }
625
625
  });
626
626
  }); };
@@ -637,7 +637,7 @@ var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput
637
637
  if (data.Message !== undefined && data.Message !== null) {
638
638
  contents.Message = __expectString(data.Message);
639
639
  }
640
- return [2 /*return*/, contents];
640
+ return [2, contents];
641
641
  });
642
642
  }); };
643
643
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -653,7 +653,7 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
653
653
  if (data.Message !== undefined && data.Message !== null) {
654
654
  contents.Message = __expectString(data.Message);
655
655
  }
656
- return [2 /*return*/, contents];
656
+ return [2, contents];
657
657
  });
658
658
  }); };
659
659
  var deserializeAws_restJson1InternalFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -669,7 +669,7 @@ var deserializeAws_restJson1InternalFailureExceptionResponse = function (parsedO
669
669
  if (data.Message !== undefined && data.Message !== null) {
670
670
  contents.Message = __expectString(data.Message);
671
671
  }
672
- return [2 /*return*/, contents];
672
+ return [2, contents];
673
673
  });
674
674
  }); };
675
675
  var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -685,7 +685,7 @@ var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOut
685
685
  if (data.Message !== undefined && data.Message !== null) {
686
686
  contents.Message = __expectString(data.Message);
687
687
  }
688
- return [2 /*return*/, contents];
688
+ return [2, contents];
689
689
  });
690
690
  }); };
691
691
  var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -701,7 +701,7 @@ var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (pars
701
701
  if (data.Message !== undefined && data.Message !== null) {
702
702
  contents.Message = __expectString(data.Message);
703
703
  }
704
- return [2 /*return*/, contents];
704
+ return [2, contents];
705
705
  });
706
706
  }); };
707
707
  var serializeAws_restJson1AudioEvent = function (input, context) {
@@ -1009,7 +1009,6 @@ var deserializeMetadata = function (output) {
1009
1009
  cfId: output.headers["x-amz-cf-id"],
1010
1010
  });
1011
1011
  };
1012
- // Collect low-level response body stream to Uint8Array.
1013
1012
  var collectBody = function (streamBody, context) {
1014
1013
  if (streamBody === void 0) { streamBody = new Uint8Array(); }
1015
1014
  if (streamBody instanceof Uint8Array) {
@@ -1017,7 +1016,6 @@ var collectBody = function (streamBody, context) {
1017
1016
  }
1018
1017
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1019
1018
  };
1020
- // Encode Uint8Array data into string with utf-8.
1021
1019
  var collectBodyString = function (streamBody, context) {
1022
1020
  return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1023
1021
  };
@@ -1036,9 +1034,6 @@ var parseBody = function (streamBody, context) {
1036
1034
  return {};
1037
1035
  });
1038
1036
  };
1039
- /**
1040
- * Load an error code for the aws.rest-json-1.1 protocol.
1041
- */
1042
1037
  var loadRestJsonErrorCode = function (output, data) {
1043
1038
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1044
1039
  var sanitizeErrorCode = function (rawValue) {