package com.airlock.iam.flow.shared.domain.service.mtan;

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

public final class MtanRegistrationSettings {
   private final boolean saveAuthTokenId;

   @SuppressFBWarnings(justification = "generated code")
   public static MtanRegistrationSettings.MtanRegistrationSettingsBuilder builder() {
      return new MtanRegistrationSettings.MtanRegistrationSettingsBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public boolean saveAuthTokenId() {
      return this.saveAuthTokenId;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      return result * 59 + (this.saveAuthTokenId ? 79 : 97);
   }

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

   @SuppressFBWarnings(justification = "generated code")
   private MtanRegistrationSettings(boolean saveAuthTokenId) {
      this.saveAuthTokenId = saveAuthTokenId;
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class MtanRegistrationSettingsBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private boolean saveAuthTokenId;

      @SuppressFBWarnings(justification = "generated code")
      MtanRegistrationSettingsBuilder() {
      }

      @SuppressFBWarnings(justification = "generated code")
      public MtanRegistrationSettings.MtanRegistrationSettingsBuilder saveAuthTokenId(boolean saveAuthTokenId) {
         this.saveAuthTokenId = saveAuthTokenId;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public MtanRegistrationSettings build() {
         return new MtanRegistrationSettings(this.saveAuthTokenId);
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "MtanRegistrationSettings.MtanRegistrationSettingsBuilder(saveAuthTokenId=" + this.saveAuthTokenId + ")";
      }
   }
}
