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

/**
 * Sensitivity decision governing whether AI-generated content may be written to log files.
 * <p>
 * The following AI-generated content items are classified as sensitive and are subject to
 * this decision:
 * <ul>
 *   <li>The <strong>complete AI raw response</strong> (full JSON body returned by the
 *       AI service)</li>
 *   <li>The <strong>complete AI {@code reasoning}</strong> field extracted from the
 *       AI response</li>
 * </ul>
 * <p>
 * Sensitive AI content is always written to SQLite (for traceability) regardless of
 * this decision. The decision controls only whether the content is also emitted into
 * log files.
 * <p>
 * <strong>Default behaviour:</strong> The default is {@link #PROTECT_SENSITIVE_CONTENT}.
 * Logging of sensitive AI content must be explicitly enabled by setting the boolean
 * configuration property {@code log.ai.sensitive = true}. Any other value, or the
 * absence of the property, results in {@link #PROTECT_SENSITIVE_CONTENT}.
 * <p>
 * <strong>Non-sensitive AI content</strong> (e.g. the resolved title, the resolved date,
 * the date source) is not covered by this decision and may always be logged.
 */
public enum AiContentSensitivity {

    /**
     * Sensitive AI content (raw response, reasoning) must <strong>not</strong> be written
     * to log files.
     * <p>
     * This is the safe default. It is active whenever {@code log.ai.sensitive} is absent,
     * {@code false}, or set to any value other than the explicit opt-in.
     */
    PROTECT_SENSITIVE_CONTENT,

    /**
     * Sensitive AI content (raw response, reasoning) <strong>may</strong> be written
     * to log files.
     * <p>
     * This value is only produced when {@code log.ai.sensitive = true} is explicitly set
     * in the application configuration. It must never be the implicit default.
     */
    LOG_SENSITIVE_CONTENT
}
