2023-01-29 01:18:22 +01:00
|
|
|
|
using System.Text.Json.Serialization;
|
2023-03-01 21:47:26 +01:00
|
|
|
|
using JpnCardsPokemonSdk.Utils.JsonConverter;
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-01-28 23:54:23 +01:00
|
|
|
|
namespace JpnCardsPokemonSdk.Api;
|
|
|
|
|
|
2023-03-01 21:47:26 +01:00
|
|
|
|
public class Set
|
2023-01-28 22:35:56 +01:00
|
|
|
|
{
|
2023-02-12 23:07:40 +01:00
|
|
|
|
static Set()
|
|
|
|
|
{
|
|
|
|
|
EndpointFactory.RegisterTypeEndpoint<Set>(new SetEndpoint());
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-28 23:54:23 +01:00
|
|
|
|
public string? Name { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
2023-01-29 01:18:22 +01:00
|
|
|
|
[JsonPropertyName("source_url")]
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public string? SourceUrl { get; set; }
|
|
|
|
|
|
2023-01-29 01:18:22 +01:00
|
|
|
|
[JsonPropertyName("image_url")]
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public string? ImageUrl { get; set; }
|
|
|
|
|
|
2023-01-28 23:54:23 +01:00
|
|
|
|
public string? Language { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-01 21:44:13 +01:00
|
|
|
|
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
|
|
|
|
|
[JsonConverter(typeof(NoneIntJsonConverter))] // set hashes in card objects sometimes have "none" as year.
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public int Year { get; set; }
|
|
|
|
|
|
|
|
|
|
// TODO: According to documentation the property currently is not supported.
|
|
|
|
|
// public DateOnly? Date { get; set; }
|
|
|
|
|
|
2023-01-29 01:18:22 +01:00
|
|
|
|
[JsonPropertyName("card_count")]
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public int TotalCardCount { get; set; }
|
|
|
|
|
|
2023-01-29 01:18:22 +01:00
|
|
|
|
[JsonPropertyName("printed_count")]
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public int PrintedCardCount { get; set; }
|
|
|
|
|
|
2023-01-29 01:18:22 +01:00
|
|
|
|
[JsonPropertyName("set_code")]
|
2023-01-28 23:54:23 +01:00
|
|
|
|
public string? SetCode { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
|
|
|
|
public int Uuid { get; set; }
|
|
|
|
|
}
|