InstallCertificateRequest.cs 876 B

12345678910111213141516171819202122232425262728293031
  1. using EVCB_OCPP.Packet20.DataTypes.EnumTypes;
  2. using Newtonsoft.Json;
  3. using Newtonsoft.Json.Converters;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.ComponentModel.DataAnnotations;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace EVCB_OCPP.Packet20.Messages
  11. {
  12. public class InstallCertificateRequest
  13. {
  14. /// <summary>
  15. /// Indicates the certificate type that is sent.
  16. /// </summary>
  17. [Required]
  18. [JsonConverter(typeof(StringEnumConverter))]
  19. public InstallCertificateUseEnumType CertificateType { set; get; }
  20. /// <summary>
  21. /// A X.509 certificate, first DER encoded into
  22. /// binary, and then Base64 encoded
  23. /// </summary>
  24. [Required]
  25. [StringLength(5500, MinimumLength = 0)]
  26. public string Certificate { set; get; }
  27. }
  28. }