@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TextSegment extends Object implements Serializable, Cloneable, StructuredPojo
Provides information about a text extract in a chat response that can be attributed to a source document.
Constructor and Description |
---|
TextSegment() |
Modifier and Type | Method and Description |
---|---|
TextSegment |
clone() |
boolean |
equals(Object obj) |
Integer |
getBeginOffset()
The zero-based location in the response string where the source attribution starts.
|
Integer |
getEndOffset()
The zero-based location in the response string where the source attribution ends.
|
SnippetExcerpt |
getSnippetExcerpt()
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business
chat response.
|
int |
hashCode() |
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 source attribution starts.
|
void |
setEndOffset(Integer endOffset)
The zero-based location in the response string where the source attribution ends.
|
void |
setSnippetExcerpt(SnippetExcerpt snippetExcerpt)
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business
chat response.
|
String |
toString()
Returns a string representation of this object.
|
TextSegment |
withBeginOffset(Integer beginOffset)
The zero-based location in the response string where the source attribution starts.
|
TextSegment |
withEndOffset(Integer endOffset)
The zero-based location in the response string where the source attribution ends.
|
TextSegment |
withSnippetExcerpt(SnippetExcerpt snippetExcerpt)
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business
chat response.
|
public void setBeginOffset(Integer beginOffset)
The zero-based location in the response string where the source attribution starts.
beginOffset
- The zero-based location in the response string where the source attribution starts.public Integer getBeginOffset()
The zero-based location in the response string where the source attribution starts.
public TextSegment withBeginOffset(Integer beginOffset)
The zero-based location in the response string where the source attribution starts.
beginOffset
- The zero-based location in the response string where the source attribution starts.public void setEndOffset(Integer endOffset)
The zero-based location in the response string where the source attribution ends.
endOffset
- The zero-based location in the response string where the source attribution ends.public Integer getEndOffset()
The zero-based location in the response string where the source attribution ends.
public TextSegment withEndOffset(Integer endOffset)
The zero-based location in the response string where the source attribution ends.
endOffset
- The zero-based location in the response string where the source attribution ends.public void setSnippetExcerpt(SnippetExcerpt snippetExcerpt)
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.
snippetExcerpt
- The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q
Business chat response.public SnippetExcerpt getSnippetExcerpt()
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.
public TextSegment withSnippetExcerpt(SnippetExcerpt snippetExcerpt)
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.
snippetExcerpt
- The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q
Business chat response.public String toString()
toString
in class Object
Object.toString()
public TextSegment clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.