// 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_UPDATESCHANNELDIFFERENCE
#define LQTG_TYPE_UPDATESCHANNELDIFFERENCE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QList>
#include "chat.h"
#include <QtGlobal>
#include "message.h"
#include "update.h"
#include "user.h"

class LIBQTELEGRAMSHARED_EXPORT UpdatesChannelDifference : public TelegramTypeObject
{
public:
    enum UpdatesChannelDifferenceClassType {
        typeUpdatesChannelDifferenceEmpty = 0x3e11affb,
        typeUpdatesChannelDifferenceTooLong = 0x410dee07,
        typeUpdatesChannelDifference = 0x2064674e
    };

    UpdatesChannelDifference(UpdatesChannelDifferenceClassType classType = typeUpdatesChannelDifferenceEmpty, InboundPkt *in = 0);
    UpdatesChannelDifference(InboundPkt *in);
    UpdatesChannelDifference(const Null&);
    UpdatesChannelDifference(const UpdatesChannelDifference &another);
    virtual ~UpdatesChannelDifference();

    void setChats(const QList<Chat> &chats);
    QList<Chat> chats() const;

    void setFinal(bool final);
    bool final() const;

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

    void setMessages(const QList<Message> &messages);
    QList<Message> messages() const;

    void setNewMessages(const QList<Message> &newMessages);
    QList<Message> newMessages() const;

    void setOtherUpdates(const QList<Update> &otherUpdates);
    QList<Update> otherUpdates() const;

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

    void setReadInboxMaxId(qint32 readInboxMaxId);
    qint32 readInboxMaxId() const;

    void setReadOutboxMaxId(qint32 readOutboxMaxId);
    qint32 readOutboxMaxId() const;

    void setTimeout(qint32 timeout);
    qint32 timeout() const;

    void setTopMessage(qint32 topMessage);
    qint32 topMessage() const;

    void setUnreadCount(qint32 unreadCount);
    qint32 unreadCount() const;

    void setUsers(const QList<User> &users);
    QList<User> users() const;

    void setClassType(UpdatesChannelDifferenceClassType classType);
    UpdatesChannelDifferenceClassType classType() const;

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

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

    bool operator ==(const UpdatesChannelDifference &b) const;
    UpdatesChannelDifference &operator =(const UpdatesChannelDifference &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:
    QList<Chat> m_chats;
    qint32 m_flags;
    QList<Message> m_messages;
    QList<Message> m_newMessages;
    QList<Update> m_otherUpdates;
    qint32 m_pts;
    qint32 m_readInboxMaxId;
    qint32 m_readOutboxMaxId;
    qint32 m_timeout;
    qint32 m_topMessage;
    qint32 m_unreadCount;
    QList<User> m_users;
    UpdatesChannelDifferenceClassType m_classType;
};

Q_DECLARE_METATYPE(UpdatesChannelDifference)

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

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

#endif // LQTG_TYPE_UPDATESCHANNELDIFFERENCE
