recognizeEntitiesBatchWithRes
return client.recognizeEntityAsyncClient.recognizeEntitiesBatchWithContext(documents, options, context).block();
}
- // PII Entity
- /**
- * Returns a list of Personally Identifiable Information(PII) entities in the provided document.
- *
- * For a list of supported entity types, check: this
- * For a list of enabled languages, check: this. This method will use the
- * default language that is set using {@link TextAnalyticsClientBuilder#defaultLanguage(String)}. If none is
- * specified, service will use 'en' as the language.
- *
- * Code Sample
- * Recognize the PII entities details in a document.
- *
- * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntities#String}
- *
- * @param document The document to recognize PII entities details for.
- * For text length limits, maximum batch size, and supported text encoding, see
- * data limits.
- *
- * @return A {@link PiiEntityCollection recognized PII entities collection}.
- *
- * @throws NullPointerException if {@code document} is null.
- * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PiiEntityCollection recognizePiiEntities(String document) {
- return recognizePiiEntities(document, client.getDefaultLanguage());
- }
-
- /**
- * Returns a list of Personally Identifiable Information(PII) entities in the provided document
- * with provided language code.
- *
- * For a list of supported entity types, check: this
- * For a list of enabled languages, check: this
- *
- * Code Sample
- * Recognizes the PII entities details in a document with a provided language code.
- *
- * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntities#String-String}
- *
- * @param document The document to recognize PII entities details for.
- * For text length limits, maximum batch size, and supported text encoding, see
- * data limits.
- * @param language The 2 letter ISO 639-1 representation of language. If not set, uses "en" for English as default.
- *
- * @return The {@link PiiEntityCollection recognized PII entities collection}.
- *
- * @throws NullPointerException if {@code document} is null.
- * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PiiEntityCollection recognizePiiEntities(String document, String language) {
- return client.recognizePiiEntities(document, language).block();
- }
-
- /**
- * Returns a list of Personally Identifiable Information(PII) entities in the provided document
- * with provided language code.
- *
- * For a list of supported entity types, check: this
- * For a list of enabled languages, check: this
- *
- * Code Sample
- * Recognizes the PII entities details in a document with a provided language code and
- * RecognizePiiEntityOptions.
- *
- * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntities#String-String-RecognizePiiEntityOptions}
- *
- * @param document The document to recognize PII entities details for.
- * For text length limits, maximum batch size, and supported text encoding, see
- * data limits.
- * @param language The 2 letter ISO 639-1 representation of language. If not set, uses "en" for English as default.
- * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when
- * recognizing PII entities.
- *
- * @return The {@link PiiEntityCollection recognized PII entities collection}.
- *
- * @throws NullPointerException if {@code document} is null.
- * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PiiEntityCollection recognizePiiEntities(String document, String language,
- RecognizePiiEntityOptions options) {
- return client.recognizePiiEntities(document, language, options).block();
- }
-
- /**
- * Returns a list of Personally Identifiable Information(PII) entities for the provided list of documents with
- * provided language code and request options.
- *
- * Code Sample
- * Recognizes the PII entities details in a list of documents with a provided language code
- * and request options.
- *
- * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-String-RecognizePiiEntityOptions}
- *
- * @param documents A list of documents to recognize PII entities for.
- * For text length limits, maximum batch size, and supported text encoding, see
- * data limits.
- * @param language The 2 letter ISO 639-1 representation of language. If not set, uses "en" for English as default.
- * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when
- * recognizing PII entities.
- *
- * @return A {@link RecognizePiiEntitiesResultCollection}.
- *
- * @throws NullPointerException if {@code documents} is null.
- * @throws IllegalArgumentException if {@code documents} is empty.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RecognizePiiEntitiesResultCollection recognizePiiEntitiesBatch(
- Iterable documents, String language, RecognizePiiEntityOptions options) {
- return client.recognizePiiEntitiesBatch(documents, language, options).block();
- }
-
- /**
- * Returns a list of Personally Identifiable Information(PII) entities for the provided list of
- * {@link TextDocumentInput document} with provided request options.
- *
- * Code Sample
- * Recognizes the PII entities details with http response in a list of {@link TextDocumentInput document}
- * with provided request options.
- *
- * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizePiiEntitiesBatch#Iterable-RecognizePiiEntityOptions-Context}
- *
- * @param documents A list of {@link TextDocumentInput documents} to recognize PII entities for.
- * For text length limits, maximum batch size, and supported text encoding, see
- * data limits.
- * @param options The additional configurable {@link RecognizePiiEntityOptions options} that may be passed when
- * recognizing PII entities.
- * @param context Additional context that is passed through the Http pipeline during the service call.
- *
- * @return A {@link Response} that contains a {@link RecognizePiiEntitiesResultCollection}.
- *
- * @throws NullPointerException if {@code documents} is null.
- * @throws IllegalArgumentException if {@code documents} is empty.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response recognizePiiEntitiesBatchWithResponse(
- Iterable documents, RecognizePiiEntityOptions options, Context context) {
- return client.recognizePiiEntityAsyncClient.recognizePiiEntitiesBatchWithContext(documents, options,
- context).block();
- }
-
// Linked Entities
/**
* Returns a list of recognized entities with links to a well-known knowledge base for the provided document.
* See this for supported languages in Text Analytics API.
*
- * This method will use the default language that can be set by using method
+ * This method will use the default language that sets up in
* {@link TextAnalyticsClientBuilder#defaultLanguage(String)}. If none is specified, service will use 'en' as
* the language.
*
@@ -448,13 +302,13 @@ public Response recognizePiiEntitiesBatchW
* Recognize the linked entities of documents
* {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.recognizeLinkedEntities#String}
*
- * @param document The document to recognize linked entities for.
+ * @param document the document to recognize linked entities for.
* For text length limits, maximum batch size, and supported text encoding, see
* data limits.
*
* @return A {@link LinkedEntityCollection} contains a list of {@link LinkedEntity recognized linked entities}.
*
- * @throws NullPointerException if {@code document} is null.
+ * @throws NullPointerException if {@code document} is {@code null}.
* @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -480,7 +334,7 @@ public LinkedEntityCollection recognizeLinkedEntities(String document) {
*
* @return A {@link LinkedEntityCollection} contains a list of {@link LinkedEntity recognized linked entities}.
*
- * @throws NullPointerException if {@code document} is null.
+ * @throws NullPointerException if {@code document} is {@code null}.
* @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -510,7 +364,7 @@ public LinkedEntityCollection recognizeLinkedEntities(String document, String la
*
* @return A {@link RecognizeLinkedEntitiesResultCollection}.
*
- * @throws NullPointerException if {@code documents} is null.
+ * @throws NullPointerException if {@code documents} is {@code null}.
* @throws IllegalArgumentException if {@code documents} is empty.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -540,7 +394,7 @@ public RecognizeLinkedEntitiesResultCollection recognizeLinkedEntitiesBatch(
*
* @return A {@link Response} that contains a {@link RecognizeLinkedEntitiesResultCollection}.
*
- * @throws NullPointerException if {@code documents} is null.
+ * @throws NullPointerException if {@code documents} is {@code null}.
* @throws IllegalArgumentException if {@code documents} is empty.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -556,7 +410,7 @@ public RecognizeLinkedEntitiesResultCollection recognizeLinkedEntitiesBatch(
/**
* Returns a list of strings denoting the key phrases in the document.
*
- * This method will use the default language that can be set by using method
+ * This method will use the default language that sets up in
* {@link TextAnalyticsClientBuilder#defaultLanguage(String)}. If none is specified, service will use 'en' as
* the language.
*
@@ -570,7 +424,7 @@ public RecognizeLinkedEntitiesResultCollection recognizeLinkedEntitiesBatch(
*
* @return A {@link KeyPhrasesCollection} contains a list of extracted key phrases.
*
- * @throws NullPointerException if {@code document} is null.
+ * @throws NullPointerException if {@code document} is {@code null}.
* @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -594,7 +448,7 @@ public KeyPhrasesCollection extractKeyPhrases(String document) {
*
* @return A {@link KeyPhrasesCollection} contains a list of extracted key phrases.
*
- * @throws NullPointerException if {@code document} is null.
+ * @throws NullPointerException if {@code document} is {@code null}.
* @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -623,7 +477,7 @@ public KeyPhrasesCollection extractKeyPhrases(String document, String language)
*
* @return A {@link ExtractKeyPhrasesResultCollection}.
*
- * @throws NullPointerException if {@code documents} is null.
+ * @throws NullPointerException if {@code documents} is {@code null}.
* @throws IllegalArgumentException if {@code documents} is empty.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -652,7 +506,7 @@ public ExtractKeyPhrasesResultCollection extractKeyPhrasesBatch(
*
* @return A {@link Response} that contains a {@link ExtractKeyPhrasesResultCollection}.
*
- * @throws NullPointerException if {@code documents} is null.
+ * @throws NullPointerException if {@code documents} is {@code null}.
* @throws IllegalArgumentException if {@code documents} is empty.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -666,15 +520,14 @@ public Response extractKeyPhrasesBatchWithRes
// Sentiment
/**
* Returns a sentiment prediction, as well as confidence scores for each sentiment label
- * (Positive, Negative, and Neutral) for the document and each sentence within it.
+ * (Positive, Negative, and Neutral) for the document and each sentence within i
*
- * This method will use the default language that can be set by using method
+ * This method will use the default language that sets up in
* {@link TextAnalyticsClientBuilder#defaultLanguage(String)}. If none is specified, service will use 'en' as
* the language.
*
* Code Sample
* Analyze the sentiments of documents
- *
* {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentiment#String}
*
* @param document The document to be analyzed.
@@ -683,7 +536,7 @@ public Response extractKeyPhrasesBatchWithRes
*
* @return A {@link DocumentSentiment analyzed document sentiment} of the document.
*
- * @throws NullPointerException if {@code document} is null.
+ * @throws NullPointerException if {@code document} is {@code null}.
* @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -693,11 +546,10 @@ public DocumentSentiment analyzeSentiment(String document) {
/**
* Returns a sentiment prediction, as well as confidence scores for each sentiment label
- * (Positive, Negative, and Neutral) for the document and each sentence within it.
+ * (Positive, Negative, and Neutral) for the document and each sentence within i
*
* Code Sample
* Analyze the sentiments in a document with a provided language representation.
- *
* {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentiment#String-String}
*
* @param document The document to be analyzed.
@@ -708,45 +560,15 @@ public DocumentSentiment analyzeSentiment(String document) {
*
* @return A {@link DocumentSentiment analyzed document sentiment} of the document.
*
- * @throws NullPointerException if {@code document} is null.
+ * @throws NullPointerException if {@code document} is {@code null}.
* @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public DocumentSentiment analyzeSentiment(String document, String language) {
+ Objects.requireNonNull(document, "'document' cannot be null.");
return client.analyzeSentiment(document, language).block();
}
- /**
- * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and
- * Neutral) for the document and each sentence within it. If the {@code includeOpinionMining} of
- * {@link AnalyzeSentimentOptions} set to true, the output will include the opinion mining results. It mines the
- * opinions of a sentence and conducts more granular analysis around the aspects in the text
- * (also known as aspect-based sentiment analysis).
- *
- * Code Sample
- * Analyze the sentiment and mine the opinions for each sentence in a document with a provided language
- * representation and {@link AnalyzeSentimentOptions} options.
- *
- * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentiment#String-String-AnalyzeSentimentOptions}
- *
- * @param document The document to be analyzed.
- * For text length limits, maximum batch size, and supported text encoding, see
- * data limits.
- * @param language The 2 letter ISO 639-1 representation of language for the document. If not set, uses "en" for
- * English as default.
- * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when
- * analyzing sentiments.
- *
- * @return A {@link DocumentSentiment analyzed document sentiment} of the document.
- *
- * @throws NullPointerException if {@code document} is null.
- * @throws TextAnalyticsException if the response returned with an {@link TextAnalyticsError error}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public DocumentSentiment analyzeSentiment(String document, String language, AnalyzeSentimentOptions options) {
- return client.analyzeSentiment(document, language, options).block();
- }
-
/**
* Returns a sentiment prediction, as well as confidence scores for each sentiment label
* (Positive, Negative, and Neutral) for the document and each sentence within it.
@@ -765,44 +587,13 @@ public DocumentSentiment analyzeSentiment(String document, String language, Anal
*
* @return A {@link AnalyzeSentimentResultCollection}.
*
- * @throws NullPointerException if {@code documents} is null.
+ * @throws NullPointerException if {@code documents} is {@code null}.
* @throws IllegalArgumentException if {@code documents} is empty.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public AnalyzeSentimentResultCollection analyzeSentimentBatch(
Iterable documents, String language, TextAnalyticsRequestOptions options) {
- return client.analyzeSentimentBatch(documents, language, options).block();
- }
-
- /**
- * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and
- * Neutral) for the document and each sentence within it. If the {@code includeOpinionMining} of
- * {@link AnalyzeSentimentOptions} set to true, the output will include the opinion mining results. It mines the
- * opinions of a sentence and conducts more granular analysis around the aspects in the text
- * (also known as aspect-based sentiment analysis).
- *
- * Code Sample
- * Analyze the sentiments and mine the opinions for each sentence in a list of documents with a provided language
- * representation and {@link AnalyzeSentimentOptions} options.
- *
- * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-String-AnalyzeSentimentOptions}
- *
- * @param documents A list of documents to be analyzed.
- * For text length limits, maximum batch size, and supported text encoding, see
- * data limits.
- * @param language The 2 letter ISO 639-1 representation of language for the documents. If not set, uses "en" for
- * English as default.
- * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when
- * analyzing sentiments.
- *
- * @return A {@link AnalyzeSentimentResultCollection}.
- *
- * @throws NullPointerException if {@code documents} is null.
- * @throws IllegalArgumentException if {@code documents} is empty.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public AnalyzeSentimentResultCollection analyzeSentimentBatch(Iterable documents,
- String language, AnalyzeSentimentOptions options) {
+ inputDocumentsValidation(documents);
return client.analyzeSentimentBatch(documents, language, options).block();
}
@@ -811,8 +602,8 @@ public AnalyzeSentimentResultCollection analyzeSentimentBatch(Iterable d
* (Positive, Negative, and Neutral) for the document and each sentence within it.
*
* Code Sample
- * Analyze sentiment in a list of {@link TextDocumentInput document} with provided request options.
- *
+ * Analyze the sentiments with http response in a list of {@link TextDocumentInput documents} with request
+ * options.
* {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-TextAnalyticsRequestOptions-Context}
*
* @param documents A list of {@link TextDocumentInput documents} to be analyzed.
@@ -824,46 +615,13 @@ public AnalyzeSentimentResultCollection analyzeSentimentBatch(Iterable d
*
* @return A {@link Response} that contains a {@link AnalyzeSentimentResultCollection}.
*
- * @throws NullPointerException if {@code documents} is null.
+ * @throws NullPointerException if {@code documents} is {@code null}.
* @throws IllegalArgumentException if {@code documents} is empty.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response analyzeSentimentBatchWithResponse(
Iterable documents, TextAnalyticsRequestOptions options, Context context) {
- return client.analyzeSentimentAsyncClient.analyzeSentimentBatchWithContext(documents,
- new AnalyzeSentimentOptions()
- .setIncludeStatistics(options == null ? false : options.isIncludeStatistics())
- .setModelVersion(options == null ? null : options.getModelVersion()), context).block();
- }
-
- /**
- * Returns a sentiment prediction, as well as confidence scores for each sentiment label (Positive, Negative, and
- * Neutral) for the document and each sentence within it. If the {@code includeOpinionMining} of
- * {@link AnalyzeSentimentOptions} set to true, the output will include the opinion mining results. It mines the
- * opinions of a sentence and conducts more granular analysis around the aspects in the text
- * (also known as aspect-based sentiment analysis).
- *
- * Code Sample
- * Analyze sentiment and mine the opinions for each sentence in a list of
- * {@link TextDocumentInput document} with provided {@link AnalyzeSentimentOptions} options.
- *
- * {@codesnippet com.azure.ai.textanalytics.TextAnalyticsClient.analyzeSentimentBatch#Iterable-AnalyzeSentimentOptions-Context}
- *
- * @param documents A list of {@link TextDocumentInput documents} to be analyzed.
- * For text length limits, maximum batch size, and supported text encoding, see
- * data limits.
- * @param options The additional configurable {@link AnalyzeSentimentOptions options} that may be passed when
- * analyzing sentiments.
- * @param context Additional context that is passed through the Http pipeline during the service call.
- *
- * @return A {@link Response} that contains a {@link AnalyzeSentimentResultCollection}.
- *
- * @throws NullPointerException if {@code documents} is null.
- * @throws IllegalArgumentException if {@code documents} is empty.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response analyzeSentimentBatchWithResponse(
- Iterable documents, AnalyzeSentimentOptions options, Context context) {
+ inputDocumentsValidation(documents);
return client.analyzeSentimentAsyncClient.analyzeSentimentBatchWithContext(documents, options, context).block();
}
}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java
index 7b45936e81500..b78dfeac66104 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java
@@ -200,7 +200,7 @@ public TextAnalyticsAsyncClient buildAsyncClient() {
final TextAnalyticsClientImpl textAnalyticsAPI = new TextAnalyticsClientImplBuilder()
.endpoint(endpoint)
.pipeline(pipeline)
- .buildClient();
+ .build();
return new TextAnalyticsAsyncClient(textAnalyticsAPI, serviceVersion, defaultCountryHint, defaultLanguage);
}
@@ -259,7 +259,7 @@ public TextAnalyticsClientBuilder endpoint(String endpoint) {
*
* @param keyCredential {@link AzureKeyCredential} API key credential
* @return The updated {@link TextAnalyticsClientBuilder} object.
- * @throws NullPointerException If {@code keyCredential} is null
+ * @throws NullPointerException If {@code keyCredential} is {@code null}
*/
public TextAnalyticsClientBuilder credential(AzureKeyCredential keyCredential) {
this.credential = Objects.requireNonNull(keyCredential, "'keyCredential' cannot be null.");
@@ -271,7 +271,7 @@ public TextAnalyticsClientBuilder credential(AzureKeyCredential keyCredential) {
*
* @param tokenCredential {@link TokenCredential} used to authenticate HTTP requests.
* @return The updated {@link TextAnalyticsClientBuilder} object.
- * @throws NullPointerException If {@code tokenCredential} is null.
+ * @throws NullPointerException If {@code tokenCredential} is {@code null}.
*/
public TextAnalyticsClientBuilder credential(TokenCredential tokenCredential) {
Objects.requireNonNull(tokenCredential, "'tokenCredential' cannot be null.");
@@ -297,7 +297,7 @@ public TextAnalyticsClientBuilder httpLogOptions(HttpLogOptions logOptions) {
*
* @param policy The retry policy for service requests.
* @return The updated {@link TextAnalyticsClientBuilder} object.
- * @throws NullPointerException If {@code policy} is null.
+ * @throws NullPointerException If {@code policy} is {@code null}.
*/
public TextAnalyticsClientBuilder addPolicy(HttpPipelinePolicy policy) {
policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java
index d71d1b2bdf3d1..0dff36a6128a6 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsServiceVersion.java
@@ -9,8 +9,7 @@
* The versions of Azure Text Analytics supported by this client library.
*/
public enum TextAnalyticsServiceVersion implements ServiceVersion {
- V3_0("v3.0"),
- V3_1_PREVIEW_2("v3.1-preview.2");
+ V3_0("v3.0");
private final String version;
@@ -32,7 +31,7 @@ public String getVersion() {
* @return the latest {@link TextAnalyticsServiceVersion}
*/
public static TextAnalyticsServiceVersion getLatest() {
- return V3_1_PREVIEW_2;
+ return V3_0;
}
}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java
index 358912b3727d0..858589603bdcc 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImpl.java
@@ -6,14 +6,12 @@
import com.azure.ai.textanalytics.implementation.models.EntitiesResult;
import com.azure.ai.textanalytics.implementation.models.EntityLinkingResult;
-import com.azure.ai.textanalytics.implementation.models.ErrorResponseException;
import com.azure.ai.textanalytics.implementation.models.KeyPhraseResult;
import com.azure.ai.textanalytics.implementation.models.LanguageBatchInput;
import com.azure.ai.textanalytics.implementation.models.LanguageResult;
import com.azure.ai.textanalytics.implementation.models.MultiLanguageBatchInput;
-import com.azure.ai.textanalytics.implementation.models.PiiEntitiesResult;
import com.azure.ai.textanalytics.implementation.models.SentimentResponse;
-import com.azure.ai.textanalytics.implementation.models.StringIndexType;
+import com.azure.ai.textanalytics.implementation.models.TextAnalyticsErrorException;
import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Host;
@@ -29,298 +27,272 @@
import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
-import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
+import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
import reactor.core.publisher.Mono;
-/** Initializes a new instance of the TextAnalyticsClient type. */
+/**
+ * Initializes a new instance of the TextAnalyticsClient type.
+ */
public final class TextAnalyticsClientImpl {
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final TextAnalyticsClientService service;
/**
- * Supported Cognitive Services endpoints (protocol and hostname, for example:
- * https://westus.api.cognitive.microsoft.com).
+ * Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).
*/
- private final String endpoint;
+ private String endpoint;
/**
- * Gets Supported Cognitive Services endpoints (protocol and hostname, for example:
- * https://westus.api.cognitive.microsoft.com).
- *
+ * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).
+ *
* @return the endpoint value.
*/
public String getEndpoint() {
return this.endpoint;
}
- /** The HTTP pipeline to send requests through. */
+ /**
+ * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).
+ *
+ * @param endpoint the endpoint value.
+ * @return the service client itself.
+ */
+ public TextAnalyticsClientImpl setEndpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
private final HttpPipeline httpPipeline;
/**
* Gets The HTTP pipeline to send requests through.
- *
+ *
* @return the httpPipeline value.
*/
public HttpPipeline getHttpPipeline() {
return this.httpPipeline;
}
- /** Initializes an instance of TextAnalyticsClient client. */
- TextAnalyticsClientImpl(String endpoint) {
- this(
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build(),
- endpoint);
+ /**
+ * Initializes an instance of TextAnalyticsClient client.
+ */
+ public TextAnalyticsClientImpl() {
+ this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build());
}
/**
* Initializes an instance of TextAnalyticsClient client.
- *
+ *
* @param httpPipeline The HTTP pipeline to send requests through.
*/
- TextAnalyticsClientImpl(HttpPipeline httpPipeline, String endpoint) {
+ public TextAnalyticsClientImpl(HttpPipeline httpPipeline) {
this.httpPipeline = httpPipeline;
- this.endpoint = endpoint;
this.service = RestProxy.create(TextAnalyticsClientService.class, this.httpPipeline);
}
/**
- * The interface defining all the services for TextAnalyticsClient to be used by the proxy service to perform REST
- * calls.
+ * The interface defining all the services for TextAnalyticsClient to be
+ * used by the proxy service to perform REST calls.
*/
- @Host("{Endpoint}/text/analytics/v3.1-preview.2")
+ @Host("{Endpoint}/text/analytics/v3.0")
@ServiceInterface(name = "TextAnalyticsClient")
private interface TextAnalyticsClientService {
@Post("/entities/recognition/general")
@ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ErrorResponseException.class)
- Mono> entitiesRecognitionGeneral(
- @HostParam("Endpoint") String endpoint,
- @QueryParam("model-version") String modelVersion,
- @QueryParam("showStats") Boolean showStats,
- @QueryParam("stringIndexType") StringIndexType stringIndexType,
- @BodyParam("application/json") MultiLanguageBatchInput input,
- Context context);
-
- @Post("/entities/recognition/pii")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ErrorResponseException.class)
- Mono> entitiesRecognitionPii(
- @HostParam("Endpoint") String endpoint,
- @QueryParam("model-version") String modelVersion,
- @QueryParam("showStats") Boolean showStats,
- @QueryParam("domain") String domain,
- @QueryParam("stringIndexType") StringIndexType stringIndexType,
- @BodyParam("application/json") MultiLanguageBatchInput input,
- Context context);
+ @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class)
+ Mono> entitiesRecognitionGeneral(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") MultiLanguageBatchInput input, Context context);
@Post("/entities/linking")
@ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ErrorResponseException.class)
- Mono> entitiesLinking(
- @HostParam("Endpoint") String endpoint,
- @QueryParam("model-version") String modelVersion,
- @QueryParam("showStats") Boolean showStats,
- @QueryParam("stringIndexType") StringIndexType stringIndexType,
- @BodyParam("application/json") MultiLanguageBatchInput input,
- Context context);
+ @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class)
+ Mono> entitiesLinking(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") MultiLanguageBatchInput input, Context context);
@Post("/keyPhrases")
@ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ErrorResponseException.class)
- Mono> keyPhrases(
- @HostParam("Endpoint") String endpoint,
- @QueryParam("model-version") String modelVersion,
- @QueryParam("showStats") Boolean showStats,
- @BodyParam("application/json") MultiLanguageBatchInput input,
- Context context);
+ @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class)
+ Mono> keyPhrases(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") MultiLanguageBatchInput input, Context context);
@Post("/languages")
@ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ErrorResponseException.class)
- Mono> languages(
- @HostParam("Endpoint") String endpoint,
- @QueryParam("model-version") String modelVersion,
- @QueryParam("showStats") Boolean showStats,
- @BodyParam("application/json") LanguageBatchInput input,
- Context context);
+ @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class)
+ Mono> languages(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") LanguageBatchInput input, Context context);
@Post("/sentiment")
@ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ErrorResponseException.class)
- Mono> sentiment(
- @HostParam("Endpoint") String endpoint,
- @QueryParam("model-version") String modelVersion,
- @QueryParam("showStats") Boolean showStats,
- @QueryParam("opinionMining") Boolean opinionMining,
- @QueryParam("stringIndexType") StringIndexType stringIndexType,
- @BodyParam("application/json") MultiLanguageBatchInput input,
- Context context);
+ @UnexpectedResponseExceptionType(TextAnalyticsErrorException.class)
+ Mono> sentiment(@HostParam("Endpoint") String endpoint, @QueryParam("model-version") String modelVersion, @QueryParam("showStats") Boolean showStats, @BodyParam("application/json") MultiLanguageBatchInput input, Context context);
}
/**
- * The API returns a list of general named entities in a given document. For the list of supported entity types,
- * check <a href="https://aka.ms/taner">Supported Entity Types in Text Analytics API</a>. See the <a
- * href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled
- * languages.
- *
+ * The API returns a list of general named entities in a given document. For the list of supported entity types, check <a href="https://aka.ms/taner">Supported Entity Types in Text Analytics API</a>. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
* @param input Contains a set of input documents to be analyzed by the service.
- * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is
- * not specified, the API should default to the latest, non-preview version.
- * @param showStats (Optional) if set to true, response will contain request and document level statistics.
- * @param stringIndexType (Optional) Specifies the method used to interpret string offsets. Defaults to Text
- * Elements (Graphemes) according to Unicode v8.0.0. For additional information see
- * https://aka.ms/text-analytics-offsets.
- * @param context The context to associate with this operation.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
* @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> entitiesRecognitionGeneralWithResponseAsync(
- MultiLanguageBatchInput input,
- String modelVersion,
- Boolean showStats,
- StringIndexType stringIndexType,
- Context context) {
- return service.entitiesRecognitionGeneral(
- this.getEndpoint(), modelVersion, showStats, stringIndexType, input, context);
+ public Mono> entitiesRecognitionGeneralWithResponseAsync(MultiLanguageBatchInput input, String modelVersion, Boolean showStats) {
+ return FluxUtil.withContext(context -> service.entitiesRecognitionGeneral(this.getEndpoint(), modelVersion, showStats, input, context));
}
/**
- * The API returns a list of entities with personal information (\"SSN\", \"Bank Account\" etc) in the document. For
- * the list of supported entity types, check <a href="https://aka.ms/tanerpii">Supported Entity Types in Text
- * Analytics API</a>. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics
- * API</a> for the list of enabled languages.
- *
+ * The API returns a list of general named entities in a given document. For the list of supported entity types, check <a href="https://aka.ms/taner">Supported Entity Types in Text Analytics API</a>. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
* @param input Contains a set of input documents to be analyzed by the service.
- * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is
- * not specified, the API should default to the latest, non-preview version.
- * @param showStats (Optional) if set to true, response will contain request and document level statistics.
- * @param domain (Optional) if set to 'PHI', response will contain only PHI entities.
- * @param stringIndexType (Optional) Specifies the method used to interpret string offsets. Defaults to Text
- * Elements (Graphemes) according to Unicode v8.0.0. For additional information see
- * https://aka.ms/text-analytics-offsets.
* @param context The context to associate with this operation.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
* @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> entitiesRecognitionPiiWithResponseAsync(
- MultiLanguageBatchInput input,
- String modelVersion,
- Boolean showStats,
- String domain,
- StringIndexType stringIndexType,
- Context context) {
- return service.entitiesRecognitionPii(
- this.getEndpoint(), modelVersion, showStats, domain, stringIndexType, input, context);
+ public Mono> entitiesRecognitionGeneralWithResponseAsync(MultiLanguageBatchInput input, Context context, String modelVersion, Boolean showStats) {
+ return service.entitiesRecognitionGeneral(this.getEndpoint(), modelVersion, showStats, input, context);
}
/**
- * The API returns a list of recognized entities with links to a well-known knowledge base. See the <a
- * href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled
- * languages.
- *
+ * The API returns a list of recognized entities with links to a well-known knowledge base. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
+ * @param input Contains a set of input documents to be analyzed by the service.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> entitiesLinkingWithResponseAsync(MultiLanguageBatchInput input, String modelVersion, Boolean showStats) {
+ return FluxUtil.withContext(context -> service.entitiesLinking(this.getEndpoint(), modelVersion, showStats, input, context));
+ }
+
+ /**
+ * The API returns a list of recognized entities with links to a well-known knowledge base. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
* @param input Contains a set of input documents to be analyzed by the service.
- * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is
- * not specified, the API should default to the latest, non-preview version.
- * @param showStats (Optional) if set to true, response will contain request and document level statistics.
- * @param stringIndexType (Optional) Specifies the method used to interpret string offsets. Defaults to Text
- * Elements (Graphemes) according to Unicode v8.0.0. For additional information see
- * https://aka.ms/text-analytics-offsets.
* @param context The context to associate with this operation.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
* @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> entitiesLinkingWithResponseAsync(
- MultiLanguageBatchInput input,
- String modelVersion,
- Boolean showStats,
- StringIndexType stringIndexType,
- Context context) {
- return service.entitiesLinking(this.getEndpoint(), modelVersion, showStats, stringIndexType, input, context);
+ public Mono> entitiesLinkingWithResponseAsync(MultiLanguageBatchInput input, Context context, String modelVersion, Boolean showStats) {
+ return service.entitiesLinking(this.getEndpoint(), modelVersion, showStats, input, context);
}
/**
- * The API returns a list of strings denoting the key phrases in the input text. See the <a
- * href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled
- * languages.
- *
+ * The API returns a list of strings denoting the key phrases in the input text. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
+ * @param input Contains a set of input documents to be analyzed by the service.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> keyPhrasesWithResponseAsync(MultiLanguageBatchInput input, String modelVersion, Boolean showStats) {
+ return FluxUtil.withContext(context -> service.keyPhrases(this.getEndpoint(), modelVersion, showStats, input, context));
+ }
+
+ /**
+ * The API returns a list of strings denoting the key phrases in the input text. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
* @param input Contains a set of input documents to be analyzed by the service.
- * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is
- * not specified, the API should default to the latest, non-preview version.
- * @param showStats (Optional) if set to true, response will contain request and document level statistics.
* @param context The context to associate with this operation.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
* @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> keyPhrasesWithResponseAsync(
- MultiLanguageBatchInput input, String modelVersion, Boolean showStats, Context context) {
+ public Mono> keyPhrasesWithResponseAsync(MultiLanguageBatchInput input, Context context, String modelVersion, Boolean showStats) {
return service.keyPhrases(this.getEndpoint(), modelVersion, showStats, input, context);
}
/**
- * The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100%
- * certainty that the identified language is true. See the <a href="https://aka.ms/talangs">Supported
- * languages in Text Analytics API</a> for the list of enabled languages.
- *
- * @param input Collection of documents to analyze for language endpoint.
- * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is
- * not specified, the API should default to the latest, non-preview version.
- * @param showStats (Optional) if set to true, response will contain request and document level statistics.
+ * The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
+ * @param input Collection of documents to analyze.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> languagesWithResponseAsync(LanguageBatchInput input, String modelVersion, Boolean showStats) {
+ return FluxUtil.withContext(context -> service.languages(this.getEndpoint(), modelVersion, showStats, input, context));
+ }
+
+ /**
+ * The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
+ * @param input Collection of documents to analyze.
* @param context The context to associate with this operation.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
* @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> languagesWithResponseAsync(
- LanguageBatchInput input, String modelVersion, Boolean showStats, Context context) {
+ public Mono> languagesWithResponseAsync(LanguageBatchInput input, Context context, String modelVersion, Boolean showStats) {
return service.languages(this.getEndpoint(), modelVersion, showStats, input, context);
}
/**
- * The API returns a detailed sentiment analysis for the input text. The analysis is done in multiple levels of
- * granularity, start from the a document level, down to sentence and key terms (aspects) and opinions.
- *
+ * The API returns a sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral) for the document and each sentence within it. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
+ * @param input Contains a set of input documents to be analyzed by the service.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> sentimentWithResponseAsync(MultiLanguageBatchInput input, String modelVersion, Boolean showStats) {
+ return FluxUtil.withContext(context -> service.sentiment(this.getEndpoint(), modelVersion, showStats, input, context));
+ }
+
+ /**
+ * The API returns a sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral) for the document and each sentence within it. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
+ *
* @param input Contains a set of input documents to be analyzed by the service.
- * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is
- * not specified, the API should default to the latest, non-preview version.
- * @param showStats (Optional) if set to true, response will contain request and document level statistics.
- * @param opinionMining (Optional) if set to true, response will contain input and document level statistics
- * including aspect-based sentiment analysis results.
- * @param stringIndexType (Optional) Specifies the method used to interpret string offsets. Defaults to Text
- * Elements (Graphemes) according to Unicode v8.0.0. For additional information see
- * https://aka.ms/text-analytics-offsets.
* @param context The context to associate with this operation.
+ * @param modelVersion (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version.
+ * @param showStats (Optional) if set to true, response will contain input and document level statistics.
* @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws TextAnalyticsErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> sentimentWithResponseAsync(
- MultiLanguageBatchInput input,
- String modelVersion,
- Boolean showStats,
- Boolean opinionMining,
- StringIndexType stringIndexType,
- Context context) {
- return service.sentiment(
- this.getEndpoint(), modelVersion, showStats, opinionMining, stringIndexType, input, context);
+ public Mono> sentimentWithResponseAsync(MultiLanguageBatchInput input, Context context, String modelVersion, Boolean showStats) {
+ return service.sentiment(this.getEndpoint(), modelVersion, showStats, input, context);
}
}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImplBuilder.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImplBuilder.java
index 340cd55b60a3d..dc59d2fc68aac 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImplBuilder.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientImplBuilder.java
@@ -11,18 +11,18 @@
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
-/** A builder for creating a new instance of the TextAnalyticsClient type. */
-@ServiceClientBuilder(serviceClients = {TextAnalyticsClientImpl.class})
+/**
+ * A builder for creating a new instance of the TextAnalyticsClient type.
+ */
+@ServiceClientBuilder(serviceClients = TextAnalyticsClientImpl.class)
public final class TextAnalyticsClientImplBuilder {
/*
- * Supported Cognitive Services endpoints (protocol and hostname, for
- * example: https://westus.api.cognitive.microsoft.com).
+ * Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).
*/
private String endpoint;
/**
- * Sets Supported Cognitive Services endpoints (protocol and hostname, for example:
- * https://westus.api.cognitive.microsoft.com).
+ * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).
*
* @param endpoint the endpoint value.
* @return the TextAnalyticsClientImplBuilder.
@@ -53,14 +53,14 @@ public TextAnalyticsClientImplBuilder pipeline(HttpPipeline pipeline) {
*
* @return an instance of TextAnalyticsClientImpl.
*/
- public TextAnalyticsClientImpl buildClient() {
+ public TextAnalyticsClientImpl build() {
if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build();
+ }
+ TextAnalyticsClientImpl client = new TextAnalyticsClientImpl(pipeline);
+ if (this.endpoint != null) {
+ client.setEndpoint(this.endpoint);
}
- TextAnalyticsClientImpl client = new TextAnalyticsClientImpl(pipeline, endpoint);
return client;
}
}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java
index c6f4a9c25c356..9555c37106f6e 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java
@@ -5,13 +5,13 @@
import com.azure.ai.textanalytics.implementation.models.DocumentStatistics;
import com.azure.ai.textanalytics.implementation.models.ErrorCodeValue;
-import com.azure.ai.textanalytics.implementation.models.ErrorResponseException;
import com.azure.ai.textanalytics.implementation.models.InnerError;
import com.azure.ai.textanalytics.implementation.models.InnerErrorCodeValue;
import com.azure.ai.textanalytics.implementation.models.LanguageInput;
import com.azure.ai.textanalytics.implementation.models.MultiLanguageInput;
import com.azure.ai.textanalytics.implementation.models.RequestStatistics;
import com.azure.ai.textanalytics.implementation.models.TextAnalyticsError;
+import com.azure.ai.textanalytics.implementation.models.TextAnalyticsErrorException;
import com.azure.ai.textanalytics.models.DetectLanguageInput;
import com.azure.ai.textanalytics.models.TextAnalyticsErrorCode;
import com.azure.ai.textanalytics.models.TextAnalyticsException;
@@ -46,7 +46,7 @@ private Utility() {
*
* @param documents A list of documents.
*
- * @throws NullPointerException if {@code documents} is null.
+ * @throws NullPointerException if {@code documents} is {@code null}.
* @throws IllegalArgumentException if {@code documents} is empty.
*/
public static void inputDocumentsValidation(Iterable> documents) {
@@ -103,17 +103,17 @@ public Mono getBodyAsString(Charset charset) {
}
/**
- * Mapping a {@link ErrorResponseException} to {@link HttpResponseException} if exist. Otherwise, return
+ * Mapping a {@link TextAnalyticsErrorException} to {@link HttpResponseException} if exist. Otherwise, return
* original {@link Throwable}.
*
* @param throwable A {@link Throwable}.
* @return A {@link HttpResponseException} or the original throwable type.
*/
public static Throwable mapToHttpResponseExceptionIfExist(Throwable throwable) {
- if (throwable instanceof ErrorResponseException) {
- ErrorResponseException errorException = (ErrorResponseException) throwable;
+ if (throwable instanceof TextAnalyticsErrorException) {
+ TextAnalyticsErrorException errorException = (TextAnalyticsErrorException) throwable;
return new HttpResponseException(errorException.getMessage(), errorException.getResponse(),
- toTextAnalyticsError(errorException.getValue().getError()));
+ toTextAnalyticsError(errorException.getValue()));
}
return throwable;
}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectConfidenceScoreLabel.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectConfidenceScoreLabel.java
deleted file mode 100644
index 668ede14eb525..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectConfidenceScoreLabel.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The AspectConfidenceScoreLabel model. */
-@Fluent
-public final class AspectConfidenceScoreLabel {
- /*
- * The positive property.
- */
- @JsonProperty(value = "positive", required = true)
- private double positive;
-
- /*
- * The negative property.
- */
- @JsonProperty(value = "negative", required = true)
- private double negative;
-
- /**
- * Get the positive property: The positive property.
- *
- * @return the positive value.
- */
- public double getPositive() {
- return this.positive;
- }
-
- /**
- * Set the positive property: The positive property.
- *
- * @param positive the positive value to set.
- * @return the AspectConfidenceScoreLabel object itself.
- */
- public AspectConfidenceScoreLabel setPositive(double positive) {
- this.positive = positive;
- return this;
- }
-
- /**
- * Get the negative property: The negative property.
- *
- * @return the negative value.
- */
- public double getNegative() {
- return this.negative;
- }
-
- /**
- * Set the negative property: The negative property.
- *
- * @param negative the negative value to set.
- * @return the AspectConfidenceScoreLabel object itself.
- */
- public AspectConfidenceScoreLabel setNegative(double negative) {
- this.negative = negative;
- return this;
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelation.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelation.java
deleted file mode 100644
index 05ce364475299..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelation.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The AspectRelation model. */
-@Fluent
-public final class AspectRelation {
- /*
- * The type related to the aspect.
- */
- @JsonProperty(value = "relationType", required = true)
- private AspectRelationType relationType;
-
- /*
- * The JSON pointer indicating the linked object.
- */
- @JsonProperty(value = "ref", required = true)
- private String ref;
-
- /**
- * Get the relationType property: The type related to the aspect.
- *
- * @return the relationType value.
- */
- public AspectRelationType getRelationType() {
- return this.relationType;
- }
-
- /**
- * Set the relationType property: The type related to the aspect.
- *
- * @param relationType the relationType value to set.
- * @return the AspectRelation object itself.
- */
- public AspectRelation setRelationType(AspectRelationType relationType) {
- this.relationType = relationType;
- return this;
- }
-
- /**
- * Get the ref property: The JSON pointer indicating the linked object.
- *
- * @return the ref value.
- */
- public String getRef() {
- return this.ref;
- }
-
- /**
- * Set the ref property: The JSON pointer indicating the linked object.
- *
- * @param ref the ref value to set.
- * @return the AspectRelation object itself.
- */
- public AspectRelation setRef(String ref) {
- this.ref = ref;
- return this;
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java
deleted file mode 100644
index c50d3d7043713..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/AspectRelationType.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/** Defines values for AspectRelationType. */
-public enum AspectRelationType {
- /** Enum value opinion. */
- OPINION("opinion"),
-
- /** Enum value aspect. */
- ASPECT("aspect");
-
- /** The actual serialized value for a AspectRelationType instance. */
- private final String value;
-
- AspectRelationType(String value) {
- this.value = value;
- }
-
- /**
- * Parses a serialized value to a AspectRelationType instance.
- *
- * @param value the serialized value to parse.
- * @return the parsed AspectRelationType object, or null if unable to parse.
- */
- @JsonCreator
- public static AspectRelationType fromString(String value) {
- AspectRelationType[] items = AspectRelationType.values();
- for (AspectRelationType item : items) {
- if (item.toString().equalsIgnoreCase(value)) {
- return item;
- }
- }
- return null;
- }
-
- @JsonValue
- @Override
- public String toString() {
- return this.value;
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DetectedLanguage.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DetectedLanguage.java
index db9538d2c0043..bd031227091f8 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DetectedLanguage.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DetectedLanguage.java
@@ -7,7 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The DetectedLanguage model. */
+/**
+ * The DetectedLanguage model.
+ */
@Fluent
public final class DetectedLanguage {
/*
@@ -31,8 +33,9 @@ public final class DetectedLanguage {
private double confidenceScore;
/**
- * Get the name property: Long name of a detected language (e.g. English, French).
- *
+ * Get the name property: Long name of a detected language (e.g. English,
+ * French).
+ *
* @return the name value.
*/
public String getName() {
@@ -40,8 +43,9 @@ public String getName() {
}
/**
- * Set the name property: Long name of a detected language (e.g. English, French).
- *
+ * Set the name property: Long name of a detected language (e.g. English,
+ * French).
+ *
* @param name the name value to set.
* @return the DetectedLanguage object itself.
*/
@@ -51,9 +55,9 @@ public DetectedLanguage setName(String name) {
}
/**
- * Get the iso6391Name property: A two letter representation of the detected language according to the ISO 639-1
- * standard (e.g. en, fr).
- *
+ * Get the iso6391Name property: A two letter representation of the
+ * detected language according to the ISO 639-1 standard (e.g. en, fr).
+ *
* @return the iso6391Name value.
*/
public String getIso6391Name() {
@@ -61,9 +65,9 @@ public String getIso6391Name() {
}
/**
- * Set the iso6391Name property: A two letter representation of the detected language according to the ISO 639-1
- * standard (e.g. en, fr).
- *
+ * Set the iso6391Name property: A two letter representation of the
+ * detected language according to the ISO 639-1 standard (e.g. en, fr).
+ *
* @param iso6391Name the iso6391Name value to set.
* @return the DetectedLanguage object itself.
*/
@@ -73,9 +77,10 @@ public DetectedLanguage setIso6391Name(String iso6391Name) {
}
/**
- * Get the confidenceScore property: A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty
- * that the identified language is true.
- *
+ * Get the confidenceScore property: A confidence score between 0 and 1.
+ * Scores close to 1 indicate 100% certainty that the identified language
+ * is true.
+ *
* @return the confidenceScore value.
*/
public double getConfidenceScore() {
@@ -83,9 +88,10 @@ public double getConfidenceScore() {
}
/**
- * Set the confidenceScore property: A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty
- * that the identified language is true.
- *
+ * Set the confidenceScore property: A confidence score between 0 and 1.
+ * Scores close to 1 indicate 100% certainty that the identified language
+ * is true.
+ *
* @param confidenceScore the confidenceScore value to set.
* @return the DetectedLanguage object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentEntities.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentEntities.java
index 19f70d0823d81..dd1637927928f 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentEntities.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentEntities.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The DocumentEntities model. */
+/**
+ * The DocumentEntities model.
+ */
@Fluent
public final class DocumentEntities {
/*
@@ -38,7 +40,7 @@ public final class DocumentEntities {
/**
* Get the id property: Unique, non-empty document identifier.
- *
+ *
* @return the id value.
*/
public String getId() {
@@ -47,7 +49,7 @@ public String getId() {
/**
* Set the id property: Unique, non-empty document identifier.
- *
+ *
* @param id the id value to set.
* @return the DocumentEntities object itself.
*/
@@ -58,7 +60,7 @@ public DocumentEntities setId(String id) {
/**
* Get the entities property: Recognized entities in the document.
- *
+ *
* @return the entities value.
*/
public List getEntities() {
@@ -67,7 +69,7 @@ public List getEntities() {
/**
* Set the entities property: Recognized entities in the document.
- *
+ *
* @param entities the entities value to set.
* @return the DocumentEntities object itself.
*/
@@ -77,8 +79,9 @@ public DocumentEntities setEntities(List entities) {
}
/**
- * Get the warnings property: Warnings encountered while processing document.
- *
+ * Get the warnings property: Warnings encountered while processing
+ * document.
+ *
* @return the warnings value.
*/
public List getWarnings() {
@@ -86,8 +89,9 @@ public List getWarnings() {
}
/**
- * Set the warnings property: Warnings encountered while processing document.
- *
+ * Set the warnings property: Warnings encountered while processing
+ * document.
+ *
* @param warnings the warnings value to set.
* @return the DocumentEntities object itself.
*/
@@ -97,9 +101,9 @@ public DocumentEntities setWarnings(List warnings) {
}
/**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
+ * Get the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
+ *
* @return the statistics value.
*/
public DocumentStatistics getStatistics() {
@@ -107,9 +111,9 @@ public DocumentStatistics getStatistics() {
}
/**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
+ * Set the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
+ *
* @param statistics the statistics value to set.
* @return the DocumentEntities object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentError.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentError.java
index cdcc457d59e3e..7d1ac563e085b 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentError.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentError.java
@@ -7,7 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The DocumentError model. */
+/**
+ * The DocumentError model.
+ */
@Fluent
public final class DocumentError {
/*
@@ -24,7 +26,7 @@ public final class DocumentError {
/**
* Get the id property: Document Id.
- *
+ *
* @return the id value.
*/
public String getId() {
@@ -33,7 +35,7 @@ public String getId() {
/**
* Set the id property: Document Id.
- *
+ *
* @param id the id value to set.
* @return the DocumentError object itself.
*/
@@ -44,7 +46,7 @@ public DocumentError setId(String id) {
/**
* Get the error property: Document Error.
- *
+ *
* @return the error value.
*/
public TextAnalyticsError getError() {
@@ -53,7 +55,7 @@ public TextAnalyticsError getError() {
/**
* Set the error property: Document Error.
- *
+ *
* @param error the error value to set.
* @return the DocumentError object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentKeyPhrases.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentKeyPhrases.java
index 7246406feabd5..98c442b0fe7d7 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentKeyPhrases.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentKeyPhrases.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The DocumentKeyPhrases model. */
+/**
+ * The DocumentKeyPhrases model.
+ */
@Fluent
public final class DocumentKeyPhrases {
/*
@@ -39,7 +41,7 @@ public final class DocumentKeyPhrases {
/**
* Get the id property: Unique, non-empty document identifier.
- *
+ *
* @return the id value.
*/
public String getId() {
@@ -48,7 +50,7 @@ public String getId() {
/**
* Set the id property: Unique, non-empty document identifier.
- *
+ *
* @param id the id value to set.
* @return the DocumentKeyPhrases object itself.
*/
@@ -58,9 +60,10 @@ public DocumentKeyPhrases setId(String id) {
}
/**
- * Get the keyPhrases property: A list of representative words or phrases. The number of key phrases returned is
- * proportional to the number of words in the input document.
- *
+ * Get the keyPhrases property: A list of representative words or phrases.
+ * The number of key phrases returned is proportional to the number of
+ * words in the input document.
+ *
* @return the keyPhrases value.
*/
public List getKeyPhrases() {
@@ -68,9 +71,10 @@ public List getKeyPhrases() {
}
/**
- * Set the keyPhrases property: A list of representative words or phrases. The number of key phrases returned is
- * proportional to the number of words in the input document.
- *
+ * Set the keyPhrases property: A list of representative words or phrases.
+ * The number of key phrases returned is proportional to the number of
+ * words in the input document.
+ *
* @param keyPhrases the keyPhrases value to set.
* @return the DocumentKeyPhrases object itself.
*/
@@ -80,8 +84,9 @@ public DocumentKeyPhrases setKeyPhrases(List keyPhrases) {
}
/**
- * Get the warnings property: Warnings encountered while processing document.
- *
+ * Get the warnings property: Warnings encountered while processing
+ * document.
+ *
* @return the warnings value.
*/
public List getWarnings() {
@@ -89,8 +94,9 @@ public List getWarnings() {
}
/**
- * Set the warnings property: Warnings encountered while processing document.
- *
+ * Set the warnings property: Warnings encountered while processing
+ * document.
+ *
* @param warnings the warnings value to set.
* @return the DocumentKeyPhrases object itself.
*/
@@ -100,9 +106,9 @@ public DocumentKeyPhrases setWarnings(List warnings) {
}
/**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
+ * Get the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
+ *
* @return the statistics value.
*/
public DocumentStatistics getStatistics() {
@@ -110,9 +116,9 @@ public DocumentStatistics getStatistics() {
}
/**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
+ * Set the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
+ *
* @param statistics the statistics value to set.
* @return the DocumentKeyPhrases object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLanguage.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLanguage.java
index b195406d85350..80fa6fb3efab2 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLanguage.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLanguage.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The DocumentLanguage model. */
+/**
+ * The DocumentLanguage model.
+ */
@Fluent
public final class DocumentLanguage {
/*
@@ -77,7 +79,8 @@ public DocumentLanguage setDetectedLanguage(DetectedLanguage detectedLanguage) {
}
/**
- * Get the warnings property: Warnings encountered while processing document.
+ * Get the warnings property: Warnings encountered while processing
+ * document.
*
* @return the warnings value.
*/
@@ -86,7 +89,8 @@ public List getWarnings() {
}
/**
- * Set the warnings property: Warnings encountered while processing document.
+ * Set the warnings property: Warnings encountered while processing
+ * document.
*
* @param warnings the warnings value to set.
* @return the DocumentLanguage object itself.
@@ -97,8 +101,8 @@ public DocumentLanguage setWarnings(List warnings) {
}
/**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
+ * Get the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
*
* @return the statistics value.
*/
@@ -107,8 +111,8 @@ public DocumentStatistics getStatistics() {
}
/**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
+ * Set the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
*
* @param statistics the statistics value to set.
* @return the DocumentLanguage object itself.
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLinkedEntities.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLinkedEntities.java
index 952b1f972ddc0..c6c548e484b84 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLinkedEntities.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentLinkedEntities.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The DocumentLinkedEntities model. */
+/**
+ * The DocumentLinkedEntities model.
+ */
@Fluent
public final class DocumentLinkedEntities {
/*
@@ -38,7 +40,7 @@ public final class DocumentLinkedEntities {
/**
* Get the id property: Unique, non-empty document identifier.
- *
+ *
* @return the id value.
*/
public String getId() {
@@ -47,7 +49,7 @@ public String getId() {
/**
* Set the id property: Unique, non-empty document identifier.
- *
+ *
* @param id the id value to set.
* @return the DocumentLinkedEntities object itself.
*/
@@ -57,8 +59,9 @@ public DocumentLinkedEntities setId(String id) {
}
/**
- * Get the entities property: Recognized well-known entities in the document.
- *
+ * Get the entities property: Recognized well-known entities in the
+ * document.
+ *
* @return the entities value.
*/
public List getEntities() {
@@ -66,8 +69,9 @@ public List getEntities() {
}
/**
- * Set the entities property: Recognized well-known entities in the document.
- *
+ * Set the entities property: Recognized well-known entities in the
+ * document.
+ *
* @param entities the entities value to set.
* @return the DocumentLinkedEntities object itself.
*/
@@ -77,8 +81,9 @@ public DocumentLinkedEntities setEntities(List entities) {
}
/**
- * Get the warnings property: Warnings encountered while processing document.
- *
+ * Get the warnings property: Warnings encountered while processing
+ * document.
+ *
* @return the warnings value.
*/
public List getWarnings() {
@@ -86,8 +91,9 @@ public List getWarnings() {
}
/**
- * Set the warnings property: Warnings encountered while processing document.
- *
+ * Set the warnings property: Warnings encountered while processing
+ * document.
+ *
* @param warnings the warnings value to set.
* @return the DocumentLinkedEntities object itself.
*/
@@ -97,9 +103,9 @@ public DocumentLinkedEntities setWarnings(List warnings) {
}
/**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
+ * Get the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
+ *
* @return the statistics value.
*/
public DocumentStatistics getStatistics() {
@@ -107,9 +113,9 @@ public DocumentStatistics getStatistics() {
}
/**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
+ * Set the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
+ *
* @param statistics the statistics value to set.
* @return the DocumentLinkedEntities object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentiment.java
index d029dc57e4b9b..80d62cfe0082f 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentiment.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentiment.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The DocumentSentiment model. */
+/**
+ * The DocumentSentiment model.
+ */
@Fluent
public final class DocumentSentiment {
/*
@@ -52,7 +54,7 @@ public final class DocumentSentiment {
/**
* Get the id property: Unique, non-empty document identifier.
- *
+ *
* @return the id value.
*/
public String getId() {
@@ -61,7 +63,7 @@ public String getId() {
/**
* Set the id property: Unique, non-empty document identifier.
- *
+ *
* @param id the id value to set.
* @return the DocumentSentiment object itself.
*/
@@ -71,8 +73,9 @@ public DocumentSentiment setId(String id) {
}
/**
- * Get the sentiment property: Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).
- *
+ * Get the sentiment property: Predicted sentiment for document (Negative,
+ * Neutral, Positive, or Mixed).
+ *
* @return the sentiment value.
*/
public DocumentSentimentValue getSentiment() {
@@ -80,8 +83,9 @@ public DocumentSentimentValue getSentiment() {
}
/**
- * Set the sentiment property: Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).
- *
+ * Set the sentiment property: Predicted sentiment for document (Negative,
+ * Neutral, Positive, or Mixed).
+ *
* @param sentiment the sentiment value to set.
* @return the DocumentSentiment object itself.
*/
@@ -91,9 +95,9 @@ public DocumentSentiment setSentiment(DocumentSentimentValue sentiment) {
}
/**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
+ * Get the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
+ *
* @return the statistics value.
*/
public DocumentStatistics getStatistics() {
@@ -101,9 +105,9 @@ public DocumentStatistics getStatistics() {
}
/**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
+ * Set the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the document payload.
+ *
* @param statistics the statistics value to set.
* @return the DocumentSentiment object itself.
*/
@@ -113,9 +117,9 @@ public DocumentSentiment setStatistics(DocumentStatistics statistics) {
}
/**
- * Get the confidenceScores property: Document level sentiment confidence scores between 0 and 1 for each sentiment
- * class.
- *
+ * Get the confidenceScores property: Document level sentiment confidence
+ * scores between 0 and 1 for each sentiment class.
+ *
* @return the confidenceScores value.
*/
public SentimentConfidenceScorePerLabel getConfidenceScores() {
@@ -123,9 +127,9 @@ public SentimentConfidenceScorePerLabel getConfidenceScores() {
}
/**
- * Set the confidenceScores property: Document level sentiment confidence scores between 0 and 1 for each sentiment
- * class.
- *
+ * Set the confidenceScores property: Document level sentiment confidence
+ * scores between 0 and 1 for each sentiment class.
+ *
* @param confidenceScores the confidenceScores value to set.
* @return the DocumentSentiment object itself.
*/
@@ -136,7 +140,7 @@ public DocumentSentiment setConfidenceScores(SentimentConfidenceScorePerLabel co
/**
* Get the sentences property: Sentence level sentiment analysis.
- *
+ *
* @return the sentences value.
*/
public List getSentences() {
@@ -145,7 +149,7 @@ public List getSentences() {
/**
* Set the sentences property: Sentence level sentiment analysis.
- *
+ *
* @param sentences the sentences value to set.
* @return the DocumentSentiment object itself.
*/
@@ -155,8 +159,9 @@ public DocumentSentiment setSentences(List sentences) {
}
/**
- * Get the warnings property: Warnings encountered while processing document.
- *
+ * Get the warnings property: Warnings encountered while processing
+ * document.
+ *
* @return the warnings value.
*/
public List getWarnings() {
@@ -164,8 +169,9 @@ public List getWarnings() {
}
/**
- * Set the warnings property: Warnings encountered while processing document.
- *
+ * Set the warnings property: Warnings encountered while processing
+ * document.
+ *
* @param warnings the warnings value to set.
* @return the DocumentSentiment object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentimentValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentimentValue.java
index 0964d67bafe2d..3348780b91a96 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentimentValue.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentSentimentValue.java
@@ -7,21 +7,33 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
-/** Defines values for DocumentSentimentValue. */
+/**
+ * Defines values for DocumentSentimentValue.
+ */
public enum DocumentSentimentValue {
- /** Enum value positive. */
+ /**
+ * Enum value positive.
+ */
POSITIVE("positive"),
- /** Enum value neutral. */
+ /**
+ * Enum value neutral.
+ */
NEUTRAL("neutral"),
- /** Enum value negative. */
+ /**
+ * Enum value negative.
+ */
NEGATIVE("negative"),
- /** Enum value mixed. */
+ /**
+ * Enum value mixed.
+ */
MIXED("mixed");
- /** The actual serialized value for a DocumentSentimentValue instance. */
+ /**
+ * The actual serialized value for a DocumentSentimentValue instance.
+ */
private final String value;
DocumentSentimentValue(String value) {
@@ -30,7 +42,7 @@ public enum DocumentSentimentValue {
/**
* Parses a serialized value to a DocumentSentimentValue instance.
- *
+ *
* @param value the serialized value to parse.
* @return the parsed DocumentSentimentValue object, or null if unable to parse.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentStatistics.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentStatistics.java
index 93d26d27cfd03..ef73e3f47e57f 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentStatistics.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/DocumentStatistics.java
@@ -7,7 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The DocumentStatistics model. */
+/**
+ * The DocumentStatistics model.
+ */
@Fluent
public final class DocumentStatistics {
/*
@@ -23,8 +25,9 @@ public final class DocumentStatistics {
private int transactionsCount;
/**
- * Get the charactersCount property: Number of text elements recognized in the document.
- *
+ * Get the charactersCount property: Number of text elements recognized in
+ * the document.
+ *
* @return the charactersCount value.
*/
public int getCharactersCount() {
@@ -32,8 +35,9 @@ public int getCharactersCount() {
}
/**
- * Set the charactersCount property: Number of text elements recognized in the document.
- *
+ * Set the charactersCount property: Number of text elements recognized in
+ * the document.
+ *
* @param charactersCount the charactersCount value to set.
* @return the DocumentStatistics object itself.
*/
@@ -43,8 +47,9 @@ public DocumentStatistics setCharactersCount(int charactersCount) {
}
/**
- * Get the transactionsCount property: Number of transactions for the document.
- *
+ * Get the transactionsCount property: Number of transactions for the
+ * document.
+ *
* @return the transactionsCount value.
*/
public int getTransactionsCount() {
@@ -52,8 +57,9 @@ public int getTransactionsCount() {
}
/**
- * Set the transactionsCount property: Number of transactions for the document.
- *
+ * Set the transactionsCount property: Number of transactions for the
+ * document.
+ *
* @param transactionsCount the transactionsCount value to set.
* @return the DocumentStatistics object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntitiesResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntitiesResult.java
index 51baf6e747dff..e103245b3c997 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntitiesResult.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntitiesResult.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The EntitiesResult model. */
+/**
+ * The EntitiesResult model.
+ */
@Fluent
public final class EntitiesResult {
/*
@@ -38,7 +40,7 @@ public final class EntitiesResult {
/**
* Get the documents property: Response by document.
- *
+ *
* @return the documents value.
*/
public List getDocuments() {
@@ -47,7 +49,7 @@ public List getDocuments() {
/**
* Set the documents property: Response by document.
- *
+ *
* @param documents the documents value to set.
* @return the EntitiesResult object itself.
*/
@@ -58,7 +60,7 @@ public EntitiesResult setDocuments(List documents) {
/**
* Get the errors property: Errors by document id.
- *
+ *
* @return the errors value.
*/
public List getErrors() {
@@ -67,7 +69,7 @@ public List getErrors() {
/**
* Set the errors property: Errors by document id.
- *
+ *
* @param errors the errors value to set.
* @return the EntitiesResult object itself.
*/
@@ -77,9 +79,9 @@ public EntitiesResult setErrors(List errors) {
}
/**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
+ * Get the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the request payload.
+ *
* @return the statistics value.
*/
public RequestStatistics getStatistics() {
@@ -87,9 +89,9 @@ public RequestStatistics getStatistics() {
}
/**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
+ * Set the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the request payload.
+ *
* @param statistics the statistics value to set.
* @return the EntitiesResult object itself.
*/
@@ -99,8 +101,9 @@ public EntitiesResult setStatistics(RequestStatistics statistics) {
}
/**
- * Get the modelVersion property: This field indicates which model is used for scoring.
- *
+ * Get the modelVersion property: This field indicates which model is used
+ * for scoring.
+ *
* @return the modelVersion value.
*/
public String getModelVersion() {
@@ -108,8 +111,9 @@ public String getModelVersion() {
}
/**
- * Set the modelVersion property: This field indicates which model is used for scoring.
- *
+ * Set the modelVersion property: This field indicates which model is used
+ * for scoring.
+ *
* @param modelVersion the modelVersion value to set.
* @return the EntitiesResult object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Entity.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Entity.java
index bf46484caa80a..afb9da844ae36 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Entity.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Entity.java
@@ -7,7 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The Entity model. */
+/**
+ * The Entity model.
+ */
@Fluent
public final class Entity {
/*
@@ -29,13 +31,13 @@ public final class Entity {
private String subcategory;
/*
- * Start position for the entity text.
+ * Start position (in Unicode characters) for the entity text.
*/
@JsonProperty(value = "offset", required = true)
private int offset;
/*
- * Length for the entity text.
+ * Length (in Unicode characters) for the entity text.
*/
@JsonProperty(value = "length", required = true)
private int length;
@@ -48,7 +50,7 @@ public final class Entity {
/**
* Get the text property: Entity text as appears in the request.
- *
+ *
* @return the text value.
*/
public String getText() {
@@ -57,7 +59,7 @@ public String getText() {
/**
* Set the text property: Entity text as appears in the request.
- *
+ *
* @param text the text value to set.
* @return the Entity object itself.
*/
@@ -67,8 +69,9 @@ public Entity setText(String text) {
}
/**
- * Get the category property: Entity type, such as Person/Location/Org/SSN etc.
- *
+ * Get the category property: Entity type, such as Person/Location/Org/SSN
+ * etc.
+ *
* @return the category value.
*/
public String getCategory() {
@@ -76,8 +79,9 @@ public String getCategory() {
}
/**
- * Set the category property: Entity type, such as Person/Location/Org/SSN etc.
- *
+ * Set the category property: Entity type, such as Person/Location/Org/SSN
+ * etc.
+ *
* @param category the category value to set.
* @return the Entity object itself.
*/
@@ -87,8 +91,9 @@ public Entity setCategory(String category) {
}
/**
- * Get the subcategory property: Entity sub type, such as Age/Year/TimeRange etc.
- *
+ * Get the subcategory property: Entity sub type, such as
+ * Age/Year/TimeRange etc.
+ *
* @return the subcategory value.
*/
public String getSubcategory() {
@@ -96,8 +101,9 @@ public String getSubcategory() {
}
/**
- * Set the subcategory property: Entity sub type, such as Age/Year/TimeRange etc.
- *
+ * Set the subcategory property: Entity sub type, such as
+ * Age/Year/TimeRange etc.
+ *
* @param subcategory the subcategory value to set.
* @return the Entity object itself.
*/
@@ -107,8 +113,9 @@ public Entity setSubcategory(String subcategory) {
}
/**
- * Get the offset property: Start position for the entity text.
- *
+ * Get the offset property: Start position (in Unicode characters) for the
+ * entity text.
+ *
* @return the offset value.
*/
public int getOffset() {
@@ -116,8 +123,9 @@ public int getOffset() {
}
/**
- * Set the offset property: Start position for the entity text.
- *
+ * Set the offset property: Start position (in Unicode characters) for the
+ * entity text.
+ *
* @param offset the offset value to set.
* @return the Entity object itself.
*/
@@ -127,8 +135,9 @@ public Entity setOffset(int offset) {
}
/**
- * Get the length property: Length for the entity text.
- *
+ * Get the length property: Length (in Unicode characters) for the entity
+ * text.
+ *
* @return the length value.
*/
public int getLength() {
@@ -136,8 +145,9 @@ public int getLength() {
}
/**
- * Set the length property: Length for the entity text.
- *
+ * Set the length property: Length (in Unicode characters) for the entity
+ * text.
+ *
* @param length the length value to set.
* @return the Entity object itself.
*/
@@ -147,8 +157,9 @@ public Entity setLength(int length) {
}
/**
- * Get the confidenceScore property: Confidence score between 0 and 1 of the extracted entity.
- *
+ * Get the confidenceScore property: Confidence score between 0 and 1 of
+ * the extracted entity.
+ *
* @return the confidenceScore value.
*/
public double getConfidenceScore() {
@@ -156,8 +167,9 @@ public double getConfidenceScore() {
}
/**
- * Set the confidenceScore property: Confidence score between 0 and 1 of the extracted entity.
- *
+ * Set the confidenceScore property: Confidence score between 0 and 1 of
+ * the extracted entity.
+ *
* @param confidenceScore the confidenceScore value to set.
* @return the Entity object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntityLinkingResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntityLinkingResult.java
index 35b71cc3b8b05..ffadfa03a1188 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntityLinkingResult.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/EntityLinkingResult.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The EntityLinkingResult model. */
+/**
+ * The EntityLinkingResult model.
+ */
@Fluent
public final class EntityLinkingResult {
/*
@@ -38,7 +40,7 @@ public final class EntityLinkingResult {
/**
* Get the documents property: Response by document.
- *
+ *
* @return the documents value.
*/
public List getDocuments() {
@@ -47,7 +49,7 @@ public List getDocuments() {
/**
* Set the documents property: Response by document.
- *
+ *
* @param documents the documents value to set.
* @return the EntityLinkingResult object itself.
*/
@@ -58,7 +60,7 @@ public EntityLinkingResult setDocuments(List documents)
/**
* Get the errors property: Errors by document id.
- *
+ *
* @return the errors value.
*/
public List getErrors() {
@@ -67,7 +69,7 @@ public List getErrors() {
/**
* Set the errors property: Errors by document id.
- *
+ *
* @param errors the errors value to set.
* @return the EntityLinkingResult object itself.
*/
@@ -77,9 +79,9 @@ public EntityLinkingResult setErrors(List errors) {
}
/**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
+ * Get the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the request payload.
+ *
* @return the statistics value.
*/
public RequestStatistics getStatistics() {
@@ -87,9 +89,9 @@ public RequestStatistics getStatistics() {
}
/**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
+ * Set the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the request payload.
+ *
* @param statistics the statistics value to set.
* @return the EntityLinkingResult object itself.
*/
@@ -99,8 +101,9 @@ public EntityLinkingResult setStatistics(RequestStatistics statistics) {
}
/**
- * Get the modelVersion property: This field indicates which model is used for scoring.
- *
+ * Get the modelVersion property: This field indicates which model is used
+ * for scoring.
+ *
* @return the modelVersion value.
*/
public String getModelVersion() {
@@ -108,8 +111,9 @@ public String getModelVersion() {
}
/**
- * Set the modelVersion property: This field indicates which model is used for scoring.
- *
+ * Set the modelVersion property: This field indicates which model is used
+ * for scoring.
+ *
* @param modelVersion the modelVersion value to set.
* @return the EntityLinkingResult object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java
index a6dca165182da..3431f8803c636 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorCodeValue.java
@@ -4,37 +4,62 @@
package com.azure.ai.textanalytics.implementation.models;
-import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonValue;
-/** Defines values for ErrorCodeValue. */
-public final class ErrorCodeValue extends ExpandableStringEnum {
- /** Static value InvalidRequest for ErrorCodeValue. */
- public static final ErrorCodeValue INVALID_REQUEST = fromString("InvalidRequest");
+/**
+ * Defines values for ErrorCodeValue.
+ */
+public enum ErrorCodeValue {
+ /**
+ * Enum value invalidRequest.
+ */
+ INVALID_REQUEST("invalidRequest"),
- /** Static value InvalidArgument for ErrorCodeValue. */
- public static final ErrorCodeValue INVALID_ARGUMENT = fromString("InvalidArgument");
+ /**
+ * Enum value invalidArgument.
+ */
+ INVALID_ARGUMENT("invalidArgument"),
- /** Static value InternalServerError for ErrorCodeValue. */
- public static final ErrorCodeValue INTERNAL_SERVER_ERROR = fromString("InternalServerError");
+ /**
+ * Enum value internalServerError.
+ */
+ INTERNAL_SERVER_ERROR("internalServerError"),
- /** Static value ServiceUnavailable for ErrorCodeValue. */
- public static final ErrorCodeValue SERVICE_UNAVAILABLE = fromString("ServiceUnavailable");
+ /**
+ * Enum value serviceUnavailable.
+ */
+ SERVICE_UNAVAILABLE("serviceUnavailable");
+
+ /**
+ * The actual serialized value for a ErrorCodeValue instance.
+ */
+ private final String value;
+
+ ErrorCodeValue(String value) {
+ this.value = value;
+ }
/**
- * Creates or finds a ErrorCodeValue from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding ErrorCodeValue.
+ * Parses a serialized value to a ErrorCodeValue instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ErrorCodeValue object, or null if unable to parse.
*/
@JsonCreator
- public static ErrorCodeValue fromString(String name) {
- return fromString(name, ErrorCodeValue.class);
+ public static ErrorCodeValue fromString(String value) {
+ ErrorCodeValue[] items = ErrorCodeValue.values();
+ for (ErrorCodeValue item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
}
- /** @return known ErrorCodeValue values. */
- public static Collection values() {
- return values(ErrorCodeValue.class);
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
}
}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponse.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponse.java
deleted file mode 100644
index 2689490a7c97b..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/ErrorResponse.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The ErrorResponse model. */
-@Fluent
-public final class ErrorResponse {
- /*
- * Document Error.
- */
- @JsonProperty(value = "error", required = true)
- private TextAnalyticsError error;
-
- /**
- * Get the error property: Document Error.
- *
- * @return the error value.
- */
- public TextAnalyticsError getError() {
- return this.error;
- }
-
- /**
- * Set the error property: Document Error.
- *
- * @param error the error value to set.
- * @return the ErrorResponse object itself.
- */
- public ErrorResponse setError(TextAnalyticsError error) {
- this.error = error;
- return this;
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerError.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerError.java
index 554a5c86ddcc7..e2a97c1c062ee 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerError.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerError.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
-/** The InnerError model. */
+/**
+ * The InnerError model.
+ */
@Fluent
public final class InnerError {
/*
@@ -43,7 +45,7 @@ public final class InnerError {
/**
* Get the code property: Error code.
- *
+ *
* @return the code value.
*/
public InnerErrorCodeValue getCode() {
@@ -52,7 +54,7 @@ public InnerErrorCodeValue getCode() {
/**
* Set the code property: Error code.
- *
+ *
* @param code the code value to set.
* @return the InnerError object itself.
*/
@@ -63,7 +65,7 @@ public InnerError setCode(InnerErrorCodeValue code) {
/**
* Get the message property: Error message.
- *
+ *
* @return the message value.
*/
public String getMessage() {
@@ -72,7 +74,7 @@ public String getMessage() {
/**
* Set the message property: Error message.
- *
+ *
* @param message the message value to set.
* @return the InnerError object itself.
*/
@@ -83,7 +85,7 @@ public InnerError setMessage(String message) {
/**
* Get the details property: Error details.
- *
+ *
* @return the details value.
*/
public Map getDetails() {
@@ -92,7 +94,7 @@ public Map getDetails() {
/**
* Set the details property: Error details.
- *
+ *
* @param details the details value to set.
* @return the InnerError object itself.
*/
@@ -103,7 +105,7 @@ public InnerError setDetails(Map details) {
/**
* Get the target property: Error target.
- *
+ *
* @return the target value.
*/
public String getTarget() {
@@ -112,7 +114,7 @@ public String getTarget() {
/**
* Set the target property: Error target.
- *
+ *
* @param target the target value to set.
* @return the InnerError object itself.
*/
@@ -122,8 +124,9 @@ public InnerError setTarget(String target) {
}
/**
- * Get the innererror property: Inner error contains more specific information.
- *
+ * Get the innererror property: Inner error contains more specific
+ * information.
+ *
* @return the innererror value.
*/
public InnerError getInnererror() {
@@ -131,8 +134,9 @@ public InnerError getInnererror() {
}
/**
- * Set the innererror property: Inner error contains more specific information.
- *
+ * Set the innererror property: Inner error contains more specific
+ * information.
+ *
* @param innererror the innererror value to set.
* @return the InnerError object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java
index 8231b7dbd6ec5..4294b1b886a1d 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/InnerErrorCodeValue.java
@@ -4,52 +4,87 @@
package com.azure.ai.textanalytics.implementation.models;
-import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonValue;
-/** Defines values for InnerErrorCodeValue. */
-public final class InnerErrorCodeValue extends ExpandableStringEnum {
- /** Static value InvalidParameterValue for InnerErrorCodeValue. */
- public static final InnerErrorCodeValue INVALID_PARAMETER_VALUE = fromString("InvalidParameterValue");
+/**
+ * Defines values for InnerErrorCodeValue.
+ */
+public enum InnerErrorCodeValue {
+ /**
+ * Enum value invalidParameterValue.
+ */
+ INVALID_PARAMETER_VALUE("invalidParameterValue"),
- /** Static value InvalidRequestBodyFormat for InnerErrorCodeValue. */
- public static final InnerErrorCodeValue INVALID_REQUEST_BODY_FORMAT = fromString("InvalidRequestBodyFormat");
+ /**
+ * Enum value invalidRequestBodyFormat.
+ */
+ INVALID_REQUEST_BODY_FORMAT("invalidRequestBodyFormat"),
- /** Static value EmptyRequest for InnerErrorCodeValue. */
- public static final InnerErrorCodeValue EMPTY_REQUEST = fromString("EmptyRequest");
+ /**
+ * Enum value emptyRequest.
+ */
+ EMPTY_REQUEST("emptyRequest"),
- /** Static value MissingInputRecords for InnerErrorCodeValue. */
- public static final InnerErrorCodeValue MISSING_INPUT_RECORDS = fromString("MissingInputRecords");
+ /**
+ * Enum value missingInputRecords.
+ */
+ MISSING_INPUT_RECORDS("missingInputRecords"),
- /** Static value InvalidDocument for InnerErrorCodeValue. */
- public static final InnerErrorCodeValue INVALID_DOCUMENT = fromString("InvalidDocument");
+ /**
+ * Enum value invalidDocument.
+ */
+ INVALID_DOCUMENT("invalidDocument"),
- /** Static value ModelVersionIncorrect for InnerErrorCodeValue. */
- public static final InnerErrorCodeValue MODEL_VERSION_INCORRECT = fromString("ModelVersionIncorrect");
+ /**
+ * Enum value modelVersionIncorrect.
+ */
+ MODEL_VERSION_INCORRECT("modelVersionIncorrect"),
- /** Static value InvalidDocumentBatch for InnerErrorCodeValue. */
- public static final InnerErrorCodeValue INVALID_DOCUMENT_BATCH = fromString("InvalidDocumentBatch");
+ /**
+ * Enum value invalidDocumentBatch.
+ */
+ INVALID_DOCUMENT_BATCH("invalidDocumentBatch"),
- /** Static value UnsupportedLanguageCode for InnerErrorCodeValue. */
- public static final InnerErrorCodeValue UNSUPPORTED_LANGUAGE_CODE = fromString("UnsupportedLanguageCode");
+ /**
+ * Enum value unsupportedLanguageCode.
+ */
+ UNSUPPORTED_LANGUAGE_CODE("unsupportedLanguageCode"),
- /** Static value InvalidCountryHint for InnerErrorCodeValue. */
- public static final InnerErrorCodeValue INVALID_COUNTRY_HINT = fromString("InvalidCountryHint");
+ /**
+ * Enum value invalidCountryHint.
+ */
+ INVALID_COUNTRY_HINT("invalidCountryHint");
+
+ /**
+ * The actual serialized value for a InnerErrorCodeValue instance.
+ */
+ private final String value;
+
+ InnerErrorCodeValue(String value) {
+ this.value = value;
+ }
/**
- * Creates or finds a InnerErrorCodeValue from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding InnerErrorCodeValue.
+ * Parses a serialized value to a InnerErrorCodeValue instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed InnerErrorCodeValue object, or null if unable to parse.
*/
@JsonCreator
- public static InnerErrorCodeValue fromString(String name) {
- return fromString(name, InnerErrorCodeValue.class);
+ public static InnerErrorCodeValue fromString(String value) {
+ InnerErrorCodeValue[] items = InnerErrorCodeValue.values();
+ for (InnerErrorCodeValue item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
}
- /** @return known InnerErrorCodeValue values. */
- public static Collection values() {
- return values(InnerErrorCodeValue.class);
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
}
}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/KeyPhraseResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/KeyPhraseResult.java
index c849875792608..bd7223494fd27 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/KeyPhraseResult.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/KeyPhraseResult.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The KeyPhraseResult model. */
+/**
+ * The KeyPhraseResult model.
+ */
@Fluent
public final class KeyPhraseResult {
/*
@@ -38,7 +40,7 @@ public final class KeyPhraseResult {
/**
* Get the documents property: Response by document.
- *
+ *
* @return the documents value.
*/
public List getDocuments() {
@@ -47,7 +49,7 @@ public List getDocuments() {
/**
* Set the documents property: Response by document.
- *
+ *
* @param documents the documents value to set.
* @return the KeyPhraseResult object itself.
*/
@@ -58,7 +60,7 @@ public KeyPhraseResult setDocuments(List documents) {
/**
* Get the errors property: Errors by document id.
- *
+ *
* @return the errors value.
*/
public List getErrors() {
@@ -67,7 +69,7 @@ public List getErrors() {
/**
* Set the errors property: Errors by document id.
- *
+ *
* @param errors the errors value to set.
* @return the KeyPhraseResult object itself.
*/
@@ -77,9 +79,9 @@ public KeyPhraseResult setErrors(List errors) {
}
/**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
+ * Get the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the request payload.
+ *
* @return the statistics value.
*/
public RequestStatistics getStatistics() {
@@ -87,9 +89,9 @@ public RequestStatistics getStatistics() {
}
/**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
+ * Set the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the request payload.
+ *
* @param statistics the statistics value to set.
* @return the KeyPhraseResult object itself.
*/
@@ -99,8 +101,9 @@ public KeyPhraseResult setStatistics(RequestStatistics statistics) {
}
/**
- * Get the modelVersion property: This field indicates which model is used for scoring.
- *
+ * Get the modelVersion property: This field indicates which model is used
+ * for scoring.
+ *
* @return the modelVersion value.
*/
public String getModelVersion() {
@@ -108,8 +111,9 @@ public String getModelVersion() {
}
/**
- * Set the modelVersion property: This field indicates which model is used for scoring.
- *
+ * Set the modelVersion property: This field indicates which model is used
+ * for scoring.
+ *
* @param modelVersion the modelVersion value to set.
* @return the KeyPhraseResult object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageBatchInput.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageBatchInput.java
index 2e1bde460b170..4ff3423367c42 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageBatchInput.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageBatchInput.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The LanguageBatchInput model. */
+/**
+ * The LanguageBatchInput model.
+ */
@Fluent
public final class LanguageBatchInput {
/*
@@ -19,7 +21,7 @@ public final class LanguageBatchInput {
/**
* Get the documents property: The documents property.
- *
+ *
* @return the documents value.
*/
public List getDocuments() {
@@ -28,7 +30,7 @@ public List getDocuments() {
/**
* Set the documents property: The documents property.
- *
+ *
* @param documents the documents value to set.
* @return the LanguageBatchInput object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageInput.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageInput.java
index d81ea140b1a0c..2a9d7d3f91b55 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageInput.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageInput.java
@@ -7,7 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The LanguageInput model. */
+/**
+ * The LanguageInput model.
+ */
@Fluent
public final class LanguageInput {
/*
@@ -30,7 +32,7 @@ public final class LanguageInput {
/**
* Get the id property: Unique, non-empty document identifier.
- *
+ *
* @return the id value.
*/
public String getId() {
@@ -39,7 +41,7 @@ public String getId() {
/**
* Set the id property: Unique, non-empty document identifier.
- *
+ *
* @param id the id value to set.
* @return the LanguageInput object itself.
*/
@@ -50,7 +52,7 @@ public LanguageInput setId(String id) {
/**
* Get the text property: The text property.
- *
+ *
* @return the text value.
*/
public String getText() {
@@ -59,7 +61,7 @@ public String getText() {
/**
* Set the text property: The text property.
- *
+ *
* @param text the text value to set.
* @return the LanguageInput object itself.
*/
@@ -70,7 +72,7 @@ public LanguageInput setText(String text) {
/**
* Get the countryHint property: The countryHint property.
- *
+ *
* @return the countryHint value.
*/
public String getCountryHint() {
@@ -79,7 +81,7 @@ public String getCountryHint() {
/**
* Set the countryHint property: The countryHint property.
- *
+ *
* @param countryHint the countryHint value to set.
* @return the LanguageInput object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageResult.java
index be55cd24b5d25..46515f53c93be 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageResult.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LanguageResult.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The LanguageResult model. */
+/**
+ * The LanguageResult model.
+ */
@Fluent
public final class LanguageResult {
/*
@@ -38,7 +40,7 @@ public final class LanguageResult {
/**
* Get the documents property: Response by document.
- *
+ *
* @return the documents value.
*/
public List getDocuments() {
@@ -47,7 +49,7 @@ public List getDocuments() {
/**
* Set the documents property: Response by document.
- *
+ *
* @param documents the documents value to set.
* @return the LanguageResult object itself.
*/
@@ -58,7 +60,7 @@ public LanguageResult setDocuments(List documents) {
/**
* Get the errors property: Errors by document id.
- *
+ *
* @return the errors value.
*/
public List getErrors() {
@@ -67,7 +69,7 @@ public List getErrors() {
/**
* Set the errors property: Errors by document id.
- *
+ *
* @param errors the errors value to set.
* @return the LanguageResult object itself.
*/
@@ -77,9 +79,9 @@ public LanguageResult setErrors(List errors) {
}
/**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
+ * Get the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the request payload.
+ *
* @return the statistics value.
*/
public RequestStatistics getStatistics() {
@@ -87,9 +89,9 @@ public RequestStatistics getStatistics() {
}
/**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
+ * Set the statistics property: if showStats=true was specified in the
+ * request this field will contain information about the request payload.
+ *
* @param statistics the statistics value to set.
* @return the LanguageResult object itself.
*/
@@ -99,8 +101,9 @@ public LanguageResult setStatistics(RequestStatistics statistics) {
}
/**
- * Get the modelVersion property: This field indicates which model is used for scoring.
- *
+ * Get the modelVersion property: This field indicates which model is used
+ * for scoring.
+ *
* @return the modelVersion value.
*/
public String getModelVersion() {
@@ -108,8 +111,9 @@ public String getModelVersion() {
}
/**
- * Set the modelVersion property: This field indicates which model is used for scoring.
- *
+ * Set the modelVersion property: This field indicates which model is used
+ * for scoring.
+ *
* @param modelVersion the modelVersion value to set.
* @return the LanguageResult object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java
index 002c5a673e461..18df75ef5dafd 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/LinkedEntity.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The LinkedEntity model. */
+/**
+ * The LinkedEntity model.
+ */
@Fluent
public final class LinkedEntity {
/*
@@ -47,16 +49,9 @@ public final class LinkedEntity {
@JsonProperty(value = "dataSource", required = true)
private String dataSource;
- /*
- * Bing unique identifier of the recognized entity. Use in conjunction with
- * the Bing Entity Search API to fetch additional relevant information.
- */
- @JsonProperty(value = "bingId")
- private String bingId;
-
/**
* Get the name property: Entity Linking formal name.
- *
+ *
* @return the name value.
*/
public String getName() {
@@ -65,7 +60,7 @@ public String getName() {
/**
* Set the name property: Entity Linking formal name.
- *
+ *
* @param name the name value to set.
* @return the LinkedEntity object itself.
*/
@@ -75,8 +70,9 @@ public LinkedEntity setName(String name) {
}
/**
- * Get the matches property: List of instances this entity appears in the text.
- *
+ * Get the matches property: List of instances this entity appears in the
+ * text.
+ *
* @return the matches value.
*/
public List getMatches() {
@@ -84,8 +80,9 @@ public List getMatches() {
}
/**
- * Set the matches property: List of instances this entity appears in the text.
- *
+ * Set the matches property: List of instances this entity appears in the
+ * text.
+ *
* @param matches the matches value to set.
* @return the LinkedEntity object itself.
*/
@@ -96,7 +93,7 @@ public LinkedEntity setMatches(List matches) {
/**
* Get the language property: Language used in the data source.
- *
+ *
* @return the language value.
*/
public String getLanguage() {
@@ -105,7 +102,7 @@ public String getLanguage() {
/**
* Set the language property: Language used in the data source.
- *
+ *
* @param language the language value to set.
* @return the LinkedEntity object itself.
*/
@@ -115,8 +112,9 @@ public LinkedEntity setLanguage(String language) {
}
/**
- * Get the id property: Unique identifier of the recognized entity from the data source.
- *
+ * Get the id property: Unique identifier of the recognized entity from the
+ * data source.
+ *
* @return the id value.
*/
public String getId() {
@@ -124,8 +122,9 @@ public String getId() {
}
/**
- * Set the id property: Unique identifier of the recognized entity from the data source.
- *
+ * Set the id property: Unique identifier of the recognized entity from the
+ * data source.
+ *
* @param id the id value to set.
* @return the LinkedEntity object itself.
*/
@@ -136,7 +135,7 @@ public LinkedEntity setId(String id) {
/**
* Get the url property: URL for the entity's page from the data source.
- *
+ *
* @return the url value.
*/
public String getUrl() {
@@ -145,7 +144,7 @@ public String getUrl() {
/**
* Set the url property: URL for the entity's page from the data source.
- *
+ *
* @param url the url value to set.
* @return the LinkedEntity object itself.
*/
@@ -155,8 +154,9 @@ public LinkedEntity setUrl(String url) {
}
/**
- * Get the dataSource property: Data source used to extract entity linking, such as Wiki/Bing etc.
- *
+ * Get the dataSource property: Data source used to extract entity linking,
+ * such as Wiki/Bing etc.
+ *
* @return the dataSource value.
*/
public String getDataSource() {
@@ -164,8 +164,9 @@ public String getDataSource() {
}
/**
- * Set the dataSource property: Data source used to extract entity linking, such as Wiki/Bing etc.
- *
+ * Set the dataSource property: Data source used to extract entity linking,
+ * such as Wiki/Bing etc.
+ *
* @param dataSource the dataSource value to set.
* @return the LinkedEntity object itself.
*/
@@ -173,26 +174,4 @@ public LinkedEntity setDataSource(String dataSource) {
this.dataSource = dataSource;
return this;
}
-
- /**
- * Get the bingId property: Bing unique identifier of the recognized entity. Use in conjunction with the Bing Entity
- * Search API to fetch additional relevant information.
- *
- * @return the bingId value.
- */
- public String getBingId() {
- return this.bingId;
- }
-
- /**
- * Set the bingId property: Bing unique identifier of the recognized entity. Use in conjunction with the Bing Entity
- * Search API to fetch additional relevant information.
- *
- * @param bingId the bingId value to set.
- * @return the LinkedEntity object itself.
- */
- public LinkedEntity setBingId(String bingId) {
- this.bingId = bingId;
- return this;
- }
}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Match.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Match.java
index 197feeb7ca037..19b4a45c097b2 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Match.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/Match.java
@@ -7,7 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The Match model. */
+/**
+ * The Match model.
+ */
@Fluent
public final class Match {
/*
@@ -24,21 +26,22 @@ public final class Match {
private String text;
/*
- * Start position for the entity match text.
+ * Start position (in Unicode characters) for the entity match text.
*/
@JsonProperty(value = "offset", required = true)
private int offset;
/*
- * Length for the entity match text.
+ * Length (in Unicode characters) for the entity match text.
*/
@JsonProperty(value = "length", required = true)
private int length;
/**
- * Get the confidenceScore property: If a well-known item is recognized, a decimal number denoting the confidence
- * level between 0 and 1 will be returned.
- *
+ * Get the confidenceScore property: If a well-known item is recognized, a
+ * decimal number denoting the confidence level between 0 and 1 will be
+ * returned.
+ *
* @return the confidenceScore value.
*/
public double getConfidenceScore() {
@@ -46,9 +49,10 @@ public double getConfidenceScore() {
}
/**
- * Set the confidenceScore property: If a well-known item is recognized, a decimal number denoting the confidence
- * level between 0 and 1 will be returned.
- *
+ * Set the confidenceScore property: If a well-known item is recognized, a
+ * decimal number denoting the confidence level between 0 and 1 will be
+ * returned.
+ *
* @param confidenceScore the confidenceScore value to set.
* @return the Match object itself.
*/
@@ -59,7 +63,7 @@ public Match setConfidenceScore(double confidenceScore) {
/**
* Get the text property: Entity text as appears in the request.
- *
+ *
* @return the text value.
*/
public String getText() {
@@ -68,7 +72,7 @@ public String getText() {
/**
* Set the text property: Entity text as appears in the request.
- *
+ *
* @param text the text value to set.
* @return the Match object itself.
*/
@@ -78,8 +82,9 @@ public Match setText(String text) {
}
/**
- * Get the offset property: Start position for the entity match text.
- *
+ * Get the offset property: Start position (in Unicode characters) for the
+ * entity match text.
+ *
* @return the offset value.
*/
public int getOffset() {
@@ -87,8 +92,9 @@ public int getOffset() {
}
/**
- * Set the offset property: Start position for the entity match text.
- *
+ * Set the offset property: Start position (in Unicode characters) for the
+ * entity match text.
+ *
* @param offset the offset value to set.
* @return the Match object itself.
*/
@@ -98,8 +104,9 @@ public Match setOffset(int offset) {
}
/**
- * Get the length property: Length for the entity match text.
- *
+ * Get the length property: Length (in Unicode characters) for the entity
+ * match text.
+ *
* @return the length value.
*/
public int getLength() {
@@ -107,8 +114,9 @@ public int getLength() {
}
/**
- * Set the length property: Length for the entity match text.
- *
+ * Set the length property: Length (in Unicode characters) for the entity
+ * match text.
+ *
* @param length the length value to set.
* @return the Match object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageBatchInput.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageBatchInput.java
index 186e5923c357b..285b47ab9b3c0 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageBatchInput.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageBatchInput.java
@@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The MultiLanguageBatchInput model. */
+/**
+ * The MultiLanguageBatchInput model.
+ */
@Fluent
public final class MultiLanguageBatchInput {
/*
@@ -18,8 +20,9 @@ public final class MultiLanguageBatchInput {
private List documents;
/**
- * Get the documents property: The set of documents to process as part of this batch.
- *
+ * Get the documents property: The set of documents to process as part of
+ * this batch.
+ *
* @return the documents value.
*/
public List getDocuments() {
@@ -27,8 +30,9 @@ public List getDocuments() {
}
/**
- * Set the documents property: The set of documents to process as part of this batch.
- *
+ * Set the documents property: The set of documents to process as part of
+ * this batch.
+ *
* @param documents the documents value to set.
* @return the MultiLanguageBatchInput object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageInput.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageInput.java
index b69c017d068c9..f2ba9a4180365 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageInput.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/MultiLanguageInput.java
@@ -7,7 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The MultiLanguageInput model. */
+/**
+ * The MultiLanguageInput model.
+ */
@Fluent
public final class MultiLanguageInput {
/*
@@ -32,7 +34,7 @@ public final class MultiLanguageInput {
/**
* Get the id property: A unique, non-empty document identifier.
- *
+ *
* @return the id value.
*/
public String getId() {
@@ -41,7 +43,7 @@ public String getId() {
/**
* Set the id property: A unique, non-empty document identifier.
- *
+ *
* @param id the id value to set.
* @return the MultiLanguageInput object itself.
*/
@@ -52,7 +54,7 @@ public MultiLanguageInput setId(String id) {
/**
* Get the text property: The input text to process.
- *
+ *
* @return the text value.
*/
public String getText() {
@@ -61,7 +63,7 @@ public String getText() {
/**
* Set the text property: The input text to process.
- *
+ *
* @param text the text value to set.
* @return the MultiLanguageInput object itself.
*/
@@ -71,9 +73,10 @@ public MultiLanguageInput setText(String text) {
}
/**
- * Get the language property: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example,
- * use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default.
- *
+ * Get the language property: (Optional) This is the 2 letter ISO 639-1
+ * representation of a language. For example, use "en" for English; "es"
+ * for Spanish etc. If not set, use "en" for English as default.
+ *
* @return the language value.
*/
public String getLanguage() {
@@ -81,9 +84,10 @@ public String getLanguage() {
}
/**
- * Set the language property: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example,
- * use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default.
- *
+ * Set the language property: (Optional) This is the 2 letter ISO 639-1
+ * representation of a language. For example, use "en" for English; "es"
+ * for Spanish etc. If not set, use "en" for English as default.
+ *
* @param language the language value to set.
* @return the MultiLanguageInput object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiDocumentEntities.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiDocumentEntities.java
deleted file mode 100644
index 60cc03b4e9422..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiDocumentEntities.java
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** The PiiDocumentEntities model. */
-@Fluent
-public final class PiiDocumentEntities {
- /*
- * Unique, non-empty document identifier.
- */
- @JsonProperty(value = "id", required = true)
- private String id;
-
- /*
- * Recognized entities in the document.
- */
- @JsonProperty(value = "entities", required = true)
- private List entities;
-
- /*
- * Warnings encountered while processing document.
- */
- @JsonProperty(value = "warnings", required = true)
- private List warnings;
-
- /*
- * if showStats=true was specified in the request this field will contain
- * information about the document payload.
- */
- @JsonProperty(value = "statistics")
- private DocumentStatistics statistics;
-
- /*
- * Returns redacted text.
- */
- @JsonProperty(value = "redactedText")
- private String redactedText;
-
- /**
- * Get the id property: Unique, non-empty document identifier.
- *
- * @return the id value.
- */
- public String getId() {
- return this.id;
- }
-
- /**
- * Set the id property: Unique, non-empty document identifier.
- *
- * @param id the id value to set.
- * @return the PiiDocumentEntities object itself.
- */
- public PiiDocumentEntities setId(String id) {
- this.id = id;
- return this;
- }
-
- /**
- * Get the entities property: Recognized entities in the document.
- *
- * @return the entities value.
- */
- public List getEntities() {
- return this.entities;
- }
-
- /**
- * Set the entities property: Recognized entities in the document.
- *
- * @param entities the entities value to set.
- * @return the PiiDocumentEntities object itself.
- */
- public PiiDocumentEntities setEntities(List entities) {
- this.entities = entities;
- return this;
- }
-
- /**
- * Get the warnings property: Warnings encountered while processing document.
- *
- * @return the warnings value.
- */
- public List getWarnings() {
- return this.warnings;
- }
-
- /**
- * Set the warnings property: Warnings encountered while processing document.
- *
- * @param warnings the warnings value to set.
- * @return the PiiDocumentEntities object itself.
- */
- public PiiDocumentEntities setWarnings(List warnings) {
- this.warnings = warnings;
- return this;
- }
-
- /**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
- * @return the statistics value.
- */
- public DocumentStatistics getStatistics() {
- return this.statistics;
- }
-
- /**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the document payload.
- *
- * @param statistics the statistics value to set.
- * @return the PiiDocumentEntities object itself.
- */
- public PiiDocumentEntities setStatistics(DocumentStatistics statistics) {
- this.statistics = statistics;
- return this;
- }
-
- /**
- * Get the redactedText property: Returns redacted text.
- *
- * @return the redactedText value.
- */
- public String getRedactedText() {
- return this.redactedText;
- }
-
- /**
- * Set the redactedText property: Returns redacted text.
- *
- * @param redactedText the redactedText value to set.
- * @return the PiiDocumentEntities object itself.
- */
- public PiiDocumentEntities setRedactedText(String redactedText) {
- this.redactedText = redactedText;
- return this;
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiEntitiesResult.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiEntitiesResult.java
deleted file mode 100644
index fade6eb5c72e2..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/PiiEntitiesResult.java
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** The PiiEntitiesResult model. */
-@Fluent
-public final class PiiEntitiesResult {
- /*
- * Response by document
- */
- @JsonProperty(value = "documents", required = true)
- private List documents;
-
- /*
- * Errors by document id.
- */
- @JsonProperty(value = "errors", required = true)
- private List errors;
-
- /*
- * if showStats=true was specified in the request this field will contain
- * information about the request payload.
- */
- @JsonProperty(value = "statistics")
- private RequestStatistics statistics;
-
- /*
- * This field indicates which model is used for scoring.
- */
- @JsonProperty(value = "modelVersion", required = true)
- private String modelVersion;
-
- /**
- * Get the documents property: Response by document.
- *
- * @return the documents value.
- */
- public List getDocuments() {
- return this.documents;
- }
-
- /**
- * Set the documents property: Response by document.
- *
- * @param documents the documents value to set.
- * @return the PiiEntitiesResult object itself.
- */
- public PiiEntitiesResult setDocuments(List documents) {
- this.documents = documents;
- return this;
- }
-
- /**
- * Get the errors property: Errors by document id.
- *
- * @return the errors value.
- */
- public List getErrors() {
- return this.errors;
- }
-
- /**
- * Set the errors property: Errors by document id.
- *
- * @param errors the errors value to set.
- * @return the PiiEntitiesResult object itself.
- */
- public PiiEntitiesResult setErrors(List errors) {
- this.errors = errors;
- return this;
- }
-
- /**
- * Get the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
- * @return the statistics value.
- */
- public RequestStatistics getStatistics() {
- return this.statistics;
- }
-
- /**
- * Set the statistics property: if showStats=true was specified in the request this field will contain information
- * about the request payload.
- *
- * @param statistics the statistics value to set.
- * @return the PiiEntitiesResult object itself.
- */
- public PiiEntitiesResult setStatistics(RequestStatistics statistics) {
- this.statistics = statistics;
- return this;
- }
-
- /**
- * Get the modelVersion property: This field indicates which model is used for scoring.
- *
- * @return the modelVersion value.
- */
- public String getModelVersion() {
- return this.modelVersion;
- }
-
- /**
- * Set the modelVersion property: This field indicates which model is used for scoring.
- *
- * @param modelVersion the modelVersion value to set.
- * @return the PiiEntitiesResult object itself.
- */
- public PiiEntitiesResult setModelVersion(String modelVersion) {
- this.modelVersion = modelVersion;
- return this;
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/RequestStatistics.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/RequestStatistics.java
index 653a40960b82b..ceb0be002998e 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/RequestStatistics.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/RequestStatistics.java
@@ -7,7 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The RequestStatistics model. */
+/**
+ * The RequestStatistics model.
+ */
@Fluent
public final class RequestStatistics {
/*
@@ -37,8 +39,9 @@ public final class RequestStatistics {
private long transactionsCount;
/**
- * Get the documentsCount property: Number of documents submitted in the request.
- *
+ * Get the documentsCount property: Number of documents submitted in the
+ * request.
+ *
* @return the documentsCount value.
*/
public int getDocumentsCount() {
@@ -46,8 +49,9 @@ public int getDocumentsCount() {
}
/**
- * Set the documentsCount property: Number of documents submitted in the request.
- *
+ * Set the documentsCount property: Number of documents submitted in the
+ * request.
+ *
* @param documentsCount the documentsCount value to set.
* @return the RequestStatistics object itself.
*/
@@ -57,9 +61,9 @@ public RequestStatistics setDocumentsCount(int documentsCount) {
}
/**
- * Get the validDocumentsCount property: Number of valid documents. This excludes empty, over-size limit or
- * non-supported languages documents.
- *
+ * Get the validDocumentsCount property: Number of valid documents. This
+ * excludes empty, over-size limit or non-supported languages documents.
+ *
* @return the validDocumentsCount value.
*/
public int getValidDocumentsCount() {
@@ -67,9 +71,9 @@ public int getValidDocumentsCount() {
}
/**
- * Set the validDocumentsCount property: Number of valid documents. This excludes empty, over-size limit or
- * non-supported languages documents.
- *
+ * Set the validDocumentsCount property: Number of valid documents. This
+ * excludes empty, over-size limit or non-supported languages documents.
+ *
* @param validDocumentsCount the validDocumentsCount value to set.
* @return the RequestStatistics object itself.
*/
@@ -79,9 +83,10 @@ public RequestStatistics setValidDocumentsCount(int validDocumentsCount) {
}
/**
- * Get the erroneousDocumentsCount property: Number of invalid documents. This includes empty, over-size limit or
- * non-supported languages documents.
- *
+ * Get the erroneousDocumentsCount property: Number of invalid documents.
+ * This includes empty, over-size limit or non-supported languages
+ * documents.
+ *
* @return the erroneousDocumentsCount value.
*/
public int getErroneousDocumentsCount() {
@@ -89,9 +94,10 @@ public int getErroneousDocumentsCount() {
}
/**
- * Set the erroneousDocumentsCount property: Number of invalid documents. This includes empty, over-size limit or
- * non-supported languages documents.
- *
+ * Set the erroneousDocumentsCount property: Number of invalid documents.
+ * This includes empty, over-size limit or non-supported languages
+ * documents.
+ *
* @param erroneousDocumentsCount the erroneousDocumentsCount value to set.
* @return the RequestStatistics object itself.
*/
@@ -101,8 +107,9 @@ public RequestStatistics setErroneousDocumentsCount(int erroneousDocumentsCount)
}
/**
- * Get the transactionsCount property: Number of transactions for the request.
- *
+ * Get the transactionsCount property: Number of transactions for the
+ * request.
+ *
* @return the transactionsCount value.
*/
public long getTransactionsCount() {
@@ -110,8 +117,9 @@ public long getTransactionsCount() {
}
/**
- * Set the transactionsCount property: Number of transactions for the request.
- *
+ * Set the transactionsCount property: Number of transactions for the
+ * request.
+ *
* @param transactionsCount the transactionsCount value to set.
* @return the RequestStatistics object itself.
*/
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java
deleted file mode 100644
index d7489460660a8..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspect.java
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** The SentenceAspect model. */
-@Fluent
-public final class SentenceAspect {
- /*
- * Aspect level sentiment for the aspect in the sentence.
- */
- @JsonProperty(value = "sentiment", required = true)
- private TokenSentimentValue sentiment;
-
- /*
- * Aspect level sentiment confidence scores for the aspect in the sentence.
- */
- @JsonProperty(value = "confidenceScores", required = true)
- private AspectConfidenceScoreLabel confidenceScores;
-
- /*
- * The aspect offset from the start of the sentence.
- */
- @JsonProperty(value = "offset", required = true)
- private int offset;
-
- /*
- * The length of the aspect.
- */
- @JsonProperty(value = "length", required = true)
- private int length;
-
- /*
- * The aspect text detected.
- */
- @JsonProperty(value = "text", required = true)
- private String text;
-
- /*
- * The array of either opinion or aspect object which is related to the
- * aspect.
- */
- @JsonProperty(value = "relations", required = true)
- private List relations;
-
- /**
- * Get the sentiment property: Aspect level sentiment for the aspect in the sentence.
- *
- * @return the sentiment value.
- */
- public TokenSentimentValue getSentiment() {
- return this.sentiment;
- }
-
- /**
- * Set the sentiment property: Aspect level sentiment for the aspect in the sentence.
- *
- * @param sentiment the sentiment value to set.
- * @return the SentenceAspect object itself.
- */
- public SentenceAspect setSentiment(TokenSentimentValue sentiment) {
- this.sentiment = sentiment;
- return this;
- }
-
- /**
- * Get the confidenceScores property: Aspect level sentiment confidence scores for the aspect in the sentence.
- *
- * @return the confidenceScores value.
- */
- public AspectConfidenceScoreLabel getConfidenceScores() {
- return this.confidenceScores;
- }
-
- /**
- * Set the confidenceScores property: Aspect level sentiment confidence scores for the aspect in the sentence.
- *
- * @param confidenceScores the confidenceScores value to set.
- * @return the SentenceAspect object itself.
- */
- public SentenceAspect setConfidenceScores(AspectConfidenceScoreLabel confidenceScores) {
- this.confidenceScores = confidenceScores;
- return this;
- }
-
- /**
- * Get the offset property: The aspect offset from the start of the sentence.
- *
- * @return the offset value.
- */
- public int getOffset() {
- return this.offset;
- }
-
- /**
- * Set the offset property: The aspect offset from the start of the sentence.
- *
- * @param offset the offset value to set.
- * @return the SentenceAspect object itself.
- */
- public SentenceAspect setOffset(int offset) {
- this.offset = offset;
- return this;
- }
-
- /**
- * Get the length property: The length of the aspect.
- *
- * @return the length value.
- */
- public int getLength() {
- return this.length;
- }
-
- /**
- * Set the length property: The length of the aspect.
- *
- * @param length the length value to set.
- * @return the SentenceAspect object itself.
- */
- public SentenceAspect setLength(int length) {
- this.length = length;
- return this;
- }
-
- /**
- * Get the text property: The aspect text detected.
- *
- * @return the text value.
- */
- public String getText() {
- return this.text;
- }
-
- /**
- * Set the text property: The aspect text detected.
- *
- * @param text the text value to set.
- * @return the SentenceAspect object itself.
- */
- public SentenceAspect setText(String text) {
- this.text = text;
- return this;
- }
-
- /**
- * Get the relations property: The array of either opinion or aspect object which is related to the aspect.
- *
- * @return the relations value.
- */
- public List getRelations() {
- return this.relations;
- }
-
- /**
- * Set the relations property: The array of either opinion or aspect object which is related to the aspect.
- *
- * @param relations the relations value to set.
- * @return the SentenceAspect object itself.
- */
- public SentenceAspect setRelations(List relations) {
- this.relations = relations;
- return this;
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspectSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspectSentiment.java
deleted file mode 100644
index efb6a08ee97e4..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceAspectSentiment.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for SentenceAspectSentiment. */
-public final class SentenceAspectSentiment extends ExpandableStringEnum {
- /** Static value positive for SentenceAspectSentiment. */
- public static final SentenceAspectSentiment POSITIVE = fromString("positive");
-
- /** Static value mixed for SentenceAspectSentiment. */
- public static final SentenceAspectSentiment MIXED = fromString("mixed");
-
- /** Static value negative for SentenceAspectSentiment. */
- public static final SentenceAspectSentiment NEGATIVE = fromString("negative");
-
- /**
- * Creates or finds a SentenceAspectSentiment from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding SentenceAspectSentiment.
- */
- @JsonCreator
- public static SentenceAspectSentiment fromString(String name) {
- return fromString(name, SentenceAspectSentiment.class);
- }
-
- /** @return known SentenceAspectSentiment values. */
- public static Collection values() {
- return values(SentenceAspectSentiment.class);
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java
deleted file mode 100644
index d54d20f27272d..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinion.java
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The SentenceOpinion model. */
-@Fluent
-public final class SentenceOpinion {
- /*
- * Opinion level sentiment for the aspect in the sentence.
- */
- @JsonProperty(value = "sentiment", required = true)
- private TokenSentimentValue sentiment;
-
- /*
- * Opinion level sentiment confidence scores for the aspect in the
- * sentence.
- */
- @JsonProperty(value = "confidenceScores", required = true)
- private AspectConfidenceScoreLabel confidenceScores;
-
- /*
- * The opinion offset from the start of the sentence.
- */
- @JsonProperty(value = "offset", required = true)
- private int offset;
-
- /*
- * The length of the opinion.
- */
- @JsonProperty(value = "length", required = true)
- private int length;
-
- /*
- * The aspect text detected.
- */
- @JsonProperty(value = "text", required = true)
- private String text;
-
- /*
- * The indicator representing if the opinion is negated.
- */
- @JsonProperty(value = "isNegated", required = true)
- private boolean isNegated;
-
- /**
- * Get the sentiment property: Opinion level sentiment for the aspect in the sentence.
- *
- * @return the sentiment value.
- */
- public TokenSentimentValue getSentiment() {
- return this.sentiment;
- }
-
- /**
- * Set the sentiment property: Opinion level sentiment for the aspect in the sentence.
- *
- * @param sentiment the sentiment value to set.
- * @return the SentenceOpinion object itself.
- */
- public SentenceOpinion setSentiment(TokenSentimentValue sentiment) {
- this.sentiment = sentiment;
- return this;
- }
-
- /**
- * Get the confidenceScores property: Opinion level sentiment confidence scores for the aspect in the sentence.
- *
- * @return the confidenceScores value.
- */
- public AspectConfidenceScoreLabel getConfidenceScores() {
- return this.confidenceScores;
- }
-
- /**
- * Set the confidenceScores property: Opinion level sentiment confidence scores for the aspect in the sentence.
- *
- * @param confidenceScores the confidenceScores value to set.
- * @return the SentenceOpinion object itself.
- */
- public SentenceOpinion setConfidenceScores(AspectConfidenceScoreLabel confidenceScores) {
- this.confidenceScores = confidenceScores;
- return this;
- }
-
- /**
- * Get the offset property: The opinion offset from the start of the sentence.
- *
- * @return the offset value.
- */
- public int getOffset() {
- return this.offset;
- }
-
- /**
- * Set the offset property: The opinion offset from the start of the sentence.
- *
- * @param offset the offset value to set.
- * @return the SentenceOpinion object itself.
- */
- public SentenceOpinion setOffset(int offset) {
- this.offset = offset;
- return this;
- }
-
- /**
- * Get the length property: The length of the opinion.
- *
- * @return the length value.
- */
- public int getLength() {
- return this.length;
- }
-
- /**
- * Set the length property: The length of the opinion.
- *
- * @param length the length value to set.
- * @return the SentenceOpinion object itself.
- */
- public SentenceOpinion setLength(int length) {
- this.length = length;
- return this;
- }
-
- /**
- * Get the text property: The aspect text detected.
- *
- * @return the text value.
- */
- public String getText() {
- return this.text;
- }
-
- /**
- * Set the text property: The aspect text detected.
- *
- * @param text the text value to set.
- * @return the SentenceOpinion object itself.
- */
- public SentenceOpinion setText(String text) {
- this.text = text;
- return this;
- }
-
- /**
- * Get the isNegated property: The indicator representing if the opinion is negated.
- *
- * @return the isNegated value.
- */
- public boolean isNegated() {
- return this.isNegated;
- }
-
- /**
- * Set the isNegated property: The indicator representing if the opinion is negated.
- *
- * @param isNegated the isNegated value to set.
- * @return the SentenceOpinion object itself.
- */
- public SentenceOpinion setIsNegated(boolean isNegated) {
- this.isNegated = isNegated;
- return this;
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinionSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinionSentiment.java
deleted file mode 100644
index 976677a4f2e50..0000000000000
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceOpinionSentiment.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.ai.textanalytics.implementation.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for SentenceOpinionSentiment. */
-public final class SentenceOpinionSentiment extends ExpandableStringEnum {
- /** Static value positive for SentenceOpinionSentiment. */
- public static final SentenceOpinionSentiment POSITIVE = fromString("positive");
-
- /** Static value mixed for SentenceOpinionSentiment. */
- public static final SentenceOpinionSentiment MIXED = fromString("mixed");
-
- /** Static value negative for SentenceOpinionSentiment. */
- public static final SentenceOpinionSentiment NEGATIVE = fromString("negative");
-
- /**
- * Creates or finds a SentenceOpinionSentiment from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding SentenceOpinionSentiment.
- */
- @JsonCreator
- public static SentenceOpinionSentiment fromString(String name) {
- return fromString(name, SentenceOpinionSentiment.class);
- }
-
- /** @return known SentenceOpinionSentiment values. */
- public static Collection values() {
- return values(SentenceOpinionSentiment.class);
- }
-}
diff --git a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentiment.java b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentiment.java
index 5bdd3283c6808..600f1e838c8c7 100644
--- a/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentiment.java
+++ b/sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/SentenceSentiment.java
@@ -6,15 +6,16 @@
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-/** The SentenceSentiment model. */
+/**
+ * The SentenceSentiment model.
+ */
@Fluent
public final class SentenceSentiment {
/*
* The sentence text.
*/
- @JsonProperty(value = "text", required = true)
+ @JsonProperty(value = "text")
private String text;
/*
@@ -37,26 +38,14 @@ public final class SentenceSentiment {
private int offset;
/*
- * The length of the sentence.
+ * The length of the sentence by Unicode standard.
*/
@JsonProperty(value = "length", required = true)
private int length;
- /*
- * The array of aspect object for the sentence.
- */
- @JsonProperty(value = "aspects")
- private List aspects;
-
- /*
- * The array of opinion object for the sentence.
- */
- @JsonProperty(value = "opinions")
- private List opinions;
-
/**
* Get the text property: The sentence text.
- *
+ *
* @return the text value.
*/
public String getText() {
@@ -65,7 +54,7 @@ public String getText() {
/**
* Set the text property: The sentence text.
- *
+ *
* @param text the text value to set.
* @return the SentenceSentiment object itself.
*/
@@ -76,7 +65,7 @@ public SentenceSentiment setText(String text) {
/**
* Get the sentiment property: The predicted Sentiment for the sentence.
- *
+ *
* @return the sentiment value.
*/
public SentenceSentimentValue getSentiment() {
@@ -85,7 +74,7 @@ public SentenceSentimentValue getSentiment() {
/**
* Set the sentiment property: The predicted Sentiment for the sentence.
- *
+ *
* @param sentiment the sentiment value to set.
* @return the SentenceSentiment object itself.
*/
@@ -95,9 +84,9 @@ public SentenceSentiment setSentiment(SentenceSentimentValue sentiment) {
}
/**
- * Get the confidenceScores property: The sentiment confidence score between 0 and 1 for the sentence for all
- * classes.
- *
+ * Get the confidenceScores property: The sentiment confidence score
+ * between 0 and 1 for the sentence for all classes.
+ *
* @return the confidenceScores value.
*/
public SentimentConfidenceScorePerLabel getConfidenceScores() {
@@ -105,9 +94,9 @@ public SentimentConfidenceScorePerLabel getConfidenceScores() {
}
/**
- * Set the confidenceScores property: The sentiment confidence score between 0 and 1 for the sentence for all
- * classes.
- *
+ * Set the confidenceScores property: The sentiment confidence score
+ * between 0 and 1 for the sentence for all classes.
+ *
* @param confidenceScores the confidenceScores value to set.
* @return the SentenceSentiment object itself.
*/
@@ -117,8 +106,9 @@ public SentenceSentiment setConfidenceScores(SentimentConfidenceScorePerLabel co
}
/**
- * Get the offset property: The sentence offset from the start of the document.
- *
+ * Get the offset property: The sentence offset from the start of the
+ * document.
+ *
* @return the offset value.
*/
public int getOffset() {
@@ -126,8 +116,9 @@ public int getOffset() {
}
/**
- * Set the offset property: The sentence offset from the start of the document.
- *
+ * Set the offset property: The sentence offset from the start of the
+ * document.
+ *
* @param offset the offset value to set.
* @return the SentenceSentiment object itself.
*/
@@ -137,8 +128,8 @@ public SentenceSentiment setOffset(int offset) {
}
/**
- * Get the length property: The length of the sentence.
- *
+ * Get the length property: The length of the sentence by Unicode standard.
+ *
* @return the length value.
*/
public int getLength() {
@@ -146,8 +137,8 @@ public int getLength() {
}
/**
- * Set the length property: The length of the sentence.
- *
+ * Set the length property: The length of the sentence by Unicode standard.
+ *
* @param length the length value to set.
* @return the SentenceSentiment object itself.
*/
@@ -155,44 +146,4 @@ public SentenceSentiment setLength(int length) {
this.length = length;
return this;
}
-
- /**
- * Get the aspects property: The array of aspect object for the sentence.
- *
- * @return the aspects value.
- */
- public List getAspects() {
- return this.aspects;
- }
-
- /**
- * Set the aspects property: The array of aspect object for the sentence.
- *
- * @param aspects the aspects value to set.
- * @return the SentenceSentiment object itself.
- */
- public SentenceSentiment setAspects(List aspects) {
- this.aspects = aspects;
- return this;
- }
-
- /**
- * Get the opinions property: The array of opinion object for the sentence.
- *
- * @return the opinions value.
- */
- public List