// <auto-generated />
//
// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
//
//    using FModel.Parser.Banners;
//
//    var bannersParser = BannersParser.FromJson(jsonString);

using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace FModel.Parser.Banners
{
    public partial class BannersParser
    {
        [JsonProperty("export_type")]
        public string ExportType { get; set; }

        [JsonProperty("SmallImage")]
        public Image SmallImage { get; set; }

        [JsonProperty("LargeImage")]
        public Image LargeImage { get; set; }

        [JsonProperty("CategoryRowName")]
        public string CategoryRowName { get; set; }

        [JsonProperty("DisplayName")]
        public FTextInfos DisplayName { get; set; }

        [JsonProperty("DisplayDescription")]
        public FTextInfos DisplayDescription { get; set; }

        [JsonProperty("bFullUsageRights")]
        public bool BFullUsageRights { get; set; }
    }

    public partial class FTextInfos
    {
        [JsonProperty("key")]
        public string Key { get; set; }

        [JsonProperty("source_string")]
        public string SourceString { get; set; }
    }

    public class Image
    {
        [JsonProperty("asset_path_name")]
        public string AssetPathName { get; set; }

        [JsonProperty("sub_path_string")]
        public string SubPathString { get; set; }
    }

    public partial class BannersParser
    {
        public static BannersParser FromJson(string json) => JsonConvert.DeserializeObject<BannersParser>(json, Converter.Settings);
    }

    public static class Serialize
    {
        public static string ToJson(this BannersParser self) => JsonConvert.SerializeObject(self, Converter.Settings);
    }

    internal static class Converter
    {
        public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
        {
            MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
            DateParseHandling = DateParseHandling.None,
            Converters =
            {
                new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
            }
        };
    }
}
