SetChargingProfileRequest.cs 1011 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using EVCB_OCPP.Packet.Features;
  2. using EVCB_OCPP.Packet.Messages.SubTypes;
  3. using Newtonsoft.Json;
  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.Packet.Messages.SmartCharging
  11. {
  12. public class SetChargingProfileRequest : IRequest
  13. {
  14. public SetChargingProfileRequest()
  15. {
  16. Action = Actions.SetChargingProfile.ToString();
  17. }
  18. [JsonIgnore]
  19. public string Action { set; get; }
  20. [Required]
  21. public int connectorId { set; get; }
  22. [Required]
  23. public csChargingProfiles csChargingProfiles { set; get; }
  24. //public int stackLevel { set; get; }
  25. public bool TransactionRelated()
  26. {
  27. return false;
  28. }
  29. public bool Validate()
  30. {
  31. return Validator.TryValidateObject(this, new ValidationContext(this), null, true);
  32. }
  33. }
  34. }