/// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (CreditProfileDate != null)
         {
             hashCode = hashCode * 59 + CreditProfileDate.GetHashCode();
         }
         if (CreditRiskRating != null)
         {
             hashCode = hashCode * 59 + CreditRiskRating.GetHashCode();
         }
         if (CreditScore != null)
         {
             hashCode = hashCode * 59 + CreditScore.GetHashCode();
         }
         if (ValidFor != null)
         {
             hashCode = hashCode * 59 + ValidFor.GetHashCode();
         }
         if (TagCreditScoring != null)
         {
             hashCode = hashCode * 59 + TagCreditScoring.GetHashCode();
         }
         if (TagCreditLimit != null)
         {
             hashCode = hashCode * 59 + TagCreditLimit.GetHashCode();
         }
         if (TagCreditThreshold != null)
         {
             hashCode = hashCode * 59 + TagCreditThreshold.GetHashCode();
         }
         if (TagCreditOnHold != null)
         {
             hashCode = hashCode * 59 + TagCreditOnHold.GetHashCode();
         }
         if (TagContractDailyCreditLimit != null)
         {
             hashCode = hashCode * 59 + TagContractDailyCreditLimit.GetHashCode();
         }
         if (TagContractPeriodicCreditLimit != null)
         {
             hashCode = hashCode * 59 + TagContractPeriodicCreditLimit.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if CreditProfile instances are equal
        /// </summary>
        /// <param name="other">Instance of CreditProfile to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CreditProfile other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CreditProfileDate == other.CreditProfileDate ||
                     CreditProfileDate != null &&
                     CreditProfileDate.Equals(other.CreditProfileDate)
                     ) &&
                 (
                     CreditRiskRating == other.CreditRiskRating ||
                     CreditRiskRating != null &&
                     CreditRiskRating.Equals(other.CreditRiskRating)
                 ) &&
                 (
                     CreditScore == other.CreditScore ||
                     CreditScore != null &&
                     CreditScore.Equals(other.CreditScore)
                 ) &&
                 (
                     ValidFor == other.ValidFor ||
                     ValidFor != null &&
                     ValidFor.Equals(other.ValidFor)
                 ) &&
                 (
                     TagCreditScoring == other.TagCreditScoring ||
                     TagCreditScoring != null &&
                     TagCreditScoring.Equals(other.TagCreditScoring)
                 ) &&
                 (
                     TagCreditLimit == other.TagCreditLimit ||
                     TagCreditLimit != null &&
                     TagCreditLimit.Equals(other.TagCreditLimit)
                 ) &&
                 (
                     TagCreditThreshold == other.TagCreditThreshold ||
                     TagCreditThreshold != null &&
                     TagCreditThreshold.Equals(other.TagCreditThreshold)
                 ) &&
                 (
                     TagCreditOnHold == other.TagCreditOnHold ||
                     TagCreditOnHold != null &&
                     TagCreditOnHold.Equals(other.TagCreditOnHold)
                 ) &&
                 (
                     TagContractDailyCreditLimit == other.TagContractDailyCreditLimit ||
                     TagContractDailyCreditLimit != null &&
                     TagContractDailyCreditLimit.Equals(other.TagContractDailyCreditLimit)
                 ) &&
                 (
                     TagContractPeriodicCreditLimit == other.TagContractPeriodicCreditLimit ||
                     TagContractPeriodicCreditLimit != null &&
                     TagContractPeriodicCreditLimit.Equals(other.TagContractPeriodicCreditLimit)
                 ));
        }