// 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_CHANNELBANNEDRIGHTS
#define LQTG_TYPE_CHANNELBANNEDRIGHTS

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT ChannelBannedRights : public TelegramTypeObject
{
public:
    enum ChannelBannedRightsClassType {
        typeChannelBannedRights = 0x58cf4249
    };

    ChannelBannedRights(ChannelBannedRightsClassType classType = typeChannelBannedRights, InboundPkt *in = 0);
    ChannelBannedRights(InboundPkt *in);
    ChannelBannedRights(const Null&);
    ChannelBannedRights(const ChannelBannedRights &another);
    virtual ~ChannelBannedRights();

    void setEmbedLinks(bool embedLinks);
    bool embedLinks() const;

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

    void setSendGames(bool sendGames);
    bool sendGames() const;

    void setSendGifs(bool sendGifs);
    bool sendGifs() const;

    void setSendInline(bool sendInline);
    bool sendInline() const;

    void setSendMedia(bool sendMedia);
    bool sendMedia() const;

    void setSendMessages(bool sendMessages);
    bool sendMessages() const;

    void setSendStickers(bool sendStickers);
    bool sendStickers() const;

    void setUntilDate(qint32 untilDate);
    qint32 untilDate() const;

    void setViewMessages(bool viewMessages);
    bool viewMessages() const;

    void setClassType(ChannelBannedRightsClassType classType);
    ChannelBannedRightsClassType classType() const;

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

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

    bool operator ==(const ChannelBannedRights &b) const;
    ChannelBannedRights &operator =(const ChannelBannedRights &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;
    qint32 m_untilDate;
    ChannelBannedRightsClassType m_classType;
};

Q_DECLARE_METATYPE(ChannelBannedRights)

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

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

#endif // LQTG_TYPE_CHANNELBANNEDRIGHTS
