@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Highlight extends Object implements Serializable, Cloneable, StructuredPojo
Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.
| Constructor and Description |
|---|
Highlight() |
| Modifier and Type | Method and Description |
|---|---|
Highlight |
clone() |
boolean |
equals(Object obj) |
Integer |
getBeginOffset()
The zero-based location in the response string where the highlight starts.
|
Integer |
getEndOffset()
The zero-based location in the response string where the highlight ends.
|
Boolean |
getTopAnswer()
Indicates whether the response is the best response.
|
String |
getType()
The highlight type.
|
int |
hashCode() |
Boolean |
isTopAnswer()
Indicates whether the response is the best response.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller. |
void |
setBeginOffset(Integer beginOffset)
The zero-based location in the response string where the highlight starts.
|
void |
setEndOffset(Integer endOffset)
The zero-based location in the response string where the highlight ends.
|
void |
setTopAnswer(Boolean topAnswer)
Indicates whether the response is the best response.
|
void |
setType(String type)
The highlight type.
|
String |
toString()
Returns a string representation of this object.
|
Highlight |
withBeginOffset(Integer beginOffset)
The zero-based location in the response string where the highlight starts.
|
Highlight |
withEndOffset(Integer endOffset)
The zero-based location in the response string where the highlight ends.
|
Highlight |
withTopAnswer(Boolean topAnswer)
Indicates whether the response is the best response.
|
Highlight |
withType(HighlightType type)
The highlight type.
|
Highlight |
withType(String type)
The highlight type.
|
public void setBeginOffset(Integer beginOffset)
The zero-based location in the response string where the highlight starts.
beginOffset - The zero-based location in the response string where the highlight starts.public Integer getBeginOffset()
The zero-based location in the response string where the highlight starts.
public Highlight withBeginOffset(Integer beginOffset)
The zero-based location in the response string where the highlight starts.
beginOffset - The zero-based location in the response string where the highlight starts.public void setEndOffset(Integer endOffset)
The zero-based location in the response string where the highlight ends.
endOffset - The zero-based location in the response string where the highlight ends.public Integer getEndOffset()
The zero-based location in the response string where the highlight ends.
public Highlight withEndOffset(Integer endOffset)
The zero-based location in the response string where the highlight ends.
endOffset - The zero-based location in the response string where the highlight ends.public void setTopAnswer(Boolean topAnswer)
Indicates whether the response is the best response. True if this is the best response; otherwise, false.
topAnswer - Indicates whether the response is the best response. True if this is the best response; otherwise, false.public Boolean getTopAnswer()
Indicates whether the response is the best response. True if this is the best response; otherwise, false.
public Highlight withTopAnswer(Boolean topAnswer)
Indicates whether the response is the best response. True if this is the best response; otherwise, false.
topAnswer - Indicates whether the response is the best response. True if this is the best response; otherwise, false.public Boolean isTopAnswer()
Indicates whether the response is the best response. True if this is the best response; otherwise, false.
public void setType(String type)
The highlight type.
type - The highlight type.HighlightTypepublic String getType()
The highlight type.
HighlightTypepublic Highlight withType(String type)
The highlight type.
type - The highlight type.HighlightTypepublic Highlight withType(HighlightType type)
The highlight type.
type - The highlight type.HighlightTypepublic String toString()
toString in class ObjectObject.toString()public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.