// 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_MESSAGESPEERDIALOGS
#define LQTG_TYPE_MESSAGESPEERDIALOGS

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QList>
#include "chat.h"
#include "dialog.h"
#include "message.h"
#include "updatesstate.h"
#include "user.h"

class LIBQTELEGRAMSHARED_EXPORT MessagesPeerDialogs : public TelegramTypeObject
{
public:
    enum MessagesPeerDialogsClassType {
        typeMessagesPeerDialogs = 0x3371c354
    };

    MessagesPeerDialogs(MessagesPeerDialogsClassType classType = typeMessagesPeerDialogs, InboundPkt *in = 0);
    MessagesPeerDialogs(InboundPkt *in);
    MessagesPeerDialogs(const Null&);
    MessagesPeerDialogs(const MessagesPeerDialogs &another);
    virtual ~MessagesPeerDialogs();

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

    void setDialogs(const QList<Dialog> &dialogs);
    QList<Dialog> dialogs() const;

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

    void setState(const UpdatesState &state);
    UpdatesState state() const;

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

    void setClassType(MessagesPeerDialogsClassType classType);
    MessagesPeerDialogsClassType classType() const;

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

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

    bool operator ==(const MessagesPeerDialogs &b) const;
    MessagesPeerDialogs &operator =(const MessagesPeerDialogs &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;
    QList<Dialog> m_dialogs;
    QList<Message> m_messages;
    UpdatesState m_state;
    QList<User> m_users;
    MessagesPeerDialogsClassType m_classType;
};

Q_DECLARE_METATYPE(MessagesPeerDialogs)

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

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

#endif // LQTG_TYPE_MESSAGESPEERDIALOGS
