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

/**
 * A text chunk with optional embedding and metadata.
 *
 * Chunks are created when chunking is enabled in `ExtractionConfig`. Each chunk
 * contains the text content, optional embedding vector (if embedding generation
 * is configured), and metadata about its position in the document.
 */
data class Chunk(
    /** The text content of this chunk. */
    val content: String,
    /**
     * Semantic structural classification of this chunk.
     *
     * Assigned by the heuristic classifier based on content patterns and
     * heading context. Defaults to `ChunkType.Unknown` when no rule matches.
     */
    val chunkType: ChunkType,
    /**
     * Optional embedding vector for this chunk.
     *
     * Only populated when `EmbeddingConfig` is provided in chunking configuration.
     * The dimensionality depends on the chosen embedding model.
     */
    val embedding: List<Float>? = null,
    /** Metadata about this chunk's position and properties. */
    val metadata: ChunkMetadata,
)
