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

/** Image type classification. */
enum class ImageType {
    /** Data URI image */
    @com.fasterxml.jackson.annotation.JsonProperty("data-uri")
    DATA_URI,
    /** Inline SVG */
    @com.fasterxml.jackson.annotation.JsonProperty("inline-svg")
    INLINE_SVG,
    /** External image URL */
    @com.fasterxml.jackson.annotation.JsonProperty("external")
    EXTERNAL,
    /** Relative path image */
    @com.fasterxml.jackson.annotation.JsonProperty("relative")
    RELATIVE;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        DATA_URI -> "data-uri"
        INLINE_SVG -> "inline-svg"
        EXTERNAL -> "external"
        RELATIVE -> "relative"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): ImageType = when (value) {
            "data-uri" -> DATA_URI
            "inline-svg" -> INLINE_SVG
            "external" -> EXTERNAL
            "relative" -> RELATIVE
            else -> throw IllegalArgumentException("Unknown ImageType value: $value")
        }
    }
}
