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

/**
 * Content rendering mode for code extraction.
 *
 * Controls how extracted code content is represented in the `content` field
 * of `ExtractionResult`.
 */
enum class CodeContentMode {
    /** Use TSLP semantic chunks as content (default). */
    @com.fasterxml.jackson.annotation.JsonProperty("chunks")
    CHUNKS,
    /** Use raw source code as content. */
    @com.fasterxml.jackson.annotation.JsonProperty("raw")
    RAW,
    /** Emit function/class headings + docstrings (no code bodies). */
    @com.fasterxml.jackson.annotation.JsonProperty("structure")
    STRUCTURE;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        CHUNKS -> "chunks"
        RAW -> "raw"
        STRUCTURE -> "structure"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): CodeContentMode = when (value) {
            "chunks" -> CHUNKS
            "raw" -> RAW
            "structure" -> STRUCTURE
            else -> throw IllegalArgumentException("Unknown CodeContentMode value: $value")
        }
    }
}
