package p.packer.messages;

import p.packer.dtos.PackerPackSummaryDTO;

import java.util.Objects;

public record PackWorkspaceSummaryResult(
        PackerOperationStatus status,
        String summary,
        PackerPackSummaryDTO packSummary) {

    public PackWorkspaceSummaryResult {
        Objects.requireNonNull(status, "status");
        summary = Objects.requireNonNull(summary, "summary").trim();
        Objects.requireNonNull(packSummary, "packSummary");
        if (summary.isBlank()) {
            throw new IllegalArgumentException("summary must not be blank");
        }
    }
}
