// 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_INPUTGAME
#define LQTG_TYPE_INPUTGAME

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include "inputuser.h"
#include <QString>

class LIBQTELEGRAMSHARED_EXPORT InputGame : public TelegramTypeObject
{
public:
    enum InputGameClassType {
        typeInputGameID = 0x32c3e77,
        typeInputGameShortName = 0xc331e80a
    };

    InputGame(InputGameClassType classType = typeInputGameID, InboundPkt *in = 0);
    InputGame(InboundPkt *in);
    InputGame(const Null&);
    InputGame(const InputGame &another);
    virtual ~InputGame();

    void setAccessHash(qint64 accessHash);
    qint64 accessHash() const;

    void setBotId(const InputUser &botId);
    InputUser botId() const;

    void setId(qint64 id);
    qint64 id() const;

    void setShortName(const QString &shortName);
    QString shortName() const;

    void setClassType(InputGameClassType classType);
    InputGameClassType classType() const;

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

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

    bool operator ==(const InputGame &b) const;
    InputGame &operator =(const InputGame &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:
    qint64 m_accessHash;
    InputUser m_botId;
    qint64 m_id;
    QString m_shortName;
    InputGameClassType m_classType;
};

Q_DECLARE_METATYPE(InputGame)

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

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

#endif // LQTG_TYPE_INPUTGAME
