package com.airlock.iam.admin.application.configuration;

import com.airlock.iam.common.api.domain.model.store.user.IdentityChangingUserStore;
import com.airlock.iam.common.api.domain.model.store.user.UserStore;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Optional;

public class AdminUserStoreConfig {
   private UserStore countingUserStore;
   private UserStore roleSpecificUserStore;
   private Optional<UserStore> userListDetailLoader;
   private Optional<IdentityChangingUserStore> identityChangingUserStore;

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

   @SuppressFBWarnings(justification = "generated code")
   public UserStore getCountingUserStore() {
      return this.countingUserStore;
   }

   @SuppressFBWarnings(justification = "generated code")
   public UserStore getRoleSpecificUserStore() {
      return this.roleSpecificUserStore;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Optional<UserStore> getUserListDetailLoader() {
      return this.userListDetailLoader;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Optional<IdentityChangingUserStore> getIdentityChangingUserStore() {
      return this.identityChangingUserStore;
   }

   @SuppressFBWarnings(justification = "generated code")
   public AdminUserStoreConfig(
      UserStore countingUserStore,
      UserStore roleSpecificUserStore,
      Optional<UserStore> userListDetailLoader,
      Optional<IdentityChangingUserStore> identityChangingUserStore
   ) {
      this.countingUserStore = countingUserStore;
      this.roleSpecificUserStore = roleSpecificUserStore;
      this.userListDetailLoader = userListDetailLoader;
      this.identityChangingUserStore = identityChangingUserStore;
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class AdminUserStoreConfigBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private UserStore countingUserStore;
      @SuppressFBWarnings(justification = "generated code")
      private UserStore roleSpecificUserStore;
      @SuppressFBWarnings(justification = "generated code")
      private Optional<UserStore> userListDetailLoader;
      @SuppressFBWarnings(justification = "generated code")
      private Optional<IdentityChangingUserStore> identityChangingUserStore;

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

      @SuppressFBWarnings(justification = "generated code")
      public AdminUserStoreConfig.AdminUserStoreConfigBuilder countingUserStore(UserStore countingUserStore) {
         this.countingUserStore = countingUserStore;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminUserStoreConfig.AdminUserStoreConfigBuilder roleSpecificUserStore(UserStore roleSpecificUserStore) {
         this.roleSpecificUserStore = roleSpecificUserStore;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminUserStoreConfig.AdminUserStoreConfigBuilder userListDetailLoader(Optional<UserStore> userListDetailLoader) {
         this.userListDetailLoader = userListDetailLoader;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminUserStoreConfig.AdminUserStoreConfigBuilder identityChangingUserStore(Optional<IdentityChangingUserStore> identityChangingUserStore) {
         this.identityChangingUserStore = identityChangingUserStore;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public AdminUserStoreConfig build() {
         return new AdminUserStoreConfig(this.countingUserStore, this.roleSpecificUserStore, this.userListDetailLoader, this.identityChangingUserStore);
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "AdminUserStoreConfig.AdminUserStoreConfigBuilder(countingUserStore="
            + this.countingUserStore
            + ", roleSpecificUserStore="
            + this.roleSpecificUserStore
            + ", userListDetailLoader="
            + this.userListDetailLoader
            + ", identityChangingUserStore="
            + this.identityChangingUserStore
            + ")";
      }
   }
}
