Package org.a2aproject.sdk.grpc.mapper
Interface RoleMapper
- All Known Implementing Classes:
RoleMapperImpl
public interface RoleMapper
Mapper between
Message.Role and Role.
Handles enum conversion between domain and protobuf role representations:
- ROLE_USER (domain) ↔ ROLE_USER (proto)
- ROLE_AGENT (domain) ↔ ROLE_AGENT (proto)
- ROLE_UNSPECIFIED (domain) ↔ ROLE_UNSPECIFIED (proto)
Manual Implementation Required: Uses manual switch statements instead of @ValueMapping to avoid mapstruct-spi-protobuf enum strategy initialization issues.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault Message.RoleConverts proto Role to domain Role.default RoletoProto(Message.Role domain) Converts domain Role to proto Role.
-
Field Details
-
INSTANCE
-
-
Method Details
-
toProto
Converts domain Role to proto Role. -
fromProto
Converts proto Role to domain Role.
-