public bool Equals(Consumer consumer)
{
if (consumer == null)
{
return false;
}
return this.Name == consumer.Name
&& this.Callback == consumer.Callback
&& this.Id == consumer.Id
&& this.Secret == consumer.Secret
&& this.VerificationCodeFormat == consumer.VerificationCodeFormat
&& this.VerificationCodeLength == consumer.VerificationCodeLength
&& (this.Certificate != null && consumer.Certificate != null && this.Certificate.Equals(consumer.Certificate));
}