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

/** Type of PDF annotation. */
enum class PdfAnnotationType {
    /** Sticky note / text annotation */
    @com.fasterxml.jackson.annotation.JsonProperty("text")
    TEXT,
    /** Highlighted text region */
    @com.fasterxml.jackson.annotation.JsonProperty("highlight")
    HIGHLIGHT,
    /** Hyperlink annotation */
    @com.fasterxml.jackson.annotation.JsonProperty("link")
    LINK,
    /** Rubber stamp annotation */
    @com.fasterxml.jackson.annotation.JsonProperty("stamp")
    STAMP,
    /** Underline text markup */
    @com.fasterxml.jackson.annotation.JsonProperty("underline")
    UNDERLINE,
    /** Strikeout text markup */
    @com.fasterxml.jackson.annotation.JsonProperty("strike_out")
    STRIKE_OUT,
    /** Any other annotation type */
    @com.fasterxml.jackson.annotation.JsonProperty("other")
    OTHER;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        TEXT -> "text"
        HIGHLIGHT -> "highlight"
        LINK -> "link"
        STAMP -> "stamp"
        UNDERLINE -> "underline"
        STRIKE_OUT -> "strike_out"
        OTHER -> "other"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): PdfAnnotationType = when (value) {
            "text" -> TEXT
            "highlight" -> HIGHLIGHT
            "link" -> LINK
            "stamp" -> STAMP
            "underline" -> UNDERLINE
            "strike_out" -> STRIKE_OUT
            "other" -> OTHER
            else -> throw IllegalArgumentException("Unknown PdfAnnotationType value: $value")
        }
    }
}
