// 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_MESSAGESMESSAGES
#define LQTG_TYPE_MESSAGESMESSAGES

#include "telegramtypeobject.h"

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

#include <QDataStream>

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

class LIBQTELEGRAMSHARED_EXPORT MessagesMessages : public TelegramTypeObject
{
public:
    enum MessagesMessagesClassType {
        typeMessagesMessages = 0x8c718e87,
        typeMessagesMessagesSlice = 0xb446ae3,
        typeMessagesChannelMessages = 0x99262e37
    };

    MessagesMessages(MessagesMessagesClassType classType = typeMessagesMessages, InboundPkt *in = 0);
    MessagesMessages(InboundPkt *in);
    MessagesMessages(const Null&);
    MessagesMessages(const MessagesMessages &another);
    virtual ~MessagesMessages();

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

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

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

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

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

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

    void setClassType(MessagesMessagesClassType classType);
    MessagesMessagesClassType classType() const;

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

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

    bool operator ==(const MessagesMessages &b) const;
    MessagesMessages &operator =(const MessagesMessages &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_count;
    qint32 m_flags;
    QList<Message> m_messages;
    qint32 m_pts;
    QList<User> m_users;
    MessagesMessagesClassType m_classType;
};

Q_DECLARE_METATYPE(MessagesMessages)

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

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

#endif // LQTG_TYPE_MESSAGESMESSAGES
