Beispiel #1
0
 /// <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 (ServiceRanking != null)
         {
             hashCode = hashCode * 59 + ServiceRanking.GetHashCode();
         }
         if (KeypairId != null)
         {
             hashCode = hashCode * 59 + KeypairId.GetHashCode();
         }
         if (KeypairAlias != null)
         {
             hashCode = hashCode * 59 + KeypairAlias.GetHashCode();
         }
         if (CdnrewriterAttributes != null)
         {
             hashCode = hashCode * 59 + CdnrewriterAttributes.GetHashCode();
         }
         if (CdnRewriterDistributionDomain != null)
         {
             hashCode = hashCode * 59 + CdnRewriterDistributionDomain.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Returns true if ComAdobeCqCdnRewriterImplAWSCloudFrontRewriterProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeCqCdnRewriterImplAWSCloudFrontRewriterProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeCqCdnRewriterImplAWSCloudFrontRewriterProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ServiceRanking == other.ServiceRanking ||
                     ServiceRanking != null &&
                     ServiceRanking.Equals(other.ServiceRanking)
                     ) &&
                 (
                     KeypairId == other.KeypairId ||
                     KeypairId != null &&
                     KeypairId.Equals(other.KeypairId)
                 ) &&
                 (
                     KeypairAlias == other.KeypairAlias ||
                     KeypairAlias != null &&
                     KeypairAlias.Equals(other.KeypairAlias)
                 ) &&
                 (
                     CdnrewriterAttributes == other.CdnrewriterAttributes ||
                     CdnrewriterAttributes != null &&
                     CdnrewriterAttributes.Equals(other.CdnrewriterAttributes)
                 ) &&
                 (
                     CdnRewriterDistributionDomain == other.CdnRewriterDistributionDomain ||
                     CdnRewriterDistributionDomain != null &&
                     CdnRewriterDistributionDomain.Equals(other.CdnRewriterDistributionDomain)
                 ));
        }