/// <summary> /// Return a XML representation of this object. /// </summary> /// <param name="CustomSetEVSEBusyStatusRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param> public XElement ToXML(CustomXMLSerializerDelegate <SetEVSEBusyStatusRequest> CustomSetEVSEBusyStatusRequestSerializer = null) { var XML = new XElement(eMIPNS.EVCIDynamic + "eMIP_ToIOP_SetEVSEBusyStatusRequest", TransactionId.HasValue ? new XElement("transactionId", TransactionId.ToString()) : null, new XElement("partnerIdType", PartnerId.Format.AsText()), new XElement("partnerId", PartnerId.ToString()), new XElement("operatorIdType", OperatorId.Format.AsText()), new XElement("operatorId", OperatorId.ToString()), new XElement("EVSEIdType", EVSEId.Format.AsText()), new XElement("EVSEId", EVSEId.ToString()), new XElement("statusEventDate", StatusEventDate.ToIso8601(false).Replace("Z", "")), new XElement("busyStatus", BusyStatus.AsNumber()), BusyStatusUntil.HasValue ? new XElement("busyStatusUntil", BusyStatusUntil.Value.ToIso8601(false).Replace("Z", "")) : null, BusyStatusComment.IsNeitherNullNorEmpty() ? new XElement("busyStatusComment", BusyStatusComment) : null ); return(CustomSetEVSEBusyStatusRequestSerializer != null ? CustomSetEVSEBusyStatusRequestSerializer(this, XML) : XML); }