package com.airlock.iam.oauth2.api.domain.model.clientauthentication;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

public final class OAuth2ClientAuthentication {
   private final OAuth2ClientAuthenticationPayload payload;

   public static OAuth2ClientAuthentication clientAuthentication(OAuth2ClientAuthenticationPayload payload) {
      return new OAuth2ClientAuthentication(payload);
   }

   @SuppressFBWarnings(justification = "generated code")
   public OAuth2ClientAuthenticationPayload getPayload() {
      return this.payload;
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "OAuth2ClientAuthentication(payload=" + this.getPayload() + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   private OAuth2ClientAuthentication(OAuth2ClientAuthenticationPayload payload) {
      this.payload = payload;
   }
}
