using EVCB_OCPP.Packet.Messages.SubTypes;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

using System.ComponentModel.DataAnnotations;

namespace EVCB_OCPP.Packet.Messages.LocalAuthListManagement
{
    public class SendLocalListConfirmation : IConfirmation
    {
        private IRequest _request = null;

        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public UpdateStatus status { set; get; }

        public IRequest GetRequest()
        {
            return _request;
        }

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

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