package com.airlock.iam.common.application.configuration.sms;

import com.airlock.iam.core.misc.impl.authen.mtan.MtanHandler;
import com.airlock.iam.plugin.api.annotation.config.Plugin;
import com.airlock.iam.plugin.api.annotation.property.PluginProperty;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

@Plugin(description = "Provides all of the user's phone numbers.", displayName = "All Phone Numbers Provider")
public final class AllPhoneNumbersProviderConfig implements PhoneNumbersProviderConfig {
   @PluginProperty(description = "An mTAN handler retrieves mTAN number tokens.", optional = false, displayName = "mTAN Handler")
   private MtanHandler mtanHandler;

   public MtanHandler getMtanHandler() {
      return this.mtanHandler;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public AllPhoneNumbersProviderConfig() {
   }

   @SuppressFBWarnings(justification = "generated code")
   public AllPhoneNumbersProviderConfig(MtanHandler mtanHandler) {
      this.mtanHandler = mtanHandler;
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class AllPhoneNumbersProviderConfigBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private MtanHandler mtanHandler;

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

      @SuppressFBWarnings(justification = "generated code")
      public AllPhoneNumbersProviderConfig.AllPhoneNumbersProviderConfigBuilder mtanHandler(MtanHandler mtanHandler) {
         this.mtanHandler = mtanHandler;
         return this;
      }

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

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