Class URLCitation

java.lang.Object
com.google.genai.gaos.models.interactions.URLCitation
All Implemented Interfaces:
Annotation

public class URLCitation extends Object implements Annotation
URLCitation

A URL citation annotation.

  • Constructor Details

    • URLCitation

      public URLCitation(@Nullable Integer endIndex, @Nullable Integer startIndex, @Nullable String title, @Nullable String url)
    • URLCitation

      public URLCitation()
  • Method Details

    • endIndex

      public Optional<Integer> endIndex()
      End of the attributed segment, exclusive.
    • startIndex

      public Optional<Integer> startIndex()
      Start of segment of the response that is attributed to this source.

      Index indicates the start of the segment, measured in bytes.

    • title

      public Optional<String> title()
      The title of the URL.
    • type

      public String type()
      Specified by:
      type in interface Annotation
    • url

      public Optional<String> url()
      The URL.
    • builder

      public static URLCitation.Builder builder()
    • withEndIndex

      public URLCitation withEndIndex(@Nullable Integer endIndex)
      End of the attributed segment, exclusive.
    • withStartIndex

      public URLCitation withStartIndex(@Nullable Integer startIndex)
      Start of segment of the response that is attributed to this source.

      Index indicates the start of the segment, measured in bytes.

    • withTitle

      public URLCitation withTitle(@Nullable String title)
      The title of the URL.
    • withUrl

      public URLCitation withUrl(@Nullable String url)
      The URL.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object