From 7e30323130b10e1a1fced9a9a1275f02a7c5a464 Mon Sep 17 00:00:00 2001 From: samvaity Date: Tue, 9 Feb 2021 15:11:16 -0800 Subject: [PATCH] update annotations for checkstyle updates --- .../FormRecognizerAsyncClient.java | 24 +++++++++---------- .../formrecognizer/FormRecognizerClient.java | 24 +++++++++---------- .../FormRecognizerClientImpl.java | 8 +++---- .../training/FormTrainingAsyncClient.java | 2 +- .../training/FormTrainingClient.java | 4 ++-- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java index 27ea310f702ee..561ada2c630cc 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java @@ -92,7 +92,7 @@ public final class FormRecognizerAsyncClient { * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code formUrl}, {@code modelId} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeCustomFormsFromUrl(String modelId, String formUrl) { return beginRecognizeCustomFormsFromUrl(modelId, formUrl, null); @@ -118,7 +118,7 @@ public final class FormRecognizerAsyncClient { * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code formUrl}, {@code modelId} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeCustomFormsFromUrl(String modelId, String formUrl, RecognizeCustomFormsOptions recognizeCustomFormsOptions) { @@ -177,7 +177,7 @@ isFieldElementsIncluded, new SourcePath().setSource(formUrl), context).map(respo * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code form}, {@code modelId} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeCustomForms(String modelId, Flux form, long length) { return beginRecognizeCustomForms(modelId, form, length, null); @@ -207,7 +207,7 @@ isFieldElementsIncluded, new SourcePath().setSource(formUrl), context).map(respo * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code form}, {@code modelId} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeCustomForms(String modelId, Flux form, long length, RecognizeCustomFormsOptions recognizeCustomFormsOptions) { @@ -262,7 +262,7 @@ isFieldElementsIncluded, new SourcePath().setSource(formUrl), context).map(respo * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code formUrl} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeContentFromUrl(String formUrl) { return beginRecognizeContentFromUrl(formUrl, null); } @@ -286,7 +286,7 @@ public PollerFlux> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code formUrl} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeContentFromUrl(String formUrl, RecognizeContentOptions recognizeContentOptions) { return beginRecognizeContentFromUrl(formUrl, recognizeContentOptions, Context.NONE); @@ -337,7 +337,7 @@ public PollerFlux> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code form} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeContent( Flux form, long length) { return beginRecognizeContent(form, length, null); @@ -365,7 +365,7 @@ public PollerFlux> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code form} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeContent(Flux form, long length, RecognizeContentOptions recognizeContentOptions) { return beginRecognizeContent(form, length, recognizeContentOptions, Context.NONE); @@ -413,7 +413,7 @@ PollerFlux> beginRecognizeContent( * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code receiptUrl} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeReceiptsFromUrl(String receiptUrl) { return beginRecognizeReceiptsFromUrl(receiptUrl, null); @@ -438,7 +438,7 @@ PollerFlux> beginRecognizeContent( * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code receiptUrl} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeReceiptsFromUrl(String receiptUrl, RecognizeReceiptsOptions recognizeReceiptsOptions) { return beginRecognizeReceiptsFromUrl(receiptUrl, recognizeReceiptsOptions, Context.NONE); @@ -493,7 +493,7 @@ PollerFlux> beginRecognizeContent( * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code receipt} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeReceipts( Flux receipt, long length) { return beginRecognizeReceipts(receipt, length, null); @@ -523,7 +523,7 @@ public PollerFlux> beginReco * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code receipt} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux> beginRecognizeReceipts(Flux receipt, long length, RecognizeReceiptsOptions recognizeReceiptsOptions) { diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java index b96494d8f1758..d7ef1fa162c59 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java @@ -66,7 +66,7 @@ public final class FormRecognizerClient { * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code formUrl}, {@code modelId} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeCustomFormsFromUrl(String modelId, String formUrl) { return beginRecognizeCustomFormsFromUrl(modelId, formUrl, null, Context.NONE); @@ -93,7 +93,7 @@ public final class FormRecognizerClient { * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code formUrl}, {@code modelId} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeCustomFormsFromUrl(String modelId, String formUrl, RecognizeCustomFormsOptions recognizeCustomFormsOptions, Context context) { @@ -121,7 +121,7 @@ public final class FormRecognizerClient { * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code form}, {@code modelId} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeCustomForms(String modelId, InputStream form, long length) { return beginRecognizeCustomForms(modelId, form, length, null, Context.NONE); @@ -149,7 +149,7 @@ public final class FormRecognizerClient { * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code form}, {@code modelId} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeCustomForms(String modelId, InputStream form, long length, RecognizeCustomFormsOptions recognizeCustomFormsOptions, Context context) { @@ -174,7 +174,7 @@ public final class FormRecognizerClient { * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code formUrl} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeContentFromUrl(String formUrl) { return beginRecognizeContentFromUrl(formUrl, null, Context.NONE); } @@ -198,7 +198,7 @@ public SyncPoller> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code formUrl} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeContentFromUrl(String formUrl, RecognizeContentOptions recognizeContentOptions, Context context) { @@ -222,7 +222,7 @@ public SyncPoller> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code form} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeContent(InputStream form, long length) { return beginRecognizeContent(form, length, null, Context.NONE); @@ -248,7 +248,7 @@ public SyncPoller> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code form} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeContent(InputStream form, long length, RecognizeContentOptions recognizeContentOptions, Context context) { Flux buffer = Utility.toFluxByteBuffer(form); @@ -273,7 +273,7 @@ public SyncPoller> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code receiptUrl} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeReceiptsFromUrl(String receiptUrl) { return beginRecognizeReceiptsFromUrl(receiptUrl, null, Context.NONE); @@ -299,7 +299,7 @@ public SyncPoller> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code receiptUrl} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeReceiptsFromUrl(String receiptUrl, RecognizeReceiptsOptions recognizeReceiptsOptions, Context context) { @@ -325,7 +325,7 @@ public SyncPoller> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code receipt} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeReceipts(InputStream receipt, long length) { return beginRecognizeReceipts(receipt, length, null, Context.NONE); @@ -353,7 +353,7 @@ public SyncPoller> beginRecognizeC * an {@link OperationStatus#FAILED}. * @throws NullPointerException If {@code receipt} is null. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller> beginRecognizeReceipts(InputStream receipt, long length, RecognizeReceiptsOptions recognizeReceiptsOptions, Context context) { diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/FormRecognizerClientImpl.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/FormRecognizerClientImpl.java index 83f192ef4af9b..66428501cef83 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/FormRecognizerClientImpl.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/FormRecognizerClientImpl.java @@ -2050,7 +2050,7 @@ public Mono> listCustomModelsSinglePageAsync(Context co * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about all custom models. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PagedFlux listCustomModelsAsync() { return new PagedFlux<>( () -> listCustomModelsSinglePageAsync(), nextLink -> listCustomModelsNextSinglePageAsync(nextLink)); @@ -2065,7 +2065,7 @@ public PagedFlux listCustomModelsAsync() { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about all custom models. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PagedFlux listCustomModelsAsync(Context context) { return new PagedFlux<>( () -> listCustomModelsSinglePageAsync(context), @@ -2079,7 +2079,7 @@ public PagedFlux listCustomModelsAsync(Context context) { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about all custom models. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PagedIterable listCustomModels() { return new PagedIterable<>(listCustomModelsAsync()); } @@ -2093,7 +2093,7 @@ public PagedIterable listCustomModels() { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about all custom models. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PagedIterable listCustomModels(Context context) { return new PagedIterable<>(listCustomModelsAsync(context)); } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java index 6409b730e1622..4037ab3f35510 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java @@ -331,7 +331,7 @@ Mono> deleteModelWithResponse(String modelId, Context context) { * * @return {@link PagedFlux} of {@link CustomFormModelInfo}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PagedFlux listCustomModels() { try { return new PagedFlux<>(() -> withContext(this::listFirstPageModelInfo), diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java index 95711cde28abd..c2d414348b957 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java +++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java @@ -224,7 +224,7 @@ public Response deleteModelWithResponse(String modelId, Context context) { * * @return {@link PagedIterable} of {@link CustomFormModelInfo} custom form model information. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PagedIterable listCustomModels() { return new PagedIterable<>(client.listCustomModels(Context.NONE)); } @@ -240,7 +240,7 @@ public PagedIterable listCustomModels() { * * @return {@link PagedIterable} of {@link CustomFormModelInfo} custom form model information. */ - @ServiceMethod(returns = ReturnType.COLLECTION) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PagedIterable listCustomModels(Context context) { return new PagedIterable<>(client.listCustomModels(context)); }