package com.airlock.iam.publicselfservice.application.configuration.flow;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Optional;

public final class PublicSelfServiceSettings {
   private final int maxFailedAttempts;
   private final Optional<Integer> maxNumberUnlocks;

   @SuppressFBWarnings(justification = "generated code")
   public PublicSelfServiceSettings(int maxFailedAttempts, Optional<Integer> maxNumberUnlocks) {
      this.maxFailedAttempts = maxFailedAttempts;
      this.maxNumberUnlocks = maxNumberUnlocks;
   }

   @SuppressFBWarnings(justification = "generated code")
   public int getMaxFailedAttempts() {
      return this.maxFailedAttempts;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Optional<Integer> getMaxNumberUnlocks() {
      return this.maxNumberUnlocks;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof PublicSelfServiceSettings other)) {
         return false;
      } else {
         if (this.maxFailedAttempts != other.maxFailedAttempts) {
            return false;
         }

         Object this$maxNumberUnlocks = this.maxNumberUnlocks;
         Object other$maxNumberUnlocks = other.maxNumberUnlocks;
         return this$maxNumberUnlocks == null ? other$maxNumberUnlocks == null : this$maxNumberUnlocks.equals(other$maxNumberUnlocks);
      }
   }

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "PublicSelfServiceSettings(maxFailedAttempts=" + this.getMaxFailedAttempts() + ", maxNumberUnlocks=" + this.getMaxNumberUnlocks() + ")";
   }
}
