package com.airlock.iam.oauth2.domain.model.credential;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.security.cert.X509Certificate;

public final class OAuth2TokenBindingClientCertificateCredential implements OAuth2TokenBindingCredential {
   private final X509Certificate certificate;

   @SuppressFBWarnings(justification = "generated code")
   public OAuth2TokenBindingClientCertificateCredential(X509Certificate certificate) {
      this.certificate = certificate;
   }

   @SuppressFBWarnings(justification = "generated code")
   public X509Certificate getCertificate() {
      return this.certificate;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof OAuth2TokenBindingClientCertificateCredential other)) {
         return false;
      } else {
         Object this$certificate = this.certificate;
         Object other$certificate = other.certificate;
         return this$certificate == null ? other$certificate == null : this$certificate.equals(other$certificate);
      }
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      Object $certificate = this.certificate;
      return result * 59 + ($certificate == null ? 43 : $certificate.hashCode());
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "OAuth2TokenBindingClientCertificateCredential(certificate=" + this.getCertificate() + ")";
   }
}
