// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant

// this file was generated by the generate.ts script

#ifndef QLANGUAGESERVERSPECTYPES_P_H
#define QLANGUAGESERVERSPECTYPES_P_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include <QtLanguageServer/qtlanguageserverglobal.h>
#include <QtLanguageServer/private/qlanguageserverprespectypes_p.h>
#include <QtJsonRpc/private/qtypedjson_p.h>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QJsonValue>
#include <QtCore/QJsonObject>
#include <QtCore/QString>
#include <QtCore/QMap>

#include <optional>
#include <variant>

QT_BEGIN_NAMESPACE

namespace QLspSpecification {
Q_NAMESPACE_EXPORT(Q_LANGUAGESERVER_EXPORT)

enum class TraceValue { Off, Messages, Verbose };
Q_ENUM_NS(TraceValue)

enum class ErrorCodes {
    // Defined by JSON RPC
    ParseError = -32700,
    InvalidRequest = -32600,
    MethodNotFound = -32601,
    InvalidParams = -32602,
    InternalError = -32603,

    jsonrpcReservedErrorRangeStart = -32099,
    /** @deprecated use jsonrpcReservedErrorRangeStart */
    serverErrorStart = jsonrpcReservedErrorRangeStart,

    ServerNotInitialized = -32002,
    UnknownErrorCode = -32001,

    jsonrpcReservedErrorRangeEnd = -32000,
    /** @deprecated use jsonrpcReservedErrorRangeEnd */
    serverErrorEnd = jsonrpcReservedErrorRangeEnd,

    lspReservedErrorRangeStart = -32899,

    ContentModified = -32801,
    RequestCancelled = -32800,

    lspReservedErrorRangeEnd = -32800
};
Q_ENUM_NS(ErrorCodes)

enum class CodeActionKind {
    Empty,
    QuickFix,
    Refactor,
    RefactorExtract,
    RefactorInline,
    RefactorRewrite,
    Source,
    SourceOrganizeImports,
    SourceFixAll
};
Q_ENUM_NS(CodeActionKind)

enum class CodeActionTriggerKind { Invoked = 1, Automatic = 2 };
Q_ENUM_NS(CodeActionTriggerKind)

enum class CompletionItemKind {
    Text = 1,
    Method = 2,
    Function = 3,
    Constructor = 4,
    Field = 5,
    Variable = 6,
    Class = 7,
    Interface = 8,
    Module = 9,
    Property = 10,
    Unit = 11,
    Value = 12,
    Enum = 13,
    Keyword = 14,
    Snippet = 15,
    Color = 16,
    File = 17,
    Reference = 18,
    Folder = 19,
    EnumMember = 20,
    Constant = 21,
    Struct = 22,
    Event = 23,
    Operator = 24,
    TypeParameter = 25
};
Q_ENUM_NS(CompletionItemKind)

enum class CompletionItemTag { Deprecated = 1 };
Q_ENUM_NS(CompletionItemTag)

enum class CompletionTriggerKind {
    Invoked = 1,
    TriggerCharacter = 2,
    TriggerForIncompleteCompletions = 3
};
Q_ENUM_NS(CompletionTriggerKind)

enum class DiagnosticSeverity { Error = 1, Warning = 2, Information = 3, Hint = 4 };
Q_ENUM_NS(DiagnosticSeverity)

enum class DiagnosticTag { Unnecessary = 1, Deprecated = 2 };
Q_ENUM_NS(DiagnosticTag)

enum class DocumentDiagnosticReportKind { Full, Unchanged };
Q_ENUM_NS(DocumentDiagnosticReportKind)

enum class DocumentHighlightKind { Text = 1, Read = 2, Write = 3 };
Q_ENUM_NS(DocumentHighlightKind)

enum class FailureHandlingKind { Abort, Transactional, TextOnlyTransactional, Undo };
Q_ENUM_NS(FailureHandlingKind)

enum class FileChangeType { Created = 1, Changed = 2, Deleted = 3 };
Q_ENUM_NS(FileChangeType)

enum class FileOperationPatternKind { File, Folder };
Q_ENUM_NS(FileOperationPatternKind)

enum class FoldingRangeKind { Comment, Imports, Region };
Q_ENUM_NS(FoldingRangeKind)

enum class InlayHintKind { Type = 1, Parameter = 2 };
Q_ENUM_NS(InlayHintKind)

enum class InlineCompletionTriggerKind { Invoked = 0, Automatic = 1 };
Q_ENUM_NS(InlineCompletionTriggerKind)

enum class InsertTextFormat { PlainText = 1, Snippet = 2 };
Q_ENUM_NS(InsertTextFormat)

enum class InsertTextMode { AsIs = 1, AdjustIndentation = 2 };
Q_ENUM_NS(InsertTextMode)

enum class LSPErrorCodes {
    RequestFailed = -32803,
    ServerCancelled = -32802,
    ContentModified = -32801,
    RequestCancelled = -32800
};
Q_ENUM_NS(LSPErrorCodes)

enum class MarkupKind { PlainText, Markdown };
Q_ENUM_NS(MarkupKind)

enum class MessageType { Error = 1, Warning = 2, Info = 3, Log = 4, Debug = 5 };
Q_ENUM_NS(MessageType)

enum class MonikerKind { Import, Export, Local };
Q_ENUM_NS(MonikerKind)

enum class NotebookCellKind { Markup = 1, Code = 2 };
Q_ENUM_NS(NotebookCellKind)

enum class PositionEncodingKind { UTF8, UTF16, UTF32 };
Q_ENUM_NS(PositionEncodingKind)

enum class PrepareSupportDefaultBehavior { Identifier = 1 };
Q_ENUM_NS(PrepareSupportDefaultBehavior)

enum class ResourceOperationKind { Create, Rename, Delete };
Q_ENUM_NS(ResourceOperationKind)

enum class SemanticTokenModifiers {
    Declaration,
    Definition,
    Readonly,
    Static,
    Deprecated,
    Abstract,
    Async,
    Modification,
    Documentation,
    DefaultLibrary
};
Q_ENUM_NS(SemanticTokenModifiers)

enum class SemanticTokenTypes {
    Namespace,
    Type,
    Class,
    Enum,
    Interface,
    Struct,
    TypeParameter,
    Parameter,
    Variable,
    Property,
    EnumMember,
    Event,
    Function,
    Method,
    Macro,
    Keyword,
    Modifier,
    Comment,
    String,
    Number,
    Regexp,
    Operator,
    Decorator
};
Q_ENUM_NS(SemanticTokenTypes)

enum class SignatureHelpTriggerKind { Invoked = 1, TriggerCharacter = 2, ContentChange = 3 };
Q_ENUM_NS(SignatureHelpTriggerKind)

enum class SymbolKind {
    File = 1,
    Module = 2,
    Namespace = 3,
    Package = 4,
    Class = 5,
    Method = 6,
    Property = 7,
    Field = 8,
    Constructor = 9,
    Enum = 10,
    Interface = 11,
    Function = 12,
    Variable = 13,
    Constant = 14,
    String = 15,
    Number = 16,
    Boolean = 17,
    Array = 18,
    Object = 19,
    Key = 20,
    Null = 21,
    EnumMember = 22,
    Struct = 23,
    Event = 24,
    Operator = 25,
    TypeParameter = 26
};
Q_ENUM_NS(SymbolKind)

enum class SymbolTag { Deprecated = 1 };
Q_ENUM_NS(SymbolTag)

enum class TextDocumentSaveReason { Manual = 1, AfterDelay = 2, FocusOut = 3 };
Q_ENUM_NS(TextDocumentSaveReason)

enum class TextDocumentSyncKind { None = 0, Full = 1, Incremental = 2 };
Q_ENUM_NS(TextDocumentSyncKind)

enum class TokenFormat { Relative };
Q_ENUM_NS(TokenFormat)

enum class TraceValues { Off, Messages, Verbose };
Q_ENUM_NS(TraceValues)

enum class UniquenessLevel { Document, Project, Group, Scheme, Global };
Q_ENUM_NS(UniquenessLevel)

enum class WatchKind { Create = 1, Change = 2, Delete = 4 };
Q_ENUM_NS(WatchKind)

class Q_LANGUAGESERVER_EXPORT Position
{
public:
    unsigned int line = { };
    unsigned int character = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "line", line);
        field(w, "character", character);
    }
};

class Q_LANGUAGESERVER_EXPORT Range
{
public:
    Position start = {};
    Position end = {};

    template <typename W>
    void walk(W &w)
    {
        field(w, "start", start);
        field(w, "end", end);
    }
};

class Q_LANGUAGESERVER_EXPORT SelectionRange
{
public:
    SelectionRange() = default;
    SelectionRange(const Range &r) : range(r) { }
    SelectionRange(const SelectionRange &o) : range(o.range)
    {
        if (o.parent)
            parent = std::make_unique<SelectionRange>(*o.parent);
    }
    SelectionRange &operator=(const SelectionRange &o)
    {
        range = o.range;
        if (o.parent)
            parent = std::make_unique<SelectionRange>(*o.parent);
        return *this;
    }
    SelectionRange(SelectionRange &&) noexcept = default;
    SelectionRange &operator=(SelectionRange &&) noexcept = default;

    Range range = {};
    std::unique_ptr<SelectionRange> parent;

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "parent", parent);
    }
};

class Q_LANGUAGESERVER_EXPORT RangePlaceHolder
{
public:
    Range range = {};
    QByteArray placeholder = {};

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "placeholder", placeholder);
    }
};

class Q_LANGUAGESERVER_EXPORT DefaultBehaviorStruct
{
public:
    bool defaultBehavior = {};

    template <typename W>
    void walk(W &w)
    {
        field(w, "defaultBehavior", defaultBehavior);
    }
};

class Q_LANGUAGESERVER_EXPORT TextEdit
{
public:
    Range range = {};
    QByteArray newText = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "newText", newText);
    }
};

class Q_LANGUAGESERVER_EXPORT Location
{
public:
    QByteArray uri = { };
    Range range = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
        field(w, "range", range);
    }
};

using Definition = std::variant<Location, QList<Location>>;
class Q_LANGUAGESERVER_EXPORT LocationLink
{
public:
    std::optional<Range> originSelectionRange = { };
    QByteArray targetUri = { };
    Range targetRange = { };
    Range targetSelectionRange = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "originSelectionRange", originSelectionRange);
        field(w, "targetUri", targetUri);
        field(w, "targetRange", targetRange);
        field(w, "targetSelectionRange", targetSelectionRange);
    }
};

using DefinitionLink = LocationLink;
using Declaration = std::variant<Location, QList<Location>>;
using DeclarationLink = LocationLink;
class Q_LANGUAGESERVER_EXPORT InlineValueText
{
public:
    Range range = { };
    QByteArray text = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "text", text);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineValueVariableLookup
{
public:
    Range range = { };
    std::optional<QByteArray> variableName = { };
    bool caseSensitiveLookup = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "variableName", variableName);
        field(w, "caseSensitiveLookup", caseSensitiveLookup);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineValueEvaluatableExpression
{
public:
    Range range = { };
    std::optional<QByteArray> expression = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "expression", expression);
    }
};

using InlineValue =
        std::variant<InlineValueText, InlineValueVariableLookup, InlineValueEvaluatableExpression>;
class Q_LANGUAGESERVER_EXPORT CodeDescription
{
public:
    QByteArray href = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "href", href);
    }
};

class Q_LANGUAGESERVER_EXPORT DiagnosticRelatedInformation
{
public:
    Location location = { };
    QByteArray message = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "location", location);
        field(w, "message", message);
    }
};

class Q_LANGUAGESERVER_EXPORT Diagnostic
{
public:
    Range range = { };
    std::optional<DiagnosticSeverity> severity = { };
    std::optional<std::variant<int, QByteArray>> code = { };
    std::optional<CodeDescription> codeDescription = { };
    std::optional<QByteArray> source = { };
    QByteArray message = { };
    std::optional<QList<DiagnosticTag>> tags = { };
    std::optional<QList<DiagnosticRelatedInformation>> relatedInformation = { };
    std::optional<QJsonValue> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "severity", severity);
        field(w, "code", code);
        field(w, "codeDescription", codeDescription);
        field(w, "source", source);
        field(w, "message", message);
        field(w, "tags", tags);
        field(w, "relatedInformation", relatedInformation);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT FullDocumentDiagnosticReport
{
public:
    static constexpr QByteArrayView kind = "full";
    std::optional<QByteArray> resultId = { };
    QList<Diagnostic> items = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "kind", kind);
        field(w, "resultId", resultId);
        field(w, "items", items);
    }
};

class Q_LANGUAGESERVER_EXPORT UnchangedDocumentDiagnosticReport
{
public:
    static constexpr QByteArrayView kind = "unchanged";
    QByteArray resultId = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "kind", kind);
        field(w, "resultId", resultId);
    }
};

class Q_LANGUAGESERVER_EXPORT RelatedFullDocumentDiagnosticReport
    : public FullDocumentDiagnosticReport
{
public:
    std::optional<
            QMap<QByteArray,
                 std::variant<FullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport>>>
            relatedDocuments = { };

    template <typename W>
    void walk(W &w)
    {
        FullDocumentDiagnosticReport::walk(w);
        field(w, "relatedDocuments", relatedDocuments);
    }
};

class Q_LANGUAGESERVER_EXPORT RelatedUnchangedDocumentDiagnosticReport
    : public UnchangedDocumentDiagnosticReport
{
public:
    std::optional<
            QMap<QByteArray,
                 std::variant<FullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport>>>
            relatedDocuments = { };

    template <typename W>
    void walk(W &w)
    {
        UnchangedDocumentDiagnosticReport::walk(w);
        field(w, "relatedDocuments", relatedDocuments);
    }
};

using DocumentDiagnosticReport =
        std::variant<RelatedFullDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport>;
class Q_LANGUAGESERVER_EXPORT PrepareRenameResultVariant1
{
public:
    Range range = { };
    QByteArray placeholder = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "placeholder", placeholder);
    }
};

class Q_LANGUAGESERVER_EXPORT PrepareRenameResultVariant2
{
public:
    bool defaultBehavior = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "defaultBehavior", defaultBehavior);
    }
};

using PrepareRenameResult =
        std::variant<Range, PrepareRenameResultVariant1, PrepareRenameResultVariant2>;
class Q_LANGUAGESERVER_EXPORT TextDocumentFilter
{
public:
    std::optional<QByteArray> language = { };
    std::optional<QByteArray> scheme = { };
    std::optional<QByteArray> pattern = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "language", language);
        field(w, "scheme", scheme);
        field(w, "pattern", pattern);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookDocumentFilter
{
public:
    std::optional<QByteArray> notebookType = { };
    std::optional<QByteArray> scheme = { };
    std::optional<QByteArray> pattern = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "notebookType", notebookType);
        field(w, "scheme", scheme);
        field(w, "pattern", pattern);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookCellTextDocumentFilter
{
public:
    std::variant<QByteArray, NotebookDocumentFilter> notebook = { };
    std::optional<QByteArray> language = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "notebook", notebook);
        field(w, "language", language);
    }
};

using ProgressToken = std::variant<int, QByteArray>;
class Q_LANGUAGESERVER_EXPORT WorkspaceFullDocumentDiagnosticReport
    : public FullDocumentDiagnosticReport
{
public:
    QByteArray uri = { };
    std::optional<int> version = { };

    template <typename W>
    void walk(W &w)
    {
        FullDocumentDiagnosticReport::walk(w);
        field(w, "uri", uri);
        field(w, "version", version);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceUnchangedDocumentDiagnosticReport
    : public UnchangedDocumentDiagnosticReport
{
public:
    QByteArray uri = { };
    std::optional<int> version = { };

    template <typename W>
    void walk(W &w)
    {
        UnchangedDocumentDiagnosticReport::walk(w);
        field(w, "uri", uri);
        field(w, "version", version);
    }
};

using WorkspaceDocumentDiagnosticReport = std::variant<WorkspaceFullDocumentDiagnosticReport,
                                                       WorkspaceUnchangedDocumentDiagnosticReport>;
class Q_LANGUAGESERVER_EXPORT TextDocumentContentChangeEventVariant1
{
public:
    Range range = { };
    std::optional<unsigned int> rangeLength = { };
    QByteArray text = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "rangeLength", rangeLength);
        field(w, "text", text);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentContentChangeEventVariant2
{
public:
    QByteArray text = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "text", text);
    }
};

using TextDocumentContentChangeEvent = std::variant<TextDocumentContentChangeEventVariant1,
                                                    TextDocumentContentChangeEventVariant2>;
using DocumentFilter = std::variant<TextDocumentFilter, NotebookCellTextDocumentFilter>;
using DocumentSelector = QList<DocumentFilter>;
using ChangeAnnotationIdentifier = QByteArray;
class Q_LANGUAGESERVER_EXPORT AnnotatedTextEdit : public TextEdit
{
public:
    ChangeAnnotationIdentifier annotationId = { };

    template <typename W>
    void walk(W &w)
    {
        TextEdit::walk(w);
        field(w, "annotationId", annotationId);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentIdentifier
{
public:
    QByteArray uri = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
    }
};

class Q_LANGUAGESERVER_EXPORT OptionalVersionedTextDocumentIdentifier
    : public TextDocumentIdentifier
{
public:
    std::optional<int> version = { };

    template <typename W>
    void walk(W &w)
    {
        TextDocumentIdentifier::walk(w);
        field(w, "version", version);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentEdit
{
public:
    OptionalVersionedTextDocumentIdentifier textDocument = { };
    QList<std::variant<TextEdit, AnnotatedTextEdit>> edits = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "textDocument", textDocument);
        field(w, "edits", edits);
    }
};

class Q_LANGUAGESERVER_EXPORT ResourceOperation
{
public:
    QByteArray kind = { };
    std::optional<ChangeAnnotationIdentifier> annotationId = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "kind", kind);
        field(w, "annotationId", annotationId);
    }
};

class Q_LANGUAGESERVER_EXPORT CreateFileOptions
{
public:
    std::optional<bool> overwrite = { };
    std::optional<bool> ignoreIfExists = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "overwrite", overwrite);
        field(w, "ignoreIfExists", ignoreIfExists);
    }
};

class Q_LANGUAGESERVER_EXPORT CreateFile : public ResourceOperation
{
public:
    static constexpr QByteArrayView kind = "create";
    QByteArray uri = { };
    std::optional<CreateFileOptions> options = { };

    template <typename W>
    void walk(W &w)
    {
        ResourceOperation::walk(w);
        field(w, "kind", kind);
        field(w, "uri", uri);
        field(w, "options", options);
    }
};

class Q_LANGUAGESERVER_EXPORT RenameFileOptions
{
public:
    std::optional<bool> overwrite = { };
    std::optional<bool> ignoreIfExists = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "overwrite", overwrite);
        field(w, "ignoreIfExists", ignoreIfExists);
    }
};

class Q_LANGUAGESERVER_EXPORT RenameFile : public ResourceOperation
{
public:
    static constexpr QByteArrayView kind = "rename";
    QByteArray oldUri = { };
    QByteArray newUri = { };
    std::optional<RenameFileOptions> options = { };

    template <typename W>
    void walk(W &w)
    {
        ResourceOperation::walk(w);
        field(w, "kind", kind);
        field(w, "oldUri", oldUri);
        field(w, "newUri", newUri);
        field(w, "options", options);
    }
};

class Q_LANGUAGESERVER_EXPORT DeleteFileOptions
{
public:
    std::optional<bool> recursive = { };
    std::optional<bool> ignoreIfNotExists = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "recursive", recursive);
        field(w, "ignoreIfNotExists", ignoreIfNotExists);
    }
};

class Q_LANGUAGESERVER_EXPORT DeleteFile : public ResourceOperation
{
public:
    static constexpr QByteArrayView kind = "delete";
    QByteArray uri = { };
    std::optional<DeleteFileOptions> options = { };

    template <typename W>
    void walk(W &w)
    {
        ResourceOperation::walk(w);
        field(w, "kind", kind);
        field(w, "uri", uri);
        field(w, "options", options);
    }
};

class Q_LANGUAGESERVER_EXPORT ChangeAnnotation
{
public:
    QByteArray label = { };
    std::optional<bool> needsConfirmation = { };
    std::optional<QByteArray> description = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "label", label);
        field(w, "needsConfirmation", needsConfirmation);
        field(w, "description", description);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceEdit
{
public:
    std::optional<QMap<QByteArray, QList<TextEdit>>> changes = { };
    using DocumentChange = std::variant<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>;
    std::optional<QList<DocumentChange>> documentChanges = { };

    std::optional<QMap<ChangeAnnotationIdentifier, ChangeAnnotation>> changeAnnotations = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "changes", changes);
        field(w, "documentChanges", documentChanges);
        field(w, "changeAnnotations", changeAnnotations);
    }
};

class Q_LANGUAGESERVER_EXPORT ApplyWorkspaceEditParams
{
public:
    std::optional<QByteArray> label = { };
    WorkspaceEdit edit = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "label", label);
        field(w, "edit", edit);
    }
};

class Q_LANGUAGESERVER_EXPORT ApplyWorkspaceEditResult
{
public:
    bool applied = { };
    std::optional<QByteArray> failureReason = { };
    std::optional<unsigned int> failedChange = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "applied", applied);
        field(w, "failureReason", failureReason);
        field(w, "failedChange", failedChange);
    }
};

class Q_LANGUAGESERVER_EXPORT BaseSymbolInformation
{
public:
    QByteArray name = { };
    SymbolKind kind = { };
    std::optional<QList<SymbolTag>> tags = { };
    std::optional<QByteArray> containerName = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "name", name);
        field(w, "kind", kind);
        field(w, "tags", tags);
        field(w, "containerName", containerName);
    }
};

class Q_LANGUAGESERVER_EXPORT CallHierarchyClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT CallHierarchyItem
{
public:
    QByteArray name = { };
    SymbolKind kind = { };
    std::optional<QList<SymbolTag>> tags = { };
    std::optional<QByteArray> detail = { };
    QByteArray uri = { };
    Range range = { };
    Range selectionRange = { };
    std::optional<QJsonValue> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "name", name);
        field(w, "kind", kind);
        field(w, "tags", tags);
        field(w, "detail", detail);
        field(w, "uri", uri);
        field(w, "range", range);
        field(w, "selectionRange", selectionRange);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT CallHierarchyIncomingCall
{
public:
    CallHierarchyItem from = { };
    QList<Range> fromRanges = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "from", from);
        field(w, "fromRanges", fromRanges);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkDoneProgressParams
{
public:
    std::optional<ProgressToken> workDoneToken = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "workDoneToken", workDoneToken);
    }
};

class Q_LANGUAGESERVER_EXPORT PartialResultParams
{
public:
    std::optional<ProgressToken> partialResultToken = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "partialResultToken", partialResultToken);
    }
};

class Q_LANGUAGESERVER_EXPORT CallHierarchyIncomingCallsParams : public WorkDoneProgressParams,
                                                                 public PartialResultParams
{
public:
    CallHierarchyItem item = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "item", item);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkDoneProgressOptions
{
public:
    std::optional<bool> workDoneProgress = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "workDoneProgress", workDoneProgress);
    }
};

class Q_LANGUAGESERVER_EXPORT CallHierarchyOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT CallHierarchyOutgoingCall
{
public:
    CallHierarchyItem to = { };
    QList<Range> fromRanges = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "to", to);
        field(w, "fromRanges", fromRanges);
    }
};

class Q_LANGUAGESERVER_EXPORT CallHierarchyOutgoingCallsParams : public WorkDoneProgressParams,
                                                                 public PartialResultParams
{
public:
    CallHierarchyItem item = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "item", item);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentPositionParams
{
public:
    TextDocumentIdentifier textDocument = { };
    Position position = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "textDocument", textDocument);
        field(w, "position", position);
    }
};

class Q_LANGUAGESERVER_EXPORT CallHierarchyPrepareParams : public TextDocumentPositionParams,
                                                           public WorkDoneProgressParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentRegistrationOptions
{
public:
    std::optional<DocumentSelector> documentSelector = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "documentSelector", documentSelector);
    }
};

class Q_LANGUAGESERVER_EXPORT StaticRegistrationOptions
{
public:
    std::optional<QByteArray> id = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "id", id);
    }
};

class Q_LANGUAGESERVER_EXPORT CallHierarchyRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public CallHierarchyOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        CallHierarchyOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT CancelParams
{
public:
    std::variant<int, QByteArray> id = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "id", id);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceEditClientCapabilities
{
public:
    std::optional<bool> documentChanges = { };
    std::optional<QList<ResourceOperationKind>> resourceOperations = { };
    std::optional<FailureHandlingKind> failureHandling = { };
    std::optional<bool> normalizesLineEndings = { };
    std::optional<QJsonObject> changeAnnotationSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "documentChanges", documentChanges);
        field(w, "resourceOperations", resourceOperations);
        field(w, "failureHandling", failureHandling);
        field(w, "normalizesLineEndings", normalizesLineEndings);
        field(w, "changeAnnotationSupport", changeAnnotationSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT DidChangeConfigurationClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT DidChangeWatchedFilesClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<bool> relativePatternSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "relativePatternSupport", relativePatternSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceSymbolClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<QJsonObject> symbolKind = { };
    std::optional<QJsonObject> tagSupport = { };
    std::optional<QJsonObject> resolveSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "symbolKind", symbolKind);
        field(w, "tagSupport", tagSupport);
        field(w, "resolveSupport", resolveSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT ExecuteCommandClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensWorkspaceClientCapabilities
{
public:
    std::optional<bool> refreshSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "refreshSupport", refreshSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeLensWorkspaceClientCapabilities
{
public:
    std::optional<bool> refreshSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "refreshSupport", refreshSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT FileOperationClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = {};
    std::optional<bool> didCreate = { };
    std::optional<bool> willCreate = { };
    std::optional<bool> didRename = { };
    std::optional<bool> willRename = { };
    std::optional<bool> didDelete = { };
    std::optional<bool> willDelete = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "didCreate", didCreate);
        field(w, "willCreate", willCreate);
        field(w, "didRename", didRename);
        field(w, "willRename", willRename);
        field(w, "didDelete", didDelete);
        field(w, "willDelete", willDelete);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineValueWorkspaceClientCapabilities
{
public:
    std::optional<bool> refreshSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "refreshSupport", refreshSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT InlayHintWorkspaceClientCapabilities
{
public:
    std::optional<bool> refreshSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "refreshSupport", refreshSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT DiagnosticWorkspaceClientCapabilities
{
public:
    std::optional<bool> refreshSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "refreshSupport", refreshSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT FoldingRangeWorkspaceClientCapabilities
{
public:
    std::optional<bool> refreshSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "refreshSupport", refreshSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceClientCapabilities
{
public:
    std::optional<bool> applyEdit = { };
    std::optional<WorkspaceEditClientCapabilities> workspaceEdit = { };
    std::optional<DidChangeConfigurationClientCapabilities> didChangeConfiguration = { };
    std::optional<DidChangeWatchedFilesClientCapabilities> didChangeWatchedFiles = { };
    std::optional<WorkspaceSymbolClientCapabilities> symbol = { };
    std::optional<ExecuteCommandClientCapabilities> executeCommand = { };
    std::optional<bool> workspaceFolders = { };
    std::optional<bool> configuration = { };
    std::optional<SemanticTokensWorkspaceClientCapabilities> semanticTokens = { };
    std::optional<CodeLensWorkspaceClientCapabilities> codeLens = { };
    std::optional<FileOperationClientCapabilities> fileOperations = { };
    std::optional<InlineValueWorkspaceClientCapabilities> inlineValue = { };
    std::optional<InlayHintWorkspaceClientCapabilities> inlayHint = { };
    std::optional<DiagnosticWorkspaceClientCapabilities> diagnostics = { };
    std::optional<FoldingRangeWorkspaceClientCapabilities> foldingRange = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "applyEdit", applyEdit);
        field(w, "workspaceEdit", workspaceEdit);
        field(w, "didChangeConfiguration", didChangeConfiguration);
        field(w, "didChangeWatchedFiles", didChangeWatchedFiles);
        field(w, "symbol", symbol);
        field(w, "executeCommand", executeCommand);
        field(w, "workspaceFolders", workspaceFolders);
        field(w, "configuration", configuration);
        field(w, "semanticTokens", semanticTokens);
        field(w, "codeLens", codeLens);
        field(w, "fileOperations", fileOperations);
        field(w, "inlineValue", inlineValue);
        field(w, "inlayHint", inlayHint);
        field(w, "diagnostics", diagnostics);
        field(w, "foldingRange", foldingRange);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentSyncClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<bool> willSave = { };
    std::optional<bool> willSaveWaitUntil = { };
    std::optional<bool> didSave = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "willSave", willSave);
        field(w, "willSaveWaitUntil", willSaveWaitUntil);
        field(w, "didSave", didSave);
    }
};

class Q_LANGUAGESERVER_EXPORT CompletionClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = {};
    std::optional<QJsonObject> completionItem = {};
    std::optional<QJsonObject> completionItemKind = {};
    std::optional<InsertTextMode> insertTextMode = { };
    std::optional<bool> contextSupport = {};
    std::optional<QJsonObject> completionList = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "completionItem", completionItem);
        field(w, "completionItemKind", completionItemKind);
        field(w, "insertTextMode", insertTextMode);
        field(w, "contextSupport", contextSupport);
        field(w, "completionList", completionList);
    }
};

class Q_LANGUAGESERVER_EXPORT HoverClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<QList<MarkupKind>> contentFormat = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "contentFormat", contentFormat);
    }
};

class Q_LANGUAGESERVER_EXPORT SignatureHelpClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = {};
    std::optional<QJsonObject> signatureInformation = { };
    std::optional<bool> contextSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "signatureInformation", signatureInformation);
        field(w, "contextSupport", contextSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT DeclarationClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<bool> linkSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "linkSupport", linkSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT DefinitionClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<bool> linkSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "linkSupport", linkSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeDefinitionClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<bool> linkSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "linkSupport", linkSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT ImplementationClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<bool> linkSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "linkSupport", linkSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT ReferenceClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentHighlightClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentSymbolClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<QJsonObject> symbolKind = { };
    std::optional<bool> hierarchicalDocumentSymbolSupport = { };
    std::optional<QJsonObject> tagSupport = { };
    std::optional<bool> labelSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "symbolKind", symbolKind);
        field(w, "hierarchicalDocumentSymbolSupport", hierarchicalDocumentSymbolSupport);
        field(w, "tagSupport", tagSupport);
        field(w, "labelSupport", labelSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeActionClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<QJsonObject> codeActionLiteralSupport = { };
    std::optional<bool> isPreferredSupport = { };
    std::optional<bool> disabledSupport = { };
    std::optional<bool> dataSupport = { };
    std::optional<QJsonObject> resolveSupport = { };
    std::optional<bool> honorsChangeAnnotations = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "codeActionLiteralSupport", codeActionLiteralSupport);
        field(w, "isPreferredSupport", isPreferredSupport);
        field(w, "disabledSupport", disabledSupport);
        field(w, "dataSupport", dataSupport);
        field(w, "resolveSupport", resolveSupport);
        field(w, "honorsChangeAnnotations", honorsChangeAnnotations);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeLensClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentLinkClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = {};
    std::optional<bool> tooltipSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "tooltipSupport", tooltipSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentColorClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = {};

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentFormattingClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentRangeFormattingClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<bool> rangesSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "rangesSupport", rangesSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentOnTypeFormattingClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT RenameClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = {};
    std::optional<bool> prepareSupport = { };
    std::optional<PrepareSupportDefaultBehavior> prepareSupportDefaultBehavior = { };
    std::optional<bool> honorsChangeAnnotations = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "prepareSupport", prepareSupport);
        field(w, "prepareSupportDefaultBehavior", prepareSupportDefaultBehavior);
        field(w, "honorsChangeAnnotations", honorsChangeAnnotations);
    }
};

class Q_LANGUAGESERVER_EXPORT FoldingRangeClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<unsigned int> rangeLimit = { };
    std::optional<bool> lineFoldingOnly = { };
    std::optional<QJsonObject> foldingRangeKind = { };
    std::optional<QJsonObject> foldingRange = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "rangeLimit", rangeLimit);
        field(w, "lineFoldingOnly", lineFoldingOnly);
        field(w, "foldingRangeKind", foldingRangeKind);
        field(w, "foldingRange", foldingRange);
    }
};

class Q_LANGUAGESERVER_EXPORT SelectionRangeClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = {};

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT PublishDiagnosticsClientCapabilities
{
public:
    std::optional<bool> relatedInformation = { };
    std::optional<QJsonObject> tagSupport = { };
    std::optional<bool> versionSupport = { };
    std::optional<bool> codeDescriptionSupport = { };
    std::optional<bool> dataSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "relatedInformation", relatedInformation);
        field(w, "tagSupport", tagSupport);
        field(w, "versionSupport", versionSupport);
        field(w, "codeDescriptionSupport", codeDescriptionSupport);
        field(w, "dataSupport", dataSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = {};
    QJsonObject requests = { };
    QList<QByteArray> tokenTypes = { };
    QList<QByteArray> tokenModifiers = { };
    QList<TokenFormat> formats = { };
    std::optional<bool> overlappingTokenSupport = { };
    std::optional<bool> multilineTokenSupport = { };
    std::optional<bool> serverCancelSupport = { };
    std::optional<bool> augmentsSyntaxTokens = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "requests", requests);
        field(w, "tokenTypes", tokenTypes);
        field(w, "tokenModifiers", tokenModifiers);
        field(w, "formats", formats);
        field(w, "overlappingTokenSupport", overlappingTokenSupport);
        field(w, "multilineTokenSupport", multilineTokenSupport);
        field(w, "serverCancelSupport", serverCancelSupport);
        field(w, "augmentsSyntaxTokens", augmentsSyntaxTokens);
    }
};

class Q_LANGUAGESERVER_EXPORT LinkedEditingRangeClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT MonikerClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeHierarchyClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineValueClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT InlayHintClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<QJsonObject> resolveSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "resolveSupport", resolveSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT DiagnosticClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<bool> relatedDocumentSupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "relatedDocumentSupport", relatedDocumentSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineCompletionClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentClientCapabilities
{
public:
    std::optional<TextDocumentSyncClientCapabilities> synchronization = {};
    std::optional<CompletionClientCapabilities> completion = {};
    std::optional<HoverClientCapabilities> hover = {};
    std::optional<SignatureHelpClientCapabilities> signatureHelp = {};
    std::optional<DeclarationClientCapabilities> declaration = {};
    std::optional<DefinitionClientCapabilities> definition = {};
    std::optional<TypeDefinitionClientCapabilities> typeDefinition = {};
    std::optional<ImplementationClientCapabilities> implementation = {};
    std::optional<ReferenceClientCapabilities> references = {};
    std::optional<DocumentHighlightClientCapabilities> documentHighlight = {};
    std::optional<DocumentSymbolClientCapabilities> documentSymbol = {};
    std::optional<CodeActionClientCapabilities> codeAction = {};
    std::optional<CodeLensClientCapabilities> codeLens = {};
    std::optional<DocumentLinkClientCapabilities> documentLink = {};
    std::optional<DocumentColorClientCapabilities> colorProvider = {};
    std::optional<DocumentFormattingClientCapabilities> formatting = {};
    std::optional<DocumentRangeFormattingClientCapabilities> rangeFormatting = {};
    std::optional<DocumentOnTypeFormattingClientCapabilities> onTypeFormatting = {};
    std::optional<RenameClientCapabilities> rename = { };
    std::optional<FoldingRangeClientCapabilities> foldingRange = {};
    std::optional<SelectionRangeClientCapabilities> selectionRange = {};
    std::optional<PublishDiagnosticsClientCapabilities> publishDiagnostics = { };
    std::optional<CallHierarchyClientCapabilities> callHierarchy = {};
    std::optional<SemanticTokensClientCapabilities> semanticTokens = {};
    std::optional<LinkedEditingRangeClientCapabilities> linkedEditingRange = { };
    std::optional<MonikerClientCapabilities> moniker = {};
    std::optional<TypeHierarchyClientCapabilities> typeHierarchy = { };
    std::optional<InlineValueClientCapabilities> inlineValue = { };
    std::optional<InlayHintClientCapabilities> inlayHint = { };
    std::optional<DiagnosticClientCapabilities> diagnostic = { };
    std::optional<InlineCompletionClientCapabilities> inlineCompletion = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "synchronization", synchronization);
        field(w, "completion", completion);
        field(w, "hover", hover);
        field(w, "signatureHelp", signatureHelp);
        field(w, "declaration", declaration);
        field(w, "definition", definition);
        field(w, "typeDefinition", typeDefinition);
        field(w, "implementation", implementation);
        field(w, "references", references);
        field(w, "documentHighlight", documentHighlight);
        field(w, "documentSymbol", documentSymbol);
        field(w, "codeAction", codeAction);
        field(w, "codeLens", codeLens);
        field(w, "documentLink", documentLink);
        field(w, "colorProvider", colorProvider);
        field(w, "formatting", formatting);
        field(w, "rangeFormatting", rangeFormatting);
        field(w, "onTypeFormatting", onTypeFormatting);
        field(w, "rename", rename);
        field(w, "foldingRange", foldingRange);
        field(w, "selectionRange", selectionRange);
        field(w, "publishDiagnostics", publishDiagnostics);
        field(w, "callHierarchy", callHierarchy);
        field(w, "semanticTokens", semanticTokens);
        field(w, "linkedEditingRange", linkedEditingRange);
        field(w, "moniker", moniker);
        field(w, "typeHierarchy", typeHierarchy);
        field(w, "inlineValue", inlineValue);
        field(w, "inlayHint", inlayHint);
        field(w, "diagnostic", diagnostic);
        field(w, "inlineCompletion", inlineCompletion);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookDocumentSyncClientCapabilities
{
public:
    std::optional<bool> dynamicRegistration = { };
    std::optional<bool> executionSummarySupport = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "dynamicRegistration", dynamicRegistration);
        field(w, "executionSummarySupport", executionSummarySupport);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookDocumentClientCapabilities
{
public:
    NotebookDocumentSyncClientCapabilities synchronization = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "synchronization", synchronization);
    }
};

class Q_LANGUAGESERVER_EXPORT ShowMessageRequestClientCapabilities
{
public:
    std::optional<QJsonObject> messageActionItem = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "messageActionItem", messageActionItem);
    }
};

class Q_LANGUAGESERVER_EXPORT ShowDocumentClientCapabilities
{
public:
    bool support = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "support", support);
    }
};

class Q_LANGUAGESERVER_EXPORT WindowClientCapabilities
{
public:
    std::optional<bool> workDoneProgress = { };
    std::optional<ShowMessageRequestClientCapabilities> showMessage = { };
    std::optional<ShowDocumentClientCapabilities> showDocument = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "workDoneProgress", workDoneProgress);
        field(w, "showMessage", showMessage);
        field(w, "showDocument", showDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT RegularExpressionsClientCapabilities
{
public:
    QByteArray engine = { };
    std::optional<QByteArray> version = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "engine", engine);
        field(w, "version", version);
    }
};

class Q_LANGUAGESERVER_EXPORT MarkdownClientCapabilities
{
public:
    QByteArray parser = { };
    std::optional<QByteArray> version = { };
    std::optional<QList<QByteArray>> allowedTags = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "parser", parser);
        field(w, "version", version);
        field(w, "allowedTags", allowedTags);
    }
};

class Q_LANGUAGESERVER_EXPORT GeneralClientCapabilities
{
public:
    std::optional<QJsonObject> staleRequestSupport = { };
    std::optional<RegularExpressionsClientCapabilities> regularExpressions = { };
    std::optional<MarkdownClientCapabilities> markdown = { };
    std::optional<QList<PositionEncodingKind>> positionEncodings = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "staleRequestSupport", staleRequestSupport);
        field(w, "regularExpressions", regularExpressions);
        field(w, "markdown", markdown);
        field(w, "positionEncodings", positionEncodings);
    }
};

class Q_LANGUAGESERVER_EXPORT ClientCapabilities
{
public:
    std::optional<WorkspaceClientCapabilities> workspace = { };
    std::optional<TextDocumentClientCapabilities> textDocument = { };
    std::optional<NotebookDocumentClientCapabilities> notebookDocument = { };
    std::optional<WindowClientCapabilities> window = { };
    std::optional<GeneralClientCapabilities> general = { };
    std::optional<QJsonValue> experimental = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "workspace", workspace);
        field(w, "textDocument", textDocument);
        field(w, "notebookDocument", notebookDocument);
        field(w, "window", window);
        field(w, "general", general);
        field(w, "experimental", experimental);
    }
};

class Q_LANGUAGESERVER_EXPORT Command
{
public:
    QByteArray title = { };
    QByteArray command = { };
    std::optional<QList<QJsonValue>> arguments = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "title", title);
        field(w, "command", command);
        field(w, "arguments", arguments);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeAction
{
public:
    QByteArray title = { };
    std::optional<CodeActionKind> kind = { };
    std::optional<QList<Diagnostic>> diagnostics = { };
    std::optional<bool> isPreferred = { };
    std::optional<QJsonObject> disabled = { };
    std::optional<WorkspaceEdit> edit = { };
    std::optional<Command> command = { };
    std::optional<QJsonValue> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "title", title);
        field(w, "kind", kind);
        field(w, "diagnostics", diagnostics);
        field(w, "isPreferred", isPreferred);
        field(w, "disabled", disabled);
        field(w, "edit", edit);
        field(w, "command", command);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeActionContext
{
public:
    QList<Diagnostic> diagnostics = { };
    std::optional<QList<CodeActionKind>> only = { };
    std::optional<CodeActionTriggerKind> triggerKind = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "diagnostics", diagnostics);
        field(w, "only", only);
        field(w, "triggerKind", triggerKind);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeActionOptions : public WorkDoneProgressOptions
{
public:
    std::optional<QList<CodeActionKind>> codeActionKinds = { };
    std::optional<bool> resolveProvider = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "codeActionKinds", codeActionKinds);
        field(w, "resolveProvider", resolveProvider);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeActionParams : public WorkDoneProgressParams,
                                                 public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };
    Range range = { };
    CodeActionContext context = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "range", range);
        field(w, "context", context);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeActionRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public CodeActionOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        CodeActionOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeLens
{
public:
    Range range = { };
    std::optional<Command> command = { };
    std::optional<QJsonValue> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "command", command);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeLensOptions : public WorkDoneProgressOptions
{
public:
    std::optional<bool> resolveProvider = {};

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "resolveProvider", resolveProvider);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeLensParams : public WorkDoneProgressParams,
                                               public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT CodeLensRegistrationOptions : public TextDocumentRegistrationOptions,
                                                            public CodeLensOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        CodeLensOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT Color
{
public:
    double red = { };
    double green = { };
    double blue = { };
    double alpha = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "red", red);
        field(w, "green", green);
        field(w, "blue", blue);
        field(w, "alpha", alpha);
    }
};

class Q_LANGUAGESERVER_EXPORT ColorInformation
{
public:
    Range range = { };
    Color color = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "color", color);
    }
};

class Q_LANGUAGESERVER_EXPORT ColorPresentation
{
public:
    QByteArray label = { };
    std::optional<TextEdit> textEdit = { };
    std::optional<QList<TextEdit>> additionalTextEdits = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "label", label);
        field(w, "textEdit", textEdit);
        field(w, "additionalTextEdits", additionalTextEdits);
    }
};

class Q_LANGUAGESERVER_EXPORT ColorPresentationParams : public WorkDoneProgressParams,
                                                        public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };
    Color color = { };
    Range range = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "color", color);
        field(w, "range", range);
    }
};

class Q_LANGUAGESERVER_EXPORT CompletionContext
{
public:
    CompletionTriggerKind triggerKind = { };
    std::optional<QByteArray> triggerCharacter = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "triggerKind", triggerKind);
        field(w, "triggerCharacter", triggerCharacter);
    }
};

class Q_LANGUAGESERVER_EXPORT CompletionItemLabelDetails
{
public:
    std::optional<QByteArray> detail = { };
    std::optional<QByteArray> description = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "detail", detail);
        field(w, "description", description);
    }
};

class Q_LANGUAGESERVER_EXPORT MarkupContent
{
public:
    MarkupKind kind = { };
    QByteArray value = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "kind", kind);
        field(w, "value", value);
    }
};

class Q_LANGUAGESERVER_EXPORT InsertReplaceEdit
{
public:
    QByteArray newText = { };
    Range insert = { };
    Range replace = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "newText", newText);
        field(w, "insert", insert);
        field(w, "replace", replace);
    }
};

class Q_LANGUAGESERVER_EXPORT CompletionItem
{
public:
    QByteArray label = { };
    std::optional<CompletionItemLabelDetails> labelDetails = { };
    std::optional<CompletionItemKind> kind = { };
    std::optional<QList<CompletionItemTag>> tags = { };
    std::optional<QByteArray> detail = { };
    std::optional<std::variant<QByteArray, MarkupContent>> documentation = { };
    std::optional<bool> deprecated = { };
    std::optional<bool> preselect = { };
    std::optional<QByteArray> sortText = { };
    std::optional<QByteArray> filterText = { };
    std::optional<QByteArray> insertText = { };
    std::optional<InsertTextFormat> insertTextFormat = { };
    std::optional<InsertTextMode> insertTextMode = { };
    std::optional<std::variant<TextEdit, InsertReplaceEdit>> textEdit = { };
    std::optional<QByteArray> textEditText = { };
    std::optional<QList<TextEdit>> additionalTextEdits = { };
    std::optional<QList<QByteArray>> commitCharacters = { };
    std::optional<Command> command = { };
    std::optional<QJsonValue> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "label", label);
        field(w, "labelDetails", labelDetails);
        field(w, "kind", kind);
        field(w, "tags", tags);
        field(w, "detail", detail);
        field(w, "documentation", documentation);
        field(w, "deprecated", deprecated);
        field(w, "preselect", preselect);
        field(w, "sortText", sortText);
        field(w, "filterText", filterText);
        field(w, "insertText", insertText);
        field(w, "insertTextFormat", insertTextFormat);
        field(w, "insertTextMode", insertTextMode);
        field(w, "textEdit", textEdit);
        field(w, "textEditText", textEditText);
        field(w, "additionalTextEdits", additionalTextEdits);
        field(w, "commitCharacters", commitCharacters);
        field(w, "command", command);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT CompletionList
{
public:
    bool isIncomplete = { };
    std::optional<QJsonObject> itemDefaults = { };
    QList<CompletionItem> items = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "isIncomplete", isIncomplete);
        field(w, "itemDefaults", itemDefaults);
        field(w, "items", items);
    }
};

class Q_LANGUAGESERVER_EXPORT CompletionOptions : public WorkDoneProgressOptions
{
public:
    std::optional<QList<QByteArray>> triggerCharacters = { };
    std::optional<QList<QByteArray>> allCommitCharacters = { };
    std::optional<bool> resolveProvider = {};
    std::optional<QJsonObject> completionItem = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "triggerCharacters", triggerCharacters);
        field(w, "allCommitCharacters", allCommitCharacters);
        field(w, "resolveProvider", resolveProvider);
        field(w, "completionItem", completionItem);
    }
};

class Q_LANGUAGESERVER_EXPORT CompletionParams : public TextDocumentPositionParams,
                                                 public WorkDoneProgressParams,
                                                 public PartialResultParams
{
public:
    std::optional<CompletionContext> context = { };

    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "context", context);
    }
};

class Q_LANGUAGESERVER_EXPORT CompletionRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public CompletionOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        CompletionOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT ConfigurationItem
{
public:
    std::optional<QByteArray> scopeUri = { };
    std::optional<QByteArray> section = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "scopeUri", scopeUri);
        field(w, "section", section);
    }
};

class Q_LANGUAGESERVER_EXPORT ConfigurationParams
{
public:
    QList<ConfigurationItem> items = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "items", items);
    }
};

class Q_LANGUAGESERVER_EXPORT FileCreate
{
public:
    QByteArray uri = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
    }
};

class Q_LANGUAGESERVER_EXPORT CreateFilesParams
{
public:
    QList<FileCreate> files = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "files", files);
    }
};

class Q_LANGUAGESERVER_EXPORT DeclarationOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DeclarationParams : public TextDocumentPositionParams,
                                                  public WorkDoneProgressParams,
                                                  public PartialResultParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DeclarationRegistrationOptions
    : public DeclarationOptions,
      public TextDocumentRegistrationOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        DeclarationOptions::walk(w);
        TextDocumentRegistrationOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DefinitionOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DefinitionParams : public TextDocumentPositionParams,
                                                 public WorkDoneProgressParams,
                                                 public PartialResultParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DefinitionRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public DefinitionOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        DefinitionOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT FileDelete
{
public:
    QByteArray uri = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
    }
};

class Q_LANGUAGESERVER_EXPORT DeleteFilesParams
{
public:
    QList<FileDelete> files = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "files", files);
    }
};

class Q_LANGUAGESERVER_EXPORT DiagnosticOptions : public WorkDoneProgressOptions
{
public:
    std::optional<QByteArray> identifier = { };
    bool interFileDependencies = { };
    bool workspaceDiagnostics = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "identifier", identifier);
        field(w, "interFileDependencies", interFileDependencies);
        field(w, "workspaceDiagnostics", workspaceDiagnostics);
    }
};

class Q_LANGUAGESERVER_EXPORT DiagnosticRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public DiagnosticOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        DiagnosticOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DiagnosticServerCancellationData
{
public:
    bool retriggerRequest = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "retriggerRequest", retriggerRequest);
    }
};

class Q_LANGUAGESERVER_EXPORT DidChangeConfigurationParams
{
public:
    QJsonValue settings = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "settings", settings);
    }
};

class Q_LANGUAGESERVER_EXPORT DidChangeConfigurationRegistrationOptions
{
public:
    std::optional<std::variant<QByteArray, QList<QByteArray>>> section = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "section", section);
    }
};

class Q_LANGUAGESERVER_EXPORT VersionedNotebookDocumentIdentifier
{
public:
    int version = { };
    QByteArray uri = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "version", version);
        field(w, "uri", uri);
    }
};

class Q_LANGUAGESERVER_EXPORT ExecutionSummary
{
public:
    unsigned int executionOrder = { };
    std::optional<bool> success = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "executionOrder", executionOrder);
        field(w, "success", success);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookCell
{
public:
    NotebookCellKind kind = { };
    QByteArray document = { };
    std::optional<QJsonObject> metadata = { };
    std::optional<ExecutionSummary> executionSummary = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "kind", kind);
        field(w, "document", document);
        field(w, "metadata", metadata);
        field(w, "executionSummary", executionSummary);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookCellArrayChange
{
public:
    unsigned int start = { };
    unsigned int deleteCount = { };
    std::optional<QList<NotebookCell>> cells = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "start", start);
        field(w, "deleteCount", deleteCount);
        field(w, "cells", cells);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentItem
{
public:
    QByteArray uri = { };
    QByteArray languageId = { };
    int version = { };
    QByteArray text = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
        field(w, "languageId", languageId);
        field(w, "version", version);
        field(w, "text", text);
    }
};

class Q_LANGUAGESERVER_EXPORT VersionedTextDocumentIdentifier : public TextDocumentIdentifier
{
public:
    int version = { };

    template <typename W>
    void walk(W &w)
    {
        TextDocumentIdentifier::walk(w);
        field(w, "version", version);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookDocumentChangeEvent
{
public:
    std::optional<QJsonObject> metadata = { };
    std::optional<QJsonObject> cells = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "metadata", metadata);
        field(w, "cells", cells);
    }
};

class Q_LANGUAGESERVER_EXPORT DidChangeNotebookDocumentParams
{
public:
    VersionedNotebookDocumentIdentifier notebookDocument = { };
    NotebookDocumentChangeEvent change = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "notebookDocument", notebookDocument);
        field(w, "change", change);
    }
};

class Q_LANGUAGESERVER_EXPORT DidChangeTextDocumentParams
{
public:
    VersionedTextDocumentIdentifier textDocument = { };
    QList<TextDocumentContentChangeEvent> contentChanges = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "textDocument", textDocument);
        field(w, "contentChanges", contentChanges);
    }
};

class Q_LANGUAGESERVER_EXPORT FileEvent
{
public:
    QByteArray uri = { };
    FileChangeType type = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
        field(w, "type", type);
    }
};

class Q_LANGUAGESERVER_EXPORT DidChangeWatchedFilesParams
{
public:
    QList<FileEvent> changes = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "changes", changes);
    }
};

using Pattern = QByteArray;
class Q_LANGUAGESERVER_EXPORT WorkspaceFolder
{
public:
    QByteArray uri = { };
    QByteArray name = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
        field(w, "name", name);
    }
};

class Q_LANGUAGESERVER_EXPORT RelativePattern
{
public:
    std::variant<WorkspaceFolder, QByteArray> baseUri = { };
    Pattern pattern = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "baseUri", baseUri);
        field(w, "pattern", pattern);
    }
};

using GlobPattern = std::variant<Pattern, RelativePattern>;
class Q_LANGUAGESERVER_EXPORT FileSystemWatcher
{
public:
    GlobPattern globPattern = { };
    std::optional<WatchKind> kind = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "globPattern", globPattern);
        field(w, "kind", kind);
    }
};

class Q_LANGUAGESERVER_EXPORT DidChangeWatchedFilesRegistrationOptions
{
public:
    QList<FileSystemWatcher> watchers = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "watchers", watchers);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceFoldersChangeEvent
{
public:
    QList<WorkspaceFolder> added = { };
    QList<WorkspaceFolder> removed = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "added", added);
        field(w, "removed", removed);
    }
};

class Q_LANGUAGESERVER_EXPORT DidChangeWorkspaceFoldersParams
{
public:
    WorkspaceFoldersChangeEvent event = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "event", event);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookDocumentIdentifier
{
public:
    QByteArray uri = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
    }
};

class Q_LANGUAGESERVER_EXPORT DidCloseNotebookDocumentParams
{
public:
    NotebookDocumentIdentifier notebookDocument = { };
    QList<TextDocumentIdentifier> cellTextDocuments = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "notebookDocument", notebookDocument);
        field(w, "cellTextDocuments", cellTextDocuments);
    }
};

class Q_LANGUAGESERVER_EXPORT DidCloseTextDocumentParams
{
public:
    TextDocumentIdentifier textDocument = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "textDocument", textDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookDocument
{
public:
    QByteArray uri = { };
    QByteArray notebookType = { };
    int version = { };
    std::optional<QJsonObject> metadata = { };
    QList<NotebookCell> cells = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
        field(w, "notebookType", notebookType);
        field(w, "version", version);
        field(w, "metadata", metadata);
        field(w, "cells", cells);
    }
};

class Q_LANGUAGESERVER_EXPORT DidOpenNotebookDocumentParams
{
public:
    NotebookDocument notebookDocument = { };
    QList<TextDocumentItem> cellTextDocuments = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "notebookDocument", notebookDocument);
        field(w, "cellTextDocuments", cellTextDocuments);
    }
};

class Q_LANGUAGESERVER_EXPORT DidOpenTextDocumentParams
{
public:
    TextDocumentItem textDocument = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "textDocument", textDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT DidSaveNotebookDocumentParams
{
public:
    NotebookDocumentIdentifier notebookDocument = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "notebookDocument", notebookDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT DidSaveTextDocumentParams
{
public:
    TextDocumentIdentifier textDocument = { };
    std::optional<QByteArray> text = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "textDocument", textDocument);
        field(w, "text", text);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentColorOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentColorParams : public WorkDoneProgressParams,
                                                    public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentColorRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public DocumentColorOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        DocumentColorOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentDiagnosticParams : public WorkDoneProgressParams,
                                                         public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };
    std::optional<QByteArray> identifier = { };
    std::optional<QByteArray> previousResultId = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "identifier", identifier);
        field(w, "previousResultId", previousResultId);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentDiagnosticReportPartialResult
{
public:
    QMap<QByteArray, std::variant<FullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport>>
            relatedDocuments = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "relatedDocuments", relatedDocuments);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentFormattingOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT FormattingOptions
{
public:
    unsigned int tabSize = { };
    bool insertSpaces = { };
    std::optional<bool> trimTrailingWhitespace = { };
    std::optional<bool> insertFinalNewline = { };
    std::optional<bool> trimFinalNewlines = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "tabSize", tabSize);
        field(w, "insertSpaces", insertSpaces);
        field(w, "trimTrailingWhitespace", trimTrailingWhitespace);
        field(w, "insertFinalNewline", insertFinalNewline);
        field(w, "trimFinalNewlines", trimFinalNewlines);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentFormattingParams : public WorkDoneProgressParams
{
public:
    TextDocumentIdentifier textDocument = { };
    FormattingOptions options = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "options", options);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentFormattingRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public DocumentFormattingOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        DocumentFormattingOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentHighlight
{
public:
    Range range = { };
    std::optional<DocumentHighlightKind> kind = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "kind", kind);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentHighlightOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentHighlightParams : public TextDocumentPositionParams,
                                                        public WorkDoneProgressParams,
                                                        public PartialResultParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentHighlightRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public DocumentHighlightOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        DocumentHighlightOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentLink
{
public:
    Range range = { };
    std::optional<QByteArray> target = { };
    std::optional<QByteArray> tooltip = { };
    std::optional<QJsonValue> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "target", target);
        field(w, "tooltip", tooltip);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentLinkOptions : public WorkDoneProgressOptions
{
public:
    std::optional<bool> resolveProvider = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "resolveProvider", resolveProvider);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentLinkParams : public WorkDoneProgressParams,
                                                   public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentLinkRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public DocumentLinkOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        DocumentLinkOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentOnTypeFormattingOptions
{
public:
    QByteArray firstTriggerCharacter = { };
    std::optional<QList<QByteArray>> moreTriggerCharacter = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "firstTriggerCharacter", firstTriggerCharacter);
        field(w, "moreTriggerCharacter", moreTriggerCharacter);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentOnTypeFormattingParams
{
public:
    TextDocumentIdentifier textDocument = { };
    Position position = { };
    QByteArray ch = { };
    FormattingOptions options = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "textDocument", textDocument);
        field(w, "position", position);
        field(w, "ch", ch);
        field(w, "options", options);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentOnTypeFormattingRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public DocumentOnTypeFormattingOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        DocumentOnTypeFormattingOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentRangeFormattingOptions : public WorkDoneProgressOptions
{
public:
    std::optional<bool> rangesSupport = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "rangesSupport", rangesSupport);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentRangeFormattingParams : public WorkDoneProgressParams
{
public:
    TextDocumentIdentifier textDocument = { };
    Range range = { };
    FormattingOptions options = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "range", range);
        field(w, "options", options);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentRangeFormattingRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public DocumentRangeFormattingOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        DocumentRangeFormattingOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentRangesFormattingParams : public WorkDoneProgressParams
{
public:
    TextDocumentIdentifier textDocument = { };
    QList<Range> ranges = { };
    FormattingOptions options = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "ranges", ranges);
        field(w, "options", options);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentSymbol
{
public:
    QByteArray name = { };
    std::optional<QByteArray> detail = { };
    SymbolKind kind = { };
    std::optional<QList<SymbolTag>> tags = { };
    std::optional<bool> deprecated = { };
    Range range = { };
    Range selectionRange = { };
    std::optional<QList<DocumentSymbol>> children = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "name", name);
        field(w, "detail", detail);
        field(w, "kind", kind);
        field(w, "tags", tags);
        field(w, "deprecated", deprecated);
        field(w, "range", range);
        field(w, "selectionRange", selectionRange);
        field(w, "children", children);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentSymbolOptions : public WorkDoneProgressOptions
{
public:
    std::optional<QByteArray> label = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "label", label);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentSymbolParams : public WorkDoneProgressParams,
                                                     public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT DocumentSymbolRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public DocumentSymbolOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        DocumentSymbolOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT ExecuteCommandOptions : public WorkDoneProgressOptions
{
public:
    QList<QByteArray> commands = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "commands", commands);
    }
};

class Q_LANGUAGESERVER_EXPORT ExecuteCommandParams : public WorkDoneProgressParams
{
public:
    QByteArray command = { };
    std::optional<QList<QJsonValue>> arguments = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        field(w, "command", command);
        field(w, "arguments", arguments);
    }
};

class Q_LANGUAGESERVER_EXPORT ExecuteCommandRegistrationOptions : public ExecuteCommandOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        ExecuteCommandOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT FileOperationPatternOptions
{
public:
    std::optional<bool> ignoreCase = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "ignoreCase", ignoreCase);
    }
};

class Q_LANGUAGESERVER_EXPORT FileOperationPattern
{
public:
    QByteArray glob = { };
    std::optional<FileOperationPatternKind> matches = { };
    std::optional<FileOperationPatternOptions> options = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "glob", glob);
        field(w, "matches", matches);
        field(w, "options", options);
    }
};

class Q_LANGUAGESERVER_EXPORT FileOperationFilter
{
public:
    std::optional<QByteArray> scheme = { };
    FileOperationPattern pattern = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "scheme", scheme);
        field(w, "pattern", pattern);
    }
};

class Q_LANGUAGESERVER_EXPORT FileOperationRegistrationOptions
{
public:
    QList<FileOperationFilter> filters = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "filters", filters);
    }
};

class Q_LANGUAGESERVER_EXPORT FileOperationOptions
{
public:
    std::optional<FileOperationRegistrationOptions> didCreate = { };
    std::optional<FileOperationRegistrationOptions> willCreate = { };
    std::optional<FileOperationRegistrationOptions> didRename = { };
    std::optional<FileOperationRegistrationOptions> willRename = { };
    std::optional<FileOperationRegistrationOptions> didDelete = { };
    std::optional<FileOperationRegistrationOptions> willDelete = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "didCreate", didCreate);
        field(w, "willCreate", willCreate);
        field(w, "didRename", didRename);
        field(w, "willRename", willRename);
        field(w, "didDelete", didDelete);
        field(w, "willDelete", willDelete);
    }
};

class Q_LANGUAGESERVER_EXPORT FileRename
{
public:
    QByteArray oldUri = { };
    QByteArray newUri = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "oldUri", oldUri);
        field(w, "newUri", newUri);
    }
};

class Q_LANGUAGESERVER_EXPORT FoldingRange
{
public:
    unsigned int startLine = { };
    std::optional<unsigned int> startCharacter = { };
    unsigned int endLine = { };
    std::optional<unsigned int> endCharacter = { };
    std::optional<FoldingRangeKind> kind = { };
    std::optional<QByteArray> collapsedText = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "startLine", startLine);
        field(w, "startCharacter", startCharacter);
        field(w, "endLine", endLine);
        field(w, "endCharacter", endCharacter);
        field(w, "kind", kind);
        field(w, "collapsedText", collapsedText);
    }
};

class Q_LANGUAGESERVER_EXPORT FoldingRangeOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT FoldingRangeParams : public WorkDoneProgressParams,
                                                   public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT FoldingRangeRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public FoldingRangeOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        FoldingRangeOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT Hover
{
public:
    std::variant<MarkupContent, MarkedString, QList<MarkedString>> contents = { };
    std::optional<Range> range = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "contents", contents);
        field(w, "range", range);
    }
};

class Q_LANGUAGESERVER_EXPORT HoverOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT HoverParams : public TextDocumentPositionParams,
                                            public WorkDoneProgressParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT HoverRegistrationOptions : public TextDocumentRegistrationOptions,
                                                         public HoverOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        HoverOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT ImplementationOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT ImplementationParams : public TextDocumentPositionParams,
                                                     public WorkDoneProgressParams,
                                                     public PartialResultParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT ImplementationRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public ImplementationOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        ImplementationOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT InitializeError
{
public:
    bool retry = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "retry", retry);
    }
};

class Q_LANGUAGESERVER_EXPORT _InitializeParams : public WorkDoneProgressParams
{
public:
    std::optional<int> processId = { };
    std::optional<QJsonObject> clientInfo = { };
    std::optional<QByteArray> locale = { };
    std::optional<QByteArray> rootPath = { };
    std::optional<QByteArray> rootUri = { };
    ClientCapabilities capabilities = { };
    std::optional<QJsonValue> initializationOptions = { };
    std::optional<TraceValues> trace = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        field(w, "processId", processId);
        field(w, "clientInfo", clientInfo);
        field(w, "locale", locale);
        field(w, "rootPath", rootPath);
        field(w, "rootUri", rootUri);
        field(w, "capabilities", capabilities);
        field(w, "initializationOptions", initializationOptions);
        field(w, "trace", trace);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceFoldersInitializeParams
{
public:
    std::optional<QList<WorkspaceFolder>> workspaceFolders = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "workspaceFolders", workspaceFolders);
    }
};

class Q_LANGUAGESERVER_EXPORT InitializeParams : public _InitializeParams,
                                                 public WorkspaceFoldersInitializeParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        _InitializeParams::walk(w);
        WorkspaceFoldersInitializeParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT SaveOptions
{
public:
    std::optional<bool> includeText = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "includeText", includeText);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentSyncOptions
{
public:
    std::optional<bool> openClose = { };
    std::optional<TextDocumentSyncKind> change = { };
    std::optional<bool> willSave = { };
    std::optional<bool> willSaveWaitUntil = { };
    std::optional<std::variant<bool, SaveOptions>> save = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "openClose", openClose);
        field(w, "change", change);
        field(w, "willSave", willSave);
        field(w, "willSaveWaitUntil", willSaveWaitUntil);
        field(w, "save", save);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookDocumentSyncOptions
{
public:
    QList<QJsonObject> notebookSelector = { };
    std::optional<bool> save = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "notebookSelector", notebookSelector);
        field(w, "save", save);
    }
};

class Q_LANGUAGESERVER_EXPORT NotebookDocumentSyncRegistrationOptions
    : public NotebookDocumentSyncOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        NotebookDocumentSyncOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT SignatureHelpOptions : public WorkDoneProgressOptions
{
public:
    std::optional<QList<QByteArray>> triggerCharacters = { };
    std::optional<QList<QByteArray>> retriggerCharacters = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "triggerCharacters", triggerCharacters);
        field(w, "retriggerCharacters", retriggerCharacters);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeDefinitionOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeDefinitionRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public TypeDefinitionOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        TypeDefinitionOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT ReferenceOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceSymbolOptions : public WorkDoneProgressOptions
{
public:
    std::optional<bool> resolveProvider = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "resolveProvider", resolveProvider);
    }
};

class Q_LANGUAGESERVER_EXPORT RenameOptions : public WorkDoneProgressOptions
{
public:
    std::optional<bool> prepareProvider = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "prepareProvider", prepareProvider);
    }
};

class Q_LANGUAGESERVER_EXPORT SelectionRangeOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT SelectionRangeRegistrationOptions
    : public SelectionRangeOptions,
      public TextDocumentRegistrationOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        SelectionRangeOptions::walk(w);
        TextDocumentRegistrationOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT LinkedEditingRangeOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT LinkedEditingRangeRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public LinkedEditingRangeOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        LinkedEditingRangeOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensLegend
{
public:
    QList<QByteArray> tokenTypes = { };
    QList<QByteArray> tokenModifiers = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "tokenTypes", tokenTypes);
        field(w, "tokenModifiers", tokenModifiers);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensOptions : public WorkDoneProgressOptions
{
public:
    SemanticTokensLegend legend = { };
    std::optional<std::variant<bool, QJsonObject>> range = { };
    std::optional<std::variant<bool, QJsonObject>> full = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "legend", legend);
        field(w, "range", range);
        field(w, "full", full);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public SemanticTokensOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        SemanticTokensOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT MonikerOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT MonikerRegistrationOptions : public TextDocumentRegistrationOptions,
                                                           public MonikerOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        MonikerOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeHierarchyOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeHierarchyRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public TypeHierarchyOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        TypeHierarchyOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineValueOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineValueRegistrationOptions
    : public InlineValueOptions,
      public TextDocumentRegistrationOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        InlineValueOptions::walk(w);
        TextDocumentRegistrationOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT InlayHintOptions : public WorkDoneProgressOptions
{
public:
    std::optional<bool> resolveProvider = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
        field(w, "resolveProvider", resolveProvider);
    }
};

class Q_LANGUAGESERVER_EXPORT InlayHintRegistrationOptions : public InlayHintOptions,
                                                             public TextDocumentRegistrationOptions,
                                                             public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        InlayHintOptions::walk(w);
        TextDocumentRegistrationOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineCompletionOptions : public WorkDoneProgressOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceFoldersServerCapabilities
{
public:
    std::optional<bool> supported = { };
    std::optional<std::variant<QByteArray, bool>> changeNotifications = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "supported", supported);
        field(w, "changeNotifications", changeNotifications);
    }
};

class Q_LANGUAGESERVER_EXPORT ServerCapabilities
{
public:
    std::optional<PositionEncodingKind> positionEncoding = { };
    std::optional<std::variant<TextDocumentSyncOptions, TextDocumentSyncKind>>
            textDocumentSync = { };
    std::optional<
            std::variant<NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions>>
            notebookDocumentSync = { };
    std::optional<CompletionOptions> completionProvider = { };
    std::optional<std::variant<bool, HoverOptions>> hoverProvider = { };
    std::optional<SignatureHelpOptions> signatureHelpProvider = { };
    std::optional<std::variant<bool, DeclarationOptions, DeclarationRegistrationOptions>>
            declarationProvider = { };
    std::optional<std::variant<bool, DefinitionOptions>> definitionProvider = { };
    std::optional<std::variant<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>>
            typeDefinitionProvider = { };
    std::optional<std::variant<bool, ImplementationOptions, ImplementationRegistrationOptions>>
            implementationProvider = { };
    std::optional<std::variant<bool, ReferenceOptions>> referencesProvider = { };
    std::optional<std::variant<bool, DocumentHighlightOptions>> documentHighlightProvider = { };
    std::optional<std::variant<bool, DocumentSymbolOptions>> documentSymbolProvider = { };
    std::optional<std::variant<bool, CodeActionOptions>> codeActionProvider = { };
    std::optional<CodeLensOptions> codeLensProvider = { };
    std::optional<DocumentLinkOptions> documentLinkProvider = { };
    std::optional<std::variant<bool, DocumentColorOptions, DocumentColorRegistrationOptions>>
            colorProvider = { };
    std::optional<std::variant<bool, WorkspaceSymbolOptions>> workspaceSymbolProvider = { };
    std::optional<std::variant<bool, DocumentFormattingOptions>> documentFormattingProvider = { };
    std::optional<std::variant<bool, DocumentRangeFormattingOptions>>
            documentRangeFormattingProvider = { };
    std::optional<DocumentOnTypeFormattingOptions> documentOnTypeFormattingProvider = { };
    std::optional<std::variant<bool, RenameOptions>> renameProvider = { };
    std::optional<std::variant<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>>
            foldingRangeProvider = { };
    std::optional<std::variant<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>>
            selectionRangeProvider = { };
    std::optional<ExecuteCommandOptions> executeCommandProvider = { };
    std::optional<std::variant<bool, CallHierarchyOptions, CallHierarchyRegistrationOptions>>
            callHierarchyProvider = { };
    std::optional<
            std::variant<bool, LinkedEditingRangeOptions, LinkedEditingRangeRegistrationOptions>>
            linkedEditingRangeProvider = { };
    std::optional<std::variant<SemanticTokensOptions, SemanticTokensRegistrationOptions>>
            semanticTokensProvider = { };
    std::optional<std::variant<bool, MonikerOptions, MonikerRegistrationOptions>>
            monikerProvider = { };
    std::optional<std::variant<bool, TypeHierarchyOptions, TypeHierarchyRegistrationOptions>>
            typeHierarchyProvider = { };
    std::optional<std::variant<bool, InlineValueOptions, InlineValueRegistrationOptions>>
            inlineValueProvider = { };
    std::optional<std::variant<bool, InlayHintOptions, InlayHintRegistrationOptions>>
            inlayHintProvider = { };
    std::optional<std::variant<DiagnosticOptions, DiagnosticRegistrationOptions>>
            diagnosticProvider = { };
    std::optional<std::variant<bool, InlineCompletionOptions>> inlineCompletionProvider = { };
    std::optional<QJsonObject> workspace = { };
    std::optional<QJsonValue> experimental = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "positionEncoding", positionEncoding);
        field(w, "textDocumentSync", textDocumentSync);
        field(w, "notebookDocumentSync", notebookDocumentSync);
        field(w, "completionProvider", completionProvider);
        field(w, "hoverProvider", hoverProvider);
        field(w, "signatureHelpProvider", signatureHelpProvider);
        field(w, "declarationProvider", declarationProvider);
        field(w, "definitionProvider", definitionProvider);
        field(w, "typeDefinitionProvider", typeDefinitionProvider);
        field(w, "implementationProvider", implementationProvider);
        field(w, "referencesProvider", referencesProvider);
        field(w, "documentHighlightProvider", documentHighlightProvider);
        field(w, "documentSymbolProvider", documentSymbolProvider);
        field(w, "codeActionProvider", codeActionProvider);
        field(w, "codeLensProvider", codeLensProvider);
        field(w, "documentLinkProvider", documentLinkProvider);
        field(w, "colorProvider", colorProvider);
        field(w, "workspaceSymbolProvider", workspaceSymbolProvider);
        field(w, "documentFormattingProvider", documentFormattingProvider);
        field(w, "documentRangeFormattingProvider", documentRangeFormattingProvider);
        field(w, "documentOnTypeFormattingProvider", documentOnTypeFormattingProvider);
        field(w, "renameProvider", renameProvider);
        field(w, "foldingRangeProvider", foldingRangeProvider);
        field(w, "selectionRangeProvider", selectionRangeProvider);
        field(w, "executeCommandProvider", executeCommandProvider);
        field(w, "callHierarchyProvider", callHierarchyProvider);
        field(w, "linkedEditingRangeProvider", linkedEditingRangeProvider);
        field(w, "semanticTokensProvider", semanticTokensProvider);
        field(w, "monikerProvider", monikerProvider);
        field(w, "typeHierarchyProvider", typeHierarchyProvider);
        field(w, "inlineValueProvider", inlineValueProvider);
        field(w, "inlayHintProvider", inlayHintProvider);
        field(w, "diagnosticProvider", diagnosticProvider);
        field(w, "inlineCompletionProvider", inlineCompletionProvider);
        field(w, "workspace", workspace);
        field(w, "experimental", experimental);
    }
};

class Q_LANGUAGESERVER_EXPORT InitializeResult
{
public:
    ServerCapabilities capabilities = { };
    std::optional<QJsonObject> serverInfo = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "capabilities", capabilities);
        field(w, "serverInfo", serverInfo);
    }
};

class Q_LANGUAGESERVER_EXPORT InitializedParams
{
public:
    template <typename W>
    void walk(W &)
    {
    }
};

class Q_LANGUAGESERVER_EXPORT InlayHintLabelPart
{
public:
    QByteArray value = { };
    std::optional<std::variant<QByteArray, MarkupContent>> tooltip = { };
    std::optional<Location> location = { };
    std::optional<Command> command = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "value", value);
        field(w, "tooltip", tooltip);
        field(w, "location", location);
        field(w, "command", command);
    }
};

class Q_LANGUAGESERVER_EXPORT InlayHint
{
public:
    Position position = { };
    std::variant<QByteArray, QList<InlayHintLabelPart>> label = { };
    std::optional<InlayHintKind> kind = { };
    std::optional<QList<TextEdit>> textEdits = { };
    std::optional<std::variant<QByteArray, MarkupContent>> tooltip = { };
    std::optional<bool> paddingLeft = { };
    std::optional<bool> paddingRight = { };
    std::optional<QJsonValue> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "position", position);
        field(w, "label", label);
        field(w, "kind", kind);
        field(w, "textEdits", textEdits);
        field(w, "tooltip", tooltip);
        field(w, "paddingLeft", paddingLeft);
        field(w, "paddingRight", paddingRight);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT InlayHintParams : public WorkDoneProgressParams
{
public:
    TextDocumentIdentifier textDocument = { };
    Range range = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "range", range);
    }
};

class Q_LANGUAGESERVER_EXPORT SelectedCompletionInfo
{
public:
    Range range = { };
    QByteArray text = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "range", range);
        field(w, "text", text);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineCompletionContext
{
public:
    InlineCompletionTriggerKind triggerKind = { };
    std::optional<SelectedCompletionInfo> selectedCompletionInfo = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "triggerKind", triggerKind);
        field(w, "selectedCompletionInfo", selectedCompletionInfo);
    }
};

class Q_LANGUAGESERVER_EXPORT StringValue
{
public:
    static constexpr QByteArrayView kind = "snippet";
    QByteArray value = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "kind", kind);
        field(w, "value", value);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineCompletionItem
{
public:
    std::variant<QByteArray, StringValue> insertText = { };
    std::optional<QByteArray> filterText = { };
    std::optional<Range> range = { };
    std::optional<Command> command = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "insertText", insertText);
        field(w, "filterText", filterText);
        field(w, "range", range);
        field(w, "command", command);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineCompletionList
{
public:
    QList<InlineCompletionItem> items = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "items", items);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineCompletionParams : public TextDocumentPositionParams,
                                                       public WorkDoneProgressParams
{
public:
    InlineCompletionContext context = { };

    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        field(w, "context", context);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineCompletionRegistrationOptions
    : public InlineCompletionOptions,
      public TextDocumentRegistrationOptions,
      public StaticRegistrationOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        InlineCompletionOptions::walk(w);
        TextDocumentRegistrationOptions::walk(w);
        StaticRegistrationOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineValueContext
{
public:
    int frameId = { };
    Range stoppedLocation = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "frameId", frameId);
        field(w, "stoppedLocation", stoppedLocation);
    }
};

class Q_LANGUAGESERVER_EXPORT InlineValueParams : public WorkDoneProgressParams
{
public:
    TextDocumentIdentifier textDocument = { };
    Range range = { };
    InlineValueContext context = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "range", range);
        field(w, "context", context);
    }
};

class Q_LANGUAGESERVER_EXPORT LinkedEditingRangeParams : public TextDocumentPositionParams,
                                                         public WorkDoneProgressParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT LinkedEditingRanges
{
public:
    QList<Range> ranges = { };
    std::optional<QByteArray> wordPattern = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "ranges", ranges);
        field(w, "wordPattern", wordPattern);
    }
};

class Q_LANGUAGESERVER_EXPORT LogMessageParams
{
public:
    MessageType type = { };
    QByteArray message = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "type", type);
        field(w, "message", message);
    }
};

class Q_LANGUAGESERVER_EXPORT LogTraceParams
{
public:
    QByteArray message = { };
    std::optional<QByteArray> verbose = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "message", message);
        field(w, "verbose", verbose);
    }
};

class Q_LANGUAGESERVER_EXPORT MessageActionItem
{
public:
    QByteArray title = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "title", title);
    }
};

class Q_LANGUAGESERVER_EXPORT Moniker
{
public:
    QByteArray scheme = { };
    QByteArray identifier = { };
    UniquenessLevel unique = { };
    std::optional<MonikerKind> kind = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "scheme", scheme);
        field(w, "identifier", identifier);
        field(w, "unique", unique);
        field(w, "kind", kind);
    }
};

class Q_LANGUAGESERVER_EXPORT MonikerParams : public TextDocumentPositionParams,
                                              public WorkDoneProgressParams,
                                              public PartialResultParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT ParameterInformation
{
public:
    std::variant<QByteArray, std::tuple<unsigned int, unsigned int>> label = { };
    std::optional<std::variant<QByteArray, MarkupContent>> documentation = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "label", label);
        field(w, "documentation", documentation);
    }
};

class Q_LANGUAGESERVER_EXPORT PrepareRenameParams : public TextDocumentPositionParams,
                                                    public WorkDoneProgressParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT PreviousResultId
{
public:
    QByteArray uri = { };
    QByteArray value = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
        field(w, "value", value);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkDoneProgressBegin
{
public:
    static constexpr QByteArrayView kind = "begin";
    QByteArray title = {};
    std::optional<bool> cancellable = { };
    std::optional<QByteArray> message = { };
    std::optional<unsigned int> percentage = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "kind", kind);
        field(w, "title", title);
        field(w, "cancellable", cancellable);
        field(w, "message", message);
        field(w, "percentage", percentage);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkDoneProgressReport
{
public:
    static constexpr QByteArrayView kind = "report";
    std::optional<bool> cancellable = { };
    std::optional<QByteArray> message = { };
    std::optional<unsigned int> percentage = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "kind", kind);
        field(w, "cancellable", cancellable);
        field(w, "message", message);
        field(w, "percentage", percentage);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkDoneProgressEnd
{
public:
    static constexpr QByteArrayView kind = "end";
    std::optional<QByteArray> message = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "kind", kind);
        field(w, "message", message);
    }
};

class Q_LANGUAGESERVER_EXPORT ProgressParams
{
public:
    ProgressToken token = { };
    std::variant<WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd> value = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "token", token);
        field(w, "value", value);
    }
};

class Q_LANGUAGESERVER_EXPORT PublishDiagnosticsParams
{
public:
    QByteArray uri = { };
    std::optional<int> version = { };
    QList<Diagnostic> diagnostics = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
        field(w, "version", version);
        field(w, "diagnostics", diagnostics);
    }
};

class Q_LANGUAGESERVER_EXPORT ReferenceContext
{
public:
    bool includeDeclaration = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "includeDeclaration", includeDeclaration);
    }
};

class Q_LANGUAGESERVER_EXPORT ReferenceParams : public TextDocumentPositionParams,
                                                public WorkDoneProgressParams,
                                                public PartialResultParams
{
public:
    ReferenceContext context = { };

    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "context", context);
    }
};

class Q_LANGUAGESERVER_EXPORT ReferenceRegistrationOptions : public TextDocumentRegistrationOptions,
                                                             public ReferenceOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        ReferenceOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT Registration
{
public:
    QByteArray id = { };
    QByteArray method = { };
    std::optional<QJsonValue> registerOptions = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "id", id);
        field(w, "method", method);
        field(w, "registerOptions", registerOptions);
    }
};

class Q_LANGUAGESERVER_EXPORT RegistrationParams
{
public:
    QList<Registration> registrations = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "registrations", registrations);
    }
};

class Q_LANGUAGESERVER_EXPORT RenameFilesParams
{
public:
    QList<FileRename> files = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "files", files);
    }
};

class Q_LANGUAGESERVER_EXPORT RenameParams : public WorkDoneProgressParams
{
public:
    TextDocumentIdentifier textDocument = { };
    Position position = { };
    QByteArray newName = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "position", position);
        field(w, "newName", newName);
    }
};

class Q_LANGUAGESERVER_EXPORT RenameRegistrationOptions : public TextDocumentRegistrationOptions,
                                                          public RenameOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        RenameOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT SelectionRangeParams : public WorkDoneProgressParams,
                                                     public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = {};
    QList<Position> positions = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "positions", positions);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokens
{
public:
    std::optional<QByteArray> resultId = { };
    QList<unsigned int> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "resultId", resultId);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensEdit
{
public:
    unsigned int start = { };
    unsigned int deleteCount = { };
    std::optional<QList<unsigned int>> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "start", start);
        field(w, "deleteCount", deleteCount);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensDelta
{
public:
    std::optional<QByteArray> resultId = { };
    QList<SemanticTokensEdit> edits = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "resultId", resultId);
        field(w, "edits", edits);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensDeltaParams : public WorkDoneProgressParams,
                                                          public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = {};
    QByteArray previousResultId = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "previousResultId", previousResultId);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensDeltaPartialResult
{
public:
    QList<SemanticTokensEdit> edits = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "edits", edits);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensParams : public WorkDoneProgressParams,
                                                     public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensPartialResult
{
public:
    QList<unsigned int> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT SemanticTokensRangeParams : public WorkDoneProgressParams,
                                                          public PartialResultParams
{
public:
    TextDocumentIdentifier textDocument = { };
    Range range = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "textDocument", textDocument);
        field(w, "range", range);
    }
};

class Q_LANGUAGESERVER_EXPORT SetTraceParams
{
public:
    TraceValues value = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "value", value);
    }
};

class Q_LANGUAGESERVER_EXPORT ShowDocumentParams
{
public:
    QByteArray uri = { };
    std::optional<bool> external = { };
    std::optional<bool> takeFocus = { };
    std::optional<Range> selection = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "uri", uri);
        field(w, "external", external);
        field(w, "takeFocus", takeFocus);
        field(w, "selection", selection);
    }
};

class Q_LANGUAGESERVER_EXPORT ShowDocumentResult
{
public:
    bool success = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "success", success);
    }
};

class Q_LANGUAGESERVER_EXPORT ShowMessageParams
{
public:
    MessageType type = { };
    QByteArray message = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "type", type);
        field(w, "message", message);
    }
};

class Q_LANGUAGESERVER_EXPORT ShowMessageRequestParams
{
public:
    MessageType type = { };
    QByteArray message = { };
    std::optional<QList<MessageActionItem>> actions = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "type", type);
        field(w, "message", message);
        field(w, "actions", actions);
    }
};

class Q_LANGUAGESERVER_EXPORT SignatureInformation
{
public:
    QByteArray label = { };
    std::optional<std::variant<QByteArray, MarkupContent>> documentation = { };
    std::optional<QList<ParameterInformation>> parameters = { };
    std::optional<unsigned int> activeParameter = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "label", label);
        field(w, "documentation", documentation);
        field(w, "parameters", parameters);
        field(w, "activeParameter", activeParameter);
    }
};

class Q_LANGUAGESERVER_EXPORT SignatureHelp
{
public:
    QList<SignatureInformation> signatures = { };
    std::optional<unsigned int> activeSignature = { };
    std::optional<unsigned int> activeParameter = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "signatures", signatures);
        field(w, "activeSignature", activeSignature);
        field(w, "activeParameter", activeParameter);
    }
};

class Q_LANGUAGESERVER_EXPORT SignatureHelpContext
{
public:
    SignatureHelpTriggerKind triggerKind = { };
    std::optional<QByteArray> triggerCharacter = { };
    bool isRetrigger = { };
    std::optional<SignatureHelp> activeSignatureHelp = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "triggerKind", triggerKind);
        field(w, "triggerCharacter", triggerCharacter);
        field(w, "isRetrigger", isRetrigger);
        field(w, "activeSignatureHelp", activeSignatureHelp);
    }
};

class Q_LANGUAGESERVER_EXPORT SignatureHelpParams : public TextDocumentPositionParams,
                                                    public WorkDoneProgressParams
{
public:
    std::optional<SignatureHelpContext> context = { };

    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        field(w, "context", context);
    }
};

class Q_LANGUAGESERVER_EXPORT SignatureHelpRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public SignatureHelpOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        SignatureHelpOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT SymbolInformation : public BaseSymbolInformation
{
public:
    std::optional<bool> deprecated = { };
    Location location = { };

    template <typename W>
    void walk(W &w)
    {
        BaseSymbolInformation::walk(w);
        field(w, "deprecated", deprecated);
        field(w, "location", location);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentChangeRegistrationOptions
    : public TextDocumentRegistrationOptions
{
public:
    TextDocumentSyncKind syncKind = { };

    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        field(w, "syncKind", syncKind);
    }
};

class Q_LANGUAGESERVER_EXPORT TextDocumentSaveRegistrationOptions
    : public TextDocumentRegistrationOptions,
      public SaveOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentRegistrationOptions::walk(w);
        SaveOptions::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeDefinitionParams : public TextDocumentPositionParams,
                                                     public WorkDoneProgressParams,
                                                     public PartialResultParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeHierarchyItem
{
public:
    QByteArray name = { };
    SymbolKind kind = { };
    std::optional<QList<SymbolTag>> tags = { };
    std::optional<QByteArray> detail = { };
    QByteArray uri = { };
    Range range = { };
    Range selectionRange = { };
    std::optional<QJsonValue> data = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "name", name);
        field(w, "kind", kind);
        field(w, "tags", tags);
        field(w, "detail", detail);
        field(w, "uri", uri);
        field(w, "range", range);
        field(w, "selectionRange", selectionRange);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeHierarchyPrepareParams : public TextDocumentPositionParams,
                                                           public WorkDoneProgressParams
{
public:
    template <typename W>
    void walk(W &w)
    {
        TextDocumentPositionParams::walk(w);
        WorkDoneProgressParams::walk(w);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeHierarchySubtypesParams : public WorkDoneProgressParams,
                                                            public PartialResultParams
{
public:
    TypeHierarchyItem item = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "item", item);
    }
};

class Q_LANGUAGESERVER_EXPORT TypeHierarchySupertypesParams : public WorkDoneProgressParams,
                                                              public PartialResultParams
{
public:
    TypeHierarchyItem item = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "item", item);
    }
};

class Q_LANGUAGESERVER_EXPORT Unregistration
{
public:
    QByteArray id = { };
    QByteArray method = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "id", id);
        field(w, "method", method);
    }
};

class Q_LANGUAGESERVER_EXPORT UnregistrationParams
{
public:
    QList<Unregistration> unregisterations = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "unregisterations", unregisterations);
    }
};

class Q_LANGUAGESERVER_EXPORT WillSaveTextDocumentParams
{
public:
    TextDocumentIdentifier textDocument = {};
    TextDocumentSaveReason reason = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "textDocument", textDocument);
        field(w, "reason", reason);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkDoneProgressCancelParams
{
public:
    ProgressToken token = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "token", token);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkDoneProgressCreateParams
{
public:
    ProgressToken token = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "token", token);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceDiagnosticParams : public WorkDoneProgressParams,
                                                          public PartialResultParams
{
public:
    std::optional<QByteArray> identifier = { };
    QList<PreviousResultId> previousResultIds = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "identifier", identifier);
        field(w, "previousResultIds", previousResultIds);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceDiagnosticReport
{
public:
    QList<WorkspaceDocumentDiagnosticReport> items = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "items", items);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceDiagnosticReportPartialResult
{
public:
    QList<WorkspaceDocumentDiagnosticReport> items = { };

    template <typename W>
    void walk(W &w)
    {
        field(w, "items", items);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceSymbol : public BaseSymbolInformation
{
public:
    std::variant<Location, QJsonObject> location = { };
    std::optional<QJsonValue> data = { };

    template <typename W>
    void walk(W &w)
    {
        BaseSymbolInformation::walk(w);
        field(w, "location", location);
        field(w, "data", data);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceSymbolParams : public WorkDoneProgressParams,
                                                      public PartialResultParams
{
public:
    QByteArray query = { };

    template <typename W>
    void walk(W &w)
    {
        WorkDoneProgressParams::walk(w);
        PartialResultParams::walk(w);
        field(w, "query", query);
    }
};

class Q_LANGUAGESERVER_EXPORT WorkspaceSymbolRegistrationOptions : public WorkspaceSymbolOptions
{
public:
    template <typename W>
    void walk(W &w)
    {
        WorkspaceSymbolOptions::walk(w);
    }
};

} // namespace QLspSpecification

namespace QTypedJson {

template<>
inline QString enumToString<QLspSpecification::TraceValue>(QLspSpecification::TraceValue value)
{
    switch (value) {
    case QLspSpecification::TraceValue::Off:
        return QLatin1String("off");
    case QLspSpecification::TraceValue::Messages:
        return QLatin1String("messages");
    case QLspSpecification::TraceValue::Verbose:
        return QLatin1String("verbose");
    }
    return QString();
}

template<>
inline QString enumToString<QLspSpecification::ErrorCodes>(QLspSpecification::ErrorCodes value)
{
    return enumToIntString<QLspSpecification::ErrorCodes>(value);
}

template <>
inline QString
enumToString<QLspSpecification::CodeActionKind>(QLspSpecification::CodeActionKind value)
{
    switch (value) {
    case QLspSpecification::CodeActionKind::Empty:
        return QLatin1String("");
    case QLspSpecification::CodeActionKind::QuickFix:
        return QLatin1String("quickfix");
    case QLspSpecification::CodeActionKind::Refactor:
        return QLatin1String("refactor");
    case QLspSpecification::CodeActionKind::RefactorExtract:
        return QLatin1String("refactor.extract");
    case QLspSpecification::CodeActionKind::RefactorInline:
        return QLatin1String("refactor.inline");
    case QLspSpecification::CodeActionKind::RefactorRewrite:
        return QLatin1String("refactor.rewrite");
    case QLspSpecification::CodeActionKind::Source:
        return QLatin1String("source");
    case QLspSpecification::CodeActionKind::SourceOrganizeImports:
        return QLatin1String("source.organizeImports");
    case QLspSpecification::CodeActionKind::SourceFixAll:
        return QLatin1String("source.fixAll");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::CodeActionKind
enumFromString<QLspSpecification::CodeActionKind>(const QString &string)
{
    if (string.compare(QLatin1String(""), Qt::CaseInsensitive) == 0)
        return QLspSpecification::CodeActionKind::Empty;
    else if (string.compare(QLatin1String("quickfix"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::CodeActionKind::QuickFix;
    else if (string.compare(QLatin1String("refactor"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::CodeActionKind::Refactor;
    else if (string.compare(QLatin1String("refactor.extract"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::CodeActionKind::RefactorExtract;
    else if (string.compare(QLatin1String("refactor.inline"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::CodeActionKind::RefactorInline;
    else if (string.compare(QLatin1String("refactor.rewrite"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::CodeActionKind::RefactorRewrite;
    else if (string.compare(QLatin1String("source"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::CodeActionKind::Source;
    else if (string.compare(QLatin1String("source.organizeImports"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::CodeActionKind::SourceOrganizeImports;
    else if (string.compare(QLatin1String("source.fixAll"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::CodeActionKind::SourceFixAll;
    return QLspSpecification::CodeActionKind{ };
}

template <>
inline QString enumToString<QLspSpecification::CodeActionTriggerKind>(
        QLspSpecification::CodeActionTriggerKind value)
{
    return enumToIntString<QLspSpecification::CodeActionTriggerKind>(value);
}

template <>
inline QString
enumToString<QLspSpecification::CompletionItemKind>(QLspSpecification::CompletionItemKind value)
{
    return enumToIntString<QLspSpecification::CompletionItemKind>(value);
}

template <>
inline QString
enumToString<QLspSpecification::CompletionItemTag>(QLspSpecification::CompletionItemTag value)
{
    return enumToIntString<QLspSpecification::CompletionItemTag>(value);
}

template <>
inline QString enumToString<QLspSpecification::CompletionTriggerKind>(
        QLspSpecification::CompletionTriggerKind value)
{
    return enumToIntString<QLspSpecification::CompletionTriggerKind>(value);
}

template <>
inline QString
enumToString<QLspSpecification::DiagnosticSeverity>(QLspSpecification::DiagnosticSeverity value)
{
    return enumToIntString<QLspSpecification::DiagnosticSeverity>(value);
}

template <>
inline QString
enumToString<QLspSpecification::DiagnosticTag>(QLspSpecification::DiagnosticTag value)
{
    return enumToIntString<QLspSpecification::DiagnosticTag>(value);
}

template <>
inline QString enumToString<QLspSpecification::DocumentDiagnosticReportKind>(
        QLspSpecification::DocumentDiagnosticReportKind value)
{
    switch (value) {
    case QLspSpecification::DocumentDiagnosticReportKind::Full:
        return QLatin1String("full");
    case QLspSpecification::DocumentDiagnosticReportKind::Unchanged:
        return QLatin1String("unchanged");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::DocumentDiagnosticReportKind
enumFromString<QLspSpecification::DocumentDiagnosticReportKind>(const QString &string)
{
    if (string.compare(QLatin1String("full"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::DocumentDiagnosticReportKind::Full;
    else if (string.compare(QLatin1String("unchanged"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::DocumentDiagnosticReportKind::Unchanged;
    return QLspSpecification::DocumentDiagnosticReportKind{ };
}

template <>
inline QString enumToString<QLspSpecification::DocumentHighlightKind>(
        QLspSpecification::DocumentHighlightKind value)
{
    return enumToIntString<QLspSpecification::DocumentHighlightKind>(value);
}

template <>
inline QString
enumToString<QLspSpecification::FailureHandlingKind>(QLspSpecification::FailureHandlingKind value)
{
    switch (value) {
    case QLspSpecification::FailureHandlingKind::Abort:
        return QLatin1String("abort");
    case QLspSpecification::FailureHandlingKind::Transactional:
        return QLatin1String("transactional");
    case QLspSpecification::FailureHandlingKind::TextOnlyTransactional:
        return QLatin1String("textOnlyTransactional");
    case QLspSpecification::FailureHandlingKind::Undo:
        return QLatin1String("undo");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::FailureHandlingKind
enumFromString<QLspSpecification::FailureHandlingKind>(const QString &string)
{
    if (string.compare(QLatin1String("abort"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::FailureHandlingKind::Abort;
    else if (string.compare(QLatin1String("transactional"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::FailureHandlingKind::Transactional;
    else if (string.compare(QLatin1String("textOnlyTransactional"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::FailureHandlingKind::TextOnlyTransactional;
    else if (string.compare(QLatin1String("undo"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::FailureHandlingKind::Undo;
    return QLspSpecification::FailureHandlingKind{ };
}

template <>
inline QString
enumToString<QLspSpecification::FileChangeType>(QLspSpecification::FileChangeType value)
{
    return enumToIntString<QLspSpecification::FileChangeType>(value);
}

template <>
inline QString enumToString<QLspSpecification::FileOperationPatternKind>(
        QLspSpecification::FileOperationPatternKind value)
{
    switch (value) {
    case QLspSpecification::FileOperationPatternKind::File:
        return QLatin1String("file");
    case QLspSpecification::FileOperationPatternKind::Folder:
        return QLatin1String("folder");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::FileOperationPatternKind
enumFromString<QLspSpecification::FileOperationPatternKind>(const QString &string)
{
    if (string.compare(QLatin1String("file"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::FileOperationPatternKind::File;
    else if (string.compare(QLatin1String("folder"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::FileOperationPatternKind::Folder;
    return QLspSpecification::FileOperationPatternKind{ };
}

template <>
inline QString
enumToString<QLspSpecification::FoldingRangeKind>(QLspSpecification::FoldingRangeKind value)
{
    switch (value) {
    case QLspSpecification::FoldingRangeKind::Comment:
        return QLatin1String("comment");
    case QLspSpecification::FoldingRangeKind::Imports:
        return QLatin1String("imports");
    case QLspSpecification::FoldingRangeKind::Region:
        return QLatin1String("region");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::FoldingRangeKind
enumFromString<QLspSpecification::FoldingRangeKind>(const QString &string)
{
    if (string.compare(QLatin1String("comment"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::FoldingRangeKind::Comment;
    else if (string.compare(QLatin1String("imports"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::FoldingRangeKind::Imports;
    else if (string.compare(QLatin1String("region"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::FoldingRangeKind::Region;
    return QLspSpecification::FoldingRangeKind{ };
}

template <>
inline QString
enumToString<QLspSpecification::InlayHintKind>(QLspSpecification::InlayHintKind value)
{
    return enumToIntString<QLspSpecification::InlayHintKind>(value);
}

template <>
inline QString enumToString<QLspSpecification::InlineCompletionTriggerKind>(
        QLspSpecification::InlineCompletionTriggerKind value)
{
    return enumToIntString<QLspSpecification::InlineCompletionTriggerKind>(value);
}

template <>
inline QString
enumToString<QLspSpecification::InsertTextFormat>(QLspSpecification::InsertTextFormat value)
{
    return enumToIntString<QLspSpecification::InsertTextFormat>(value);
}

template <>
inline QString
enumToString<QLspSpecification::InsertTextMode>(QLspSpecification::InsertTextMode value)
{
    return enumToIntString<QLspSpecification::InsertTextMode>(value);
}

template <>
inline QString
enumToString<QLspSpecification::LSPErrorCodes>(QLspSpecification::LSPErrorCodes value)
{
    return enumToIntString<QLspSpecification::LSPErrorCodes>(value);
}

template <>
inline QString enumToString<QLspSpecification::MarkupKind>(QLspSpecification::MarkupKind value)
{
    switch (value) {
    case QLspSpecification::MarkupKind::PlainText:
        return QLatin1String("plaintext");
    case QLspSpecification::MarkupKind::Markdown:
        return QLatin1String("markdown");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::MarkupKind
enumFromString<QLspSpecification::MarkupKind>(const QString &string)
{
    if (string.compare(QLatin1String("plaintext"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::MarkupKind::PlainText;
    else if (string.compare(QLatin1String("markdown"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::MarkupKind::Markdown;
    return QLspSpecification::MarkupKind{ };
}

template <>
inline QString enumToString<QLspSpecification::MessageType>(QLspSpecification::MessageType value)
{
    return enumToIntString<QLspSpecification::MessageType>(value);
}

template <>
inline QString enumToString<QLspSpecification::MonikerKind>(QLspSpecification::MonikerKind value)
{
    switch (value) {
    case QLspSpecification::MonikerKind::Import:
        return QLatin1String("import");
    case QLspSpecification::MonikerKind::Export:
        return QLatin1String("export");
    case QLspSpecification::MonikerKind::Local:
        return QLatin1String("local");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::MonikerKind
enumFromString<QLspSpecification::MonikerKind>(const QString &string)
{
    if (string.compare(QLatin1String("import"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::MonikerKind::Import;
    else if (string.compare(QLatin1String("export"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::MonikerKind::Export;
    else if (string.compare(QLatin1String("local"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::MonikerKind::Local;
    return QLspSpecification::MonikerKind{ };
}

template <>
inline QString
enumToString<QLspSpecification::NotebookCellKind>(QLspSpecification::NotebookCellKind value)
{
    return enumToIntString<QLspSpecification::NotebookCellKind>(value);
}

template <>
inline QString
enumToString<QLspSpecification::PositionEncodingKind>(QLspSpecification::PositionEncodingKind value)
{
    switch (value) {
    case QLspSpecification::PositionEncodingKind::UTF8:
        return QLatin1String("utf-8");
    case QLspSpecification::PositionEncodingKind::UTF16:
        return QLatin1String("utf-16");
    case QLspSpecification::PositionEncodingKind::UTF32:
        return QLatin1String("utf-32");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::PositionEncodingKind
enumFromString<QLspSpecification::PositionEncodingKind>(const QString &string)
{
    if (string.compare(QLatin1String("utf-8"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::PositionEncodingKind::UTF8;
    else if (string.compare(QLatin1String("utf-16"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::PositionEncodingKind::UTF16;
    else if (string.compare(QLatin1String("utf-32"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::PositionEncodingKind::UTF32;
    return QLspSpecification::PositionEncodingKind{ };
}

template <>
inline QString enumToString<QLspSpecification::PrepareSupportDefaultBehavior>(
        QLspSpecification::PrepareSupportDefaultBehavior value)
{
    return enumToIntString<QLspSpecification::PrepareSupportDefaultBehavior>(value);
}

template <>
inline QString enumToString<QLspSpecification::ResourceOperationKind>(
        QLspSpecification::ResourceOperationKind value)
{
    switch (value) {
    case QLspSpecification::ResourceOperationKind::Create:
        return QLatin1String("create");
    case QLspSpecification::ResourceOperationKind::Rename:
        return QLatin1String("rename");
    case QLspSpecification::ResourceOperationKind::Delete:
        return QLatin1String("delete");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::ResourceOperationKind
enumFromString<QLspSpecification::ResourceOperationKind>(const QString &string)
{
    if (string.compare(QLatin1String("create"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::ResourceOperationKind::Create;
    else if (string.compare(QLatin1String("rename"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::ResourceOperationKind::Rename;
    else if (string.compare(QLatin1String("delete"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::ResourceOperationKind::Delete;
    return QLspSpecification::ResourceOperationKind{ };
}

template <>
inline QString enumToString<QLspSpecification::SemanticTokenModifiers>(
        QLspSpecification::SemanticTokenModifiers value)
{
    switch (value) {
    case QLspSpecification::SemanticTokenModifiers::Declaration:
        return QLatin1String("declaration");
    case QLspSpecification::SemanticTokenModifiers::Definition:
        return QLatin1String("definition");
    case QLspSpecification::SemanticTokenModifiers::Readonly:
        return QLatin1String("readonly");
    case QLspSpecification::SemanticTokenModifiers::Static:
        return QLatin1String("static");
    case QLspSpecification::SemanticTokenModifiers::Deprecated:
        return QLatin1String("deprecated");
    case QLspSpecification::SemanticTokenModifiers::Abstract:
        return QLatin1String("abstract");
    case QLspSpecification::SemanticTokenModifiers::Async:
        return QLatin1String("async");
    case QLspSpecification::SemanticTokenModifiers::Modification:
        return QLatin1String("modification");
    case QLspSpecification::SemanticTokenModifiers::Documentation:
        return QLatin1String("documentation");
    case QLspSpecification::SemanticTokenModifiers::DefaultLibrary:
        return QLatin1String("defaultLibrary");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::SemanticTokenModifiers
enumFromString<QLspSpecification::SemanticTokenModifiers>(const QString &string)
{
    if (string.compare(QLatin1String("declaration"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::Declaration;
    else if (string.compare(QLatin1String("definition"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::Definition;
    else if (string.compare(QLatin1String("readonly"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::Readonly;
    else if (string.compare(QLatin1String("static"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::Static;
    else if (string.compare(QLatin1String("deprecated"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::Deprecated;
    else if (string.compare(QLatin1String("abstract"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::Abstract;
    else if (string.compare(QLatin1String("async"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::Async;
    else if (string.compare(QLatin1String("modification"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::Modification;
    else if (string.compare(QLatin1String("documentation"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::Documentation;
    else if (string.compare(QLatin1String("defaultLibrary"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenModifiers::DefaultLibrary;
    return QLspSpecification::SemanticTokenModifiers{ };
}

template <>
inline QString
enumToString<QLspSpecification::SemanticTokenTypes>(QLspSpecification::SemanticTokenTypes value)
{
    switch (value) {
    case QLspSpecification::SemanticTokenTypes::Namespace:
        return QLatin1String("namespace");
    case QLspSpecification::SemanticTokenTypes::Type:
        return QLatin1String("type");
    case QLspSpecification::SemanticTokenTypes::Class:
        return QLatin1String("class");
    case QLspSpecification::SemanticTokenTypes::Enum:
        return QLatin1String("enum");
    case QLspSpecification::SemanticTokenTypes::Interface:
        return QLatin1String("interface");
    case QLspSpecification::SemanticTokenTypes::Struct:
        return QLatin1String("struct");
    case QLspSpecification::SemanticTokenTypes::TypeParameter:
        return QLatin1String("typeParameter");
    case QLspSpecification::SemanticTokenTypes::Parameter:
        return QLatin1String("parameter");
    case QLspSpecification::SemanticTokenTypes::Variable:
        return QLatin1String("variable");
    case QLspSpecification::SemanticTokenTypes::Property:
        return QLatin1String("property");
    case QLspSpecification::SemanticTokenTypes::EnumMember:
        return QLatin1String("enumMember");
    case QLspSpecification::SemanticTokenTypes::Event:
        return QLatin1String("event");
    case QLspSpecification::SemanticTokenTypes::Function:
        return QLatin1String("function");
    case QLspSpecification::SemanticTokenTypes::Method:
        return QLatin1String("method");
    case QLspSpecification::SemanticTokenTypes::Macro:
        return QLatin1String("macro");
    case QLspSpecification::SemanticTokenTypes::Keyword:
        return QLatin1String("keyword");
    case QLspSpecification::SemanticTokenTypes::Modifier:
        return QLatin1String("modifier");
    case QLspSpecification::SemanticTokenTypes::Comment:
        return QLatin1String("comment");
    case QLspSpecification::SemanticTokenTypes::String:
        return QLatin1String("string");
    case QLspSpecification::SemanticTokenTypes::Number:
        return QLatin1String("number");
    case QLspSpecification::SemanticTokenTypes::Regexp:
        return QLatin1String("regexp");
    case QLspSpecification::SemanticTokenTypes::Operator:
        return QLatin1String("operator");
    case QLspSpecification::SemanticTokenTypes::Decorator:
        return QLatin1String("decorator");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::SemanticTokenTypes
enumFromString<QLspSpecification::SemanticTokenTypes>(const QString &string)
{
    if (string.compare(QLatin1String("namespace"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Namespace;
    else if (string.compare(QLatin1String("type"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Type;
    else if (string.compare(QLatin1String("class"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Class;
    else if (string.compare(QLatin1String("enum"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Enum;
    else if (string.compare(QLatin1String("interface"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Interface;
    else if (string.compare(QLatin1String("struct"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Struct;
    else if (string.compare(QLatin1String("typeParameter"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::TypeParameter;
    else if (string.compare(QLatin1String("parameter"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Parameter;
    else if (string.compare(QLatin1String("variable"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Variable;
    else if (string.compare(QLatin1String("property"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Property;
    else if (string.compare(QLatin1String("enumMember"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::EnumMember;
    else if (string.compare(QLatin1String("event"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Event;
    else if (string.compare(QLatin1String("function"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Function;
    else if (string.compare(QLatin1String("method"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Method;
    else if (string.compare(QLatin1String("macro"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Macro;
    else if (string.compare(QLatin1String("keyword"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Keyword;
    else if (string.compare(QLatin1String("modifier"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Modifier;
    else if (string.compare(QLatin1String("comment"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Comment;
    else if (string.compare(QLatin1String("string"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::String;
    else if (string.compare(QLatin1String("number"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Number;
    else if (string.compare(QLatin1String("regexp"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Regexp;
    else if (string.compare(QLatin1String("operator"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Operator;
    else if (string.compare(QLatin1String("decorator"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::SemanticTokenTypes::Decorator;
    return QLspSpecification::SemanticTokenTypes{ };
}

template <>
inline QString enumToString<QLspSpecification::SignatureHelpTriggerKind>(
        QLspSpecification::SignatureHelpTriggerKind value)
{
    return enumToIntString<QLspSpecification::SignatureHelpTriggerKind>(value);
}

template <>
inline QString enumToString<QLspSpecification::SymbolKind>(QLspSpecification::SymbolKind value)
{
    return enumToIntString<QLspSpecification::SymbolKind>(value);
}

template <>
inline QString enumToString<QLspSpecification::SymbolTag>(QLspSpecification::SymbolTag value)
{
    return enumToIntString<QLspSpecification::SymbolTag>(value);
}

template <>
inline QString enumToString<QLspSpecification::TextDocumentSaveReason>(
        QLspSpecification::TextDocumentSaveReason value)
{
    return enumToIntString<QLspSpecification::TextDocumentSaveReason>(value);
}

template <>
inline QString
enumToString<QLspSpecification::TextDocumentSyncKind>(QLspSpecification::TextDocumentSyncKind value)
{
    return enumToIntString<QLspSpecification::TextDocumentSyncKind>(value);
}

template <>
inline QString enumToString<QLspSpecification::TokenFormat>(QLspSpecification::TokenFormat value)
{
    switch (value) {
    case QLspSpecification::TokenFormat::Relative:
        return QLatin1String("relative");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::TokenFormat
enumFromString<QLspSpecification::TokenFormat>(const QString &string)
{
    if (string.compare(QLatin1String("relative"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::TokenFormat::Relative;
    return QLspSpecification::TokenFormat{ };
}

template <>
inline QString enumToString<QLspSpecification::TraceValues>(QLspSpecification::TraceValues value)
{
    switch (value) {
    case QLspSpecification::TraceValues::Off:
        return QLatin1String("off");
    case QLspSpecification::TraceValues::Messages:
        return QLatin1String("messages");
    case QLspSpecification::TraceValues::Verbose:
        return QLatin1String("verbose");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::TraceValues
enumFromString<QLspSpecification::TraceValues>(const QString &string)
{
    if (string.compare(QLatin1String("off"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::TraceValues::Off;
    else if (string.compare(QLatin1String("messages"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::TraceValues::Messages;
    else if (string.compare(QLatin1String("verbose"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::TraceValues::Verbose;
    return QLspSpecification::TraceValues{ };
}

template <>
inline QString
enumToString<QLspSpecification::UniquenessLevel>(QLspSpecification::UniquenessLevel value)
{
    switch (value) {
    case QLspSpecification::UniquenessLevel::Document:
        return QLatin1String("document");
    case QLspSpecification::UniquenessLevel::Project:
        return QLatin1String("project");
    case QLspSpecification::UniquenessLevel::Group:
        return QLatin1String("group");
    case QLspSpecification::UniquenessLevel::Scheme:
        return QLatin1String("scheme");
    case QLspSpecification::UniquenessLevel::Global:
        return QLatin1String("global");
    default:
        return QString::number(int(value));
    }
}

template <>
inline QLspSpecification::UniquenessLevel
enumFromString<QLspSpecification::UniquenessLevel>(const QString &string)
{
    if (string.compare(QLatin1String("document"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::UniquenessLevel::Document;
    else if (string.compare(QLatin1String("project"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::UniquenessLevel::Project;
    else if (string.compare(QLatin1String("group"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::UniquenessLevel::Group;
    else if (string.compare(QLatin1String("scheme"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::UniquenessLevel::Scheme;
    else if (string.compare(QLatin1String("global"), Qt::CaseInsensitive) == 0)
        return QLspSpecification::UniquenessLevel::Global;
    return QLspSpecification::UniquenessLevel{ };
}

template <>
inline QString enumToString<QLspSpecification::WatchKind>(QLspSpecification::WatchKind value)
{
    return enumToIntString<QLspSpecification::WatchKind>(value);
}

} // namespace QTypedJson
QT_END_NAMESPACE
#endif // QLANGUAGESERVERSPECTYPES_P_H
