Interface TaskIdParamsMapper_v0_3

All Known Implementing Classes:
TaskIdParamsMapper_v0_3Impl

public interface TaskIdParamsMapper_v0_3
Bidirectional mapper for converting TaskIdParams between A2A Protocol v0.3 and v1.0.

Key differences:

  • v0.3: TaskIdParams(String id, Map<String, Object> metadata)
  • v1.0: TaskIdParams(String id, String tenant)

Conversion strategy:

  • 0.3 → 1.0: Drop metadata field, add tenant field (default to "")
  • 1.0 → 0.3: Drop tenant field, add metadata field (set to null)
See Also:
  • Field Details

  • Method Details

    • toV10

      default TaskIdParams toV10(TaskIdParams_v0_3 v03)
      Converts v0.3 TaskIdParams to v1.0 TaskIdParams.

      The metadata field from v0.3 is dropped, and the v1.0 tenant field is set to the empty string default.

      Parameters:
      v03 - the v0.3 task ID params
      Returns:
      the equivalent v1.0 task ID params
    • fromV10

      default TaskIdParams_v0_3 fromV10(TaskIdParams v10)
      Converts v1.0 TaskIdParams to v0.3 TaskIdParams.

      The tenant field from v1.0 is dropped, and the v0.3 metadata field is set to null.

      Parameters:
      v10 - the v1.0 task ID params
      Returns:
      the equivalent v0.3 task ID params