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

namespace FModel.Methods.BackupPAKs.Parser.AccessCodeParser
{
    using System.Globalization;
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;

    public partial class AccessCodeParser
    {
        [JsonProperty("expiresInSeconds")]
        public long ExpiresInSeconds { get; set; }

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

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

    public partial class AccessCodeParser
    {
        public static AccessCodeParser FromJson(string json) => JsonConvert.DeserializeObject<AccessCodeParser>(json, FModel.Methods.BackupPAKs.Parser.AccessCodeParser.Converter.Settings);
    }

    public static class Serialize
    {
        public static string ToJson(this AccessCodeParser self) => JsonConvert.SerializeObject(self, FModel.Methods.BackupPAKs.Parser.AccessCodeParser.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 }
            },
        };
    }
}
