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

enum class ReductionLevel {
    @com.fasterxml.jackson.annotation.JsonProperty("Off")
    OFF,
    @com.fasterxml.jackson.annotation.JsonProperty("Light")
    LIGHT,
    @com.fasterxml.jackson.annotation.JsonProperty("Moderate")
    MODERATE,
    @com.fasterxml.jackson.annotation.JsonProperty("Aggressive")
    AGGRESSIVE,
    @com.fasterxml.jackson.annotation.JsonProperty("Maximum")
    MAXIMUM;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        OFF -> "Off"
        LIGHT -> "Light"
        MODERATE -> "Moderate"
        AGGRESSIVE -> "Aggressive"
        MAXIMUM -> "Maximum"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): ReductionLevel = when (value) {
            "Off", "off" -> OFF
            "Light", "light" -> LIGHT
            "Moderate", "moderate" -> MODERATE
            "Aggressive", "aggressive" -> AGGRESSIVE
            "Maximum", "maximum" -> MAXIMUM
            else -> throw IllegalArgumentException("Unknown ReductionLevel value: $value")
        }
    }
}
