// 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_INPUTAPPEVENT
#define LQTG_TYPE_INPUTAPPEVENT

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>
#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT InputAppEvent : public TelegramTypeObject
{
public:
    enum InputAppEventClassType {
        typeInputAppEvent = 0x770656a8
    };

    InputAppEvent(InputAppEventClassType classType = typeInputAppEvent, InboundPkt *in = 0);
    InputAppEvent(InboundPkt *in);
    InputAppEvent(const Null&);
    InputAppEvent(const InputAppEvent &another);
    virtual ~InputAppEvent();

    void setData(const QString &data);
    QString data() const;

    void setPeer(qint64 peer);
    qint64 peer() const;

    void setTime(qreal time);
    qreal time() const;

    void setType(const QString &type);
    QString type() const;

    void setClassType(InputAppEventClassType classType);
    InputAppEventClassType classType() const;

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

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

    bool operator ==(const InputAppEvent &b) const;
    InputAppEvent &operator =(const InputAppEvent &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_data;
    qint64 m_peer;
    qreal m_time;
    QString m_type;
    InputAppEventClassType m_classType;
};

Q_DECLARE_METATYPE(InputAppEvent)

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

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

#endif // LQTG_TYPE_INPUTAPPEVENT
