Class LocalAgentRequest.Builder

java.lang.Object
com.shaft.pilot.agent.LocalAgentRequest.Builder
Enclosing class:
LocalAgentRequest

public static final class LocalAgentRequest.Builder extends Object
Fluent builder for LocalAgentRequest.
  • Method Details

    • workingDirectory

      public LocalAgentRequest.Builder workingDirectory(Path value)
      Sets the process working directory.
      Parameters:
      value - working directory
      Returns:
      this builder
    • command

      public LocalAgentRequest.Builder command(List<String> value)
      Sets a custom command that overrides SHAFT defaults.
      Parameters:
      value - command and arguments
      Returns:
      this builder
    • environment

      public LocalAgentRequest.Builder environment(Map<String,String> value)
      Sets additional process environment variables.
      Parameters:
      value - environment variables
      Returns:
      this builder
    • timeout

      public LocalAgentRequest.Builder timeout(Duration value)
      Sets the process timeout.
      Parameters:
      value - timeout
      Returns:
      this builder
    • allowSourceMutation

      public LocalAgentRequest.Builder allowSourceMutation(boolean value)
      Allows agent mode to perform source mutations.
      Parameters:
      value - true when the caller has explicitly approved mutation
      Returns:
      this builder
    • build

      public LocalAgentRequest build()
      Builds the immutable request.
      Returns:
      request