/// <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 (Uuid != null) { hashCode = hashCode * 59 + Uuid.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (ApplicationId != null) { hashCode = hashCode * 59 + ApplicationId.GetHashCode(); } if (SubRealmId != null) { hashCode = hashCode * 59 + SubRealmId.GetHashCode(); } if (Permissions != null) { hashCode = hashCode * 59 + Permissions.GetHashCode(); } return(hashCode); } }
/// <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 (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (SubRealmId != null) { hashCode = hashCode * 59 + SubRealmId.GetHashCode(); } if (RoleIds != null) { hashCode = hashCode * 59 + RoleIds.GetHashCode(); } if (TeamIds != null) { hashCode = hashCode * 59 + TeamIds.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if UserProfile instances are equal /// </summary> /// <param name="other">Instance of UserProfile to be compared</param> /// <returns>Boolean</returns> public bool Equals(UserProfile other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Uuid == other.Uuid || Uuid != null && Uuid.Equals(other.Uuid) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( SubRealmId == other.SubRealmId || SubRealmId != null && SubRealmId.Equals(other.SubRealmId) ) && ( Roles == other.Roles || Roles != null && other.Roles != null && Roles.SequenceEqual(other.Roles) ) && ( Teams == other.Teams || Teams != null && other.Teams != null && Teams.SequenceEqual(other.Teams) )); }
/// <summary> /// Returns true if Role instances are equal /// </summary> /// <param name="other">Instance of Role to be compared</param> /// <returns>Boolean</returns> public bool Equals(Role other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Uuid == other.Uuid || Uuid != null && Uuid.Equals(other.Uuid) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( SubRealmId == other.SubRealmId || SubRealmId != null && SubRealmId.Equals(other.SubRealmId) ) && ( FunctionIds == other.FunctionIds || FunctionIds != null && other.FunctionIds != null && FunctionIds.SequenceEqual(other.FunctionIds) ) && ( RoleIds == other.RoleIds || RoleIds != null && other.RoleIds != null && RoleIds.SequenceEqual(other.RoleIds) )); }
/// <summary> /// Returns true if Function instances are equal /// </summary> /// <param name="other">Instance of Function to be compared</param> /// <returns>Boolean</returns> public bool Equals(Function other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Uuid == other.Uuid || Uuid != null && Uuid.Equals(other.Uuid) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( ApplicationId == other.ApplicationId || ApplicationId != null && ApplicationId.Equals(other.ApplicationId) ) && ( SubRealmId == other.SubRealmId || SubRealmId != null && SubRealmId.Equals(other.SubRealmId) ) && ( Permissions == other.Permissions || Permissions != null && other.Permissions != null && Permissions.SequenceEqual(other.Permissions) )); }