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

/** How the extracted text was produced. */
enum class ExtractionMethod {
    @com.fasterxml.jackson.annotation.JsonProperty("native")
    NATIVE,
    @com.fasterxml.jackson.annotation.JsonProperty("ocr")
    OCR,
    @com.fasterxml.jackson.annotation.JsonProperty("mixed")
    MIXED;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        NATIVE -> "native"
        OCR -> "ocr"
        MIXED -> "mixed"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): ExtractionMethod = when (value) {
            "native" -> NATIVE
            "ocr" -> OCR
            "mixed" -> MIXED
            else -> throw IllegalArgumentException("Unknown ExtractionMethod value: $value")
        }
    }
}
