/// <summary> /// Create a SetEVSEAvailabilityStatus XML/SOAP request. /// </summary> /// <param name="PartnerId">The partner identification.</param> /// <param name="OperatorId">The operator identification.</param> /// <param name="EVSEId">The EVSE identification.</param> /// <param name="StatusEventDate">The timestamp of the status change.</param> /// <param name="AvailabilityStatus">The EVSE availability status.</param> /// <param name="TransactionId">An optional transaction identification.</param> /// <param name="AvailabilityStatusUntil">An optional timestamp until which the given availability status is valid.</param> /// <param name="AvailabilityStatusComment">An optional comment about the availability status.</param> /// /// <param name="HTTPRequest">The correlated HTTP request of this eMIP request.</param> /// <param name="Timestamp">The optional timestamp of the request.</param> /// <param name="CancellationToken">An optional token to cancel this request.</param> /// <param name="EventTrackingId">An optional event tracking identification for correlating this request with other events.</param> /// <param name="RequestTimeout">An optional timeout for this request.</param> public SetEVSEAvailabilityStatusRequest(Partner_Id PartnerId, Operator_Id OperatorId, EVSE_Id EVSEId, DateTime StatusEventDate, EVSEAvailabilityStatusTypes AvailabilityStatus, Transaction_Id?TransactionId = null, DateTime?AvailabilityStatusUntil = null, String AvailabilityStatusComment = null, HTTPRequest HTTPRequest = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) : base(HTTPRequest, PartnerId, TransactionId, Timestamp, CancellationToken, EventTrackingId, RequestTimeout) { this.OperatorId = OperatorId; this.EVSEId = EVSEId; this.StatusEventDate = StatusEventDate; this.AvailabilityStatus = AvailabilityStatus; this.AvailabilityStatusUntil = AvailabilityStatusUntil; this.AvailabilityStatusComment = AvailabilityStatusComment?.Trim(); }
SetEVSEAvailabilityStatus(this ICPOClient CPOClient, Partner_Id PartnerId, Operator_Id OperatorId, EVSE_Id EVSEId, DateTime StatusEventDate, EVSEAvailabilityStatusTypes AvailabilityStatus, Transaction_Id?TransactionId = null, DateTime?AvailabilityStatusUntil = null, String AvailabilityStatusComment = null, HTTPRequest HTTPRequest = null, DateTime?Timestamp = null, CancellationToken?CancellationToken = null, EventTracking_Id EventTrackingId = null, TimeSpan?RequestTimeout = null) => CPOClient.SetEVSEAvailabilityStatus(new SetEVSEAvailabilityStatusRequest(PartnerId, OperatorId, EVSEId, StatusEventDate, AvailabilityStatus, TransactionId, AvailabilityStatusUntil, AvailabilityStatusComment, HTTPRequest, Timestamp, CancellationToken, EventTrackingId, RequestTimeout ?? CPOClient.RequestTimeout));
/// <summary> /// Create a new EVSE availability status. /// </summary> /// <param name="EVSEId">The EVSE identification.</param> /// <param name="StatusEventDate">The timestamp of the status change.</param> /// <param name="AvailabilityStatus">The EVSE availability status.</param> /// <param name="AvailabilityStatusUntil">An optional timestamp until which the given availability status is valid.</param> /// <param name="AvailabilityStatusComment">An optional comment about the availability status.</param> public EVSEAvailabilityStatus(EVSE_Id EVSEId, DateTime StatusEventDate, EVSEAvailabilityStatusTypes AvailabilityStatus, DateTime?AvailabilityStatusUntil = null, String AvailabilityStatusComment = null) { this.EVSEId = EVSEId; this.StatusEventDate = StatusEventDate; this.AvailabilityStatus = AvailabilityStatus; this.AvailabilityStatusUntil = AvailabilityStatusUntil; this.AvailabilityStatusComment = AvailabilityStatusComment?.Trim(); }
/// <summary> /// Return a text representation of the given EVSE availability status. /// </summary> /// <param name="AvailabilityStatus">An EVSE availability status.</param> public static String AsText(this EVSEAvailabilityStatusTypes AvailabilityStatus) { switch (AvailabilityStatus) { case EVSEAvailabilityStatusTypes.OutOfOrder: return("out-of-order"); case EVSEAvailabilityStatusTypes.InService: return("in-service"); case EVSEAvailabilityStatusTypes.Future: return("future"); case EVSEAvailabilityStatusTypes.Deleted: return("deleted"); default: return("unspecified"); } }
/// <summary> /// Return a numeric representation of the given EVSE availability status. /// </summary> /// <param name="AvailabilityStatus">An EVSE availability status.</param> public static Byte AsNumber(this EVSEAvailabilityStatusTypes AvailabilityStatus) { switch (AvailabilityStatus) { case EVSEAvailabilityStatusTypes.OutOfOrder: return(1); case EVSEAvailabilityStatusTypes.InService: return(2); case EVSEAvailabilityStatusTypes.Future: return(3); case EVSEAvailabilityStatusTypes.Deleted: return(4); default: return(0); } }