#nullable disable using Newtonsoft.Json; using Newtonsoft.Json.Serialization; namespace West.TelegramBot.ChatQuotes.Model; [JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] public class QuoteResponse { public bool Ok { get; set; } public Result Result { get; set; } public static QuoteResponse FromJson(string json) => JsonConvert.DeserializeObject(json, ChatQuotes.SerializerSettings); } [JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] public class Result { public string Image { get; set; } public QuoteType Type { get; set; } public long Width { get; set; } public long Height { get; set; } } public enum QuoteType { Quote = 0, Image, Null }