Interface SourceAttribution.Builder

    • Method Detail

      • citationNumber

        SourceAttribution.Builder citationNumber​(Integer citationNumber)

        The number attached to a citation in an Amazon Q generated response.

        Parameters:
        citationNumber - The number attached to a citation in an Amazon Q generated response.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • snippet

        SourceAttribution.Builder snippet​(String snippet)

        The content extract from the document on which the generated response is based.

        Parameters:
        snippet - The content extract from the document on which the generated response is based.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • textMessageSegments

        SourceAttribution.Builder textMessageSegments​(Collection<TextSegment> textMessageSegments)

        A text extract from a source document that is used for source attribution.

        Parameters:
        textMessageSegments - A text extract from a source document that is used for source attribution.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • textMessageSegments

        SourceAttribution.Builder textMessageSegments​(TextSegment... textMessageSegments)

        A text extract from a source document that is used for source attribution.

        Parameters:
        textMessageSegments - A text extract from a source document that is used for source attribution.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • textMessageSegments

        SourceAttribution.Builder textMessageSegments​(Consumer<TextSegment.Builder>... textMessageSegments)

        A text extract from a source document that is used for source attribution.

        This is a convenience method that creates an instance of the TextSegment.Builder avoiding the need to create one manually via TextSegment.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #textMessageSegments(List).

        Parameters:
        textMessageSegments - a consumer that will call methods on TextSegment.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #textMessageSegments(java.util.Collection)
      • title

        SourceAttribution.Builder title​(String title)

        The title of the document which is the source for the Amazon Q generated response.

        Parameters:
        title - The title of the document which is the source for the Amazon Q generated response.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • updatedAt

        SourceAttribution.Builder updatedAt​(Instant updatedAt)

        The Unix timestamp when the Amazon Q application was last updated.

        Parameters:
        updatedAt - The Unix timestamp when the Amazon Q application was last updated.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • url

        SourceAttribution.Builder url​(String url)

        The URL of the document which is the source for the Amazon Q generated response.

        Parameters:
        url - The URL of the document which is the source for the Amazon Q generated response.
        Returns:
        Returns a reference to this object so that method calls can be chained together.