Package akka.javasdk.ledger
Record Class TaskContext
- Record Components:
agentInstanceId- the id of the agent instance that ran the tasktaskId- the id of the tasktaskName- the name of the tasktaskDescription- the description of the tasktaskResultType- the type of the task's resultiterationNumber- the iteration of the flow this interaction belongs tomaxIterations- the maximum number of iterations configured for the flow
public record TaskContext(String agentInstanceId, String taskId, String taskName, String taskDescription, String taskResultType, int iterationNumber, int maxIterations)
extends Record
Autonomous-agent task metadata. Present only for interactions produced by an agent running as
part of a flow; absent for request-based agent interactions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theagentInstanceIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theiterationNumberrecord component.intReturns the value of themaxIterationsrecord component.Returns the value of thetaskDescriptionrecord component.taskId()Returns the value of thetaskIdrecord component.taskName()Returns the value of thetaskNamerecord component.Returns the value of thetaskResultTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TaskContext
public TaskContext(String agentInstanceId, String taskId, String taskName, String taskDescription, String taskResultType, int iterationNumber, int maxIterations) Creates an instance of aTaskContextrecord class.- Parameters:
agentInstanceId- the value for theagentInstanceIdrecord componenttaskId- the value for thetaskIdrecord componenttaskName- the value for thetaskNamerecord componenttaskDescription- the value for thetaskDescriptionrecord componenttaskResultType- the value for thetaskResultTyperecord componentiterationNumber- the value for theiterationNumberrecord componentmaxIterations- the value for themaxIterationsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
agentInstanceId
Returns the value of theagentInstanceIdrecord component.- Returns:
- the value of the
agentInstanceIdrecord component
-
taskId
Returns the value of thetaskIdrecord component.- Returns:
- the value of the
taskIdrecord component
-
taskName
Returns the value of thetaskNamerecord component.- Returns:
- the value of the
taskNamerecord component
-
taskDescription
Returns the value of thetaskDescriptionrecord component.- Returns:
- the value of the
taskDescriptionrecord component
-
taskResultType
Returns the value of thetaskResultTyperecord component.- Returns:
- the value of the
taskResultTyperecord component
-
iterationNumber
public int iterationNumber()Returns the value of theiterationNumberrecord component.- Returns:
- the value of the
iterationNumberrecord component
-
maxIterations
public int maxIterations()Returns the value of themaxIterationsrecord component.- Returns:
- the value of the
maxIterationsrecord component
-