// 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_CHANNELADMINLOGEVENTACTION
#define LQTG_TYPE_CHANNELADMINLOGEVENTACTION

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include "message.h"
#include "channelparticipant.h"
#include "chatphoto.h"
#include <QString>

class LIBQTELEGRAMSHARED_EXPORT ChannelAdminLogEventAction : public TelegramTypeObject
{
public:
    enum ChannelAdminLogEventActionClassType {
        typeChannelAdminLogEventActionChangeTitle = 0xe6dfb825,
        typeChannelAdminLogEventActionChangeAbout = 0x55188a2e,
        typeChannelAdminLogEventActionChangeUsername = 0x6a4afc38,
        typeChannelAdminLogEventActionChangePhoto = 0xb82f55c3,
        typeChannelAdminLogEventActionToggleInvites = 0x1b7907ae,
        typeChannelAdminLogEventActionToggleSignatures = 0x26ae0971,
        typeChannelAdminLogEventActionUpdatePinned = 0xe9e82c18,
        typeChannelAdminLogEventActionEditMessage = 0x709b2405,
        typeChannelAdminLogEventActionDeleteMessage = 0x42e047bb,
        typeChannelAdminLogEventActionParticipantJoin = 0x183040d3,
        typeChannelAdminLogEventActionParticipantLeave = 0xf89777f2,
        typeChannelAdminLogEventActionParticipantInvite = 0xe31c34d8,
        typeChannelAdminLogEventActionParticipantToggleBan = 0xe6d83d7e,
        typeChannelAdminLogEventActionParticipantToggleAdmin = 0xd5676710
    };

    ChannelAdminLogEventAction(ChannelAdminLogEventActionClassType classType = typeChannelAdminLogEventActionChangeTitle, InboundPkt *in = 0);
    ChannelAdminLogEventAction(InboundPkt *in);
    ChannelAdminLogEventAction(const Null&);
    ChannelAdminLogEventAction(const ChannelAdminLogEventAction &another);
    virtual ~ChannelAdminLogEventAction();

    void setMessage(const Message &message);
    Message message() const;

    void setNewMessage(const Message &newMessage);
    Message newMessage() const;

    void setNewParticipant(const ChannelParticipant &newParticipant);
    ChannelParticipant newParticipant() const;

    void setNewPhoto(const ChatPhoto &newPhoto);
    ChatPhoto newPhoto() const;

    void setNewValueString(const QString &newValueString);
    QString newValueString() const;

    void setNewValueBool(bool newValueBool);
    bool newValueBool() const;

    void setParticipant(const ChannelParticipant &participant);
    ChannelParticipant participant() const;

    void setPrevMessage(const Message &prevMessage);
    Message prevMessage() const;

    void setPrevParticipant(const ChannelParticipant &prevParticipant);
    ChannelParticipant prevParticipant() const;

    void setPrevPhoto(const ChatPhoto &prevPhoto);
    ChatPhoto prevPhoto() const;

    void setPrevValue(const QString &prevValue);
    QString prevValue() const;

    void setClassType(ChannelAdminLogEventActionClassType classType);
    ChannelAdminLogEventActionClassType classType() const;

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

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

    bool operator ==(const ChannelAdminLogEventAction &b) const;
    ChannelAdminLogEventAction &operator =(const ChannelAdminLogEventAction &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:
    Message m_message;
    Message m_newMessage;
    ChannelParticipant m_newParticipant;
    ChatPhoto m_newPhoto;
    QString m_newValueString;
    bool m_newValueBool;
    ChannelParticipant m_participant;
    Message m_prevMessage;
    ChannelParticipant m_prevParticipant;
    ChatPhoto m_prevPhoto;
    QString m_prevValue;
    ChannelAdminLogEventActionClassType m_classType;
};

Q_DECLARE_METATYPE(ChannelAdminLogEventAction)

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

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

#endif // LQTG_TYPE_CHANNELADMINLOGEVENTACTION
