using EVCB_OCPP.Packet.Features; using Newtonsoft.Json; 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.Core { public class BootNotificationRequest : IRequest { public BootNotificationRequest() { Action = Actions.BootNotification.ToString(); } [JsonIgnore] public string Action { set; get; } [MaxLength(25)] public string chargeBoxSerialNumber { set; get; } [Required] [MaxLength(20)] public string chargePointModel { set; get; } [MaxLength(25)] public string chargePointSerialNumber { set; get; } // [Required(AllowEmptyStrings=true)] [MaxLength(20)] public string chargePointVendor { set; get; } [MaxLength(50)] public string firmwareVersion { set; get; } [MaxLength(20)] public string iccid { set; get; } [MaxLength(20)] public string imsi { set; get; } [MaxLength(25)] public string meterSerialNumber { set; get; } [MaxLength(25)] public string meterType { set; get; } public bool TransactionRelated() { return false; } public bool Validate() { return Validator.TryValidateObject(this, new ValidationContext(this), null, true); } } }