// 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 single tracked change embedded in a document.
 *
 * Populated by per-format extractors that understand change-tracking metadata
 * (DOCX `w:ins`/`w:del`/`w:rPrChange`, ODT `text:change-*`, …). Every
 * extractor defaults to `ExtractionResult.revisions = None` until a
 * format-specific implementation is added.
 */
data class DocumentRevision(
    /**
     * Format-specific revision identifier.
     *
     * For DOCX this is the `w:id` attribute value on the change element
     * (e.g. `"42"`). When the attribute is absent a synthetic fallback is
     * generated (`"docx-ins-0"`, `"docx-del-3"`, …).
     */
    val revisionId: String,
    /** Display name of the author who made this change, when available. */
    val author: String? = null,
    /**
     * ISO-8601 timestamp of the change, when available.
     *
     * Stored as a plain string so this type remains FFI-friendly and
     * unconditionally available without the `chrono` optional dep.
     * DOCX populates this from the `w:date` attribute (e.g.
     * `"2024-03-15T10:30:00Z"`).
     */
    val timestamp: String? = null,
    /** Semantic kind of this revision. */
    val kind: RevisionKind,
    /**
     * Best-effort document location for this revision.
     *
     * Resolution is format-dependent and may be `null` when the location
     * cannot be determined (e.g. changes inside table cells before
     * table-cell anchor support is added).
     */
    @field:com.fasterxml.jackson.databind.annotation.JsonSerialize(`as` = RevisionAnchor::class)
    val anchor: RevisionAnchor? = null,
    /** The content changes that make up this revision. */
    val delta: RevisionDelta,
)
