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

/**
 * Result-shape selection for extraction results.
 *
 * Distinct from `OutputFormat` (which controls rendering — Plain, Markdown,
 * HTML, etc.). `ResultFormat` controls the *shape* of the result: a unified content
 * blob vs. an element-based decomposition.
 */
enum class ResultFormat {
    /** Unified format with all content in `content` field */
    @com.fasterxml.jackson.annotation.JsonProperty("unified")
    UNIFIED,
    /** Element-based format with semantic element extraction */
    @com.fasterxml.jackson.annotation.JsonProperty("element_based")
    ELEMENT_BASED;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        UNIFIED -> "unified"
        ELEMENT_BASED -> "element_based"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): ResultFormat = when (value) {
            "unified" -> UNIFIED
            "element_based" -> ELEMENT_BASED
            else -> throw IllegalArgumentException("Unknown ResultFormat value: $value")
        }
    }
}
