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.Messages
{
    public class GetCertificateStatusResponse
    {
        /// <summary>
        /// This indicates whether the charging station
        ///was able to retrieve the OCSP certificate status
        /// </summary>
        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public GetCertificateStatusEnumType Status { set; get; }

        /// <summary>
        /// OCSPResponse class as defined in IETF RFC
        ///6960. DER encoded(as defined in IETF RFC 6960), and
        ///then base64 encoded.MAY only be omitted when status
        ///is not Accepted.
        /// </summary>
        [StringLength(5500, MinimumLength = 0)]
        public string OcspResult { set; get; }
    }
}
