// 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_CONTACTSBLOCKED
#define LQTG_TYPE_CONTACTSBLOCKED

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QList>
#include "contactblocked.h"
#include <QtGlobal>
#include "user.h"

class LIBQTELEGRAMSHARED_EXPORT ContactsBlocked : public TelegramTypeObject
{
public:
    enum ContactsBlockedClassType {
        typeContactsBlocked = 0x1c138d15,
        typeContactsBlockedSlice = 0x900802a1
    };

    ContactsBlocked(ContactsBlockedClassType classType = typeContactsBlocked, InboundPkt *in = 0);
    ContactsBlocked(InboundPkt *in);
    ContactsBlocked(const Null&);
    ContactsBlocked(const ContactsBlocked &another);
    virtual ~ContactsBlocked();

    void setBlocked(const QList<ContactBlocked> &blocked);
    QList<ContactBlocked> blocked() const;

    void setCount(qint32 count);
    qint32 count() const;

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

    void setClassType(ContactsBlockedClassType classType);
    ContactsBlockedClassType classType() const;

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

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

    bool operator ==(const ContactsBlocked &b) const;
    ContactsBlocked &operator =(const ContactsBlocked &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<ContactBlocked> m_blocked;
    qint32 m_count;
    QList<User> m_users;
    ContactsBlockedClassType m_classType;
};

Q_DECLARE_METATYPE(ContactsBlocked)

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

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

#endif // LQTG_TYPE_CONTACTSBLOCKED
