@aws-sdk/client-comprehendmedical 3.504.0 → 3.509.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/dist-cjs/index.js CHANGED
@@ -692,7 +692,7 @@ var se_StopSNOMEDCTInferenceJobCommand = /* @__PURE__ */ __name(async (input, co
692
692
  }, "se_StopSNOMEDCTInferenceJobCommand");
693
693
  var de_DescribeEntitiesDetectionV2JobCommand = /* @__PURE__ */ __name(async (output, context) => {
694
694
  if (output.statusCode >= 300) {
695
- return de_DescribeEntitiesDetectionV2JobCommandError(output, context);
695
+ return de_CommandError(output, context);
696
696
  }
697
697
  const data = await parseBody(output.body, context);
698
698
  let contents = {};
@@ -703,37 +703,9 @@ var de_DescribeEntitiesDetectionV2JobCommand = /* @__PURE__ */ __name(async (out
703
703
  };
704
704
  return response;
705
705
  }, "de_DescribeEntitiesDetectionV2JobCommand");
706
- var de_DescribeEntitiesDetectionV2JobCommandError = /* @__PURE__ */ __name(async (output, context) => {
707
- const parsedOutput = {
708
- ...output,
709
- body: await parseErrorBody(output.body, context)
710
- };
711
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
712
- switch (errorCode) {
713
- case "InternalServerException":
714
- case "com.amazonaws.comprehendmedical#InternalServerException":
715
- throw await de_InternalServerExceptionRes(parsedOutput, context);
716
- case "InvalidRequestException":
717
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
718
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
719
- case "ResourceNotFoundException":
720
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
721
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
722
- case "TooManyRequestsException":
723
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
724
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
725
- default:
726
- const parsedBody = parsedOutput.body;
727
- return throwDefaultError({
728
- output,
729
- parsedBody,
730
- errorCode
731
- });
732
- }
733
- }, "de_DescribeEntitiesDetectionV2JobCommandError");
734
706
  var de_DescribeICD10CMInferenceJobCommand = /* @__PURE__ */ __name(async (output, context) => {
735
707
  if (output.statusCode >= 300) {
736
- return de_DescribeICD10CMInferenceJobCommandError(output, context);
708
+ return de_CommandError(output, context);
737
709
  }
738
710
  const data = await parseBody(output.body, context);
739
711
  let contents = {};
@@ -744,37 +716,9 @@ var de_DescribeICD10CMInferenceJobCommand = /* @__PURE__ */ __name(async (output
744
716
  };
745
717
  return response;
746
718
  }, "de_DescribeICD10CMInferenceJobCommand");
747
- var de_DescribeICD10CMInferenceJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
748
- const parsedOutput = {
749
- ...output,
750
- body: await parseErrorBody(output.body, context)
751
- };
752
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
753
- switch (errorCode) {
754
- case "InternalServerException":
755
- case "com.amazonaws.comprehendmedical#InternalServerException":
756
- throw await de_InternalServerExceptionRes(parsedOutput, context);
757
- case "InvalidRequestException":
758
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
759
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
760
- case "ResourceNotFoundException":
761
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
762
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
763
- case "TooManyRequestsException":
764
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
765
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
766
- default:
767
- const parsedBody = parsedOutput.body;
768
- return throwDefaultError({
769
- output,
770
- parsedBody,
771
- errorCode
772
- });
773
- }
774
- }, "de_DescribeICD10CMInferenceJobCommandError");
775
719
  var de_DescribePHIDetectionJobCommand = /* @__PURE__ */ __name(async (output, context) => {
776
720
  if (output.statusCode >= 300) {
777
- return de_DescribePHIDetectionJobCommandError(output, context);
721
+ return de_CommandError(output, context);
778
722
  }
779
723
  const data = await parseBody(output.body, context);
780
724
  let contents = {};
@@ -785,37 +729,9 @@ var de_DescribePHIDetectionJobCommand = /* @__PURE__ */ __name(async (output, co
785
729
  };
786
730
  return response;
787
731
  }, "de_DescribePHIDetectionJobCommand");
788
- var de_DescribePHIDetectionJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
789
- const parsedOutput = {
790
- ...output,
791
- body: await parseErrorBody(output.body, context)
792
- };
793
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
794
- switch (errorCode) {
795
- case "InternalServerException":
796
- case "com.amazonaws.comprehendmedical#InternalServerException":
797
- throw await de_InternalServerExceptionRes(parsedOutput, context);
798
- case "InvalidRequestException":
799
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
800
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
801
- case "ResourceNotFoundException":
802
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
803
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
804
- case "TooManyRequestsException":
805
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
806
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
807
- default:
808
- const parsedBody = parsedOutput.body;
809
- return throwDefaultError({
810
- output,
811
- parsedBody,
812
- errorCode
813
- });
814
- }
815
- }, "de_DescribePHIDetectionJobCommandError");
816
732
  var de_DescribeRxNormInferenceJobCommand = /* @__PURE__ */ __name(async (output, context) => {
817
733
  if (output.statusCode >= 300) {
818
- return de_DescribeRxNormInferenceJobCommandError(output, context);
734
+ return de_CommandError(output, context);
819
735
  }
820
736
  const data = await parseBody(output.body, context);
821
737
  let contents = {};
@@ -826,37 +742,9 @@ var de_DescribeRxNormInferenceJobCommand = /* @__PURE__ */ __name(async (output,
826
742
  };
827
743
  return response;
828
744
  }, "de_DescribeRxNormInferenceJobCommand");
829
- var de_DescribeRxNormInferenceJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
830
- const parsedOutput = {
831
- ...output,
832
- body: await parseErrorBody(output.body, context)
833
- };
834
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
835
- switch (errorCode) {
836
- case "InternalServerException":
837
- case "com.amazonaws.comprehendmedical#InternalServerException":
838
- throw await de_InternalServerExceptionRes(parsedOutput, context);
839
- case "InvalidRequestException":
840
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
841
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
842
- case "ResourceNotFoundException":
843
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
844
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
845
- case "TooManyRequestsException":
846
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
847
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
848
- default:
849
- const parsedBody = parsedOutput.body;
850
- return throwDefaultError({
851
- output,
852
- parsedBody,
853
- errorCode
854
- });
855
- }
856
- }, "de_DescribeRxNormInferenceJobCommandError");
857
745
  var de_DescribeSNOMEDCTInferenceJobCommand = /* @__PURE__ */ __name(async (output, context) => {
858
746
  if (output.statusCode >= 300) {
859
- return de_DescribeSNOMEDCTInferenceJobCommandError(output, context);
747
+ return de_CommandError(output, context);
860
748
  }
861
749
  const data = await parseBody(output.body, context);
862
750
  let contents = {};
@@ -867,37 +755,9 @@ var de_DescribeSNOMEDCTInferenceJobCommand = /* @__PURE__ */ __name(async (outpu
867
755
  };
868
756
  return response;
869
757
  }, "de_DescribeSNOMEDCTInferenceJobCommand");
870
- var de_DescribeSNOMEDCTInferenceJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
871
- const parsedOutput = {
872
- ...output,
873
- body: await parseErrorBody(output.body, context)
874
- };
875
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
876
- switch (errorCode) {
877
- case "InternalServerException":
878
- case "com.amazonaws.comprehendmedical#InternalServerException":
879
- throw await de_InternalServerExceptionRes(parsedOutput, context);
880
- case "InvalidRequestException":
881
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
882
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
883
- case "ResourceNotFoundException":
884
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
885
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
886
- case "TooManyRequestsException":
887
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
888
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
889
- default:
890
- const parsedBody = parsedOutput.body;
891
- return throwDefaultError({
892
- output,
893
- parsedBody,
894
- errorCode
895
- });
896
- }
897
- }, "de_DescribeSNOMEDCTInferenceJobCommandError");
898
758
  var de_DetectEntitiesCommand = /* @__PURE__ */ __name(async (output, context) => {
899
759
  if (output.statusCode >= 300) {
900
- return de_DetectEntitiesCommandError(output, context);
760
+ return de_CommandError(output, context);
901
761
  }
902
762
  const data = await parseBody(output.body, context);
903
763
  let contents = {};
@@ -908,43 +768,9 @@ var de_DetectEntitiesCommand = /* @__PURE__ */ __name(async (output, context) =>
908
768
  };
909
769
  return response;
910
770
  }, "de_DetectEntitiesCommand");
911
- var de_DetectEntitiesCommandError = /* @__PURE__ */ __name(async (output, context) => {
912
- const parsedOutput = {
913
- ...output,
914
- body: await parseErrorBody(output.body, context)
915
- };
916
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
917
- switch (errorCode) {
918
- case "InternalServerException":
919
- case "com.amazonaws.comprehendmedical#InternalServerException":
920
- throw await de_InternalServerExceptionRes(parsedOutput, context);
921
- case "InvalidEncodingException":
922
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
923
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
924
- case "InvalidRequestException":
925
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
926
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
927
- case "ServiceUnavailableException":
928
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
929
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
930
- case "TextSizeLimitExceededException":
931
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
932
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
933
- case "TooManyRequestsException":
934
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
935
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
936
- default:
937
- const parsedBody = parsedOutput.body;
938
- return throwDefaultError({
939
- output,
940
- parsedBody,
941
- errorCode
942
- });
943
- }
944
- }, "de_DetectEntitiesCommandError");
945
771
  var de_DetectEntitiesV2Command = /* @__PURE__ */ __name(async (output, context) => {
946
772
  if (output.statusCode >= 300) {
947
- return de_DetectEntitiesV2CommandError(output, context);
773
+ return de_CommandError(output, context);
948
774
  }
949
775
  const data = await parseBody(output.body, context);
950
776
  let contents = {};
@@ -955,43 +781,9 @@ var de_DetectEntitiesV2Command = /* @__PURE__ */ __name(async (output, context)
955
781
  };
956
782
  return response;
957
783
  }, "de_DetectEntitiesV2Command");
958
- var de_DetectEntitiesV2CommandError = /* @__PURE__ */ __name(async (output, context) => {
959
- const parsedOutput = {
960
- ...output,
961
- body: await parseErrorBody(output.body, context)
962
- };
963
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
964
- switch (errorCode) {
965
- case "InternalServerException":
966
- case "com.amazonaws.comprehendmedical#InternalServerException":
967
- throw await de_InternalServerExceptionRes(parsedOutput, context);
968
- case "InvalidEncodingException":
969
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
970
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
971
- case "InvalidRequestException":
972
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
973
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
974
- case "ServiceUnavailableException":
975
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
976
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
977
- case "TextSizeLimitExceededException":
978
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
979
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
980
- case "TooManyRequestsException":
981
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
982
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
983
- default:
984
- const parsedBody = parsedOutput.body;
985
- return throwDefaultError({
986
- output,
987
- parsedBody,
988
- errorCode
989
- });
990
- }
991
- }, "de_DetectEntitiesV2CommandError");
992
784
  var de_DetectPHICommand = /* @__PURE__ */ __name(async (output, context) => {
993
785
  if (output.statusCode >= 300) {
994
- return de_DetectPHICommandError(output, context);
786
+ return de_CommandError(output, context);
995
787
  }
996
788
  const data = await parseBody(output.body, context);
997
789
  let contents = {};
@@ -1002,43 +794,9 @@ var de_DetectPHICommand = /* @__PURE__ */ __name(async (output, context) => {
1002
794
  };
1003
795
  return response;
1004
796
  }, "de_DetectPHICommand");
1005
- var de_DetectPHICommandError = /* @__PURE__ */ __name(async (output, context) => {
1006
- const parsedOutput = {
1007
- ...output,
1008
- body: await parseErrorBody(output.body, context)
1009
- };
1010
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1011
- switch (errorCode) {
1012
- case "InternalServerException":
1013
- case "com.amazonaws.comprehendmedical#InternalServerException":
1014
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1015
- case "InvalidEncodingException":
1016
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
1017
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
1018
- case "InvalidRequestException":
1019
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1020
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1021
- case "ServiceUnavailableException":
1022
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
1023
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1024
- case "TextSizeLimitExceededException":
1025
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
1026
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
1027
- case "TooManyRequestsException":
1028
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1029
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1030
- default:
1031
- const parsedBody = parsedOutput.body;
1032
- return throwDefaultError({
1033
- output,
1034
- parsedBody,
1035
- errorCode
1036
- });
1037
- }
1038
- }, "de_DetectPHICommandError");
1039
797
  var de_InferICD10CMCommand = /* @__PURE__ */ __name(async (output, context) => {
1040
798
  if (output.statusCode >= 300) {
1041
- return de_InferICD10CMCommandError(output, context);
799
+ return de_CommandError(output, context);
1042
800
  }
1043
801
  const data = await parseBody(output.body, context);
1044
802
  let contents = {};
@@ -1049,43 +807,9 @@ var de_InferICD10CMCommand = /* @__PURE__ */ __name(async (output, context) => {
1049
807
  };
1050
808
  return response;
1051
809
  }, "de_InferICD10CMCommand");
1052
- var de_InferICD10CMCommandError = /* @__PURE__ */ __name(async (output, context) => {
1053
- const parsedOutput = {
1054
- ...output,
1055
- body: await parseErrorBody(output.body, context)
1056
- };
1057
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1058
- switch (errorCode) {
1059
- case "InternalServerException":
1060
- case "com.amazonaws.comprehendmedical#InternalServerException":
1061
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1062
- case "InvalidEncodingException":
1063
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
1064
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
1065
- case "InvalidRequestException":
1066
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1067
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1068
- case "ServiceUnavailableException":
1069
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
1070
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1071
- case "TextSizeLimitExceededException":
1072
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
1073
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
1074
- case "TooManyRequestsException":
1075
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1076
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1077
- default:
1078
- const parsedBody = parsedOutput.body;
1079
- return throwDefaultError({
1080
- output,
1081
- parsedBody,
1082
- errorCode
1083
- });
1084
- }
1085
- }, "de_InferICD10CMCommandError");
1086
810
  var de_InferRxNormCommand = /* @__PURE__ */ __name(async (output, context) => {
1087
811
  if (output.statusCode >= 300) {
1088
- return de_InferRxNormCommandError(output, context);
812
+ return de_CommandError(output, context);
1089
813
  }
1090
814
  const data = await parseBody(output.body, context);
1091
815
  let contents = {};
@@ -1096,43 +820,9 @@ var de_InferRxNormCommand = /* @__PURE__ */ __name(async (output, context) => {
1096
820
  };
1097
821
  return response;
1098
822
  }, "de_InferRxNormCommand");
1099
- var de_InferRxNormCommandError = /* @__PURE__ */ __name(async (output, context) => {
1100
- const parsedOutput = {
1101
- ...output,
1102
- body: await parseErrorBody(output.body, context)
1103
- };
1104
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1105
- switch (errorCode) {
1106
- case "InternalServerException":
1107
- case "com.amazonaws.comprehendmedical#InternalServerException":
1108
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1109
- case "InvalidEncodingException":
1110
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
1111
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
1112
- case "InvalidRequestException":
1113
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1114
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1115
- case "ServiceUnavailableException":
1116
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
1117
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1118
- case "TextSizeLimitExceededException":
1119
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
1120
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
1121
- case "TooManyRequestsException":
1122
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1123
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1124
- default:
1125
- const parsedBody = parsedOutput.body;
1126
- return throwDefaultError({
1127
- output,
1128
- parsedBody,
1129
- errorCode
1130
- });
1131
- }
1132
- }, "de_InferRxNormCommandError");
1133
823
  var de_InferSNOMEDCTCommand = /* @__PURE__ */ __name(async (output, context) => {
1134
824
  if (output.statusCode >= 300) {
1135
- return de_InferSNOMEDCTCommandError(output, context);
825
+ return de_CommandError(output, context);
1136
826
  }
1137
827
  const data = await parseBody(output.body, context);
1138
828
  let contents = {};
@@ -1143,43 +833,9 @@ var de_InferSNOMEDCTCommand = /* @__PURE__ */ __name(async (output, context) =>
1143
833
  };
1144
834
  return response;
1145
835
  }, "de_InferSNOMEDCTCommand");
1146
- var de_InferSNOMEDCTCommandError = /* @__PURE__ */ __name(async (output, context) => {
1147
- const parsedOutput = {
1148
- ...output,
1149
- body: await parseErrorBody(output.body, context)
1150
- };
1151
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1152
- switch (errorCode) {
1153
- case "InternalServerException":
1154
- case "com.amazonaws.comprehendmedical#InternalServerException":
1155
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1156
- case "InvalidEncodingException":
1157
- case "com.amazonaws.comprehendmedical#InvalidEncodingException":
1158
- throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
1159
- case "InvalidRequestException":
1160
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1161
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1162
- case "ServiceUnavailableException":
1163
- case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
1164
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1165
- case "TextSizeLimitExceededException":
1166
- case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
1167
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
1168
- case "TooManyRequestsException":
1169
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1170
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1171
- default:
1172
- const parsedBody = parsedOutput.body;
1173
- return throwDefaultError({
1174
- output,
1175
- parsedBody,
1176
- errorCode
1177
- });
1178
- }
1179
- }, "de_InferSNOMEDCTCommandError");
1180
836
  var de_ListEntitiesDetectionV2JobsCommand = /* @__PURE__ */ __name(async (output, context) => {
1181
837
  if (output.statusCode >= 300) {
1182
- return de_ListEntitiesDetectionV2JobsCommandError(output, context);
838
+ return de_CommandError(output, context);
1183
839
  }
1184
840
  const data = await parseBody(output.body, context);
1185
841
  let contents = {};
@@ -1190,37 +846,9 @@ var de_ListEntitiesDetectionV2JobsCommand = /* @__PURE__ */ __name(async (output
1190
846
  };
1191
847
  return response;
1192
848
  }, "de_ListEntitiesDetectionV2JobsCommand");
1193
- var de_ListEntitiesDetectionV2JobsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1194
- const parsedOutput = {
1195
- ...output,
1196
- body: await parseErrorBody(output.body, context)
1197
- };
1198
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1199
- switch (errorCode) {
1200
- case "InternalServerException":
1201
- case "com.amazonaws.comprehendmedical#InternalServerException":
1202
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1203
- case "InvalidRequestException":
1204
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1205
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1206
- case "TooManyRequestsException":
1207
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1208
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1209
- case "ValidationException":
1210
- case "com.amazonaws.comprehendmedical#ValidationException":
1211
- throw await de_ValidationExceptionRes(parsedOutput, context);
1212
- default:
1213
- const parsedBody = parsedOutput.body;
1214
- return throwDefaultError({
1215
- output,
1216
- parsedBody,
1217
- errorCode
1218
- });
1219
- }
1220
- }, "de_ListEntitiesDetectionV2JobsCommandError");
1221
849
  var de_ListICD10CMInferenceJobsCommand = /* @__PURE__ */ __name(async (output, context) => {
1222
850
  if (output.statusCode >= 300) {
1223
- return de_ListICD10CMInferenceJobsCommandError(output, context);
851
+ return de_CommandError(output, context);
1224
852
  }
1225
853
  const data = await parseBody(output.body, context);
1226
854
  let contents = {};
@@ -1231,37 +859,9 @@ var de_ListICD10CMInferenceJobsCommand = /* @__PURE__ */ __name(async (output, c
1231
859
  };
1232
860
  return response;
1233
861
  }, "de_ListICD10CMInferenceJobsCommand");
1234
- var de_ListICD10CMInferenceJobsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1235
- const parsedOutput = {
1236
- ...output,
1237
- body: await parseErrorBody(output.body, context)
1238
- };
1239
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1240
- switch (errorCode) {
1241
- case "InternalServerException":
1242
- case "com.amazonaws.comprehendmedical#InternalServerException":
1243
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1244
- case "InvalidRequestException":
1245
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1246
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1247
- case "TooManyRequestsException":
1248
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1249
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1250
- case "ValidationException":
1251
- case "com.amazonaws.comprehendmedical#ValidationException":
1252
- throw await de_ValidationExceptionRes(parsedOutput, context);
1253
- default:
1254
- const parsedBody = parsedOutput.body;
1255
- return throwDefaultError({
1256
- output,
1257
- parsedBody,
1258
- errorCode
1259
- });
1260
- }
1261
- }, "de_ListICD10CMInferenceJobsCommandError");
1262
862
  var de_ListPHIDetectionJobsCommand = /* @__PURE__ */ __name(async (output, context) => {
1263
863
  if (output.statusCode >= 300) {
1264
- return de_ListPHIDetectionJobsCommandError(output, context);
864
+ return de_CommandError(output, context);
1265
865
  }
1266
866
  const data = await parseBody(output.body, context);
1267
867
  let contents = {};
@@ -1272,119 +872,35 @@ var de_ListPHIDetectionJobsCommand = /* @__PURE__ */ __name(async (output, conte
1272
872
  };
1273
873
  return response;
1274
874
  }, "de_ListPHIDetectionJobsCommand");
1275
- var de_ListPHIDetectionJobsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1276
- const parsedOutput = {
1277
- ...output,
1278
- body: await parseErrorBody(output.body, context)
1279
- };
1280
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1281
- switch (errorCode) {
1282
- case "InternalServerException":
1283
- case "com.amazonaws.comprehendmedical#InternalServerException":
1284
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1285
- case "InvalidRequestException":
1286
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1287
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1288
- case "TooManyRequestsException":
1289
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1290
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1291
- case "ValidationException":
1292
- case "com.amazonaws.comprehendmedical#ValidationException":
1293
- throw await de_ValidationExceptionRes(parsedOutput, context);
1294
- default:
1295
- const parsedBody = parsedOutput.body;
1296
- return throwDefaultError({
1297
- output,
1298
- parsedBody,
1299
- errorCode
1300
- });
1301
- }
1302
- }, "de_ListPHIDetectionJobsCommandError");
1303
875
  var de_ListRxNormInferenceJobsCommand = /* @__PURE__ */ __name(async (output, context) => {
1304
- if (output.statusCode >= 300) {
1305
- return de_ListRxNormInferenceJobsCommandError(output, context);
1306
- }
1307
- const data = await parseBody(output.body, context);
1308
- let contents = {};
1309
- contents = de_ListRxNormInferenceJobsResponse(data, context);
1310
- const response = {
1311
- $metadata: deserializeMetadata(output),
1312
- ...contents
1313
- };
1314
- return response;
1315
- }, "de_ListRxNormInferenceJobsCommand");
1316
- var de_ListRxNormInferenceJobsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1317
- const parsedOutput = {
1318
- ...output,
1319
- body: await parseErrorBody(output.body, context)
1320
- };
1321
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1322
- switch (errorCode) {
1323
- case "InternalServerException":
1324
- case "com.amazonaws.comprehendmedical#InternalServerException":
1325
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1326
- case "InvalidRequestException":
1327
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1328
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1329
- case "TooManyRequestsException":
1330
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1331
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1332
- case "ValidationException":
1333
- case "com.amazonaws.comprehendmedical#ValidationException":
1334
- throw await de_ValidationExceptionRes(parsedOutput, context);
1335
- default:
1336
- const parsedBody = parsedOutput.body;
1337
- return throwDefaultError({
1338
- output,
1339
- parsedBody,
1340
- errorCode
1341
- });
1342
- }
1343
- }, "de_ListRxNormInferenceJobsCommandError");
1344
- var de_ListSNOMEDCTInferenceJobsCommand = /* @__PURE__ */ __name(async (output, context) => {
1345
- if (output.statusCode >= 300) {
1346
- return de_ListSNOMEDCTInferenceJobsCommandError(output, context);
1347
- }
1348
- const data = await parseBody(output.body, context);
1349
- let contents = {};
1350
- contents = de_ListSNOMEDCTInferenceJobsResponse(data, context);
1351
- const response = {
1352
- $metadata: deserializeMetadata(output),
1353
- ...contents
1354
- };
1355
- return response;
1356
- }, "de_ListSNOMEDCTInferenceJobsCommand");
1357
- var de_ListSNOMEDCTInferenceJobsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1358
- const parsedOutput = {
1359
- ...output,
1360
- body: await parseErrorBody(output.body, context)
1361
- };
1362
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1363
- switch (errorCode) {
1364
- case "InternalServerException":
1365
- case "com.amazonaws.comprehendmedical#InternalServerException":
1366
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1367
- case "InvalidRequestException":
1368
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1369
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1370
- case "TooManyRequestsException":
1371
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1372
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1373
- case "ValidationException":
1374
- case "com.amazonaws.comprehendmedical#ValidationException":
1375
- throw await de_ValidationExceptionRes(parsedOutput, context);
1376
- default:
1377
- const parsedBody = parsedOutput.body;
1378
- return throwDefaultError({
1379
- output,
1380
- parsedBody,
1381
- errorCode
1382
- });
876
+ if (output.statusCode >= 300) {
877
+ return de_CommandError(output, context);
878
+ }
879
+ const data = await parseBody(output.body, context);
880
+ let contents = {};
881
+ contents = de_ListRxNormInferenceJobsResponse(data, context);
882
+ const response = {
883
+ $metadata: deserializeMetadata(output),
884
+ ...contents
885
+ };
886
+ return response;
887
+ }, "de_ListRxNormInferenceJobsCommand");
888
+ var de_ListSNOMEDCTInferenceJobsCommand = /* @__PURE__ */ __name(async (output, context) => {
889
+ if (output.statusCode >= 300) {
890
+ return de_CommandError(output, context);
1383
891
  }
1384
- }, "de_ListSNOMEDCTInferenceJobsCommandError");
892
+ const data = await parseBody(output.body, context);
893
+ let contents = {};
894
+ contents = de_ListSNOMEDCTInferenceJobsResponse(data, context);
895
+ const response = {
896
+ $metadata: deserializeMetadata(output),
897
+ ...contents
898
+ };
899
+ return response;
900
+ }, "de_ListSNOMEDCTInferenceJobsCommand");
1385
901
  var de_StartEntitiesDetectionV2JobCommand = /* @__PURE__ */ __name(async (output, context) => {
1386
902
  if (output.statusCode >= 300) {
1387
- return de_StartEntitiesDetectionV2JobCommandError(output, context);
903
+ return de_CommandError(output, context);
1388
904
  }
1389
905
  const data = await parseBody(output.body, context);
1390
906
  let contents = {};
@@ -1395,37 +911,9 @@ var de_StartEntitiesDetectionV2JobCommand = /* @__PURE__ */ __name(async (output
1395
911
  };
1396
912
  return response;
1397
913
  }, "de_StartEntitiesDetectionV2JobCommand");
1398
- var de_StartEntitiesDetectionV2JobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1399
- const parsedOutput = {
1400
- ...output,
1401
- body: await parseErrorBody(output.body, context)
1402
- };
1403
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1404
- switch (errorCode) {
1405
- case "InternalServerException":
1406
- case "com.amazonaws.comprehendmedical#InternalServerException":
1407
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1408
- case "InvalidRequestException":
1409
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1410
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1411
- case "ResourceNotFoundException":
1412
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1413
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1414
- case "TooManyRequestsException":
1415
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1416
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1417
- default:
1418
- const parsedBody = parsedOutput.body;
1419
- return throwDefaultError({
1420
- output,
1421
- parsedBody,
1422
- errorCode
1423
- });
1424
- }
1425
- }, "de_StartEntitiesDetectionV2JobCommandError");
1426
914
  var de_StartICD10CMInferenceJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1427
915
  if (output.statusCode >= 300) {
1428
- return de_StartICD10CMInferenceJobCommandError(output, context);
916
+ return de_CommandError(output, context);
1429
917
  }
1430
918
  const data = await parseBody(output.body, context);
1431
919
  let contents = {};
@@ -1436,37 +924,9 @@ var de_StartICD10CMInferenceJobCommand = /* @__PURE__ */ __name(async (output, c
1436
924
  };
1437
925
  return response;
1438
926
  }, "de_StartICD10CMInferenceJobCommand");
1439
- var de_StartICD10CMInferenceJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1440
- const parsedOutput = {
1441
- ...output,
1442
- body: await parseErrorBody(output.body, context)
1443
- };
1444
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1445
- switch (errorCode) {
1446
- case "InternalServerException":
1447
- case "com.amazonaws.comprehendmedical#InternalServerException":
1448
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1449
- case "InvalidRequestException":
1450
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1451
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1452
- case "ResourceNotFoundException":
1453
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1454
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1455
- case "TooManyRequestsException":
1456
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1457
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1458
- default:
1459
- const parsedBody = parsedOutput.body;
1460
- return throwDefaultError({
1461
- output,
1462
- parsedBody,
1463
- errorCode
1464
- });
1465
- }
1466
- }, "de_StartICD10CMInferenceJobCommandError");
1467
927
  var de_StartPHIDetectionJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1468
928
  if (output.statusCode >= 300) {
1469
- return de_StartPHIDetectionJobCommandError(output, context);
929
+ return de_CommandError(output, context);
1470
930
  }
1471
931
  const data = await parseBody(output.body, context);
1472
932
  let contents = {};
@@ -1477,37 +937,9 @@ var de_StartPHIDetectionJobCommand = /* @__PURE__ */ __name(async (output, conte
1477
937
  };
1478
938
  return response;
1479
939
  }, "de_StartPHIDetectionJobCommand");
1480
- var de_StartPHIDetectionJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1481
- const parsedOutput = {
1482
- ...output,
1483
- body: await parseErrorBody(output.body, context)
1484
- };
1485
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1486
- switch (errorCode) {
1487
- case "InternalServerException":
1488
- case "com.amazonaws.comprehendmedical#InternalServerException":
1489
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1490
- case "InvalidRequestException":
1491
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1492
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1493
- case "ResourceNotFoundException":
1494
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1495
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1496
- case "TooManyRequestsException":
1497
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1498
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1499
- default:
1500
- const parsedBody = parsedOutput.body;
1501
- return throwDefaultError({
1502
- output,
1503
- parsedBody,
1504
- errorCode
1505
- });
1506
- }
1507
- }, "de_StartPHIDetectionJobCommandError");
1508
940
  var de_StartRxNormInferenceJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1509
941
  if (output.statusCode >= 300) {
1510
- return de_StartRxNormInferenceJobCommandError(output, context);
942
+ return de_CommandError(output, context);
1511
943
  }
1512
944
  const data = await parseBody(output.body, context);
1513
945
  let contents = {};
@@ -1518,37 +950,9 @@ var de_StartRxNormInferenceJobCommand = /* @__PURE__ */ __name(async (output, co
1518
950
  };
1519
951
  return response;
1520
952
  }, "de_StartRxNormInferenceJobCommand");
1521
- var de_StartRxNormInferenceJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1522
- const parsedOutput = {
1523
- ...output,
1524
- body: await parseErrorBody(output.body, context)
1525
- };
1526
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1527
- switch (errorCode) {
1528
- case "InternalServerException":
1529
- case "com.amazonaws.comprehendmedical#InternalServerException":
1530
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1531
- case "InvalidRequestException":
1532
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1533
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1534
- case "ResourceNotFoundException":
1535
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1536
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1537
- case "TooManyRequestsException":
1538
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1539
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1540
- default:
1541
- const parsedBody = parsedOutput.body;
1542
- return throwDefaultError({
1543
- output,
1544
- parsedBody,
1545
- errorCode
1546
- });
1547
- }
1548
- }, "de_StartRxNormInferenceJobCommandError");
1549
953
  var de_StartSNOMEDCTInferenceJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1550
954
  if (output.statusCode >= 300) {
1551
- return de_StartSNOMEDCTInferenceJobCommandError(output, context);
955
+ return de_CommandError(output, context);
1552
956
  }
1553
957
  const data = await parseBody(output.body, context);
1554
958
  let contents = {};
@@ -1559,37 +963,9 @@ var de_StartSNOMEDCTInferenceJobCommand = /* @__PURE__ */ __name(async (output,
1559
963
  };
1560
964
  return response;
1561
965
  }, "de_StartSNOMEDCTInferenceJobCommand");
1562
- var de_StartSNOMEDCTInferenceJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1563
- const parsedOutput = {
1564
- ...output,
1565
- body: await parseErrorBody(output.body, context)
1566
- };
1567
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1568
- switch (errorCode) {
1569
- case "InternalServerException":
1570
- case "com.amazonaws.comprehendmedical#InternalServerException":
1571
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1572
- case "InvalidRequestException":
1573
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1574
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1575
- case "ResourceNotFoundException":
1576
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1577
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1578
- case "TooManyRequestsException":
1579
- case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1580
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1581
- default:
1582
- const parsedBody = parsedOutput.body;
1583
- return throwDefaultError({
1584
- output,
1585
- parsedBody,
1586
- errorCode
1587
- });
1588
- }
1589
- }, "de_StartSNOMEDCTInferenceJobCommandError");
1590
966
  var de_StopEntitiesDetectionV2JobCommand = /* @__PURE__ */ __name(async (output, context) => {
1591
967
  if (output.statusCode >= 300) {
1592
- return de_StopEntitiesDetectionV2JobCommandError(output, context);
968
+ return de_CommandError(output, context);
1593
969
  }
1594
970
  const data = await parseBody(output.body, context);
1595
971
  let contents = {};
@@ -1600,34 +976,9 @@ var de_StopEntitiesDetectionV2JobCommand = /* @__PURE__ */ __name(async (output,
1600
976
  };
1601
977
  return response;
1602
978
  }, "de_StopEntitiesDetectionV2JobCommand");
1603
- var de_StopEntitiesDetectionV2JobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1604
- const parsedOutput = {
1605
- ...output,
1606
- body: await parseErrorBody(output.body, context)
1607
- };
1608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1609
- switch (errorCode) {
1610
- case "InternalServerException":
1611
- case "com.amazonaws.comprehendmedical#InternalServerException":
1612
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1613
- case "InvalidRequestException":
1614
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1615
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1616
- case "ResourceNotFoundException":
1617
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1618
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1619
- default:
1620
- const parsedBody = parsedOutput.body;
1621
- return throwDefaultError({
1622
- output,
1623
- parsedBody,
1624
- errorCode
1625
- });
1626
- }
1627
- }, "de_StopEntitiesDetectionV2JobCommandError");
1628
979
  var de_StopICD10CMInferenceJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1629
980
  if (output.statusCode >= 300) {
1630
- return de_StopICD10CMInferenceJobCommandError(output, context);
981
+ return de_CommandError(output, context);
1631
982
  }
1632
983
  const data = await parseBody(output.body, context);
1633
984
  let contents = {};
@@ -1638,34 +989,9 @@ var de_StopICD10CMInferenceJobCommand = /* @__PURE__ */ __name(async (output, co
1638
989
  };
1639
990
  return response;
1640
991
  }, "de_StopICD10CMInferenceJobCommand");
1641
- var de_StopICD10CMInferenceJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1642
- const parsedOutput = {
1643
- ...output,
1644
- body: await parseErrorBody(output.body, context)
1645
- };
1646
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1647
- switch (errorCode) {
1648
- case "InternalServerException":
1649
- case "com.amazonaws.comprehendmedical#InternalServerException":
1650
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1651
- case "InvalidRequestException":
1652
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1653
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1654
- case "ResourceNotFoundException":
1655
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1656
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1657
- default:
1658
- const parsedBody = parsedOutput.body;
1659
- return throwDefaultError({
1660
- output,
1661
- parsedBody,
1662
- errorCode
1663
- });
1664
- }
1665
- }, "de_StopICD10CMInferenceJobCommandError");
1666
992
  var de_StopPHIDetectionJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1667
993
  if (output.statusCode >= 300) {
1668
- return de_StopPHIDetectionJobCommandError(output, context);
994
+ return de_CommandError(output, context);
1669
995
  }
1670
996
  const data = await parseBody(output.body, context);
1671
997
  let contents = {};
@@ -1676,34 +1002,9 @@ var de_StopPHIDetectionJobCommand = /* @__PURE__ */ __name(async (output, contex
1676
1002
  };
1677
1003
  return response;
1678
1004
  }, "de_StopPHIDetectionJobCommand");
1679
- var de_StopPHIDetectionJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1680
- const parsedOutput = {
1681
- ...output,
1682
- body: await parseErrorBody(output.body, context)
1683
- };
1684
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1685
- switch (errorCode) {
1686
- case "InternalServerException":
1687
- case "com.amazonaws.comprehendmedical#InternalServerException":
1688
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1689
- case "InvalidRequestException":
1690
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1691
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1692
- case "ResourceNotFoundException":
1693
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1694
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1695
- default:
1696
- const parsedBody = parsedOutput.body;
1697
- return throwDefaultError({
1698
- output,
1699
- parsedBody,
1700
- errorCode
1701
- });
1702
- }
1703
- }, "de_StopPHIDetectionJobCommandError");
1704
1005
  var de_StopRxNormInferenceJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1705
1006
  if (output.statusCode >= 300) {
1706
- return de_StopRxNormInferenceJobCommandError(output, context);
1007
+ return de_CommandError(output, context);
1707
1008
  }
1708
1009
  const data = await parseBody(output.body, context);
1709
1010
  let contents = {};
@@ -1714,34 +1015,9 @@ var de_StopRxNormInferenceJobCommand = /* @__PURE__ */ __name(async (output, con
1714
1015
  };
1715
1016
  return response;
1716
1017
  }, "de_StopRxNormInferenceJobCommand");
1717
- var de_StopRxNormInferenceJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1718
- const parsedOutput = {
1719
- ...output,
1720
- body: await parseErrorBody(output.body, context)
1721
- };
1722
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1723
- switch (errorCode) {
1724
- case "InternalServerException":
1725
- case "com.amazonaws.comprehendmedical#InternalServerException":
1726
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1727
- case "InvalidRequestException":
1728
- case "com.amazonaws.comprehendmedical#InvalidRequestException":
1729
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1730
- case "ResourceNotFoundException":
1731
- case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
1732
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1733
- default:
1734
- const parsedBody = parsedOutput.body;
1735
- return throwDefaultError({
1736
- output,
1737
- parsedBody,
1738
- errorCode
1739
- });
1740
- }
1741
- }, "de_StopRxNormInferenceJobCommandError");
1742
1018
  var de_StopSNOMEDCTInferenceJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1743
1019
  if (output.statusCode >= 300) {
1744
- return de_StopSNOMEDCTInferenceJobCommandError(output, context);
1020
+ return de_CommandError(output, context);
1745
1021
  }
1746
1022
  const data = await parseBody(output.body, context);
1747
1023
  let contents = {};
@@ -1752,7 +1028,7 @@ var de_StopSNOMEDCTInferenceJobCommand = /* @__PURE__ */ __name(async (output, c
1752
1028
  };
1753
1029
  return response;
1754
1030
  }, "de_StopSNOMEDCTInferenceJobCommand");
1755
- var de_StopSNOMEDCTInferenceJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1031
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1756
1032
  const parsedOutput = {
1757
1033
  ...output,
1758
1034
  body: await parseErrorBody(output.body, context)
@@ -1771,6 +1047,18 @@ var de_StopSNOMEDCTInferenceJobCommandError = /* @__PURE__ */ __name(async (outp
1771
1047
  case "TooManyRequestsException":
1772
1048
  case "com.amazonaws.comprehendmedical#TooManyRequestsException":
1773
1049
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1050
+ case "InvalidEncodingException":
1051
+ case "com.amazonaws.comprehendmedical#InvalidEncodingException":
1052
+ throw await de_InvalidEncodingExceptionRes(parsedOutput, context);
1053
+ case "ServiceUnavailableException":
1054
+ case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
1055
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1056
+ case "TextSizeLimitExceededException":
1057
+ case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
1058
+ throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
1059
+ case "ValidationException":
1060
+ case "com.amazonaws.comprehendmedical#ValidationException":
1061
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1774
1062
  default:
1775
1063
  const parsedBody = parsedOutput.body;
1776
1064
  return throwDefaultError({
@@ -1779,7 +1067,7 @@ var de_StopSNOMEDCTInferenceJobCommandError = /* @__PURE__ */ __name(async (outp
1779
1067
  errorCode
1780
1068
  });
1781
1069
  }
1782
- }, "de_StopSNOMEDCTInferenceJobCommandError");
1070
+ }, "de_CommandError");
1783
1071
  var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1784
1072
  const body = parsedOutput.body;
1785
1073
  const deserialized = (0, import_smithy_client._json)(body);