// 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_BOT_TYPE_BOTMESSAGE
#define LQTG_BOT_TYPE_BOTMESSAGE

#include "telegrambottypeobject.h"

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

#include <QDataStream>
#include <QDebug>

#include "botaudio.h"
#include <QString>
#include "botchat.h"
#include "botcontact.h"
#include <QtGlobal>
#include "botdocument.h"
#include <QList>
#include "botmessageentity.h"
#include "botuser.h"
#include "botgame.h"
#include "botlocation.h"
#include "botphotosize.h"
#include "botmessage.h"
#include "botsticker.h"
#include "botvenue.h"
#include "botvideo.h"
#include "botvoice.h"

class LIBQTELEGRAMSHARED_EXPORT BotMessage : public TelegramBotTypeObject
{
public:
    enum BotMessageClassType {
        typeTypeMessage = 0xffa800
    };

    BotMessage(const QMap<QString, QVariant> &map);
    BotMessage(const Null &_null = TelegramBotTypeObject::null);
    BotMessage(const BotMessage &another);
    virtual ~BotMessage();

    void setAudio(const BotAudio &audio);
    BotAudio audio() const;

    void setCaption(const QString &caption);
    QString caption() const;

    void setChannelChatCreated(bool channelChatCreated);
    bool channelChatCreated() const;

    void setChat(const BotChat &chat);
    BotChat chat() const;

    void setContact(const BotContact &contact);
    BotContact contact() const;

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

    void setDeletChatPhoto(bool deletChatPhoto);
    bool deletChatPhoto() const;

    void setDocument(const BotDocument &document);
    BotDocument document() const;

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

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

    void setForwardDate(qint32 forwardDate);
    qint32 forwardDate() const;

    void setForwardFrom(const BotUser &forwardFrom);
    BotUser forwardFrom() const;

    void setForwardFromChat(const BotChat &forwardFromChat);
    BotChat forwardFromChat() const;

    void setForwardFromMessageId(qint32 forwardFromMessageId);
    qint32 forwardFromMessageId() const;

    void setFrom(const BotUser &from);
    BotUser from() const;

    void setGame(const BotGame &game);
    BotGame game() const;

    void setGroupChatCreated(bool groupChatCreated);
    bool groupChatCreated() const;

    void setLeftChatMember(const BotUser &leftChatMember);
    BotUser leftChatMember() const;

    void setLocation(const BotLocation &location);
    BotLocation location() const;

    void setMessageId(qint32 messageId);
    qint32 messageId() const;

    void setMigrateFromChatId(qint32 migrateFromChatId);
    qint32 migrateFromChatId() const;

    void setMigrateToChatId(qint32 migrateToChatId);
    qint32 migrateToChatId() const;

    void setNewChatMember(const BotUser &newChatMember);
    BotUser newChatMember() const;

    void setNewChatPhoto(const QList<BotPhotoSize> &newChatPhoto);
    QList<BotPhotoSize> newChatPhoto() const;

    void setNewChatTitle(const QString &newChatTitle);
    QString newChatTitle() const;

    void setPhoto(const QList<BotPhotoSize> &photo);
    QList<BotPhotoSize> photo() const;

    void setPinnedMessage(const BotMessage &pinnedMessage);
    BotMessage pinnedMessage() const;

    void setReplyToMessage(const BotMessage &replyToMessage);
    BotMessage replyToMessage() const;

    void setSticker(const BotSticker &sticker);
    BotSticker sticker() const;

    void setSupergroupChatCreated(bool supergroupChatCreated);
    bool supergroupChatCreated() const;

    void setText(const QString &text);
    QString text() const;

    void setVenue(const BotVenue &venue);
    BotVenue venue() const;

    void setVideo(const BotVideo &video);
    BotVideo video() const;

    void setVoice(const BotVoice &voice);
    BotVoice voice() const;

    void setClassType(BotMessageClassType classType);
    BotMessageClassType classType() const;

    QMap<QString, QVariant> toMap() const;
    void fromMap(const QMap<QString, QVariant> &map);
    bool operator ==(const BotMessage &b) const;
    BotMessage &operator =(const BotMessage &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:
    BotAudio m_audio;
    QString m_caption;
    bool m_channelChatCreated;
    BotChat m_chat;
    BotContact m_contact;
    qint32 m_date;
    bool m_deletChatPhoto;
    BotDocument m_document;
    qint32 m_editDate;
    QList<BotMessageEntity> m_entities;
    qint32 m_forwardDate;
    BotUser m_forwardFrom;
    BotChat m_forwardFromChat;
    qint32 m_forwardFromMessageId;
    BotUser m_from;
    BotGame m_game;
    bool m_groupChatCreated;
    BotUser m_leftChatMember;
    BotLocation m_location;
    qint32 m_messageId;
    qint32 m_migrateFromChatId;
    qint32 m_migrateToChatId;
    BotUser m_newChatMember;
    QList<BotPhotoSize> m_newChatPhoto;
    QString m_newChatTitle;
    QList<BotPhotoSize> m_photo;
    BotMessage *m_pinnedMessage;
    BotMessage *m_replyToMessage;
    BotSticker m_sticker;
    bool m_supergroupChatCreated;
    QString m_text;
    BotVenue m_venue;
    BotVideo m_video;
    BotVoice m_voice;
    BotMessageClassType m_classType;
};

Q_DECLARE_METATYPE(BotMessage)

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

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

#endif // LQTG_BOT_TYPE_BOTMESSAGE
