// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from tts_backend.djinni

#pragma once

#include <functional>

namespace prism::java {

enum class BackendError : int {
    OK = 0,
    NOT_INITIALIZED = 1,
    INVALID_PARAM = 2,
    NOT_IMPLEMENTED = 3,
    NO_VOICES = 4,
    VOICE_NOT_FOUND = 5,
    SPEAK_FAILURE = 6,
    MEMORY_FAILURE = 7,
    RANGE_OUT_OF_BOUNDS = 8,
    INTERNAL_BACKEND_ERROR = 9,
    NOT_SPEAKING = 10,
    NOT_PAUSED = 11,
    ALREADY_PAUSED = 12,
    INVALID_UTF8 = 13,
    INVALID_OPERATION = 14,
    ALREADY_INITIALIZED = 15,
    BACKEND_NOT_AVAILABLE = 16,
    UNKNOWN = 17,
};

constexpr const char* to_string(BackendError e) noexcept {
    constexpr const char* names[] = {
        "ok",
        "not_initialized",
        "invalid_param",
        "not_implemented",
        "no_voices",
        "voice_not_found",
        "speak_failure",
        "memory_failure",
        "range_out_of_bounds",
        "internal_backend_error",
        "not_speaking",
        "not_paused",
        "already_paused",
        "invalid_utf8",
        "invalid_operation",
        "already_initialized",
        "backend_not_available",
        "unknown",
    };
    return names[static_cast<int>(e)];
}

} // namespace prism::java

namespace std {

template <>
struct hash<::prism::java::BackendError> {
    size_t operator()(::prism::java::BackendError type) const {
        return std::hash<int>()(static_cast<int>(type));
    }
};

} // namespace std
