@aws-sdk/client-transcribe-streaming 3.52.0 → 3.53.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.
@@ -1,7 +1,8 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectBoolean as __expectBoolean, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseBoolean as __parseBoolean, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
4
- import { AudioStream, } from "../models/models_0";
3
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseBoolean as __parseBoolean, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
4
+ import { AudioStream, BadRequestException, ConflictException, InternalFailureException, LimitExceededException, ServiceUnavailableException, } from "../models/models_0";
5
+ import { TranscribeStreamingServiceException as __BaseException } from "../models/TranscribeStreamingServiceException";
5
6
  export var serializeAws_restJson1StartMedicalStreamTranscriptionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
6
7
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
7
8
  return __generator(this, function (_c) {
@@ -184,16 +185,16 @@ export var deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = func
184
185
  });
185
186
  }); };
186
187
  var deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
187
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
188
- var _h;
189
- return __generator(this, function (_j) {
190
- switch (_j.label) {
188
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
189
+ var _c;
190
+ return __generator(this, function (_d) {
191
+ switch (_d.label) {
191
192
  case 0:
192
193
  _a = [__assign({}, output)];
193
- _h = {};
194
+ _c = {};
194
195
  return [4, parseBody(output.body, context)];
195
196
  case 1:
196
- parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
197
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
197
198
  errorCode = "UnknownError";
198
199
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
199
200
  _b = errorCode;
@@ -210,46 +211,24 @@ var deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = functi
210
211
  case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3, 10];
211
212
  }
212
213
  return [3, 12];
213
- case 2:
214
- _c = [{}];
215
- return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
216
- case 3:
217
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
218
- return [3, 13];
219
- case 4:
220
- _d = [{}];
221
- return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
222
- case 5:
223
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
224
- return [3, 13];
225
- case 6:
226
- _e = [{}];
227
- return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
228
- case 7:
229
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
230
- return [3, 13];
231
- case 8:
232
- _f = [{}];
233
- return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
234
- case 9:
235
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
236
- return [3, 13];
237
- case 10:
238
- _g = [{}];
239
- return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
240
- case 11:
241
- response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
242
- return [3, 13];
214
+ case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
215
+ case 3: throw _d.sent();
216
+ case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
217
+ case 5: throw _d.sent();
218
+ case 6: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
219
+ case 7: throw _d.sent();
220
+ case 8: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
221
+ case 9: throw _d.sent();
222
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
223
+ case 11: throw _d.sent();
243
224
  case 12:
244
225
  parsedBody = parsedOutput.body;
245
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
246
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
247
- _j.label = 13;
248
- case 13:
249
- message = response.message || response.Message || errorCode;
250
- response.message = message;
251
- delete response.Message;
252
- return [2, Promise.reject(Object.assign(new Error(message), response))];
226
+ response = new __BaseException({
227
+ name: parsedBody.code || parsedBody.Code || errorCode,
228
+ $fault: "client",
229
+ $metadata: deserializeMetadata(output),
230
+ });
231
+ throw __decorateServiceException(response, parsedBody);
253
232
  }
254
233
  });
255
234
  }); };
@@ -371,16 +350,16 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
371
350
  });
372
351
  }); };
373
352
  var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
374
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
375
- var _h;
376
- return __generator(this, function (_j) {
377
- switch (_j.label) {
353
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
354
+ var _c;
355
+ return __generator(this, function (_d) {
356
+ switch (_d.label) {
378
357
  case 0:
379
358
  _a = [__assign({}, output)];
380
- _h = {};
359
+ _c = {};
381
360
  return [4, parseBody(output.body, context)];
382
361
  case 1:
383
- parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
362
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
384
363
  errorCode = "UnknownError";
385
364
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
386
365
  _b = errorCode;
@@ -397,46 +376,24 @@ var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (out
397
376
  case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3, 10];
398
377
  }
399
378
  return [3, 12];
400
- case 2:
401
- _c = [{}];
402
- return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
403
- case 3:
404
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
405
- return [3, 13];
406
- case 4:
407
- _d = [{}];
408
- return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
409
- case 5:
410
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
411
- return [3, 13];
412
- case 6:
413
- _e = [{}];
414
- return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
415
- case 7:
416
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
417
- return [3, 13];
418
- case 8:
419
- _f = [{}];
420
- return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
421
- case 9:
422
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
423
- return [3, 13];
424
- case 10:
425
- _g = [{}];
426
- return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
427
- case 11:
428
- response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
429
- return [3, 13];
379
+ case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
380
+ case 3: throw _d.sent();
381
+ case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
382
+ case 5: throw _d.sent();
383
+ case 6: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
384
+ case 7: throw _d.sent();
385
+ case 8: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
386
+ case 9: throw _d.sent();
387
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
388
+ case 11: throw _d.sent();
430
389
  case 12:
431
390
  parsedBody = parsedOutput.body;
432
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
433
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
434
- _j.label = 13;
435
- case 13:
436
- message = response.message || response.Message || errorCode;
437
- response.message = message;
438
- delete response.Message;
439
- return [2, Promise.reject(Object.assign(new Error(message), response))];
391
+ response = new __BaseException({
392
+ name: parsedBody.code || parsedBody.Code || errorCode,
393
+ $fault: "client",
394
+ $metadata: deserializeMetadata(output),
395
+ });
396
+ throw __decorateServiceException(response, parsedBody);
440
397
  }
441
398
  });
442
399
  }); };
@@ -649,83 +606,63 @@ var deserializeAws_restJson1TranscriptEvent_event = function (output, context) {
649
606
  });
650
607
  }); };
651
608
  var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
652
- var contents, data;
609
+ var contents, data, exception;
653
610
  return __generator(this, function (_a) {
654
- contents = {
655
- name: "BadRequestException",
656
- $fault: "client",
657
- $metadata: deserializeMetadata(parsedOutput),
658
- Message: undefined,
659
- };
611
+ contents = {};
660
612
  data = parsedOutput.body;
661
613
  if (data.Message !== undefined && data.Message !== null) {
662
614
  contents.Message = __expectString(data.Message);
663
615
  }
664
- return [2, contents];
616
+ exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
617
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
665
618
  });
666
619
  }); };
667
620
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
668
- var contents, data;
621
+ var contents, data, exception;
669
622
  return __generator(this, function (_a) {
670
- contents = {
671
- name: "ConflictException",
672
- $fault: "client",
673
- $metadata: deserializeMetadata(parsedOutput),
674
- Message: undefined,
675
- };
623
+ contents = {};
676
624
  data = parsedOutput.body;
677
625
  if (data.Message !== undefined && data.Message !== null) {
678
626
  contents.Message = __expectString(data.Message);
679
627
  }
680
- return [2, contents];
628
+ exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
629
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
681
630
  });
682
631
  }); };
683
632
  var deserializeAws_restJson1InternalFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
684
- var contents, data;
633
+ var contents, data, exception;
685
634
  return __generator(this, function (_a) {
686
- contents = {
687
- name: "InternalFailureException",
688
- $fault: "server",
689
- $metadata: deserializeMetadata(parsedOutput),
690
- Message: undefined,
691
- };
635
+ contents = {};
692
636
  data = parsedOutput.body;
693
637
  if (data.Message !== undefined && data.Message !== null) {
694
638
  contents.Message = __expectString(data.Message);
695
639
  }
696
- return [2, contents];
640
+ exception = new InternalFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
641
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
697
642
  });
698
643
  }); };
699
644
  var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
700
- var contents, data;
645
+ var contents, data, exception;
701
646
  return __generator(this, function (_a) {
702
- contents = {
703
- name: "LimitExceededException",
704
- $fault: "client",
705
- $metadata: deserializeMetadata(parsedOutput),
706
- Message: undefined,
707
- };
647
+ contents = {};
708
648
  data = parsedOutput.body;
709
649
  if (data.Message !== undefined && data.Message !== null) {
710
650
  contents.Message = __expectString(data.Message);
711
651
  }
712
- return [2, contents];
652
+ exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
653
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
713
654
  });
714
655
  }); };
715
656
  var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
716
- var contents, data;
657
+ var contents, data, exception;
717
658
  return __generator(this, function (_a) {
718
- contents = {
719
- name: "ServiceUnavailableException",
720
- $fault: "server",
721
- $metadata: deserializeMetadata(parsedOutput),
722
- Message: undefined,
723
- };
659
+ contents = {};
724
660
  data = parsedOutput.body;
725
661
  if (data.Message !== undefined && data.Message !== null) {
726
662
  contents.Message = __expectString(data.Message);
727
663
  }
728
- return [2, contents];
664
+ exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
665
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
729
666
  });
730
667
  }); };
731
668
  var serializeAws_restJson1AudioEvent = function (input, context) {
@@ -750,7 +687,7 @@ var deserializeAws_restJson1Alternative = function (output, context) {
750
687
  };
751
688
  };
752
689
  var deserializeAws_restJson1AlternativeList = function (output, context) {
753
- return (output || [])
690
+ var retVal = (output || [])
754
691
  .filter(function (e) { return e != null; })
755
692
  .map(function (entry) {
756
693
  if (entry === null) {
@@ -758,6 +695,7 @@ var deserializeAws_restJson1AlternativeList = function (output, context) {
758
695
  }
759
696
  return deserializeAws_restJson1Alternative(entry, context);
760
697
  });
698
+ return retVal;
761
699
  };
762
700
  var deserializeAws_restJson1BadRequestException = function (output, context) {
763
701
  return {
@@ -780,7 +718,7 @@ var deserializeAws_restJson1Entity = function (output, context) {
780
718
  };
781
719
  };
782
720
  var deserializeAws_restJson1EntityList = function (output, context) {
783
- return (output || [])
721
+ var retVal = (output || [])
784
722
  .filter(function (e) { return e != null; })
785
723
  .map(function (entry) {
786
724
  if (entry === null) {
@@ -788,6 +726,7 @@ var deserializeAws_restJson1EntityList = function (output, context) {
788
726
  }
789
727
  return deserializeAws_restJson1Entity(entry, context);
790
728
  });
729
+ return retVal;
791
730
  };
792
731
  var deserializeAws_restJson1InternalFailureException = function (output, context) {
793
732
  return {
@@ -807,7 +746,7 @@ var deserializeAws_restJson1Item = function (output, context) {
807
746
  };
808
747
  };
809
748
  var deserializeAws_restJson1ItemList = function (output, context) {
810
- return (output || [])
749
+ var retVal = (output || [])
811
750
  .filter(function (e) { return e != null; })
812
751
  .map(function (entry) {
813
752
  if (entry === null) {
@@ -815,9 +754,10 @@ var deserializeAws_restJson1ItemList = function (output, context) {
815
754
  }
816
755
  return deserializeAws_restJson1Item(entry, context);
817
756
  });
757
+ return retVal;
818
758
  };
819
759
  var deserializeAws_restJson1LanguageIdentification = function (output, context) {
820
- return (output || [])
760
+ var retVal = (output || [])
821
761
  .filter(function (e) { return e != null; })
822
762
  .map(function (entry) {
823
763
  if (entry === null) {
@@ -825,6 +765,7 @@ var deserializeAws_restJson1LanguageIdentification = function (output, context)
825
765
  }
826
766
  return deserializeAws_restJson1LanguageWithScore(entry, context);
827
767
  });
768
+ return retVal;
828
769
  };
829
770
  var deserializeAws_restJson1LanguageWithScore = function (output, context) {
830
771
  return {
@@ -849,7 +790,7 @@ var deserializeAws_restJson1MedicalAlternative = function (output, context) {
849
790
  };
850
791
  };
851
792
  var deserializeAws_restJson1MedicalAlternativeList = function (output, context) {
852
- return (output || [])
793
+ var retVal = (output || [])
853
794
  .filter(function (e) { return e != null; })
854
795
  .map(function (entry) {
855
796
  if (entry === null) {
@@ -857,6 +798,7 @@ var deserializeAws_restJson1MedicalAlternativeList = function (output, context)
857
798
  }
858
799
  return deserializeAws_restJson1MedicalAlternative(entry, context);
859
800
  });
801
+ return retVal;
860
802
  };
861
803
  var deserializeAws_restJson1MedicalEntity = function (output, context) {
862
804
  return {
@@ -868,7 +810,7 @@ var deserializeAws_restJson1MedicalEntity = function (output, context) {
868
810
  };
869
811
  };
870
812
  var deserializeAws_restJson1MedicalEntityList = function (output, context) {
871
- return (output || [])
813
+ var retVal = (output || [])
872
814
  .filter(function (e) { return e != null; })
873
815
  .map(function (entry) {
874
816
  if (entry === null) {
@@ -876,6 +818,7 @@ var deserializeAws_restJson1MedicalEntityList = function (output, context) {
876
818
  }
877
819
  return deserializeAws_restJson1MedicalEntity(entry, context);
878
820
  });
821
+ return retVal;
879
822
  };
880
823
  var deserializeAws_restJson1MedicalItem = function (output, context) {
881
824
  return {
@@ -888,7 +831,7 @@ var deserializeAws_restJson1MedicalItem = function (output, context) {
888
831
  };
889
832
  };
890
833
  var deserializeAws_restJson1MedicalItemList = function (output, context) {
891
- return (output || [])
834
+ var retVal = (output || [])
892
835
  .filter(function (e) { return e != null; })
893
836
  .map(function (entry) {
894
837
  if (entry === null) {
@@ -896,6 +839,7 @@ var deserializeAws_restJson1MedicalItemList = function (output, context) {
896
839
  }
897
840
  return deserializeAws_restJson1MedicalItem(entry, context);
898
841
  });
842
+ return retVal;
899
843
  };
900
844
  var deserializeAws_restJson1MedicalResult = function (output, context) {
901
845
  return {
@@ -910,7 +854,7 @@ var deserializeAws_restJson1MedicalResult = function (output, context) {
910
854
  };
911
855
  };
912
856
  var deserializeAws_restJson1MedicalResultList = function (output, context) {
913
- return (output || [])
857
+ var retVal = (output || [])
914
858
  .filter(function (e) { return e != null; })
915
859
  .map(function (entry) {
916
860
  if (entry === null) {
@@ -918,6 +862,7 @@ var deserializeAws_restJson1MedicalResultList = function (output, context) {
918
862
  }
919
863
  return deserializeAws_restJson1MedicalResult(entry, context);
920
864
  });
865
+ return retVal;
921
866
  };
922
867
  var deserializeAws_restJson1MedicalTranscript = function (output, context) {
923
868
  return {
@@ -983,7 +928,7 @@ var deserializeAws_restJson1Result = function (output, context) {
983
928
  };
984
929
  };
985
930
  var deserializeAws_restJson1ResultList = function (output, context) {
986
- return (output || [])
931
+ var retVal = (output || [])
987
932
  .filter(function (e) { return e != null; })
988
933
  .map(function (entry) {
989
934
  if (entry === null) {
@@ -991,6 +936,7 @@ var deserializeAws_restJson1ResultList = function (output, context) {
991
936
  }
992
937
  return deserializeAws_restJson1Result(entry, context);
993
938
  });
939
+ return retVal;
994
940
  };
995
941
  var deserializeAws_restJson1ServiceUnavailableException = function (output, context) {
996
942
  return {
@@ -2,3 +2,4 @@ export * from "./TranscribeStreaming";
2
2
  export * from "./TranscribeStreamingClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { TranscribeStreamingServiceException } from "./models/TranscribeStreamingServiceException";
@@ -0,0 +1,10 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+ /**
3
+ * Base exception class for all service exceptions from TranscribeStreaming service.
4
+ */
5
+ export declare class TranscribeStreamingServiceException extends __ServiceException {
6
+ /**
7
+ * @internal
8
+ */
9
+ constructor(options: __ServiceExceptionOptions);
10
+ }
@@ -1,4 +1,5 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { TranscribeStreamingServiceException as __BaseException } from "./TranscribeStreamingServiceException";
2
3
  /**
3
4
  * <p>The entity identified as personally identifiable information (PII).</p>
4
5
  */
@@ -170,19 +171,27 @@ export declare namespace AudioStream {
170
171
  * <code>MediaEncoding</code> was not set to a valid encoding, or <code>LanguageCode</code> was
171
172
  * not set to a valid code. Check the parameters and try your request again.</p>
172
173
  */
173
- export interface BadRequestException extends __SmithyException, $MetadataBearer {
174
- name: "BadRequestException";
175
- $fault: "client";
174
+ export declare class BadRequestException extends __BaseException {
175
+ readonly name: "BadRequestException";
176
+ readonly $fault: "client";
176
177
  Message?: string;
178
+ /**
179
+ * @internal
180
+ */
181
+ constructor(opts: __ExceptionOptionType<BadRequestException, __BaseException>);
177
182
  }
178
183
  /**
179
184
  * <p>A new stream started with the same session ID. The current stream has been
180
185
  * terminated.</p>
181
186
  */
182
- export interface ConflictException extends __SmithyException, $MetadataBearer {
183
- name: "ConflictException";
184
- $fault: "client";
187
+ export declare class ConflictException extends __BaseException {
188
+ readonly name: "ConflictException";
189
+ readonly $fault: "client";
185
190
  Message?: string;
191
+ /**
192
+ * @internal
193
+ */
194
+ constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
186
195
  }
187
196
  export declare enum ContentIdentificationType {
188
197
  PII = "PII"
@@ -194,10 +203,14 @@ export declare enum ContentRedactionType {
194
203
  * <p>A problem occurred while processing the audio. Amazon Transcribe or Amazon Transcribe Medical terminated processing. Try
195
204
  * your request again.</p>
196
205
  */
197
- export interface InternalFailureException extends __SmithyException, $MetadataBearer {
198
- name: "InternalFailureException";
199
- $fault: "server";
206
+ export declare class InternalFailureException extends __BaseException {
207
+ readonly name: "InternalFailureException";
208
+ readonly $fault: "server";
200
209
  Message?: string;
210
+ /**
211
+ * @internal
212
+ */
213
+ constructor(opts: __ExceptionOptionType<InternalFailureException, __BaseException>);
201
214
  }
202
215
  export declare enum LanguageCode {
203
216
  DE_DE = "de-DE",
@@ -242,10 +255,14 @@ export declare namespace LanguageWithScore {
242
255
  * has finished processing, or break your audio stream into smaller chunks and try your request
243
256
  * again.</p>
244
257
  */
245
- export interface LimitExceededException extends __SmithyException, $MetadataBearer {
246
- name: "LimitExceededException";
247
- $fault: "client";
258
+ export declare class LimitExceededException extends __BaseException {
259
+ readonly name: "LimitExceededException";
260
+ readonly $fault: "client";
248
261
  Message?: string;
262
+ /**
263
+ * @internal
264
+ */
265
+ constructor(opts: __ExceptionOptionType<LimitExceededException, __BaseException>);
249
266
  }
250
267
  export declare enum MediaEncoding {
251
268
  FLAC = "flac",
@@ -442,10 +459,14 @@ export declare namespace MedicalTranscriptEvent {
442
459
  /**
443
460
  * <p>Service is currently unavailable. Try your request later.</p>
444
461
  */
445
- export interface ServiceUnavailableException extends __SmithyException, $MetadataBearer {
446
- name: "ServiceUnavailableException";
447
- $fault: "server";
462
+ export declare class ServiceUnavailableException extends __BaseException {
463
+ readonly name: "ServiceUnavailableException";
464
+ readonly $fault: "server";
448
465
  Message?: string;
466
+ /**
467
+ * @internal
468
+ */
469
+ constructor(opts: __ExceptionOptionType<ServiceUnavailableException, __BaseException>);
449
470
  }
450
471
  /**
451
472
  * <p>Represents the transcription result stream from Amazon Transcribe Medical to your application.</p>
@@ -2,3 +2,4 @@ export * from "./TranscribeStreaming";
2
2
  export * from "./TranscribeStreamingClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { TranscribeStreamingServiceException } from "./models/TranscribeStreamingServiceException";
@@ -0,0 +1,6 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+
3
+ export declare class TranscribeStreamingServiceException extends __ServiceException {
4
+
5
+ constructor(options: __ServiceExceptionOptions);
6
+ }
@@ -1,4 +1,5 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { TranscribeStreamingServiceException as __BaseException } from "./TranscribeStreamingServiceException";
2
3
 
3
4
  export interface Entity {
4
5
 
@@ -91,16 +92,20 @@ export declare namespace AudioStream {
91
92
  const filterSensitiveLog: (obj: AudioStream) => any;
92
93
  }
93
94
 
94
- export interface BadRequestException extends __SmithyException, $MetadataBearer {
95
- name: "BadRequestException";
96
- $fault: "client";
95
+ export declare class BadRequestException extends __BaseException {
96
+ readonly name: "BadRequestException";
97
+ readonly $fault: "client";
97
98
  Message?: string;
99
+
100
+ constructor(opts: __ExceptionOptionType<BadRequestException, __BaseException>);
98
101
  }
99
102
 
100
- export interface ConflictException extends __SmithyException, $MetadataBearer {
101
- name: "ConflictException";
102
- $fault: "client";
103
+ export declare class ConflictException extends __BaseException {
104
+ readonly name: "ConflictException";
105
+ readonly $fault: "client";
103
106
  Message?: string;
107
+
108
+ constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
104
109
  }
105
110
  export declare enum ContentIdentificationType {
106
111
  PII = "PII"
@@ -109,10 +114,12 @@ export declare enum ContentRedactionType {
109
114
  PII = "PII"
110
115
  }
111
116
 
112
- export interface InternalFailureException extends __SmithyException, $MetadataBearer {
113
- name: "InternalFailureException";
114
- $fault: "server";
117
+ export declare class InternalFailureException extends __BaseException {
118
+ readonly name: "InternalFailureException";
119
+ readonly $fault: "server";
115
120
  Message?: string;
121
+
122
+ constructor(opts: __ExceptionOptionType<InternalFailureException, __BaseException>);
116
123
  }
117
124
  export declare enum LanguageCode {
118
125
  DE_DE = "de-DE",
@@ -140,10 +147,12 @@ export declare namespace LanguageWithScore {
140
147
  const filterSensitiveLog: (obj: LanguageWithScore) => any;
141
148
  }
142
149
 
143
- export interface LimitExceededException extends __SmithyException, $MetadataBearer {
144
- name: "LimitExceededException";
145
- $fault: "client";
150
+ export declare class LimitExceededException extends __BaseException {
151
+ readonly name: "LimitExceededException";
152
+ readonly $fault: "client";
146
153
  Message?: string;
154
+
155
+ constructor(opts: __ExceptionOptionType<LimitExceededException, __BaseException>);
147
156
  }
148
157
  export declare enum MediaEncoding {
149
158
  FLAC = "flac",
@@ -240,10 +249,12 @@ export declare namespace MedicalTranscriptEvent {
240
249
  const filterSensitiveLog: (obj: MedicalTranscriptEvent) => any;
241
250
  }
242
251
 
243
- export interface ServiceUnavailableException extends __SmithyException, $MetadataBearer {
244
- name: "ServiceUnavailableException";
245
- $fault: "server";
252
+ export declare class ServiceUnavailableException extends __BaseException {
253
+ readonly name: "ServiceUnavailableException";
254
+ readonly $fault: "server";
246
255
  Message?: string;
256
+
257
+ constructor(opts: __ExceptionOptionType<ServiceUnavailableException, __BaseException>);
247
258
  }
248
259
 
249
260
  export declare type MedicalTranscriptResultStream = MedicalTranscriptResultStream.BadRequestExceptionMember | MedicalTranscriptResultStream.ConflictExceptionMember | MedicalTranscriptResultStream.InternalFailureExceptionMember | MedicalTranscriptResultStream.LimitExceededExceptionMember | MedicalTranscriptResultStream.ServiceUnavailableExceptionMember | MedicalTranscriptResultStream.TranscriptEventMember | MedicalTranscriptResultStream.$UnknownMember;