package com.airlock.iam.flow.shared.application.configuration.condition;

import com.airlock.iam.flow.api.application.configuration.selection.FlowConditionConfig;
import com.airlock.iam.plugin.api.annotation.config.Plugin;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

@Plugin(
   description = "<p>Condition that is fulfilled if the user has been identified.</p><p>This condition uses the tentative user ID, which is available as soon as the provided username is resolved. This means that it can be used inside, but not before, a user identifying step.</p><p>If no user has been identified yet, the condition is not fulfilled.</p>",
   displayName = "User Identified"
)
public final class UserIdentifiedConditionConfig implements FlowConditionConfig {
   @SuppressFBWarnings(justification = "generated code")
   public static UserIdentifiedConditionConfig.UserIdentifiedConditionConfigBuilder builder() {
      return new UserIdentifiedConditionConfig.UserIdentifiedConditionConfigBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class UserIdentifiedConditionConfigBuilder {
      @SuppressFBWarnings(justification = "generated code")
      UserIdentifiedConditionConfigBuilder() {
      }

      @SuppressFBWarnings(justification = "generated code")
      public UserIdentifiedConditionConfig build() {
         return new UserIdentifiedConditionConfig();
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "UserIdentifiedConditionConfig.UserIdentifiedConditionConfigBuilder()";
      }
   }
}
