@aws-sdk/client-transcribe-streaming 3.312.0 → 3.316.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.
@@ -7,7 +7,7 @@ const models_0_1 = require("../models/models_0");
7
7
  const TranscribeStreamingServiceException_1 = require("../models/TranscribeStreamingServiceException");
8
8
  const se_StartCallAnalyticsStreamTranscriptionCommand = async (input, context) => {
9
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
- const headers = map({}, isSerializableHeaderValue, {
10
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
11
11
  "x-amzn-transcribe-language-code": input.LanguageCode,
12
12
  "x-amzn-transcribe-sample-rate": [
13
13
  () => isSerializableHeaderValue(input.MediaSampleRateHertz),
@@ -46,7 +46,7 @@ const se_StartCallAnalyticsStreamTranscriptionCommand = async (input, context) =
46
46
  exports.se_StartCallAnalyticsStreamTranscriptionCommand = se_StartCallAnalyticsStreamTranscriptionCommand;
47
47
  const se_StartMedicalStreamTranscriptionCommand = async (input, context) => {
48
48
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
49
- const headers = map({}, isSerializableHeaderValue, {
49
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
50
50
  "x-amzn-transcribe-language-code": input.LanguageCode,
51
51
  "x-amzn-transcribe-sample-rate": [
52
52
  () => isSerializableHeaderValue(input.MediaSampleRateHertz),
@@ -89,7 +89,7 @@ const se_StartMedicalStreamTranscriptionCommand = async (input, context) => {
89
89
  exports.se_StartMedicalStreamTranscriptionCommand = se_StartMedicalStreamTranscriptionCommand;
90
90
  const se_StartStreamTranscriptionCommand = async (input, context) => {
91
91
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
- const headers = map({}, isSerializableHeaderValue, {
92
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
93
93
  "x-amzn-transcribe-language-code": input.LanguageCode,
94
94
  "x-amzn-transcribe-sample-rate": [
95
95
  () => isSerializableHeaderValue(input.MediaSampleRateHertz),
@@ -150,7 +150,7 @@ const de_StartCallAnalyticsStreamTranscriptionCommand = async (output, context)
150
150
  if (output.statusCode !== 200 && output.statusCode >= 300) {
151
151
  return de_StartCallAnalyticsStreamTranscriptionCommandError(output, context);
152
152
  }
153
- const contents = map({
153
+ const contents = (0, smithy_client_1.map)({
154
154
  $metadata: deserializeMetadata(output),
155
155
  RequestId: [, output.headers["x-amzn-request-id"]],
156
156
  LanguageCode: [, output.headers["x-amzn-transcribe-language-code"]],
@@ -202,10 +202,9 @@ const de_StartCallAnalyticsStreamTranscriptionCommandError = async (output, cont
202
202
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
203
203
  default:
204
204
  const parsedBody = parsedOutput.body;
205
- (0, smithy_client_1.throwDefaultError)({
205
+ return throwDefaultError({
206
206
  output,
207
207
  parsedBody,
208
- exceptionCtor: TranscribeStreamingServiceException_1.TranscribeStreamingServiceException,
209
208
  errorCode,
210
209
  });
211
210
  }
@@ -214,7 +213,7 @@ const de_StartMedicalStreamTranscriptionCommand = async (output, context) => {
214
213
  if (output.statusCode !== 200 && output.statusCode >= 300) {
215
214
  return de_StartMedicalStreamTranscriptionCommandError(output, context);
216
215
  }
217
- const contents = map({
216
+ const contents = (0, smithy_client_1.map)({
218
217
  $metadata: deserializeMetadata(output),
219
218
  RequestId: [, output.headers["x-amzn-request-id"]],
220
219
  LanguageCode: [, output.headers["x-amzn-transcribe-language-code"]],
@@ -270,10 +269,9 @@ const de_StartMedicalStreamTranscriptionCommandError = async (output, context) =
270
269
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
271
270
  default:
272
271
  const parsedBody = parsedOutput.body;
273
- (0, smithy_client_1.throwDefaultError)({
272
+ return throwDefaultError({
274
273
  output,
275
274
  parsedBody,
276
- exceptionCtor: TranscribeStreamingServiceException_1.TranscribeStreamingServiceException,
277
275
  errorCode,
278
276
  });
279
277
  }
@@ -282,7 +280,7 @@ const de_StartStreamTranscriptionCommand = async (output, context) => {
282
280
  if (output.statusCode !== 200 && output.statusCode >= 300) {
283
281
  return de_StartStreamTranscriptionCommandError(output, context);
284
282
  }
285
- const contents = map({
283
+ const contents = (0, smithy_client_1.map)({
286
284
  $metadata: deserializeMetadata(output),
287
285
  RequestId: [, output.headers["x-amzn-request-id"]],
288
286
  LanguageCode: [, output.headers["x-amzn-transcribe-language-code"]],
@@ -354,21 +352,21 @@ const de_StartStreamTranscriptionCommandError = async (output, context) => {
354
352
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
355
353
  default:
356
354
  const parsedBody = parsedOutput.body;
357
- (0, smithy_client_1.throwDefaultError)({
355
+ return throwDefaultError({
358
356
  output,
359
357
  parsedBody,
360
- exceptionCtor: TranscribeStreamingServiceException_1.TranscribeStreamingServiceException,
361
358
  errorCode,
362
359
  });
363
360
  }
364
361
  };
365
- const map = smithy_client_1.map;
362
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(TranscribeStreamingServiceException_1.TranscribeStreamingServiceException);
366
363
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
367
- const contents = map({});
364
+ const contents = (0, smithy_client_1.map)({});
368
365
  const data = parsedOutput.body;
369
- if (data.Message != null) {
370
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
371
- }
366
+ const doc = (0, smithy_client_1.take)(data, {
367
+ Message: smithy_client_1.expectString,
368
+ });
369
+ Object.assign(contents, doc);
372
370
  const exception = new models_0_1.BadRequestException({
373
371
  $metadata: deserializeMetadata(parsedOutput),
374
372
  ...contents,
@@ -376,11 +374,12 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
376
374
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
377
375
  };
378
376
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
379
- const contents = map({});
377
+ const contents = (0, smithy_client_1.map)({});
380
378
  const data = parsedOutput.body;
381
- if (data.Message != null) {
382
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
383
- }
379
+ const doc = (0, smithy_client_1.take)(data, {
380
+ Message: smithy_client_1.expectString,
381
+ });
382
+ Object.assign(contents, doc);
384
383
  const exception = new models_0_1.ConflictException({
385
384
  $metadata: deserializeMetadata(parsedOutput),
386
385
  ...contents,
@@ -388,11 +387,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
388
387
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
389
388
  };
390
389
  const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
391
- const contents = map({});
390
+ const contents = (0, smithy_client_1.map)({});
392
391
  const data = parsedOutput.body;
393
- if (data.Message != null) {
394
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
395
- }
392
+ const doc = (0, smithy_client_1.take)(data, {
393
+ Message: smithy_client_1.expectString,
394
+ });
395
+ Object.assign(contents, doc);
396
396
  const exception = new models_0_1.InternalFailureException({
397
397
  $metadata: deserializeMetadata(parsedOutput),
398
398
  ...contents,
@@ -400,11 +400,12 @@ const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
400
400
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
401
401
  };
402
402
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
403
- const contents = map({});
403
+ const contents = (0, smithy_client_1.map)({});
404
404
  const data = parsedOutput.body;
405
- if (data.Message != null) {
406
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
407
- }
405
+ const doc = (0, smithy_client_1.take)(data, {
406
+ Message: smithy_client_1.expectString,
407
+ });
408
+ Object.assign(contents, doc);
408
409
  const exception = new models_0_1.LimitExceededException({
409
410
  $metadata: deserializeMetadata(parsedOutput),
410
411
  ...contents,
@@ -412,11 +413,12 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
412
413
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
413
414
  };
414
415
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
415
- const contents = map({});
416
+ const contents = (0, smithy_client_1.map)({});
416
417
  const data = parsedOutput.body;
417
- if (data.Message != null) {
418
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
419
- }
418
+ const doc = (0, smithy_client_1.take)(data, {
419
+ Message: smithy_client_1.expectString,
420
+ });
421
+ Object.assign(contents, doc);
420
422
  const exception = new models_0_1.ServiceUnavailableException({
421
423
  $metadata: deserializeMetadata(parsedOutput),
422
424
  ...contents,
@@ -450,7 +452,7 @@ const se_ConfigurationEvent_event = (input, context) => {
450
452
  ":content-type": { type: "string", value: "application/json" },
451
453
  };
452
454
  let body = new Uint8Array();
453
- body = se_ConfigurationEvent(input, context);
455
+ body = (0, smithy_client_1._json)(input);
454
456
  body = context.utf8Decoder(JSON.stringify(body));
455
457
  return { headers, body };
456
458
  };
@@ -574,7 +576,7 @@ const de_BadRequestException_event = async (output, context) => {
574
576
  const de_CategoryEvent_event = async (output, context) => {
575
577
  const contents = {};
576
578
  const data = await parseBody(output.body, context);
577
- Object.assign(contents, de_CategoryEvent(data, context));
579
+ Object.assign(contents, (0, smithy_client_1._json)(data));
578
580
  return contents;
579
581
  };
580
582
  const de_ConflictException_event = async (output, context) => {
@@ -623,166 +625,92 @@ const de_UtteranceEvent_event = async (output, context) => {
623
625
  Object.assign(contents, de_UtteranceEvent(data, context));
624
626
  return contents;
625
627
  };
626
- const se_ChannelDefinition = (input, context) => {
627
- return {
628
- ...(input.ChannelId != null && { ChannelId: input.ChannelId }),
629
- ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }),
630
- };
631
- };
632
- const se_ChannelDefinitions = (input, context) => {
633
- return input
634
- .filter((e) => e != null)
635
- .map((entry) => {
636
- return se_ChannelDefinition(entry, context);
637
- });
638
- };
639
- const se_ConfigurationEvent = (input, context) => {
640
- return {
641
- ...(input.ChannelDefinitions != null && {
642
- ChannelDefinitions: se_ChannelDefinitions(input.ChannelDefinitions, context),
643
- }),
644
- ...(input.PostCallAnalyticsSettings != null && {
645
- PostCallAnalyticsSettings: se_PostCallAnalyticsSettings(input.PostCallAnalyticsSettings, context),
646
- }),
647
- };
648
- };
649
- const se_PostCallAnalyticsSettings = (input, context) => {
650
- return {
651
- ...(input.ContentRedactionOutput != null && { ContentRedactionOutput: input.ContentRedactionOutput }),
652
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
653
- ...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }),
654
- ...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }),
655
- };
656
- };
657
628
  const de_Alternative = (output, context) => {
658
- return {
659
- Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined,
660
- Items: output.Items != null ? de_ItemList(output.Items, context) : undefined,
661
- Transcript: (0, smithy_client_1.expectString)(output.Transcript),
662
- };
629
+ return (0, smithy_client_1.take)(output, {
630
+ Entities: (_) => de_EntityList(_, context),
631
+ Items: (_) => de_ItemList(_, context),
632
+ Transcript: smithy_client_1.expectString,
633
+ });
663
634
  };
664
635
  const de_AlternativeList = (output, context) => {
665
636
  const retVal = (output || [])
666
637
  .filter((e) => e != null)
667
638
  .map((entry) => {
668
- if (entry === null) {
669
- return null;
670
- }
671
639
  return de_Alternative(entry, context);
672
640
  });
673
641
  return retVal;
674
642
  };
675
643
  const de_CallAnalyticsEntity = (output, context) => {
676
- return {
677
- BeginOffsetMillis: (0, smithy_client_1.expectLong)(output.BeginOffsetMillis),
678
- Category: (0, smithy_client_1.expectString)(output.Category),
679
- Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
680
- Content: (0, smithy_client_1.expectString)(output.Content),
681
- EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
682
- Type: (0, smithy_client_1.expectString)(output.Type),
683
- };
644
+ return (0, smithy_client_1.take)(output, {
645
+ BeginOffsetMillis: smithy_client_1.expectLong,
646
+ Category: smithy_client_1.expectString,
647
+ Confidence: smithy_client_1.limitedParseDouble,
648
+ Content: smithy_client_1.expectString,
649
+ EndOffsetMillis: smithy_client_1.expectLong,
650
+ Type: smithy_client_1.expectString,
651
+ });
684
652
  };
685
653
  const de_CallAnalyticsEntityList = (output, context) => {
686
654
  const retVal = (output || [])
687
655
  .filter((e) => e != null)
688
656
  .map((entry) => {
689
- if (entry === null) {
690
- return null;
691
- }
692
657
  return de_CallAnalyticsEntity(entry, context);
693
658
  });
694
659
  return retVal;
695
660
  };
696
661
  const de_CallAnalyticsItem = (output, context) => {
697
- return {
698
- BeginOffsetMillis: (0, smithy_client_1.expectLong)(output.BeginOffsetMillis),
699
- Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
700
- Content: (0, smithy_client_1.expectString)(output.Content),
701
- EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
702
- Stable: (0, smithy_client_1.expectBoolean)(output.Stable),
703
- Type: (0, smithy_client_1.expectString)(output.Type),
704
- VocabularyFilterMatch: (0, smithy_client_1.expectBoolean)(output.VocabularyFilterMatch),
705
- };
662
+ return (0, smithy_client_1.take)(output, {
663
+ BeginOffsetMillis: smithy_client_1.expectLong,
664
+ Confidence: smithy_client_1.limitedParseDouble,
665
+ Content: smithy_client_1.expectString,
666
+ EndOffsetMillis: smithy_client_1.expectLong,
667
+ Stable: smithy_client_1.expectBoolean,
668
+ Type: smithy_client_1.expectString,
669
+ VocabularyFilterMatch: smithy_client_1.expectBoolean,
670
+ });
706
671
  };
707
672
  const de_CallAnalyticsItemList = (output, context) => {
708
673
  const retVal = (output || [])
709
674
  .filter((e) => e != null)
710
675
  .map((entry) => {
711
- if (entry === null) {
712
- return null;
713
- }
714
676
  return de_CallAnalyticsItem(entry, context);
715
677
  });
716
678
  return retVal;
717
679
  };
718
- const de_CategoryEvent = (output, context) => {
719
- return {
720
- MatchedCategories: output.MatchedCategories != null ? de_StringList(output.MatchedCategories, context) : undefined,
721
- MatchedDetails: output.MatchedDetails != null ? de_MatchedCategoryDetails(output.MatchedDetails, context) : undefined,
722
- };
723
- };
724
- const de_CharacterOffsets = (output, context) => {
725
- return {
726
- Begin: (0, smithy_client_1.expectInt32)(output.Begin),
727
- End: (0, smithy_client_1.expectInt32)(output.End),
728
- };
729
- };
730
680
  const de_Entity = (output, context) => {
731
- return {
732
- Category: (0, smithy_client_1.expectString)(output.Category),
733
- Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
734
- Content: (0, smithy_client_1.expectString)(output.Content),
735
- EndTime: (0, smithy_client_1.limitedParseDouble)(output.EndTime),
736
- StartTime: (0, smithy_client_1.limitedParseDouble)(output.StartTime),
737
- Type: (0, smithy_client_1.expectString)(output.Type),
738
- };
681
+ return (0, smithy_client_1.take)(output, {
682
+ Category: smithy_client_1.expectString,
683
+ Confidence: smithy_client_1.limitedParseDouble,
684
+ Content: smithy_client_1.expectString,
685
+ EndTime: smithy_client_1.limitedParseDouble,
686
+ StartTime: smithy_client_1.limitedParseDouble,
687
+ Type: smithy_client_1.expectString,
688
+ });
739
689
  };
740
690
  const de_EntityList = (output, context) => {
741
691
  const retVal = (output || [])
742
692
  .filter((e) => e != null)
743
693
  .map((entry) => {
744
- if (entry === null) {
745
- return null;
746
- }
747
694
  return de_Entity(entry, context);
748
695
  });
749
696
  return retVal;
750
697
  };
751
- const de_IssueDetected = (output, context) => {
752
- return {
753
- CharacterOffsets: output.CharacterOffsets != null ? de_CharacterOffsets(output.CharacterOffsets, context) : undefined,
754
- };
755
- };
756
- const de_IssuesDetected = (output, context) => {
757
- const retVal = (output || [])
758
- .filter((e) => e != null)
759
- .map((entry) => {
760
- if (entry === null) {
761
- return null;
762
- }
763
- return de_IssueDetected(entry, context);
764
- });
765
- return retVal;
766
- };
767
698
  const de_Item = (output, context) => {
768
- return {
769
- Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
770
- Content: (0, smithy_client_1.expectString)(output.Content),
771
- EndTime: (0, smithy_client_1.limitedParseDouble)(output.EndTime),
772
- Speaker: (0, smithy_client_1.expectString)(output.Speaker),
773
- Stable: (0, smithy_client_1.expectBoolean)(output.Stable),
774
- StartTime: (0, smithy_client_1.limitedParseDouble)(output.StartTime),
775
- Type: (0, smithy_client_1.expectString)(output.Type),
776
- VocabularyFilterMatch: (0, smithy_client_1.expectBoolean)(output.VocabularyFilterMatch),
777
- };
699
+ return (0, smithy_client_1.take)(output, {
700
+ Confidence: smithy_client_1.limitedParseDouble,
701
+ Content: smithy_client_1.expectString,
702
+ EndTime: smithy_client_1.limitedParseDouble,
703
+ Speaker: smithy_client_1.expectString,
704
+ Stable: smithy_client_1.expectBoolean,
705
+ StartTime: smithy_client_1.limitedParseDouble,
706
+ Type: smithy_client_1.expectString,
707
+ VocabularyFilterMatch: smithy_client_1.expectBoolean,
708
+ });
778
709
  };
779
710
  const de_ItemList = (output, context) => {
780
711
  const retVal = (output || [])
781
712
  .filter((e) => e != null)
782
713
  .map((entry) => {
783
- if (entry === null) {
784
- return null;
785
- }
786
714
  return de_Item(entry, context);
787
715
  });
788
716
  return retVal;
@@ -791,199 +719,137 @@ const de_LanguageIdentification = (output, context) => {
791
719
  const retVal = (output || [])
792
720
  .filter((e) => e != null)
793
721
  .map((entry) => {
794
- if (entry === null) {
795
- return null;
796
- }
797
722
  return de_LanguageWithScore(entry, context);
798
723
  });
799
724
  return retVal;
800
725
  };
801
726
  const de_LanguageWithScore = (output, context) => {
802
- return {
803
- LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
804
- Score: (0, smithy_client_1.limitedParseDouble)(output.Score),
805
- };
806
- };
807
- const de_MatchedCategoryDetails = (output, context) => {
808
- return Object.entries(output).reduce((acc, [key, value]) => {
809
- if (value === null) {
810
- return acc;
811
- }
812
- acc[key] = de_PointsOfInterest(value, context);
813
- return acc;
814
- }, {});
727
+ return (0, smithy_client_1.take)(output, {
728
+ LanguageCode: smithy_client_1.expectString,
729
+ Score: smithy_client_1.limitedParseDouble,
730
+ });
815
731
  };
816
732
  const de_MedicalAlternative = (output, context) => {
817
- return {
818
- Entities: output.Entities != null ? de_MedicalEntityList(output.Entities, context) : undefined,
819
- Items: output.Items != null ? de_MedicalItemList(output.Items, context) : undefined,
820
- Transcript: (0, smithy_client_1.expectString)(output.Transcript),
821
- };
733
+ return (0, smithy_client_1.take)(output, {
734
+ Entities: (_) => de_MedicalEntityList(_, context),
735
+ Items: (_) => de_MedicalItemList(_, context),
736
+ Transcript: smithy_client_1.expectString,
737
+ });
822
738
  };
823
739
  const de_MedicalAlternativeList = (output, context) => {
824
740
  const retVal = (output || [])
825
741
  .filter((e) => e != null)
826
742
  .map((entry) => {
827
- if (entry === null) {
828
- return null;
829
- }
830
743
  return de_MedicalAlternative(entry, context);
831
744
  });
832
745
  return retVal;
833
746
  };
834
747
  const de_MedicalEntity = (output, context) => {
835
- return {
836
- Category: (0, smithy_client_1.expectString)(output.Category),
837
- Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
838
- Content: (0, smithy_client_1.expectString)(output.Content),
839
- EndTime: (0, smithy_client_1.limitedParseDouble)(output.EndTime),
840
- StartTime: (0, smithy_client_1.limitedParseDouble)(output.StartTime),
841
- };
748
+ return (0, smithy_client_1.take)(output, {
749
+ Category: smithy_client_1.expectString,
750
+ Confidence: smithy_client_1.limitedParseDouble,
751
+ Content: smithy_client_1.expectString,
752
+ EndTime: smithy_client_1.limitedParseDouble,
753
+ StartTime: smithy_client_1.limitedParseDouble,
754
+ });
842
755
  };
843
756
  const de_MedicalEntityList = (output, context) => {
844
757
  const retVal = (output || [])
845
758
  .filter((e) => e != null)
846
759
  .map((entry) => {
847
- if (entry === null) {
848
- return null;
849
- }
850
760
  return de_MedicalEntity(entry, context);
851
761
  });
852
762
  return retVal;
853
763
  };
854
764
  const de_MedicalItem = (output, context) => {
855
- return {
856
- Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
857
- Content: (0, smithy_client_1.expectString)(output.Content),
858
- EndTime: (0, smithy_client_1.limitedParseDouble)(output.EndTime),
859
- Speaker: (0, smithy_client_1.expectString)(output.Speaker),
860
- StartTime: (0, smithy_client_1.limitedParseDouble)(output.StartTime),
861
- Type: (0, smithy_client_1.expectString)(output.Type),
862
- };
765
+ return (0, smithy_client_1.take)(output, {
766
+ Confidence: smithy_client_1.limitedParseDouble,
767
+ Content: smithy_client_1.expectString,
768
+ EndTime: smithy_client_1.limitedParseDouble,
769
+ Speaker: smithy_client_1.expectString,
770
+ StartTime: smithy_client_1.limitedParseDouble,
771
+ Type: smithy_client_1.expectString,
772
+ });
863
773
  };
864
774
  const de_MedicalItemList = (output, context) => {
865
775
  const retVal = (output || [])
866
776
  .filter((e) => e != null)
867
777
  .map((entry) => {
868
- if (entry === null) {
869
- return null;
870
- }
871
778
  return de_MedicalItem(entry, context);
872
779
  });
873
780
  return retVal;
874
781
  };
875
782
  const de_MedicalResult = (output, context) => {
876
- return {
877
- Alternatives: output.Alternatives != null ? de_MedicalAlternativeList(output.Alternatives, context) : undefined,
878
- ChannelId: (0, smithy_client_1.expectString)(output.ChannelId),
879
- EndTime: (0, smithy_client_1.limitedParseDouble)(output.EndTime),
880
- IsPartial: (0, smithy_client_1.expectBoolean)(output.IsPartial),
881
- ResultId: (0, smithy_client_1.expectString)(output.ResultId),
882
- StartTime: (0, smithy_client_1.limitedParseDouble)(output.StartTime),
883
- };
783
+ return (0, smithy_client_1.take)(output, {
784
+ Alternatives: (_) => de_MedicalAlternativeList(_, context),
785
+ ChannelId: smithy_client_1.expectString,
786
+ EndTime: smithy_client_1.limitedParseDouble,
787
+ IsPartial: smithy_client_1.expectBoolean,
788
+ ResultId: smithy_client_1.expectString,
789
+ StartTime: smithy_client_1.limitedParseDouble,
790
+ });
884
791
  };
885
792
  const de_MedicalResultList = (output, context) => {
886
793
  const retVal = (output || [])
887
794
  .filter((e) => e != null)
888
795
  .map((entry) => {
889
- if (entry === null) {
890
- return null;
891
- }
892
796
  return de_MedicalResult(entry, context);
893
797
  });
894
798
  return retVal;
895
799
  };
896
800
  const de_MedicalTranscript = (output, context) => {
897
- return {
898
- Results: output.Results != null ? de_MedicalResultList(output.Results, context) : undefined,
899
- };
801
+ return (0, smithy_client_1.take)(output, {
802
+ Results: (_) => de_MedicalResultList(_, context),
803
+ });
900
804
  };
901
805
  const de_MedicalTranscriptEvent = (output, context) => {
902
- return {
903
- Transcript: output.Transcript != null ? de_MedicalTranscript(output.Transcript, context) : undefined,
904
- };
905
- };
906
- const de_PointsOfInterest = (output, context) => {
907
- return {
908
- TimestampRanges: output.TimestampRanges != null ? de_TimestampRanges(output.TimestampRanges, context) : undefined,
909
- };
806
+ return (0, smithy_client_1.take)(output, {
807
+ Transcript: (_) => de_MedicalTranscript(_, context),
808
+ });
910
809
  };
911
810
  const de_Result = (output, context) => {
912
- return {
913
- Alternatives: output.Alternatives != null ? de_AlternativeList(output.Alternatives, context) : undefined,
914
- ChannelId: (0, smithy_client_1.expectString)(output.ChannelId),
915
- EndTime: (0, smithy_client_1.limitedParseDouble)(output.EndTime),
916
- IsPartial: (0, smithy_client_1.expectBoolean)(output.IsPartial),
917
- LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
918
- LanguageIdentification: output.LanguageIdentification != null
919
- ? de_LanguageIdentification(output.LanguageIdentification, context)
920
- : undefined,
921
- ResultId: (0, smithy_client_1.expectString)(output.ResultId),
922
- StartTime: (0, smithy_client_1.limitedParseDouble)(output.StartTime),
923
- };
811
+ return (0, smithy_client_1.take)(output, {
812
+ Alternatives: (_) => de_AlternativeList(_, context),
813
+ ChannelId: smithy_client_1.expectString,
814
+ EndTime: smithy_client_1.limitedParseDouble,
815
+ IsPartial: smithy_client_1.expectBoolean,
816
+ LanguageCode: smithy_client_1.expectString,
817
+ LanguageIdentification: (_) => de_LanguageIdentification(_, context),
818
+ ResultId: smithy_client_1.expectString,
819
+ StartTime: smithy_client_1.limitedParseDouble,
820
+ });
924
821
  };
925
822
  const de_ResultList = (output, context) => {
926
823
  const retVal = (output || [])
927
824
  .filter((e) => e != null)
928
825
  .map((entry) => {
929
- if (entry === null) {
930
- return null;
931
- }
932
826
  return de_Result(entry, context);
933
827
  });
934
828
  return retVal;
935
829
  };
936
- const de_StringList = (output, context) => {
937
- const retVal = (output || [])
938
- .filter((e) => e != null)
939
- .map((entry) => {
940
- if (entry === null) {
941
- return null;
942
- }
943
- return (0, smithy_client_1.expectString)(entry);
944
- });
945
- return retVal;
946
- };
947
- const de_TimestampRange = (output, context) => {
948
- return {
949
- BeginOffsetMillis: (0, smithy_client_1.expectLong)(output.BeginOffsetMillis),
950
- EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
951
- };
952
- };
953
- const de_TimestampRanges = (output, context) => {
954
- const retVal = (output || [])
955
- .filter((e) => e != null)
956
- .map((entry) => {
957
- if (entry === null) {
958
- return null;
959
- }
960
- return de_TimestampRange(entry, context);
961
- });
962
- return retVal;
963
- };
964
830
  const de_Transcript = (output, context) => {
965
- return {
966
- Results: output.Results != null ? de_ResultList(output.Results, context) : undefined,
967
- };
831
+ return (0, smithy_client_1.take)(output, {
832
+ Results: (_) => de_ResultList(_, context),
833
+ });
968
834
  };
969
835
  const de_TranscriptEvent = (output, context) => {
970
- return {
971
- Transcript: output.Transcript != null ? de_Transcript(output.Transcript, context) : undefined,
972
- };
836
+ return (0, smithy_client_1.take)(output, {
837
+ Transcript: (_) => de_Transcript(_, context),
838
+ });
973
839
  };
974
840
  const de_UtteranceEvent = (output, context) => {
975
- return {
976
- BeginOffsetMillis: (0, smithy_client_1.expectLong)(output.BeginOffsetMillis),
977
- EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
978
- Entities: output.Entities != null ? de_CallAnalyticsEntityList(output.Entities, context) : undefined,
979
- IsPartial: (0, smithy_client_1.expectBoolean)(output.IsPartial),
980
- IssuesDetected: output.IssuesDetected != null ? de_IssuesDetected(output.IssuesDetected, context) : undefined,
981
- Items: output.Items != null ? de_CallAnalyticsItemList(output.Items, context) : undefined,
982
- ParticipantRole: (0, smithy_client_1.expectString)(output.ParticipantRole),
983
- Sentiment: (0, smithy_client_1.expectString)(output.Sentiment),
984
- Transcript: (0, smithy_client_1.expectString)(output.Transcript),
985
- UtteranceId: (0, smithy_client_1.expectString)(output.UtteranceId),
986
- };
841
+ return (0, smithy_client_1.take)(output, {
842
+ BeginOffsetMillis: smithy_client_1.expectLong,
843
+ EndOffsetMillis: smithy_client_1.expectLong,
844
+ Entities: (_) => de_CallAnalyticsEntityList(_, context),
845
+ IsPartial: smithy_client_1.expectBoolean,
846
+ IssuesDetected: smithy_client_1._json,
847
+ Items: (_) => de_CallAnalyticsItemList(_, context),
848
+ ParticipantRole: smithy_client_1.expectString,
849
+ Sentiment: smithy_client_1.expectString,
850
+ Transcript: smithy_client_1.expectString,
851
+ UtteranceId: smithy_client_1.expectString,
852
+ });
987
853
  };
988
854
  const deserializeMetadata = (output) => ({
989
855
  httpStatusCode: output.statusCode,