Package akka.javasdk.agent.task
Record Class TaskState
public record TaskState(String taskId, String name, String description, String instructions, TaskStatus status, String resultTypeName, Optional<String> result, Optional<String> failureReason, List<String> dependencyTaskIds, Optional<String> assignee, List<TaskAttachment> attachments, List<String> reassignmentContext, List<String> ruleClassNames)
extends Record
State of a task entity.
-
Constructor Summary
ConstructorsConstructorDescriptionTaskState(String taskId, String name, String description, String instructions, TaskStatus status, String resultTypeName, Optional<String> result, Optional<String> failureReason, List<String> dependencyTaskIds, Optional<String> assignee, List<TaskAttachment> attachments, List<String> reassignmentContext, List<String> ruleClassNames) Creates an instance of aTaskStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionassignee()Returns the value of theassigneerecord component.Returns the value of theattachmentsrecord component.Returns the value of thedependencyTaskIdsrecord component.Returns the value of thedescriptionrecord component.static TaskStateempty()final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureReasonrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinstructionsrecord component.name()Returns the value of thenamerecord component.Returns the value of thereassignmentContextrecord component.result()Returns the value of theresultrecord component.Returns the value of theresultTypeNamerecord component.Returns the value of theruleClassNamesrecord component.status()Returns the value of thestatusrecord component.taskId()Returns the value of thetaskIdrecord component.final StringtoString()Returns a string representation of this record class.withAssignee(String assignee) withCancellation(String reason) withFailure(String reason) withReassignment(String newAssignee, String context) withResult(String result) withResultRejection(String reason) withStatus(TaskStatus status)
-
Constructor Details
-
TaskState
public TaskState(String taskId, String name, String description, String instructions, TaskStatus status, String resultTypeName, Optional<String> result, Optional<String> failureReason, List<String> dependencyTaskIds, Optional<String> assignee, List<TaskAttachment> attachments, List<String> reassignmentContext, List<String> ruleClassNames) Creates an instance of aTaskStaterecord class.- Parameters:
taskId- the value for thetaskIdrecord componentname- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentinstructions- the value for theinstructionsrecord componentstatus- the value for thestatusrecord componentresultTypeName- the value for theresultTypeNamerecord componentresult- the value for theresultrecord componentfailureReason- the value for thefailureReasonrecord componentdependencyTaskIds- the value for thedependencyTaskIdsrecord componentassignee- the value for theassigneerecord componentattachments- the value for theattachmentsrecord componentreassignmentContext- the value for thereassignmentContextrecord componentruleClassNames- the value for theruleClassNamesrecord component
-
-
Method Details
-
empty
-
withStatus
-
withAssignee
-
withResult
-
withResultRejection
-
withFailure
-
withCancellation
-
withReassignment
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
taskId
Returns the value of thetaskIdrecord component.- Returns:
- the value of the
taskIdrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
instructions
Returns the value of theinstructionsrecord component.- Returns:
- the value of the
instructionsrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
resultTypeName
Returns the value of theresultTypeNamerecord component.- Returns:
- the value of the
resultTypeNamerecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
failureReason
Returns the value of thefailureReasonrecord component.- Returns:
- the value of the
failureReasonrecord component
-
dependencyTaskIds
Returns the value of thedependencyTaskIdsrecord component.- Returns:
- the value of the
dependencyTaskIdsrecord component
-
assignee
Returns the value of theassigneerecord component.- Returns:
- the value of the
assigneerecord component
-
attachments
Returns the value of theattachmentsrecord component.- Returns:
- the value of the
attachmentsrecord component
-
reassignmentContext
Returns the value of thereassignmentContextrecord component.- Returns:
- the value of the
reassignmentContextrecord component
-
ruleClassNames
Returns the value of theruleClassNamesrecord component.- Returns:
- the value of the
ruleClassNamesrecord component
-