// 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 FracType {
    @com.fasterxml.jackson.annotation.JsonProperty("Bar")
    BAR,
    @com.fasterxml.jackson.annotation.JsonProperty("NoBar")
    NO_BAR,
    @com.fasterxml.jackson.annotation.JsonProperty("Linear")
    LINEAR,
    @com.fasterxml.jackson.annotation.JsonProperty("Skewed")
    SKEWED;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        BAR -> "Bar"
        NO_BAR -> "NoBar"
        LINEAR -> "Linear"
        SKEWED -> "Skewed"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): FracType = when (value) {
            "Bar" -> BAR
            "NoBar" -> NO_BAR
            "Linear" -> LINEAR
            "Skewed" -> SKEWED
            else -> throw IllegalArgumentException("Unknown FracType value: $value")
        }
    }
}
