From 8cd9d63cd814bba58e4f01c7d26fabcd07de74ba Mon Sep 17 00:00:00 2001
From: awsmobilesdk
* Inspects the text of a batch of documents for named entities and returns
- * information about them. For more information about named entities, see
- * how-entities
+ * information about them. For more information about named entities, see
+ * Entities in the Comprehend Developer Guide.
*
* Inspects the text of a batch of documents for the syntax and part of
* speech of the words in the document and returns information about them.
- * For more information, see how-syntax.
+ * For more information, see Syntax in the Comprehend Developer Guide.
*
+ * Inspects a batch of documents and returns a sentiment analysis for each
+ * entity identified in the documents.
+ *
+ * For more information about targeted sentiment, see Targeted sentiment.
+ *
* Creates a new document classification request to analyze a single
@@ -283,8 +319,9 @@ ContainsPiiEntitiesResult containsPiiEntities(
* documents. To create a classifier, you provide a set of training
* documents that labeled with the categories that you want to use. After
* the classifier is trained you can use it to categorize a set of labeled
- * documents into the categories. For more information, see
- * how-document-classification.
+ * documents into the categories. For more information, see Document Classification in the Comprehend Developer Guide.
*
* Inspects text for named entities, and returns information about them. For
- * more information, about named entities, see how-entities.
+ * more information, about named entities, see Entities in the Comprehend Developer Guide.
*
* Inspects text for syntax and the part of speech of words in the document.
- * For more information, how-syntax.
+ * For more information, see Syntax in the Comprehend Developer Guide.
*
+ * Inspects the input text and returns a sentiment analysis for each entity
+ * identified in the text.
+ *
+ * For more information about targeted sentiment, see Targeted sentiment.
+ *
* Creates a new custom model that replicates a source custom model that you
diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendAsync.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendAsync.java
index 31ab1387c8..51167a6c44 100644
--- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendAsync.java
+++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendAsync.java
@@ -98,8 +98,10 @@ Future
* Inspects the text of a batch of documents for named entities and returns
- * information about them. For more information about named entities, see
- * how-entities
+ * information about them. For more information about named entities, see
+ * Entities in the Comprehend Developer Guide.
*
* Inspects the text of a batch of documents for named entities and returns
- * information about them. For more information about named entities, see
- * how-entities
+ * information about them. For more information about named entities, see
+ * Entities in the Comprehend Developer Guide.
*
* Inspects the text of a batch of documents for the syntax and part of
* speech of the words in the document and returns information about them.
- * For more information, see how-syntax.
+ * For more information, see Syntax in the Comprehend Developer Guide.
*
* Inspects the text of a batch of documents for the syntax and part of
* speech of the words in the document and returns information about them.
- * For more information, see how-syntax.
+ * For more information, see Syntax in the Comprehend Developer Guide.
*
+ * Inspects a batch of documents and returns a sentiment analysis for each
+ * entity identified in the documents.
+ *
+ * For more information about targeted sentiment, see Targeted sentiment.
+ *
+ * Inspects a batch of documents and returns a sentiment analysis for each
+ * entity identified in the documents.
+ *
+ * For more information about targeted sentiment, see Targeted sentiment.
+ *
* Creates a new document classification request to analyze a single
@@ -459,8 +536,9 @@ Future
* Inspects text for named entities, and returns information about them. For
- * more information, about named entities, see how-entities.
+ * more information, about named entities, see Entities in the Comprehend Developer Guide.
*
* Inspects text for named entities, and returns information about them. For
- * more information, about named entities, see how-entities.
+ * more information, about named entities, see Entities in the Comprehend Developer Guide.
*
* Inspects text for syntax and the part of speech of words in the document.
- * For more information, how-syntax.
+ * For more information, see Syntax in the Comprehend Developer Guide.
*
* Inspects text for syntax and the part of speech of words in the document.
- * For more information, how-syntax.
+ * For more information, see Syntax in the Comprehend Developer Guide.
*
+ * Inspects the input text and returns a sentiment analysis for each entity
+ * identified in the text.
+ *
+ * For more information about targeted sentiment, see Targeted sentiment.
+ *
+ * Inspects the input text and returns a sentiment analysis for each entity
+ * identified in the text.
+ *
+ * For more information about targeted sentiment, see Targeted sentiment.
+ *
* Creates a new custom model that replicates a source custom model that you
diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendAsyncClient.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendAsyncClient.java
index aecd9ebe53..994485b75c 100644
--- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendAsyncClient.java
+++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendAsyncClient.java
@@ -342,8 +342,10 @@ public BatchDetectDominantLanguageResult call() throws Exception {
/**
*
* Inspects the text of a batch of documents for named entities and returns
- * information about them. For more information about named entities, see
- * how-entities
+ * information about them. For more information about named entities, see
+ * Entities in the Comprehend Developer Guide.
*
* Inspects the text of a batch of documents for named entities and returns
- * information about them. For more information about named entities, see
- * how-entities
+ * information about them. For more information about named entities, see
+ * Entities in the Comprehend Developer Guide.
*
* Inspects the text of a batch of documents for the syntax and part of
* speech of the words in the document and returns information about them.
- * For more information, see how-syntax.
+ * For more information, see Syntax in the Comprehend Developer Guide.
*
* Inspects the text of a batch of documents for the syntax and part of
* speech of the words in the document and returns information about them.
- * For more information, see how-syntax.
+ * For more information, see Syntax in the Comprehend Developer Guide.
*
+ * Inspects a batch of documents and returns a sentiment analysis for each
+ * entity identified in the documents.
+ *
+ * For more information about targeted sentiment, see Targeted sentiment.
+ *
+ * Inspects a batch of documents and returns a sentiment analysis for each
+ * entity identified in the documents.
+ *
+ * For more information about targeted sentiment, see Targeted sentiment.
+ *
* Creates a new document classification request to analyze a single
@@ -799,8 +892,9 @@ public ContainsPiiEntitiesResult call() throws Exception {
* documents. To create a classifier, you provide a set of training
* documents that labeled with the categories that you want to use. After
* the classifier is trained you can use it to categorize a set of labeled
- * documents into the categories. For more information, see
- * how-document-classification.
+ * documents into the categories. For more information, see Document Classification in the Comprehend Developer Guide.
*
* Inspects text for named entities, and returns information about them. For - * more information, about named entities, see how-entities. + * more information, about named entities, see Entities in the Comprehend Developer Guide. *
* * @param detectEntitiesRequest @@ -2451,7 +2548,9 @@ public DetectEntitiesResult call() throws Exception { /** ** Inspects text for named entities, and returns information about them. For - * more information, about named entities, see how-entities. + * more information, about named entities, see Entities in the Comprehend Developer Guide. *
* * @param detectEntitiesRequest @@ -2709,7 +2808,9 @@ public DetectSentimentResult call() throws Exception { /** ** Inspects text for syntax and the part of speech of words in the document. - * For more information, how-syntax. + * For more information, see Syntax in the Comprehend Developer Guide. *
* * @param detectSyntaxRequest @@ -2740,7 +2841,9 @@ public DetectSyntaxResult call() throws Exception { /** ** Inspects text for syntax and the part of speech of words in the document. - * For more information, how-syntax. + * For more information, see Syntax in the Comprehend Developer Guide. *
* * @param detectSyntaxRequest @@ -2777,6 +2880,89 @@ public DetectSyntaxResult call() throws Exception { }); } + /** + *+ * Inspects the input text and returns a sentiment analysis for each entity + * identified in the text. + *
+ *+ * For more information about targeted sentiment, see Targeted sentiment. + *
+ * + * @param detectTargetedSentimentRequest + * @return A Java Future object containing the response from the + * DetectTargetedSentiment service method, as returned by Amazon + * Comprehend. + * @throws InvalidRequestException + * @throws TextSizeLimitExceededException + * @throws UnsupportedLanguageException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Comprehend indicating either a problem with the data in the + * request, or a server side issue. + */ + public Future+ * Inspects the input text and returns a sentiment analysis for each entity + * identified in the text. + *
+ *+ * For more information about targeted sentiment, see Targeted sentiment. + *
+ * + * @param detectTargetedSentimentRequest + * @return A Java Future object containing the response from the + * DetectTargetedSentiment service method, as returned by Amazon + * Comprehend. + * @throws InvalidRequestException + * @throws TextSizeLimitExceededException + * @throws UnsupportedLanguageException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Comprehend indicating either a problem with the data in the + * request, or a server side issue. + */ + public Future* Creates a new custom model that replicates a source custom model that you diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendClient.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendClient.java index b00967fa62..09df1f8254 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendClient.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/AmazonComprehendClient.java @@ -422,8 +422,10 @@ public BatchDetectDominantLanguageResult batchDetectDominantLanguage( /** *
* Inspects the text of a batch of documents for named entities and returns - * information about them. For more information about named entities, see - * how-entities + * information about them. For more information about named entities, see + * Entities in the Comprehend Developer Guide. *
* * @param batchDetectEntitiesRequest @@ -586,7 +588,9 @@ public BatchDetectSentimentResult batchDetectSentiment( ** Inspects the text of a batch of documents for the syntax and part of * speech of the words in the document and returns information about them. - * For more information, see how-syntax. + * For more information, see Syntax in the Comprehend Developer Guide. *
* * @param batchDetectSyntaxRequest @@ -636,6 +640,65 @@ public BatchDetectSyntaxResult batchDetectSyntax( } } + /** + *+ * Inspects a batch of documents and returns a sentiment analysis for each + * entity identified in the documents. + *
+ *+ * For more information about targeted sentiment, see Targeted sentiment. + *
+ * + * @param batchDetectTargetedSentimentRequest + * @return batchDetectTargetedSentimentResult The response from the + * BatchDetectTargetedSentiment service method, as returned by + * Amazon Comprehend. + * @throws InvalidRequestException + * @throws TextSizeLimitExceededException + * @throws UnsupportedLanguageException + * @throws BatchSizeLimitExceededException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Comprehend indicating either a problem with the data in the + * request, or a server side issue. + */ + public BatchDetectTargetedSentimentResult batchDetectTargetedSentiment( + BatchDetectTargetedSentimentRequest batchDetectTargetedSentimentRequest) + throws AmazonServiceException, AmazonClientException { + ExecutionContext executionContext = createExecutionContext(batchDetectTargetedSentimentRequest); + AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); + awsRequestMetrics.startEvent(Field.ClientExecuteTime); + Request* Creates a new document classification request to analyze a single @@ -747,8 +810,9 @@ public ContainsPiiEntitiesResult containsPiiEntities( * documents. To create a classifier, you provide a set of training * documents that labeled with the categories that you want to use. After * the classifier is trained you can use it to categorize a set of labeled - * documents into the categories. For more information, see - * how-document-classification. + * documents into the categories. For more information, see Document Classification in the Comprehend Developer Guide. *
* * @param createDocumentClassifierRequest @@ -1895,7 +1959,9 @@ public DetectDominantLanguageResult detectDominantLanguage( /** ** Inspects text for named entities, and returns information about them. For - * more information, about named entities, see how-entities. + * more information, about named entities, see Entities in the Comprehend Developer Guide. *
* * @param detectEntitiesRequest @@ -2098,7 +2164,9 @@ public DetectSentimentResult detectSentiment(DetectSentimentRequest detectSentim /** ** Inspects text for syntax and the part of speech of words in the document. - * For more information, how-syntax. + * For more information, see Syntax in the Comprehend Developer Guide. *
* * @param detectSyntaxRequest @@ -2145,6 +2213,64 @@ public DetectSyntaxResult detectSyntax(DetectSyntaxRequest detectSyntaxRequest) } } + /** + *+ * Inspects the input text and returns a sentiment analysis for each entity + * identified in the text. + *
+ *+ * For more information about targeted sentiment, see Targeted sentiment. + *
+ * + * @param detectTargetedSentimentRequest + * @return detectTargetedSentimentResult The response from the + * DetectTargetedSentiment service method, as returned by Amazon + * Comprehend. + * @throws InvalidRequestException + * @throws TextSizeLimitExceededException + * @throws UnsupportedLanguageException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Comprehend indicating either a problem with the data in the + * request, or a server side issue. + */ + public DetectTargetedSentimentResult detectTargetedSentiment( + DetectTargetedSentimentRequest detectTargetedSentimentRequest) + throws AmazonServiceException, AmazonClientException { + ExecutionContext executionContext = createExecutionContext(detectTargetedSentimentRequest); + AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); + awsRequestMetrics.startEvent(Field.ClientExecuteTime); + Request* Creates a new custom model that replicates a source custom model that you diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectDominantLanguageRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectDominantLanguageRequest.java index cc224037be..c0448efefc 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectDominantLanguageRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectDominantLanguageRequest.java @@ -31,27 +31,25 @@ public class BatchDetectDominantLanguageRequest extends AmazonWebServiceRequest Serializable { /** *
- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document should contain at least 20 - * characters and must contain fewer than 5,000 bytes of UTF-8 encoded - * characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. Each document should contain at + * least 20 characters. The maximum size of each document is 5 KB. *
*/ private java.util.List- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document should contain at least 20 - * characters and must contain fewer than 5,000 bytes of UTF-8 encoded - * characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. Each document should contain at + * least 20 characters. The maximum size of each document is 5 KB. *
* * @return- * A list containing the text of the input documents. The list can - * contain a maximum of 25 documents. Each document should contain - * at least 20 characters and must contain fewer than 5,000 bytes of - * UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. + * The list can contain a maximum of 25 documents. Each document + * should contain at least 20 characters. The maximum size of each + * document is 5 KB. *
*/ public java.util.List- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document should contain at least 20 - * characters and must contain fewer than 5,000 bytes of UTF-8 encoded - * characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. Each document should contain at + * least 20 characters. The maximum size of each document is 5 KB. *
* * @param textList- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document should - * contain at least 20 characters and must contain fewer than - * 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. + * Each document should contain at least 20 characters. The + * maximum size of each document is 5 KB. *
*/ public void setTextList(java.util.Collection- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document should contain at least 20 - * characters and must contain fewer than 5,000 bytes of UTF-8 encoded - * characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. Each document should contain at + * least 20 characters. The maximum size of each document is 5 KB. *
** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document should - * contain at least 20 characters and must contain fewer than - * 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. + * Each document should contain at least 20 characters. The + * maximum size of each document is 5 KB. *
* @return A reference to this updated object so that method calls can be * chained together. @@ -114,20 +110,19 @@ public BatchDetectDominantLanguageRequest withTextList(String... textList) { /** *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document should contain at least 20 - * characters and must contain fewer than 5,000 bytes of UTF-8 encoded - * characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. Each document should contain at + * least 20 characters. The maximum size of each document is 5 KB. *
** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document should - * contain at least 20 characters and must contain fewer than - * 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. + * Each document should contain at least 20 characters. The + * maximum size of each document is 5 KB. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectEntitiesRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectEntitiesRequest.java index 9d8e2f918e..647532e0ab 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectEntitiesRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectEntitiesRequest.java @@ -22,16 +22,17 @@ /** ** Inspects the text of a batch of documents for named entities and returns - * information about them. For more information about named entities, see - * how-entities + * information about them. For more information about named entities, see + * Entities in the Comprehend Developer Guide. *
*/ public class BatchDetectEntitiesRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
*/ private java.util.List- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
* * @return- * A list containing the text of the input documents. The list can - * contain a maximum of 25 documents. Each document must contain - * fewer than 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. + * The list can contain a maximum of 25 documents. The maximum size + * of each document is 5 KB. *
*/ public java.util.List- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
* * @param textList- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer than 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. *
*/ public void setTextList(java.util.Collection- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer than 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. *
* @return A reference to this updated object so that method calls can be * chained together. @@ -117,18 +118,18 @@ public BatchDetectEntitiesRequest withTextList(String... textList) { /** *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer than 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectKeyPhrasesRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectKeyPhrasesRequest.java index 8fc7c7add0..1c7da67949 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectKeyPhrasesRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectKeyPhrasesRequest.java @@ -27,9 +27,9 @@ public class BatchDetectKeyPhrasesRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
*/ private java.util.List- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
* * @return- * A list containing the text of the input documents. The list can - * contain a maximum of 25 documents. Each document must contain - * fewer than 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. + * The list can contain a maximum of 25 documents. The maximum size + * of each document is 5 KB. *
*/ public java.util.List- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
* * @param textList- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer than 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. *
*/ public void setTextList(java.util.Collection- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer than 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. *
* @return A reference to this updated object so that method calls can be * chained together. @@ -115,18 +115,18 @@ public BatchDetectKeyPhrasesRequest withTextList(String... textList) { /** *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer than 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer than 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectSentimentRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectSentimentRequest.java index d838d542b8..41d3d692ec 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectSentimentRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectSentimentRequest.java @@ -29,10 +29,17 @@ public class BatchDetectSentimentRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the first 500 + * characters of the input text and ignores any additional text in the + * input. + *
+ *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. + *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the first 500 + * characters of the input text and ignores any additional text in the + * input. *
+ *- * A list containing the text of the input documents. The list can - * contain a maximum of 25 documents. Each document must contain - * fewer that 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. + * The list can contain a maximum of 25 documents. The maximum size + * of each document is 5 KB. *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the + * first 500 characters of the input text and ignores any additional + * text in the input. + *
+ *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. + *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the first 500 + * characters of the input text and ignores any additional text in the + * input. *
+ *- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the + * first 500 characters of the input text and ignores any + * additional text in the input. + *
+ *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. + *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the first 500 + * characters of the input text and ignores any additional text in the + * input. *
+ ** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. + *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the + * first 500 characters of the input text and ignores any + * additional text in the input. *
+ *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the first 500 + * characters of the input text and ignores any additional text in the + * input. + *
+ ** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. + *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the + * first 500 characters of the input text and ignores any + * additional text in the input. *
+ ** Inspects the text of a batch of documents for the syntax and part of speech * of the words in the document and returns information about them. For more - * information, see how-syntax. + * information, see Syntax in the Comprehend Developer Guide. *
*/ public class BatchDetectSyntaxRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size for each document + * is 5 KB. *
*/ private java.util.List- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size for each document + * is 5 KB. *
* * @return- * A list containing the text of the input documents. The list can - * contain a maximum of 25 documents. Each document must contain - * fewer that 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. + * The list can contain a maximum of 25 documents. The maximum size + * for each document is 5 KB. *
*/ public java.util.List- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size for each document + * is 5 KB. *
* * @param textList- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size for each document is 5 KB. *
*/ public void setTextList(java.util.Collection- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size for each document + * is 5 KB. *
** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size for each document is 5 KB. *
* @return A reference to this updated object so that method calls can be * chained together. @@ -118,18 +120,18 @@ public BatchDetectSyntaxRequest withTextList(String... textList) { /** *- * A list containing the text of the input documents. The list can contain a - * maximum of 25 documents. Each document must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size for each document + * is 5 KB. *
** Returns a reference to this object so that method calls can be chained * together. * * @param textList
- * A list containing the text of the input documents. The list - * can contain a maximum of 25 documents. Each document must - * contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size for each document is 5 KB. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectTargetedSentimentItemResult.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectTargetedSentimentItemResult.java new file mode 100644 index 0000000000..ace1d11870 --- /dev/null +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectTargetedSentimentItemResult.java @@ -0,0 +1,210 @@ +/* + * Copyright 2010-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.amazonaws.services.comprehend.model; + +import java.io.Serializable; + +/** + *+ * Analysis results for one of the documents in the batch. + *
+ */ +public class BatchDetectTargetedSentimentItemResult implements Serializable { + /** + *+ * The zero-based index of this result in the input list. + *
+ */ + private Integer index; + + /** + *+ * An array of targeted sentiment entities. + *
+ */ + private java.util.List+ * The zero-based index of this result in the input list. + *
+ * + * @return+ * The zero-based index of this result in the input list. + *
+ */ + public Integer getIndex() { + return index; + } + + /** + *+ * The zero-based index of this result in the input list. + *
+ * + * @param index+ * The zero-based index of this result in the input list. + *
+ */ + public void setIndex(Integer index) { + this.index = index; + } + + /** + *+ * The zero-based index of this result in the input list. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param index
+ * The zero-based index of this result in the input list. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public BatchDetectTargetedSentimentItemResult withIndex(Integer index) { + this.index = index; + return this; + } + + /** + *+ * An array of targeted sentiment entities. + *
+ * + * @return+ * An array of targeted sentiment entities. + *
+ */ + public java.util.List+ * An array of targeted sentiment entities. + *
+ * + * @param entities+ * An array of targeted sentiment entities. + *
+ */ + public void setEntities(java.util.Collection+ * An array of targeted sentiment entities. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param entities
+ * An array of targeted sentiment entities. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public BatchDetectTargetedSentimentItemResult withEntities(TargetedSentimentEntity... entities) { + if (getEntities() == null) { + this.entities = new java.util.ArrayList+ * An array of targeted sentiment entities. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param entities
+ * An array of targeted sentiment entities. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public BatchDetectTargetedSentimentItemResult withEntities( + java.util.Collection+ * Inspects a batch of documents and returns a sentiment analysis for each + * entity identified in the documents. + *
+ *+ * For more information about targeted sentiment, see Targeted sentiment. + *
+ */ +public class BatchDetectTargetedSentimentRequest extends AmazonWebServiceRequest implements + Serializable { + /** + *+ * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. + *
+ */ + private java.util.List+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ */
+ private String languageCode;
+
+ /**
+ *
+ * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. + *
+ * + * @return+ * A list containing the UTF-8 encoded text of the input documents. + * The list can contain a maximum of 25 documents. The maximum size + * of each document is 5 KB. + *
+ */ + public java.util.List+ * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. + *
+ * + * @param textList+ * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. + *
+ */ + public void setTextList(java.util.Collection+ * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param textList
+ * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public BatchDetectTargetedSentimentRequest withTextList(String... textList) { + if (getTextList() == null) { + this.textList = new java.util.ArrayList+ * A list containing the UTF-8 encoded text of the input documents. The list + * can contain a maximum of 25 documents. The maximum size of each document + * is 5 KB. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param textList
+ * A list containing the UTF-8 encoded text of the input + * documents. The list can contain a maximum of 25 documents. The + * maximum size of each document is 5 KB. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public BatchDetectTargetedSentimentRequest withTextList(java.util.Collection+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @return
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @see LanguageCode + */ + public String getLanguageCode() { + return languageCode; + } + + /** + *+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @param languageCode
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @see LanguageCode + */ + public void setLanguageCode(String languageCode) { + this.languageCode = languageCode; + } + + /** + *+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @param languageCode
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see LanguageCode + */ + public BatchDetectTargetedSentimentRequest withLanguageCode(String languageCode) { + this.languageCode = languageCode; + return this; + } + + /** + *+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @param languageCode
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @see LanguageCode + */ + public void setLanguageCode(LanguageCode languageCode) { + this.languageCode = languageCode.toString(); + } + + /** + *+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @param languageCode
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see LanguageCode + */ + public BatchDetectTargetedSentimentRequest withLanguageCode(LanguageCode languageCode) { + this.languageCode = languageCode.toString(); + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getTextList() != null) + sb.append("TextList: " + getTextList() + ","); + if (getLanguageCode() != null) + sb.append("LanguageCode: " + getLanguageCode()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime * hashCode + ((getTextList() == null) ? 0 : getTextList().hashCode()); + hashCode = prime * hashCode + + ((getLanguageCode() == null) ? 0 : getLanguageCode().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof BatchDetectTargetedSentimentRequest == false) + return false; + BatchDetectTargetedSentimentRequest other = (BatchDetectTargetedSentimentRequest) obj; + + if (other.getTextList() == null ^ this.getTextList() == null) + return false; + if (other.getTextList() != null && other.getTextList().equals(this.getTextList()) == false) + return false; + if (other.getLanguageCode() == null ^ this.getLanguageCode() == null) + return false; + if (other.getLanguageCode() != null + && other.getLanguageCode().equals(this.getLanguageCode()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectTargetedSentimentResult.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectTargetedSentimentResult.java new file mode 100644 index 0000000000..07bee38527 --- /dev/null +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/BatchDetectTargetedSentimentResult.java @@ -0,0 +1,272 @@ +/* + * Copyright 2010-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.amazonaws.services.comprehend.model; + +import java.io.Serializable; + +public class BatchDetectTargetedSentimentResult implements Serializable { + /** + *
+ * A list of objects containing the results of the operation. The results
+ * are sorted in ascending order by the Index
field and match
+ * the order of the documents in the input list. If all of the documents
+ * contain an error, the ResultList
is empty.
+ *
+ * List of errors that the operation can return. + *
+ */ + private java.util.List
+ * A list of objects containing the results of the operation. The results
+ * are sorted in ascending order by the Index
field and match
+ * the order of the documents in the input list. If all of the documents
+ * contain an error, the ResultList
is empty.
+ *
+ * A list of objects containing the results of the operation. The
+ * results are sorted in ascending order by the Index
+ * field and match the order of the documents in the input list. If
+ * all of the documents contain an error, the
+ * ResultList
is empty.
+ *
+ * A list of objects containing the results of the operation. The results
+ * are sorted in ascending order by the Index
field and match
+ * the order of the documents in the input list. If all of the documents
+ * contain an error, the ResultList
is empty.
+ *
+ * A list of objects containing the results of the operation. The
+ * results are sorted in ascending order by the
+ * Index
field and match the order of the documents
+ * in the input list. If all of the documents contain an error,
+ * the ResultList
is empty.
+ *
+ * A list of objects containing the results of the operation. The results
+ * are sorted in ascending order by the Index
field and match
+ * the order of the documents in the input list. If all of the documents
+ * contain an error, the ResultList
is empty.
+ *
+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param resultList
+ * A list of objects containing the results of the operation. The
+ * results are sorted in ascending order by the
+ * Index
field and match the order of the documents
+ * in the input list. If all of the documents contain an error,
+ * the ResultList
is empty.
+ *
+ * A list of objects containing the results of the operation. The results
+ * are sorted in ascending order by the Index
field and match
+ * the order of the documents in the input list. If all of the documents
+ * contain an error, the ResultList
is empty.
+ *
+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param resultList
+ * A list of objects containing the results of the operation. The
+ * results are sorted in ascending order by the
+ * Index
field and match the order of the documents
+ * in the input list. If all of the documents contain an error,
+ * the ResultList
is empty.
+ *
+ * List of errors that the operation can return. + *
+ * + * @return+ * List of errors that the operation can return. + *
+ */ + public java.util.List+ * List of errors that the operation can return. + *
+ * + * @param errorList+ * List of errors that the operation can return. + *
+ */ + public void setErrorList(java.util.Collection+ * List of errors that the operation can return. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param errorList
+ * List of errors that the operation can return. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public BatchDetectTargetedSentimentResult withErrorList(BatchItemError... errorList) { + if (getErrorList() == null) { + this.errorList = new java.util.ArrayList+ * List of errors that the operation can return. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param errorList
+ * List of errors that the operation can return. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public BatchDetectTargetedSentimentResult withErrorList( + java.util.Collection- * Creates a new document classification request to analyze a single - * document in real-time, returning personally identifiable information - * (PII) entity labels. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Constraints:
@@ -52,18 +50,14 @@ public class ContainsPiiEntitiesRequest extends AmazonWebServiceRequest implemen
/**
*
- * Creates a new document classification request to analyze a single - * document in real-time, returning personally identifiable information - * (PII) entity labels. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Constraints:
* Length: 1 -
*
* @return
- * Creates a new document classification request to analyze a single - * document in real-time, returning personally identifiable - * information (PII) entity labels. + * A UTF-8 text string. The maximum string size is 100 KB. *
*/ public String getText() { @@ -72,18 +66,14 @@ public String getText() { /** *- * Creates a new document classification request to analyze a single - * document in real-time, returning personally identifiable information - * (PII) entity labels. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Constraints:
* Length: 1 -
*
* @param text
- * Creates a new document classification request to analyze a - * single document in real-time, returning personally - * identifiable information (PII) entity labels. + * A UTF-8 text string. The maximum string size is 100 KB. *
*/ public void setText(String text) { @@ -92,9 +82,7 @@ public void setText(String text) { /** *- * Creates a new document classification request to analyze a single - * document in real-time, returning personally identifiable information - * (PII) entity labels. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Returns a reference to this object so that method calls can be chained
@@ -104,9 +92,7 @@ public void setText(String text) {
* Length: 1 -
*
* @param text
- * Creates a new document classification request to analyze a - * single document in real-time, returning personally - * identifiable information (PII) entity labels. + * A UTF-8 text string. The maximum string size is 100 KB. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/CreateDocumentClassifierRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/CreateDocumentClassifierRequest.java index 9cd4dfa578..8fb2f9901a 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/CreateDocumentClassifierRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/CreateDocumentClassifierRequest.java @@ -25,7 +25,9 @@ * To create a classifier, you provide a set of training documents that labeled * with the categories that you want to use. After the classifier is trained you * can use it to categorize a set of labeled documents into the categories. For - * more information, see how-document-classification. + * more information, see Document Classification in the Comprehend Developer Guide. * */ public class CreateDocumentClassifierRequest extends AmazonWebServiceRequest implements diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectDominantLanguageRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectDominantLanguageRequest.java index cd84e16900..78bbc99798 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectDominantLanguageRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectDominantLanguageRequest.java @@ -30,8 +30,8 @@ public class DetectDominantLanguageRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A UTF-8 text string. Each string should contain at least 20 characters - * and must contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A UTF-8 text string. The string must contain at least 20 characters. The + * maximum string size is 100 KB. *
*
* Constraints:
@@ -41,17 +41,16 @@ public class DetectDominantLanguageRequest extends AmazonWebServiceRequest imple
/**
*
- * A UTF-8 text string. Each string should contain at least 20 characters - * and must contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A UTF-8 text string. The string must contain at least 20 characters. The + * maximum string size is 100 KB. *
*
* Constraints:
* Length: 1 -
*
* @return
- * A UTF-8 text string. Each string should contain at least 20 - * characters and must contain fewer that 5,000 bytes of UTF-8 - * encoded characters. + * A UTF-8 text string. The string must contain at least 20 + * characters. The maximum string size is 100 KB. *
*/ public String getText() { @@ -60,17 +59,16 @@ public String getText() { /** *- * A UTF-8 text string. Each string should contain at least 20 characters - * and must contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A UTF-8 text string. The string must contain at least 20 characters. The + * maximum string size is 100 KB. *
*
* Constraints:
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string should contain at least 20 - * characters and must contain fewer that 5,000 bytes of UTF-8 - * encoded characters. + * A UTF-8 text string. The string must contain at least 20 + * characters. The maximum string size is 100 KB. *
*/ public void setText(String text) { @@ -79,8 +77,8 @@ public void setText(String text) { /** *- * A UTF-8 text string. Each string should contain at least 20 characters - * and must contain fewer that 5,000 bytes of UTF-8 encoded characters. + * A UTF-8 text string. The string must contain at least 20 characters. The + * maximum string size is 100 KB. *
*
* Returns a reference to this object so that method calls can be chained
@@ -90,9 +88,8 @@ public void setText(String text) {
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string should contain at least 20 - * characters and must contain fewer that 5,000 bytes of UTF-8 - * encoded characters. + * A UTF-8 text string. The string must contain at least 20 + * characters. The maximum string size is 100 KB. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectEntitiesRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectEntitiesRequest.java index 9e531420b0..82c1e30743 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectEntitiesRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectEntitiesRequest.java @@ -22,14 +22,15 @@ /** ** Inspects text for named entities, and returns information about them. For - * more information, about named entities, see how-entities. + * more information, about named entities, see Entities in the Comprehend Developer Guide. *
*/ public class DetectEntitiesRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Constraints:
@@ -82,16 +83,14 @@ public class DetectEntitiesRequest extends AmazonWebServiceRequest implements Se
/**
*
- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Constraints:
* Length: 1 -
*
* @return
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*/ public String getText() { @@ -100,16 +99,14 @@ public String getText() { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Constraints:
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*/ public void setText(String text) { @@ -118,8 +115,7 @@ public void setText(String text) { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Returns a reference to this object so that method calls can be chained
@@ -129,8 +125,7 @@ public void setText(String text) {
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectEntitiesResult.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectEntitiesResult.java index 3efe117a10..20c510b65a 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectEntitiesResult.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectEntitiesResult.java @@ -29,7 +29,9 @@ public class DetectEntitiesResult implements Serializable { * If your request uses a custom entity recognition model, Amazon Comprehend * detects the entities that the model is trained to recognize. Otherwise, * it detects the default entity types. For a list of default entity types, - * see how-entities. + * see Entities in the Comprehend Developer Guide. * */ private java.util.List@@ -58,7 +62,9 @@ public class DetectEntitiesResult implements Serializable { * If your request uses a custom entity recognition model, Amazon * Comprehend detects the entities that the model is trained to * recognize. Otherwise, it detects the default entity types. For a - * list of default entity types, see how-entities. + * list of default entity types, see Entities in the Comprehend Developer Guide. *
*/ public java.util.List
@@ -89,7 +97,9 @@ public java.util.List
* Returns a reference to this object so that method calls can be chained
@@ -128,7 +140,9 @@ public void setEntities(java.util.Collection
* Returns a reference to this object so that method calls can be chained @@ -170,7 +186,9 @@ public DetectEntitiesResult withEntities(Entity... entities) { * If your request uses a custom entity recognition model, Amazon * Comprehend detects the entities that the model is trained to * recognize. Otherwise, it detects the default entity types. For - * a list of default entity types, see how-entities. + * a list of default entity types, see Entities in the Comprehend Developer Guide. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectKeyPhrasesRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectKeyPhrasesRequest.java index 399d55c4e5..c9160af079 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectKeyPhrasesRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectKeyPhrasesRequest.java @@ -27,8 +27,8 @@ public class DetectKeyPhrasesRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The string must contain less than 100 KB of UTF-8 + * encoded characters. *
*
* Constraints:
@@ -50,16 +50,16 @@ public class DetectKeyPhrasesRequest extends AmazonWebServiceRequest implements
/**
*
- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The string must contain less than 100 KB of UTF-8 + * encoded characters. *
*
* Constraints:
* Length: 1 -
*
* @return
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The string must contain less than 100 KB of + * UTF-8 encoded characters. *
*/ public String getText() { @@ -68,16 +68,16 @@ public String getText() { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The string must contain less than 100 KB of UTF-8 + * encoded characters. *
*
* Constraints:
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The string must contain less than 100 KB + * of UTF-8 encoded characters. *
*/ public void setText(String text) { @@ -86,8 +86,8 @@ public void setText(String text) { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The string must contain less than 100 KB of UTF-8 + * encoded characters. *
*
* Returns a reference to this object so that method calls can be chained
@@ -97,8 +97,8 @@ public void setText(String text) {
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The string must contain less than 100 KB + * of UTF-8 encoded characters. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectPiiEntitiesRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectPiiEntitiesRequest.java index bd74176995..2e755424c3 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectPiiEntitiesRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectPiiEntitiesRequest.java @@ -28,8 +28,7 @@ public class DetectPiiEntitiesRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Constraints:
@@ -50,16 +49,14 @@ public class DetectPiiEntitiesRequest extends AmazonWebServiceRequest implements
/**
*
- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Constraints:
* Length: 1 -
*
* @return
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*/ public String getText() { @@ -68,16 +65,14 @@ public String getText() { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Constraints:
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*/ public void setText(String text) { @@ -86,8 +81,7 @@ public void setText(String text) { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
*
* Returns a reference to this object so that method calls can be chained
@@ -97,8 +91,7 @@ public void setText(String text) {
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 100 KB. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectSentimentRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectSentimentRequest.java index 291ed2c4bc..e49fed4665 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectSentimentRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectSentimentRequest.java @@ -29,9 +29,15 @@ public class DetectSentimentRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 5 KB. *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the first 500 + * characters of the input text and ignores any additional text in the + * input. + *
+ *
* Constraints:
* Length: 1 -
@@ -52,17 +58,29 @@ public class DetectSentimentRequest extends AmazonWebServiceRequest implements S
/**
*
- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 5 KB. + *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the first 500 + * characters of the input text and ignores any additional text in the + * input. *
+ *
* Constraints:
* Length: 1 -
*
* @return
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 5 KB. + *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the + * first 500 characters of the input text and ignores any additional + * text in the input. *
+ *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 5 KB. *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the first 500 + * characters of the input text and ignores any additional text in the + * input. + *
+ *
* Constraints:
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 5 KB. + *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the + * first 500 characters of the input text and ignores any + * additional text in the input. *
+ *- * A UTF-8 text string. Each string must contain fewer that 5,000 bytes of - * UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 5 KB. *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the first 500 + * characters of the input text and ignores any additional text in the + * input. + *
+ *
* Returns a reference to this object so that method calls can be chained
* together.
@@ -99,9 +135,15 @@ public void setText(String text) {
* Length: 1 -
*
* @param text
- * A UTF-8 text string. Each string must contain fewer that 5,000 - * bytes of UTF-8 encoded characters. + * A UTF-8 text string. The maximum string size is 5 KB. + *
+ *+ * Amazon Comprehend performs real-time sentiment analysis on the + * first 500 characters of the input text and ignores any + * additional text in the input. *
+ ** Inspects text for syntax and the part of speech of words in the document. For - * more information, how-syntax. + * more information, see Syntax in the Comprehend Developer Guide. *
*/ public class DetectSyntaxRequest extends AmazonWebServiceRequest implements Serializable { /** *- * A UTF-8 string. Each string must contain fewer that 5,000 bytes of UTF - * encoded characters. + * A UTF-8 string. The maximum string size is 5 KB. *
*
* Constraints:
@@ -52,16 +53,14 @@ public class DetectSyntaxRequest extends AmazonWebServiceRequest implements Seri
/**
*
- * A UTF-8 string. Each string must contain fewer that 5,000 bytes of UTF - * encoded characters. + * A UTF-8 string. The maximum string size is 5 KB. *
*
* Constraints:
* Length: 1 -
*
* @return
- * A UTF-8 string. Each string must contain fewer that 5,000 bytes - * of UTF encoded characters. + * A UTF-8 string. The maximum string size is 5 KB. *
*/ public String getText() { @@ -70,16 +69,14 @@ public String getText() { /** *- * A UTF-8 string. Each string must contain fewer that 5,000 bytes of UTF - * encoded characters. + * A UTF-8 string. The maximum string size is 5 KB. *
*
* Constraints:
* Length: 1 -
*
* @param text
- * A UTF-8 string. Each string must contain fewer that 5,000 - * bytes of UTF encoded characters. + * A UTF-8 string. The maximum string size is 5 KB. *
*/ public void setText(String text) { @@ -88,8 +85,7 @@ public void setText(String text) { /** *- * A UTF-8 string. Each string must contain fewer that 5,000 bytes of UTF - * encoded characters. + * A UTF-8 string. The maximum string size is 5 KB. *
*
* Returns a reference to this object so that method calls can be chained
@@ -99,8 +95,7 @@ public void setText(String text) {
* Length: 1 -
*
* @param text
- * A UTF-8 string. Each string must contain fewer that 5,000 - * bytes of UTF encoded characters. + * A UTF-8 string. The maximum string size is 5 KB. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectSyntaxResult.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectSyntaxResult.java index 2a22ed1397..6981fe52b9 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectSyntaxResult.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectSyntaxResult.java @@ -23,7 +23,9 @@ public class DetectSyntaxResult implements Serializable { * A collection of syntax tokens describing the text. For each token, the * response provides the text, the token type, where the text begins and * ends, and the level of confidence that Amazon Comprehend has that the - * token is correct. For a list of token types, see how-syntax. + * token is correct. For a list of token types, see Syntax in the Comprehend Developer Guide. * */ private java.util.List@@ -41,7 +45,9 @@ public class DetectSyntaxResult implements Serializable { * token, the response provides the text, the token type, where the * text begins and ends, and the level of confidence that Amazon * Comprehend has that the token is correct. For a list of token - * types, see how-syntax. + * types, see Syntax in the Comprehend Developer Guide. *
*/ public java.util.List
@@ -61,7 +69,9 @@ public java.util.List
* Returns a reference to this object so that method calls can be chained
@@ -89,7 +101,9 @@ public void setSyntaxTokens(java.util.Collection
* Returns a reference to this object so that method calls can be chained @@ -120,7 +136,9 @@ public DetectSyntaxResult withSyntaxTokens(SyntaxToken... syntaxTokens) { * token, the response provides the text, the token type, where * the text begins and ends, and the level of confidence that * Amazon Comprehend has that the token is correct. For a list of - * token types, see how-syntax. + * token types, see Syntax in the Comprehend Developer Guide. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectTargetedSentimentRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectTargetedSentimentRequest.java new file mode 100644 index 0000000000..a94a76621b --- /dev/null +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectTargetedSentimentRequest.java @@ -0,0 +1,268 @@ +/* + * Copyright 2010-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.amazonaws.services.comprehend.model; + +import java.io.Serializable; + +import com.amazonaws.AmazonWebServiceRequest; + +/** + *+ * Inspects the input text and returns a sentiment analysis for each entity + * identified in the text. + *
+ *+ * For more information about targeted sentiment, see Targeted sentiment. + *
+ */ +public class DetectTargetedSentimentRequest extends AmazonWebServiceRequest implements Serializable { + /** + *+ * A UTF-8 text string. The maximum string length is 5 KB. + *
+ *
+ * Constraints:
+ * Length: 1 -
+ */
+ private String text;
+
+ /**
+ *
+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ */
+ private String languageCode;
+
+ /**
+ *
+ * A UTF-8 text string. The maximum string length is 5 KB. + *
+ *
+ * Constraints:
+ * Length: 1 -
+ *
+ * @return
+ * A UTF-8 text string. The maximum string length is 5 KB. + *
+ */ + public String getText() { + return text; + } + + /** + *+ * A UTF-8 text string. The maximum string length is 5 KB. + *
+ *
+ * Constraints:
+ * Length: 1 -
+ *
+ * @param text
+ * A UTF-8 text string. The maximum string length is 5 KB. + *
+ */ + public void setText(String text) { + this.text = text; + } + + /** + *+ * A UTF-8 text string. The maximum string length is 5 KB. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Length: 1 -
+ *
+ * @param text
+ * A UTF-8 text string. The maximum string length is 5 KB. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public DetectTargetedSentimentRequest withText(String text) { + this.text = text; + return this; + } + + /** + *+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @return
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @see LanguageCode + */ + public String getLanguageCode() { + return languageCode; + } + + /** + *+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @param languageCode
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @see LanguageCode + */ + public void setLanguageCode(String languageCode) { + this.languageCode = languageCode; + } + + /** + *+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @param languageCode
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see LanguageCode + */ + public DetectTargetedSentimentRequest withLanguageCode(String languageCode) { + this.languageCode = languageCode; + return this; + } + + /** + *+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @param languageCode
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @see LanguageCode + */ + public void setLanguageCode(LanguageCode languageCode) { + this.languageCode = languageCode.toString(); + } + + /** + *+ * The language of the input documents. Currently, English is the only + * supported language. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
+ *
+ * @param languageCode
+ * The language of the input documents. Currently, English is the + * only supported language. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see LanguageCode + */ + public DetectTargetedSentimentRequest withLanguageCode(LanguageCode languageCode) { + this.languageCode = languageCode.toString(); + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getText() != null) + sb.append("Text: " + getText() + ","); + if (getLanguageCode() != null) + sb.append("LanguageCode: " + getLanguageCode()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime * hashCode + ((getText() == null) ? 0 : getText().hashCode()); + hashCode = prime * hashCode + + ((getLanguageCode() == null) ? 0 : getLanguageCode().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof DetectTargetedSentimentRequest == false) + return false; + DetectTargetedSentimentRequest other = (DetectTargetedSentimentRequest) obj; + + if (other.getText() == null ^ this.getText() == null) + return false; + if (other.getText() != null && other.getText().equals(this.getText()) == false) + return false; + if (other.getLanguageCode() == null ^ this.getLanguageCode() == null) + return false; + if (other.getLanguageCode() != null + && other.getLanguageCode().equals(this.getLanguageCode()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectTargetedSentimentResult.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectTargetedSentimentResult.java new file mode 100644 index 0000000000..1c3a212b89 --- /dev/null +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/DetectTargetedSentimentResult.java @@ -0,0 +1,155 @@ +/* + * Copyright 2010-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.amazonaws.services.comprehend.model; + +import java.io.Serializable; + +public class DetectTargetedSentimentResult implements Serializable { + /** + *+ * Targeted sentiment analysis for each of the entities identified in the + * input text. + *
+ */ + private java.util.List+ * Targeted sentiment analysis for each of the entities identified in the + * input text. + *
+ * + * @return+ * Targeted sentiment analysis for each of the entities identified + * in the input text. + *
+ */ + public java.util.List+ * Targeted sentiment analysis for each of the entities identified in the + * input text. + *
+ * + * @param entities+ * Targeted sentiment analysis for each of the entities + * identified in the input text. + *
+ */ + public void setEntities(java.util.Collection+ * Targeted sentiment analysis for each of the entities identified in the + * input text. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param entities
+ * Targeted sentiment analysis for each of the entities + * identified in the input text. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public DetectTargetedSentimentResult withEntities(TargetedSentimentEntity... entities) { + if (getEntities() == null) { + this.entities = new java.util.ArrayList+ * Targeted sentiment analysis for each of the entities identified in the + * input text. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param entities
+ * Targeted sentiment analysis for each of the entities + * identified in the input text. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public DetectTargetedSentimentResult withEntities( + java.util.Collection- * For more information on how the input file is formatted, see - * prep-classifier-data. + * For more information on how the input file is formatted, see Preparing training data in the Comprehend Developer Guide. *
*/ public class DocumentClassifierInputDataConfig implements Serializable { @@ -89,10 +90,9 @@ public class DocumentClassifierInputDataConfig implements Serializable { /** *- * The Amazon S3 URI for the input data. The Amazon S3 bucket must be in the - * same AWS Region as the API endpoint that you are calling. The URI can - * point to a single input file or it can provide the prefix for a - * collection of input files. + * This specifies the Amazon S3 location where the test annotations for an + * entity recognizer are located. The URI must be in the same AWS Region as + * the API endpoint that you are calling. *
*
* Constraints:
@@ -628,10 +628,9 @@ public DocumentClassifierInputDataConfig withS3Uri(String s3Uri) {
/**
*
- * The Amazon S3 URI for the input data. The Amazon S3 bucket must be in the - * same AWS Region as the API endpoint that you are calling. The URI can - * point to a single input file or it can provide the prefix for a - * collection of input files. + * This specifies the Amazon S3 location where the test annotations for an + * entity recognizer are located. The URI must be in the same AWS Region as + * the API endpoint that you are calling. *
*
* Constraints:
@@ -639,10 +638,9 @@ public DocumentClassifierInputDataConfig withS3Uri(String s3Uri) {
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*
* @return
- * The Amazon S3 URI for the input data. The Amazon S3 bucket must - * be in the same AWS Region as the API endpoint that you are - * calling. The URI can point to a single input file or it can - * provide the prefix for a collection of input files. + * This specifies the Amazon S3 location where the test annotations + * for an entity recognizer are located. The URI must be in the same + * AWS Region as the API endpoint that you are calling. *
*/ public String getTestS3Uri() { @@ -651,10 +649,9 @@ public String getTestS3Uri() { /** *- * The Amazon S3 URI for the input data. The Amazon S3 bucket must be in the - * same AWS Region as the API endpoint that you are calling. The URI can - * point to a single input file or it can provide the prefix for a - * collection of input files. + * This specifies the Amazon S3 location where the test annotations for an + * entity recognizer are located. The URI must be in the same AWS Region as + * the API endpoint that you are calling. *
*
* Constraints:
@@ -662,10 +659,10 @@ public String getTestS3Uri() {
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*
* @param testS3Uri
- * The Amazon S3 URI for the input data. The Amazon S3 bucket - * must be in the same AWS Region as the API endpoint that you - * are calling. The URI can point to a single input file or it - * can provide the prefix for a collection of input files. + * This specifies the Amazon S3 location where the test + * annotations for an entity recognizer are located. The URI must + * be in the same AWS Region as the API endpoint that you are + * calling. *
*/ public void setTestS3Uri(String testS3Uri) { @@ -674,10 +671,9 @@ public void setTestS3Uri(String testS3Uri) { /** *- * The Amazon S3 URI for the input data. The Amazon S3 bucket must be in the - * same AWS Region as the API endpoint that you are calling. The URI can - * point to a single input file or it can provide the prefix for a - * collection of input files. + * This specifies the Amazon S3 location where the test annotations for an + * entity recognizer are located. The URI must be in the same AWS Region as + * the API endpoint that you are calling. *
*
* Returns a reference to this object so that method calls can be chained
@@ -688,10 +684,10 @@ public void setTestS3Uri(String testS3Uri) {
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*
* @param testS3Uri
- * The Amazon S3 URI for the input data. The Amazon S3 bucket - * must be in the same AWS Region as the API endpoint that you - * are calling. The URI can point to a single input file or it - * can provide the prefix for a collection of input files. + * This specifies the Amazon S3 location where the test + * annotations for an entity recognizer are located. The URI must + * be in the same AWS Region as the API endpoint that you are + * calling. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/Entity.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/Entity.java index 2d0be95151..534f7fdbd5 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/Entity.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/Entity.java @@ -56,22 +56,16 @@ public class Entity implements Serializable { /** *- * A character offset in the input text that shows where the entity begins - * (the first character is at position 0). The offset returns the position - * of each UTF-8 code point in the string. A code point is the - * abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the entity. *
*/ private Integer beginOffset; /** *- * A character offset in the input text that shows where the entity ends. - * The offset returns the position of each UTF-8 code point in the string. A - * code point is the abstract character from a particular graphical - * representation. For example, a multi-byte UTF-8 character maps to a - * single code point. + * The zero-based offset from the beginning of the source text to the last + * character in the entity. *
*/ private Integer endOffset; @@ -285,20 +279,13 @@ public Entity withText(String text) { /** *- * A character offset in the input text that shows where the entity begins - * (the first character is at position 0). The offset returns the position - * of each UTF-8 code point in the string. A code point is the - * abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the entity. *
* * @return- * A character offset in the input text that shows where the entity - * begins (the first character is at position 0). The offset returns - * the position of each UTF-8 code point in the string. A code - * point is the abstract character from a particular graphical - * representation. For example, a multi-byte UTF-8 character maps to - * a single code point. + * The zero-based offset from the beginning of the source text to + * the first character in the entity. *
*/ public Integer getBeginOffset() { @@ -307,20 +294,13 @@ public Integer getBeginOffset() { /** *- * A character offset in the input text that shows where the entity begins - * (the first character is at position 0). The offset returns the position - * of each UTF-8 code point in the string. A code point is the - * abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the entity. *
* * @param beginOffset- * A character offset in the input text that shows where the - * entity begins (the first character is at position 0). The - * offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a - * particular graphical representation. For example, a multi-byte - * UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to + * the first character in the entity. *
*/ public void setBeginOffset(Integer beginOffset) { @@ -329,23 +309,16 @@ public void setBeginOffset(Integer beginOffset) { /** *- * A character offset in the input text that shows where the entity begins - * (the first character is at position 0). The offset returns the position - * of each UTF-8 code point in the string. A code point is the - * abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the entity. *
** Returns a reference to this object so that method calls can be chained * together. * * @param beginOffset
- * A character offset in the input text that shows where the - * entity begins (the first character is at position 0). The - * offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a - * particular graphical representation. For example, a multi-byte - * UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to + * the first character in the entity. *
* @return A reference to this updated object so that method calls can be * chained together. @@ -357,19 +330,13 @@ public Entity withBeginOffset(Integer beginOffset) { /** *- * A character offset in the input text that shows where the entity ends. - * The offset returns the position of each UTF-8 code point in the string. A - * code point is the abstract character from a particular graphical - * representation. For example, a multi-byte UTF-8 character maps to a - * single code point. + * The zero-based offset from the beginning of the source text to the last + * character in the entity. *
* * @return- * A character offset in the input text that shows where the entity - * ends. The offset returns the position of each UTF-8 code point in - * the string. A code point is the abstract character from a - * particular graphical representation. For example, a multi-byte - * UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to + * the last character in the entity. *
*/ public Integer getEndOffset() { @@ -378,20 +345,13 @@ public Integer getEndOffset() { /** *- * A character offset in the input text that shows where the entity ends. - * The offset returns the position of each UTF-8 code point in the string. A - * code point is the abstract character from a particular graphical - * representation. For example, a multi-byte UTF-8 character maps to a - * single code point. + * The zero-based offset from the beginning of the source text to the last + * character in the entity. *
* * @param endOffset- * A character offset in the input text that shows where the - * entity ends. The offset returns the position of each UTF-8 - * code point in the string. A code point is the abstract - * character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code - * point. + * The zero-based offset from the beginning of the source text to + * the last character in the entity. *
*/ public void setEndOffset(Integer endOffset) { @@ -400,23 +360,16 @@ public void setEndOffset(Integer endOffset) { /** *- * A character offset in the input text that shows where the entity ends. - * The offset returns the position of each UTF-8 code point in the string. A - * code point is the abstract character from a particular graphical - * representation. For example, a multi-byte UTF-8 character maps to a - * single code point. + * The zero-based offset from the beginning of the source text to the last + * character in the entity. *
** Returns a reference to this object so that method calls can be chained * together. * * @param endOffset
- * A character offset in the input text that shows where the - * entity ends. The offset returns the position of each UTF-8 - * code point in the string. A code point is the abstract - * character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code - * point. + * The zero-based offset from the beginning of the source text to + * the last character in the entity. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/EntityRecognizerAnnotations.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/EntityRecognizerAnnotations.java index 64e254ff2d..5aa246e35d 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/EntityRecognizerAnnotations.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/EntityRecognizerAnnotations.java @@ -38,9 +38,9 @@ public class EntityRecognizerAnnotations implements Serializable { /** *- * This specifies the Amazon S3 location where the test annotations for an - * entity recognizer are located. The URI must be in the same AWS Region as - * the API endpoint that you are calling. + * Specifies the Amazon S3 location where the test annotations for an entity + * recognizer are located. The URI must be in the same region as the API + * endpoint that you are calling. *
*
* Constraints:
@@ -120,9 +120,9 @@ public EntityRecognizerAnnotations withS3Uri(String s3Uri) {
/**
*
- * This specifies the Amazon S3 location where the test annotations for an - * entity recognizer are located. The URI must be in the same AWS Region as - * the API endpoint that you are calling. + * Specifies the Amazon S3 location where the test annotations for an entity + * recognizer are located. The URI must be in the same region as the API + * endpoint that you are calling. *
*
* Constraints:
@@ -130,9 +130,9 @@ public EntityRecognizerAnnotations withS3Uri(String s3Uri) {
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*
* @return
- * This specifies the Amazon S3 location where the test annotations - * for an entity recognizer are located. The URI must be in the same - * AWS Region as the API endpoint that you are calling. + * Specifies the Amazon S3 location where the test annotations for + * an entity recognizer are located. The URI must be in the same + * region as the API endpoint that you are calling. *
*/ public String getTestS3Uri() { @@ -141,9 +141,9 @@ public String getTestS3Uri() { /** *- * This specifies the Amazon S3 location where the test annotations for an - * entity recognizer are located. The URI must be in the same AWS Region as - * the API endpoint that you are calling. + * Specifies the Amazon S3 location where the test annotations for an entity + * recognizer are located. The URI must be in the same region as the API + * endpoint that you are calling. *
*
* Constraints:
@@ -151,10 +151,9 @@ public String getTestS3Uri() {
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*
* @param testS3Uri
- * This specifies the Amazon S3 location where the test - * annotations for an entity recognizer are located. The URI must - * be in the same AWS Region as the API endpoint that you are - * calling. + * Specifies the Amazon S3 location where the test annotations + * for an entity recognizer are located. The URI must be in the + * same region as the API endpoint that you are calling. *
*/ public void setTestS3Uri(String testS3Uri) { @@ -163,9 +162,9 @@ public void setTestS3Uri(String testS3Uri) { /** *- * This specifies the Amazon S3 location where the test annotations for an - * entity recognizer are located. The URI must be in the same AWS Region as - * the API endpoint that you are calling. + * Specifies the Amazon S3 location where the test annotations for an entity + * recognizer are located. The URI must be in the same region as the API + * endpoint that you are calling. *
*
* Returns a reference to this object so that method calls can be chained
@@ -176,10 +175,9 @@ public void setTestS3Uri(String testS3Uri) {
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*
* @param testS3Uri
- * This specifies the Amazon S3 location where the test - * annotations for an entity recognizer are located. The URI must - * be in the same AWS Region as the API endpoint that you are - * calling. + * Specifies the Amazon S3 location where the test annotations + * for an entity recognizer are located. The URI must be in the + * same region as the API endpoint that you are calling. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/KeyPhrase.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/KeyPhrase.java index 21f6356eee..870c3d3fb5 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/KeyPhrase.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/KeyPhrase.java @@ -43,22 +43,16 @@ public class KeyPhrase implements Serializable { /** *- * A character offset in the input text that shows where the key phrase - * begins (the first character is at position 0). The offset returns the - * position of each UTF-8 code point in the string. A code point is - * the abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the key phrase. *
*/ private Integer beginOffset; /** *
- * A character offset in the input text where the key phrase ends. The
- * offset returns the position of each UTF-8 code point in the string. A
- * code point
is the abstract character from a particular
- * graphical representation. For example, a multi-byte UTF-8 character maps
- * to a single code point.
+ * The zero-based offset from the beginning of the source text to the last
+ * character in the key phrase.
*
- * A character offset in the input text that shows where the key phrase - * begins (the first character is at position 0). The offset returns the - * position of each UTF-8 code point in the string. A code point is - * the abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the key phrase. *
* * @return- * A character offset in the input text that shows where the key - * phrase begins (the first character is at position 0). The offset - * returns the position of each UTF-8 code point in the string. A - * code point is the abstract character from a particular - * graphical representation. For example, a multi-byte UTF-8 - * character maps to a single code point. + * The zero-based offset from the beginning of the source text to + * the first character in the key phrase. *
*/ public Integer getBeginOffset() { @@ -192,20 +179,13 @@ public Integer getBeginOffset() { /** *- * A character offset in the input text that shows where the key phrase - * begins (the first character is at position 0). The offset returns the - * position of each UTF-8 code point in the string. A code point is - * the abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the key phrase. *
* * @param beginOffset- * A character offset in the input text that shows where the key - * phrase begins (the first character is at position 0). The - * offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a - * particular graphical representation. For example, a multi-byte - * UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to + * the first character in the key phrase. *
*/ public void setBeginOffset(Integer beginOffset) { @@ -214,23 +194,16 @@ public void setBeginOffset(Integer beginOffset) { /** *- * A character offset in the input text that shows where the key phrase - * begins (the first character is at position 0). The offset returns the - * position of each UTF-8 code point in the string. A code point is - * the abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the key phrase. *
** Returns a reference to this object so that method calls can be chained * together. * * @param beginOffset
- * A character offset in the input text that shows where the key - * phrase begins (the first character is at position 0). The - * offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a - * particular graphical representation. For example, a multi-byte - * UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to + * the first character in the key phrase. *
* @return A reference to this updated object so that method calls can be * chained together. @@ -242,19 +215,13 @@ public KeyPhrase withBeginOffset(Integer beginOffset) { /** *
- * A character offset in the input text where the key phrase ends. The
- * offset returns the position of each UTF-8 code point in the string. A
- * code point
is the abstract character from a particular
- * graphical representation. For example, a multi-byte UTF-8 character maps
- * to a single code point.
+ * The zero-based offset from the beginning of the source text to the last
+ * character in the key phrase.
*
- * A character offset in the input text where the key phrase ends.
- * The offset returns the position of each UTF-8 code point in the
- * string. A code point
is the abstract character from
- * a particular graphical representation. For example, a multi-byte
- * UTF-8 character maps to a single code point.
+ * The zero-based offset from the beginning of the source text to
+ * the last character in the key phrase.
*
- * A character offset in the input text where the key phrase ends. The
- * offset returns the position of each UTF-8 code point in the string. A
- * code point
is the abstract character from a particular
- * graphical representation. For example, a multi-byte UTF-8 character maps
- * to a single code point.
+ * The zero-based offset from the beginning of the source text to the last
+ * character in the key phrase.
*
- * A character offset in the input text where the key phrase
- * ends. The offset returns the position of each UTF-8 code point
- * in the string. A code point
is the abstract
- * character from a particular graphical representation. For
- * example, a multi-byte UTF-8 character maps to a single code
- * point.
+ * The zero-based offset from the beginning of the source text to
+ * the last character in the key phrase.
*
- * A character offset in the input text where the key phrase ends. The
- * offset returns the position of each UTF-8 code point in the string. A
- * code point
is the abstract character from a particular
- * graphical representation. For example, a multi-byte UTF-8 character maps
- * to a single code point.
+ * The zero-based offset from the beginning of the source text to the last
+ * character in the key phrase.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param endOffset
- * A character offset in the input text where the key phrase
- * ends. The offset returns the position of each UTF-8 code point
- * in the string. A code point
is the abstract
- * character from a particular graphical representation. For
- * example, a multi-byte UTF-8 character maps to a single code
- * point.
+ * The zero-based offset from the beginning of the source text to
+ * the last character in the key phrase.
*
+ * Contains the sentiment and sentiment score for one mention of an entity. + *
+ *+ * For more information about targeted sentiment, see Targeted sentiment. + *
+ */ +public class MentionSentiment implements Serializable { + /** + *+ * The sentiment of the mention. + *
+ *
+ * Constraints:
+ * Allowed Values: POSITIVE, NEGATIVE, NEUTRAL, MIXED
+ */
+ private String sentiment;
+
+ /**
+ *
+ * Describes the level of confidence that Amazon Comprehend has in the + * accuracy of its detection of sentiments. + *
+ */ + private SentimentScore sentimentScore; + + /** + *+ * The sentiment of the mention. + *
+ *
+ * Constraints:
+ * Allowed Values: POSITIVE, NEGATIVE, NEUTRAL, MIXED
+ *
+ * @return
+ * The sentiment of the mention. + *
+ * @see SentimentType + */ + public String getSentiment() { + return sentiment; + } + + /** + *+ * The sentiment of the mention. + *
+ *
+ * Constraints:
+ * Allowed Values: POSITIVE, NEGATIVE, NEUTRAL, MIXED
+ *
+ * @param sentiment
+ * The sentiment of the mention. + *
+ * @see SentimentType + */ + public void setSentiment(String sentiment) { + this.sentiment = sentiment; + } + + /** + *+ * The sentiment of the mention. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Allowed Values: POSITIVE, NEGATIVE, NEUTRAL, MIXED
+ *
+ * @param sentiment
+ * The sentiment of the mention. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see SentimentType + */ + public MentionSentiment withSentiment(String sentiment) { + this.sentiment = sentiment; + return this; + } + + /** + *+ * The sentiment of the mention. + *
+ *
+ * Constraints:
+ * Allowed Values: POSITIVE, NEGATIVE, NEUTRAL, MIXED
+ *
+ * @param sentiment
+ * The sentiment of the mention. + *
+ * @see SentimentType + */ + public void setSentiment(SentimentType sentiment) { + this.sentiment = sentiment.toString(); + } + + /** + *+ * The sentiment of the mention. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Allowed Values: POSITIVE, NEGATIVE, NEUTRAL, MIXED
+ *
+ * @param sentiment
+ * The sentiment of the mention. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see SentimentType + */ + public MentionSentiment withSentiment(SentimentType sentiment) { + this.sentiment = sentiment.toString(); + return this; + } + + /** + *+ * Describes the level of confidence that Amazon Comprehend has in the + * accuracy of its detection of sentiments. + *
+ * + * @return+ * Describes the level of confidence that Amazon Comprehend has in + * the accuracy of its detection of sentiments. + *
+ */ + public SentimentScore getSentimentScore() { + return sentimentScore; + } + + /** + *+ * Describes the level of confidence that Amazon Comprehend has in the + * accuracy of its detection of sentiments. + *
+ * + * @param sentimentScore+ * Describes the level of confidence that Amazon Comprehend has + * in the accuracy of its detection of sentiments. + *
+ */ + public void setSentimentScore(SentimentScore sentimentScore) { + this.sentimentScore = sentimentScore; + } + + /** + *+ * Describes the level of confidence that Amazon Comprehend has in the + * accuracy of its detection of sentiments. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param sentimentScore
+ * Describes the level of confidence that Amazon Comprehend has + * in the accuracy of its detection of sentiments. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public MentionSentiment withSentimentScore(SentimentScore sentimentScore) { + this.sentimentScore = sentimentScore; + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getSentiment() != null) + sb.append("Sentiment: " + getSentiment() + ","); + if (getSentimentScore() != null) + sb.append("SentimentScore: " + getSentimentScore()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime * hashCode + ((getSentiment() == null) ? 0 : getSentiment().hashCode()); + hashCode = prime * hashCode + + ((getSentimentScore() == null) ? 0 : getSentimentScore().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof MentionSentiment == false) + return false; + MentionSentiment other = (MentionSentiment) obj; + + if (other.getSentiment() == null ^ this.getSentiment() == null) + return false; + if (other.getSentiment() != null + && other.getSentiment().equals(this.getSentiment()) == false) + return false; + if (other.getSentimentScore() == null ^ this.getSentimentScore() == null) + return false; + if (other.getSentimentScore() != null + && other.getSentimentScore().equals(this.getSentimentScore()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/PartOfSpeechTag.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/PartOfSpeechTag.java index c98f16621a..fa833c7ab3 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/PartOfSpeechTag.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/PartOfSpeechTag.java @@ -22,7 +22,9 @@ * Identifies the part of speech represented by the token and gives the * confidence that Amazon Comprehend has that the part of speech was correctly * identified. For more information about the parts of speech that Amazon - * Comprehend can identify, see how-syntax. + * Comprehend can identify, see Syntax in the Comprehend Developer Guide. * */ public class PartOfSpeechTag implements Serializable { diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/PiiEntity.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/PiiEntity.java index 82965cbbb2..73767bf6db 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/PiiEntity.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/PiiEntity.java @@ -53,22 +53,16 @@ public class PiiEntity implements Serializable { /** *- * A character offset in the input text that shows where the PII entity - * begins (the first character is at position 0). The offset returns the - * position of each UTF-8 code point in the string. A code point is - * the abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the entity. *
*/ private Integer beginOffset; /** *- * A character offset in the input text that shows where the PII entity - * ends. The offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a particular - * graphical representation. For example, a multi-byte UTF-8 character maps - * to a single code point. + * The zero-based offset from the beginning of the source text to the last + * character in the entity. *
*/ private Integer endOffset; @@ -273,20 +267,13 @@ public PiiEntity withType(PiiEntityType type) { /** *- * A character offset in the input text that shows where the PII entity - * begins (the first character is at position 0). The offset returns the - * position of each UTF-8 code point in the string. A code point is - * the abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the entity. *
* * @return- * A character offset in the input text that shows where the PII - * entity begins (the first character is at position 0). The offset - * returns the position of each UTF-8 code point in the string. A - * code point is the abstract character from a particular - * graphical representation. For example, a multi-byte UTF-8 - * character maps to a single code point. + * The zero-based offset from the beginning of the source text to + * the first character in the entity. *
*/ public Integer getBeginOffset() { @@ -295,20 +282,13 @@ public Integer getBeginOffset() { /** *- * A character offset in the input text that shows where the PII entity - * begins (the first character is at position 0). The offset returns the - * position of each UTF-8 code point in the string. A code point is - * the abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the entity. *
* * @param beginOffset- * A character offset in the input text that shows where the PII - * entity begins (the first character is at position 0). The - * offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a - * particular graphical representation. For example, a multi-byte - * UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to + * the first character in the entity. *
*/ public void setBeginOffset(Integer beginOffset) { @@ -317,23 +297,16 @@ public void setBeginOffset(Integer beginOffset) { /** *- * A character offset in the input text that shows where the PII entity - * begins (the first character is at position 0). The offset returns the - * position of each UTF-8 code point in the string. A code point is - * the abstract character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to the first + * character in the entity. *
** Returns a reference to this object so that method calls can be chained * together. * * @param beginOffset
- * A character offset in the input text that shows where the PII - * entity begins (the first character is at position 0). The - * offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a - * particular graphical representation. For example, a multi-byte - * UTF-8 character maps to a single code point. + * The zero-based offset from the beginning of the source text to + * the first character in the entity. *
* @return A reference to this updated object so that method calls can be * chained together. @@ -345,20 +318,13 @@ public PiiEntity withBeginOffset(Integer beginOffset) { /** *- * A character offset in the input text that shows where the PII entity - * ends. The offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a particular - * graphical representation. For example, a multi-byte UTF-8 character maps - * to a single code point. + * The zero-based offset from the beginning of the source text to the last + * character in the entity. *
* * @return- * A character offset in the input text that shows where the PII - * entity ends. The offset returns the position of each UTF-8 code - * point in the string. A code point is the abstract - * character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code - * point. + * The zero-based offset from the beginning of the source text to + * the last character in the entity. *
*/ public Integer getEndOffset() { @@ -367,20 +333,13 @@ public Integer getEndOffset() { /** *- * A character offset in the input text that shows where the PII entity - * ends. The offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a particular - * graphical representation. For example, a multi-byte UTF-8 character maps - * to a single code point. + * The zero-based offset from the beginning of the source text to the last + * character in the entity. *
* * @param endOffset- * A character offset in the input text that shows where the PII - * entity ends. The offset returns the position of each UTF-8 - * code point in the string. A code point is the abstract - * character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code - * point. + * The zero-based offset from the beginning of the source text to + * the last character in the entity. *
*/ public void setEndOffset(Integer endOffset) { @@ -389,23 +348,16 @@ public void setEndOffset(Integer endOffset) { /** *- * A character offset in the input text that shows where the PII entity - * ends. The offset returns the position of each UTF-8 code point in the - * string. A code point is the abstract character from a particular - * graphical representation. For example, a multi-byte UTF-8 character maps - * to a single code point. + * The zero-based offset from the beginning of the source text to the last + * character in the entity. *
** Returns a reference to this object so that method calls can be chained * together. * * @param endOffset
- * A character offset in the input text that shows where the PII - * entity ends. The offset returns the position of each UTF-8 - * code point in the string. A code point is the abstract - * character from a particular graphical representation. For - * example, a multi-byte UTF-8 character maps to a single code - * point. + * The zero-based offset from the beginning of the source text to + * the last character in the entity. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/StartTargetedSentimentDetectionJobRequest.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/StartTargetedSentimentDetectionJobRequest.java index 383b8e0bc1..ccca6612c9 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/StartTargetedSentimentDetectionJobRequest.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/StartTargetedSentimentDetectionJobRequest.java @@ -69,8 +69,8 @@ public class StartTargetedSentimentDetectionJobRequest extends AmazonWebServiceR /** *- * The language of the input documents. Currently, English is the only valid - * language. + * The language of the input documents. Currently, English is the only + * supported language. *
*
* Constraints:
@@ -369,8 +369,8 @@ public StartTargetedSentimentDetectionJobRequest withJobName(String jobName) {
/**
*
- * The language of the input documents. Currently, English is the only valid - * language. + * The language of the input documents. Currently, English is the only + * supported language. *
*
* Constraints:
@@ -378,7 +378,7 @@ public StartTargetedSentimentDetectionJobRequest withJobName(String jobName) {
*
* @return
* The language of the input documents. Currently, English is the - * only valid language. + * only supported language. *
* @see LanguageCode */ @@ -388,8 +388,8 @@ public String getLanguageCode() { /** *- * The language of the input documents. Currently, English is the only valid - * language. + * The language of the input documents. Currently, English is the only + * supported language. *
*
* Constraints:
@@ -397,7 +397,7 @@ public String getLanguageCode() {
*
* @param languageCode
* The language of the input documents. Currently, English is the - * only valid language. + * only supported language. *
* @see LanguageCode */ @@ -407,8 +407,8 @@ public void setLanguageCode(String languageCode) { /** *- * The language of the input documents. Currently, English is the only valid - * language. + * The language of the input documents. Currently, English is the only + * supported language. *
** Returns a reference to this object so that method calls can be chained @@ -419,7 +419,7 @@ public void setLanguageCode(String languageCode) { * * @param languageCode
* The language of the input documents. Currently, English is the - * only valid language. + * only supported language. *
* @return A reference to this updated object so that method calls can be * chained together. @@ -432,8 +432,8 @@ public StartTargetedSentimentDetectionJobRequest withLanguageCode(String languag /** *- * The language of the input documents. Currently, English is the only valid - * language. + * The language of the input documents. Currently, English is the only + * supported language. *
*
* Constraints:
@@ -441,7 +441,7 @@ public StartTargetedSentimentDetectionJobRequest withLanguageCode(String languag
*
* @param languageCode
* The language of the input documents. Currently, English is the - * only valid language. + * only supported language. *
* @see LanguageCode */ @@ -451,8 +451,8 @@ public void setLanguageCode(LanguageCode languageCode) { /** *- * The language of the input documents. Currently, English is the only valid - * language. + * The language of the input documents. Currently, English is the only + * supported language. *
** Returns a reference to this object so that method calls can be chained @@ -463,7 +463,7 @@ public void setLanguageCode(LanguageCode languageCode) { * * @param languageCode
* The language of the input documents. Currently, English is the - * only valid language. + * only supported language. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/SyntaxToken.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/SyntaxToken.java index fde22089c9..39c7e54f18 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/SyntaxToken.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/SyntaxToken.java @@ -61,7 +61,9 @@ public class SyntaxToken implements Serializable { ** Provides the part of speech label and the confidence level that Amazon * Comprehend has that the part of speech was correctly identified. For more - * information, see how-syntax. + * information, see Syntax in the Comprehend Developer Guide. *
*/ private PartOfSpeechTag partOfSpeech; @@ -271,13 +273,17 @@ public SyntaxToken withEndOffset(Integer endOffset) { ** Provides the part of speech label and the confidence level that Amazon * Comprehend has that the part of speech was correctly identified. For more - * information, see how-syntax. + * information, see Syntax in the Comprehend Developer Guide. *
* * @return* Provides the part of speech label and the confidence level that * Amazon Comprehend has that the part of speech was correctly - * identified. For more information, see how-syntax. + * identified. For more information, see Syntax in the Comprehend Developer Guide. *
*/ public PartOfSpeechTag getPartOfSpeech() { @@ -288,14 +294,17 @@ public PartOfSpeechTag getPartOfSpeech() { ** Provides the part of speech label and the confidence level that Amazon * Comprehend has that the part of speech was correctly identified. For more - * information, see how-syntax. + * information, see Syntax in the Comprehend Developer Guide. *
* * @param partOfSpeech* Provides the part of speech label and the confidence level * that Amazon Comprehend has that the part of speech was - * correctly identified. For more information, see - * how-syntax. + * correctly identified. For more information, see Syntax in the Comprehend Developer Guide. *
*/ public void setPartOfSpeech(PartOfSpeechTag partOfSpeech) { @@ -306,7 +315,9 @@ public void setPartOfSpeech(PartOfSpeechTag partOfSpeech) { ** Provides the part of speech label and the confidence level that Amazon * Comprehend has that the part of speech was correctly identified. For more - * information, see how-syntax. + * information, see Syntax in the Comprehend Developer Guide. *
** Returns a reference to this object so that method calls can be chained @@ -315,8 +326,9 @@ public void setPartOfSpeech(PartOfSpeechTag partOfSpeech) { * @param partOfSpeech
* Provides the part of speech label and the confidence level * that Amazon Comprehend has that the part of speech was - * correctly identified. For more information, see - * how-syntax. + * correctly identified. For more information, see Syntax in the Comprehend Developer Guide. *
* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/TargetedSentimentEntity.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/TargetedSentimentEntity.java new file mode 100644 index 0000000000..403abb00ca --- /dev/null +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/TargetedSentimentEntity.java @@ -0,0 +1,286 @@ +/* + * Copyright 2010-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.amazonaws.services.comprehend.model; + +import java.io.Serializable; + +/** + *+ * Information about one of the entities found by targeted sentiment analysis. + *
+ *+ * For more information about targeted sentiment, see Targeted sentiment. + *
+ */ +public class TargetedSentimentEntity implements Serializable { + /** + *+ * One or more index into the Mentions array that provides the best name for + * the entity group. + *
+ */ + private java.util.List+ * An array of mentions of the entity in the document. The array represents + * a co-reference group. See Co-reference group for an example. + *
+ */ + private java.util.List+ * One or more index into the Mentions array that provides the best name for + * the entity group. + *
+ * + * @return+ * One or more index into the Mentions array that provides the best + * name for the entity group. + *
+ */ + public java.util.List+ * One or more index into the Mentions array that provides the best name for + * the entity group. + *
+ * + * @param descriptiveMentionIndex+ * One or more index into the Mentions array that provides the + * best name for the entity group. + *
+ */ + public void setDescriptiveMentionIndex(java.util.Collection+ * One or more index into the Mentions array that provides the best name for + * the entity group. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param descriptiveMentionIndex
+ * One or more index into the Mentions array that provides the + * best name for the entity group. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentEntity withDescriptiveMentionIndex(Integer... descriptiveMentionIndex) { + if (getDescriptiveMentionIndex() == null) { + this.descriptiveMentionIndex = new java.util.ArrayList+ * One or more index into the Mentions array that provides the best name for + * the entity group. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param descriptiveMentionIndex
+ * One or more index into the Mentions array that provides the + * best name for the entity group. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentEntity withDescriptiveMentionIndex( + java.util.Collection+ * An array of mentions of the entity in the document. The array represents + * a co-reference group. See Co-reference group for an example. + *
+ * + * @return+ * An array of mentions of the entity in the document. The array + * represents a co-reference group. See Co-reference group for an example. + *
+ */ + public java.util.List+ * An array of mentions of the entity in the document. The array represents + * a co-reference group. See Co-reference group for an example. + *
+ * + * @param mentions+ * An array of mentions of the entity in the document. The array + * represents a co-reference group. See Co-reference group for an example. + *
+ */ + public void setMentions(java.util.Collection+ * An array of mentions of the entity in the document. The array represents + * a co-reference group. See Co-reference group for an example. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param mentions
+ * An array of mentions of the entity in the document. The array + * represents a co-reference group. See Co-reference group for an example. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentEntity withMentions(TargetedSentimentMention... mentions) { + if (getMentions() == null) { + this.mentions = new java.util.ArrayList+ * An array of mentions of the entity in the document. The array represents + * a co-reference group. See Co-reference group for an example. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param mentions
+ * An array of mentions of the entity in the document. The array + * represents a co-reference group. See Co-reference group for an example. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentEntity withMentions( + java.util.Collection+ * Information about one mention of an entity. The mention information includes + * the location of the mention in the text and the sentiment of the mention. + *
+ *+ * For more information about targeted sentiment, see Targeted sentiment. + *
+ */ +public class TargetedSentimentMention implements Serializable { + /** + *+ * Model confidence that the entity is relevant. Value range is zero to one, + * where one is highest confidence. + *
+ */ + private Float score; + + /** + *+ * The confidence that all the entities mentioned in the group relate to the + * same entity. + *
+ */ + private Float groupScore; + + /** + *+ * The text in the document that identifies the entity. + *
+ *
+ * Constraints:
+ * Length: 1 -
+ */
+ private String text;
+
+ /**
+ *
+ * The type of the entity. Amazon Comprehend supports a variety of entity types. + *
+ *
+ * Constraints:
+ * Allowed Values: PERSON, LOCATION, ORGANIZATION, FACILITY, BRAND,
+ * COMMERCIAL_ITEM, MOVIE, MUSIC, BOOK, SOFTWARE, GAME, PERSONAL_TITLE,
+ * EVENT, DATE, QUANTITY, ATTRIBUTE, OTHER
+ */
+ private String type;
+
+ /**
+ *
+ * Contains the sentiment and sentiment score for the mention. + *
+ */ + private MentionSentiment mentionSentiment; + + /** + *+ * The offset into the document text where the mention begins. + *
+ */ + private Integer beginOffset; + + /** + *+ * The offset into the document text where the mention ends. + *
+ */ + private Integer endOffset; + + /** + *+ * Model confidence that the entity is relevant. Value range is zero to one, + * where one is highest confidence. + *
+ * + * @return+ * Model confidence that the entity is relevant. Value range is zero + * to one, where one is highest confidence. + *
+ */ + public Float getScore() { + return score; + } + + /** + *+ * Model confidence that the entity is relevant. Value range is zero to one, + * where one is highest confidence. + *
+ * + * @param score+ * Model confidence that the entity is relevant. Value range is + * zero to one, where one is highest confidence. + *
+ */ + public void setScore(Float score) { + this.score = score; + } + + /** + *+ * Model confidence that the entity is relevant. Value range is zero to one, + * where one is highest confidence. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param score
+ * Model confidence that the entity is relevant. Value range is + * zero to one, where one is highest confidence. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentMention withScore(Float score) { + this.score = score; + return this; + } + + /** + *+ * The confidence that all the entities mentioned in the group relate to the + * same entity. + *
+ * + * @return+ * The confidence that all the entities mentioned in the group + * relate to the same entity. + *
+ */ + public Float getGroupScore() { + return groupScore; + } + + /** + *+ * The confidence that all the entities mentioned in the group relate to the + * same entity. + *
+ * + * @param groupScore+ * The confidence that all the entities mentioned in the group + * relate to the same entity. + *
+ */ + public void setGroupScore(Float groupScore) { + this.groupScore = groupScore; + } + + /** + *+ * The confidence that all the entities mentioned in the group relate to the + * same entity. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param groupScore
+ * The confidence that all the entities mentioned in the group + * relate to the same entity. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentMention withGroupScore(Float groupScore) { + this.groupScore = groupScore; + return this; + } + + /** + *+ * The text in the document that identifies the entity. + *
+ *
+ * Constraints:
+ * Length: 1 -
+ *
+ * @return
+ * The text in the document that identifies the entity. + *
+ */ + public String getText() { + return text; + } + + /** + *+ * The text in the document that identifies the entity. + *
+ *
+ * Constraints:
+ * Length: 1 -
+ *
+ * @param text
+ * The text in the document that identifies the entity. + *
+ */ + public void setText(String text) { + this.text = text; + } + + /** + *+ * The text in the document that identifies the entity. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Length: 1 -
+ *
+ * @param text
+ * The text in the document that identifies the entity. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentMention withText(String text) { + this.text = text; + return this; + } + + /** + *+ * The type of the entity. Amazon Comprehend supports a variety of entity types. + *
+ *
+ * Constraints:
+ * Allowed Values: PERSON, LOCATION, ORGANIZATION, FACILITY, BRAND,
+ * COMMERCIAL_ITEM, MOVIE, MUSIC, BOOK, SOFTWARE, GAME, PERSONAL_TITLE,
+ * EVENT, DATE, QUANTITY, ATTRIBUTE, OTHER
+ *
+ * @return
+ * The type of the entity. Amazon Comprehend supports a variety of + * entity types. + *
+ * @see TargetedSentimentEntityType + */ + public String getType() { + return type; + } + + /** + *+ * The type of the entity. Amazon Comprehend supports a variety of entity types. + *
+ *
+ * Constraints:
+ * Allowed Values: PERSON, LOCATION, ORGANIZATION, FACILITY, BRAND,
+ * COMMERCIAL_ITEM, MOVIE, MUSIC, BOOK, SOFTWARE, GAME, PERSONAL_TITLE,
+ * EVENT, DATE, QUANTITY, ATTRIBUTE, OTHER
+ *
+ * @param type
+ * The type of the entity. Amazon Comprehend supports a variety + * of entity types. + *
+ * @see TargetedSentimentEntityType + */ + public void setType(String type) { + this.type = type; + } + + /** + *+ * The type of the entity. Amazon Comprehend supports a variety of entity types. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Allowed Values: PERSON, LOCATION, ORGANIZATION, FACILITY, BRAND,
+ * COMMERCIAL_ITEM, MOVIE, MUSIC, BOOK, SOFTWARE, GAME, PERSONAL_TITLE,
+ * EVENT, DATE, QUANTITY, ATTRIBUTE, OTHER
+ *
+ * @param type
+ * The type of the entity. Amazon Comprehend supports a variety + * of entity types. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see TargetedSentimentEntityType + */ + public TargetedSentimentMention withType(String type) { + this.type = type; + return this; + } + + /** + *+ * The type of the entity. Amazon Comprehend supports a variety of entity types. + *
+ *
+ * Constraints:
+ * Allowed Values: PERSON, LOCATION, ORGANIZATION, FACILITY, BRAND,
+ * COMMERCIAL_ITEM, MOVIE, MUSIC, BOOK, SOFTWARE, GAME, PERSONAL_TITLE,
+ * EVENT, DATE, QUANTITY, ATTRIBUTE, OTHER
+ *
+ * @param type
+ * The type of the entity. Amazon Comprehend supports a variety + * of entity types. + *
+ * @see TargetedSentimentEntityType + */ + public void setType(TargetedSentimentEntityType type) { + this.type = type.toString(); + } + + /** + *+ * The type of the entity. Amazon Comprehend supports a variety of entity types. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + *
+ * Constraints:
+ * Allowed Values: PERSON, LOCATION, ORGANIZATION, FACILITY, BRAND,
+ * COMMERCIAL_ITEM, MOVIE, MUSIC, BOOK, SOFTWARE, GAME, PERSONAL_TITLE,
+ * EVENT, DATE, QUANTITY, ATTRIBUTE, OTHER
+ *
+ * @param type
+ * The type of the entity. Amazon Comprehend supports a variety + * of entity types. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see TargetedSentimentEntityType + */ + public TargetedSentimentMention withType(TargetedSentimentEntityType type) { + this.type = type.toString(); + return this; + } + + /** + *+ * Contains the sentiment and sentiment score for the mention. + *
+ * + * @return+ * Contains the sentiment and sentiment score for the mention. + *
+ */ + public MentionSentiment getMentionSentiment() { + return mentionSentiment; + } + + /** + *+ * Contains the sentiment and sentiment score for the mention. + *
+ * + * @param mentionSentiment+ * Contains the sentiment and sentiment score for the mention. + *
+ */ + public void setMentionSentiment(MentionSentiment mentionSentiment) { + this.mentionSentiment = mentionSentiment; + } + + /** + *+ * Contains the sentiment and sentiment score for the mention. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param mentionSentiment
+ * Contains the sentiment and sentiment score for the mention. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentMention withMentionSentiment(MentionSentiment mentionSentiment) { + this.mentionSentiment = mentionSentiment; + return this; + } + + /** + *+ * The offset into the document text where the mention begins. + *
+ * + * @return+ * The offset into the document text where the mention begins. + *
+ */ + public Integer getBeginOffset() { + return beginOffset; + } + + /** + *+ * The offset into the document text where the mention begins. + *
+ * + * @param beginOffset+ * The offset into the document text where the mention begins. + *
+ */ + public void setBeginOffset(Integer beginOffset) { + this.beginOffset = beginOffset; + } + + /** + *+ * The offset into the document text where the mention begins. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param beginOffset
+ * The offset into the document text where the mention begins. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentMention withBeginOffset(Integer beginOffset) { + this.beginOffset = beginOffset; + return this; + } + + /** + *+ * The offset into the document text where the mention ends. + *
+ * + * @return+ * The offset into the document text where the mention ends. + *
+ */ + public Integer getEndOffset() { + return endOffset; + } + + /** + *+ * The offset into the document text where the mention ends. + *
+ * + * @param endOffset+ * The offset into the document text where the mention ends. + *
+ */ + public void setEndOffset(Integer endOffset) { + this.endOffset = endOffset; + } + + /** + *+ * The offset into the document text where the mention ends. + *
+ *+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param endOffset
+ * The offset into the document text where the mention ends. + *
+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public TargetedSentimentMention withEndOffset(Integer endOffset) { + this.endOffset = endOffset; + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getScore() != null) + sb.append("Score: " + getScore() + ","); + if (getGroupScore() != null) + sb.append("GroupScore: " + getGroupScore() + ","); + if (getText() != null) + sb.append("Text: " + getText() + ","); + if (getType() != null) + sb.append("Type: " + getType() + ","); + if (getMentionSentiment() != null) + sb.append("MentionSentiment: " + getMentionSentiment() + ","); + if (getBeginOffset() != null) + sb.append("BeginOffset: " + getBeginOffset() + ","); + if (getEndOffset() != null) + sb.append("EndOffset: " + getEndOffset()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime * hashCode + ((getScore() == null) ? 0 : getScore().hashCode()); + hashCode = prime * hashCode + ((getGroupScore() == null) ? 0 : getGroupScore().hashCode()); + hashCode = prime * hashCode + ((getText() == null) ? 0 : getText().hashCode()); + hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); + hashCode = prime * hashCode + + ((getMentionSentiment() == null) ? 0 : getMentionSentiment().hashCode()); + hashCode = prime * hashCode + + ((getBeginOffset() == null) ? 0 : getBeginOffset().hashCode()); + hashCode = prime * hashCode + ((getEndOffset() == null) ? 0 : getEndOffset().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof TargetedSentimentMention == false) + return false; + TargetedSentimentMention other = (TargetedSentimentMention) obj; + + if (other.getScore() == null ^ this.getScore() == null) + return false; + if (other.getScore() != null && other.getScore().equals(this.getScore()) == false) + return false; + if (other.getGroupScore() == null ^ this.getGroupScore() == null) + return false; + if (other.getGroupScore() != null + && other.getGroupScore().equals(this.getGroupScore()) == false) + return false; + if (other.getText() == null ^ this.getText() == null) + return false; + if (other.getText() != null && other.getText().equals(this.getText()) == false) + return false; + if (other.getType() == null ^ this.getType() == null) + return false; + if (other.getType() != null && other.getType().equals(this.getType()) == false) + return false; + if (other.getMentionSentiment() == null ^ this.getMentionSentiment() == null) + return false; + if (other.getMentionSentiment() != null + && other.getMentionSentiment().equals(this.getMentionSentiment()) == false) + return false; + if (other.getBeginOffset() == null ^ this.getBeginOffset() == null) + return false; + if (other.getBeginOffset() != null + && other.getBeginOffset().equals(this.getBeginOffset()) == false) + return false; + if (other.getEndOffset() == null ^ this.getEndOffset() == null) + return false; + if (other.getEndOffset() != null + && other.getEndOffset().equals(this.getEndOffset()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/UnsupportedLanguageException.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/UnsupportedLanguageException.java index ac42798b05..7f3487338c 100644 --- a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/UnsupportedLanguageException.java +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/UnsupportedLanguageException.java @@ -21,8 +21,9 @@ ** Amazon Comprehend can't process the language of the input text. For custom * entity recognition APIs, only English, Spanish, French, Italian, German, or - * Portuguese are accepted. For a list of supported languages, see - * supported-languages. + * Portuguese are accepted. For a list of supported languages, Supported languages in the Comprehend Developer Guide. *
*/ public class UnsupportedLanguageException extends AmazonServiceException { diff --git a/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/transform/BatchDetectTargetedSentimentItemResultJsonMarshaller.java b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/transform/BatchDetectTargetedSentimentItemResultJsonMarshaller.java new file mode 100644 index 0000000000..19a44cc01f --- /dev/null +++ b/aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/transform/BatchDetectTargetedSentimentItemResultJsonMarshaller.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.amazonaws.services.comprehend.model.transform; + +import com.amazonaws.services.comprehend.model.*; +import com.amazonaws.util.DateUtils; +import com.amazonaws.util.json.AwsJsonWriter; + +/** + * JSON marshaller for POJO BatchDetectTargetedSentimentItemResult + */ +class BatchDetectTargetedSentimentItemResultJsonMarshaller { + + public void marshall( + BatchDetectTargetedSentimentItemResult batchDetectTargetedSentimentItemResult, + AwsJsonWriter jsonWriter) throws Exception { + jsonWriter.beginObject(); + if (batchDetectTargetedSentimentItemResult.getIndex() != null) { + Integer index = batchDetectTargetedSentimentItemResult.getIndex(); + jsonWriter.name("Index"); + jsonWriter.value(index); + } + if (batchDetectTargetedSentimentItemResult.getEntities() != null) { + java.util.List