/* * Copyright 2018-2023 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 javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about one of the entities found by targeted sentiment analysis. *
** For more information about targeted sentiment, see Targeted sentiment. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TargetedSentimentEntity implements Serializable, Cloneable, StructuredPojo { /** ** 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDescriptiveMentionIndex(java.util.Collection)} or * {@link #withDescriptiveMentionIndex(java.util.Collection)} if you want to override the existing values. *
* * @param descriptiveMentionIndex * One or more index into the Mentions array that provides the best name for the entity group. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetedSentimentEntity withDescriptiveMentionIndex(Integer... descriptiveMentionIndex) { if (this.descriptiveMentionIndex == null) { setDescriptiveMentionIndex(new java.util.ArrayList* 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. * @return Returns a reference to this 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMentions(java.util.Collection)} or {@link #withMentions(java.util.Collection)} if you want to override * the existing values. *
* * @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 Returns a reference to this object so that method calls can be chained together. */ public TargetedSentimentEntity withMentions(TargetedSentimentMention... mentions) { if (this.mentions == null) { setMentions(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. *
* * @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 Returns a reference to this object so that method calls can be chained together. */ public TargetedSentimentEntity withMentions(java.util.Collection