using EVCB_OCPP.Packet20.DataTypes;
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 ReportChargingProfilesRequest
    {
        /// <summary>
        /// Id used to match the
        /// GetChargingProfilesRequest message with the resulting
        ///ReportChargingProfilesRequest messages.When the
        ///CSMS provided a requestId in the
        ///GetChargingProfilesRequest, this field SHALL contain the
        ///same value.
        /// </summary>
        public int? RequestId { set; get; }

        /// <summary>
        /// Source that has installed this charging profile
        /// </summary>
        [Required]
        [JsonConverter(typeof(StringEnumConverter))]
        public ChargingLimitSourceEnumType ChargingLimitSource { set; get; }

        /// <summary>
        /// To Be Continued. Default value when omitted:
        ///false. false indicates that there are no further messages
        ///as part of this report.
        /// </summary>
        public bool? Tbc { set; get; }

        /// <summary>
        /// The evse to which the charging profile applies.
        /// If evseId = 0, the message contains an overall limit for the
        /// Charging Station.
        /// </summary>
        [Required]
        public int EvseId { set; get; }

        /// <summary>
        /// The charging profile as configured in the
        /// Charging Station.
        /// </summary>
        [Required]
        public List<ChargingProfileType> ChargingProfile { set; get; }
    }
}