Class Citation
A citation for a piece of generatedcontent. This data type is not supported in Gemini API.
public record Citation : IEquatable<Citation>
- Inheritance
-
Citation
- Implements
- Inherited Members
Properties
EndIndex
Output only. The end index of the citation in the content.
[JsonPropertyName("endIndex")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? EndIndex { get; set; }
Property Value
- int?
License
Output only. The license of the source of the citation.
[JsonPropertyName("license")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? License { get; set; }
Property Value
PublicationDate
Output only. The publication date of the source of the citation.
[JsonPropertyName("publicationDate")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GoogleTypeDate? PublicationDate { get; set; }
Property Value
StartIndex
Output only. The start index of the citation in the content.
[JsonPropertyName("startIndex")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? StartIndex { get; set; }
Property Value
- int?
Title
Output only. The title of the source of the citation.
[JsonPropertyName("title")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Title { get; set; }
Property Value
Uri
Output only. The URI of the source of the citation.
[JsonPropertyName("uri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Uri { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a Citation object.
public static Citation? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- Citation
The deserialized Citation object, or null if deserialization fails.