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

/** Heuristic classification of what an image likely depicts. */
enum class ImageKind {
    /** Photographic image (natural scene, photograph) */
    @com.fasterxml.jackson.annotation.JsonProperty("photograph")
    PHOTOGRAPH,
    /** Technical or schematic diagram */
    @com.fasterxml.jackson.annotation.JsonProperty("diagram")
    DIAGRAM,
    /** Chart, graph, or plot */
    @com.fasterxml.jackson.annotation.JsonProperty("chart")
    CHART,
    /** Freehand or technical drawing */
    @com.fasterxml.jackson.annotation.JsonProperty("drawing")
    DRAWING,
    /** Text-heavy image (scanned text, document) */
    @com.fasterxml.jackson.annotation.JsonProperty("text_block")
    TEXT_BLOCK,
    /** Decorative element or border */
    @com.fasterxml.jackson.annotation.JsonProperty("decoration")
    DECORATION,
    /** Logo or brand mark */
    @com.fasterxml.jackson.annotation.JsonProperty("logo")
    LOGO,
    /** Small icon */
    @com.fasterxml.jackson.annotation.JsonProperty("icon")
    ICON,
    /** Fragment of a larger tiled image (tile of a technical drawing) */
    @com.fasterxml.jackson.annotation.JsonProperty("tile_fragment")
    TILE_FRAGMENT,
    /** Mask or transparency map */
    @com.fasterxml.jackson.annotation.JsonProperty("mask")
    MASK,
    /** Full-page render produced during OCR preprocessing; used as a citation thumbnail. */
    @com.fasterxml.jackson.annotation.JsonProperty("page_raster")
    PAGE_RASTER,
    /** Could not classify with reasonable confidence */
    @com.fasterxml.jackson.annotation.JsonProperty("unknown")
    UNKNOWN;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        PHOTOGRAPH -> "photograph"
        DIAGRAM -> "diagram"
        CHART -> "chart"
        DRAWING -> "drawing"
        TEXT_BLOCK -> "text_block"
        DECORATION -> "decoration"
        LOGO -> "logo"
        ICON -> "icon"
        TILE_FRAGMENT -> "tile_fragment"
        MASK -> "mask"
        PAGE_RASTER -> "page_raster"
        UNKNOWN -> "unknown"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): ImageKind = when (value) {
            "photograph" -> PHOTOGRAPH
            "diagram" -> DIAGRAM
            "chart" -> CHART
            "drawing" -> DRAWING
            "text_block" -> TEXT_BLOCK
            "decoration" -> DECORATION
            "logo" -> LOGO
            "icon" -> ICON
            "tile_fragment" -> TILE_FRAGMENT
            "mask" -> MASK
            "page_raster" -> PAGE_RASTER
            "unknown" -> UNKNOWN
            else -> throw IllegalArgumentException("Unknown ImageKind value: $value")
        }
    }
}
