Interface TaskQueryParamsMapper_v0_3

All Known Implementing Classes:
TaskQueryParamsMapper_v0_3Impl

public interface TaskQueryParamsMapper_v0_3
Bidirectional mapper for converting TaskQueryParams between A2A Protocol v0.3 and v1.0.

Key differences:

  • v0.3: TaskQueryParams(String id, int historyLength, Map<String, Object> metadata)
  • v1.0: TaskQueryParams(String id, Integer historyLength, String tenant)

Conversion strategy:

  • 0.3 → 1.0:
    • historyLength: primitive int → nullable Integer (0 → null)
    • metadata: dropped
    • tenant: added as ""
  • 1.0 → 0.3:
    • historyLength: nullable Integer → primitive int (null → 0)
    • metadata: added as null
    • tenant: dropped
See Also:
  • Field Details

  • Method Details

    • toV10

      Converts v0.3 TaskQueryParams to v1.0 TaskQueryParams.

      The metadata field from v0.3 is dropped, the historyLength is converted from primitive int to nullable Integer (0 becomes null), and the v1.0 tenant field is set to the empty string default.

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

      default TaskQueryParams_v0_3 fromV10(TaskQueryParams v10)
      Converts v1.0 TaskQueryParams to v0.3 TaskQueryParams.

      The tenant field from v1.0 is dropped, the historyLength is converted from nullable Integer to primitive int (null becomes 0), and the v0.3 metadata field is set to null.

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