// 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_BOT_TYPE_BOTUPDATE
#define LQTG_BOT_TYPE_BOTUPDATE

#include "telegrambottypeobject.h"

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

#include <QDataStream>
#include <QDebug>

#include "botcallbackquery.h"
#include "botmessage.h"
#include "botchoseninlineresult.h"
#include "botinlinequery.h"
#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT BotUpdate : public TelegramBotTypeObject
{
public:
    enum BotUpdateClassType {
        typeTypeUpdate = 0xffa800
    };

    BotUpdate(const QMap<QString, QVariant> &map);
    BotUpdate(const Null &_null = TelegramBotTypeObject::null);
    BotUpdate(const BotUpdate &another);
    virtual ~BotUpdate();

    void setCallbackQuery(const BotCallbackQuery &callbackQuery);
    BotCallbackQuery callbackQuery() const;

    void setChannelPost(const BotMessage &channelPost);
    BotMessage channelPost() const;

    void setChosenInlineResult(const BotChosenInlineResult &chosenInlineResult);
    BotChosenInlineResult chosenInlineResult() const;

    void setEditMessage(const BotMessage &editMessage);
    BotMessage editMessage() const;

    void setEditedChannelPost(const BotMessage &editedChannelPost);
    BotMessage editedChannelPost() const;

    void setInlineQuery(const BotInlineQuery &inlineQuery);
    BotInlineQuery inlineQuery() const;

    void setMessage(const BotMessage &message);
    BotMessage message() const;

    void setUpdateId(qint32 updateId);
    qint32 updateId() const;

    void setClassType(BotUpdateClassType classType);
    BotUpdateClassType classType() const;

    QMap<QString, QVariant> toMap() const;
    void fromMap(const QMap<QString, QVariant> &map);
    bool operator ==(const BotUpdate &b) const;
    BotUpdate &operator =(const BotUpdate &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:
    BotCallbackQuery m_callbackQuery;
    BotMessage m_channelPost;
    BotChosenInlineResult m_chosenInlineResult;
    BotMessage m_editMessage;
    BotMessage m_editedChannelPost;
    BotInlineQuery m_inlineQuery;
    BotMessage m_message;
    qint32 m_updateId;
    BotUpdateClassType m_classType;
};

Q_DECLARE_METATYPE(BotUpdate)

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

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

#endif // LQTG_BOT_TYPE_BOTUPDATE
