// 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_MESSAGEFWDHEADER
#define LQTG_TYPE_MESSAGEFWDHEADER

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT MessageFwdHeader : public TelegramTypeObject
{
public:
    enum MessageFwdHeaderClassType {
        typeMessageFwdHeader = 0xc786ddcb
    };

    MessageFwdHeader(MessageFwdHeaderClassType classType = typeMessageFwdHeader, InboundPkt *in = 0);
    MessageFwdHeader(InboundPkt *in);
    MessageFwdHeader(const Null&);
    MessageFwdHeader(const MessageFwdHeader &another);
    virtual ~MessageFwdHeader();

    void setChannelId(qint32 channelId);
    qint32 channelId() const;

    void setChannelPost(qint32 channelPost);
    qint32 channelPost() const;

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

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

    void setFromId(qint32 fromId);
    qint32 fromId() const;

    void setClassType(MessageFwdHeaderClassType classType);
    MessageFwdHeaderClassType classType() const;

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

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

    bool operator ==(const MessageFwdHeader &b) const;
    MessageFwdHeader &operator =(const MessageFwdHeader &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_channelId;
    qint32 m_channelPost;
    qint32 m_date;
    qint32 m_flags;
    qint32 m_fromId;
    MessageFwdHeaderClassType m_classType;
};

Q_DECLARE_METATYPE(MessageFwdHeader)

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

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

#endif // LQTG_TYPE_MESSAGEFWDHEADER
