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

/**
 * ONNX Runtime execution provider type.
 *
 * Determines which hardware backend is used for model inference.
 * `Auto` (default) selects the best available provider per platform.
 */
enum class ExecutionProviderType {
    /** Auto-select: CoreML on macOS, CUDA on Linux, CPU elsewhere. */
    @com.fasterxml.jackson.annotation.JsonProperty("auto")
    AUTO,
    /** CPU execution provider (always available). */
    @com.fasterxml.jackson.annotation.JsonProperty("cpu")
    CPU,
    /** Apple CoreML (macOS/iOS Neural Engine + GPU). */
    @com.fasterxml.jackson.annotation.JsonProperty("coreml")
    CORE_ML,
    /** NVIDIA CUDA GPU acceleration. */
    @com.fasterxml.jackson.annotation.JsonProperty("cuda")
    CUDA,
    /** NVIDIA TensorRT (optimized CUDA inference). */
    @com.fasterxml.jackson.annotation.JsonProperty("tensorrt")
    TENSOR_RT;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        AUTO -> "auto"
        CPU -> "cpu"
        CORE_ML -> "coreml"
        CUDA -> "cuda"
        TENSOR_RT -> "tensorrt"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): ExecutionProviderType = when (value) {
            "auto" -> AUTO
            "cpu" -> CPU
            "coreml" -> CORE_ML
            "cuda" -> CUDA
            "tensorrt" -> TENSOR_RT
            else -> throw IllegalArgumentException("Unknown ExecutionProviderType value: $value")
        }
    }
}
