// 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_MESSAGESAFFECTEDHISTORY
#define LQTG_TYPE_MESSAGESAFFECTEDHISTORY

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT MessagesAffectedHistory : public TelegramTypeObject
{
public:
    enum MessagesAffectedHistoryClassType {
        typeMessagesAffectedHistory = 0xb45c69d1
    };

    MessagesAffectedHistory(MessagesAffectedHistoryClassType classType = typeMessagesAffectedHistory, InboundPkt *in = 0);
    MessagesAffectedHistory(InboundPkt *in);
    MessagesAffectedHistory(const Null&);
    MessagesAffectedHistory(const MessagesAffectedHistory &another);
    virtual ~MessagesAffectedHistory();

    void setOffset(qint32 offset);
    qint32 offset() const;

    void setPts(qint32 pts);
    qint32 pts() const;

    void setPtsCount(qint32 ptsCount);
    qint32 ptsCount() const;

    void setClassType(MessagesAffectedHistoryClassType classType);
    MessagesAffectedHistoryClassType classType() const;

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

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

    bool operator ==(const MessagesAffectedHistory &b) const;
    MessagesAffectedHistory &operator =(const MessagesAffectedHistory &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_offset;
    qint32 m_pts;
    qint32 m_ptsCount;
    MessagesAffectedHistoryClassType m_classType;
};

Q_DECLARE_METATYPE(MessagesAffectedHistory)

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

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

#endif // LQTG_TYPE_MESSAGESAFFECTEDHISTORY
