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

/** Structured data type classification. */
enum class StructuredDataType {
    /** JSON-LD structured data */
    @com.fasterxml.jackson.annotation.JsonProperty("json-ld")
    JSON_LD,
    /** Microdata */
    @com.fasterxml.jackson.annotation.JsonProperty("microdata")
    MICRODATA,
    /** RDFa */
    @com.fasterxml.jackson.annotation.JsonProperty("rdfa")
    R_D_FA;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        JSON_LD -> "json-ld"
        MICRODATA -> "microdata"
        R_D_FA -> "rdfa"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): StructuredDataType = when (value) {
            "json-ld" -> JSON_LD
            "microdata" -> MICRODATA
            "rdfa" -> R_D_FA
            else -> throw IllegalArgumentException("Unknown StructuredDataType value: $value")
        }
    }
}
