/// <summary>Indicates whether the current object is equal to another object of the same type.</summary> /// <param name="other">An object to compare with this object.</param> /// <returns>true if the current object is equal to the <paramref name="other">other</paramref> parameter; otherwise, false.</returns> public bool Equals(OasOAuth2SecurityScheme other) { if (!base.Equals(other)) { return(false); } if (!ImplicitFlow.NullableEquals(other.ImplicitFlow)) { return(false); } if (!PasswordFlow.NullableEquals(other.PasswordFlow)) { return(false); } if (!ClientCredentialsFlow.NullableEquals(other.ClientCredentialsFlow)) { return(false); } if (!AuthorizationCodeFlow.NullableEquals(other.AuthorizationCodeFlow)) { return(false); } return(true); }
/// <summary>Serves as the default hash function.</summary> /// <returns>A hash code for the current object.</returns> public override int GetHashCode() { unchecked { var hc = 17L; hc = (hc * 23) + base.GetHashCode(); if (ImplicitFlow != null) { hc = (hc * 23) + ImplicitFlow.GetHashCode(); } if (PasswordFlow != null) { hc = (hc * 23) + PasswordFlow.GetHashCode(); } if (ClientCredentialsFlow != null) { hc = (hc * 23) + ClientCredentialsFlow.GetHashCode(); } if (AuthorizationCodeFlow != null) { hc = (hc * 23) + AuthorizationCodeFlow.GetHashCode(); } return(((int)(hc >> 32)) ^ (int)hc); } }