@aws-sdk/client-translate 3.504.0 → 3.507.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
@@ -674,7 +674,7 @@ var se_UpdateParallelDataCommand = /* @__PURE__ */ __name(async (input, context)
674
674
  }, "se_UpdateParallelDataCommand");
675
675
  var de_CreateParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
676
676
  if (output.statusCode >= 300) {
677
- return de_CreateParallelDataCommandError(output, context);
677
+ return de_CommandError(output, context);
678
678
  }
679
679
  const data = await parseBody(output.body, context);
680
680
  let contents = {};
@@ -685,49 +685,9 @@ var de_CreateParallelDataCommand = /* @__PURE__ */ __name(async (output, context
685
685
  };
686
686
  return response;
687
687
  }, "de_CreateParallelDataCommand");
688
- var de_CreateParallelDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
689
- const parsedOutput = {
690
- ...output,
691
- body: await parseErrorBody(output.body, context)
692
- };
693
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
694
- switch (errorCode) {
695
- case "ConcurrentModificationException":
696
- case "com.amazonaws.translate#ConcurrentModificationException":
697
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
698
- case "ConflictException":
699
- case "com.amazonaws.translate#ConflictException":
700
- throw await de_ConflictExceptionRes(parsedOutput, context);
701
- case "InternalServerException":
702
- case "com.amazonaws.translate#InternalServerException":
703
- throw await de_InternalServerExceptionRes(parsedOutput, context);
704
- case "InvalidParameterValueException":
705
- case "com.amazonaws.translate#InvalidParameterValueException":
706
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
707
- case "InvalidRequestException":
708
- case "com.amazonaws.translate#InvalidRequestException":
709
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
710
- case "LimitExceededException":
711
- case "com.amazonaws.translate#LimitExceededException":
712
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
713
- case "TooManyRequestsException":
714
- case "com.amazonaws.translate#TooManyRequestsException":
715
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
716
- case "TooManyTagsException":
717
- case "com.amazonaws.translate#TooManyTagsException":
718
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
719
- default:
720
- const parsedBody = parsedOutput.body;
721
- return throwDefaultError({
722
- output,
723
- parsedBody,
724
- errorCode
725
- });
726
- }
727
- }, "de_CreateParallelDataCommandError");
728
688
  var de_DeleteParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
729
689
  if (output.statusCode >= 300) {
730
- return de_DeleteParallelDataCommandError(output, context);
690
+ return de_CommandError(output, context);
731
691
  }
732
692
  const data = await parseBody(output.body, context);
733
693
  let contents = {};
@@ -738,37 +698,9 @@ var de_DeleteParallelDataCommand = /* @__PURE__ */ __name(async (output, context
738
698
  };
739
699
  return response;
740
700
  }, "de_DeleteParallelDataCommand");
741
- var de_DeleteParallelDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
742
- const parsedOutput = {
743
- ...output,
744
- body: await parseErrorBody(output.body, context)
745
- };
746
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
747
- switch (errorCode) {
748
- case "ConcurrentModificationException":
749
- case "com.amazonaws.translate#ConcurrentModificationException":
750
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
751
- case "InternalServerException":
752
- case "com.amazonaws.translate#InternalServerException":
753
- throw await de_InternalServerExceptionRes(parsedOutput, context);
754
- case "ResourceNotFoundException":
755
- case "com.amazonaws.translate#ResourceNotFoundException":
756
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
757
- case "TooManyRequestsException":
758
- case "com.amazonaws.translate#TooManyRequestsException":
759
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
760
- default:
761
- const parsedBody = parsedOutput.body;
762
- return throwDefaultError({
763
- output,
764
- parsedBody,
765
- errorCode
766
- });
767
- }
768
- }, "de_DeleteParallelDataCommandError");
769
701
  var de_DeleteTerminologyCommand = /* @__PURE__ */ __name(async (output, context) => {
770
702
  if (output.statusCode >= 300) {
771
- return de_DeleteTerminologyCommandError(output, context);
703
+ return de_CommandError(output, context);
772
704
  }
773
705
  await (0, import_smithy_client.collectBody)(output.body, context);
774
706
  const response = {
@@ -776,37 +708,9 @@ var de_DeleteTerminologyCommand = /* @__PURE__ */ __name(async (output, context)
776
708
  };
777
709
  return response;
778
710
  }, "de_DeleteTerminologyCommand");
779
- var de_DeleteTerminologyCommandError = /* @__PURE__ */ __name(async (output, context) => {
780
- const parsedOutput = {
781
- ...output,
782
- body: await parseErrorBody(output.body, context)
783
- };
784
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
785
- switch (errorCode) {
786
- case "InternalServerException":
787
- case "com.amazonaws.translate#InternalServerException":
788
- throw await de_InternalServerExceptionRes(parsedOutput, context);
789
- case "InvalidParameterValueException":
790
- case "com.amazonaws.translate#InvalidParameterValueException":
791
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
792
- case "ResourceNotFoundException":
793
- case "com.amazonaws.translate#ResourceNotFoundException":
794
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
795
- case "TooManyRequestsException":
796
- case "com.amazonaws.translate#TooManyRequestsException":
797
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
798
- default:
799
- const parsedBody = parsedOutput.body;
800
- return throwDefaultError({
801
- output,
802
- parsedBody,
803
- errorCode
804
- });
805
- }
806
- }, "de_DeleteTerminologyCommandError");
807
711
  var de_DescribeTextTranslationJobCommand = /* @__PURE__ */ __name(async (output, context) => {
808
712
  if (output.statusCode >= 300) {
809
- return de_DescribeTextTranslationJobCommandError(output, context);
713
+ return de_CommandError(output, context);
810
714
  }
811
715
  const data = await parseBody(output.body, context);
812
716
  let contents = {};
@@ -817,34 +721,9 @@ var de_DescribeTextTranslationJobCommand = /* @__PURE__ */ __name(async (output,
817
721
  };
818
722
  return response;
819
723
  }, "de_DescribeTextTranslationJobCommand");
820
- var de_DescribeTextTranslationJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
821
- const parsedOutput = {
822
- ...output,
823
- body: await parseErrorBody(output.body, context)
824
- };
825
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
826
- switch (errorCode) {
827
- case "InternalServerException":
828
- case "com.amazonaws.translate#InternalServerException":
829
- throw await de_InternalServerExceptionRes(parsedOutput, context);
830
- case "ResourceNotFoundException":
831
- case "com.amazonaws.translate#ResourceNotFoundException":
832
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
833
- case "TooManyRequestsException":
834
- case "com.amazonaws.translate#TooManyRequestsException":
835
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
836
- default:
837
- const parsedBody = parsedOutput.body;
838
- return throwDefaultError({
839
- output,
840
- parsedBody,
841
- errorCode
842
- });
843
- }
844
- }, "de_DescribeTextTranslationJobCommandError");
845
724
  var de_GetParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
846
725
  if (output.statusCode >= 300) {
847
- return de_GetParallelDataCommandError(output, context);
726
+ return de_CommandError(output, context);
848
727
  }
849
728
  const data = await parseBody(output.body, context);
850
729
  let contents = {};
@@ -855,37 +734,9 @@ var de_GetParallelDataCommand = /* @__PURE__ */ __name(async (output, context) =
855
734
  };
856
735
  return response;
857
736
  }, "de_GetParallelDataCommand");
858
- var de_GetParallelDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
859
- const parsedOutput = {
860
- ...output,
861
- body: await parseErrorBody(output.body, context)
862
- };
863
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
864
- switch (errorCode) {
865
- case "InternalServerException":
866
- case "com.amazonaws.translate#InternalServerException":
867
- throw await de_InternalServerExceptionRes(parsedOutput, context);
868
- case "InvalidParameterValueException":
869
- case "com.amazonaws.translate#InvalidParameterValueException":
870
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
871
- case "ResourceNotFoundException":
872
- case "com.amazonaws.translate#ResourceNotFoundException":
873
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
874
- case "TooManyRequestsException":
875
- case "com.amazonaws.translate#TooManyRequestsException":
876
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
877
- default:
878
- const parsedBody = parsedOutput.body;
879
- return throwDefaultError({
880
- output,
881
- parsedBody,
882
- errorCode
883
- });
884
- }
885
- }, "de_GetParallelDataCommandError");
886
737
  var de_GetTerminologyCommand = /* @__PURE__ */ __name(async (output, context) => {
887
738
  if (output.statusCode >= 300) {
888
- return de_GetTerminologyCommandError(output, context);
739
+ return de_CommandError(output, context);
889
740
  }
890
741
  const data = await parseBody(output.body, context);
891
742
  let contents = {};
@@ -896,37 +747,9 @@ var de_GetTerminologyCommand = /* @__PURE__ */ __name(async (output, context) =>
896
747
  };
897
748
  return response;
898
749
  }, "de_GetTerminologyCommand");
899
- var de_GetTerminologyCommandError = /* @__PURE__ */ __name(async (output, context) => {
900
- const parsedOutput = {
901
- ...output,
902
- body: await parseErrorBody(output.body, context)
903
- };
904
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
905
- switch (errorCode) {
906
- case "InternalServerException":
907
- case "com.amazonaws.translate#InternalServerException":
908
- throw await de_InternalServerExceptionRes(parsedOutput, context);
909
- case "InvalidParameterValueException":
910
- case "com.amazonaws.translate#InvalidParameterValueException":
911
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
912
- case "ResourceNotFoundException":
913
- case "com.amazonaws.translate#ResourceNotFoundException":
914
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
915
- case "TooManyRequestsException":
916
- case "com.amazonaws.translate#TooManyRequestsException":
917
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
918
- default:
919
- const parsedBody = parsedOutput.body;
920
- return throwDefaultError({
921
- output,
922
- parsedBody,
923
- errorCode
924
- });
925
- }
926
- }, "de_GetTerminologyCommandError");
927
750
  var de_ImportTerminologyCommand = /* @__PURE__ */ __name(async (output, context) => {
928
751
  if (output.statusCode >= 300) {
929
- return de_ImportTerminologyCommandError(output, context);
752
+ return de_CommandError(output, context);
930
753
  }
931
754
  const data = await parseBody(output.body, context);
932
755
  let contents = {};
@@ -937,43 +760,9 @@ var de_ImportTerminologyCommand = /* @__PURE__ */ __name(async (output, context)
937
760
  };
938
761
  return response;
939
762
  }, "de_ImportTerminologyCommand");
940
- var de_ImportTerminologyCommandError = /* @__PURE__ */ __name(async (output, context) => {
941
- const parsedOutput = {
942
- ...output,
943
- body: await parseErrorBody(output.body, context)
944
- };
945
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
946
- switch (errorCode) {
947
- case "ConcurrentModificationException":
948
- case "com.amazonaws.translate#ConcurrentModificationException":
949
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
950
- case "InternalServerException":
951
- case "com.amazonaws.translate#InternalServerException":
952
- throw await de_InternalServerExceptionRes(parsedOutput, context);
953
- case "InvalidParameterValueException":
954
- case "com.amazonaws.translate#InvalidParameterValueException":
955
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
956
- case "LimitExceededException":
957
- case "com.amazonaws.translate#LimitExceededException":
958
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
959
- case "TooManyRequestsException":
960
- case "com.amazonaws.translate#TooManyRequestsException":
961
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
962
- case "TooManyTagsException":
963
- case "com.amazonaws.translate#TooManyTagsException":
964
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
965
- default:
966
- const parsedBody = parsedOutput.body;
967
- return throwDefaultError({
968
- output,
969
- parsedBody,
970
- errorCode
971
- });
972
- }
973
- }, "de_ImportTerminologyCommandError");
974
763
  var de_ListLanguagesCommand = /* @__PURE__ */ __name(async (output, context) => {
975
764
  if (output.statusCode >= 300) {
976
- return de_ListLanguagesCommandError(output, context);
765
+ return de_CommandError(output, context);
977
766
  }
978
767
  const data = await parseBody(output.body, context);
979
768
  let contents = {};
@@ -984,37 +773,9 @@ var de_ListLanguagesCommand = /* @__PURE__ */ __name(async (output, context) =>
984
773
  };
985
774
  return response;
986
775
  }, "de_ListLanguagesCommand");
987
- var de_ListLanguagesCommandError = /* @__PURE__ */ __name(async (output, context) => {
988
- const parsedOutput = {
989
- ...output,
990
- body: await parseErrorBody(output.body, context)
991
- };
992
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
993
- switch (errorCode) {
994
- case "InternalServerException":
995
- case "com.amazonaws.translate#InternalServerException":
996
- throw await de_InternalServerExceptionRes(parsedOutput, context);
997
- case "InvalidParameterValueException":
998
- case "com.amazonaws.translate#InvalidParameterValueException":
999
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1000
- case "TooManyRequestsException":
1001
- case "com.amazonaws.translate#TooManyRequestsException":
1002
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1003
- case "UnsupportedDisplayLanguageCodeException":
1004
- case "com.amazonaws.translate#UnsupportedDisplayLanguageCodeException":
1005
- throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context);
1006
- default:
1007
- const parsedBody = parsedOutput.body;
1008
- return throwDefaultError({
1009
- output,
1010
- parsedBody,
1011
- errorCode
1012
- });
1013
- }
1014
- }, "de_ListLanguagesCommandError");
1015
776
  var de_ListParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
1016
777
  if (output.statusCode >= 300) {
1017
- return de_ListParallelDataCommandError(output, context);
778
+ return de_CommandError(output, context);
1018
779
  }
1019
780
  const data = await parseBody(output.body, context);
1020
781
  let contents = {};
@@ -1025,110 +786,35 @@ var de_ListParallelDataCommand = /* @__PURE__ */ __name(async (output, context)
1025
786
  };
1026
787
  return response;
1027
788
  }, "de_ListParallelDataCommand");
1028
- var de_ListParallelDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
1029
- const parsedOutput = {
1030
- ...output,
1031
- body: await parseErrorBody(output.body, context)
1032
- };
1033
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1034
- switch (errorCode) {
1035
- case "InternalServerException":
1036
- case "com.amazonaws.translate#InternalServerException":
1037
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1038
- case "InvalidParameterValueException":
1039
- case "com.amazonaws.translate#InvalidParameterValueException":
1040
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1041
- case "TooManyRequestsException":
1042
- case "com.amazonaws.translate#TooManyRequestsException":
1043
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1044
- default:
1045
- const parsedBody = parsedOutput.body;
1046
- return throwDefaultError({
1047
- output,
1048
- parsedBody,
1049
- errorCode
1050
- });
1051
- }
1052
- }, "de_ListParallelDataCommandError");
1053
789
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1054
790
  if (output.statusCode >= 300) {
1055
- return de_ListTagsForResourceCommandError(output, context);
1056
- }
1057
- const data = await parseBody(output.body, context);
1058
- let contents = {};
1059
- contents = (0, import_smithy_client._json)(data);
1060
- const response = {
1061
- $metadata: deserializeMetadata(output),
1062
- ...contents
1063
- };
1064
- return response;
1065
- }, "de_ListTagsForResourceCommand");
1066
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1067
- const parsedOutput = {
1068
- ...output,
1069
- body: await parseErrorBody(output.body, context)
1070
- };
1071
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1072
- switch (errorCode) {
1073
- case "InternalServerException":
1074
- case "com.amazonaws.translate#InternalServerException":
1075
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1076
- case "InvalidParameterValueException":
1077
- case "com.amazonaws.translate#InvalidParameterValueException":
1078
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1079
- case "ResourceNotFoundException":
1080
- case "com.amazonaws.translate#ResourceNotFoundException":
1081
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1082
- default:
1083
- const parsedBody = parsedOutput.body;
1084
- return throwDefaultError({
1085
- output,
1086
- parsedBody,
1087
- errorCode
1088
- });
1089
- }
1090
- }, "de_ListTagsForResourceCommandError");
1091
- var de_ListTerminologiesCommand = /* @__PURE__ */ __name(async (output, context) => {
1092
- if (output.statusCode >= 300) {
1093
- return de_ListTerminologiesCommandError(output, context);
791
+ return de_CommandError(output, context);
1094
792
  }
1095
- const data = await parseBody(output.body, context);
1096
- let contents = {};
1097
- contents = de_ListTerminologiesResponse(data, context);
1098
- const response = {
1099
- $metadata: deserializeMetadata(output),
1100
- ...contents
1101
- };
1102
- return response;
1103
- }, "de_ListTerminologiesCommand");
1104
- var de_ListTerminologiesCommandError = /* @__PURE__ */ __name(async (output, context) => {
1105
- const parsedOutput = {
1106
- ...output,
1107
- body: await parseErrorBody(output.body, context)
1108
- };
1109
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1110
- switch (errorCode) {
1111
- case "InternalServerException":
1112
- case "com.amazonaws.translate#InternalServerException":
1113
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1114
- case "InvalidParameterValueException":
1115
- case "com.amazonaws.translate#InvalidParameterValueException":
1116
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1117
- case "TooManyRequestsException":
1118
- case "com.amazonaws.translate#TooManyRequestsException":
1119
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1120
- default:
1121
- const parsedBody = parsedOutput.body;
1122
- return throwDefaultError({
1123
- output,
1124
- parsedBody,
1125
- errorCode
1126
- });
793
+ const data = await parseBody(output.body, context);
794
+ let contents = {};
795
+ contents = (0, import_smithy_client._json)(data);
796
+ const response = {
797
+ $metadata: deserializeMetadata(output),
798
+ ...contents
799
+ };
800
+ return response;
801
+ }, "de_ListTagsForResourceCommand");
802
+ var de_ListTerminologiesCommand = /* @__PURE__ */ __name(async (output, context) => {
803
+ if (output.statusCode >= 300) {
804
+ return de_CommandError(output, context);
1127
805
  }
1128
- }, "de_ListTerminologiesCommandError");
806
+ const data = await parseBody(output.body, context);
807
+ let contents = {};
808
+ contents = de_ListTerminologiesResponse(data, context);
809
+ const response = {
810
+ $metadata: deserializeMetadata(output),
811
+ ...contents
812
+ };
813
+ return response;
814
+ }, "de_ListTerminologiesCommand");
1129
815
  var de_ListTextTranslationJobsCommand = /* @__PURE__ */ __name(async (output, context) => {
1130
816
  if (output.statusCode >= 300) {
1131
- return de_ListTextTranslationJobsCommandError(output, context);
817
+ return de_CommandError(output, context);
1132
818
  }
1133
819
  const data = await parseBody(output.body, context);
1134
820
  let contents = {};
@@ -1139,37 +825,9 @@ var de_ListTextTranslationJobsCommand = /* @__PURE__ */ __name(async (output, co
1139
825
  };
1140
826
  return response;
1141
827
  }, "de_ListTextTranslationJobsCommand");
1142
- var de_ListTextTranslationJobsCommandError = /* @__PURE__ */ __name(async (output, context) => {
1143
- const parsedOutput = {
1144
- ...output,
1145
- body: await parseErrorBody(output.body, context)
1146
- };
1147
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1148
- switch (errorCode) {
1149
- case "InternalServerException":
1150
- case "com.amazonaws.translate#InternalServerException":
1151
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1152
- case "InvalidFilterException":
1153
- case "com.amazonaws.translate#InvalidFilterException":
1154
- throw await de_InvalidFilterExceptionRes(parsedOutput, context);
1155
- case "InvalidRequestException":
1156
- case "com.amazonaws.translate#InvalidRequestException":
1157
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1158
- case "TooManyRequestsException":
1159
- case "com.amazonaws.translate#TooManyRequestsException":
1160
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1161
- default:
1162
- const parsedBody = parsedOutput.body;
1163
- return throwDefaultError({
1164
- output,
1165
- parsedBody,
1166
- errorCode
1167
- });
1168
- }
1169
- }, "de_ListTextTranslationJobsCommandError");
1170
828
  var de_StartTextTranslationJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1171
829
  if (output.statusCode >= 300) {
1172
- return de_StartTextTranslationJobCommandError(output, context);
830
+ return de_CommandError(output, context);
1173
831
  }
1174
832
  const data = await parseBody(output.body, context);
1175
833
  let contents = {};
@@ -1180,43 +838,9 @@ var de_StartTextTranslationJobCommand = /* @__PURE__ */ __name(async (output, co
1180
838
  };
1181
839
  return response;
1182
840
  }, "de_StartTextTranslationJobCommand");
1183
- var de_StartTextTranslationJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1184
- const parsedOutput = {
1185
- ...output,
1186
- body: await parseErrorBody(output.body, context)
1187
- };
1188
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1189
- switch (errorCode) {
1190
- case "InternalServerException":
1191
- case "com.amazonaws.translate#InternalServerException":
1192
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1193
- case "InvalidParameterValueException":
1194
- case "com.amazonaws.translate#InvalidParameterValueException":
1195
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1196
- case "InvalidRequestException":
1197
- case "com.amazonaws.translate#InvalidRequestException":
1198
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1199
- case "ResourceNotFoundException":
1200
- case "com.amazonaws.translate#ResourceNotFoundException":
1201
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1202
- case "TooManyRequestsException":
1203
- case "com.amazonaws.translate#TooManyRequestsException":
1204
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1205
- case "UnsupportedLanguagePairException":
1206
- case "com.amazonaws.translate#UnsupportedLanguagePairException":
1207
- throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
1208
- default:
1209
- const parsedBody = parsedOutput.body;
1210
- return throwDefaultError({
1211
- output,
1212
- parsedBody,
1213
- errorCode
1214
- });
1215
- }
1216
- }, "de_StartTextTranslationJobCommandError");
1217
841
  var de_StopTextTranslationJobCommand = /* @__PURE__ */ __name(async (output, context) => {
1218
842
  if (output.statusCode >= 300) {
1219
- return de_StopTextTranslationJobCommandError(output, context);
843
+ return de_CommandError(output, context);
1220
844
  }
1221
845
  const data = await parseBody(output.body, context);
1222
846
  let contents = {};
@@ -1227,34 +851,9 @@ var de_StopTextTranslationJobCommand = /* @__PURE__ */ __name(async (output, con
1227
851
  };
1228
852
  return response;
1229
853
  }, "de_StopTextTranslationJobCommand");
1230
- var de_StopTextTranslationJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
1231
- const parsedOutput = {
1232
- ...output,
1233
- body: await parseErrorBody(output.body, context)
1234
- };
1235
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1236
- switch (errorCode) {
1237
- case "InternalServerException":
1238
- case "com.amazonaws.translate#InternalServerException":
1239
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1240
- case "ResourceNotFoundException":
1241
- case "com.amazonaws.translate#ResourceNotFoundException":
1242
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1243
- case "TooManyRequestsException":
1244
- case "com.amazonaws.translate#TooManyRequestsException":
1245
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1246
- default:
1247
- const parsedBody = parsedOutput.body;
1248
- return throwDefaultError({
1249
- output,
1250
- parsedBody,
1251
- errorCode
1252
- });
1253
- }
1254
- }, "de_StopTextTranslationJobCommandError");
1255
854
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1256
855
  if (output.statusCode >= 300) {
1257
- return de_TagResourceCommandError(output, context);
856
+ return de_CommandError(output, context);
1258
857
  }
1259
858
  const data = await parseBody(output.body, context);
1260
859
  let contents = {};
@@ -1265,40 +864,9 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1265
864
  };
1266
865
  return response;
1267
866
  }, "de_TagResourceCommand");
1268
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1269
- const parsedOutput = {
1270
- ...output,
1271
- body: await parseErrorBody(output.body, context)
1272
- };
1273
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1274
- switch (errorCode) {
1275
- case "ConcurrentModificationException":
1276
- case "com.amazonaws.translate#ConcurrentModificationException":
1277
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1278
- case "InternalServerException":
1279
- case "com.amazonaws.translate#InternalServerException":
1280
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1281
- case "InvalidParameterValueException":
1282
- case "com.amazonaws.translate#InvalidParameterValueException":
1283
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1284
- case "ResourceNotFoundException":
1285
- case "com.amazonaws.translate#ResourceNotFoundException":
1286
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1287
- case "TooManyTagsException":
1288
- case "com.amazonaws.translate#TooManyTagsException":
1289
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1290
- default:
1291
- const parsedBody = parsedOutput.body;
1292
- return throwDefaultError({
1293
- output,
1294
- parsedBody,
1295
- errorCode
1296
- });
1297
- }
1298
- }, "de_TagResourceCommandError");
1299
867
  var de_TranslateDocumentCommand = /* @__PURE__ */ __name(async (output, context) => {
1300
868
  if (output.statusCode >= 300) {
1301
- return de_TranslateDocumentCommandError(output, context);
869
+ return de_CommandError(output, context);
1302
870
  }
1303
871
  const data = await parseBody(output.body, context);
1304
872
  let contents = {};
@@ -1309,46 +877,9 @@ var de_TranslateDocumentCommand = /* @__PURE__ */ __name(async (output, context)
1309
877
  };
1310
878
  return response;
1311
879
  }, "de_TranslateDocumentCommand");
1312
- var de_TranslateDocumentCommandError = /* @__PURE__ */ __name(async (output, context) => {
1313
- const parsedOutput = {
1314
- ...output,
1315
- body: await parseErrorBody(output.body, context)
1316
- };
1317
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1318
- switch (errorCode) {
1319
- case "InternalServerException":
1320
- case "com.amazonaws.translate#InternalServerException":
1321
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1322
- case "InvalidRequestException":
1323
- case "com.amazonaws.translate#InvalidRequestException":
1324
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1325
- case "LimitExceededException":
1326
- case "com.amazonaws.translate#LimitExceededException":
1327
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1328
- case "ResourceNotFoundException":
1329
- case "com.amazonaws.translate#ResourceNotFoundException":
1330
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1331
- case "ServiceUnavailableException":
1332
- case "com.amazonaws.translate#ServiceUnavailableException":
1333
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1334
- case "TooManyRequestsException":
1335
- case "com.amazonaws.translate#TooManyRequestsException":
1336
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1337
- case "UnsupportedLanguagePairException":
1338
- case "com.amazonaws.translate#UnsupportedLanguagePairException":
1339
- throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
1340
- default:
1341
- const parsedBody = parsedOutput.body;
1342
- return throwDefaultError({
1343
- output,
1344
- parsedBody,
1345
- errorCode
1346
- });
1347
- }
1348
- }, "de_TranslateDocumentCommandError");
1349
880
  var de_TranslateTextCommand = /* @__PURE__ */ __name(async (output, context) => {
1350
881
  if (output.statusCode >= 300) {
1351
- return de_TranslateTextCommandError(output, context);
882
+ return de_CommandError(output, context);
1352
883
  }
1353
884
  const data = await parseBody(output.body, context);
1354
885
  let contents = {};
@@ -1359,49 +890,9 @@ var de_TranslateTextCommand = /* @__PURE__ */ __name(async (output, context) =>
1359
890
  };
1360
891
  return response;
1361
892
  }, "de_TranslateTextCommand");
1362
- var de_TranslateTextCommandError = /* @__PURE__ */ __name(async (output, context) => {
1363
- const parsedOutput = {
1364
- ...output,
1365
- body: await parseErrorBody(output.body, context)
1366
- };
1367
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1368
- switch (errorCode) {
1369
- case "DetectedLanguageLowConfidenceException":
1370
- case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
1371
- throw await de_DetectedLanguageLowConfidenceExceptionRes(parsedOutput, context);
1372
- case "InternalServerException":
1373
- case "com.amazonaws.translate#InternalServerException":
1374
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1375
- case "InvalidRequestException":
1376
- case "com.amazonaws.translate#InvalidRequestException":
1377
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1378
- case "ResourceNotFoundException":
1379
- case "com.amazonaws.translate#ResourceNotFoundException":
1380
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1381
- case "ServiceUnavailableException":
1382
- case "com.amazonaws.translate#ServiceUnavailableException":
1383
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1384
- case "TextSizeLimitExceededException":
1385
- case "com.amazonaws.translate#TextSizeLimitExceededException":
1386
- throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
1387
- case "TooManyRequestsException":
1388
- case "com.amazonaws.translate#TooManyRequestsException":
1389
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1390
- case "UnsupportedLanguagePairException":
1391
- case "com.amazonaws.translate#UnsupportedLanguagePairException":
1392
- throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
1393
- default:
1394
- const parsedBody = parsedOutput.body;
1395
- return throwDefaultError({
1396
- output,
1397
- parsedBody,
1398
- errorCode
1399
- });
1400
- }
1401
- }, "de_TranslateTextCommandError");
1402
893
  var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1403
894
  if (output.statusCode >= 300) {
1404
- return de_UntagResourceCommandError(output, context);
895
+ return de_CommandError(output, context);
1405
896
  }
1406
897
  const data = await parseBody(output.body, context);
1407
898
  let contents = {};
@@ -1412,37 +903,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
1412
903
  };
1413
904
  return response;
1414
905
  }, "de_UntagResourceCommand");
1415
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1416
- const parsedOutput = {
1417
- ...output,
1418
- body: await parseErrorBody(output.body, context)
1419
- };
1420
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1421
- switch (errorCode) {
1422
- case "ConcurrentModificationException":
1423
- case "com.amazonaws.translate#ConcurrentModificationException":
1424
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1425
- case "InternalServerException":
1426
- case "com.amazonaws.translate#InternalServerException":
1427
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1428
- case "InvalidParameterValueException":
1429
- case "com.amazonaws.translate#InvalidParameterValueException":
1430
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1431
- case "ResourceNotFoundException":
1432
- case "com.amazonaws.translate#ResourceNotFoundException":
1433
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1434
- default:
1435
- const parsedBody = parsedOutput.body;
1436
- return throwDefaultError({
1437
- output,
1438
- parsedBody,
1439
- errorCode
1440
- });
1441
- }
1442
- }, "de_UntagResourceCommandError");
1443
906
  var de_UpdateParallelDataCommand = /* @__PURE__ */ __name(async (output, context) => {
1444
907
  if (output.statusCode >= 300) {
1445
- return de_UpdateParallelDataCommandError(output, context);
908
+ return de_CommandError(output, context);
1446
909
  }
1447
910
  const data = await parseBody(output.body, context);
1448
911
  let contents = {};
@@ -1453,7 +916,7 @@ var de_UpdateParallelDataCommand = /* @__PURE__ */ __name(async (output, context
1453
916
  };
1454
917
  return response;
1455
918
  }, "de_UpdateParallelDataCommand");
1456
- var de_UpdateParallelDataCommandError = /* @__PURE__ */ __name(async (output, context) => {
919
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1457
920
  const parsedOutput = {
1458
921
  ...output,
1459
922
  body: await parseErrorBody(output.body, context)
@@ -1478,12 +941,33 @@ var de_UpdateParallelDataCommandError = /* @__PURE__ */ __name(async (output, co
1478
941
  case "LimitExceededException":
1479
942
  case "com.amazonaws.translate#LimitExceededException":
1480
943
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
1481
- case "ResourceNotFoundException":
1482
- case "com.amazonaws.translate#ResourceNotFoundException":
1483
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1484
944
  case "TooManyRequestsException":
1485
945
  case "com.amazonaws.translate#TooManyRequestsException":
1486
946
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
947
+ case "TooManyTagsException":
948
+ case "com.amazonaws.translate#TooManyTagsException":
949
+ throw await de_TooManyTagsExceptionRes(parsedOutput, context);
950
+ case "ResourceNotFoundException":
951
+ case "com.amazonaws.translate#ResourceNotFoundException":
952
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
953
+ case "UnsupportedDisplayLanguageCodeException":
954
+ case "com.amazonaws.translate#UnsupportedDisplayLanguageCodeException":
955
+ throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context);
956
+ case "InvalidFilterException":
957
+ case "com.amazonaws.translate#InvalidFilterException":
958
+ throw await de_InvalidFilterExceptionRes(parsedOutput, context);
959
+ case "UnsupportedLanguagePairException":
960
+ case "com.amazonaws.translate#UnsupportedLanguagePairException":
961
+ throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
962
+ case "ServiceUnavailableException":
963
+ case "com.amazonaws.translate#ServiceUnavailableException":
964
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
965
+ case "DetectedLanguageLowConfidenceException":
966
+ case "com.amazonaws.translate#DetectedLanguageLowConfidenceException":
967
+ throw await de_DetectedLanguageLowConfidenceExceptionRes(parsedOutput, context);
968
+ case "TextSizeLimitExceededException":
969
+ case "com.amazonaws.translate#TextSizeLimitExceededException":
970
+ throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context);
1487
971
  default:
1488
972
  const parsedBody = parsedOutput.body;
1489
973
  return throwDefaultError({
@@ -1492,7 +976,7 @@ var de_UpdateParallelDataCommandError = /* @__PURE__ */ __name(async (output, co
1492
976
  errorCode
1493
977
  });
1494
978
  }
1495
- }, "de_UpdateParallelDataCommandError");
979
+ }, "de_CommandError");
1496
980
  var de_ConcurrentModificationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1497
981
  const body = parsedOutput.body;
1498
982
  const deserialized = (0, import_smithy_client._json)(body);