SendLocalListRequest.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using EVCB_OCPP.Packet.Features;
  2. using EVCB_OCPP.Packet.Messages.SubTypes;
  3. using Newtonsoft.Json;
  4. using Newtonsoft.Json.Converters;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.ComponentModel.DataAnnotations;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace EVCB_OCPP.Packet.Messages.LocalAuthListManagement
  12. {
  13. public class SendLocalListRequest : IRequest
  14. {
  15. public SendLocalListRequest()
  16. {
  17. Action = Actions.SendLocalList.ToString();
  18. }
  19. [JsonIgnore]
  20. public string Action { set; get; }
  21. [Required]
  22. public int listVersion { set; get; }
  23. public List<AuthorizationData> localAuthorizationList { set; get; }
  24. [Required]
  25. [JsonConverter(typeof(StringEnumConverter))]
  26. public UpdateType updateType { set; get; }
  27. public bool TransactionRelated()
  28. {
  29. return false;
  30. }
  31. public bool Validate()
  32. {
  33. return Validator.TryValidateObject(this, new ValidationContext(this), null, true);
  34. }
  35. }
  36. }