Interface ArtifactMapper_v0_3

All Known Implementing Classes:
ArtifactMapper_v0_3Impl

public interface ArtifactMapper_v0_3
Bidirectional mapper for converting Artifact between A2A Protocol v0.3 and v1.0.

Both versions are records with the same structure: Artifact(artifactId, name, description, parts, metadata, extensions).

The conversion primarily involves converting the nested Part list using PartMapper_v0_3.

  • Field Details

  • Method Details

    • toV10

      default Artifact toV10(Artifact_v0_3 v03)
      Converts v0.3 Artifact to v1.0 Artifact.

      Converts all Part instances in the parts list using PartMapper.

      Parameters:
      v03 - the v0.3 artifact
      Returns:
      the equivalent v1.0 artifact
    • fromV10

      default Artifact_v0_3 fromV10(Artifact v10)
      Converts v1.0 Artifact to v0.3 Artifact.

      Converts all Part instances in the parts list using PartMapper.

      Parameters:
      v10 - the v1.0 artifact
      Returns:
      the equivalent v0.3 artifact