// 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_CHANNELADMINRIGHTS
#define LQTG_TYPE_CHANNELADMINRIGHTS

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT ChannelAdminRights : public TelegramTypeObject
{
public:
    enum ChannelAdminRightsClassType {
        typeChannelAdminRights = 0x5d7ceba5
    };

    ChannelAdminRights(ChannelAdminRightsClassType classType = typeChannelAdminRights, InboundPkt *in = 0);
    ChannelAdminRights(InboundPkt *in);
    ChannelAdminRights(const Null&);
    ChannelAdminRights(const ChannelAdminRights &another);
    virtual ~ChannelAdminRights();

    void setAddAdmins(bool addAdmins);
    bool addAdmins() const;

    void setBanUsers(bool banUsers);
    bool banUsers() const;

    void setChangeInfo(bool changeInfo);
    bool changeInfo() const;

    void setDeleteMessages(bool deleteMessages);
    bool deleteMessages() const;

    void setEditMessages(bool editMessages);
    bool editMessages() const;

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

    void setInviteLink(bool inviteLink);
    bool inviteLink() const;

    void setInviteUsers(bool inviteUsers);
    bool inviteUsers() const;

    void setPinMessages(bool pinMessages);
    bool pinMessages() const;

    void setPostMessages(bool postMessages);
    bool postMessages() const;

    void setClassType(ChannelAdminRightsClassType classType);
    ChannelAdminRightsClassType classType() const;

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

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

    bool operator ==(const ChannelAdminRights &b) const;
    ChannelAdminRights &operator =(const ChannelAdminRights &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;
    ChannelAdminRightsClassType m_classType;
};

Q_DECLARE_METATYPE(ChannelAdminRights)

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

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

#endif // LQTG_TYPE_CHANNELADMINRIGHTS
