// This file generated by libqtelegram-code-generator.
// You can download it from: https://github.com/Aseman-Land/libqtelegram-code-generator
// DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

#ifndef LQTG_TYPE_BOTCOMMAND
#define LQTG_TYPE_BOTCOMMAND

#include "telegramtypeobject.h"

#include <QMetaType>
#include <QVariant>
#include "../coretypes.h"

#include <QDataStream>

#include <QString>

class LIBQTELEGRAMSHARED_EXPORT BotCommand : public TelegramTypeObject
{
public:
    enum BotCommandClassType {
        typeBotCommand = 0xc27ac8c7
    };

    BotCommand(BotCommandClassType classType = typeBotCommand, InboundPkt *in = 0);
    BotCommand(InboundPkt *in);
    BotCommand(const Null&);
    BotCommand(const BotCommand &another);
    virtual ~BotCommand();

    void setCommand(const QString &command);
    QString command() const;

    void setDescription(const QString &description);
    QString description() const;

    void setClassType(BotCommandClassType classType);
    BotCommandClassType classType() const;

    bool fetch(InboundPkt *in);
    bool push(OutboundPkt *out) const;

    QMap<QString, QVariant> toMap() const;
    static BotCommand fromMap(const QMap<QString, QVariant> &map);
    static BotCommand fromJson(const QString &json);

    bool operator ==(const BotCommand &b) const;
    BotCommand &operator =(const BotCommand &b);

    bool operator==(bool stt) const { return isNull() != stt; }
    bool operator!=(bool stt) const { return !operator ==(stt); }

    QByteArray getHash(QCryptographicHash::Algorithm alg = QCryptographicHash::Md5) const;

private:
    QString m_command;
    QString m_description;
    BotCommandClassType m_classType;
};

Q_DECLARE_METATYPE(BotCommand)

QDataStream LIBQTELEGRAMSHARED_EXPORT &operator<<(QDataStream &stream, const BotCommand &item);
QDataStream LIBQTELEGRAMSHARED_EXPORT &operator>>(QDataStream &stream, BotCommand &item);

QDebug LIBQTELEGRAMSHARED_EXPORT operator<<(QDebug debug,  const BotCommand &item);

#endif // LQTG_TYPE_BOTCOMMAND
