Interface SourceAttribution.Builder

  • Method Details

    • title

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

      Parameters:
      title - The title of the document which is the source for the Amazon Q Business generated response.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.
    • url

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

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

      SourceAttribution.Builder citationNumber(Integer citationNumber)

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

      Parameters:
      citationNumber - The number attached to a citation in an Amazon Q Business 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 Business application was last updated.

      Parameters:
      updatedAt - The Unix timestamp when the Amazon Q Business application was last updated.
      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<TextSegment>).

      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: