// 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_UPDATESSTATE
#define LQTG_TYPE_UPDATESSTATE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT UpdatesState : public TelegramTypeObject
{
public:
    enum UpdatesStateClassType {
        typeUpdatesState = 0xa56c2a3e
    };

    UpdatesState(UpdatesStateClassType classType = typeUpdatesState, InboundPkt *in = 0);
    UpdatesState(InboundPkt *in);
    UpdatesState(const Null&);
    UpdatesState(const UpdatesState &another);
    virtual ~UpdatesState();

    void setDate(qint32 date);
    qint32 date() const;

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

    void setQts(qint32 qts);
    qint32 qts() const;

    void setSeq(qint32 seq);
    qint32 seq() const;

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

    void setClassType(UpdatesStateClassType classType);
    UpdatesStateClassType classType() const;

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

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

    bool operator ==(const UpdatesState &b) const;
    UpdatesState &operator =(const UpdatesState &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_date;
    qint32 m_pts;
    qint32 m_qts;
    qint32 m_seq;
    qint32 m_unreadCount;
    UpdatesStateClassType m_classType;
};

Q_DECLARE_METATYPE(UpdatesState)

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

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

#endif // LQTG_TYPE_UPDATESSTATE
