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

/** Type of list detection. */
enum class ListType {
    /** Bullet points (-, *, •, etc.) */
    @com.fasterxml.jackson.annotation.JsonProperty("Bullet")
    BULLET,
    /** Numbered lists (1., 2., etc.) */
    @com.fasterxml.jackson.annotation.JsonProperty("Numbered")
    NUMBERED,
    /** Lettered lists (a., b., A., B., etc.) */
    @com.fasterxml.jackson.annotation.JsonProperty("Lettered")
    LETTERED,
    /** Indented items */
    @com.fasterxml.jackson.annotation.JsonProperty("Indented")
    INDENTED;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        BULLET -> "Bullet"
        NUMBERED -> "Numbered"
        LETTERED -> "Lettered"
        INDENTED -> "Indented"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): ListType = when (value) {
            "Bullet", "bullet" -> BULLET
            "Numbered", "numbered" -> NUMBERED
            "Lettered", "lettered" -> LETTERED
            "Indented", "indented" -> INDENTED
            else -> throw IllegalArgumentException("Unknown ListType value: $value")
        }
    }
}
