package p.packer.messages.assets;

import java.util.List;
import java.util.Objects;

public record ScenePackRequest(
        int version,
        List<ScenePackLayerRequest> layers) {

    public ScenePackRequest {
        layers = List.copyOf(Objects.requireNonNull(layers, "layers"));
        if (version <= 0) {
            throw new IllegalArgumentException("version must be positive");
        }
        if (layers.size() != 4) {
            throw new IllegalArgumentException("layers must contain exactly 4 entries");
        }
    }
}
