package com.airlock.iam.flow.api.application.configuration.step;

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 = "Configuration of an internal goto target. This allows the step to execute internal gotos including whether the goto is treated as failure. Internal gotos must be directly triggered by the step implementation and cannot be triggered by the client. "
)
public final class InternalGotoTargetConfig {
   @PluginProperty(description = "The ID of the target step.", displayName = "Target Step ID", optional = false)
   private StepIdConfig targetStepId;
   public static final String INTERNAL_GOTO_TARGET_STEP_ID_FIELD = "targetStepId";

   public StepIdConfig getTargetStepId() {
      return this.targetStepId;
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   public InternalGotoTargetConfig(StepIdConfig targetStepId) {
      this.targetStepId = targetStepId;
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class InternalGotoTargetConfigBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private StepIdConfig targetStepId;

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

      @SuppressFBWarnings(justification = "generated code")
      public InternalGotoTargetConfig.InternalGotoTargetConfigBuilder targetStepId(StepIdConfig targetStepId) {
         this.targetStepId = targetStepId;
         return this;
      }

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

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