@@ -40,27 +40,27 @@ class TranslateClient extends AbstractApi
4040 * '@region'?: string|null,
4141 * }|TranslateTextRequest $input
4242 *
43+ * @throws DetectedLanguageLowConfidenceException
44+ * @throws InternalServerException
4345 * @throws InvalidRequestException
46+ * @throws ResourceNotFoundException
47+ * @throws ServiceUnavailableException
4448 * @throws TextSizeLimitExceededException
4549 * @throws TooManyRequestsException
4650 * @throws UnsupportedLanguagePairException
47- * @throws DetectedLanguageLowConfidenceException
48- * @throws ResourceNotFoundException
49- * @throws InternalServerException
50- * @throws ServiceUnavailableException
5151 */
5252 public function translateText ($ input ): TranslateTextResponse
5353 {
5454 $ input = TranslateTextRequest::create ($ input );
5555 $ response = $ this ->getResponse ($ input ->request (), new RequestContext (['operation ' => 'TranslateText ' , 'region ' => $ input ->getRegion (), 'exceptionMapping ' => [
56+ 'DetectedLanguageLowConfidenceException ' => DetectedLanguageLowConfidenceException::class,
57+ 'InternalServerException ' => InternalServerException::class,
5658 'InvalidRequestException ' => InvalidRequestException::class,
59+ 'ResourceNotFoundException ' => ResourceNotFoundException::class,
60+ 'ServiceUnavailableException ' => ServiceUnavailableException::class,
5761 'TextSizeLimitExceededException ' => TextSizeLimitExceededException::class,
5862 'TooManyRequestsException ' => TooManyRequestsException::class,
5963 'UnsupportedLanguagePairException ' => UnsupportedLanguagePairException::class,
60- 'DetectedLanguageLowConfidenceException ' => DetectedLanguageLowConfidenceException::class,
61- 'ResourceNotFoundException ' => ResourceNotFoundException::class,
62- 'InternalServerException ' => InternalServerException::class,
63- 'ServiceUnavailableException ' => ServiceUnavailableException::class,
6464 ]]));
6565
6666 return new TranslateTextResponse ($ response );
0 commit comments