// 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_MESSAGEMEDIA
#define LQTG_TYPE_MESSAGEMEDIA

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>
#include "document.h"
#include <QtGlobal>
#include "game.h"
#include "geopoint.h"
#include "photo.h"
#include "webdocument.h"
#include "webpage.h"

class LIBQTELEGRAMSHARED_EXPORT MessageMedia : public TelegramTypeObject
{
public:
    enum MessageMediaClassType {
        typeMessageMediaEmpty = 0x3ded6320,
        typeMessageMediaPhoto = 0x3d8ce53d,
        typeMessageMediaGeo = 0x56e0d474,
        typeMessageMediaContact = 0x5e7d2f39,
        typeMessageMediaUnsupported = 0x9f84f49e,
        typeMessageMediaDocument = 0xf3e02ea8,
        typeMessageMediaWebPage = 0xa32dd600,
        typeMessageMediaVenue = 0x7912b71f,
        typeMessageMediaGame = 0xfdb19008,
        typeMessageMediaInvoice = 0x84551347
    };

    MessageMedia(MessageMediaClassType classType = typeMessageMediaEmpty, InboundPkt *in = 0);
    MessageMedia(InboundPkt *in);
    MessageMedia(const Null&);
    MessageMedia(const MessageMedia &another);
    virtual ~MessageMedia();

    void setAddress(const QString &address);
    QString address() const;

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

    void setCurrency(const QString &currency);
    QString currency() const;

    void setDescription(const QString &description);
    QString description() const;

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

    void setFirstName(const QString &firstName);
    QString firstName() const;

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

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

    void setGeo(const GeoPoint &geo);
    GeoPoint geo() const;

    void setLastName(const QString &lastName);
    QString lastName() const;

    void setPhoneNumber(const QString &phoneNumber);
    QString phoneNumber() const;

    void setPhoto(const Photo &photo);
    Photo photo() const;

    void setPhotoWebDocument(const WebDocument &photoWebDocument);
    WebDocument photoWebDocument() const;

    void setProvider(const QString &provider);
    QString provider() const;

    void setReceiptMsgId(qint32 receiptMsgId);
    qint32 receiptMsgId() const;

    void setShippingAddressRequested(bool shippingAddressRequested);
    bool shippingAddressRequested() const;

    void setStartParam(const QString &startParam);
    QString startParam() const;

    void setTest(bool test);
    bool test() const;

    void setTitle(const QString &title);
    QString title() const;

    void setTotalAmount(qint64 totalAmount);
    qint64 totalAmount() const;

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

    void setVenueId(const QString &venueId);
    QString venueId() const;

    void setWebpage(const WebPage &webpage);
    WebPage webpage() const;

    void setClassType(MessageMediaClassType classType);
    MessageMediaClassType classType() const;

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

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

    bool operator ==(const MessageMedia &b) const;
    MessageMedia &operator =(const MessageMedia &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:
    QString m_address;
    QString m_caption;
    QString m_currency;
    QString m_description;
    Document m_document;
    QString m_firstName;
    qint32 m_flags;
    Game m_game;
    GeoPoint m_geo;
    QString m_lastName;
    QString m_phoneNumber;
    Photo m_photo;
    WebDocument m_photoWebDocument;
    QString m_provider;
    qint32 m_receiptMsgId;
    QString m_startParam;
    QString m_title;
    qint64 m_totalAmount;
    qint32 m_userId;
    QString m_venueId;
    WebPage m_webpage;
    MessageMediaClassType m_classType;
};

Q_DECLARE_METATYPE(MessageMedia)

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

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

#endif // LQTG_TYPE_MESSAGEMEDIA
