Skip to content

Commit 4239af0

Browse files
author
Jiarui Guo
committed
fix return type per audit
1 parent a55b2aa commit 4239af0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ private Mono<List<TransliteratedText>> transliterateInner(String language, Strin
356356
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
357357
* @return the response.
358358
*/
359-
@ServiceMethod(returns = ReturnType.COLLECTION.)
359+
@ServiceMethod(returns = ReturnType.SINGLE)
360360
public Mono<List<TransliteratedText>> transliterate(String language, String fromScript, String toScript,
361361
List<String> inputs) {
362362
return transliterateInner(language, fromScript, toScript, convertTextsToInputTextItems(inputs));
@@ -494,7 +494,7 @@ public Mono<Response<BinaryData>> translateWithResponse(BinaryData translateInpu
494494
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
495495
* @return the response body on successful completion of {@link Mono}.
496496
*/
497-
@ServiceMethod(returns = ReturnType.COLLECTION)
497+
@ServiceMethod(returns = ReturnType.SINGLE)
498498
public Mono<List<TranslatedTextItem>> translate(List<TranslateInputItem> inputs) {
499499
// Generated convenience method for translateWithResponse
500500
RequestOptions requestOptions = new RequestOptions();

sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ private List<TransliteratedText> transliterateInner(String language, String from
346346
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
347347
* @return the response.
348348
*/
349-
@ServiceMethod(returns = ReturnType.COLLECTION)
349+
@ServiceMethod(returns = ReturnType.SINGLE)
350350
public List<TransliteratedText> transliterate(String language, String fromScript, String toScript,
351351
List<String> inputs) {
352352
return transliterateInner(language, fromScript, toScript, convertTextsToInputTextItems(inputs));
@@ -482,7 +482,7 @@ public Response<BinaryData> translateWithResponse(BinaryData translateInput, Req
482482
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
483483
* @return the response.
484484
*/
485-
@ServiceMethod(returns = ReturnType.COLLECTION)
485+
@ServiceMethod(returns = ReturnType.SINGLE)
486486
public List<TranslatedTextItem> translate(List<TranslateInputItem> inputs) {
487487
// Generated convenience method for translateWithResponse
488488
RequestOptions requestOptions = new RequestOptions();

0 commit comments

Comments
 (0)