// 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_MESSAGE_OBJECT
#define LQTG_TYPE_MESSAGE_OBJECT

#include "telegramtypeqobject.h"
#include "telegram/types/message.h"

#include <QPointer>
#include "messageactionobject.h"
#include "messagefwdheaderobject.h"
#include "messagemediaobject.h"
#include "replymarkupobject.h"
#include "peerobject.h"

class LIBQTELEGRAMSHARED_EXPORT MessageObject : public TelegramTypeQObject
{
    Q_OBJECT
    Q_ENUMS(MessageClassType)
    Q_PROPERTY(MessageActionObject* action READ action WRITE setAction NOTIFY actionChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(qint32 editDate READ editDate WRITE setEditDate NOTIFY editDateChanged)
    Q_PROPERTY(QList<MessageEntity> entities READ entities WRITE setEntities NOTIFY entitiesChanged)
    Q_PROPERTY(qint32 flags READ flags WRITE setFlags NOTIFY flagsChanged)
    Q_PROPERTY(qint32 fromId READ fromId WRITE setFromId NOTIFY fromIdChanged)
    Q_PROPERTY(MessageFwdHeaderObject* fwdFrom READ fwdFrom WRITE setFwdFrom NOTIFY fwdFromChanged)
    Q_PROPERTY(qint32 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(MessageMediaObject* media READ media WRITE setMedia NOTIFY mediaChanged)
    Q_PROPERTY(bool mediaUnread READ mediaUnread WRITE setMediaUnread NOTIFY mediaUnreadChanged)
    Q_PROPERTY(bool mentioned READ mentioned WRITE setMentioned NOTIFY mentionedChanged)
    Q_PROPERTY(QString message READ message WRITE setMessage NOTIFY messageChanged)
    Q_PROPERTY(bool out READ out WRITE setOut NOTIFY outChanged)
    Q_PROPERTY(bool post READ post WRITE setPost NOTIFY postChanged)
    Q_PROPERTY(ReplyMarkupObject* replyMarkup READ replyMarkup WRITE setReplyMarkup NOTIFY replyMarkupChanged)
    Q_PROPERTY(qint32 replyToMsgId READ replyToMsgId WRITE setReplyToMsgId NOTIFY replyToMsgIdChanged)
    Q_PROPERTY(bool silent READ silent WRITE setSilent NOTIFY silentChanged)
    Q_PROPERTY(PeerObject* toId READ toId WRITE setToId NOTIFY toIdChanged)
    Q_PROPERTY(qint32 viaBotId READ viaBotId WRITE setViaBotId NOTIFY viaBotIdChanged)
    Q_PROPERTY(qint32 views READ views WRITE setViews NOTIFY viewsChanged)
    Q_PROPERTY(Message core READ core WRITE setCore NOTIFY coreChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    enum MessageClassType {
        TypeMessageEmpty,
        TypeMessage,
        TypeMessageService
    };

    MessageObject(const Message &core, QObject *parent = 0);
    MessageObject(QObject *parent = 0);
    virtual ~MessageObject();

    void setAction(MessageActionObject* action);
    MessageActionObject* action() const;

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

    void setEditDate(qint32 editDate);
    qint32 editDate() const;

    void setEntities(const QList<MessageEntity> &entities);
    QList<MessageEntity> entities() const;

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

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

    void setFwdFrom(MessageFwdHeaderObject* fwdFrom);
    MessageFwdHeaderObject* fwdFrom() const;

    void setId(qint32 id);
    qint32 id() const;

    void setMedia(MessageMediaObject* media);
    MessageMediaObject* media() const;

    void setMediaUnread(bool mediaUnread);
    bool mediaUnread() const;

    void setMentioned(bool mentioned);
    bool mentioned() const;

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

    void setOut(bool out);
    bool out() const;

    void setPost(bool post);
    bool post() const;

    void setReplyMarkup(ReplyMarkupObject* replyMarkup);
    ReplyMarkupObject* replyMarkup() const;

    void setReplyToMsgId(qint32 replyToMsgId);
    qint32 replyToMsgId() const;

    void setSilent(bool silent);
    bool silent() const;

    void setToId(PeerObject* toId);
    PeerObject* toId() const;

    void setViaBotId(qint32 viaBotId);
    qint32 viaBotId() const;

    void setViews(qint32 views);
    qint32 views() const;

    void setClassType(quint32 classType);
    quint32 classType() const;

    void setCore(const Message &core);
    Message core() const;

    MessageObject &operator =(const Message &b);
    bool operator ==(const Message &b) const;

Q_SIGNALS:
    void coreChanged();
    void classTypeChanged();
    void actionChanged();
    void dateChanged();
    void editDateChanged();
    void entitiesChanged();
    void flagsChanged();
    void fromIdChanged();
    void fwdFromChanged();
    void idChanged();
    void mediaChanged();
    void mediaUnreadChanged();
    void mentionedChanged();
    void messageChanged();
    void outChanged();
    void postChanged();
    void replyMarkupChanged();
    void replyToMsgIdChanged();
    void silentChanged();
    void toIdChanged();
    void viaBotIdChanged();
    void viewsChanged();

private Q_SLOTS:
    void coreActionChanged();
    void coreFwdFromChanged();
    void coreMediaChanged();
    void coreReplyMarkupChanged();
    void coreToIdChanged();

private:
    QPointer<MessageActionObject> m_action;
    QPointer<MessageFwdHeaderObject> m_fwdFrom;
    QPointer<MessageMediaObject> m_media;
    QPointer<ReplyMarkupObject> m_replyMarkup;
    QPointer<PeerObject> m_toId;
    Message m_core;
};

#endif // LQTG_TYPE_MESSAGE_OBJECT
