Class AgentExtension
java.lang.Object
com.mulesoft.connectors.a2a.api.model.card.AgentExtension
Represents an extension supported by an agent within the A2A protocol.
This class defines an extension that an agent supports, including its URI, description, whether it's required, and optional configuration parameters.
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a copy of this AgentExtension.booleanCompares this AgentExtension with another object for equality.Gets the description of how this agent uses this extension.Gets the optional configuration parameters for the extension.getUri()Gets the URI of the extension.inthashCode()Generates a hash code for this AgentExtension.booleanChecks if the client must follow specific requirements of the extension.voidsetDescription(String description) Sets the description of how this agent uses this extension.voidSets the optional configuration parameters for the extension.voidsetRequired(boolean required) Sets whether the client must follow specific requirements of the extension.voidSets the URI of the extension.
-
Constructor Details
-
AgentExtension
public AgentExtension()
-
-
Method Details
-
copy
Creates a copy of this AgentExtension.- Returns:
- A new AgentExtension instance with the same values as this one
-
getUri
Gets the URI of the extension.- Returns:
- The extension URI
-
setUri
Sets the URI of the extension.- Parameters:
uri- The extension URI
-
getDescription
Gets the description of how this agent uses this extension.- Returns:
- The extension description, or null if not specified
-
setDescription
Sets the description of how this agent uses this extension.- Parameters:
description- The extension description, or null if not specified
-
isRequired
public boolean isRequired()Checks if the client must follow specific requirements of the extension.- Returns:
- true if the extension is required, false otherwise
-
setRequired
public void setRequired(boolean required) Sets whether the client must follow specific requirements of the extension.- Parameters:
required- true if the extension is required, false otherwise
-
getParams
Gets the optional configuration parameters for the extension.- Returns:
- The extension parameters, or null if not specified
-
setParams
Sets the optional configuration parameters for the extension.- Parameters:
params- The extension parameters, or null if not specified
-
equals
Compares this AgentExtension with another object for equality. -
hashCode
public int hashCode()Generates a hash code for this AgentExtension.
-