using EVCB_OCPP.Packet20.DataTypes.EnumTypes;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EVCB_OCPP.Packet20.DataTypes
{
    public class OCSPRequestDataType
    {
        /// <summary>
        /// Used algorithms for the hashes provided.
        /// </summary>
        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public HashAlgorithmEnumType HashAlgorithm { set; get; }

        /// <summary>
        /// hashed value of the IssuerName.
        /// </summary>
        [Required]
        [StringLength(128, MinimumLength = 0)]
        public string IssuerNameHash { set; get; }


        /// <summary>
        /// Hashed value of the issuers public key
        /// </summary>
        [Required]
        [StringLength(128, MinimumLength = 0)]
        public string IssuerKeyHash { set; get; }

        /// <summary>
        /// The serial number of the certificate.
        /// </summary>
        [Required]
        [StringLength(128, MinimumLength = 0)]
        public string SerialNumber { set; get; }

        /// <summary>
        /// This contains the responder URL (Case
        /// insensitive).
        /// </summary>
        [Required]
        [StringLength(512, MinimumLength = 0)]
        public string ResponderURL { set; get; }
    }
}
