// Generated by alef. Do not edit by hand.
@file:Suppress(
    "ktlint:standard:trailing-comma-on-call-site",
    "ktlint:standard:trailing-comma-on-declaration-site",
    "ktlint:standard:spacing-between-declarations-with-comments",
    "ktlint:standard:spacing-between-declarations-with-annotations",
    "ktlint:standard:when-entry-bracing",
    "ktlint:standard:blank-line-between-when-conditions",
    "ktlint:standard:blank-line-before-declaration",
    "ktlint:standard:chain-method-continuation",
    "ktlint:standard:annotation",
    "ktlint:standard:max-line-length",
    "ktlint:standard:no-semi",
    "ktlint:standard:statement-wrapping",
    "MaxLineLength",
    "TooManyFunctions",
    "FunctionParameterNaming",
    "LongParameterList",
    "CyclomaticComplexMethod",
    "LongMethod",
)

package dev.kreuzberg

/**
 * Processing stages for post-processors.
 *
 * Post-processors are executed in stage order (Early → Middle → Late).
 * Use stages to control the order of post-processing operations.
 */
enum class ProcessingStage {
    /**
     * Early stage - foundational processing.
     *
     * Use for:
     *
     * - Language detection
     * - Character encoding normalization
     * - Entity extraction (NER)
     * - Text quality scoring
     */
    @com.fasterxml.jackson.annotation.JsonProperty("Early")
    EARLY,
    /**
     * Middle stage - content transformation.
     *
     * Use for:
     *
     * - Keyword extraction
     * - Token reduction
     * - Text summarization
     * - Semantic analysis
     */
    @com.fasterxml.jackson.annotation.JsonProperty("Middle")
    MIDDLE,
    /**
     * Late stage - final enrichment.
     *
     * Use for:
     *
     * - Custom user hooks
     * - Analytics/logging
     * - Final validation
     * - Output formatting
     */
    @com.fasterxml.jackson.annotation.JsonProperty("Late")
    LATE;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        EARLY -> "Early"
        MIDDLE -> "Middle"
        LATE -> "Late"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): ProcessingStage = when (value) {
            "Early", "early" -> EARLY
            "Middle", "middle" -> MIDDLE
            "Late", "late" -> LATE
            else -> throw IllegalArgumentException("Unknown ProcessingStage value: $value")
        }
    }
}
