package p.studio.workspaces.assets.metadata;

import java.util.Objects;

public record AssetStudioGlyphMaterialArtifactBinding(
        String artifactId,
        String fingerprint) {

    public AssetStudioGlyphMaterialArtifactBinding {
        artifactId = Objects.requireNonNull(artifactId, "artifactId").trim();
        fingerprint = Objects.requireNonNull(Objects.requireNonNullElse(fingerprint, ""), "fingerprint").trim();
        if (artifactId.isBlank()) {
            throw new IllegalArgumentException("artifactId must not be blank");
        }
        if (fingerprint.isBlank()) {
            throw new IllegalArgumentException("fingerprint must not be blank");
        }
    }
}
