using EVCB_OCPP.Packet.Messages.SubTypes;
using EVCB_OCPP.Packet.Utilities;
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.SmartCharging
{
    public class GetCompositeScheduleConfirmation : IConfirmation
    {
        private IRequest _request = null;

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

        public int? connectorId { set; get; }


        [JsonConverter(typeof(UTCDateTimeConverter))]
        public DateTime? scheduleStart { set; get; }

        public ChargingSchedule chargingSchedule { 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);
        }
    }
}