using Newtonsoft.Json;
using EVCB_OCPP.Packet.Utilities;
using EVCB_OCPP.Packet.Messages.SubTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EVCB_OCPP.Packet.Features;

namespace EVCB_OCPP.Packet.Messages.Core
{
    public class RemoteStartTransactionRequest : IRequest
    {

        public RemoteStartTransactionRequest()
        {
            Action = Actions.RemoteStartTransaction.ToString();
        }

        [JsonIgnore]
        public string Action { set; get; }
        /// <summary>
        /// 充電槍號(開始為1)
        /// </summary>
        public int? connectorId { set; get; }
        /// <summary>
        /// Authorization Id
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string idTag { set; get; }

        /// <summary>
        /// Charging  Profile to be used by the Charge Point for the
        /// requested transaction. ChargingProfilePurpose MUST be set to TxProfile
        /// </summary>
        public csChargingProfiles chargingProfile { set; get; }

        public bool TransactionRelated()
        {
            return false;
        }

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