// 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

/** A single backend stage in the OCR pipeline. */
data class OcrPipelineStage(
    /** Backend name: "tesseract", "paddleocr", "easyocr", or a custom registered name. */
    val backend: String,
    /** Priority weight (higher = tried first). Stages are sorted by priority descending. */
    val priority: Int,
    /** Language override for this stage (None = use parent OcrConfig.language). */
    val language: String? = null,
    /** Tesseract-specific config override for this stage. */
    val tesseractConfig: TesseractConfig? = null,
    /** PaddleOCR-specific config for this stage. */
    val paddleOcrConfig: Any? = null,
    /** VLM config override for this pipeline stage. */
    val vlmConfig: LlmConfig? = null,
    /**
     * Arbitrary per-call options passed through to the backend unchanged.
     *
     * Backends that support runtime tuning (mode switching, preprocessing
     * flags, inference parameters, etc.) read this value and deserialize
     * the keys they care about. Keys unknown to the backend are silently
     * ignored, so options from different backends can coexist in the same
     * config without conflict.
     *
     * Example (custom backend):
     * ```json
     * { "mode": "fast", "enable_layout": true }
     * ```
     */
    val backendOptions: Any? = null,
)
