/*
  SPDX-FileCopyrightText: 2026 Laurent Montel <montel@kde.org>

  SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "textautogeneratetextmcpprotocolcore_export.h"
#include <QByteArray>
#include <QJsonValue>
#include <QObject>
#include <QString>
class QJsonObject;
class QDebug;
namespace TextAutoGenerateTextMcpProtocolCore
{
class TEXTAUTOGENERATETEXTMCPPROTOCOLCORE_EXPORT McpProtocolError
{
    Q_GADGET
public:
    /*!
     */
    McpProtocolError();
    /*!
     */
    ~McpProtocolError();

    /*!
     */
    [[nodiscard]] bool operator==(const McpProtocolError &other) const;

    /*!
     */
    [[nodiscard]] static McpProtocolError fromJson(const QJsonObject &obj);
    /*!
     */
    [[nodiscard]] static QJsonObject toJson(const McpProtocolError &image);
    /*!
     */
    [[nodiscard]] int code() const;
    /*!
     */
    void setCode(int newCode);

    /*!
     */
    [[nodiscard]] std::optional<QJsonValue> data() const;
    /*!
     */
    void setData(std::optional<QJsonValue> newData);

    /*!
     */
    [[nodiscard]] QString message() const;
    /*!
     */
    void setMessage(const QString &newMessage);

private:
    int mCode = 0;
    std::optional<QJsonValue> mData;
    QString mMessage;
};
}
Q_DECLARE_TYPEINFO(TextAutoGenerateTextMcpProtocolCore::McpProtocolError, Q_RELOCATABLE_TYPE);
TEXTAUTOGENERATETEXTMCPPROTOCOLCORE_EXPORT QDebug operator<<(QDebug d, const TextAutoGenerateTextMcpProtocolCore::McpProtocolError &t);
