/// <summary>
 /// Return the HashCode of this object.
 /// </summary>
 /// <returns>The HashCode of this object.</returns>
 public override Int32 GetHashCode()
 {
     unchecked
     {
         return(EVSE.GetHashCode() * 5 ^
                OldStatus.GetHashCode() * 3 ^
                NewStatus.GetHashCode());
     }
 }
 /// <summary>
 /// Return the HashCode of this object.
 /// </summary>
 /// <returns>The HashCode of this object.</returns>
 public override Int32 GetHashCode()
 {
     unchecked
     {
         return(Id.GetHashCode() * 7 ^
                OldStatus.GetHashCode() * 5 ^
                NewStatus.GetHashCode());
     }
 }
        /// <summary>
        /// Compares two ChargingPool status updates for equality.
        /// </summary>
        /// <param name="ChargingPoolAdminStatusUpdate">A charging pool status update to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargingPoolAdminStatusUpdate ChargingPoolAdminStatusUpdate)
        {
            if ((Object)ChargingPoolAdminStatusUpdate == null)
            {
                return(false);
            }

            return(Id.Equals(ChargingPoolAdminStatusUpdate.Id) &&
                   OldStatus.Equals(ChargingPoolAdminStatusUpdate.OldStatus) &&
                   NewStatus.Equals(ChargingPoolAdminStatusUpdate.NewStatus));
        }
        /// <summary>
        /// Compares two RoamingNetwork status updates for equality.
        /// </summary>
        /// <param name="RoamingNetworkAdminStatusUpdate">A roaming network status update to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(RoamingNetworkAdminStatusUpdate RoamingNetworkAdminStatusUpdate)
        {
            if ((Object)RoamingNetworkAdminStatusUpdate == null)
            {
                return(false);
            }

            return(Id.Equals(RoamingNetworkAdminStatusUpdate.Id) &&
                   OldStatus.Equals(RoamingNetworkAdminStatusUpdate.OldStatus) &&
                   NewStatus.Equals(RoamingNetworkAdminStatusUpdate.NewStatus));
        }
        /// <summary>
        /// Compares two EVSE status updates for equality.
        /// </summary>
        /// <param name="EVSEAdminStatusUpdate">An EVSE status update to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(EVSEAdminStatusUpdate EVSEAdminStatusUpdate)
        {
            if ((Object)EVSEAdminStatusUpdate == null)
            {
                return(false);
            }

            return(EVSE.Equals(EVSEAdminStatusUpdate.EVSE) &&
                   OldStatus.Equals(EVSEAdminStatusUpdate.OldStatus) &&
                   NewStatus.Equals(EVSEAdminStatusUpdate.NewStatus));
        }
 override protected void WriteToXmlElement(XmlElement iElement)
 {
     base.WriteToXmlElement(iElement);
     if (OldStatus != EntityType.Unknown)
     {
         iElement.SetAttribute("old", OldStatus.ToString());
     }
     if (NewStatus != EntityType.Unknown)
     {
         iElement.SetAttribute("new", NewStatus.ToString());
     }
 }
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ChargingPoolAdminStatusUpdate">An object to compare with.</param>
        public Int32 CompareTo(ChargingPoolAdminStatusUpdate ChargingPoolAdminStatusUpdate)
        {
            if ((Object)ChargingPoolAdminStatusUpdate == null)
            {
                throw new ArgumentNullException(nameof(ChargingPoolAdminStatusUpdate), "The given ChargingPool status update must not be null!");
            }

            // Compare ChargingPool Ids
            var _Result = Id.CompareTo(ChargingPoolAdminStatusUpdate.Id);

            // If equal: Compare the new charging pool status
            if (_Result == 0)
            {
                _Result = NewStatus.CompareTo(ChargingPoolAdminStatusUpdate.NewStatus);
            }

            // If equal: Compare the old ChargingPool status
            if (_Result == 0)
            {
                _Result = OldStatus.CompareTo(ChargingPoolAdminStatusUpdate.OldStatus);
            }

            return(_Result);
        }
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="RoamingNetworkAdminStatusUpdate">An object to compare with.</param>
        public Int32 CompareTo(RoamingNetworkAdminStatusUpdate RoamingNetworkAdminStatusUpdate)
        {
            if ((Object)RoamingNetworkAdminStatusUpdate == null)
            {
                throw new ArgumentNullException(nameof(RoamingNetworkAdminStatusUpdate), "The given RoamingNetwork status update must not be null!");
            }

            // Compare RoamingNetwork Ids
            var _Result = Id.CompareTo(RoamingNetworkAdminStatusUpdate.Id);

            // If equal: Compare the new roaming network status
            if (_Result == 0)
            {
                _Result = NewStatus.CompareTo(RoamingNetworkAdminStatusUpdate.NewStatus);
            }

            // If equal: Compare the old RoamingNetwork status
            if (_Result == 0)
            {
                _Result = OldStatus.CompareTo(RoamingNetworkAdminStatusUpdate.OldStatus);
            }

            return(_Result);
        }
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEAdminStatusUpdate">An object to compare with.</param>
        public Int32 CompareTo(EVSEAdminStatusUpdate EVSEAdminStatusUpdate)
        {
            if ((Object)EVSEAdminStatusUpdate == null)
            {
                throw new ArgumentNullException(nameof(EVSEAdminStatusUpdate), "The given EVSE status update must not be null!");
            }

            // Compare EVSE Ids
            var _Result = EVSE.CompareTo(EVSEAdminStatusUpdate.EVSE);

            // If equal: Compare the new EVSE status
            if (_Result == 0)
            {
                _Result = NewStatus.CompareTo(EVSEAdminStatusUpdate.NewStatus);
            }

            // If equal: Compare the old EVSE status
            if (_Result == 0)
            {
                _Result = OldStatus.CompareTo(EVSEAdminStatusUpdate.OldStatus);
            }

            return(_Result);
        }