ClearChargingProfileRequest.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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.SmartCharging
  12. {
  13. public class ClearChargingProfileRequest : IRequest
  14. {
  15. public ClearChargingProfileRequest()
  16. {
  17. Action = Actions.ClearChargingProfile.ToString();
  18. }
  19. [JsonIgnore]
  20. public string Action { set; get; }
  21. public int? id { set; get; }
  22. public int? connectorId { set; get; }
  23. [JsonConverter(typeof(StringEnumConverter))]
  24. public ChargingProfilePurposeType? chargingProfilePurpose { set; get; }
  25. public int? stackLevel { 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. }