GetCompositeScheduleConfirmation.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using EVCB_OCPP.Packet.Messages.SubTypes;
  2. using EVCB_OCPP.Packet.Utilities;
  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 GetCompositeScheduleConfirmation : IConfirmation
  14. {
  15. private IRequest _request = null;
  16. [Required]
  17. [JsonConverter(typeof(StringEnumConverter))]
  18. public GetCompositeScheduleStatus status { set; get; }
  19. public int? connectorId { set; get; }
  20. [JsonConverter(typeof(UTCDateTimeConverter))]
  21. public DateTime? scheduleStart { set; get; }
  22. public ChargingSchedule chargingSchedule { set; get; }
  23. public IRequest GetRequest()
  24. {
  25. return _request;
  26. }
  27. public void SetRequest(IRequest request)
  28. {
  29. _request = request;
  30. }
  31. public bool Validate()
  32. {
  33. return Validator.TryValidateObject(this, new ValidationContext(this), null, true);
  34. }
  35. }
  36. }