package de.gecheckt.pdf.umbenenner.application.port.out;

import java.util.Objects;

import de.gecheckt.pdf.umbenenner.domain.model.DocumentFingerprint;

/**
 * Successful outcome of a fingerprint computation.
 * <p>
 * Carries the computed {@link DocumentFingerprint} that uniquely identifies the
 * document by its content. The fingerprint can now be used as the primary key
 * for all subsequent persistence operations.
 *
 * @param fingerprint the successfully computed fingerprint; never null
 */
public record FingerprintSuccess(DocumentFingerprint fingerprint) implements FingerprintResult {

    /**
     * Compact constructor validating the non-null contract.
     *
     * @throws NullPointerException if {@code fingerprint} is null
     */
    public FingerprintSuccess {
        Objects.requireNonNull(fingerprint, "fingerprint must not be null");
    }
}
