Class PlaceCitation

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

public class PlaceCitation extends Object implements Annotation
PlaceCitation

A place citation annotation.

  • Constructor Details

    • PlaceCitation

      public PlaceCitation(@Nullable Integer endIndex, @Nullable String name, @Nullable String placeId, @Nullable List<ReviewSnippet> reviewSnippets, @Nullable Integer startIndex, @Nullable String url)
    • PlaceCitation

      public PlaceCitation()
  • Method Details

    • endIndex

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

      public Optional<String> name()
      Title of the place.
    • placeId

      public Optional<String> placeId()
      The ID of the place, in `places/{place_id}` format.
    • reviewSnippets

      public Optional<List<ReviewSnippet>> reviewSnippets()
      Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.
    • 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.

    • type

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

      public Optional<String> url()
      URI reference of the place.
    • builder

      public static PlaceCitation.Builder builder()
    • withEndIndex

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

      public PlaceCitation withName(@Nullable String name)
      Title of the place.
    • withPlaceId

      public PlaceCitation withPlaceId(@Nullable String placeId)
      The ID of the place, in `places/{place_id}` format.
    • withReviewSnippets

      public PlaceCitation withReviewSnippets(@Nullable List<ReviewSnippet> reviewSnippets)
      Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.
    • withStartIndex

      public PlaceCitation 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.

    • withUrl

      public PlaceCitation withUrl(@Nullable String url)
      URI reference of the place.
    • 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