package p.packer.messages;

import java.util.Objects;

public record MoveAssetRequest(
        PackerProjectContext project,
        AssetReference assetReference,
        String targetRoot) {

    public MoveAssetRequest {
        Objects.requireNonNull(project, "project");
        Objects.requireNonNull(assetReference, "assetReference");
        targetRoot = Objects.requireNonNull(targetRoot, "targetRoot").trim();
        if (targetRoot.isBlank()) {
            throw new IllegalArgumentException("targetRoot must not be blank");
        }
    }
}
