using System.Text.Json.Serialization; namespace AnthropicClient.Models; /// /// Represents a text document source. /// public class TextSource : Source { /// /// Gets the media type of the source. /// [JsonPropertyName("media_type")] public string MediaType { get; } = "text/plain"; /// /// Gets the data of the source. /// public string Data { get; init; } = string.Empty; /// /// Initializes a new instance of the class. /// /// The data of the document. /// Thrown when the data is null. /// A new instance of the class. public TextSource(string data) : base(SourceType.Text) { Data = data; } }