// 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_CONTACTSCONTACTS
#define LQTG_TYPE_CONTACTSCONTACTS

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QList>
#include "contact.h"
#include "user.h"

class LIBQTELEGRAMSHARED_EXPORT ContactsContacts : public TelegramTypeObject
{
public:
    enum ContactsContactsClassType {
        typeContactsContactsNotModified = 0xb74ba9d2,
        typeContactsContacts = 0x6f8b8cb2
    };

    ContactsContacts(ContactsContactsClassType classType = typeContactsContactsNotModified, InboundPkt *in = 0);
    ContactsContacts(InboundPkt *in);
    ContactsContacts(const Null&);
    ContactsContacts(const ContactsContacts &another);
    virtual ~ContactsContacts();

    void setContacts(const QList<Contact> &contacts);
    QList<Contact> contacts() const;

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

    void setClassType(ContactsContactsClassType classType);
    ContactsContactsClassType classType() const;

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

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

    bool operator ==(const ContactsContacts &b) const;
    ContactsContacts &operator =(const ContactsContacts &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<Contact> m_contacts;
    QList<User> m_users;
    ContactsContactsClassType m_classType;
};

Q_DECLARE_METATYPE(ContactsContacts)

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

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

#endif // LQTG_TYPE_CONTACTSCONTACTS
