/// <summary>
        /// Compares two charge detail recordes for equality.
        /// </summary>
        /// <param name="ChargeDetailRecord">An charge detail record to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargeDetailRecord ChargeDetailRecord)
        {
            if ((Object)ChargeDetailRecord == null)
            {
                return(false);
            }

            return(CDRNature.Equals(ChargeDetailRecord.CDRNature) &&
                   ServiceSessionId.Equals(ChargeDetailRecord.ServiceSessionId) &&
                   RequestedServiceId.Equals(ChargeDetailRecord.RequestedServiceId) &&
                   EVSEId.Equals(ChargeDetailRecord.EVSEId) &&
                   UserContractIdAlias.Equals(ChargeDetailRecord.UserContractIdAlias) &&
                   UserId.Equals(ChargeDetailRecord.UserId) &&
                   StartTime.Equals(ChargeDetailRecord.StartTime) &&
                   EndTime.Equals(ChargeDetailRecord.EndTime) &&
                   MeterReports.Equals(ChargeDetailRecord.MeterReports) &&

                   ((!ExecPartnerSessionId.HasValue && !ChargeDetailRecord.ExecPartnerSessionId.HasValue) ||
                    (ExecPartnerSessionId.HasValue && ChargeDetailRecord.ExecPartnerSessionId.HasValue && ExecPartnerSessionId.Value.Equals(ChargeDetailRecord.ExecPartnerSessionId.Value))) &&

                   ((!ExecPartnerOperatorId.HasValue && !ChargeDetailRecord.ExecPartnerOperatorId.HasValue) ||
                    (ExecPartnerOperatorId.HasValue && ChargeDetailRecord.ExecPartnerOperatorId.HasValue && ExecPartnerOperatorId.Value.Equals(ChargeDetailRecord.ExecPartnerOperatorId.Value))) &&

                   ((!SalesPartnerSessionId.HasValue && !ChargeDetailRecord.SalesPartnerSessionId.HasValue) ||
                    (SalesPartnerSessionId.HasValue && ChargeDetailRecord.SalesPartnerSessionId.HasValue && SalesPartnerSessionId.Value.Equals(ChargeDetailRecord.SalesPartnerSessionId.Value))) &&

                   ((!SalesPartnerOperatorId.HasValue && !ChargeDetailRecord.SalesPartnerOperatorId.HasValue) ||
                    (SalesPartnerOperatorId.HasValue && ChargeDetailRecord.SalesPartnerOperatorId.HasValue && SalesPartnerOperatorId.Value.Equals(ChargeDetailRecord.SalesPartnerOperatorId.Value))) &&

                   ((!PartnerProductId.HasValue && !ChargeDetailRecord.PartnerProductId.HasValue) ||
                    (PartnerProductId.HasValue && ChargeDetailRecord.PartnerProductId.HasValue && PartnerProductId.Value.Equals(ChargeDetailRecord.PartnerProductId.Value))));
        }
            /// <summary>
            /// Compares two charge detail record builder for equality.
            /// </summary>
            /// <param name="ChargeDetailRecordBuilder">A charge detail record builder to compare with.</param>
            /// <returns>True if both match; False otherwise.</returns>
            public Boolean Equals(Builder ChargeDetailRecordBuilder)
            {
                if (ChargeDetailRecordBuilder == null)
                {
                    return(false);
                }

                return(CDRNature.Equals(ChargeDetailRecordBuilder.CDRNature) &&
                       ServiceSessionId.Equals(ChargeDetailRecordBuilder.ServiceSessionId) &&
                       RequestedServiceId.Equals(ChargeDetailRecordBuilder.RequestedServiceId) &&
                       EVSEId.Equals(ChargeDetailRecordBuilder.EVSEId) &&
                       UserContractIdAlias.Equals(ChargeDetailRecordBuilder.UserContractIdAlias) &&
                       UserId.Equals(ChargeDetailRecordBuilder.UserId) &&
                       StartTime.Equals(ChargeDetailRecordBuilder.StartTime) &&
                       EndTime.Equals(ChargeDetailRecordBuilder.EndTime) &&

                       ExecPartnerSessionId.Equals(ChargeDetailRecordBuilder.ExecPartnerSessionId) &&
                       ExecPartnerOperatorId.Equals(ChargeDetailRecordBuilder.ExecPartnerOperatorId) &&
                       SalesPartnerSessionId.Equals(ChargeDetailRecordBuilder.SalesPartnerSessionId) &&
                       SalesPartnerOperatorId.Equals(ChargeDetailRecordBuilder.SalesPartnerOperatorId) &&
                       PartnerProductId.Equals(ChargeDetailRecordBuilder.PartnerProductId) &&
                       MeterReports.Equals(ChargeDetailRecordBuilder.MeterReports));
            }