// 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_WEBPAGE_OBJECT
#define LQTG_TYPE_WEBPAGE_OBJECT

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

#include <QPointer>
#include "pageobject.h"
#include "documentobject.h"
#include "photoobject.h"

class LIBQTELEGRAMSHARED_EXPORT WebPageObject : public TelegramTypeQObject
{
    Q_OBJECT
    Q_ENUMS(WebPageClassType)
    Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY authorChanged)
    Q_PROPERTY(PageObject* cachedPage READ cachedPage WRITE setCachedPage NOTIFY cachedPageChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
    Q_PROPERTY(QString displayUrl READ displayUrl WRITE setDisplayUrl NOTIFY displayUrlChanged)
    Q_PROPERTY(DocumentObject* document READ document WRITE setDocument NOTIFY documentChanged)
    Q_PROPERTY(qint32 duration READ duration WRITE setDuration NOTIFY durationChanged)
    Q_PROPERTY(qint32 embedHeight READ embedHeight WRITE setEmbedHeight NOTIFY embedHeightChanged)
    Q_PROPERTY(QString embedType READ embedType WRITE setEmbedType NOTIFY embedTypeChanged)
    Q_PROPERTY(QString embedUrl READ embedUrl WRITE setEmbedUrl NOTIFY embedUrlChanged)
    Q_PROPERTY(qint32 embedWidth READ embedWidth WRITE setEmbedWidth NOTIFY embedWidthChanged)
    Q_PROPERTY(qint32 flags READ flags WRITE setFlags NOTIFY flagsChanged)
    Q_PROPERTY(qint32 hash READ hash WRITE setHash NOTIFY hashChanged)
    Q_PROPERTY(qint64 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(PhotoObject* photo READ photo WRITE setPhoto NOTIFY photoChanged)
    Q_PROPERTY(QString siteName READ siteName WRITE setSiteName NOTIFY siteNameChanged)
    Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
    Q_PROPERTY(QString type READ type WRITE setType NOTIFY typeChanged)
    Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged)
    Q_PROPERTY(WebPage core READ core WRITE setCore NOTIFY coreChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    enum WebPageClassType {
        TypeWebPageEmpty,
        TypeWebPagePending,
        TypeWebPage,
        TypeWebPageNotModified
    };

    WebPageObject(const WebPage &core, QObject *parent = 0);
    WebPageObject(QObject *parent = 0);
    virtual ~WebPageObject();

    void setAuthor(const QString &author);
    QString author() const;

    void setCachedPage(PageObject* cachedPage);
    PageObject* cachedPage() const;

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

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

    void setDisplayUrl(const QString &displayUrl);
    QString displayUrl() const;

    void setDocument(DocumentObject* document);
    DocumentObject* document() const;

    void setDuration(qint32 duration);
    qint32 duration() const;

    void setEmbedHeight(qint32 embedHeight);
    qint32 embedHeight() const;

    void setEmbedType(const QString &embedType);
    QString embedType() const;

    void setEmbedUrl(const QString &embedUrl);
    QString embedUrl() const;

    void setEmbedWidth(qint32 embedWidth);
    qint32 embedWidth() const;

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

    void setHash(qint32 hash);
    qint32 hash() const;

    void setId(qint64 id);
    qint64 id() const;

    void setPhoto(PhotoObject* photo);
    PhotoObject* photo() const;

    void setSiteName(const QString &siteName);
    QString siteName() const;

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

    void setType(const QString &type);
    QString type() const;

    void setUrl(const QString &url);
    QString url() const;

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

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

    WebPageObject &operator =(const WebPage &b);
    bool operator ==(const WebPage &b) const;

Q_SIGNALS:
    void coreChanged();
    void classTypeChanged();
    void authorChanged();
    void cachedPageChanged();
    void dateChanged();
    void descriptionChanged();
    void displayUrlChanged();
    void documentChanged();
    void durationChanged();
    void embedHeightChanged();
    void embedTypeChanged();
    void embedUrlChanged();
    void embedWidthChanged();
    void flagsChanged();
    void hashChanged();
    void idChanged();
    void photoChanged();
    void siteNameChanged();
    void titleChanged();
    void typeChanged();
    void urlChanged();

private Q_SLOTS:
    void coreCachedPageChanged();
    void coreDocumentChanged();
    void corePhotoChanged();

private:
    QPointer<PageObject> m_cachedPage;
    QPointer<DocumentObject> m_document;
    QPointer<PhotoObject> m_photo;
    WebPage m_core;
};

#endif // LQTG_TYPE_WEBPAGE_OBJECT
