Record Class HITLApproval.ApprovalRequest
java.lang.Object
java.lang.Record
com.tnsai.coordination.supervisor.HITLApproval.ApprovalRequest
- Record Components:
agentId- the agent requesting the actionaction- the action being attemptedcontext- additional context about the actionapproval- future to complete with the human's decision (true = approved)
- Enclosing class:
HITLApproval
public static record HITLApproval.ApprovalRequest(String agentId, String action, Map<String,Object> context, CompletableFuture<Boolean> approval)
extends Record
Request for human approval of an agent action.
-
Constructor Summary
ConstructorsConstructorDescriptionApprovalRequest(String agentId, String action, Map<String, Object> context, CompletableFuture<Boolean> approval) Creates an ApprovalRequest with validation. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.agentId()Returns the value of theagentIdrecord component.approval()Returns the value of theapprovalrecord component.context()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
approval
Returns the value of theapprovalrecord component.- Returns:
- the value of the
approvalrecord component
-