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 Summary
FieldsModifier and TypeFieldDescriptionstatic final ArtifactMapper_v0_3Singleton instance accessed viaA2AMappers_v0_3factory. -
Method Summary
Modifier and TypeMethodDescriptiondefault Artifact_v0_3Converts v1.0 Artifact to v0.3 Artifact.default ArtifacttoV10(Artifact_v0_3 v03) Converts v0.3 Artifact to v1.0 Artifact.
-
Field Details
-
INSTANCE
Singleton instance accessed viaA2AMappers_v0_3factory.
-
-
Method Details
-
toV10
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
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
-