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

/**
 * Supported languages in PaddleOCR.
 *
 * Maps user-friendly language codes to paddle-ocr-rs language identifiers.
 */
enum class PaddleLanguage {
    /** English */
    @com.fasterxml.jackson.annotation.JsonProperty("English")
    ENGLISH,
    /** Simplified Chinese */
    @com.fasterxml.jackson.annotation.JsonProperty("Chinese")
    CHINESE,
    /** Japanese */
    @com.fasterxml.jackson.annotation.JsonProperty("Japanese")
    JAPANESE,
    /** Korean */
    @com.fasterxml.jackson.annotation.JsonProperty("Korean")
    KOREAN,
    /** German */
    @com.fasterxml.jackson.annotation.JsonProperty("German")
    GERMAN,
    /** French */
    @com.fasterxml.jackson.annotation.JsonProperty("French")
    FRENCH,
    /** Latin script (covers most European languages) */
    @com.fasterxml.jackson.annotation.JsonProperty("Latin")
    LATIN,
    /** Cyrillic (Russian and related) */
    @com.fasterxml.jackson.annotation.JsonProperty("Cyrillic")
    CYRILLIC,
    /** Traditional Chinese */
    @com.fasterxml.jackson.annotation.JsonProperty("TraditionalChinese")
    TRADITIONAL_CHINESE,
    /** Thai */
    @com.fasterxml.jackson.annotation.JsonProperty("Thai")
    THAI,
    /** Greek */
    @com.fasterxml.jackson.annotation.JsonProperty("Greek")
    GREEK,
    /** East Slavic (Russian, Ukrainian, Belarusian) */
    @com.fasterxml.jackson.annotation.JsonProperty("EastSlavic")
    EAST_SLAVIC,
    /** Arabic (Arabic, Persian, Urdu) */
    @com.fasterxml.jackson.annotation.JsonProperty("Arabic")
    ARABIC,
    /** Devanagari (Hindi, Marathi, Sanskrit, Nepali) */
    @com.fasterxml.jackson.annotation.JsonProperty("Devanagari")
    DEVANAGARI,
    /** Tamil */
    @com.fasterxml.jackson.annotation.JsonProperty("Tamil")
    TAMIL,
    /** Telugu */
    @com.fasterxml.jackson.annotation.JsonProperty("Telugu")
    TELUGU;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        ENGLISH -> "English"
        CHINESE -> "Chinese"
        JAPANESE -> "Japanese"
        KOREAN -> "Korean"
        GERMAN -> "German"
        FRENCH -> "French"
        LATIN -> "Latin"
        CYRILLIC -> "Cyrillic"
        TRADITIONAL_CHINESE -> "TraditionalChinese"
        THAI -> "Thai"
        GREEK -> "Greek"
        EAST_SLAVIC -> "EastSlavic"
        ARABIC -> "Arabic"
        DEVANAGARI -> "Devanagari"
        TAMIL -> "Tamil"
        TELUGU -> "Telugu"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): PaddleLanguage = when (value) {
            "English", "english" -> ENGLISH
            "Chinese", "chinese" -> CHINESE
            "Japanese", "japanese" -> JAPANESE
            "Korean", "korean" -> KOREAN
            "German", "german" -> GERMAN
            "French", "french" -> FRENCH
            "Latin", "latin" -> LATIN
            "Cyrillic", "cyrillic" -> CYRILLIC
            "TraditionalChinese", "traditionalchinese" -> TRADITIONAL_CHINESE
            "Thai", "thai" -> THAI
            "Greek", "greek" -> GREEK
            "EastSlavic", "eastslavic" -> EAST_SLAVIC
            "Arabic", "arabic" -> ARABIC
            "Devanagari", "devanagari" -> DEVANAGARI
            "Tamil", "tamil" -> TAMIL
            "Telugu", "telugu" -> TELUGU
            else -> throw IllegalArgumentException("Unknown PaddleLanguage value: $value")
        }
    }
}
