/*
  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 <QObject>
#include <QString>
class QJsonObject;
class QDebug;
namespace TextAutoGenerateTextMcpProtocolCore
{
class TEXTAUTOGENERATETEXTMCPPROTOCOLCORE_EXPORT McpProtocolToolChoice
{
    Q_GADGET
public:
    enum class Mode : uint8_t {
        Auto = 0,
        None,
        Required,
        Unknown,
    };
    Q_ENUM(Mode)

    /*!
     */
    McpProtocolToolChoice();
    /*!
     */
    ~McpProtocolToolChoice() = default;

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

    /*!
     */
    [[nodiscard]] static McpProtocolToolChoice fromJson(const QJsonObject &obj);
    /*!
     */
    [[nodiscard]] static QJsonObject toJson(const McpProtocolToolChoice &image);

    /*!
     */
    [[nodiscard]] Mode mode() const;
    /*!
     */
    void setMode(Mode newMode);

    /*!
     */
    [[nodiscard]] static QString convertModeToString(McpProtocolToolChoice::Mode mode);

    /*!
     */
    [[nodiscard]] static McpProtocolToolChoice::Mode convertModeFromString(const QString &str);

private:
    Mode mMode = Mode::Unknown;
};
}
Q_DECLARE_TYPEINFO(TextAutoGenerateTextMcpProtocolCore::McpProtocolToolChoice, Q_RELOCATABLE_TYPE);
TEXTAUTOGENERATETEXTMCPPROTOCOLCORE_EXPORT QDebug operator<<(QDebug d, const TextAutoGenerateTextMcpProtocolCore::McpProtocolToolChoice &t);
