// 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_MESSAGESFILTER
#define LQTG_TYPE_MESSAGESFILTER

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT MessagesFilter : public TelegramTypeObject
{
public:
    enum MessagesFilterClassType {
        typeInputMessagesFilterEmpty = 0x57e2f66c,
        typeInputMessagesFilterPhotos = 0x9609a51c,
        typeInputMessagesFilterVideo = 0x9fc00e65,
        typeInputMessagesFilterPhotoVideo = 0x56e9f0e4,
        typeInputMessagesFilterPhotoVideoDocuments = 0xd95e73bb,
        typeInputMessagesFilterDocument = 0x9eddf188,
        typeInputMessagesFilterUrl = 0x7ef0dd87,
        typeInputMessagesFilterGif = 0xffc86587,
        typeInputMessagesFilterVoice = 0x50f5c392,
        typeInputMessagesFilterMusic = 0x3751b49e,
        typeInputMessagesFilterChatPhotos = 0x3a20ecb8,
        typeInputMessagesFilterPhoneCalls = 0x80c99768,
        typeInputMessagesFilterRoundVoice = 0x7a7c17a4,
        typeInputMessagesFilterRoundVideo = 0xb549da53
    };

    MessagesFilter(MessagesFilterClassType classType = typeInputMessagesFilterEmpty, InboundPkt *in = 0);
    MessagesFilter(InboundPkt *in);
    MessagesFilter(const Null&);
    MessagesFilter(const MessagesFilter &another);
    virtual ~MessagesFilter();

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

    void setMissed(bool missed);
    bool missed() const;

    void setClassType(MessagesFilterClassType classType);
    MessagesFilterClassType classType() const;

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

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

    bool operator ==(const MessagesFilter &b) const;
    MessagesFilter &operator =(const MessagesFilter &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_flags;
    MessagesFilterClassType m_classType;
};

Q_DECLARE_METATYPE(MessagesFilter)

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

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

#endif // LQTG_TYPE_MESSAGESFILTER
