using System.Text.Json.Serialization; namespace AnthropicClient.Models; /// /// Represents part of the content of a message. /// public abstract class Content { /// /// Gets the type of the content. /// public string Type { get; init; } = string.Empty; /// /// Gets the cache control to be used for the content. /// [JsonPropertyName("cache_control")] public CacheControl? CacheControl { get; init; } [JsonConstructor] internal Content() { } /// /// Initializes a new instance of the class. /// /// The type of the content. /// A new instance of the class. protected Content(string type) { Type = type; } /// /// Initializes a new instance of the class. /// /// The type of the content. /// The cache control to be used for the content. /// A new instance of the class. protected Content(string type, CacheControl cacheControl) { Type = type; CacheControl = cacheControl; } }