Class TextSegment
- All Implemented Interfaces:
- Serializable,- SdkPojo,- ToCopyableBuilder<TextSegment.Builder,- TextSegment> 
Provides information about a text extract in a chat response that can be attributed to a source document.
- See Also:
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionfinal IntegerThe zero-based location in the response string where the source attribution starts.static TextSegment.Builderbuilder()final IntegerThe zero-based location in the response string where the source attribution ends.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final StringmediaId()Deprecated.Deprecated in favor of using mediaId within the respective sourceDetails field.final StringDeprecated.Deprecated in favor of using mediaMimeType within the respective sourceDetails field.static Class<? extends TextSegment.Builder> final SnippetExcerptThe relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.final SourceDetailsSource information for a segment of extracted text, including its media type.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuildercopy
- 
Method Details- 
beginOffsetThe zero-based location in the response string where the source attribution starts. - Returns:
- The zero-based location in the response string where the source attribution starts.
 
- 
endOffsetThe zero-based location in the response string where the source attribution ends. - Returns:
- The zero-based location in the response string where the source attribution ends.
 
- 
snippetExcerptThe relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response. - Returns:
- The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.
 
- 
mediaIdDeprecated.Deprecated in favor of using mediaId within the respective sourceDetails field.The identifier of the media object associated with the text segment in the source attribution. - Returns:
- The identifier of the media object associated with the text segment in the source attribution.
 
- 
mediaMimeTypeDeprecated.Deprecated in favor of using mediaMimeType within the respective sourceDetails field.The MIME type (image/png) of the media object associated with the text segment in the source attribution. - Returns:
- The MIME type (image/png) of the media object associated with the text segment in the source attribution.
 
- 
sourceDetailsSource information for a segment of extracted text, including its media type. - Returns:
- Source information for a segment of extracted text, including its media type.
 
- 
toBuilderDescription copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
- toBuilderin interface- ToCopyableBuilder<TextSegment.Builder,- TextSegment> 
- Returns:
- a builder for type T
 
- 
builder
- 
serializableBuilderClass
- 
hashCode
- 
equals
- 
equalsBySdkFieldsDescription copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
- equalsBySdkFieldsin interface- SdkPojo
- Parameters:
- obj- the object to be compared with
- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
 
- 
toString
- 
getValueForField
- 
sdkFields
- 
sdkFieldNameToField- Specified by:
- sdkFieldNameToFieldin interface- SdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
 
 
-