package p.packer.dtos;

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

public record PackerPackSummaryDTO(
        int totalIncludedAssetCount,
        List<PackerPackSummaryAssetDTO> assets) {

    public PackerPackSummaryDTO {
        if (totalIncludedAssetCount < 0) {
            throw new IllegalArgumentException("totalIncludedAssetCount must not be negative");
        }
        assets = List.copyOf(Objects.requireNonNull(assets, "assets"));
    }
}
