Class AgentExtension

java.lang.Object
com.mulesoft.connectors.a2a.api.model.card.AgentExtension

public class AgentExtension extends Object
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 Details

    • AgentExtension

      public AgentExtension()
  • Method Details

    • copy

      public AgentExtension copy()
      Creates a copy of this AgentExtension.
      Returns:
      A new AgentExtension instance with the same values as this one
    • getUri

      public String getUri()
      Gets the URI of the extension.
      Returns:
      The extension URI
    • setUri

      public void setUri(String uri)
      Sets the URI of the extension.
      Parameters:
      uri - The extension URI
    • getDescription

      public String getDescription()
      Gets the description of how this agent uses this extension.
      Returns:
      The extension description, or null if not specified
    • setDescription

      public void setDescription(String description)
      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

      public Map<String,Object> getParams()
      Gets the optional configuration parameters for the extension.
      Returns:
      The extension parameters, or null if not specified
    • setParams

      public void setParams(Map<String,Object> params)
      Sets the optional configuration parameters for the extension.
      Parameters:
      params - The extension parameters, or null if not specified
    • equals

      public boolean equals(Object object)
      Compares this AgentExtension with another object for equality.
      Overrides:
      equals in class Object
      Parameters:
      object - The object to compare with
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Generates a hash code for this AgentExtension.
      Overrides:
      hashCode in class Object
      Returns:
      A hash code value for this object