#pragma once

// 包含所有 LSP 协议定义
#include <glaze/glaze.hpp>
#include "./detail/basic_types.hpp"
#include "./detail/capabilities.hpp"
#include "./detail/code_actions.hpp"
#include "./detail/completion.hpp"
#include "./detail/configuration.hpp"
#include "./detail/diagnostics.hpp"
#include "./detail/document_features.hpp"
#include "./detail/document_sync.hpp"
#include "./detail/file_operations.hpp"
#include "./detail/formatting.hpp"
#include "./detail/inline_features.hpp"
#include "./detail/message.hpp"
#include "./detail/navigation.hpp"
#include "./detail/notebook.hpp"
#include "./detail/progress.hpp"
#include "./detail/registration.hpp"
#include "./detail/rename.hpp"
#include "./detail/semantic_tokens.hpp"
#include "./detail/signature_help.hpp"
#include "./detail/symbols.hpp"
#include "./detail/workspace.hpp"

namespace glz
{
    // 为 LSPAny 提供 glaze 支持
    template<>
    struct meta<lsp::protocol::LSPAny>
    {
        static constexpr std::string_view name = "LSPAny";
        using T = lsp::protocol::LSPAny;
        static constexpr auto value = &T::value;
    };

    template<>
    struct meta<lsp::protocol::RequestMessage>
    {
        using T = lsp::protocol::RequestMessage;
        static constexpr auto value = glz::object(
            &T::jsonrpc,
            &T::id,
            &T::method,
            &T::params
        );
    };

    template<>
    struct meta<lsp::protocol::ResponseError>
    {
        using T = lsp::protocol::ResponseError;
        static constexpr auto value = glz::object(
            &T::jsonrpc,
            &T::code,
            &T::message,
            &T::data
        );
    };

    template<>
    struct meta<lsp::protocol::ResponseMessage>
    {
        using T = lsp::protocol::ResponseMessage;
        static constexpr auto value = glz::object(
            &T::jsonrpc,
            &T::id,
            &T::result,
            &T::error
        );
    };

    template<>
    struct meta<lsp::protocol::NotificationMessage>
    {
        using T = lsp::protocol::NotificationMessage;
        static constexpr auto value = glz::object(
            &T::jsonrpc,
            &T::method,
            &T::params
        );
    };

    template<>
    struct meta<lsp::protocol::AnnotatedTextEdit>
    {
        using T = lsp::protocol::AnnotatedTextEdit;
        static constexpr auto value = glz::object(
            &T::range,
            &T::newText,
            &T::annotationId
        );
    };

    template<>
    struct meta<lsp::protocol::InitializeParams>
    {
        using T = lsp::protocol::InitializeParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::processId,
            &T::clientInfo,
            &T::locale,
            &T::rootPath,
            &T::rootUri,
            &T::initializationOptions,
            &T::capabilities,
            &T::trace,
            &T::workspaceFolders
        );
    };

    template<>
    struct meta<lsp::protocol::CodeActionOptions>
    {
        using T = lsp::protocol::CodeActionOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::codeActionKinds,
            &T::resolveProvider
        );
    };

    template<>
    struct meta<lsp::protocol::CodeActionRegistrationOptions>
    {
        using T = lsp::protocol::CodeActionRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::codeActionKinds,
            &T::resolveProvider
        );
    };

    template<>
    struct meta<lsp::protocol::CodeActionParams>
    {
        using T = lsp::protocol::CodeActionParams;
        static constexpr auto value = glz::object(
            &T::textDocument,
            &T::position,
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::range,
            &T::context
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentColorOptions>
    {
        using T = lsp::protocol::DocumentColorOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentColorRegistrationOptions>
    {
        using T = lsp::protocol::DocumentColorRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id);
    };

    template<>
    struct meta<lsp::protocol::DocumentColorParams>
    {
        using T = lsp::protocol::DocumentColorParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument);
    };

    template<>
    struct meta<lsp::protocol::ColorPresentationParams>
    {
        using T = lsp::protocol::ColorPresentationParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::color,
            &T::range);
    };

    template<>
    struct meta<lsp::protocol::CompletionOptions>
    {
        using T = lsp::protocol::CompletionOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::triggerCharacters,
            &T::allCommitCharacters,
            &T::resolveProvider,
            &T::completionItem
        );
    };

    template<>
    struct meta<lsp::protocol::CompletionRegistrationOptions>
    {
        using T = lsp::protocol::CompletionRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::triggerCharacters,
            &T::allCommitCharacters,
            &T::resolveProvider,
            &T::completionItem
        );
    };

    template<>
    struct meta<lsp::protocol::CompletionParams>
    {
        using T = lsp::protocol::CompletionParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::position,
            &T::context
        );
    };

    template<>
    struct meta<lsp::protocol::ExecuteCommandOptions>
    {
        using T = lsp::protocol::ExecuteCommandOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::commands
        );
    };

    template<>
    struct meta<lsp::protocol::ExecuteCommandRegistrationOptions>
    {
        using T = lsp::protocol::ExecuteCommandRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::commands
        );
    };

    template<>
    struct meta<lsp::protocol::ExecuteCommandParams>
    {
        using T = lsp::protocol::ExecuteCommandParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::arguments
        );
    };

    template<>
    struct meta<lsp::protocol::DiagnosticOptions>
    {
        using T = lsp::protocol::DiagnosticOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::interFileDependencies,
            &T::workspaceDiagnostics
        );
    };

    template<>
    struct meta<lsp::protocol::DiagnosticRegistrationOptions>
    {
        using T = lsp::protocol::DiagnosticRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id,
            &T::workDoneProgress,
            &T::interFileDependencies,
            &T::workspaceDiagnostics
        );
    };

    template<>
    struct meta<lsp::protocol::DiagnosticParams>
    {
        using T = lsp::protocol::DiagnosticParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::identifier,
            &T::previousResultId
        );
    };

    template<>
    struct meta<lsp::protocol::PublishDiagnosticsClientCapabilities>
    {
        using T = lsp::protocol::PublishDiagnosticsClientCapabilities;
        static constexpr auto value = glz::object(
            &T::dynamicRegistration,
            &T::relatedDocumentSupport,
            &T::relatedInformation,
            &T::tagSupport,
            &T::codeDescriptionSupport,
            &T::markupMessageSupport,
            &T::dataSupport,
            &T::versionSupport
        );
    };

    template<>
    struct meta<lsp::protocol::RelatedFullDocumentDiagnosticReport>
    {
        using T = lsp::protocol::RelatedFullDocumentDiagnosticReport;
        static constexpr auto value = glz::object(
            &T::kind,
            &T::resultId,
            &T::items,
            &T::relatedDocuments
        );
    };

    template<>
    struct meta<lsp::protocol::RelatedUnchangedDocumentDiagnosticReport>
    {
        using T = lsp::protocol::RelatedUnchangedDocumentDiagnosticReport;
        static constexpr auto value = glz::object(
            &T::kind,
            &T::resultId,
            &T::relatedDocuments
        );
    };

    template<>
    struct meta<lsp::protocol::WorkspaceDiagnosticParams>
    {
        using T = lsp::protocol::WorkspaceDiagnosticParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::identifier,
            &T::previousResultIds
        );
    };

    template<>
    struct meta<lsp::protocol::WorkspaceFullDocumentDiagnosticReport>
    {
        using T = lsp::protocol::WorkspaceFullDocumentDiagnosticReport;
        static constexpr auto value = glz::object(
            &T::kind,
            &T::resultId,
            &T::items,
            &T::uri,
            &T::version
        );
    };

    template<>
    struct meta<lsp::protocol::WorkspaceUnchangedDocumentDiagnosticReport>
    {
        using T = lsp::protocol::WorkspaceUnchangedDocumentDiagnosticReport;
        static constexpr auto value = glz::object(
            &T::kind,
            &T::resultId,
            &T::uri,
            &T::version
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentHighlightOptions>
    {
        using T = lsp::protocol::DocumentHighlightOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentHighlightRegistrationOptions>
    {
        using T = lsp::protocol::DocumentHighlightRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentHighlightParams>
    {
        using T = lsp::protocol::DocumentHighlightParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentLinkOptions>
    {
        using T = lsp::protocol::DocumentLinkOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::resolveProvider
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentLinkRegistrationOptions>
    {
        using T = lsp::protocol::DocumentLinkRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::resolveProvider
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentLinkParams>
    {
        using T = lsp::protocol::DocumentLinkParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument
        );
    };

    template<>
    struct meta<lsp::protocol::HoverOptions>
    {
        using T = lsp::protocol::HoverOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::HoverRegistrationOptions>
    {
        using T = lsp::protocol::HoverRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::HoverParams>
    {
        using T = lsp::protocol::HoverParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::CodeLensOptions>
    {
        using T = lsp::protocol::CodeLensOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::resolveProvider
        );
    };

    template<>
    struct meta<lsp::protocol::CodeLensRegistrationOptions>
    {
        using T = lsp::protocol::CodeLensRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::resolveProvider
        );
    };

    template<>
    struct meta<lsp::protocol::CodeLensParams>
    {
        using T = lsp::protocol::CodeLensParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument
        );
    };

    template<>
    struct meta<lsp::protocol::FoldingRangeOptions>
    {
        using T = lsp::protocol::FoldingRangeOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::FoldingRangeRegistrationOptions>
    {
        using T = lsp::protocol::FoldingRangeRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::FoldingRangeParams>
    {
        using T = lsp::protocol::FoldingRangeParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument
        );
    };

    template<>
    struct meta<lsp::protocol::SelectionRangeOptions>
    {
        using T = lsp::protocol::SelectionRangeOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::SelectionRangeRegistrationOptions>
    {
        using T = lsp::protocol::SelectionRangeRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::SelectionRangeParams>
    {
        using T = lsp::protocol::SelectionRangeParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::positions
        );
    };

    template<>
    struct meta<lsp::protocol::VersionedTextDocumentIdentifier>
    {
        using T = lsp::protocol::VersionedTextDocumentIdentifier;
        static constexpr auto value = glz::object(
            &T::uri,
            &T::version
        );
    };

    template<>
    struct meta<lsp::protocol::OptionalVersionedTextDocumentIdentifier>
    {
        using T = lsp::protocol::OptionalVersionedTextDocumentIdentifier;
        static constexpr auto value = glz::object(
            &T::uri,
            &T::version
        );
    };

    template<>
    struct meta<lsp::protocol::TextDocumentChangeRegistrationOptions>
    {
        using T = lsp::protocol::TextDocumentChangeRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::syncKind
        );
    };

    template<>
    struct meta<lsp::protocol::TextDocumentSaveRegistrationOptions>
    {
        using T = lsp::protocol::TextDocumentSaveRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::includeText
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentFormattingOptions>
    {
        using T = lsp::protocol::DocumentFormattingOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentFormattingRegistrationOptions>
    {
        using T = lsp::protocol::DocumentFormattingRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentFormattingParams>
    {
        using T = lsp::protocol::DocumentFormattingParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::options
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentRangeFormattingOptions>
    {
        using T = lsp::protocol::DocumentRangeFormattingOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::rangesSupport
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentRangeFormattingRegistrationOptions>
    {
        using T = lsp::protocol::DocumentRangeFormattingRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::rangesSupport
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentRangeFormattingParams>
    {
        using T = lsp::protocol::DocumentRangeFormattingParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::range,
            &T::options
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentOnTypeFormattingOptions>
    {
        using T = lsp::protocol::DocumentOnTypeFormattingOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::firstTriggerCharacter,
            &T::moreTriggerCharacter
        );
    };

    template<>
    struct meta<lsp::protocol::DocumentOnTypeFormattingRegistrationOptions>
    {
        using T = lsp::protocol::DocumentOnTypeFormattingRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::firstTriggerCharacter,
            &T::moreTriggerCharacter
        );
    };

    template<>
    struct meta<lsp::protocol::InlayHintOptions>
    {
        using T = lsp::protocol::InlayHintOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::resolveProvider
        );
    };

    template<>
    struct meta<lsp::protocol::InlayHintRegistrationOptions>
    {
        using T = lsp::protocol::InlayHintRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::resolveProvider,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::InlayHintParams>
    {
        using T = lsp::protocol::InlayHintParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::range
        );
    };

    template<>
    struct meta<lsp::protocol::InlineValueOptions>
    {
        using T = lsp::protocol::InlineValueOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::InlineValueRegistrationOptions>
    {
        using T = lsp::protocol::InlineValueRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::InlineValueParams>
    {
        using T = lsp::protocol::InlineValueParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::range,
            &T::context
        );
    };

    template<>
    struct meta<lsp::protocol::MonikerOptions>
    {
        using T = lsp::protocol::MonikerOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::MonikerRegistrationOptions>
    {
        using T = lsp::protocol::MonikerRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::MonikerParams>
    {
        using T = lsp::protocol::MonikerParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::DeclarationOptions>
    {
        using T = lsp::protocol::DeclarationOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::DeclarationRegistrationOptions>
    {
        using T = lsp::protocol::DeclarationRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::DeclarationParams>
    {
        using T = lsp::protocol::DeclarationParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::DefinitionOptions>
    {
        using T = lsp::protocol::DefinitionOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::DefinitionRegistrationOptions>
    {
        using T = lsp::protocol::DefinitionRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::DefinitionParams>
    {
        using T = lsp::protocol::DefinitionParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::TypeDefinitionOptions>
    {
        using T = lsp::protocol::TypeDefinitionOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::TypeDefinitionRegistrationOptions>
    {
        using T = lsp::protocol::TypeDefinitionRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::TypeDefinitionParams>
    {
        using T = lsp::protocol::TypeDefinitionParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::ImplementationOptions>
    {
        using T = lsp::protocol::ImplementationOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::ImplementationRegistrationOptions>
    {
        using T = lsp::protocol::ImplementationRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::ImplementationParams>
    {
        using T = lsp::protocol::ImplementationParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken
        );
    };

    template<>
    struct meta<lsp::protocol::ReferenceOptions>
    {
        using T = lsp::protocol::ReferenceOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::ReferenceRegistrationOptions>
    {
        using T = lsp::protocol::ReferenceRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::ReferenceParams>
    {
        using T = lsp::protocol::ReferenceParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::position,
            &T::context
        );
    };

    template<>
    struct meta<lsp::protocol::CallHierarchyOptions>
    {
        using T = lsp::protocol::CallHierarchyOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::CallHierarchyRegistrationOptions>
    {
        using T = lsp::protocol::CallHierarchyRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::CallHierarchyParams>
    {
        using T = lsp::protocol::CallHierarchyParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::CallHierarchyIncomingCallsParams>
    {
        using T = lsp::protocol::CallHierarchyIncomingCallsParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::item
        );
    };

    template<>
    struct meta<lsp::protocol::CallHierarchyOutgoingCallsParams>
    {
        using T = lsp::protocol::CallHierarchyIncomingCallsParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::item
        );
    };

    template<>
    struct meta<lsp::protocol::TypeHierarchyOptions>
    {
        using T = lsp::protocol::TypeHierarchyOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::TypeHierarchyRegistrationOptions>
    {
        using T = lsp::protocol::TypeHierarchyRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::TypeHierarchyParams>
    {
        using T = lsp::protocol::TypeHierarchyParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::TypeHierarchyPrepareParams>
    {
        using T = lsp::protocol::TypeHierarchyPrepareParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::TypeHierarchySubtypesParams>
    {
        using T = lsp::protocol::TypeHierarchySubtypesParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::item
        );
    };

    template<>
    struct meta<lsp::protocol::TypeHierarchySupertypesParams>
    {
        using T = lsp::protocol::TypeHierarchySupertypesParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::item
        );
    };

    template<>
    struct meta<lsp::protocol::NotebookDocumentSyncRegistrationOptions>
    {
        using T = lsp::protocol::NotebookDocumentSyncRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::notebookSelector,
            &T::save,
            &T::id
        );
    };

    template<>
    struct meta<lsp::protocol::RenameOptions>
    {
        using T = lsp::protocol::RenameOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::prepareProvider
        );
    };

    template<>
    struct meta<lsp::protocol::RenameRegistrationOptions>
    {
        using T = lsp::protocol::RenameRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::prepareProvider
        );
    };

    template<>
    struct meta<lsp::protocol::RenameParams>
    {
        using T = lsp::protocol::RenameParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::position,
            &T::newName
        );
    };

    template<>
    struct meta<lsp::protocol::PrepareRenameParams>
    {
        using T = lsp::protocol::PrepareRenameParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::position
        );
    };

    template<>
    struct meta<lsp::protocol::LinkedEditingRangeOptions>
    {
        using T = lsp::protocol::LinkedEditingRangeOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress
        );
    };

    template<>
    struct meta<lsp::protocol::LinkedEditingRangeRegistrationOptions>
    {
        using T = lsp::protocol::LinkedEditingRangeRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::id);
    };

    template<>
    struct meta<lsp::protocol::LinkedEditingRangeParams>
    {
        using T = lsp::protocol::LinkedEditingRangeParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::position);
    };

    template<>
    struct meta<lsp::protocol::SemanticTokensOptions>
    {
        using T = lsp::protocol::SemanticTokensOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::legend,
            &T::range,
            &T::full);
    };

    template<>
    struct meta<lsp::protocol::SemanticTokensRegistrationOptions>
    {
        using T = lsp::protocol::SemanticTokensRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::legend,
            &T::range,
            &T::full,
            &T::id);
    };

    template<>
    struct meta<lsp::protocol::SemanticTokensParams>
    {
        using T = lsp::protocol::SemanticTokensParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument);
    };

    template<>
    struct meta<lsp::protocol::SemanticTokensDeltaParams>
    {
        using T = lsp::protocol::SemanticTokensDeltaParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::previousResultId);
    };

    template<>
    struct meta<lsp::protocol::SemanticTokensRangeParams>
    {
        using T = lsp::protocol::SemanticTokensRangeParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument,
            &T::range);
    };

    template<>
    struct meta<lsp::protocol::SignatureHelpOptions>
    {
        using T = lsp::protocol::SignatureHelpOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::triggerCharacters,
            &T::retriggerCharacters);
    };

    template<>
    struct meta<lsp::protocol::SignatureHelpRegistrationOptions>
    {
        using T = lsp::protocol::SignatureHelpRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::triggerCharacters,
            &T::retriggerCharacters);
    };

    template<>
    struct meta<lsp::protocol::SignatureHelpParams>
    {
        using T = lsp::protocol::SignatureHelpParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::textDocument,
            &T::position,
            &T::contextSupport);
    };

    template<>
    struct meta<lsp::protocol::DocumentSymbolOptions>
    {
        using T = lsp::protocol::DocumentSymbolOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::label);
    };

    template<>
    struct meta<lsp::protocol::DocumentSymbolRegistrationOptions>
    {
        using T = lsp::protocol::DocumentSymbolRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::documentSelector,
            &T::workDoneProgress,
            &T::label);
    };

    template<>
    struct meta<lsp::protocol::DocumentSymbolParams>
    {
        using T = lsp::protocol::DocumentSymbolParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::textDocument);
    };

    template<>
    struct meta<lsp::protocol::WorkspaceSymbolOptions>
    {
        using T = lsp::protocol::WorkspaceSymbolOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::resolveProvider);
    };

    template<>
    struct meta<lsp::protocol::WorkspaceSymbolRegistrationOptions>
    {
        using T = lsp::protocol::WorkspaceSymbolRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::resolveProvider);
    };

    template<>
    struct meta<lsp::protocol::WorkspaceSymbolParams>
    {
        using T = lsp::protocol::WorkspaceSymbolParams;
        static constexpr auto value = glz::object(
            &T::workDoneToken,
            &T::partialResultToken,
            &T::query);
    };

    template<>
    struct meta<lsp::protocol::InlineCompletionOptions>
    {
        using T = lsp::protocol::InlineCompletionOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress);
    };

    template<>
    struct meta<lsp::protocol::InlineCompletionRegistrationOptions>
    {
        using T = lsp::protocol::InlineCompletionRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::workDoneProgress,
            &T::documentSelector,
            &T::id
            );
    };

    template<>
    struct meta<lsp::protocol::TextDocumentContentRegistrationOptions>
    {
        using T = lsp::protocol::TextDocumentContentRegistrationOptions;
        static constexpr auto value = glz::object(
            &T::schemes,
            &T::id
            );
    };

    template<>
    struct meta<lsp::protocol::InlineCompletionParams>
    {
        using T = lsp::protocol::InlineCompletionParams;
        static constexpr auto value = glz::object(
            &T::textDocument,
            &T::position,
            &T::workDoneToken,
            &T::context
            );
    };
}

