Class Citation

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.Citation

public abstract class Citation extends JsonSerializable
A citation for a piece of generatedcontent. This data type is not supported in Gemini API.
  • Constructor Details

    • Citation

      public Citation()
  • Method Details

    • endIndex

      public abstract Optional<Integer> endIndex()
      Output only. The end index of the citation in the content.
    • license

      public abstract Optional<String> license()
      Output only. The license of the source of the citation.
    • publicationDate

      public abstract Optional<GoogleTypeDate> publicationDate()
      Output only. The publication date of the source of the citation.
    • startIndex

      public abstract Optional<Integer> startIndex()
      Output only. The start index of the citation in the content.
    • title

      public abstract Optional<String> title()
      Output only. The title of the source of the citation.
    • uri

      public abstract Optional<String> uri()
      Output only. The URI of the source of the citation.
    • builder

      public static Citation.Builder builder()
      Instantiates a builder for Citation.
    • toBuilder

      public abstract Citation.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static Citation fromJson(String jsonString)
      Deserializes a JSON string to a Citation object.