// 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_MESSAGESBOTRESULTS
#define LQTG_TYPE_MESSAGESBOTRESULTS

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include <QString>
#include <QList>
#include "botinlineresult.h"
#include "inlinebotswitchpm.h"

class LIBQTELEGRAMSHARED_EXPORT MessagesBotResults : public TelegramTypeObject
{
public:
    enum MessagesBotResultsClassType {
        typeMessagesBotResults = 0xccd3563d
    };

    MessagesBotResults(MessagesBotResultsClassType classType = typeMessagesBotResults, InboundPkt *in = 0);
    MessagesBotResults(InboundPkt *in);
    MessagesBotResults(const Null&);
    MessagesBotResults(const MessagesBotResults &another);
    virtual ~MessagesBotResults();

    void setCacheTime(qint32 cacheTime);
    qint32 cacheTime() const;

    void setFlags(qint32 flags);
    qint32 flags() const;

    void setGallery(bool gallery);
    bool gallery() const;

    void setNextOffset(const QString &nextOffset);
    QString nextOffset() const;

    void setQueryId(qint64 queryId);
    qint64 queryId() const;

    void setResults(const QList<BotInlineResult> &results);
    QList<BotInlineResult> results() const;

    void setSwitchPm(const InlineBotSwitchPM &switchPm);
    InlineBotSwitchPM switchPm() const;

    void setClassType(MessagesBotResultsClassType classType);
    MessagesBotResultsClassType classType() const;

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

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

    bool operator ==(const MessagesBotResults &b) const;
    MessagesBotResults &operator =(const MessagesBotResults &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:
    qint32 m_cacheTime;
    qint32 m_flags;
    QString m_nextOffset;
    qint64 m_queryId;
    QList<BotInlineResult> m_results;
    InlineBotSwitchPM m_switchPm;
    MessagesBotResultsClassType m_classType;
};

Q_DECLARE_METATYPE(MessagesBotResults)

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

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

#endif // LQTG_TYPE_MESSAGESBOTRESULTS
