// 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_CHANNELADMINLOGEVENT
#define LQTG_TYPE_CHANNELADMINLOGEVENT

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include "channeladminlogeventaction.h"
#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT ChannelAdminLogEvent : public TelegramTypeObject
{
public:
    enum ChannelAdminLogEventClassType {
        typeChannelAdminLogEvent = 0x3b5a3e40
    };

    ChannelAdminLogEvent(ChannelAdminLogEventClassType classType = typeChannelAdminLogEvent, InboundPkt *in = 0);
    ChannelAdminLogEvent(InboundPkt *in);
    ChannelAdminLogEvent(const Null&);
    ChannelAdminLogEvent(const ChannelAdminLogEvent &another);
    virtual ~ChannelAdminLogEvent();

    void setAction(const ChannelAdminLogEventAction &action);
    ChannelAdminLogEventAction action() const;

    void setDate(qint32 date);
    qint32 date() const;

    void setId(qint64 id);
    qint64 id() const;

    void setUserId(qint32 userId);
    qint32 userId() const;

    void setClassType(ChannelAdminLogEventClassType classType);
    ChannelAdminLogEventClassType classType() const;

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

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

    bool operator ==(const ChannelAdminLogEvent &b) const;
    ChannelAdminLogEvent &operator =(const ChannelAdminLogEvent &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:
    ChannelAdminLogEventAction m_action;
    qint32 m_date;
    qint64 m_id;
    qint32 m_userId;
    ChannelAdminLogEventClassType m_classType;
};

Q_DECLARE_METATYPE(ChannelAdminLogEvent)

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

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

#endif // LQTG_TYPE_CHANNELADMINLOGEVENT
