package com.airlock.iam.authentication.domain.model.devicetoken;

import com.airlock.iam.common.api.domain.model.authmethod.AuthenticationMethod;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

public record DeviceTokenAuthStepSettings(boolean failOnChallengeRetrieve, AuthenticationMethod authenticationMethod) {
   @SuppressFBWarnings(justification = "generated code")
   public static DeviceTokenAuthStepSettings.DeviceTokenAuthStepSettingsBuilder builder() {
      return new DeviceTokenAuthStepSettings.DeviceTokenAuthStepSettingsBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class DeviceTokenAuthStepSettingsBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private boolean failOnChallengeRetrieve;
      @SuppressFBWarnings(justification = "generated code")
      private AuthenticationMethod authenticationMethod;

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

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

      @SuppressFBWarnings(justification = "generated code")
      public DeviceTokenAuthStepSettings.DeviceTokenAuthStepSettingsBuilder authenticationMethod(AuthenticationMethod authenticationMethod) {
         this.authenticationMethod = authenticationMethod;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public DeviceTokenAuthStepSettings build() {
         return new DeviceTokenAuthStepSettings(this.failOnChallengeRetrieve, this.authenticationMethod);
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "DeviceTokenAuthStepSettings.DeviceTokenAuthStepSettingsBuilder(failOnChallengeRetrieve="
            + this.failOnChallengeRetrieve
            + ", authenticationMethod="
            + this.authenticationMethod
            + ")";
      }
   }
}
