Ejemplo n.º 1
0
        /// <summary>
        /// Compares two authorize start requests for equality.
        /// </summary>
        /// <param name="AuthorizeStart">An authorize start request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(AuthorizeStartRequest AuthorizeStart)
        {
            if (AuthorizeStart is null)
            {
                return(false);
            }

            return(OperatorId.Equals(AuthorizeStart.OperatorId) &&
                   Identification.Equals(AuthorizeStart.Identification) &&

                   ((!EVSEId.HasValue && !AuthorizeStart.EVSEId.HasValue) ||
                    (EVSEId.HasValue && AuthorizeStart.EVSEId.HasValue && EVSEId.Value.Equals(AuthorizeStart.EVSEId.Value))) &&

                   ((!PartnerProductId.HasValue && !AuthorizeStart.PartnerProductId.HasValue) ||
                    (PartnerProductId.HasValue && AuthorizeStart.PartnerProductId.HasValue && PartnerProductId.Value.Equals(AuthorizeStart.PartnerProductId.Value))) &&

                   ((!SessionId.HasValue && !AuthorizeStart.SessionId.HasValue) ||
                    (SessionId.HasValue && AuthorizeStart.SessionId.HasValue && SessionId.Value.Equals(AuthorizeStart.SessionId.Value))) &&

                   ((!CPOPartnerSessionId.HasValue && !AuthorizeStart.CPOPartnerSessionId.HasValue) ||
                    (CPOPartnerSessionId.HasValue && AuthorizeStart.CPOPartnerSessionId.HasValue && CPOPartnerSessionId.Value.Equals(AuthorizeStart.CPOPartnerSessionId.Value))) &&

                   ((!EMPPartnerSessionId.HasValue && !AuthorizeStart.EMPPartnerSessionId.HasValue) ||
                    (EMPPartnerSessionId.HasValue && AuthorizeStart.EMPPartnerSessionId.HasValue && EMPPartnerSessionId.Value.Equals(AuthorizeStart.EMPPartnerSessionId.Value))));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Compares two EVSEOperator_Ids for equality.
        /// </summary>
        /// <param name="EVSEOperatorId">A EVSEOperator_Id to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ParkingOperator_Id EVSEOperatorId)
        {
            if ((Object)EVSEOperatorId == null)
            {
                return(false);
            }

            return(CountryCode.Equals(EVSEOperatorId.CountryCode) &&
                   OperatorId.Equals(EVSEOperatorId.OperatorId));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Compares two EVSE identifications for equality.
        /// </summary>
        /// <param name="EVSEId">An EVSE identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(EVSE_Id EVSEId)
        {
            if ((Object)EVSEId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(EVSEId.OperatorId) &&
                   MinSuffix.ToLower().Equals(EVSEId.MinSuffix.ToLower()));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Compares two EVSE identifications for equality.
        /// </summary>
        /// <param name="EVSEGroupId">An EVSE group identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(EVSEGroup_Id EVSEGroupId)
        {
            if ((Object)EVSEGroupId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(EVSEGroupId.OperatorId) &&
                   Suffix.Equals(EVSEGroupId.Suffix));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Compares two charging station identifications for equality.
        /// </summary>
        /// <param name="ChargingStationId">A charging station identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargingStation_Id ChargingStationId)
        {
            if ((Object)ChargingStationId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(ChargingStationId.OperatorId) &&
                   Suffix.Equals(ChargingStationId.Suffix));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Compares two parking reservation identifications for equality.
        /// </summary>
        /// <param name="ReservationId">An parking reservation identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ParkingReservation_Id ReservationId)
        {
            if ((Object)ReservationId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(ReservationId.OperatorId) &&
                   Suffix.Equals(ReservationId.Suffix));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Compares two charging connector identifications for equality.
        /// </summary>
        /// <param name="ChargingConnectorId">A charging connector identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargingConnector_Id ChargingConnectorId)
        {
            if ((Object)ChargingConnectorId == null)
            {
                return(false);
            }

            return(OperatorId.Equals(ChargingConnectorId.OperatorId) &&
                   MinSuffix.ToLower().Equals(ChargingConnectorId.MinSuffix.ToLower()));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetChargeDetailRecordRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetChargeDetailRecordRequest SetChargeDetailRecordRequest)
        {
            if ((Object)SetChargeDetailRecordRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetChargeDetailRecordRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetChargeDetailRecordRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetChargeDetailRecordRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetChargeDetailRecordRequest.PartnerId) &&
                   OperatorId.Equals(SetChargeDetailRecordRequest.OperatorId) &&
                   ChargeDetailRecord.Equals(SetChargeDetailRecordRequest.ChargeDetailRecord));
        }
        /// <summary>
        /// Compares two operator EVSE statuss for equality.
        /// </summary>
        /// <param name="OperatorEVSEStatus">A operator EVSE status to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(OperatorEVSEStatus OperatorEVSEStatus)
        {
            if ((Object)OperatorEVSEStatus == null)
            {
                return(false);
            }

            return(OperatorId.Equals(OperatorEVSEStatus.OperatorId) &&

                   ((OperatorName == null && OperatorEVSEStatus.OperatorName == null) ||
                    (OperatorName != null && OperatorEVSEStatus.OperatorName != null && OperatorName.Equals(OperatorEVSEStatus.OperatorName))) &&

                   ((!EVSEStatusRecords.Any() && !OperatorEVSEStatus.EVSEStatusRecords.Any()) ||
                    (EVSEStatusRecords.Any() && OperatorEVSEStatus.EVSEStatusRecords.Any() && EVSEStatusRecords.Count().Equals(OperatorEVSEStatus.EVSEStatusRecords.Count()))));
        }
        /// <summary>
        /// Compares two push EVSE status requests for equality.
        /// </summary>
        /// <param name="PushEVSEStatus">An push EVSE status request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(PushEVSEStatusRequest PushEVSEStatus)
        {
            if ((Object)PushEVSEStatus == null)
            {
                return(false);
            }

            return(EVSEStatusRecords.Count().Equals(PushEVSEStatus.EVSEStatusRecords.Count()) &&
                   OperatorId.Equals(PushEVSEStatus.OperatorId) &&

                   ((OperatorName == null && PushEVSEStatus.OperatorName == null) ||
                    (OperatorName != null && PushEVSEStatus.OperatorName != null && OperatorName.Equals(PushEVSEStatus.OperatorName))) &&

                   Action.Equals(PushEVSEStatus.Action));
        }
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetSessionEventReportRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetSessionEventReportRequest SetSessionEventReportRequest)
        {
            if (SetSessionEventReportRequest is null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetSessionEventReportRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetSessionEventReportRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetSessionEventReportRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetSessionEventReportRequest.PartnerId) &&
                   OperatorId.Equals(SetSessionEventReportRequest.OperatorId) &&
                   ServiceSessionId.Equals(SetSessionEventReportRequest.ServiceSessionId) &&
                   SessionEvent.Equals(SetSessionEventReportRequest.SessionEvent) &&

                   ((!ExecPartnerSessionId.HasValue && !SetSessionEventReportRequest.ExecPartnerSessionId.HasValue) ||
                    (ExecPartnerSessionId.HasValue && SetSessionEventReportRequest.ExecPartnerSessionId.HasValue && ExecPartnerSessionId.Equals(SetSessionEventReportRequest.ExecPartnerSessionId))));
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetSessionActionRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetSessionActionRequest SetSessionActionRequest)
        {
            if (SetSessionActionRequest is null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetSessionActionRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetSessionActionRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetSessionActionRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetSessionActionRequest.PartnerId) &&
                   OperatorId.Equals(SetSessionActionRequest.OperatorId) &&
                   ServiceSessionId.Equals(SetSessionActionRequest.ServiceSessionId) &&
                   SessionAction.Equals(SetSessionActionRequest.SessionAction) &&

                   ((!SalePartnerSessionId.HasValue && !SetSessionActionRequest.SalePartnerSessionId.HasValue) ||
                    (SalePartnerSessionId.HasValue && SetSessionActionRequest.SalePartnerSessionId.HasValue && SalePartnerSessionId.Equals(SetSessionActionRequest.SalePartnerSessionId))));
        }
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetServiceAuthorisationRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetServiceAuthorisationRequest SetServiceAuthorisationRequest)
        {

            if ((Object) SetServiceAuthorisationRequest == null)
                return false;

            return ((!TransactionId.HasValue && !SetServiceAuthorisationRequest.TransactionId.HasValue) ||
                     (TransactionId.HasValue && SetServiceAuthorisationRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetServiceAuthorisationRequest.TransactionId.Value))) &&

                   PartnerId.         Equals(SetServiceAuthorisationRequest.PartnerId)          &&
                   OperatorId.        Equals(SetServiceAuthorisationRequest.OperatorId)         &&
                   EVSEId.            Equals(SetServiceAuthorisationRequest.EVSEId)             &&
                   UserId.            Equals(SetServiceAuthorisationRequest.UserId)             &&
                   RequestedServiceId.Equals(SetServiceAuthorisationRequest.RequestedServiceId);

                   //((!PartnerServiceSessionId.HasValue && !SetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue) ||
                   //  (PartnerServiceSessionId.HasValue &&  SetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue && PartnerServiceSessionId.Value.Equals(SetServiceAuthorisationRequest.PartnerServiceSessionId.Value)));

        }
Ejemplo n.º 14
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="GetServiceAuthorisationRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(GetServiceAuthorisationRequest GetServiceAuthorisationRequest)
        {
            if ((Object)GetServiceAuthorisationRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !GetServiceAuthorisationRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && GetServiceAuthorisationRequest.TransactionId.HasValue && TransactionId.Value.Equals(GetServiceAuthorisationRequest.TransactionId.Value))) &&

                   PartnerId.Equals(GetServiceAuthorisationRequest.PartnerId) &&
                   OperatorId.Equals(GetServiceAuthorisationRequest.OperatorId) &&
                   EVSEId.Equals(GetServiceAuthorisationRequest.EVSEId) &&
                   UserId.Equals(GetServiceAuthorisationRequest.UserId) &&
                   RequestedServiceId.Equals(GetServiceAuthorisationRequest.RequestedServiceId) &&

                   ((!PartnerServiceSessionId.HasValue && !GetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue) ||
                    (PartnerServiceSessionId.HasValue && GetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue && PartnerServiceSessionId.Value.Equals(GetServiceAuthorisationRequest.PartnerServiceSessionId.Value))));
        }
        /// <summary>
        /// Compares two authorize stop requests for equality.
        /// </summary>
        /// <param name="AuthorizeStop">An authorize stop request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(AuthorizeStopRequest AuthorizeStop)
        {
            if (AuthorizeStop is null)
            {
                return(false);
            }

            return(OperatorId.Equals(AuthorizeStop.OperatorId) &&
                   SessionId.Equals(AuthorizeStop.SessionId) &&
                   Identification.Equals(AuthorizeStop.Identification) &&

                   ((!EVSEId.HasValue && !AuthorizeStop.EVSEId.HasValue) ||
                    (EVSEId.HasValue && AuthorizeStop.EVSEId.HasValue && EVSEId.Value.Equals(AuthorizeStop.EVSEId.Value))) &&

                   ((!CPOPartnerSessionId.HasValue && !AuthorizeStop.CPOPartnerSessionId.HasValue) ||
                    (CPOPartnerSessionId.HasValue && AuthorizeStop.CPOPartnerSessionId.HasValue && CPOPartnerSessionId.Value.Equals(AuthorizeStop.CPOPartnerSessionId.Value))) &&

                   ((!EMPPartnerSessionId.HasValue && !AuthorizeStop.EMPPartnerSessionId.HasValue) ||
                    (EMPPartnerSessionId.HasValue && AuthorizeStop.EMPPartnerSessionId.HasValue && EMPPartnerSessionId.Value.Equals(AuthorizeStop.EMPPartnerSessionId.Value))));
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="GetServiceAuthorisationRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(GetServiceAuthorisationRequest GetServiceAuthorisationRequest)
        {
            if (GetServiceAuthorisationRequest is null)
            {
                return(false);
            }

            return(TransactionId.Equals(GetServiceAuthorisationRequest.TransactionId) &&
                   PartnerId.Equals(GetServiceAuthorisationRequest.PartnerId) &&
                   OperatorId.Equals(GetServiceAuthorisationRequest.OperatorId) &&
                   TargetOperatorId.Equals(GetServiceAuthorisationRequest.TargetOperatorId) &&
                   EVSEId.Equals(GetServiceAuthorisationRequest.EVSEId) &&
                   UserId.Equals(GetServiceAuthorisationRequest.UserId) &&
                   RequestedServiceId.Equals(GetServiceAuthorisationRequest.RequestedServiceId) &&

                   ((!ServiceSessionId.HasValue && !GetServiceAuthorisationRequest.ServiceSessionId.HasValue) ||
                    (ServiceSessionId.HasValue && GetServiceAuthorisationRequest.ServiceSessionId.HasValue && ServiceSessionId.Value.Equals(GetServiceAuthorisationRequest.ServiceSessionId.Value))) &&

                   ((!BookingId.HasValue && !GetServiceAuthorisationRequest.BookingId.HasValue) ||
                    (BookingId.HasValue && GetServiceAuthorisationRequest.BookingId.HasValue && BookingId.Value.Equals(GetServiceAuthorisationRequest.BookingId.Value))));
        }
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetChargingStationAvailabilityStatusRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetChargingStationAvailabilityStatusRequest SetChargingStationAvailabilityStatusRequest)
        {
            if ((Object)SetChargingStationAvailabilityStatusRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetChargingStationAvailabilityStatusRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetChargingStationAvailabilityStatusRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetChargingStationAvailabilityStatusRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetChargingStationAvailabilityStatusRequest.PartnerId) &&
                   OperatorId.Equals(SetChargingStationAvailabilityStatusRequest.OperatorId) &&
                   ChargingStationId.Equals(SetChargingStationAvailabilityStatusRequest.ChargingStationId) &&
                   StatusEventDate.Equals(SetChargingStationAvailabilityStatusRequest.StatusEventDate) &&
                   AvailabilityStatus.Equals(SetChargingStationAvailabilityStatusRequest.AvailabilityStatus) &&

                   ((!AvailabilityStatusUntil.HasValue && !SetChargingStationAvailabilityStatusRequest.AvailabilityStatusUntil.HasValue) ||
                    (AvailabilityStatusUntil.HasValue && SetChargingStationAvailabilityStatusRequest.AvailabilityStatusUntil.HasValue && AvailabilityStatusUntil.Value.Equals(SetChargingStationAvailabilityStatusRequest.AvailabilityStatusUntil.Value))) &&

                   ((!AvailabilityStatusComment.IsNeitherNullNorEmpty() && !SetChargingStationAvailabilityStatusRequest.AvailabilityStatusComment.IsNeitherNullNorEmpty()) ||
                    (AvailabilityStatusComment.IsNeitherNullNorEmpty() && SetChargingStationAvailabilityStatusRequest.AvailabilityStatusComment.IsNeitherNullNorEmpty() && AvailabilityStatusComment.Equals(SetChargingStationAvailabilityStatusRequest.AvailabilityStatusComment))));
        }
        /// <summary>
        /// Compares two SetEVSEBusyStatus requests for equality.
        /// </summary>
        /// <param name="SetEVSEBusyStatusRequest">A SetEVSEBusyStatus request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetEVSEBusyStatusRequest SetEVSEBusyStatusRequest)
        {
            if ((Object)SetEVSEBusyStatusRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetEVSEBusyStatusRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetEVSEBusyStatusRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetEVSEBusyStatusRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetEVSEBusyStatusRequest.PartnerId) &&
                   OperatorId.Equals(SetEVSEBusyStatusRequest.OperatorId) &&
                   EVSEId.Equals(SetEVSEBusyStatusRequest.EVSEId) &&
                   StatusEventDate.Equals(SetEVSEBusyStatusRequest.StatusEventDate) &&
                   BusyStatus.Equals(SetEVSEBusyStatusRequest.BusyStatus) &&

                   ((!BusyStatusUntil.HasValue && !SetEVSEBusyStatusRequest.BusyStatusUntil.HasValue) ||
                    (BusyStatusUntil.HasValue && SetEVSEBusyStatusRequest.BusyStatusUntil.HasValue && BusyStatusUntil.Value.Equals(SetEVSEBusyStatusRequest.BusyStatusUntil.Value))) &&

                   ((!BusyStatusComment.IsNeitherNullNorEmpty() && !SetEVSEBusyStatusRequest.BusyStatusComment.IsNeitherNullNorEmpty()) ||
                    (BusyStatusComment.IsNeitherNullNorEmpty() && SetEVSEBusyStatusRequest.BusyStatusComment.IsNeitherNullNorEmpty() && BusyStatusComment.Equals(SetEVSEBusyStatusRequest.BusyStatusComment))));
        }