Package org.a2aproject.sdk.server
Record Class AgentCardOperation
java.lang.Object
java.lang.Record
org.a2aproject.sdk.server.AgentCardOperation
public record AgentCardOperation(Predicate<AgentCard> capability, Supplier<? extends A2AError> capabilityFailure)
extends Record
The capability and transport-specific failure for an operation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AgentCardOperationstatic final AgentCardOperationstatic final AgentCardOperation -
Constructor Summary
ConstructorsConstructorDescriptionAgentCardOperation(Predicate<AgentCard> capability, Supplier<? extends A2AError> capabilityFailure) Creates an instance of aAgentCardOperationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecapabilityrecord component.Returns the value of thecapabilityFailurerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static AgentCardOperationnone()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
STREAMING
-
PUSH_NOTIFICATIONS
-
EXTENDED_CARD
-
-
Constructor Details
-
AgentCardOperation
public AgentCardOperation(Predicate<AgentCard> capability, Supplier<? extends A2AError> capabilityFailure) Creates an instance of aAgentCardOperationrecord class.- Parameters:
capability- the value for thecapabilityrecord componentcapabilityFailure- the value for thecapabilityFailurerecord component
-
-
Method Details
-
none
-
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). -
capability
Returns the value of thecapabilityrecord component.- Returns:
- the value of the
capabilityrecord component
-
capabilityFailure
Returns the value of thecapabilityFailurerecord component.- Returns:
- the value of the
capabilityFailurerecord component
-