/// <summary> /// Return a XML representation of this object. /// </summary> /// <param name="CustomSetSessionActionRequestSerializer">A delegate to serialize custom set EVSE busy status request XML elements.</param> public XElement ToXML(CustomXMLSerializerDelegate <SetSessionActionRequestRequest> CustomSetSessionActionRequestSerializer = null) { var XML = new XElement(eMIPNS.Authorisation + "eMIP_FromIOP_SetSessionActionRequest", 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("targetOperatorIdType", TargetOperatorId.Format.AsText()), new XElement("targetOperatorId", TargetOperatorId.ToString()), new XElement("serviceSessionId", ServiceSessionId.ToString()), ExecPartnerSessionId.HasValue ? new XElement("execPartnerSessionId", ExecPartnerSessionId.ToString()) : null, SessionAction.ToXML() ); return(CustomSetSessionActionRequestSerializer != null ? CustomSetSessionActionRequestSerializer(this, XML) : XML); }