using EVCB_OCPP.Packet.Messages.SubTypes;
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.Packet.Messages.Security
{
    public class GetInstalledCertificateIdsConfirmation:IConfirmation
    {
        /// <summary>
        /// Charge Point indicates if it can process the request
        /// </summary>
        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public GetInstalledCertificateStatusEnumType status { set; get; }

        /// <summary>
        /// The Charge Point includes the Certificate information for each
        ///available certificate.
        /// </summary>
        public List<CertificateHashDataType> certificateHashData { set; get; }

        private IRequest _request = null;
        public IRequest GetRequest()
        {
            return _request;
        }

        public void SetRequest(IRequest request)
        {
            _request = request;
        }

        public bool Validate()
        {
            return Validator.TryValidateObject(this, new ValidationContext(this), null, true);
        }
    }
}
