using System.Text.Json.Serialization; using JpnCardsPokemon.Sdk.Utils.JsonConverter; namespace JpnCardsPokemon.Sdk.Api; /// /// Represents a set object from the web api. /// public class Set { /// /// The name of the set. /// public string? Name { get; set; } /// /// The internal identification number that the set is given. Used to query for information about this single set or /// for all cards in this single set. /// public int Id { get; set; } /// /// The URL to a page which has more information about the set. /// [JsonPropertyName("source_url")] public string? SourceUrl { get; set; } /// /// A URL to the official set's image. /// [JsonPropertyName("image_url")] public string? ImageUrl { get; set; } /// /// The language that the cards in the set are printed in. /// public string? Language { get; set; } /// /// The year the set was released. /// [JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)] [JsonConverter(typeof(NoneIntJsonConverter))] // set hashes in card objects sometimes have "none" as year. public int Year { get; set; } // TODO: According to documentation the property currently is not supported. // public DateOnly? Date { get; set; } /// /// The total number of cards in the set. /// [JsonPropertyName("card_count")] public int TotalCardCount { get; set; } /// /// The number of cards in the set that is printed on the card. This differs from the set's /// in sets with Secret Rare cards. /// [JsonPropertyName("printed_count")] [JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)] public int PrintedCardCount { get; set; } /// /// The shorthand code for the set. /// [JsonPropertyName("set_code")] public string? SetCode { get; set; } /// /// A stable id for earch card. Output is an eight digit integer which is unique for each card. While the cards' /// may change over time, the uuid should always remain stable and constant. /// public int Uuid { get; set; } }