Interface RoleMapper_v0_3

All Known Implementing Classes:
RoleMapper_v0_3Impl

public interface RoleMapper_v0_3
Bidirectional mapper for converting Message.Role enum between A2A Protocol v0.3 and v1.0.

Key differences:

  • v0.3: USER, AGENT
  • v1.0: ROLE_USER, ROLE_AGENT

The v1.0 enum adds a "ROLE_" prefix to align with protocol buffer conventions.

  • Field Details

  • Method Details

    • toV10

      default Message.Role toV10(Message_v0_3.Role v03)
      Converts v0.3 Role to v1.0 Role.
      Parameters:
      v03 - the v0.3 role
      Returns:
      the equivalent v1.0 role
    • fromV10

      default Message_v0_3.Role fromV10(Message.Role v10)
      Converts v1.0 Role to v0.3 Role.
      Parameters:
      v10 - the v1.0 role
      Returns:
      the equivalent v0.3 role