// 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_CHANNELPARTICIPANTSFILTER
#define LQTG_TYPE_CHANNELPARTICIPANTSFILTER

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>

class LIBQTELEGRAMSHARED_EXPORT ChannelParticipantsFilter : public TelegramTypeObject
{
public:
    enum ChannelParticipantsFilterClassType {
        typeChannelParticipantsRecent = 0xde3f3c79,
        typeChannelParticipantsAdmins = 0xb4608969,
        typeChannelParticipantsKicked = 0xa3b54985,
        typeChannelParticipantsBots = 0xb0d1865b,
        typeChannelParticipantsBanned = 0x1427a5e1,
        typeChannelParticipantsSearch = 0x656ac4b
    };

    ChannelParticipantsFilter(ChannelParticipantsFilterClassType classType = typeChannelParticipantsRecent, InboundPkt *in = 0);
    ChannelParticipantsFilter(InboundPkt *in);
    ChannelParticipantsFilter(const Null&);
    ChannelParticipantsFilter(const ChannelParticipantsFilter &another);
    virtual ~ChannelParticipantsFilter();

    void setQ(const QString &q);
    QString q() const;

    void setClassType(ChannelParticipantsFilterClassType classType);
    ChannelParticipantsFilterClassType classType() const;

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

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

    bool operator ==(const ChannelParticipantsFilter &b) const;
    ChannelParticipantsFilter &operator =(const ChannelParticipantsFilter &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:
    QString m_q;
    ChannelParticipantsFilterClassType m_classType;
};

Q_DECLARE_METATYPE(ChannelParticipantsFilter)

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

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

#endif // LQTG_TYPE_CHANNELPARTICIPANTSFILTER
