Package org.a2aproject.sdk.util
Record Class ErrorDetail
java.lang.Object
java.lang.Record
org.a2aproject.sdk.util.ErrorDetail
public record ErrorDetail(String type, String reason, String domain, @Nullable Map<String,Object> metadata)
extends Record
Represents a single entry in the JSON-RPC
error.data array, following
the Google ErrorInfo format (type.googleapis.com/google.rpc.ErrorInfo).-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondomain()Returns the value of thedomainrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.static ErrorDetailConvenience factory using the standard A2A ErrorInfo type and domain.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
ERROR_INFO_TYPE
- See Also:
-
ERROR_DOMAIN
- See Also:
-
-
Constructor Details
-
ErrorDetail
public ErrorDetail(String type, String reason, String domain, @Nullable Map<String, Object> metadata) Creates an instance of aErrorDetailrecord class.- Parameters:
type- the value for thetyperecord componentreason- the value for thereasonrecord componentdomain- the value for thedomainrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
of
Convenience factory using the standard A2A ErrorInfo type and domain. -
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
domain
Returns the value of thedomainrecord component.- Returns:
- the value of the
domainrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-