@aws-sdk/client-transcribe-streaming 3.131.0 → 3.135.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.135.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.134.0...v3.135.0) (2022-07-21)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-transcribe-streaming
9
+
10
+
11
+
12
+
13
+
6
14
  # [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
7
15
 
8
16
  **Note:** Version bump only for package @aws-sdk/client-transcribe-streaming
@@ -35,7 +35,7 @@ const serializeAws_restJson1StartMedicalStreamTranscriptionCommand = async (inpu
35
35
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/medical-stream-transcription";
36
36
  let body;
37
37
  if (input.AudioStream !== undefined) {
38
- body = context.eventStreamMarshaller.serialize(input.AudioStream, (event) => serializeAws_restJson1AudioStream_event(event, context));
38
+ body = serializeAws_restJson1AudioStream(input.AudioStream, context);
39
39
  }
40
40
  return new protocol_http_1.HttpRequest({
41
41
  protocol,
@@ -112,7 +112,7 @@ const serializeAws_restJson1StartStreamTranscriptionCommand = async (input, cont
112
112
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/stream-transcription";
113
113
  let body;
114
114
  if (input.AudioStream !== undefined) {
115
- body = context.eventStreamMarshaller.serialize(input.AudioStream, (event) => serializeAws_restJson1AudioStream_event(event, context));
115
+ body = serializeAws_restJson1AudioStream(input.AudioStream, context);
116
116
  }
117
117
  return new protocol_http_1.HttpRequest({
118
118
  protocol,
@@ -181,22 +181,8 @@ const deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = async (ou
181
181
  if (output.headers["x-amzn-transcribe-content-identification-type"] !== undefined) {
182
182
  contents.ContentIdentificationType = output.headers["x-amzn-transcribe-content-identification-type"];
183
183
  }
184
- const data = context.eventStreamMarshaller.deserialize(output.body, async (event) => {
185
- const eventName = Object.keys(event)[0];
186
- const eventHeaders = Object.entries(event[eventName].headers).reduce((accummulator, curr) => {
187
- accummulator[curr[0]] = curr[1].value;
188
- return accummulator;
189
- }, {});
190
- const eventMessage = {
191
- headers: eventHeaders,
192
- body: event[eventName].body,
193
- };
194
- const parsedEvent = {
195
- [eventName]: eventMessage,
196
- };
197
- return await deserializeAws_restJson1MedicalTranscriptResultStream_event(parsedEvent, context);
198
- });
199
- contents.TranscriptResultStream = data;
184
+ const data = output.body;
185
+ contents.TranscriptResultStream = deserializeAws_restJson1MedicalTranscriptResultStream(data, context);
200
186
  return Promise.resolve(contents);
201
187
  };
202
188
  exports.deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = deserializeAws_restJson1StartMedicalStreamTranscriptionCommand;
@@ -331,22 +317,8 @@ const deserializeAws_restJson1StartStreamTranscriptionCommand = async (output, c
331
317
  if (output.headers["x-amzn-transcribe-vocabulary-filter-names"] !== undefined) {
332
318
  contents.VocabularyFilterNames = output.headers["x-amzn-transcribe-vocabulary-filter-names"];
333
319
  }
334
- const data = context.eventStreamMarshaller.deserialize(output.body, async (event) => {
335
- const eventName = Object.keys(event)[0];
336
- const eventHeaders = Object.entries(event[eventName].headers).reduce((accummulator, curr) => {
337
- accummulator[curr[0]] = curr[1].value;
338
- return accummulator;
339
- }, {});
340
- const eventMessage = {
341
- headers: eventHeaders,
342
- body: event[eventName].body,
343
- };
344
- const parsedEvent = {
345
- [eventName]: eventMessage,
346
- };
347
- return await deserializeAws_restJson1TranscriptResultStream_event(parsedEvent, context);
348
- });
349
- contents.TranscriptResultStream = data;
320
+ const data = output.body;
321
+ contents.TranscriptResultStream = deserializeAws_restJson1TranscriptResultStream(data, context);
350
322
  return Promise.resolve(contents);
351
323
  };
352
324
  exports.deserializeAws_restJson1StartStreamTranscriptionCommand = deserializeAws_restJson1StartStreamTranscriptionCommand;
@@ -385,143 +357,6 @@ const deserializeAws_restJson1StartStreamTranscriptionCommandError = async (outp
385
357
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
386
358
  }
387
359
  };
388
- const serializeAws_restJson1AudioStream_event = (input, context) => {
389
- return models_0_1.AudioStream.visit(input, {
390
- AudioEvent: (value) => serializeAws_restJson1AudioEvent_event(value, context),
391
- _: (value) => value,
392
- });
393
- };
394
- const deserializeAws_restJson1MedicalTranscriptResultStream_event = async (output, context) => {
395
- if (output["TranscriptEvent"] !== undefined) {
396
- return {
397
- TranscriptEvent: await deserializeAws_restJson1MedicalTranscriptEvent_event(output["TranscriptEvent"], context),
398
- };
399
- }
400
- if (output["BadRequestException"] !== undefined) {
401
- return {
402
- BadRequestException: await deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context),
403
- };
404
- }
405
- if (output["LimitExceededException"] !== undefined) {
406
- return {
407
- LimitExceededException: await deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context),
408
- };
409
- }
410
- if (output["InternalFailureException"] !== undefined) {
411
- return {
412
- InternalFailureException: await deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context),
413
- };
414
- }
415
- if (output["ConflictException"] !== undefined) {
416
- return {
417
- ConflictException: await deserializeAws_restJson1ConflictException_event(output["ConflictException"], context),
418
- };
419
- }
420
- if (output["ServiceUnavailableException"] !== undefined) {
421
- return {
422
- ServiceUnavailableException: await deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context),
423
- };
424
- }
425
- return { $unknown: output };
426
- };
427
- const deserializeAws_restJson1TranscriptResultStream_event = async (output, context) => {
428
- if (output["TranscriptEvent"] !== undefined) {
429
- return {
430
- TranscriptEvent: await deserializeAws_restJson1TranscriptEvent_event(output["TranscriptEvent"], context),
431
- };
432
- }
433
- if (output["BadRequestException"] !== undefined) {
434
- return {
435
- BadRequestException: await deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context),
436
- };
437
- }
438
- if (output["LimitExceededException"] !== undefined) {
439
- return {
440
- LimitExceededException: await deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context),
441
- };
442
- }
443
- if (output["InternalFailureException"] !== undefined) {
444
- return {
445
- InternalFailureException: await deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context),
446
- };
447
- }
448
- if (output["ConflictException"] !== undefined) {
449
- return {
450
- ConflictException: await deserializeAws_restJson1ConflictException_event(output["ConflictException"], context),
451
- };
452
- }
453
- if (output["ServiceUnavailableException"] !== undefined) {
454
- return {
455
- ServiceUnavailableException: await deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context),
456
- };
457
- }
458
- return { $unknown: output };
459
- };
460
- const serializeAws_restJson1AudioEvent_event = (input, context) => {
461
- const message = {
462
- headers: {
463
- ":event-type": { type: "string", value: "AudioEvent" },
464
- ":message-type": { type: "string", value: "event" },
465
- ":content-type": { type: "string", value: "application/octet-stream" },
466
- },
467
- body: new Uint8Array(),
468
- };
469
- message.body = input.AudioChunk || message.body;
470
- return message;
471
- };
472
- const deserializeAws_restJson1BadRequestException_event = async (output, context) => {
473
- const parsedOutput = {
474
- ...output,
475
- body: await parseBody(output.body, context),
476
- };
477
- return deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
478
- };
479
- const deserializeAws_restJson1ConflictException_event = async (output, context) => {
480
- const parsedOutput = {
481
- ...output,
482
- body: await parseBody(output.body, context),
483
- };
484
- return deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
485
- };
486
- const deserializeAws_restJson1InternalFailureException_event = async (output, context) => {
487
- const parsedOutput = {
488
- ...output,
489
- body: await parseBody(output.body, context),
490
- };
491
- return deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
492
- };
493
- const deserializeAws_restJson1LimitExceededException_event = async (output, context) => {
494
- const parsedOutput = {
495
- ...output,
496
- body: await parseBody(output.body, context),
497
- };
498
- return deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
499
- };
500
- const deserializeAws_restJson1MedicalTranscriptEvent_event = async (output, context) => {
501
- let contents = {};
502
- const data = await parseBody(output.body, context);
503
- contents = {
504
- ...contents,
505
- ...deserializeAws_restJson1MedicalTranscriptEvent(data, context),
506
- };
507
- return contents;
508
- };
509
- const deserializeAws_restJson1ServiceUnavailableException_event = async (output, context) => {
510
- const parsedOutput = {
511
- ...output,
512
- body: await parseBody(output.body, context),
513
- };
514
- return deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
515
- };
516
- const deserializeAws_restJson1TranscriptEvent_event = async (output, context) => {
517
- let contents = {};
518
- const data = await parseBody(output.body, context);
519
- contents = {
520
- ...contents,
521
- ...deserializeAws_restJson1TranscriptEvent(data, context),
522
- };
523
- return contents;
524
- };
525
360
  const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
526
361
  const contents = {};
527
362
  const data = parsedOutput.body;
@@ -582,17 +417,142 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
582
417
  });
583
418
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
584
419
  };
585
- const serializeAws_restJson1AudioEvent = (input, context) => {
586
- return {
587
- ...(input.AudioChunk != null && { AudioChunk: context.base64Encoder(input.AudioChunk) }),
420
+ const serializeAws_restJson1AudioStream = (input, context) => {
421
+ const eventMarshallingVisitor = (event) => models_0_1.AudioStream.visit(event, {
422
+ AudioEvent: (value) => serializeAws_restJson1AudioEvent_event(value, context),
423
+ _: (value) => value,
424
+ });
425
+ return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
426
+ };
427
+ const serializeAws_restJson1AudioEvent_event = (input, context) => {
428
+ const headers = {
429
+ ":event-type": { type: "string", value: "AudioEvent" },
430
+ ":message-type": { type: "string", value: "event" },
431
+ ":content-type": { type: "string", value: "application/octet-stream" },
588
432
  };
433
+ let body = new Uint8Array();
434
+ if (input.AudioChunk != null) {
435
+ body = input.AudioChunk;
436
+ }
437
+ return { headers, body };
589
438
  };
590
- const serializeAws_restJson1AudioStream = (input, context) => {
591
- return models_0_1.AudioStream.visit(input, {
592
- AudioEvent: (value) => ({ AudioEvent: serializeAws_restJson1AudioEvent(value, context) }),
593
- _: (name, value) => ({ name: value }),
439
+ const deserializeAws_restJson1MedicalTranscriptResultStream = (output, context) => {
440
+ return context.eventStreamMarshaller.deserialize(output, async (event) => {
441
+ if (event["TranscriptEvent"] != null) {
442
+ return {
443
+ TranscriptEvent: await deserializeAws_restJson1MedicalTranscriptEvent_event(event["TranscriptEvent"], context),
444
+ };
445
+ }
446
+ if (event["BadRequestException"] != null) {
447
+ return {
448
+ BadRequestException: await deserializeAws_restJson1BadRequestException_event(event["BadRequestException"], context),
449
+ };
450
+ }
451
+ if (event["LimitExceededException"] != null) {
452
+ return {
453
+ LimitExceededException: await deserializeAws_restJson1LimitExceededException_event(event["LimitExceededException"], context),
454
+ };
455
+ }
456
+ if (event["InternalFailureException"] != null) {
457
+ return {
458
+ InternalFailureException: await deserializeAws_restJson1InternalFailureException_event(event["InternalFailureException"], context),
459
+ };
460
+ }
461
+ if (event["ConflictException"] != null) {
462
+ return {
463
+ ConflictException: await deserializeAws_restJson1ConflictException_event(event["ConflictException"], context),
464
+ };
465
+ }
466
+ if (event["ServiceUnavailableException"] != null) {
467
+ return {
468
+ ServiceUnavailableException: await deserializeAws_restJson1ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
469
+ };
470
+ }
471
+ return { $unknown: output };
594
472
  });
595
473
  };
474
+ const deserializeAws_restJson1TranscriptResultStream = (output, context) => {
475
+ return context.eventStreamMarshaller.deserialize(output, async (event) => {
476
+ if (event["TranscriptEvent"] != null) {
477
+ return {
478
+ TranscriptEvent: await deserializeAws_restJson1TranscriptEvent_event(event["TranscriptEvent"], context),
479
+ };
480
+ }
481
+ if (event["BadRequestException"] != null) {
482
+ return {
483
+ BadRequestException: await deserializeAws_restJson1BadRequestException_event(event["BadRequestException"], context),
484
+ };
485
+ }
486
+ if (event["LimitExceededException"] != null) {
487
+ return {
488
+ LimitExceededException: await deserializeAws_restJson1LimitExceededException_event(event["LimitExceededException"], context),
489
+ };
490
+ }
491
+ if (event["InternalFailureException"] != null) {
492
+ return {
493
+ InternalFailureException: await deserializeAws_restJson1InternalFailureException_event(event["InternalFailureException"], context),
494
+ };
495
+ }
496
+ if (event["ConflictException"] != null) {
497
+ return {
498
+ ConflictException: await deserializeAws_restJson1ConflictException_event(event["ConflictException"], context),
499
+ };
500
+ }
501
+ if (event["ServiceUnavailableException"] != null) {
502
+ return {
503
+ ServiceUnavailableException: await deserializeAws_restJson1ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
504
+ };
505
+ }
506
+ return { $unknown: output };
507
+ });
508
+ };
509
+ const deserializeAws_restJson1BadRequestException_event = async (output, context) => {
510
+ const parsedOutput = {
511
+ ...output,
512
+ body: await parseBody(output.body, context),
513
+ };
514
+ return deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
515
+ };
516
+ const deserializeAws_restJson1ConflictException_event = async (output, context) => {
517
+ const parsedOutput = {
518
+ ...output,
519
+ body: await parseBody(output.body, context),
520
+ };
521
+ return deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
522
+ };
523
+ const deserializeAws_restJson1InternalFailureException_event = async (output, context) => {
524
+ const parsedOutput = {
525
+ ...output,
526
+ body: await parseBody(output.body, context),
527
+ };
528
+ return deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
529
+ };
530
+ const deserializeAws_restJson1LimitExceededException_event = async (output, context) => {
531
+ const parsedOutput = {
532
+ ...output,
533
+ body: await parseBody(output.body, context),
534
+ };
535
+ return deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
536
+ };
537
+ const deserializeAws_restJson1MedicalTranscriptEvent_event = async (output, context) => {
538
+ const contents = {};
539
+ const data = await parseBody(output.body, context);
540
+ Object.assign(contents, deserializeAws_restJson1MedicalTranscriptEvent(data, context));
541
+ return contents;
542
+ };
543
+ const deserializeAws_restJson1ServiceUnavailableException_event = async (output, context) => {
544
+ const parsedOutput = {
545
+ ...output,
546
+ body: await parseBody(output.body, context),
547
+ };
548
+ return deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
549
+ };
550
+ const deserializeAws_restJson1TranscriptEvent_event = async (output, context) => {
551
+ const contents = {};
552
+ const data = await parseBody(output.body, context);
553
+ Object.assign(contents, deserializeAws_restJson1TranscriptEvent(data, context));
554
+ return contents;
555
+ };
596
556
  const deserializeAws_restJson1Alternative = (output, context) => {
597
557
  return {
598
558
  Entities: output.Entities != null ? deserializeAws_restJson1EntityList(output.Entities, context) : undefined,
@@ -611,16 +571,6 @@ const deserializeAws_restJson1AlternativeList = (output, context) => {
611
571
  });
612
572
  return retVal;
613
573
  };
614
- const deserializeAws_restJson1BadRequestException = (output, context) => {
615
- return {
616
- Message: (0, smithy_client_1.expectString)(output.Message),
617
- };
618
- };
619
- const deserializeAws_restJson1ConflictException = (output, context) => {
620
- return {
621
- Message: (0, smithy_client_1.expectString)(output.Message),
622
- };
623
- };
624
574
  const deserializeAws_restJson1Entity = (output, context) => {
625
575
  return {
626
576
  Category: (0, smithy_client_1.expectString)(output.Category),
@@ -642,11 +592,6 @@ const deserializeAws_restJson1EntityList = (output, context) => {
642
592
  });
643
593
  return retVal;
644
594
  };
645
- const deserializeAws_restJson1InternalFailureException = (output, context) => {
646
- return {
647
- Message: (0, smithy_client_1.expectString)(output.Message),
648
- };
649
- };
650
595
  const deserializeAws_restJson1Item = (output, context) => {
651
596
  return {
652
597
  Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
@@ -687,11 +632,6 @@ const deserializeAws_restJson1LanguageWithScore = (output, context) => {
687
632
  Score: (0, smithy_client_1.limitedParseDouble)(output.Score),
688
633
  };
689
634
  };
690
- const deserializeAws_restJson1LimitExceededException = (output, context) => {
691
- return {
692
- Message: (0, smithy_client_1.expectString)(output.Message),
693
- };
694
- };
695
635
  const deserializeAws_restJson1MedicalAlternative = (output, context) => {
696
636
  return {
697
637
  Entities: output.Entities != null ? deserializeAws_restJson1MedicalEntityList(output.Entities, context) : undefined,
@@ -784,39 +724,6 @@ const deserializeAws_restJson1MedicalTranscriptEvent = (output, context) => {
784
724
  Transcript: output.Transcript != null ? deserializeAws_restJson1MedicalTranscript(output.Transcript, context) : undefined,
785
725
  };
786
726
  };
787
- const deserializeAws_restJson1MedicalTranscriptResultStream = (output, context) => {
788
- if (output.BadRequestException !== undefined && output.BadRequestException !== null) {
789
- return {
790
- BadRequestException: deserializeAws_restJson1BadRequestException(output.BadRequestException, context),
791
- };
792
- }
793
- if (output.ConflictException !== undefined && output.ConflictException !== null) {
794
- return {
795
- ConflictException: deserializeAws_restJson1ConflictException(output.ConflictException, context),
796
- };
797
- }
798
- if (output.InternalFailureException !== undefined && output.InternalFailureException !== null) {
799
- return {
800
- InternalFailureException: deserializeAws_restJson1InternalFailureException(output.InternalFailureException, context),
801
- };
802
- }
803
- if (output.LimitExceededException !== undefined && output.LimitExceededException !== null) {
804
- return {
805
- LimitExceededException: deserializeAws_restJson1LimitExceededException(output.LimitExceededException, context),
806
- };
807
- }
808
- if (output.ServiceUnavailableException !== undefined && output.ServiceUnavailableException !== null) {
809
- return {
810
- ServiceUnavailableException: deserializeAws_restJson1ServiceUnavailableException(output.ServiceUnavailableException, context),
811
- };
812
- }
813
- if (output.TranscriptEvent !== undefined && output.TranscriptEvent !== null) {
814
- return {
815
- TranscriptEvent: deserializeAws_restJson1MedicalTranscriptEvent(output.TranscriptEvent, context),
816
- };
817
- }
818
- return { $unknown: Object.entries(output)[0] };
819
- };
820
727
  const deserializeAws_restJson1Result = (output, context) => {
821
728
  return {
822
729
  Alternatives: output.Alternatives != null ? deserializeAws_restJson1AlternativeList(output.Alternatives, context) : undefined,
@@ -842,11 +749,6 @@ const deserializeAws_restJson1ResultList = (output, context) => {
842
749
  });
843
750
  return retVal;
844
751
  };
845
- const deserializeAws_restJson1ServiceUnavailableException = (output, context) => {
846
- return {
847
- Message: (0, smithy_client_1.expectString)(output.Message),
848
- };
849
- };
850
752
  const deserializeAws_restJson1Transcript = (output, context) => {
851
753
  return {
852
754
  Results: output.Results != null ? deserializeAws_restJson1ResultList(output.Results, context) : undefined,
@@ -857,39 +759,6 @@ const deserializeAws_restJson1TranscriptEvent = (output, context) => {
857
759
  Transcript: output.Transcript != null ? deserializeAws_restJson1Transcript(output.Transcript, context) : undefined,
858
760
  };
859
761
  };
860
- const deserializeAws_restJson1TranscriptResultStream = (output, context) => {
861
- if (output.BadRequestException !== undefined && output.BadRequestException !== null) {
862
- return {
863
- BadRequestException: deserializeAws_restJson1BadRequestException(output.BadRequestException, context),
864
- };
865
- }
866
- if (output.ConflictException !== undefined && output.ConflictException !== null) {
867
- return {
868
- ConflictException: deserializeAws_restJson1ConflictException(output.ConflictException, context),
869
- };
870
- }
871
- if (output.InternalFailureException !== undefined && output.InternalFailureException !== null) {
872
- return {
873
- InternalFailureException: deserializeAws_restJson1InternalFailureException(output.InternalFailureException, context),
874
- };
875
- }
876
- if (output.LimitExceededException !== undefined && output.LimitExceededException !== null) {
877
- return {
878
- LimitExceededException: deserializeAws_restJson1LimitExceededException(output.LimitExceededException, context),
879
- };
880
- }
881
- if (output.ServiceUnavailableException !== undefined && output.ServiceUnavailableException !== null) {
882
- return {
883
- ServiceUnavailableException: deserializeAws_restJson1ServiceUnavailableException(output.ServiceUnavailableException, context),
884
- };
885
- }
886
- if (output.TranscriptEvent !== undefined && output.TranscriptEvent !== null) {
887
- return {
888
- TranscriptEvent: deserializeAws_restJson1TranscriptEvent(output.TranscriptEvent, context),
889
- };
890
- }
891
- return { $unknown: Object.entries(output)[0] };
892
- };
893
762
  const deserializeMetadata = (output) => {
894
763
  var _a;
895
764
  return ({
@@ -25,9 +25,7 @@ export var serializeAws_restJson1StartMedicalStreamTranscriptionCommand = functi
25
25
  }));
26
26
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/medical-stream-transcription";
27
27
  if (input.AudioStream !== undefined) {
28
- body = context.eventStreamMarshaller.serialize(input.AudioStream, function (event) {
29
- return serializeAws_restJson1AudioStream_event(event, context);
30
- });
28
+ body = serializeAws_restJson1AudioStream(input.AudioStream, context);
31
29
  }
32
30
  return [2, new __HttpRequest({
33
31
  protocol: protocol,
@@ -87,9 +85,7 @@ export var serializeAws_restJson1StartStreamTranscriptionCommand = function (inp
87
85
  }));
88
86
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/stream-transcription";
89
87
  if (input.AudioStream !== undefined) {
90
- body = context.eventStreamMarshaller.serialize(input.AudioStream, function (event) {
91
- return serializeAws_restJson1AudioStream_event(event, context);
92
- });
88
+ body = serializeAws_restJson1AudioStream(input.AudioStream, context);
93
89
  }
94
90
  return [2, new __HttpRequest({
95
91
  protocol: protocol,
@@ -161,30 +157,8 @@ export var deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = func
161
157
  if (output.headers["x-amzn-transcribe-content-identification-type"] !== undefined) {
162
158
  contents.ContentIdentificationType = output.headers["x-amzn-transcribe-content-identification-type"];
163
159
  }
164
- data = context.eventStreamMarshaller.deserialize(output.body, function (event) { return __awaiter(void 0, void 0, void 0, function () {
165
- var eventName, eventHeaders, eventMessage, parsedEvent;
166
- var _a;
167
- return __generator(this, function (_b) {
168
- switch (_b.label) {
169
- case 0:
170
- eventName = Object.keys(event)[0];
171
- eventHeaders = Object.entries(event[eventName].headers).reduce(function (accummulator, curr) {
172
- accummulator[curr[0]] = curr[1].value;
173
- return accummulator;
174
- }, {});
175
- eventMessage = {
176
- headers: eventHeaders,
177
- body: event[eventName].body,
178
- };
179
- parsedEvent = (_a = {},
180
- _a[eventName] = eventMessage,
181
- _a);
182
- return [4, deserializeAws_restJson1MedicalTranscriptResultStream_event(parsedEvent, context)];
183
- case 1: return [2, _b.sent()];
184
- }
185
- });
186
- }); });
187
- contents.TranscriptResultStream = data;
160
+ data = output.body;
161
+ contents.TranscriptResultStream = deserializeAws_restJson1MedicalTranscriptResultStream(data, context);
188
162
  return [2, Promise.resolve(contents)];
189
163
  });
190
164
  }); };
@@ -335,30 +309,8 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
335
309
  if (output.headers["x-amzn-transcribe-vocabulary-filter-names"] !== undefined) {
336
310
  contents.VocabularyFilterNames = output.headers["x-amzn-transcribe-vocabulary-filter-names"];
337
311
  }
338
- data = context.eventStreamMarshaller.deserialize(output.body, function (event) { return __awaiter(void 0, void 0, void 0, function () {
339
- var eventName, eventHeaders, eventMessage, parsedEvent;
340
- var _a;
341
- return __generator(this, function (_b) {
342
- switch (_b.label) {
343
- case 0:
344
- eventName = Object.keys(event)[0];
345
- eventHeaders = Object.entries(event[eventName].headers).reduce(function (accummulator, curr) {
346
- accummulator[curr[0]] = curr[1].value;
347
- return accummulator;
348
- }, {});
349
- eventMessage = {
350
- headers: eventHeaders,
351
- body: event[eventName].body,
352
- };
353
- parsedEvent = (_a = {},
354
- _a[eventName] = eventMessage,
355
- _a);
356
- return [4, deserializeAws_restJson1TranscriptResultStream_event(parsedEvent, context)];
357
- case 1: return [2, _b.sent()];
358
- }
359
- });
360
- }); });
361
- contents.TranscriptResultStream = data;
312
+ data = output.body;
313
+ contents.TranscriptResultStream = deserializeAws_restJson1TranscriptResultStream(data, context);
362
314
  return [2, Promise.resolve(contents)];
363
315
  });
364
316
  }); };
@@ -411,111 +363,178 @@ var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (out
411
363
  }
412
364
  });
413
365
  }); };
414
- var serializeAws_restJson1AudioStream_event = function (input, context) {
415
- return AudioStream.visit(input, {
416
- AudioEvent: function (value) { return serializeAws_restJson1AudioEvent_event(value, context); },
417
- _: function (value) { return value; },
366
+ var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
367
+ var contents, data, exception;
368
+ return __generator(this, function (_a) {
369
+ contents = {};
370
+ data = parsedOutput.body;
371
+ if (data.Message !== undefined && data.Message !== null) {
372
+ contents.Message = __expectString(data.Message);
373
+ }
374
+ exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
375
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
418
376
  });
419
- };
420
- var deserializeAws_restJson1MedicalTranscriptResultStream_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
421
- var _a, _b, _c, _d, _e, _f;
422
- return __generator(this, function (_g) {
423
- switch (_g.label) {
424
- case 0:
425
- if (!(output["TranscriptEvent"] !== undefined)) return [3, 2];
426
- _a = {};
427
- return [4, deserializeAws_restJson1MedicalTranscriptEvent_event(output["TranscriptEvent"], context)];
428
- case 1: return [2, (_a.TranscriptEvent = _g.sent(),
429
- _a)];
430
- case 2:
431
- if (!(output["BadRequestException"] !== undefined)) return [3, 4];
432
- _b = {};
433
- return [4, deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context)];
434
- case 3: return [2, (_b.BadRequestException = _g.sent(),
435
- _b)];
436
- case 4:
437
- if (!(output["LimitExceededException"] !== undefined)) return [3, 6];
438
- _c = {};
439
- return [4, deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context)];
440
- case 5: return [2, (_c.LimitExceededException = _g.sent(),
441
- _c)];
442
- case 6:
443
- if (!(output["InternalFailureException"] !== undefined)) return [3, 8];
444
- _d = {};
445
- return [4, deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context)];
446
- case 7: return [2, (_d.InternalFailureException = _g.sent(),
447
- _d)];
448
- case 8:
449
- if (!(output["ConflictException"] !== undefined)) return [3, 10];
450
- _e = {};
451
- return [4, deserializeAws_restJson1ConflictException_event(output["ConflictException"], context)];
452
- case 9: return [2, (_e.ConflictException = _g.sent(),
453
- _e)];
454
- case 10:
455
- if (!(output["ServiceUnavailableException"] !== undefined)) return [3, 12];
456
- _f = {};
457
- return [4, deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context)];
458
- case 11: return [2, (_f.ServiceUnavailableException = _g.sent(),
459
- _f)];
460
- case 12: return [2, { $unknown: output }];
377
+ }); };
378
+ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
379
+ var contents, data, exception;
380
+ return __generator(this, function (_a) {
381
+ contents = {};
382
+ data = parsedOutput.body;
383
+ if (data.Message !== undefined && data.Message !== null) {
384
+ contents.Message = __expectString(data.Message);
461
385
  }
386
+ exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
387
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
462
388
  });
463
389
  }); };
464
- var deserializeAws_restJson1TranscriptResultStream_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
465
- var _a, _b, _c, _d, _e, _f;
466
- return __generator(this, function (_g) {
467
- switch (_g.label) {
468
- case 0:
469
- if (!(output["TranscriptEvent"] !== undefined)) return [3, 2];
470
- _a = {};
471
- return [4, deserializeAws_restJson1TranscriptEvent_event(output["TranscriptEvent"], context)];
472
- case 1: return [2, (_a.TranscriptEvent = _g.sent(),
473
- _a)];
474
- case 2:
475
- if (!(output["BadRequestException"] !== undefined)) return [3, 4];
476
- _b = {};
477
- return [4, deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context)];
478
- case 3: return [2, (_b.BadRequestException = _g.sent(),
479
- _b)];
480
- case 4:
481
- if (!(output["LimitExceededException"] !== undefined)) return [3, 6];
482
- _c = {};
483
- return [4, deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context)];
484
- case 5: return [2, (_c.LimitExceededException = _g.sent(),
485
- _c)];
486
- case 6:
487
- if (!(output["InternalFailureException"] !== undefined)) return [3, 8];
488
- _d = {};
489
- return [4, deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context)];
490
- case 7: return [2, (_d.InternalFailureException = _g.sent(),
491
- _d)];
492
- case 8:
493
- if (!(output["ConflictException"] !== undefined)) return [3, 10];
494
- _e = {};
495
- return [4, deserializeAws_restJson1ConflictException_event(output["ConflictException"], context)];
496
- case 9: return [2, (_e.ConflictException = _g.sent(),
497
- _e)];
498
- case 10:
499
- if (!(output["ServiceUnavailableException"] !== undefined)) return [3, 12];
500
- _f = {};
501
- return [4, deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context)];
502
- case 11: return [2, (_f.ServiceUnavailableException = _g.sent(),
503
- _f)];
504
- case 12: return [2, { $unknown: output }];
390
+ var deserializeAws_restJson1InternalFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
391
+ var contents, data, exception;
392
+ return __generator(this, function (_a) {
393
+ contents = {};
394
+ data = parsedOutput.body;
395
+ if (data.Message !== undefined && data.Message !== null) {
396
+ contents.Message = __expectString(data.Message);
505
397
  }
398
+ exception = new InternalFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
399
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
506
400
  });
507
401
  }); };
402
+ var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
403
+ var contents, data, exception;
404
+ return __generator(this, function (_a) {
405
+ contents = {};
406
+ data = parsedOutput.body;
407
+ if (data.Message !== undefined && data.Message !== null) {
408
+ contents.Message = __expectString(data.Message);
409
+ }
410
+ exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
411
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
412
+ });
413
+ }); };
414
+ var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
415
+ var contents, data, exception;
416
+ return __generator(this, function (_a) {
417
+ contents = {};
418
+ data = parsedOutput.body;
419
+ if (data.Message !== undefined && data.Message !== null) {
420
+ contents.Message = __expectString(data.Message);
421
+ }
422
+ exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
423
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
424
+ });
425
+ }); };
426
+ var serializeAws_restJson1AudioStream = function (input, context) {
427
+ var eventMarshallingVisitor = function (event) {
428
+ return AudioStream.visit(event, {
429
+ AudioEvent: function (value) { return serializeAws_restJson1AudioEvent_event(value, context); },
430
+ _: function (value) { return value; },
431
+ });
432
+ };
433
+ return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
434
+ };
508
435
  var serializeAws_restJson1AudioEvent_event = function (input, context) {
509
- var message = {
510
- headers: {
511
- ":event-type": { type: "string", value: "AudioEvent" },
512
- ":message-type": { type: "string", value: "event" },
513
- ":content-type": { type: "string", value: "application/octet-stream" },
514
- },
515
- body: new Uint8Array(),
436
+ var headers = {
437
+ ":event-type": { type: "string", value: "AudioEvent" },
438
+ ":message-type": { type: "string", value: "event" },
439
+ ":content-type": { type: "string", value: "application/octet-stream" },
516
440
  };
517
- message.body = input.AudioChunk || message.body;
518
- return message;
441
+ var body = new Uint8Array();
442
+ if (input.AudioChunk != null) {
443
+ body = input.AudioChunk;
444
+ }
445
+ return { headers: headers, body: body };
446
+ };
447
+ var deserializeAws_restJson1MedicalTranscriptResultStream = function (output, context) {
448
+ return context.eventStreamMarshaller.deserialize(output, function (event) { return __awaiter(void 0, void 0, void 0, function () {
449
+ var _a, _b, _c, _d, _e, _f;
450
+ return __generator(this, function (_g) {
451
+ switch (_g.label) {
452
+ case 0:
453
+ if (!(event["TranscriptEvent"] != null)) return [3, 2];
454
+ _a = {};
455
+ return [4, deserializeAws_restJson1MedicalTranscriptEvent_event(event["TranscriptEvent"], context)];
456
+ case 1: return [2, (_a.TranscriptEvent = _g.sent(),
457
+ _a)];
458
+ case 2:
459
+ if (!(event["BadRequestException"] != null)) return [3, 4];
460
+ _b = {};
461
+ return [4, deserializeAws_restJson1BadRequestException_event(event["BadRequestException"], context)];
462
+ case 3: return [2, (_b.BadRequestException = _g.sent(),
463
+ _b)];
464
+ case 4:
465
+ if (!(event["LimitExceededException"] != null)) return [3, 6];
466
+ _c = {};
467
+ return [4, deserializeAws_restJson1LimitExceededException_event(event["LimitExceededException"], context)];
468
+ case 5: return [2, (_c.LimitExceededException = _g.sent(),
469
+ _c)];
470
+ case 6:
471
+ if (!(event["InternalFailureException"] != null)) return [3, 8];
472
+ _d = {};
473
+ return [4, deserializeAws_restJson1InternalFailureException_event(event["InternalFailureException"], context)];
474
+ case 7: return [2, (_d.InternalFailureException = _g.sent(),
475
+ _d)];
476
+ case 8:
477
+ if (!(event["ConflictException"] != null)) return [3, 10];
478
+ _e = {};
479
+ return [4, deserializeAws_restJson1ConflictException_event(event["ConflictException"], context)];
480
+ case 9: return [2, (_e.ConflictException = _g.sent(),
481
+ _e)];
482
+ case 10:
483
+ if (!(event["ServiceUnavailableException"] != null)) return [3, 12];
484
+ _f = {};
485
+ return [4, deserializeAws_restJson1ServiceUnavailableException_event(event["ServiceUnavailableException"], context)];
486
+ case 11: return [2, (_f.ServiceUnavailableException = _g.sent(),
487
+ _f)];
488
+ case 12: return [2, { $unknown: output }];
489
+ }
490
+ });
491
+ }); });
492
+ };
493
+ var deserializeAws_restJson1TranscriptResultStream = function (output, context) {
494
+ return context.eventStreamMarshaller.deserialize(output, function (event) { return __awaiter(void 0, void 0, void 0, function () {
495
+ var _a, _b, _c, _d, _e, _f;
496
+ return __generator(this, function (_g) {
497
+ switch (_g.label) {
498
+ case 0:
499
+ if (!(event["TranscriptEvent"] != null)) return [3, 2];
500
+ _a = {};
501
+ return [4, deserializeAws_restJson1TranscriptEvent_event(event["TranscriptEvent"], context)];
502
+ case 1: return [2, (_a.TranscriptEvent = _g.sent(),
503
+ _a)];
504
+ case 2:
505
+ if (!(event["BadRequestException"] != null)) return [3, 4];
506
+ _b = {};
507
+ return [4, deserializeAws_restJson1BadRequestException_event(event["BadRequestException"], context)];
508
+ case 3: return [2, (_b.BadRequestException = _g.sent(),
509
+ _b)];
510
+ case 4:
511
+ if (!(event["LimitExceededException"] != null)) return [3, 6];
512
+ _c = {};
513
+ return [4, deserializeAws_restJson1LimitExceededException_event(event["LimitExceededException"], context)];
514
+ case 5: return [2, (_c.LimitExceededException = _g.sent(),
515
+ _c)];
516
+ case 6:
517
+ if (!(event["InternalFailureException"] != null)) return [3, 8];
518
+ _d = {};
519
+ return [4, deserializeAws_restJson1InternalFailureException_event(event["InternalFailureException"], context)];
520
+ case 7: return [2, (_d.InternalFailureException = _g.sent(),
521
+ _d)];
522
+ case 8:
523
+ if (!(event["ConflictException"] != null)) return [3, 10];
524
+ _e = {};
525
+ return [4, deserializeAws_restJson1ConflictException_event(event["ConflictException"], context)];
526
+ case 9: return [2, (_e.ConflictException = _g.sent(),
527
+ _e)];
528
+ case 10:
529
+ if (!(event["ServiceUnavailableException"] != null)) return [3, 12];
530
+ _f = {};
531
+ return [4, deserializeAws_restJson1ServiceUnavailableException_event(event["ServiceUnavailableException"], context)];
532
+ case 11: return [2, (_f.ServiceUnavailableException = _g.sent(),
533
+ _f)];
534
+ case 12: return [2, { $unknown: output }];
535
+ }
536
+ });
537
+ }); });
519
538
  };
520
539
  var deserializeAws_restJson1BadRequestException_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
521
540
  var parsedOutput, _a;
@@ -586,7 +605,7 @@ var deserializeAws_restJson1MedicalTranscriptEvent_event = function (output, con
586
605
  return [4, parseBody(output.body, context)];
587
606
  case 1:
588
607
  data = _a.sent();
589
- contents = __assign(__assign({}, contents), deserializeAws_restJson1MedicalTranscriptEvent(data, context));
608
+ Object.assign(contents, deserializeAws_restJson1MedicalTranscriptEvent(data, context));
590
609
  return [2, contents];
591
610
  }
592
611
  });
@@ -615,80 +634,11 @@ var deserializeAws_restJson1TranscriptEvent_event = function (output, context) {
615
634
  return [4, parseBody(output.body, context)];
616
635
  case 1:
617
636
  data = _a.sent();
618
- contents = __assign(__assign({}, contents), deserializeAws_restJson1TranscriptEvent(data, context));
637
+ Object.assign(contents, deserializeAws_restJson1TranscriptEvent(data, context));
619
638
  return [2, contents];
620
639
  }
621
640
  });
622
641
  }); };
623
- var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
624
- var contents, data, exception;
625
- return __generator(this, function (_a) {
626
- contents = {};
627
- data = parsedOutput.body;
628
- if (data.Message !== undefined && data.Message !== null) {
629
- contents.Message = __expectString(data.Message);
630
- }
631
- exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
632
- return [2, __decorateServiceException(exception, parsedOutput.body)];
633
- });
634
- }); };
635
- var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
636
- var contents, data, exception;
637
- return __generator(this, function (_a) {
638
- contents = {};
639
- data = parsedOutput.body;
640
- if (data.Message !== undefined && data.Message !== null) {
641
- contents.Message = __expectString(data.Message);
642
- }
643
- exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
644
- return [2, __decorateServiceException(exception, parsedOutput.body)];
645
- });
646
- }); };
647
- var deserializeAws_restJson1InternalFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
648
- var contents, data, exception;
649
- return __generator(this, function (_a) {
650
- contents = {};
651
- data = parsedOutput.body;
652
- if (data.Message !== undefined && data.Message !== null) {
653
- contents.Message = __expectString(data.Message);
654
- }
655
- exception = new InternalFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
656
- return [2, __decorateServiceException(exception, parsedOutput.body)];
657
- });
658
- }); };
659
- var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
660
- var contents, data, exception;
661
- return __generator(this, function (_a) {
662
- contents = {};
663
- data = parsedOutput.body;
664
- if (data.Message !== undefined && data.Message !== null) {
665
- contents.Message = __expectString(data.Message);
666
- }
667
- exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
668
- return [2, __decorateServiceException(exception, parsedOutput.body)];
669
- });
670
- }); };
671
- var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
672
- var contents, data, exception;
673
- return __generator(this, function (_a) {
674
- contents = {};
675
- data = parsedOutput.body;
676
- if (data.Message !== undefined && data.Message !== null) {
677
- contents.Message = __expectString(data.Message);
678
- }
679
- exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
680
- return [2, __decorateServiceException(exception, parsedOutput.body)];
681
- });
682
- }); };
683
- var serializeAws_restJson1AudioEvent = function (input, context) {
684
- return __assign({}, (input.AudioChunk != null && { AudioChunk: context.base64Encoder(input.AudioChunk) }));
685
- };
686
- var serializeAws_restJson1AudioStream = function (input, context) {
687
- return AudioStream.visit(input, {
688
- AudioEvent: function (value) { return ({ AudioEvent: serializeAws_restJson1AudioEvent(value, context) }); },
689
- _: function (name, value) { return ({ name: value }); },
690
- });
691
- };
692
642
  var deserializeAws_restJson1Alternative = function (output, context) {
693
643
  return {
694
644
  Entities: output.Entities != null ? deserializeAws_restJson1EntityList(output.Entities, context) : undefined,
@@ -707,16 +657,6 @@ var deserializeAws_restJson1AlternativeList = function (output, context) {
707
657
  });
708
658
  return retVal;
709
659
  };
710
- var deserializeAws_restJson1BadRequestException = function (output, context) {
711
- return {
712
- Message: __expectString(output.Message),
713
- };
714
- };
715
- var deserializeAws_restJson1ConflictException = function (output, context) {
716
- return {
717
- Message: __expectString(output.Message),
718
- };
719
- };
720
660
  var deserializeAws_restJson1Entity = function (output, context) {
721
661
  return {
722
662
  Category: __expectString(output.Category),
@@ -738,11 +678,6 @@ var deserializeAws_restJson1EntityList = function (output, context) {
738
678
  });
739
679
  return retVal;
740
680
  };
741
- var deserializeAws_restJson1InternalFailureException = function (output, context) {
742
- return {
743
- Message: __expectString(output.Message),
744
- };
745
- };
746
681
  var deserializeAws_restJson1Item = function (output, context) {
747
682
  return {
748
683
  Confidence: __limitedParseDouble(output.Confidence),
@@ -783,11 +718,6 @@ var deserializeAws_restJson1LanguageWithScore = function (output, context) {
783
718
  Score: __limitedParseDouble(output.Score),
784
719
  };
785
720
  };
786
- var deserializeAws_restJson1LimitExceededException = function (output, context) {
787
- return {
788
- Message: __expectString(output.Message),
789
- };
790
- };
791
721
  var deserializeAws_restJson1MedicalAlternative = function (output, context) {
792
722
  return {
793
723
  Entities: output.Entities != null ? deserializeAws_restJson1MedicalEntityList(output.Entities, context) : undefined,
@@ -880,39 +810,6 @@ var deserializeAws_restJson1MedicalTranscriptEvent = function (output, context)
880
810
  Transcript: output.Transcript != null ? deserializeAws_restJson1MedicalTranscript(output.Transcript, context) : undefined,
881
811
  };
882
812
  };
883
- var deserializeAws_restJson1MedicalTranscriptResultStream = function (output, context) {
884
- if (output.BadRequestException !== undefined && output.BadRequestException !== null) {
885
- return {
886
- BadRequestException: deserializeAws_restJson1BadRequestException(output.BadRequestException, context),
887
- };
888
- }
889
- if (output.ConflictException !== undefined && output.ConflictException !== null) {
890
- return {
891
- ConflictException: deserializeAws_restJson1ConflictException(output.ConflictException, context),
892
- };
893
- }
894
- if (output.InternalFailureException !== undefined && output.InternalFailureException !== null) {
895
- return {
896
- InternalFailureException: deserializeAws_restJson1InternalFailureException(output.InternalFailureException, context),
897
- };
898
- }
899
- if (output.LimitExceededException !== undefined && output.LimitExceededException !== null) {
900
- return {
901
- LimitExceededException: deserializeAws_restJson1LimitExceededException(output.LimitExceededException, context),
902
- };
903
- }
904
- if (output.ServiceUnavailableException !== undefined && output.ServiceUnavailableException !== null) {
905
- return {
906
- ServiceUnavailableException: deserializeAws_restJson1ServiceUnavailableException(output.ServiceUnavailableException, context),
907
- };
908
- }
909
- if (output.TranscriptEvent !== undefined && output.TranscriptEvent !== null) {
910
- return {
911
- TranscriptEvent: deserializeAws_restJson1MedicalTranscriptEvent(output.TranscriptEvent, context),
912
- };
913
- }
914
- return { $unknown: Object.entries(output)[0] };
915
- };
916
813
  var deserializeAws_restJson1Result = function (output, context) {
917
814
  return {
918
815
  Alternatives: output.Alternatives != null ? deserializeAws_restJson1AlternativeList(output.Alternatives, context) : undefined,
@@ -938,11 +835,6 @@ var deserializeAws_restJson1ResultList = function (output, context) {
938
835
  });
939
836
  return retVal;
940
837
  };
941
- var deserializeAws_restJson1ServiceUnavailableException = function (output, context) {
942
- return {
943
- Message: __expectString(output.Message),
944
- };
945
- };
946
838
  var deserializeAws_restJson1Transcript = function (output, context) {
947
839
  return {
948
840
  Results: output.Results != null ? deserializeAws_restJson1ResultList(output.Results, context) : undefined,
@@ -953,39 +845,6 @@ var deserializeAws_restJson1TranscriptEvent = function (output, context) {
953
845
  Transcript: output.Transcript != null ? deserializeAws_restJson1Transcript(output.Transcript, context) : undefined,
954
846
  };
955
847
  };
956
- var deserializeAws_restJson1TranscriptResultStream = function (output, context) {
957
- if (output.BadRequestException !== undefined && output.BadRequestException !== null) {
958
- return {
959
- BadRequestException: deserializeAws_restJson1BadRequestException(output.BadRequestException, context),
960
- };
961
- }
962
- if (output.ConflictException !== undefined && output.ConflictException !== null) {
963
- return {
964
- ConflictException: deserializeAws_restJson1ConflictException(output.ConflictException, context),
965
- };
966
- }
967
- if (output.InternalFailureException !== undefined && output.InternalFailureException !== null) {
968
- return {
969
- InternalFailureException: deserializeAws_restJson1InternalFailureException(output.InternalFailureException, context),
970
- };
971
- }
972
- if (output.LimitExceededException !== undefined && output.LimitExceededException !== null) {
973
- return {
974
- LimitExceededException: deserializeAws_restJson1LimitExceededException(output.LimitExceededException, context),
975
- };
976
- }
977
- if (output.ServiceUnavailableException !== undefined && output.ServiceUnavailableException !== null) {
978
- return {
979
- ServiceUnavailableException: deserializeAws_restJson1ServiceUnavailableException(output.ServiceUnavailableException, context),
980
- };
981
- }
982
- if (output.TranscriptEvent !== undefined && output.TranscriptEvent !== null) {
983
- return {
984
- TranscriptEvent: deserializeAws_restJson1TranscriptEvent(output.TranscriptEvent, context),
985
- };
986
- }
987
- return { $unknown: Object.entries(output)[0] };
988
- };
989
848
  var deserializeMetadata = function (output) {
990
849
  var _a;
991
850
  return ({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-transcribe-streaming",
3
3
  "description": "AWS SDK for JavaScript Transcribe Streaming Client for Node.js, Browser and React Native",
4
- "version": "3.131.0",
4
+ "version": "3.135.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",