using EVCB_OCPP.Packet20.DataTypes.EnumTypes;
using EVCB_OCPP.Packet20.Utilites;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EVCB_OCPP.Packet20.Messages
{
public class StatusNotificationRequest:IRequest
{
///
/// The time for which the status is reported. If
///absent time of receipt of the message will be assumed.
///
[Required]
[JsonConverter(typeof(UTCDateTimeConverter))]
public DateTime Timestamp { set; get; }
///
/// This contains the current status of the
/// Connector.
///
[Required]
[JsonConverter(typeof(StringEnumConverter))]
public ConnectorStatusEnumType ConnectorStatus { set; get; }
///
/// The id of the EVSE to which the connector
/// belongs for which the the status is reported.
///
[Required]
public int EvseId { set; get; }
///
/// The id of the connector within the EVSE for
/// which the status is reported.
///
[Required]
public int ConnectorId { set; get; }
public string Action { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public bool TransactionRelated()
{
return false;
}
public bool Validate()
{
return Validator.TryValidateObject(this, new ValidationContext(this), null, true);
}
}
}