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 Summary
FieldsModifier and TypeFieldDescriptionstatic final RoleMapper_v0_3Singleton instance accessed viaA2AMappers_v0_3factory. -
Method Summary
Modifier and TypeMethodDescriptiondefault Message_v0_3.RolefromV10(Message.Role v10) Converts v1.0 Role to v0.3 Role.default Message.RoletoV10(Message_v0_3.Role v03) Converts v0.3 Role to v1.0 Role.
-
Field Details
-
INSTANCE
Singleton instance accessed viaA2AMappers_v0_3factory.
-
-
Method Details
-
toV10
Converts v0.3 Role to v1.0 Role.- Parameters:
v03- the v0.3 role- Returns:
- the equivalent v1.0 role
-
fromV10
Converts v1.0 Role to v0.3 Role.- Parameters:
v10- the v1.0 role- Returns:
- the equivalent v0.3 role
-