Example #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (DefaultLimit != 0L)
            {
                hash ^= DefaultLimit.GetHashCode();
            }
            if (MaxLimit != 0L)
            {
                hash ^= MaxLimit.GetHashCode();
            }
            if (FreeTier != 0L)
            {
                hash ^= FreeTier.GetHashCode();
            }
            if (Duration.Length != 0)
            {
                hash ^= Duration.GetHashCode();
            }
            if (Metric.Length != 0)
            {
                hash ^= Metric.GetHashCode();
            }
            if (Unit.Length != 0)
            {
                hash ^= Unit.GetHashCode();
            }
            hash ^= Values.GetHashCode();
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 /// <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 (DefaultLimit != null)
         {
             hashCode = hashCode * 59 + DefaultLimit.GetHashCode();
         }
         if (UseAbsoluteUri != null)
         {
             hashCode = hashCode * 59 + UseAbsoluteUri.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if ComAdobeGraniteRestImplServletDefaultGETServletProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeGraniteRestImplServletDefaultGETServletProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeGraniteRestImplServletDefaultGETServletProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DefaultLimit == other.DefaultLimit ||
                     DefaultLimit != null &&
                     DefaultLimit.Equals(other.DefaultLimit)
                     ) &&
                 (
                     UseAbsoluteUri == other.UseAbsoluteUri ||
                     UseAbsoluteUri != null &&
                     UseAbsoluteUri.Equals(other.UseAbsoluteUri)
                 ));
        }