Record Class LocalAgentResponse
java.lang.Object
java.lang.Record
com.shaft.pilot.agent.LocalAgentResponse
- Record Components:
status- normalized execution statusclient- local agent clientmode- Autobot modecommand- command executed, without environment variablesexitCode- process exit codestdout- standard outputstderr- standard errortimedOut- whether execution timed outduration- elapsed durationrequiresCloudApiKey- whether this route requires a SHAFT-managed cloud API keywarnings- safe warnings for the caller
public record LocalAgentResponse(LocalAgentStatus status, LocalAgentClient client, LocalAgentMode mode, List<String> command, int exitCode, String stdout, String stderr, boolean timedOut, Duration duration, boolean requiresCloudApiKey, List<String> warnings)
extends Record
Safe local agent execution response.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalAgentResponse(LocalAgentStatus status, LocalAgentClient client, LocalAgentMode mode, List<String> command, int exitCode, String stdout, String stderr, boolean timedOut, Duration duration, boolean requiresCloudApiKey, List<String> warnings) Creates and defensively copies a response. -
Method Summary
Modifier and TypeMethodDescriptionclient()Returns the value of theclientrecord component.command()Returns the value of thecommandrecord component.duration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.intexitCode()Returns the value of theexitCoderecord component.final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.booleanReturns the value of therequiresCloudApiKeyrecord component.status()Returns the value of thestatusrecord component.stderr()Returns the value of thestderrrecord component.stdout()Returns the value of thestdoutrecord component.booleantimedOut()Returns the value of thetimedOutrecord component.final StringtoString()Returns a string representation of this record class.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
LocalAgentResponse
public LocalAgentResponse(LocalAgentStatus status, LocalAgentClient client, LocalAgentMode mode, List<String> command, int exitCode, String stdout, String stderr, boolean timedOut, Duration duration, boolean requiresCloudApiKey, List<String> warnings) Creates and defensively copies a response.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
status
-
client
-
mode
-
command
-
exitCode
-
stdout
-
stderr
-
timedOut
-
duration
-
requiresCloudApiKey
public boolean requiresCloudApiKey()Returns the value of therequiresCloudApiKeyrecord component.- Returns:
- the value of the
requiresCloudApiKeyrecord component
-
warnings
-