DeleteCertificateRequest.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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.Security
  12. {
  13. public class DeleteCertificateRequest:IRequest
  14. {
  15. public DeleteCertificateRequest()
  16. {
  17. Action = Actions.DeleteCertificate.ToString();
  18. }
  19. /// <summary>
  20. /// Required. Indicates the certificate of which deletion is requested
  21. /// </summary>
  22. [Required]
  23. public CertificateHashDataType certificateHashData { set; get; }
  24. [JsonIgnore]
  25. public string Action { set; get; }
  26. public bool TransactionRelated()
  27. {
  28. return false;
  29. }
  30. public bool Validate()
  31. {
  32. return Validator.TryValidateObject(this, new ValidationContext(this), null, true);
  33. }
  34. }
  35. }