Record Class A2aAgentCard.Interface

java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.a2a.A2aAgentCard.Interface
Record Components:
url - where the client sends requests
protocolBinding - JSONRPC, GRPC or HTTP+JSON
protocolVersion - the A2A version spoken there, Major.Minor
tenant - the tenant a client sets on every request; may be null
Enclosing class:
A2aAgentCard

public static record A2aAgentCard.Interface(String url, String protocolBinding, String protocolVersion, String tenant) extends Record
One endpoint of the card (A2A 1.0 AgentInterface).
  • Constructor Details

    • Interface

      public Interface(String url, String protocolBinding, String protocolVersion, String tenant)
      Creates an instance of a Interface record class.
      Parameters:
      url - the value for the url record component
      protocolBinding - the value for the protocolBinding record component
      protocolVersion - the value for the protocolVersion record component
      tenant - the value for the tenant record component
    • Interface

      public Interface(String url, String protocolBinding, String protocolVersion)
      An interface with no tenant.
  • Method Details

    • version

      public Optional<A2aVersion> version()
      The version this module speaks there, or empty when it speaks none.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • protocolBinding

      public String protocolBinding()
      Returns the value of the protocolBinding record component.
      Returns:
      the value of the protocolBinding record component
    • protocolVersion

      public String protocolVersion()
      Returns the value of the protocolVersion record component.
      Returns:
      the value of the protocolVersion record component
    • tenant

      public String tenant()
      Returns the value of the tenant record component.
      Returns:
      the value of the tenant record component