using System.Text.Json.Serialization;
namespace AnthropicClient.Models;
///
/// Represents a citation
///
public abstract class Citation
{
///
/// Gets the type of the citation.
///
public string Type { get; init; } = string.Empty;
///
/// Gets the text that is cited.
///
[JsonPropertyName("cited_text")]
public string CitedText { get; init; } = string.Empty;
///
/// Gets the document index of the citation.
///
[JsonPropertyName("document_index")]
public int DocumentIndex { get; init; }
///
/// Gets the title of the document from which the citation is made.
///
[JsonPropertyName("document_title")]
public string DocumentTitle { get; init; } = string.Empty;
[JsonConstructor]
internal Citation()
{
}
///
/// Initializes a new instance of the class with a specified type.
///
/// The type of the citation.
/// A new instance of .
protected Citation(string type)
{
Type = type;
}
}