// This file is generated by Aseman Object Creator
// https://github.com/aseman-land/aseman-object-creator
// Command: /home/bardia/Projects/build/AsemanQtObjectCreator/Desktop_Qt_5_4_0_GCC_64bit/Debug/AsemanQtObjectCreator if=/home/bardia/Projects/Aseman/Apps/Cutegram/Cutegram/objects/types.sco of=/home/bardia/Projects/Aseman/Apps/Cutegram/Cutegram/objects/types.h template_class=/home/bardia/Projects/Aseman/Apps/Cutegram/Cutegram/objects/templates/class.template template_equals=/home/bardia/Projects/Aseman/Apps/Cutegram/Cutegram/objects/templates/equals.template template_initialize=/home/bardia/Projects/Aseman/Apps/Cutegram/Cutegram/objects/templates/initialize.template template_file=/home/bardia/Projects/Aseman/Apps/Cutegram/Cutegram/objects/templates/file.template

#ifndef TELEGRAMQMLTYPEOBJECT_H
#define TELEGRAMQMLTYPEOBJECT_H

#include <QString>
#include <QStringList>
#include <QtQml>
#include <QFile>
#include <telegram/types/types.h>
#include <secret/decryptedmessage.h>
#include "../photosizelist.h"
#include "../documentattributelist.h"
#include "../chatparticipantlist.h"
#include "../tqobject.h"
#include "../telegramqml_global.h"

class TELEGRAMQMLSHARED_EXPORT DownloadObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint64 fileId READ fileId WRITE setFileId NOTIFY fileIdChanged)
    Q_PROPERTY(QString location READ location WRITE setLocation NOTIFY locationChanged)
    Q_PROPERTY(qint32 mtime READ mtime WRITE setMtime NOTIFY mtimeChanged)
    Q_PROPERTY(qint32 partId READ partId WRITE setPartId NOTIFY partIdChanged)
    Q_PROPERTY(qint32 downloaded READ downloaded WRITE setDownloaded NOTIFY downloadedChanged)
    Q_PROPERTY(qint32 total READ total WRITE setTotal NOTIFY totalChanged)
    Q_PROPERTY(QFile* file READ file WRITE setFile NOTIFY fileChanged)

public:
    DownloadObject(QObject *parent = 0) : TqObject(parent){
        _fileId = 0;
        _mtime = 0;
        _partId = 0;
        _downloaded = 0;
        _total = 0;
        _file = new QFile(this);
    }
    ~DownloadObject(){}

    qint64 fileId() const {
        return _fileId;
    }

    void setFileId(qint64 value) {
        if( value == _fileId )
            return;
        _fileId = value;
        Q_EMIT fileIdChanged();
        Q_EMIT changed();
    }

    QString location() const {
        return _location;
    }

    void setLocation(QString value) {
        if( value == _location )
            return;
        _location = value;
        Q_EMIT locationChanged();
        Q_EMIT changed();
    }

    qint32 mtime() const {
        return _mtime;
    }

    void setMtime(qint32 value) {
        if( value == _mtime )
            return;
        _mtime = value;
        Q_EMIT mtimeChanged();
        Q_EMIT changed();
    }

    qint32 partId() const {
        return _partId;
    }

    void setPartId(qint32 value) {
        if( value == _partId )
            return;
        _partId = value;
        Q_EMIT partIdChanged();
        Q_EMIT changed();
    }

    qint32 downloaded() const {
        return _downloaded;
    }

    void setDownloaded(qint32 value) {
        if( value == _downloaded )
            return;
        _downloaded = value;
        Q_EMIT downloadedChanged();
        Q_EMIT changed();
    }

    qint32 total() const {
        return _total;
    }

    void setTotal(qint32 value) {
        if( value == _total )
            return;
        _total = value;
        Q_EMIT totalChanged();
        Q_EMIT changed();
    }

    QFile* file() const {
        return _file;
    }

    void setFile(QFile* value) {
        if( value == _file )
            return;
        _file = value;
        Q_EMIT fileChanged();
        Q_EMIT changed();
    }

Q_SIGNALS:
    void changed();
    void fileIdChanged();
    void locationChanged();
    void mtimeChanged();
    void partIdChanged();
    void downloadedChanged();
    void totalChanged();
    void fileChanged();

private:
    qint64 _fileId;
    QString _location;
    qint32 _mtime;
    qint32 _partId;
    qint32 _downloaded;
    qint32 _total;
    QFile* _file;

};

Q_DECLARE_METATYPE(DownloadObject*)

class TELEGRAMQMLSHARED_EXPORT UploadObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint64 fileId READ fileId WRITE setFileId NOTIFY fileIdChanged)
    Q_PROPERTY(QString location READ location WRITE setLocation NOTIFY locationChanged)
    Q_PROPERTY(qint32 partId READ partId WRITE setPartId NOTIFY partIdChanged)
    Q_PROPERTY(qint32 uploaded READ uploaded WRITE setUploaded NOTIFY uploadedChanged)
    Q_PROPERTY(qint32 totalSize READ totalSize WRITE setTotalSize NOTIFY totalSizeChanged)

public:
    UploadObject(QObject *parent = 0) : TqObject(parent){
        _fileId = 0;
        _partId = 0;
        _uploaded = 0;
        _totalSize = 0;
    }
    ~UploadObject(){}

    qint64 fileId() const {
        return _fileId;
    }

    void setFileId(qint64 value) {
        if( value == _fileId )
            return;
        _fileId = value;
        Q_EMIT fileIdChanged();
        Q_EMIT changed();
    }

    QString location() const {
        return _location;
    }

    void setLocation(QString value) {
        if( value == _location )
            return;
        _location = value;
        Q_EMIT locationChanged();
        Q_EMIT changed();
    }

    qint32 partId() const {
        return _partId;
    }

    void setPartId(qint32 value) {
        if( value == _partId )
            return;
        _partId = value;
        Q_EMIT partIdChanged();
        Q_EMIT changed();
    }

    qint32 uploaded() const {
        return _uploaded;
    }

    void setUploaded(qint32 value) {
        if( value == _uploaded )
            return;
        _uploaded = value;
        Q_EMIT uploadedChanged();
        Q_EMIT changed();
    }

    qint32 totalSize() const {
        return _totalSize;
    }

    void setTotalSize(qint32 value) {
        if( value == _totalSize )
            return;
        _totalSize = value;
        Q_EMIT totalSizeChanged();
        Q_EMIT changed();
    }

Q_SIGNALS:
    void changed();
    void fileIdChanged();
    void locationChanged();
    void partIdChanged();
    void uploadedChanged();
    void totalSizeChanged();

private:
    qint64 _fileId;
    QString _location;
    qint32 _partId;
    qint32 _uploaded;
    qint32 _totalSize;

};

Q_DECLARE_METATYPE(UploadObject*)

class TELEGRAMQMLSHARED_EXPORT FileLocationObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(DownloadObject* download READ download WRITE setDownload NOTIFY downloadChanged)
    Q_PROPERTY(qint64 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged)
    Q_PROPERTY(QString mimeType READ mimeType WRITE setMimeType NOTIFY mimeTypeChanged)
    Q_PROPERTY(qint32 localId READ localId WRITE setLocalId NOTIFY localIdChanged)
    Q_PROPERTY(qint64 secret READ secret WRITE setSecret NOTIFY secretChanged)
    Q_PROPERTY(qint32 dcId READ dcId WRITE setDcId NOTIFY dcIdChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(qint64 volumeId READ volumeId WRITE setVolumeId NOTIFY volumeIdChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    FileLocationObject(const FileLocation & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _download = new DownloadObject(this);
        _id = 0;
        _localId = another.localId();
        _secret = another.secret();
        _dcId = another.dcId();
        _accessHash = 0;
        _volumeId = another.volumeId();
        _classType = another.classType();

    }
    FileLocationObject(QObject *parent = 0) :
        TqObject(parent),
        _download(0){}
    ~FileLocationObject(){}

    DownloadObject* download() const {
        return _download;
    }

    void setDownload(DownloadObject* value) {
        if( value == _download )
            return;
        _download = value;
        Q_EMIT downloadChanged();
        Q_EMIT changed();
    }

    qint64 id() const {
        return _id;
    }

    void setId(qint64 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    QString fileName() const {
        return _fileName;
    }

    void setFileName(QString value) {
        if( value == _fileName )
            return;
        _fileName = value;
        Q_EMIT fileNameChanged();
        Q_EMIT changed();
    }

    QString mimeType() const {
        return _mimeType;
    }

    void setMimeType(QString value) {
        if( value == _mimeType )
            return;
        _mimeType = value;
        Q_EMIT mimeTypeChanged();
        Q_EMIT changed();
    }

    qint32 localId() const {
        return _localId;
    }

    void setLocalId(qint32 value) {
        if( value == _localId )
            return;
        _localId = value;
        Q_EMIT localIdChanged();
        Q_EMIT changed();
    }

    qint64 secret() const {
        return _secret;
    }

    void setSecret(qint64 value) {
        if( value == _secret )
            return;
        _secret = value;
        Q_EMIT secretChanged();
        Q_EMIT changed();
    }

    qint32 dcId() const {
        return _dcId;
    }

    void setDcId(qint32 value) {
        if( value == _dcId )
            return;
        _dcId = value;
        Q_EMIT dcIdChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    qint64 volumeId() const {
        return _volumeId;
    }

    void setVolumeId(qint64 value) {
        if( value == _volumeId )
            return;
        _volumeId = value;
        Q_EMIT volumeIdChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const FileLocation & another) {
        if(_localId != another.localId()) {
            _download->setFileId(0);
            _download->setMtime(0);
            _download->setPartId(0);
            _download->setDownloaded(0);
            _download->setTotal(0);
            Q_EMIT downloadChanged();
        }

        _id = 0;
        Q_EMIT idChanged();
        _fileName.clear();
        Q_EMIT fileNameChanged();
        _mimeType.clear();
        Q_EMIT mimeTypeChanged();
        _localId = another.localId();
        Q_EMIT localIdChanged();
        _secret = another.secret();
        Q_EMIT secretChanged();
        _dcId = another.dcId();
        Q_EMIT dcIdChanged();
        _accessHash = 0;
        Q_EMIT accessHashChanged();
        _volumeId = another.volumeId();
        Q_EMIT volumeIdChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void downloadChanged();
    void idChanged();
    void fileNameChanged();
    void mimeTypeChanged();
    void localIdChanged();
    void secretChanged();
    void dcIdChanged();
    void accessHashChanged();
    void volumeIdChanged();
    void classTypeChanged();

private:
    DownloadObject* _download;
    qint64 _id;
    QString _fileName;
    QString _mimeType;
    qint32 _localId;
    qint64 _secret;
    qint32 _dcId;
    qint64 _accessHash;
    qint64 _volumeId;
    quint32 _classType;

};

Q_DECLARE_METATYPE(FileLocationObject*)

class TELEGRAMQMLSHARED_EXPORT PeerObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 chatId READ chatId WRITE setChatId NOTIFY chatIdChanged)
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    PeerObject(const Peer & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _chatId = another.chatId();
        _userId = another.userId();
        _classType = another.classType();

    }
    PeerObject(QObject *parent = 0) : TqObject(parent){}
    ~PeerObject(){}

    qint32 chatId() const {
        return _chatId;
    }

    void setChatId(qint32 value) {
        if( value == _chatId )
            return;
        _chatId = value;
        Q_EMIT chatIdChanged();
        Q_EMIT changed();
    }

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const Peer & another) {
        _chatId = another.chatId();
        Q_EMIT chatIdChanged();
        _userId = another.userId();
        Q_EMIT userIdChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void chatIdChanged();
    void userIdChanged();
    void classTypeChanged();

private:
    qint32 _chatId;
    qint32 _userId;
    quint32 _classType;

};

Q_DECLARE_METATYPE(PeerObject*)

class TELEGRAMQMLSHARED_EXPORT ContactObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(bool mutual READ mutual WRITE setMutual NOTIFY mutualChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    ContactObject(const Contact & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _userId = another.userId();
        _mutual = another.mutual();
        _classType = another.classType();

    }
    ContactObject(QObject *parent = 0) : TqObject(parent){}
    ~ContactObject(){}

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    bool mutual() const {
        return _mutual;
    }

    void setMutual(bool value) {
        if( value == _mutual )
            return;
        _mutual = value;
        Q_EMIT mutualChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const Contact & another) {
        _userId = another.userId();
        Q_EMIT userIdChanged();
        _mutual = another.mutual();
        Q_EMIT mutualChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void userIdChanged();
    void mutualChanged();
    void classTypeChanged();

private:
    qint32 _userId;
    bool _mutual;
    quint32 _classType;

};

Q_DECLARE_METATYPE(ContactObject*)

class TELEGRAMQMLSHARED_EXPORT InputPeerObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 chatId READ chatId WRITE setChatId NOTIFY chatIdChanged)
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    InputPeerObject(const InputPeer & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _chatId = another.chatId();
        _userId = another.userId();
        _accessHash = another.accessHash();
        _classType = another.classType();

    }
    InputPeerObject(QObject *parent = 0) : TqObject(parent){}
    ~InputPeerObject(){}

    qint32 chatId() const {
        return _chatId;
    }

    void setChatId(qint32 value) {
        if( value == _chatId )
            return;
        _chatId = value;
        Q_EMIT chatIdChanged();
        Q_EMIT changed();
    }

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const InputPeer & another) {
        _chatId = another.chatId();
        Q_EMIT chatIdChanged();
        _userId = another.userId();
        Q_EMIT userIdChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void chatIdChanged();
    void userIdChanged();
    void accessHashChanged();
    void classTypeChanged();

private:
    qint32 _chatId;
    qint32 _userId;
    qint64 _accessHash;
    quint32 _classType;

};

Q_DECLARE_METATYPE(InputPeerObject*)

class TELEGRAMQMLSHARED_EXPORT UserStatusObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 wasOnline READ wasOnline WRITE setWasOnline NOTIFY wasOnlineChanged)
    Q_PROPERTY(qint32 expires READ expires WRITE setExpires NOTIFY expiresChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    UserStatusObject(const UserStatus & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _wasOnline = another.wasOnline();
        _expires = another.expires();
        _classType = another.classType();

    }
    UserStatusObject(QObject *parent = 0) : TqObject(parent){}
    ~UserStatusObject(){}

    qint32 wasOnline() const {
        return _wasOnline;
    }

    void setWasOnline(qint32 value) {
        if( value == _wasOnline )
            return;
        _wasOnline = value;
        Q_EMIT wasOnlineChanged();
        Q_EMIT changed();
    }

    qint32 expires() const {
        return _expires;
    }

    void setExpires(qint32 value) {
        if( value == _expires )
            return;
        _expires = value;
        Q_EMIT expiresChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const UserStatus & another) {
        _wasOnline = another.wasOnline();
        Q_EMIT wasOnlineChanged();
        _expires = another.expires();
        Q_EMIT expiresChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void wasOnlineChanged();
    void expiresChanged();
    void classTypeChanged();

private:
    qint32 _wasOnline;
    qint32 _expires;
    quint32 _classType;

};

Q_DECLARE_METATYPE(UserStatusObject*)

class TELEGRAMQMLSHARED_EXPORT GeoPointObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(double longitude READ longitude WRITE setLongitude NOTIFY longitudeChanged)
    Q_PROPERTY(double lat READ lat WRITE setLat NOTIFY latChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    GeoPointObject(const GeoPoint & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _longitude = another.longValue();
        _lat = another.lat();
        _classType = another.classType();

    }
    GeoPointObject(QObject *parent = 0) : TqObject(parent){}
    ~GeoPointObject(){}

    double longitude() const {
        return _longitude;
    }

    void setLongitude(double value) {
        if( value == _longitude )
            return;
        _longitude = value;
        Q_EMIT longitudeChanged();
        Q_EMIT changed();
    }

    double lat() const {
        return _lat;
    }

    void setLat(double value) {
        if( value == _lat )
            return;
        _lat = value;
        Q_EMIT latChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const GeoPoint & another) {
        _longitude = another.longValue();
        Q_EMIT longitudeChanged();
        _lat = another.lat();
        Q_EMIT latChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void longitudeChanged();
    void latChanged();
    void classTypeChanged();

private:
    double _longitude;
    double _lat;
    quint32 _classType;

};

Q_DECLARE_METATYPE(GeoPointObject*)

class TELEGRAMQMLSHARED_EXPORT PeerNotifySettingsObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 muteUntil READ muteUntil WRITE setMuteUntil NOTIFY muteUntilChanged)
    Q_PROPERTY(qint32 eventsMask READ eventsMask WRITE setEventsMask NOTIFY eventsMaskChanged)
    Q_PROPERTY(QString sound READ sound WRITE setSound NOTIFY soundChanged)
    Q_PROPERTY(bool showPreviews READ showPreviews WRITE setShowPreviews NOTIFY showPreviewsChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    PeerNotifySettingsObject(const PeerNotifySettings & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _muteUntil = another.muteUntil();
        _eventsMask = another.eventsMask();
        _sound = another.sound();
        _showPreviews = another.showPreviews();
        _classType = another.classType();

    }
    PeerNotifySettingsObject(QObject *parent = 0) : TqObject(parent){}
    ~PeerNotifySettingsObject(){}

    qint32 muteUntil() const {
        return _muteUntil;
    }

    void setMuteUntil(qint32 value) {
        if( value == _muteUntil )
            return;
        _muteUntil = value;
        Q_EMIT muteUntilChanged();
        Q_EMIT changed();
    }

    qint32 eventsMask() const {
        return _eventsMask;
    }

    void setEventsMask(qint32 value) {
        if( value == _eventsMask )
            return;
        _eventsMask = value;
        Q_EMIT eventsMaskChanged();
        Q_EMIT changed();
    }

    QString sound() const {
        return _sound;
    }

    void setSound(QString value) {
        if( value == _sound )
            return;
        _sound = value;
        Q_EMIT soundChanged();
        Q_EMIT changed();
    }

    bool showPreviews() const {
        return _showPreviews;
    }

    void setShowPreviews(bool value) {
        if( value == _showPreviews )
            return;
        _showPreviews = value;
        Q_EMIT showPreviewsChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const PeerNotifySettings & another) {
        _muteUntil = another.muteUntil();
        Q_EMIT muteUntilChanged();
        _eventsMask = another.eventsMask();
        Q_EMIT eventsMaskChanged();
        _sound = another.sound();
        Q_EMIT soundChanged();
        _showPreviews = another.showPreviews();
        Q_EMIT showPreviewsChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void muteUntilChanged();
    void eventsMaskChanged();
    void soundChanged();
    void showPreviewsChanged();
    void classTypeChanged();

private:
    qint32 _muteUntil;
    qint32 _eventsMask;
    QString _sound;
    bool _showPreviews;
    quint32 _classType;

};

Q_DECLARE_METATYPE(PeerNotifySettingsObject*)

class TELEGRAMQMLSHARED_EXPORT EncryptedFileObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 dcId READ dcId WRITE setDcId NOTIFY dcIdChanged)
    Q_PROPERTY(qint64 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(qint32 keyFingerprint READ keyFingerprint WRITE setKeyFingerprint NOTIFY keyFingerprintChanged)
    Q_PROPERTY(qint32 size READ size WRITE setSize NOTIFY sizeChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    EncryptedFileObject(const EncryptedFile & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _dcId = another.dcId();
        _id = another.id();
        _keyFingerprint = another.keyFingerprint();
        _size = another.size();
        _accessHash = another.accessHash();
        _classType = another.classType();

    }
    EncryptedFileObject(QObject *parent = 0) : TqObject(parent){}
    ~EncryptedFileObject(){}

    qint32 dcId() const {
        return _dcId;
    }

    void setDcId(qint32 value) {
        if( value == _dcId )
            return;
        _dcId = value;
        Q_EMIT dcIdChanged();
        Q_EMIT changed();
    }

    qint64 id() const {
        return _id;
    }

    void setId(qint64 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    qint32 keyFingerprint() const {
        return _keyFingerprint;
    }

    void setKeyFingerprint(qint32 value) {
        if( value == _keyFingerprint )
            return;
        _keyFingerprint = value;
        Q_EMIT keyFingerprintChanged();
        Q_EMIT changed();
    }

    qint32 size() const {
        return _size;
    }

    void setSize(qint32 value) {
        if( value == _size )
            return;
        _size = value;
        Q_EMIT sizeChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const EncryptedFile & another) {
        _dcId = another.dcId();
        Q_EMIT dcIdChanged();
        _id = another.id();
        Q_EMIT idChanged();
        _keyFingerprint = another.keyFingerprint();
        Q_EMIT keyFingerprintChanged();
        _size = another.size();
        Q_EMIT sizeChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void dcIdChanged();
    void idChanged();
    void keyFingerprintChanged();
    void sizeChanged();
    void accessHashChanged();
    void classTypeChanged();

private:
    qint32 _dcId;
    qint64 _id;
    qint32 _keyFingerprint;
    qint32 _size;
    qint64 _accessHash;
    quint32 _classType;

};

Q_DECLARE_METATYPE(EncryptedFileObject*)

class TELEGRAMQMLSHARED_EXPORT EncryptedChatObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(QByteArray gA READ gA WRITE setGA NOTIFY gAChanged)
    Q_PROPERTY(qint64 keyFingerprint READ keyFingerprint WRITE setKeyFingerprint NOTIFY keyFingerprintChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(qint32 adminId READ adminId WRITE setAdminId NOTIFY adminIdChanged)
    Q_PROPERTY(QByteArray gAOrB READ gAOrB WRITE setGAOrB NOTIFY gAOrBChanged)
    Q_PROPERTY(qint32 participantId READ participantId WRITE setParticipantId NOTIFY participantIdChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    EncryptedChatObject(const EncryptedChat & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _id = another.id();
        _gA = another.gA();
        _keyFingerprint = another.keyFingerprint();
        _date = another.date();
        _accessHash = another.accessHash();
        _adminId = another.adminId();
        _gAOrB = another.gAOrB();
        _participantId = another.participantId();
        _classType = another.classType();

    }
    EncryptedChatObject(QObject *parent = 0) : TqObject(parent){}
    ~EncryptedChatObject(){}

    qint32 id() const {
        return _id;
    }

    void setId(qint32 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    QByteArray gA() const {
        return _gA;
    }

    void setGA(QByteArray value) {
        if( value == _gA )
            return;
        _gA = value;
        Q_EMIT gAChanged();
        Q_EMIT changed();
    }

    qint64 keyFingerprint() const {
        return _keyFingerprint;
    }

    void setKeyFingerprint(qint64 value) {
        if( value == _keyFingerprint )
            return;
        _keyFingerprint = value;
        Q_EMIT keyFingerprintChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    qint32 adminId() const {
        return _adminId;
    }

    void setAdminId(qint32 value) {
        if( value == _adminId )
            return;
        _adminId = value;
        Q_EMIT adminIdChanged();
        Q_EMIT changed();
    }

    QByteArray gAOrB() const {
        return _gAOrB;
    }

    void setGAOrB(QByteArray value) {
        if( value == _gAOrB )
            return;
        _gAOrB = value;
        Q_EMIT gAOrBChanged();
        Q_EMIT changed();
    }

    qint32 participantId() const {
        return _participantId;
    }

    void setParticipantId(qint32 value) {
        if( value == _participantId )
            return;
        _participantId = value;
        Q_EMIT participantIdChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const EncryptedChat & another) {
        _id = another.id();
        Q_EMIT idChanged();
        _gA = another.gA();
        Q_EMIT gAChanged();
        _keyFingerprint = another.keyFingerprint();
        Q_EMIT keyFingerprintChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _adminId = another.adminId();
        Q_EMIT adminIdChanged();
        _gAOrB = another.gAOrB();
        Q_EMIT gAOrBChanged();
        _participantId = another.participantId();
        Q_EMIT participantIdChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void idChanged();
    void gAChanged();
    void keyFingerprintChanged();
    void dateChanged();
    void accessHashChanged();
    void adminIdChanged();
    void gAOrBChanged();
    void participantIdChanged();
    void classTypeChanged();

private:
    qint32 _id;
    QByteArray _gA;
    qint64 _keyFingerprint;
    qint32 _date;
    qint64 _accessHash;
    qint32 _adminId;
    QByteArray _gAOrB;
    qint32 _participantId;
    quint32 _classType;

};

Q_DECLARE_METATYPE(EncryptedChatObject*)

class TELEGRAMQMLSHARED_EXPORT EncryptedMessageObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 chatId READ chatId WRITE setChatId NOTIFY chatIdChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(qint64 randomId READ randomId WRITE setRandomId NOTIFY randomIdChanged)
    Q_PROPERTY(EncryptedFileObject* file READ file WRITE setFile NOTIFY fileChanged)
    Q_PROPERTY(QByteArray bytes READ bytes WRITE setBytes NOTIFY bytesChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    EncryptedMessageObject(const EncryptedMessage & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _chatId = another.chatId();
        _date = another.date();
        _randomId = another.randomId();
        _file = new EncryptedFileObject(another.file(), this);
        _bytes = another.bytes();
        _classType = another.classType();

    }
    EncryptedMessageObject(QObject *parent = 0) :
        TqObject(parent),
        _file(0){}
    ~EncryptedMessageObject(){}

    qint32 chatId() const {
        return _chatId;
    }

    void setChatId(qint32 value) {
        if( value == _chatId )
            return;
        _chatId = value;
        Q_EMIT chatIdChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    qint64 randomId() const {
        return _randomId;
    }

    void setRandomId(qint64 value) {
        if( value == _randomId )
            return;
        _randomId = value;
        Q_EMIT randomIdChanged();
        Q_EMIT changed();
    }

    EncryptedFileObject* file() const {
        return _file;
    }

    void setFile(EncryptedFileObject* value) {
        if( value == _file )
            return;
        _file = value;
        Q_EMIT fileChanged();
        Q_EMIT changed();
    }

    QByteArray bytes() const {
        return _bytes;
    }

    void setBytes(QByteArray value) {
        if( value == _bytes )
            return;
        _bytes = value;
        Q_EMIT bytesChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const EncryptedMessage & another) {
        _chatId = another.chatId();
        Q_EMIT chatIdChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        _randomId = another.randomId();
        Q_EMIT randomIdChanged();
        *_file = another.file();
        Q_EMIT fileChanged();
        _bytes = another.bytes();
        Q_EMIT bytesChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void chatIdChanged();
    void dateChanged();
    void randomIdChanged();
    void fileChanged();
    void bytesChanged();
    void classTypeChanged();

private:
    qint32 _chatId;
    qint32 _date;
    qint64 _randomId;
    EncryptedFileObject* _file;
    QByteArray _bytes;
    quint32 _classType;

};

Q_DECLARE_METATYPE(EncryptedMessageObject*)

class TELEGRAMQMLSHARED_EXPORT ContactLinkObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    ContactLinkObject(const ContactLink & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _classType = another.classType();

    }
    ContactLinkObject(QObject *parent = 0) : TqObject(parent){}
    ~ContactLinkObject(){}

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const ContactLink & another) {
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void classTypeChanged();

private:
    quint32 _classType;

};

Q_DECLARE_METATYPE(ContactLinkObject*)

class TELEGRAMQMLSHARED_EXPORT NotifyPeerObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(PeerObject* peer READ peer WRITE setPeer NOTIFY peerChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    NotifyPeerObject(const NotifyPeer & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _peer = new PeerObject(another.peer(), this);
        _classType = another.classType();

    }
    NotifyPeerObject(QObject *parent = 0) :
        TqObject(parent),
        _peer(0){}
    ~NotifyPeerObject(){}

    PeerObject* peer() const {
        return _peer;
    }

    void setPeer(PeerObject* value) {
        if( value == _peer )
            return;
        _peer = value;
        Q_EMIT peerChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const NotifyPeer & another) {
        *_peer = another.peer();
        Q_EMIT peerChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void peerChanged();
    void classTypeChanged();

private:
    PeerObject* _peer;
    quint32 _classType;

};

Q_DECLARE_METATYPE(NotifyPeerObject*)

class TELEGRAMQMLSHARED_EXPORT ChatParticipantObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(qint32 inviterId READ inviterId WRITE setInviterId NOTIFY inviterIdChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    ChatParticipantObject(const ChatParticipant & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _userId = another.userId();
        _date = another.date();
        _inviterId = another.inviterId();
        _classType = another.classType();

    }
    ChatParticipantObject(QObject *parent = 0) : TqObject(parent){}
    ~ChatParticipantObject(){}

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    qint32 inviterId() const {
        return _inviterId;
    }

    void setInviterId(qint32 value) {
        if( value == _inviterId )
            return;
        _inviterId = value;
        Q_EMIT inviterIdChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const ChatParticipant & another) {
        _userId = another.userId();
        Q_EMIT userIdChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        _inviterId = another.inviterId();
        Q_EMIT inviterIdChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void userIdChanged();
    void dateChanged();
    void inviterIdChanged();
    void classTypeChanged();

private:
    qint32 _userId;
    qint32 _date;
    qint32 _inviterId;
    quint32 _classType;

};

Q_DECLARE_METATYPE(ChatParticipantObject*)

class TELEGRAMQMLSHARED_EXPORT ChatParticipantsObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(ChatParticipantList* participants READ participants WRITE setParticipants NOTIFY participantsChanged)
    Q_PROPERTY(qint32 chatId READ chatId WRITE setChatId NOTIFY chatIdChanged)
    Q_PROPERTY(qint32 version READ version WRITE setVersion NOTIFY versionChanged)
    Q_PROPERTY(qint32 adminId READ adminId WRITE setAdminId NOTIFY adminIdChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    ChatParticipantsObject(const ChatParticipants & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _participants = new ChatParticipantList(another.participants(), this);
        _chatId = another.chatId();
        _version = another.version();
        _adminId = another.adminId();
        _classType = another.classType();

    }
    ChatParticipantsObject(QObject *parent = 0) :
        TqObject(parent),
        _participants(0){}
    ~ChatParticipantsObject(){}

    ChatParticipantList* participants() const {
        return _participants;
    }

    void setParticipants(ChatParticipantList* value) {
        if( value == _participants )
            return;
        _participants = value;
        Q_EMIT participantsChanged();
        Q_EMIT changed();
    }

    qint32 chatId() const {
        return _chatId;
    }

    void setChatId(qint32 value) {
        if( value == _chatId )
            return;
        _chatId = value;
        Q_EMIT chatIdChanged();
        Q_EMIT changed();
    }

    qint32 version() const {
        return _version;
    }

    void setVersion(qint32 value) {
        if( value == _version )
            return;
        _version = value;
        Q_EMIT versionChanged();
        Q_EMIT changed();
    }

    qint32 adminId() const {
        return _adminId;
    }

    void setAdminId(qint32 value) {
        if( value == _adminId )
            return;
        _adminId = value;
        Q_EMIT adminIdChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const ChatParticipants & another) {
        *_participants = another.participants();
        Q_EMIT participantsChanged();
        _chatId = another.chatId();
        Q_EMIT chatIdChanged();
        _version = another.version();
        Q_EMIT versionChanged();
        _adminId = another.adminId();
        Q_EMIT adminIdChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void participantsChanged();
    void chatIdChanged();
    void versionChanged();
    void adminIdChanged();
    void classTypeChanged();

private:
    ChatParticipantList* _participants;
    qint32 _chatId;
    qint32 _version;
    qint32 _adminId;
    quint32 _classType;

};

Q_DECLARE_METATYPE(ChatParticipantsObject*)

class TELEGRAMQMLSHARED_EXPORT PhotoSizeObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 h READ h WRITE setH NOTIFY hChanged)
    Q_PROPERTY(QString type READ type WRITE setType NOTIFY typeChanged)
    Q_PROPERTY(QByteArray bytes READ bytes WRITE setBytes NOTIFY bytesChanged)
    Q_PROPERTY(FileLocationObject* location READ location WRITE setLocation NOTIFY locationChanged)
    Q_PROPERTY(qint32 size READ size WRITE setSize NOTIFY sizeChanged)
    Q_PROPERTY(qint32 w READ w WRITE setW NOTIFY wChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    PhotoSizeObject(const PhotoSize & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _h = another.h();
        _type = another.type();
        _bytes = another.bytes();
        _location = new FileLocationObject(another.location(), this);
        _size = another.size();
        _w = another.w();
        _classType = another.classType();

    }
    PhotoSizeObject(QObject *parent = 0) :
        TqObject(parent),
        _location(0){}
    ~PhotoSizeObject(){}

    qint32 h() const {
        return _h;
    }

    void setH(qint32 value) {
        if( value == _h )
            return;
        _h = value;
        Q_EMIT hChanged();
        Q_EMIT changed();
    }

    QString type() const {
        return _type;
    }

    void setType(QString value) {
        if( value == _type )
            return;
        _type = value;
        Q_EMIT typeChanged();
        Q_EMIT changed();
    }

    QByteArray bytes() const {
        return _bytes;
    }

    void setBytes(QByteArray value) {
        if( value == _bytes )
            return;
        _bytes = value;
        Q_EMIT bytesChanged();
        Q_EMIT changed();
    }

    FileLocationObject* location() const {
        return _location;
    }

    void setLocation(FileLocationObject* value) {
        if( value == _location )
            return;
        _location = value;
        Q_EMIT locationChanged();
        Q_EMIT changed();
    }

    qint32 size() const {
        return _size;
    }

    void setSize(qint32 value) {
        if( value == _size )
            return;
        _size = value;
        Q_EMIT sizeChanged();
        Q_EMIT changed();
    }

    qint32 w() const {
        return _w;
    }

    void setW(qint32 value) {
        if( value == _w )
            return;
        _w = value;
        Q_EMIT wChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const PhotoSize & another) {
        _h = another.h();
        Q_EMIT hChanged();
        _type = another.type();
        Q_EMIT typeChanged();
        _bytes = another.bytes();
        Q_EMIT bytesChanged();
        *_location = another.location();
        Q_EMIT locationChanged();
        _size = another.size();
        Q_EMIT sizeChanged();
        _w = another.w();
        Q_EMIT wChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void hChanged();
    void typeChanged();
    void bytesChanged();
    void locationChanged();
    void sizeChanged();
    void wChanged();
    void classTypeChanged();

private:
    qint32 _h;
    QString _type;
    QByteArray _bytes;
    FileLocationObject* _location;
    qint32 _size;
    qint32 _w;
    quint32 _classType;

};

Q_DECLARE_METATYPE(PhotoSizeObject*)

class TELEGRAMQMLSHARED_EXPORT AudioObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint64 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(qint32 dcId READ dcId WRITE setDcId NOTIFY dcIdChanged)
    Q_PROPERTY(QString mimeType READ mimeType WRITE setMimeType NOTIFY mimeTypeChanged)
    Q_PROPERTY(qint32 duration READ duration WRITE setDuration NOTIFY durationChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(qint32 size READ size WRITE setSize NOTIFY sizeChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    AudioObject(const Audio & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _id = another.id();
        _dcId = another.dcId();
        _mimeType = another.mimeType();
        _duration = another.duration();
        _date = another.date();
        _size = another.size();
        _accessHash = another.accessHash();
        _userId = another.userId();
        _classType = another.classType();

    }
    AudioObject(QObject *parent = 0) : TqObject(parent){}
    ~AudioObject(){}

    qint64 id() const {
        return _id;
    }

    void setId(qint64 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    qint32 dcId() const {
        return _dcId;
    }

    void setDcId(qint32 value) {
        if( value == _dcId )
            return;
        _dcId = value;
        Q_EMIT dcIdChanged();
        Q_EMIT changed();
    }

    QString mimeType() const {
        return _mimeType;
    }

    void setMimeType(QString value) {
        if( value == _mimeType )
            return;
        _mimeType = value;
        Q_EMIT mimeTypeChanged();
        Q_EMIT changed();
    }

    qint32 duration() const {
        return _duration;
    }

    void setDuration(qint32 value) {
        if( value == _duration )
            return;
        _duration = value;
        Q_EMIT durationChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    qint32 size() const {
        return _size;
    }

    void setSize(qint32 value) {
        if( value == _size )
            return;
        _size = value;
        Q_EMIT sizeChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const Audio & another) {
        _id = another.id();
        Q_EMIT idChanged();
        _dcId = another.dcId();
        Q_EMIT dcIdChanged();
        _mimeType = another.mimeType();
        Q_EMIT mimeTypeChanged();
        _duration = another.duration();
        Q_EMIT durationChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        _size = another.size();
        Q_EMIT sizeChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _userId = another.userId();
        Q_EMIT userIdChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void idChanged();
    void dcIdChanged();
    void mimeTypeChanged();
    void durationChanged();
    void dateChanged();
    void sizeChanged();
    void accessHashChanged();
    void userIdChanged();
    void classTypeChanged();

private:
    qint64 _id;
    qint32 _dcId;
    QString _mimeType;
    qint32 _duration;
    qint32 _date;
    qint32 _size;
    qint64 _accessHash;
    qint32 _userId;
    quint32 _classType;

};

Q_DECLARE_METATYPE(AudioObject*)

class TELEGRAMQMLSHARED_EXPORT DocumentAttributeObject : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString alt READ alt WRITE setAlt NOTIFY altChanged)
    Q_PROPERTY(qint32 duration READ duration WRITE setDuration NOTIFY durationChanged)
    Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged)
    Q_PROPERTY(qint32 h READ h WRITE setH NOTIFY hChanged)
    Q_PROPERTY(qint32 w READ w WRITE setW NOTIFY wChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    DocumentAttributeObject(const DocumentAttribute & another, QObject *parent = 0) : QObject(parent){
        (void)another;
        _alt = another.alt();
        _duration = another.duration();
        _fileName = another.fileName();
        _h = another.h();
        _w = another.w();
        _classType = another.classType();

    }
    DocumentAttributeObject(QObject *parent = 0) : QObject(parent){}
    ~DocumentAttributeObject(){}

    QString alt() const {
        return _alt;
    }

    void setAlt(QString value) {
        if( value == _alt )
            return;
        _alt = value;
        Q_EMIT altChanged();
        Q_EMIT changed();
    }

    qint32 duration() const {
        return _duration;
    }

    void setDuration(qint32 value) {
        if( value == _duration )
            return;
        _duration = value;
        Q_EMIT durationChanged();
        Q_EMIT changed();
    }

    QString fileName() const {
        return _fileName;
    }

    void setFileName(QString value) {
        if( value == _fileName )
            return;
        _fileName = value;
        Q_EMIT fileNameChanged();
        Q_EMIT changed();
    }

    qint32 h() const {
        return _h;
    }

    void setH(qint32 value) {
        if( value == _h )
            return;
        _h = value;
        Q_EMIT hChanged();
        Q_EMIT changed();
    }

    qint32 w() const {
        return _w;
    }

    void setW(qint32 value) {
        if( value == _w )
            return;
        _w = value;
        Q_EMIT wChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const DocumentAttribute & another) {
        _alt = another.alt();
        Q_EMIT altChanged();
        _duration = another.duration();
        Q_EMIT durationChanged();
        _fileName = another.fileName();
        Q_EMIT fileNameChanged();
        _h = another.h();
        Q_EMIT hChanged();
        _w = another.w();
        Q_EMIT wChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void altChanged();
    void durationChanged();
    void fileNameChanged();
    void hChanged();
    void wChanged();
    void classTypeChanged();

private:
    QString _alt;
    qint32 _duration;
    QString _fileName;
    qint32 _h;
    qint32 _w;
    quint32 _classType;

};

Q_DECLARE_METATYPE(DocumentAttributeObject*)

class TELEGRAMQMLSHARED_EXPORT DocumentObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint64 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(qint32 dcId READ dcId WRITE setDcId NOTIFY dcIdChanged)
    Q_PROPERTY(QString mimeType READ mimeType WRITE setMimeType NOTIFY mimeTypeChanged)
    Q_PROPERTY(PhotoSizeObject* thumb READ thumb WRITE setThumb NOTIFY thumbChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(QList<DocumentAttribute> attributes READ attributes WRITE setAttributes NOTIFY attributesChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(qint32 size READ size WRITE setSize NOTIFY sizeChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    DocumentObject(const Document & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _id = another.id();
        _dcId = another.dcId();
        _mimeType = another.mimeType();
        _thumb = new PhotoSizeObject(another.thumb(), this);
        _date = another.date();
        _attributes = another.attributes();
        _accessHash = another.accessHash();
        _size = another.size();
        _classType = another.classType();

    }
    DocumentObject(QObject *parent = 0) :
        TqObject(parent),
        _thumb(0){}
    ~DocumentObject(){}

    qint64 id() const {
        return _id;
    }

    void setId(qint64 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    qint32 dcId() const {
        return _dcId;
    }

    void setDcId(qint32 value) {
        if( value == _dcId )
            return;
        _dcId = value;
        Q_EMIT dcIdChanged();
        Q_EMIT changed();
    }

    QString mimeType() const {
        return _mimeType;
    }

    void setMimeType(QString value) {
        if( value == _mimeType )
            return;
        _mimeType = value;
        Q_EMIT mimeTypeChanged();
        Q_EMIT changed();
    }

    PhotoSizeObject* thumb() const {
        return _thumb;
    }

    void setThumb(PhotoSizeObject* value) {
        if( value == _thumb )
            return;
        _thumb = value;
        Q_EMIT thumbChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    QList<DocumentAttribute> attributes() const {
        return _attributes;
    }

    void setAttributes(QList<DocumentAttribute> value) {
        _attributes = value;
        Q_EMIT attributesChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    qint32 size() const {
        return _size;
    }

    void setSize(qint32 value) {
        if( value == _size )
            return;
        _size = value;
        Q_EMIT sizeChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const Document & another) {
        _id = another.id();
        Q_EMIT idChanged();
        _dcId = another.dcId();
        Q_EMIT dcIdChanged();
        _mimeType = another.mimeType();
        Q_EMIT mimeTypeChanged();
        *_thumb = another.thumb();
        Q_EMIT thumbChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        _attributes = another.attributes();
        Q_EMIT attributesChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _size = another.size();
        Q_EMIT sizeChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();
    }

Q_SIGNALS:
    void changed();
    void idChanged();
    void dcIdChanged();
    void mimeTypeChanged();
    void thumbChanged();
    void dateChanged();
    void attributesChanged();
    void accessHashChanged();
    void sizeChanged();
    void classTypeChanged();

private:
    qint64 _id;
    qint32 _dcId;
    QString _mimeType;
    PhotoSizeObject* _thumb;
    qint32 _date;
    QList<DocumentAttribute> _attributes;
    qint64 _accessHash;
    qint32 _size;
    quint32 _classType;

};

Q_DECLARE_METATYPE(DocumentObject*)

class TELEGRAMQMLSHARED_EXPORT VideoObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint64 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(qint32 dcId READ dcId WRITE setDcId NOTIFY dcIdChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(PhotoSizeObject* thumb READ thumb WRITE setThumb NOTIFY thumbChanged)
    Q_PROPERTY(qint32 duration READ duration WRITE setDuration NOTIFY durationChanged)
    Q_PROPERTY(qint32 h READ h WRITE setH NOTIFY hChanged)
    Q_PROPERTY(qint32 size READ size WRITE setSize NOTIFY sizeChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(qint32 w READ w WRITE setW NOTIFY wChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    VideoObject(const Video & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _id = another.id();
        _dcId = another.dcId();
        _date = another.date();
        _thumb = new PhotoSizeObject(another.thumb(), this);
        _duration = another.duration();
        _h = another.h();
        _size = another.size();
        _accessHash = another.accessHash();
        _userId = another.userId();
        _w = another.w();
        _classType = another.classType();

    }
    VideoObject(QObject *parent = 0) :
        TqObject(parent),
        _thumb(0){}
    ~VideoObject(){}

    qint64 id() const {
        return _id;
    }

    void setId(qint64 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    qint32 dcId() const {
        return _dcId;
    }

    void setDcId(qint32 value) {
        if( value == _dcId )
            return;
        _dcId = value;
        Q_EMIT dcIdChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    PhotoSizeObject* thumb() const {
        return _thumb;
    }

    void setThumb(PhotoSizeObject* value) {
        if( value == _thumb )
            return;
        _thumb = value;
        Q_EMIT thumbChanged();
        Q_EMIT changed();
    }

    qint32 duration() const {
        return _duration;
    }

    void setDuration(qint32 value) {
        if( value == _duration )
            return;
        _duration = value;
        Q_EMIT durationChanged();
        Q_EMIT changed();
    }

    qint32 h() const {
        return _h;
    }

    void setH(qint32 value) {
        if( value == _h )
            return;
        _h = value;
        Q_EMIT hChanged();
        Q_EMIT changed();
    }

    qint32 size() const {
        return _size;
    }

    void setSize(qint32 value) {
        if( value == _size )
            return;
        _size = value;
        Q_EMIT sizeChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    qint32 w() const {
        return _w;
    }

    void setW(qint32 value) {
        if( value == _w )
            return;
        _w = value;
        Q_EMIT wChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const Video & another) {
        _id = another.id();
        Q_EMIT idChanged();
        _dcId = another.dcId();
        Q_EMIT dcIdChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        *_thumb = another.thumb();
        Q_EMIT thumbChanged();
        _duration = another.duration();
        Q_EMIT durationChanged();
        _h = another.h();
        Q_EMIT hChanged();
        _size = another.size();
        Q_EMIT sizeChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _userId = another.userId();
        Q_EMIT userIdChanged();
        _w = another.w();
        Q_EMIT wChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void idChanged();
    void dcIdChanged();
    void dateChanged();
    void thumbChanged();
    void durationChanged();
    void hChanged();
    void sizeChanged();
    void accessHashChanged();
    void userIdChanged();
    void wChanged();
    void classTypeChanged();

private:
    qint64 _id;
    qint32 _dcId;
    qint32 _date;
    PhotoSizeObject* _thumb;
    qint32 _duration;
    qint32 _h;
    qint32 _size;
    qint64 _accessHash;
    qint32 _userId;
    qint32 _w;
    quint32 _classType;

};

Q_DECLARE_METATYPE(VideoObject*)

class TELEGRAMQMLSHARED_EXPORT PhotoObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint64 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(PhotoSizeList* sizes READ sizes WRITE setSizes NOTIFY sizesChanged)
    Q_PROPERTY(GeoPointObject* geo READ geo WRITE setGeo NOTIFY geoChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    PhotoObject(const Photo & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _id = another.id();
        _date = another.date();
        _sizes = new PhotoSizeList(another.sizes(), this);
        _geo = new GeoPointObject(another.geo(), this);
        _accessHash = another.accessHash();
        _userId = another.userId();
        _classType = another.classType();

    }
    PhotoObject(QObject *parent = 0) :
        TqObject(parent),
        _sizes(0),
        _geo(0){}
    ~PhotoObject(){}

    qint64 id() const {
        return _id;
    }

    void setId(qint64 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    PhotoSizeList* sizes() const {
        return _sizes;
    }

    void setSizes(PhotoSizeList* value) {
        if( value == _sizes )
            return;
        _sizes = value;
        Q_EMIT sizesChanged();
        Q_EMIT changed();
    }

    GeoPointObject* geo() const {
        return _geo;
    }

    void setGeo(GeoPointObject* value) {
        if( value == _geo )
            return;
        _geo = value;
        Q_EMIT geoChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const Photo & another) {
        _id = another.id();
        Q_EMIT idChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        *_sizes = another.sizes();
        Q_EMIT sizesChanged();
        *_geo = another.geo();
        Q_EMIT geoChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _userId = another.userId();
        Q_EMIT userIdChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void idChanged();
    void dateChanged();
    void sizesChanged();
    void geoChanged();
    void accessHashChanged();
    void userIdChanged();
    void classTypeChanged();

private:
    qint64 _id;
    qint32 _date;
    PhotoSizeList* _sizes;
    GeoPointObject* _geo;
    qint64 _accessHash;
    qint32 _userId;
    quint32 _classType;

};

Q_DECLARE_METATYPE(PhotoObject*)

class TELEGRAMQMLSHARED_EXPORT WallPaperObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 bgColor READ bgColor WRITE setBgColor NOTIFY bgColorChanged)
    Q_PROPERTY(qint32 color READ color WRITE setColor NOTIFY colorChanged)
    Q_PROPERTY(qint32 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
    Q_PROPERTY(PhotoSizeList* sizes READ sizes WRITE setSizes NOTIFY sizesChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    WallPaperObject(const WallPaper & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _bgColor = another.bgColor();
        _color = another.color();
        _id = another.id();
        _title = another.title();
        _sizes = new PhotoSizeList(another.sizes(), this);
        _classType = another.classType();

    }
    WallPaperObject(QObject *parent = 0) :
        TqObject(parent),
        _sizes(0){}
    ~WallPaperObject(){}

    qint32 bgColor() const {
        return _bgColor;
    }

    void setBgColor(qint32 value) {
        if( value == _bgColor )
            return;
        _bgColor = value;
        Q_EMIT bgColorChanged();
        Q_EMIT changed();
    }

    qint32 color() const {
        return _color;
    }

    void setColor(qint32 value) {
        if( value == _color )
            return;
        _color = value;
        Q_EMIT colorChanged();
        Q_EMIT changed();
    }

    qint32 id() const {
        return _id;
    }

    void setId(qint32 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    QString title() const {
        return _title;
    }

    void setTitle(QString value) {
        if( value == _title )
            return;
        _title = value;
        Q_EMIT titleChanged();
        Q_EMIT changed();
    }

    PhotoSizeList* sizes() const {
        return _sizes;
    }

    void setSizes(PhotoSizeList* value) {
        if( value == _sizes )
            return;
        _sizes = value;
        Q_EMIT sizesChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const WallPaper & another) {
        _bgColor = another.bgColor();
        Q_EMIT bgColorChanged();
        _color = another.color();
        Q_EMIT colorChanged();
        _id = another.id();
        Q_EMIT idChanged();
        _title = another.title();
        Q_EMIT titleChanged();
        *_sizes = another.sizes();
        Q_EMIT sizesChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void bgColorChanged();
    void colorChanged();
    void idChanged();
    void titleChanged();
    void sizesChanged();
    void classTypeChanged();

private:
    qint32 _bgColor;
    qint32 _color;
    qint32 _id;
    QString _title;
    PhotoSizeList* _sizes;
    quint32 _classType;

};

Q_DECLARE_METATYPE(WallPaperObject*)

class TELEGRAMQMLSHARED_EXPORT MessageActionObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(QString address READ address WRITE setAddress NOTIFY addressChanged)
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(PhotoObject* photo READ photo WRITE setPhoto NOTIFY photoChanged)
    Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
    Q_PROPERTY(QList<qint32> users READ users WRITE setUsers NOTIFY usersChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    MessageActionObject(const MessageAction & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _address = another.address();
        _userId = another.userId();
        _photo = new PhotoObject(another.photo(), this);
        _title = another.title();
        _users = another.users();
        _classType = another.classType();

    }
    MessageActionObject(QObject *parent = 0) :
        TqObject(parent),
        _photo(0){}
    ~MessageActionObject(){}

    QString address() const {
        return _address;
    }

    void setAddress(QString value) {
        if( value == _address )
            return;
        _address = value;
        Q_EMIT addressChanged();
        Q_EMIT changed();
    }

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    PhotoObject* photo() const {
        return _photo;
    }

    void setPhoto(PhotoObject* value) {
        if( value == _photo )
            return;
        _photo = value;
        Q_EMIT photoChanged();
        Q_EMIT changed();
    }

    QString title() const {
        return _title;
    }

    void setTitle(QString value) {
        if( value == _title )
            return;
        _title = value;
        Q_EMIT titleChanged();
        Q_EMIT changed();
    }

    QList<qint32> users() const {
        return _users;
    }

    void setUsers(QList<qint32> value) {
        if( value == _users )
            return;
        _users = value;
        Q_EMIT usersChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const MessageAction & another) {
        _address = another.address();
        Q_EMIT addressChanged();
        _userId = another.userId();
        Q_EMIT userIdChanged();
        *_photo = another.photo();
        Q_EMIT photoChanged();
        _title = another.title();
        Q_EMIT titleChanged();
        _users = another.users();
        Q_EMIT usersChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void addressChanged();
    void userIdChanged();
    void photoChanged();
    void titleChanged();
    void usersChanged();
    void classTypeChanged();

private:
    QString _address;
    qint32 _userId;
    PhotoObject* _photo;
    QString _title;
    QList<qint32> _users;
    quint32 _classType;

};

Q_DECLARE_METATYPE(MessageActionObject*)

class TELEGRAMQMLSHARED_EXPORT ChatPhotoObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(FileLocationObject* photoBig READ photoBig WRITE setPhotoBig NOTIFY photoBigChanged)
    Q_PROPERTY(FileLocationObject* photoSmall READ photoSmall WRITE setPhotoSmall NOTIFY photoSmallChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    ChatPhotoObject(const ChatPhoto & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _photoBig = new FileLocationObject(another.photoBig(), this);
        _photoSmall = new FileLocationObject(another.photoSmall(), this);
        _classType = another.classType();

    }
    ChatPhotoObject(QObject *parent = 0) :
        TqObject(parent),
        _photoBig(0),
        _photoSmall(0){}
    ~ChatPhotoObject(){}

    FileLocationObject* photoBig() const {
        return _photoBig;
    }

    void setPhotoBig(FileLocationObject* value) {
        if( value == _photoBig )
            return;
        _photoBig = value;
        Q_EMIT photoBigChanged();
        Q_EMIT changed();
    }

    FileLocationObject* photoSmall() const {
        return _photoSmall;
    }

    void setPhotoSmall(FileLocationObject* value) {
        if( value == _photoSmall )
            return;
        _photoSmall = value;
        Q_EMIT photoSmallChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const ChatPhoto & another) {
        *_photoBig = another.photoBig();
        Q_EMIT photoBigChanged();
        *_photoSmall = another.photoSmall();
        Q_EMIT photoSmallChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void photoBigChanged();
    void photoSmallChanged();
    void classTypeChanged();

private:
    FileLocationObject* _photoBig;
    FileLocationObject* _photoSmall;
    quint32 _classType;

};

Q_DECLARE_METATYPE(ChatPhotoObject*)

class TELEGRAMQMLSHARED_EXPORT ChatFullObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(ChatParticipantsObject* participants READ participants WRITE setParticipants NOTIFY participantsChanged)
    Q_PROPERTY(PhotoObject* chatPhoto READ chatPhoto WRITE setChatPhoto NOTIFY chatPhotoChanged)
    Q_PROPERTY(qint32 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(PeerNotifySettingsObject* notifySettings READ notifySettings WRITE setNotifySettings NOTIFY notifySettingsChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    ChatFullObject(const ChatFull & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _participants = new ChatParticipantsObject(another.participants(), this);
        _chatPhoto = new PhotoObject(another.chatPhoto(), this);
        _id = another.id();
        _notifySettings = new PeerNotifySettingsObject(another.notifySettings(), this);
        _classType = another.classType();

    }
    ChatFullObject(QObject *parent = 0) :
        TqObject(parent),
        _participants(0),
        _chatPhoto(0),
        _notifySettings(0){}
    ~ChatFullObject(){}

    ChatParticipantsObject* participants() const {
        return _participants;
    }

    void setParticipants(ChatParticipantsObject* value) {
        if( value == _participants )
            return;
        _participants = value;
        Q_EMIT participantsChanged();
        Q_EMIT changed();
    }

    PhotoObject* chatPhoto() const {
        return _chatPhoto;
    }

    void setChatPhoto(PhotoObject* value) {
        if( value == _chatPhoto )
            return;
        _chatPhoto = value;
        Q_EMIT chatPhotoChanged();
        Q_EMIT changed();
    }

    qint32 id() const {
        return _id;
    }

    void setId(qint32 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    PeerNotifySettingsObject* notifySettings() const {
        return _notifySettings;
    }

    void setNotifySettings(PeerNotifySettingsObject* value) {
        if( value == _notifySettings )
            return;
        _notifySettings = value;
        Q_EMIT notifySettingsChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const ChatFull & another) {
        *_participants = another.participants();
        Q_EMIT participantsChanged();
        *_chatPhoto = another.chatPhoto();
        Q_EMIT chatPhotoChanged();
        _id = another.id();
        Q_EMIT idChanged();
        *_notifySettings = another.notifySettings();
        Q_EMIT notifySettingsChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void participantsChanged();
    void chatPhotoChanged();
    void idChanged();
    void notifySettingsChanged();
    void classTypeChanged();

private:
    ChatParticipantsObject* _participants;
    PhotoObject* _chatPhoto;
    qint32 _id;
    PeerNotifySettingsObject* _notifySettings;
    quint32 _classType;

};

Q_DECLARE_METATYPE(ChatFullObject*)

class TELEGRAMQMLSHARED_EXPORT UserProfilePhotoObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint64 photoId READ photoId WRITE setPhotoId NOTIFY photoIdChanged)
    Q_PROPERTY(FileLocationObject* photoBig READ photoBig WRITE setPhotoBig NOTIFY photoBigChanged)
    Q_PROPERTY(FileLocationObject* photoSmall READ photoSmall WRITE setPhotoSmall NOTIFY photoSmallChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    UserProfilePhotoObject(const UserProfilePhoto & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _photoId = another.photoId();
        _photoBig = new FileLocationObject(another.photoBig(), this);
        _photoSmall = new FileLocationObject(another.photoSmall(), this);
        _classType = another.classType();

    }
    UserProfilePhotoObject(QObject *parent = 0) :
        TqObject(parent),
        _photoBig(0),
        _photoSmall(0){}
    ~UserProfilePhotoObject(){}

    qint64 photoId() const {
        return _photoId;
    }

    void setPhotoId(qint64 value) {
        if( value == _photoId )
            return;
        _photoId = value;
        Q_EMIT photoIdChanged();
        Q_EMIT changed();
    }

    FileLocationObject* photoBig() const {
        return _photoBig;
    }

    void setPhotoBig(FileLocationObject* value) {
        if( value == _photoBig )
            return;
        _photoBig = value;
        Q_EMIT photoBigChanged();
        Q_EMIT changed();
    }

    FileLocationObject* photoSmall() const {
        return _photoSmall;
    }

    void setPhotoSmall(FileLocationObject* value) {
        if( value == _photoSmall )
            return;
        _photoSmall = value;
        Q_EMIT photoSmallChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const UserProfilePhoto & another) {
        _photoId = another.photoId();
        Q_EMIT photoIdChanged();
        *_photoBig = another.photoBig();
        Q_EMIT photoBigChanged();
        *_photoSmall = another.photoSmall();
        Q_EMIT photoSmallChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void photoIdChanged();
    void photoBigChanged();
    void photoSmallChanged();
    void classTypeChanged();

private:
    qint64 _photoId;
    FileLocationObject* _photoBig;
    FileLocationObject* _photoSmall;
    quint32 _classType;

};

Q_DECLARE_METATYPE(UserProfilePhotoObject*)

class TELEGRAMQMLSHARED_EXPORT ChatObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 participantsCount READ participantsCount WRITE setParticipantsCount NOTIFY participantsCountChanged)
    Q_PROPERTY(qint32 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(qint32 version READ version WRITE setVersion NOTIFY versionChanged)
    Q_PROPERTY(QString venue READ venue WRITE setVenue NOTIFY venueChanged)
    Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
    Q_PROPERTY(QString address READ address WRITE setAddress NOTIFY addressChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(ChatPhotoObject* photo READ photo WRITE setPhoto NOTIFY photoChanged)
    Q_PROPERTY(GeoPointObject* geo READ geo WRITE setGeo NOTIFY geoChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(bool checkedIn READ checkedIn WRITE setCheckedIn NOTIFY checkedInChanged)
    Q_PROPERTY(bool left READ left WRITE setLeft NOTIFY leftChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    ChatObject(const Chat & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _participantsCount = another.participantsCount();
        _id = another.id();
        _version = another.version();
        _venue = another.venue();
        _title = another.title();
        _address = another.address();
        _date = another.date();
        _photo = new ChatPhotoObject(another.photo(), this);
        _geo = new GeoPointObject(another.geo(), this);
        _accessHash = another.accessHash();
        _checkedIn = another.checkedIn();
        _left = another.left();
        _classType = another.classType();

    }
    ChatObject(QObject *parent = 0) :
        TqObject(parent),
        _photo(0),
        _geo(0){}
    ~ChatObject(){}

    qint32 participantsCount() const {
        return _participantsCount;
    }

    void setParticipantsCount(qint32 value) {
        if( value == _participantsCount )
            return;
        _participantsCount = value;
        Q_EMIT participantsCountChanged();
        Q_EMIT changed();
    }

    qint32 id() const {
        return _id;
    }

    void setId(qint32 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    qint32 version() const {
        return _version;
    }

    void setVersion(qint32 value) {
        if( value == _version )
            return;
        _version = value;
        Q_EMIT versionChanged();
        Q_EMIT changed();
    }

    QString venue() const {
        return _venue;
    }

    void setVenue(QString value) {
        if( value == _venue )
            return;
        _venue = value;
        Q_EMIT venueChanged();
        Q_EMIT changed();
    }

    QString title() const {
        return _title;
    }

    void setTitle(QString value) {
        if( value == _title )
            return;
        _title = value;
        Q_EMIT titleChanged();
        Q_EMIT changed();
    }

    QString address() const {
        return _address;
    }

    void setAddress(QString value) {
        if( value == _address )
            return;
        _address = value;
        Q_EMIT addressChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    ChatPhotoObject* photo() const {
        return _photo;
    }

    void setPhoto(ChatPhotoObject* value) {
        if( value == _photo )
            return;
        _photo = value;
        Q_EMIT photoChanged();
        Q_EMIT changed();
    }

    GeoPointObject* geo() const {
        return _geo;
    }

    void setGeo(GeoPointObject* value) {
        if( value == _geo )
            return;
        _geo = value;
        Q_EMIT geoChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    bool checkedIn() const {
        return _checkedIn;
    }

    void setCheckedIn(bool value) {
        if( value == _checkedIn )
            return;
        _checkedIn = value;
        Q_EMIT checkedInChanged();
        Q_EMIT changed();
    }

    bool left() const {
        return _left;
    }

    void setLeft(bool value) {
        if( value == _left )
            return;
        _left = value;
        Q_EMIT leftChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const Chat & another) {
        _participantsCount = another.participantsCount();
        Q_EMIT participantsCountChanged();
        _id = another.id();
        Q_EMIT idChanged();
        _version = another.version();
        Q_EMIT versionChanged();
        _venue = another.venue();
        Q_EMIT venueChanged();
        _title = another.title();
        Q_EMIT titleChanged();
        _address = another.address();
        Q_EMIT addressChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        *_photo = another.photo();
        Q_EMIT photoChanged();
        *_geo = another.geo();
        Q_EMIT geoChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _checkedIn = another.checkedIn();
        Q_EMIT checkedInChanged();
        _left = another.left();
        Q_EMIT leftChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void participantsCountChanged();
    void idChanged();
    void versionChanged();
    void venueChanged();
    void titleChanged();
    void addressChanged();
    void dateChanged();
    void photoChanged();
    void geoChanged();
    void accessHashChanged();
    void checkedInChanged();
    void leftChanged();
    void classTypeChanged();

private:
    qint32 _participantsCount;
    qint32 _id;
    qint32 _version;
    QString _venue;
    QString _title;
    QString _address;
    qint32 _date;
    ChatPhotoObject* _photo;
    GeoPointObject* _geo;
    qint64 _accessHash;
    bool _checkedIn;
    bool _left;
    quint32 _classType;

};

Q_DECLARE_METATYPE(ChatObject*)

class TELEGRAMQMLSHARED_EXPORT DialogObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(PeerObject* peer READ peer WRITE setPeer NOTIFY peerChanged)
    Q_PROPERTY(PeerNotifySettingsObject* notifySettings READ notifySettings WRITE setNotifySettings NOTIFY notifySettingsChanged)
    Q_PROPERTY(qint32 topMessage READ topMessage WRITE setTopMessage NOTIFY topMessageChanged)
    Q_PROPERTY(qint32 unreadCount READ unreadCount WRITE setUnreadCount NOTIFY unreadCountChanged)
    Q_PROPERTY(bool encrypted READ encrypted WRITE setEncrypted NOTIFY encryptedChanged)
    Q_PROPERTY(QStringList typingUsers READ typingUsers WRITE setTypingUsers NOTIFY typingUsersChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    DialogObject(const Dialog & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _peer = new PeerObject(another.peer(), this);
        _notifySettings = new PeerNotifySettingsObject(another.notifySettings(), this);
        _topMessage = another.topMessage();
        _unreadCount = another.unreadCount();
        _encrypted = false;
        _classType = another.classType();

    }
    DialogObject(QObject *parent = 0) :
        TqObject(parent),
        _peer(0),
        _notifySettings(0){}
    ~DialogObject(){}

    PeerObject* peer() const {
        return _peer;
    }

    void setPeer(PeerObject* value) {
        if( value == _peer )
            return;
        _peer = value;
        Q_EMIT peerChanged();
        Q_EMIT changed();
    }

    PeerNotifySettingsObject* notifySettings() const {
        return _notifySettings;
    }

    void setNotifySettings(PeerNotifySettingsObject* value) {
        if( value == _notifySettings )
            return;
        _notifySettings = value;
        Q_EMIT notifySettingsChanged();
        Q_EMIT changed();
    }

    qint32 topMessage() const {
        return _topMessage;
    }

    void setTopMessage(qint32 value) {
        if( value == _topMessage )
            return;
        _topMessage = value;
        Q_EMIT topMessageChanged();
        Q_EMIT changed();
    }

    qint32 unreadCount() const {
        return _unreadCount;
    }

    void setUnreadCount(qint32 value) {
        if( value == _unreadCount )
            return;
        _unreadCount = value;
        Q_EMIT unreadCountChanged();
        Q_EMIT changed();
    }

    bool encrypted() const {
        return _encrypted;
    }

    void setEncrypted(bool value) {
        if( value == _encrypted )
            return;
        _encrypted = value;
        Q_EMIT encryptedChanged();
        Q_EMIT changed();
    }

    QStringList typingUsers() const {
        return _typingUsers;
    }

    void setTypingUsers(QStringList value) {
        if( value == _typingUsers )
            return;
        _typingUsers = value;
        Q_EMIT typingUsersChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const Dialog & another) {
        *_peer = another.peer();
        Q_EMIT peerChanged();
        *_notifySettings = another.notifySettings();
        Q_EMIT notifySettingsChanged();
        _topMessage = another.topMessage();
        Q_EMIT topMessageChanged();
        _unreadCount = another.unreadCount();
        Q_EMIT unreadCountChanged();
        _typingUsers.clear();
        Q_EMIT typingUsersChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void peerChanged();
    void notifySettingsChanged();
    void topMessageChanged();
    void unreadCountChanged();
    void encryptedChanged();
    void typingUsersChanged();
    void classTypeChanged();

private:
    PeerObject* _peer;
    PeerNotifySettingsObject* _notifySettings;
    qint32 _topMessage;
    qint32 _unreadCount;
    bool _encrypted;
    QStringList _typingUsers;
    quint32 _classType;

};

Q_DECLARE_METATYPE(DialogObject*)

class TELEGRAMQMLSHARED_EXPORT SendMessageActionObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    SendMessageActionObject(const SendMessageAction & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _classType = another.classType();

    }
    SendMessageActionObject(QObject *parent = 0) : TqObject(parent){}
    ~SendMessageActionObject(){}

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const SendMessageAction & another) {
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void classTypeChanged();

private:
    quint32 _classType;

};

Q_DECLARE_METATYPE(SendMessageActionObject*)

class TELEGRAMQMLSHARED_EXPORT DecryptedMessageActionObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 layer READ layer WRITE setLayer NOTIFY layerChanged)
    Q_PROPERTY(QList<qint64> randomIds READ randomIds WRITE setRandomIds NOTIFY randomIdsChanged)
    Q_PROPERTY(qint32 ttlSeconds READ ttlSeconds WRITE setTtlSeconds NOTIFY ttlSecondsChanged)
    Q_PROPERTY(qint32 startSeqNo READ startSeqNo WRITE setStartSeqNo NOTIFY startSeqNoChanged)
    Q_PROPERTY(qint32 endSeqNo READ endSeqNo WRITE setEndSeqNo NOTIFY endSeqNoChanged)
    Q_PROPERTY(SendMessageActionObject* action READ action WRITE setAction NOTIFY actionChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    DecryptedMessageActionObject(const DecryptedMessageAction & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _layer = another.layer();
        _randomIds = another.randomIds();
        _ttlSeconds = another.ttlSeconds();
        _startSeqNo = another.startSeqNo();
        _endSeqNo = another.endSeqNo();
        _action = new SendMessageActionObject(another.action(), this);
        _classType = another.classType();

    }
    DecryptedMessageActionObject(QObject *parent = 0) :
        TqObject(parent),
        _action(0){}
    ~DecryptedMessageActionObject(){}

    qint32 layer() const {
        return _layer;
    }

    void setLayer(qint32 value) {
        if( value == _layer )
            return;
        _layer = value;
        Q_EMIT layerChanged();
        Q_EMIT changed();
    }

    QList<qint64> randomIds() const {
        return _randomIds;
    }

    void setRandomIds(QList<qint64> value) {
        if( value == _randomIds )
            return;
        _randomIds = value;
        Q_EMIT randomIdsChanged();
        Q_EMIT changed();
    }

    qint32 ttlSeconds() const {
        return _ttlSeconds;
    }

    void setTtlSeconds(qint32 value) {
        if( value == _ttlSeconds )
            return;
        _ttlSeconds = value;
        Q_EMIT ttlSecondsChanged();
        Q_EMIT changed();
    }

    qint32 startSeqNo() const {
        return _startSeqNo;
    }

    void setStartSeqNo(qint32 value) {
        if( value == _startSeqNo )
            return;
        _startSeqNo = value;
        Q_EMIT startSeqNoChanged();
        Q_EMIT changed();
    }

    qint32 endSeqNo() const {
        return _endSeqNo;
    }

    void setEndSeqNo(qint32 value) {
        if( value == _endSeqNo )
            return;
        _endSeqNo = value;
        Q_EMIT endSeqNoChanged();
        Q_EMIT changed();
    }

    SendMessageActionObject* action() const {
        return _action;
    }

    void setAction(SendMessageActionObject* value) {
        if( value == _action )
            return;
        _action = value;
        Q_EMIT actionChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const DecryptedMessageAction & another) {
        _layer = another.layer();
        Q_EMIT layerChanged();
        _randomIds = another.randomIds();
        Q_EMIT randomIdsChanged();
        _ttlSeconds = another.ttlSeconds();
        Q_EMIT ttlSecondsChanged();
        _startSeqNo = another.startSeqNo();
        Q_EMIT startSeqNoChanged();
        _endSeqNo = another.endSeqNo();
        Q_EMIT endSeqNoChanged();
        *_action = another.action();
        Q_EMIT actionChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void layerChanged();
    void randomIdsChanged();
    void ttlSecondsChanged();
    void startSeqNoChanged();
    void endSeqNoChanged();
    void actionChanged();
    void classTypeChanged();

private:
    qint32 _layer;
    QList<qint64> _randomIds;
    qint32 _ttlSeconds;
    qint32 _startSeqNo;
    qint32 _endSeqNo;
    SendMessageActionObject* _action;
    quint32 _classType;

};

Q_DECLARE_METATYPE(DecryptedMessageActionObject*)

class TELEGRAMQMLSHARED_EXPORT DecryptedMessageMediaObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(QByteArray thumb READ thumb WRITE setThumb NOTIFY thumbChanged)
    Q_PROPERTY(qint32 thumbW READ thumbW WRITE setThumbW NOTIFY thumbWChanged)
    Q_PROPERTY(qint32 thumbH READ thumbH WRITE setThumbH NOTIFY thumbHChanged)
    Q_PROPERTY(qint32 duration READ duration WRITE setDuration NOTIFY durationChanged)
    Q_PROPERTY(qint32 w READ w WRITE setW NOTIFY wChanged)
    Q_PROPERTY(qint32 h READ h WRITE setH NOTIFY hChanged)
    Q_PROPERTY(qint32 size READ size WRITE setSize NOTIFY sizeChanged)
    Q_PROPERTY(double latitude READ latitude WRITE setLatitude NOTIFY latitudeChanged)
    Q_PROPERTY(double longitude READ longitude WRITE setLongitude NOTIFY longitudeChanged)
    Q_PROPERTY(QByteArray key READ key WRITE setKey NOTIFY keyChanged)
    Q_PROPERTY(QByteArray iv READ iv WRITE setIv NOTIFY ivChanged)
    Q_PROPERTY(QString phoneNumber READ phoneNumber WRITE setPhoneNumber NOTIFY phoneNumberChanged)
    Q_PROPERTY(QString firstName READ firstName WRITE setFirstName NOTIFY firstNameChanged)
    Q_PROPERTY(QString lastName READ lastName WRITE setLastName NOTIFY lastNameChanged)
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged)
    Q_PROPERTY(QString mimeType READ mimeType WRITE setMimeType NOTIFY mimeTypeChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    DecryptedMessageMediaObject(const DecryptedMessageMedia & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _thumb = another.thumb();
        _thumbW = another.thumbW();
        _thumbH = another.thumbH();
        _duration = another.duration();
        _w = another.w();
        _h = another.h();
        _size = another.size();
        _latitude = another.latitude();
        _longitude = another.longitude();
        _key = another.key();
        _iv = another.iv();
        _phoneNumber = another.phoneNumber();
        _firstName = another.firstName();
        _lastName = another.lastName();
        _userId = another.userId();
        _fileName = another.fileName();
        _mimeType = another.mimeType();
        _classType = another.classType();

    }
    DecryptedMessageMediaObject(QObject *parent = 0) : TqObject(parent){}
    ~DecryptedMessageMediaObject(){}

    QByteArray thumb() const {
        return _thumb;
    }

    void setThumb(QByteArray value) {
        if( value == _thumb )
            return;
        _thumb = value;
        Q_EMIT thumbChanged();
        Q_EMIT changed();
    }

    qint32 thumbW() const {
        return _thumbW;
    }

    void setThumbW(qint32 value) {
        if( value == _thumbW )
            return;
        _thumbW = value;
        Q_EMIT thumbWChanged();
        Q_EMIT changed();
    }

    qint32 thumbH() const {
        return _thumbH;
    }

    void setThumbH(qint32 value) {
        if( value == _thumbH )
            return;
        _thumbH = value;
        Q_EMIT thumbHChanged();
        Q_EMIT changed();
    }

    qint32 duration() const {
        return _duration;
    }

    void setDuration(qint32 value) {
        if( value == _duration )
            return;
        _duration = value;
        Q_EMIT durationChanged();
        Q_EMIT changed();
    }

    qint32 w() const {
        return _w;
    }

    void setW(qint32 value) {
        if( value == _w )
            return;
        _w = value;
        Q_EMIT wChanged();
        Q_EMIT changed();
    }

    qint32 h() const {
        return _h;
    }

    void setH(qint32 value) {
        if( value == _h )
            return;
        _h = value;
        Q_EMIT hChanged();
        Q_EMIT changed();
    }

    qint32 size() const {
        return _size;
    }

    void setSize(qint32 value) {
        if( value == _size )
            return;
        _size = value;
        Q_EMIT sizeChanged();
        Q_EMIT changed();
    }

    double latitude() const {
        return _latitude;
    }

    void setLatitude(double value) {
        if( value == _latitude )
            return;
        _latitude = value;
        Q_EMIT latitudeChanged();
        Q_EMIT changed();
    }

    double longitude() const {
        return _longitude;
    }

    void setLongitude(double value) {
        if( value == _longitude )
            return;
        _longitude = value;
        Q_EMIT longitudeChanged();
        Q_EMIT changed();
    }

    QByteArray key() const {
        return _key;
    }

    void setKey(QByteArray value) {
        if( value == _key )
            return;
        _key = value;
        Q_EMIT keyChanged();
        Q_EMIT changed();
    }

    QByteArray iv() const {
        return _iv;
    }

    void setIv(QByteArray value) {
        if( value == _iv )
            return;
        _iv = value;
        Q_EMIT ivChanged();
        Q_EMIT changed();
    }

    QString phoneNumber() const {
        return _phoneNumber;
    }

    void setPhoneNumber(QString value) {
        if( value == _phoneNumber )
            return;
        _phoneNumber = value;
        Q_EMIT phoneNumberChanged();
        Q_EMIT changed();
    }

    QString firstName() const {
        return _firstName;
    }

    void setFirstName(QString value) {
        if( value == _firstName )
            return;
        _firstName = value;
        Q_EMIT firstNameChanged();
        Q_EMIT changed();
    }

    QString lastName() const {
        return _lastName;
    }

    void setLastName(QString value) {
        if( value == _lastName )
            return;
        _lastName = value;
        Q_EMIT lastNameChanged();
        Q_EMIT changed();
    }

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    QString fileName() const {
        return _fileName;
    }

    void setFileName(QString value) {
        if( value == _fileName )
            return;
        _fileName = value;
        Q_EMIT fileNameChanged();
        Q_EMIT changed();
    }

    QString mimeType() const {
        return _mimeType;
    }

    void setMimeType(QString value) {
        if( value == _mimeType )
            return;
        _mimeType = value;
        Q_EMIT mimeTypeChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const DecryptedMessageMedia & another) {
        _thumb = another.thumb();
        Q_EMIT thumbChanged();
        _thumbW = another.thumbW();
        Q_EMIT thumbWChanged();
        _thumbH = another.thumbH();
        Q_EMIT thumbHChanged();
        _duration = another.duration();
        Q_EMIT durationChanged();
        _w = another.w();
        Q_EMIT wChanged();
        _h = another.h();
        Q_EMIT hChanged();
        _size = another.size();
        Q_EMIT sizeChanged();
        _latitude = another.latitude();
        Q_EMIT latitudeChanged();
        _longitude = another.longitude();
        Q_EMIT longitudeChanged();
        _key = another.key();
        Q_EMIT keyChanged();
        _iv = another.iv();
        Q_EMIT ivChanged();
        _phoneNumber = another.phoneNumber();
        Q_EMIT phoneNumberChanged();
        _firstName = another.firstName();
        Q_EMIT firstNameChanged();
        _lastName = another.lastName();
        Q_EMIT lastNameChanged();
        _userId = another.userId();
        Q_EMIT userIdChanged();
        _fileName = another.fileName();
        Q_EMIT fileNameChanged();
        _mimeType = another.mimeType();
        Q_EMIT mimeTypeChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void thumbChanged();
    void thumbWChanged();
    void thumbHChanged();
    void durationChanged();
    void wChanged();
    void hChanged();
    void sizeChanged();
    void latitudeChanged();
    void longitudeChanged();
    void keyChanged();
    void ivChanged();
    void phoneNumberChanged();
    void firstNameChanged();
    void lastNameChanged();
    void userIdChanged();
    void fileNameChanged();
    void mimeTypeChanged();
    void classTypeChanged();

private:
    QByteArray _thumb;
    qint32 _thumbW;
    qint32 _thumbH;
    qint32 _duration;
    qint32 _w;
    qint32 _h;
    qint32 _size;
    double _latitude;
    double _longitude;
    QByteArray _key;
    QByteArray _iv;
    QString _phoneNumber;
    QString _firstName;
    QString _lastName;
    qint32 _userId;
    QString _fileName;
    QString _mimeType;
    quint32 _classType;

};

Q_DECLARE_METATYPE(DecryptedMessageMediaObject*)

class TELEGRAMQMLSHARED_EXPORT DecryptedMessageObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint64 randomId READ randomId WRITE setRandomId NOTIFY randomIdChanged)
    Q_PROPERTY(qint32 ttl READ ttl WRITE setTtl NOTIFY ttlChanged)
    Q_PROPERTY(QByteArray randomBytes READ randomBytes WRITE setRandomBytes NOTIFY randomBytesChanged)
    Q_PROPERTY(QString message READ message WRITE setMessage NOTIFY messageChanged)
    Q_PROPERTY(DecryptedMessageMediaObject* media READ media WRITE setMedia NOTIFY mediaChanged)
    Q_PROPERTY(DecryptedMessageActionObject* action READ action WRITE setAction NOTIFY actionChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    DecryptedMessageObject(const DecryptedMessage & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _randomId = another.randomId();
        _ttl = another.ttl();
        _randomBytes = another.randomBytes();
        _message = another.message();
        _media = new DecryptedMessageMediaObject(another.media(), this);
        _action = new DecryptedMessageActionObject(another.action(), this);
        _classType = another.classType();

    }
    DecryptedMessageObject(QObject *parent = 0) :
        TqObject(parent),
        _media(0),
        _action(0){}
    ~DecryptedMessageObject(){}

    qint64 randomId() const {
        return _randomId;
    }

    void setRandomId(qint64 value) {
        if( value == _randomId )
            return;
        _randomId = value;
        Q_EMIT randomIdChanged();
        Q_EMIT changed();
    }

    qint32 ttl() const {
        return _ttl;
    }

    void setTtl(qint32 value) {
        if( value == _ttl )
            return;
        _ttl = value;
        Q_EMIT ttlChanged();
        Q_EMIT changed();
    }

    QByteArray randomBytes() const {
        return _randomBytes;
    }

    void setRandomBytes(QByteArray value) {
        if( value == _randomBytes )
            return;
        _randomBytes = value;
        Q_EMIT randomBytesChanged();
        Q_EMIT changed();
    }

    QString message() const {
        return _message;
    }

    void setMessage(QString value) {
        if( value == _message )
            return;
        _message = value;
        Q_EMIT messageChanged();
        Q_EMIT changed();
    }

    DecryptedMessageMediaObject* media() const {
        return _media;
    }

    void setMedia(DecryptedMessageMediaObject* value) {
        if( value == _media )
            return;
        _media = value;
        Q_EMIT mediaChanged();
        Q_EMIT changed();
    }

    DecryptedMessageActionObject* action() const {
        return _action;
    }

    void setAction(DecryptedMessageActionObject* value) {
        if( value == _action )
            return;
        _action = value;
        Q_EMIT actionChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const DecryptedMessage & another) {
        _randomId = another.randomId();
        Q_EMIT randomIdChanged();
        _ttl = another.ttl();
        Q_EMIT ttlChanged();
        _randomBytes = another.randomBytes();
        Q_EMIT randomBytesChanged();
        _message = another.message();
        Q_EMIT messageChanged();
        *_media = another.media();
        Q_EMIT mediaChanged();
        *_action = another.action();
        Q_EMIT actionChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void randomIdChanged();
    void ttlChanged();
    void randomBytesChanged();
    void messageChanged();
    void mediaChanged();
    void actionChanged();
    void classTypeChanged();

private:
    qint64 _randomId;
    qint32 _ttl;
    QByteArray _randomBytes;
    QString _message;
    DecryptedMessageMediaObject* _media;
    DecryptedMessageActionObject* _action;
    quint32 _classType;

};

Q_DECLARE_METATYPE(DecryptedMessageObject*)

class TELEGRAMQMLSHARED_EXPORT MessageMediaObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(AudioObject* audio READ audio WRITE setAudio NOTIFY audioChanged)
    Q_PROPERTY(QString lastName READ lastName WRITE setLastName NOTIFY lastNameChanged)
    Q_PROPERTY(QString firstName READ firstName WRITE setFirstName NOTIFY firstNameChanged)
    Q_PROPERTY(QString caption READ caption WRITE setCaption NOTIFY captionChanged)
    Q_PROPERTY(DocumentObject* document READ document WRITE setDocument NOTIFY documentChanged)
    Q_PROPERTY(GeoPointObject* geo READ geo WRITE setGeo NOTIFY geoChanged)
    Q_PROPERTY(PhotoObject* photo READ photo WRITE setPhoto NOTIFY photoChanged)
    Q_PROPERTY(QString phoneNumber READ phoneNumber WRITE setPhoneNumber NOTIFY phoneNumberChanged)
    Q_PROPERTY(qint32 userId READ userId WRITE setUserId NOTIFY userIdChanged)
    Q_PROPERTY(VideoObject* video READ video WRITE setVideo NOTIFY videoChanged)
    Q_PROPERTY(QByteArray encryptKey READ encryptKey WRITE setEncryptKey NOTIFY encryptKeyChanged)
    Q_PROPERTY(QByteArray encryptIv READ encryptIv WRITE setEncryptIv NOTIFY encryptIvChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    MessageMediaObject(const MessageMedia & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _audio = new AudioObject(another.audio(), this);
        _lastName = another.lastName();
        _firstName = another.firstName();
        _caption = another.caption();
        _document = new DocumentObject(another.document(), this);
        _geo = new GeoPointObject(another.geo(), this);
        _photo = new PhotoObject(another.photo(), this);
        _phoneNumber = another.phoneNumber();
        _userId = another.userId();
        _video = new VideoObject(another.video(), this);
        _encryptKey = QByteArray();
        _encryptIv = QByteArray();
        _classType = another.classType();

    }
    MessageMediaObject(QObject *parent = 0) :
        TqObject(parent),
        _audio(0),
        _document(0),
        _geo(0),
        _photo(0),
        _video(0){}
    ~MessageMediaObject(){}

    AudioObject* audio() const {
        return _audio;
    }

    void setAudio(AudioObject* value) {
        if( value == _audio )
            return;
        _audio = value;
        Q_EMIT audioChanged();
        Q_EMIT changed();
    }

    QString lastName() const {
        return _lastName;
    }

    void setLastName(QString value) {
        if( value == _lastName )
            return;
        _lastName = value;
        Q_EMIT lastNameChanged();
        Q_EMIT changed();
    }

    QString firstName() const {
        return _firstName;
    }

    void setFirstName(QString value) {
        if( value == _firstName )
            return;
        _firstName = value;
        Q_EMIT firstNameChanged();
        Q_EMIT changed();
    }

    QString caption() const {
        return _caption;
    }

    void setCaption(QString value) {
        if( value == _caption )
            return;
        _caption = value;
        Q_EMIT captionChanged();
        Q_EMIT changed();
    }

    DocumentObject* document() const {
        return _document;
    }

    void setDocument(DocumentObject* value) {
        if( value == _document )
            return;
        _document = value;
        Q_EMIT documentChanged();
        Q_EMIT changed();
    }

    GeoPointObject* geo() const {
        return _geo;
    }

    void setGeo(GeoPointObject* value) {
        if( value == _geo )
            return;
        _geo = value;
        Q_EMIT geoChanged();
        Q_EMIT changed();
    }

    PhotoObject* photo() const {
        return _photo;
    }

    void setPhoto(PhotoObject* value) {
        if( value == _photo )
            return;
        _photo = value;
        Q_EMIT photoChanged();
        Q_EMIT changed();
    }

    QString phoneNumber() const {
        return _phoneNumber;
    }

    void setPhoneNumber(QString value) {
        if( value == _phoneNumber )
            return;
        _phoneNumber = value;
        Q_EMIT phoneNumberChanged();
        Q_EMIT changed();
    }

    qint32 userId() const {
        return _userId;
    }

    void setUserId(qint32 value) {
        if( value == _userId )
            return;
        _userId = value;
        Q_EMIT userIdChanged();
        Q_EMIT changed();
    }

    VideoObject* video() const {
        return _video;
    }

    void setVideo(VideoObject* value) {
        if( value == _video )
            return;
        _video = value;
        Q_EMIT videoChanged();
        Q_EMIT changed();
    }

    QByteArray encryptKey() const {
        return _encryptKey;
    }

    void setEncryptKey(QByteArray value) {
        if( value == _encryptKey )
            return;
        _encryptKey = value;
        Q_EMIT encryptKeyChanged();
        Q_EMIT changed();
    }

    QByteArray encryptIv() const {
        return _encryptIv;
    }

    void setEncryptIv(QByteArray value) {
        if( value == _encryptIv )
            return;
        _encryptIv = value;
        Q_EMIT encryptIvChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const MessageMedia & another) {
        *_audio = another.audio();
        Q_EMIT audioChanged();
        _lastName = another.lastName();
        Q_EMIT lastNameChanged();
        _firstName = another.firstName();
        Q_EMIT firstNameChanged();
        _caption = another.caption();
        Q_EMIT captionChanged();
        *_document = another.document();
        Q_EMIT documentChanged();
        *_geo = another.geo();
        Q_EMIT geoChanged();
        *_photo = another.photo();
        Q_EMIT photoChanged();
        _phoneNumber = another.phoneNumber();
        Q_EMIT phoneNumberChanged();
        _userId = another.userId();
        Q_EMIT userIdChanged();
        *_video = another.video();
        Q_EMIT videoChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void audioChanged();
    void lastNameChanged();
    void bytesChanged();
    void firstNameChanged();
    void captionChanged();
    void documentChanged();
    void geoChanged();
    void photoChanged();
    void phoneNumberChanged();
    void userIdChanged();
    void videoChanged();
    void encryptKeyChanged();
    void encryptIvChanged();
    void classTypeChanged();

private:
    AudioObject* _audio;
    QString _lastName;
    QString _firstName;
    QString _caption;
    DocumentObject* _document;
    GeoPointObject* _geo;
    PhotoObject* _photo;
    QString _phoneNumber;
    qint32 _userId;
    VideoObject* _video;
    QByteArray _encryptKey;
    QByteArray _encryptIv;
    quint32 _classType;

};

Q_DECLARE_METATYPE(MessageMediaObject*)

class TELEGRAMQMLSHARED_EXPORT MessageObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(bool sent READ sent WRITE setSent NOTIFY sentChanged)
    Q_PROPERTY(bool encrypted READ encrypted WRITE setEncrypted NOTIFY encryptedChanged)
    Q_PROPERTY(UploadObject* upload READ upload WRITE setUpload NOTIFY uploadChanged)
    Q_PROPERTY(PeerObject* toId READ toId WRITE setToId NOTIFY toIdChanged)
    Q_PROPERTY(bool unread READ unread WRITE setUnread NOTIFY unreadChanged)
    Q_PROPERTY(MessageActionObject* action READ action WRITE setAction NOTIFY actionChanged)
    Q_PROPERTY(qint32 fromId READ fromId WRITE setFromId NOTIFY fromIdChanged)
    Q_PROPERTY(bool out READ out WRITE setOut NOTIFY outChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(MessageMediaObject* media READ media WRITE setMedia NOTIFY mediaChanged)
    Q_PROPERTY(qint32 fwdDate READ fwdDate WRITE setFwdDate NOTIFY fwdDateChanged)
    Q_PROPERTY(qint32 fwdFromId READ fwdFromId WRITE setFwdFromId NOTIFY fwdFromIdChanged)
    Q_PROPERTY(qint32 replyToMsgId READ replyToMsgId WRITE setReplyToMsgId NOTIFY replyToMsgIdChanged)
    Q_PROPERTY(QString message READ message WRITE setMessage NOTIFY messageChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    MessageObject(const Message & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _id = another.id();
        _sent = true;
        _encrypted = false;
        _upload = new UploadObject(this);
        _toId = new PeerObject(another.toId(), this);
        _unread = (another.flags() & 0x1);
        _action = new MessageActionObject(another.action(), this);
        _fromId = another.fromId();
        _out = (another.flags() & 0x2);
        _date = another.date();
        _media = new MessageMediaObject(another.media(), this);
        _fwdDate = another.fwdDate();
        _fwdFromId = another.fwdFromId();
        _replyToMsgId = another.replyToMsgId();
        _message = another.message();
        _classType = another.classType();

    }
    MessageObject(QObject *parent = 0) :
        TqObject(parent),
        _upload(0),
        _toId(0),
        _action(0),
        _media(0){}
    ~MessageObject(){}

    qint32 id() const {
        return _id;
    }

    void setId(qint32 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    bool sent() const {
        return _sent;
    }

    void setSent(bool value) {
        if( value == _sent )
            return;
        _sent = value;
        Q_EMIT sentChanged();
        Q_EMIT changed();
    }

    bool encrypted() const {
        return _encrypted;
    }

    void setEncrypted(bool value) {
        if( value == _encrypted )
            return;
        _encrypted = value;
        Q_EMIT encryptedChanged();
        Q_EMIT changed();
    }

    UploadObject* upload() const {
        return _upload;
    }

    void setUpload(UploadObject* value) {
        if( value == _upload )
            return;
        _upload = value;
        Q_EMIT uploadChanged();
        Q_EMIT changed();
    }

    PeerObject* toId() const {
        return _toId;
    }

    void setToId(PeerObject* value) {
        if( value == _toId )
            return;
        _toId = value;
        Q_EMIT toIdChanged();
        Q_EMIT changed();
    }

    bool unread() const {
        return _unread;
    }

    void setUnread(bool value) {
        if( value == _unread )
            return;
        _unread = value;
        Q_EMIT unreadChanged();
        Q_EMIT changed();
    }

    MessageActionObject* action() const {
        return _action;
    }

    void setAction(MessageActionObject* value) {
        if( value == _action )
            return;
        _action = value;
        Q_EMIT actionChanged();
        Q_EMIT changed();
    }

    qint32 fromId() const {
        return _fromId;
    }

    void setFromId(qint32 value) {
        if( value == _fromId )
            return;
        _fromId = value;
        Q_EMIT fromIdChanged();
        Q_EMIT changed();
    }

    bool out() const {
        return _out;
    }

    void setOut(bool value) {
        if( value == _out )
            return;
        _out = value;
        Q_EMIT outChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    MessageMediaObject* media() const {
        return _media;
    }

    void setMedia(MessageMediaObject* value) {
        if( value == _media )
            return;
        _media = value;
        Q_EMIT mediaChanged();
        Q_EMIT changed();
    }

    qint32 fwdDate() const {
        return _fwdDate;
    }

    void setFwdDate(qint32 value) {
        if( value == _fwdDate )
            return;
        _fwdDate = value;
        Q_EMIT fwdDateChanged();
        Q_EMIT changed();
    }

    qint32 fwdFromId() const {
        return _fwdFromId;
    }

    void setFwdFromId(qint32 value) {
        if( value == _fwdFromId )
            return;
        _fwdFromId = value;
        Q_EMIT fwdFromIdChanged();
        Q_EMIT changed();
    }

    qint32 replyToMsgId() const {
        return _replyToMsgId;
    }

    void setReplyToMsgId(qint32 replyToMsgId) {
        if( replyToMsgId == _replyToMsgId )
            return;
        _replyToMsgId = replyToMsgId;
        Q_EMIT replyToMsgIdChanged();
        Q_EMIT changed();
    }

    QString message() const {
        return _message;
    }

    void setMessage(QString value) {
        if( value == _message )
            return;
        _message = value;
        Q_EMIT messageChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const Message & another) {
        _id = another.id();
        Q_EMIT idChanged();
        _sent = true;
        Q_EMIT sentChanged();
        *_toId = another.toId();
        Q_EMIT toIdChanged();
        _unread = (another.flags() & 0x1);
        Q_EMIT unreadChanged();
        *_action = another.action();
        Q_EMIT actionChanged();
        _fromId = another.fromId();
        Q_EMIT fromIdChanged();
        _out = (another.flags() & 0x2);
        Q_EMIT outChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        *_media = another.media();
        Q_EMIT mediaChanged();
        _fwdDate = another.fwdDate();
        Q_EMIT fwdDateChanged();
        _fwdFromId = another.fwdFromId();
        Q_EMIT fwdFromIdChanged();
        _replyToMsgId = another.replyToMsgId();
        Q_EMIT replyToMsgIdChanged();
        _message = another.message();
        Q_EMIT messageChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void idChanged();
    void sentChanged();
    void encryptedChanged();
    void uploadChanged();
    void toIdChanged();
    void unreadChanged();
    void actionChanged();
    void fromIdChanged();
    void outChanged();
    void dateChanged();
    void mediaChanged();
    void fwdDateChanged();
    void fwdFromIdChanged();
    void replyToMsgIdChanged();
    void messageChanged();
    void classTypeChanged();

private:
    qint32 _id;
    bool _sent;
    bool _encrypted;
    UploadObject* _upload;
    PeerObject* _toId;
    bool _unread;
    MessageActionObject* _action;
    qint32 _fromId;
    bool _out;
    qint32 _date;
    MessageMediaObject* _media;
    qint32 _fwdDate;
    qint32 _fwdFromId;
    qint32 _replyToMsgId;
    QString _message;
    quint32 _classType;

};

Q_DECLARE_METATYPE(MessageObject*)

class TELEGRAMQMLSHARED_EXPORT GeoChatMessageObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(MessageActionObject* action READ action WRITE setAction NOTIFY actionChanged)
    Q_PROPERTY(qint32 fromId READ fromId WRITE setFromId NOTIFY fromIdChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(MessageMediaObject* media READ media WRITE setMedia NOTIFY mediaChanged)
    Q_PROPERTY(qint32 chatId READ chatId WRITE setChatId NOTIFY chatIdChanged)
    Q_PROPERTY(QString message READ message WRITE setMessage NOTIFY messageChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    GeoChatMessageObject(const GeoChatMessage & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _id = another.id();
        _action = new MessageActionObject(another.action(), this);
        _fromId = another.fromId();
        _date = another.date();
        _media = new MessageMediaObject(another.media(), this);
        _chatId = another.chatId();
        _message = another.message();
        _classType = another.classType();

    }
    GeoChatMessageObject(QObject *parent = 0) :
        TqObject(parent),
        _action(0),
        _media(0){}
    ~GeoChatMessageObject(){}

    qint32 id() const {
        return _id;
    }

    void setId(qint32 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    MessageActionObject* action() const {
        return _action;
    }

    void setAction(MessageActionObject* value) {
        if( value == _action )
            return;
        _action = value;
        Q_EMIT actionChanged();
        Q_EMIT changed();
    }

    qint32 fromId() const {
        return _fromId;
    }

    void setFromId(qint32 value) {
        if( value == _fromId )
            return;
        _fromId = value;
        Q_EMIT fromIdChanged();
        Q_EMIT changed();
    }

    qint32 date() const {
        return _date;
    }

    void setDate(qint32 value) {
        if( value == _date )
            return;
        _date = value;
        Q_EMIT dateChanged();
        Q_EMIT changed();
    }

    MessageMediaObject* media() const {
        return _media;
    }

    void setMedia(MessageMediaObject* value) {
        if( value == _media )
            return;
        _media = value;
        Q_EMIT mediaChanged();
        Q_EMIT changed();
    }

    qint32 chatId() const {
        return _chatId;
    }

    void setChatId(qint32 value) {
        if( value == _chatId )
            return;
        _chatId = value;
        Q_EMIT chatIdChanged();
        Q_EMIT changed();
    }

    QString message() const {
        return _message;
    }

    void setMessage(QString value) {
        if( value == _message )
            return;
        _message = value;
        Q_EMIT messageChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const GeoChatMessage & another) {
        _id = another.id();
        Q_EMIT idChanged();
        *_action = another.action();
        Q_EMIT actionChanged();
        _fromId = another.fromId();
        Q_EMIT fromIdChanged();
        _date = another.date();
        Q_EMIT dateChanged();
        *_media = another.media();
        Q_EMIT mediaChanged();
        _chatId = another.chatId();
        Q_EMIT chatIdChanged();
        _message = another.message();
        Q_EMIT messageChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void idChanged();
    void actionChanged();
    void fromIdChanged();
    void dateChanged();
    void mediaChanged();
    void chatIdChanged();
    void messageChanged();
    void classTypeChanged();

private:
    qint32 _id;
    MessageActionObject* _action;
    qint32 _fromId;
    qint32 _date;
    MessageMediaObject* _media;
    qint32 _chatId;
    QString _message;
    quint32 _classType;

};

Q_DECLARE_METATYPE(GeoChatMessageObject*)

class TELEGRAMQMLSHARED_EXPORT UserObject : public TqObject
{
    Q_OBJECT
    Q_PROPERTY(qint32 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(QString phone READ phone WRITE setPhone NOTIFY phoneChanged)
    Q_PROPERTY(QString firstName READ firstName WRITE setFirstName NOTIFY firstNameChanged)
    Q_PROPERTY(UserProfilePhotoObject* photo READ photo WRITE setPhoto NOTIFY photoChanged)
    Q_PROPERTY(UserStatusObject* status READ status WRITE setStatus NOTIFY statusChanged)
    Q_PROPERTY(QString lastName READ lastName WRITE setLastName NOTIFY lastNameChanged)
    Q_PROPERTY(QString username READ username WRITE setUsername NOTIFY usernameChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    UserObject(const User & another, QObject *parent = 0) : TqObject(parent){
        (void)another;
        _id = another.id();
        _accessHash = another.accessHash();
        _phone = another.phone();
        _firstName = another.firstName();
        _photo = new UserProfilePhotoObject(another.photo(), this);
        _status = new UserStatusObject(another.status(), this);
        _lastName = another.lastName();
        _username = another.username();
        _classType = another.classType();

    }
    UserObject(QObject *parent = 0) :
        TqObject(parent),
        _photo(0),
        _status(0){}
    ~UserObject(){}

    qint32 id() const {
        return _id;
    }

    void setId(qint32 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    QString phone() const {
        return _phone;
    }

    void setPhone(QString value) {
        if( value == _phone )
            return;
        _phone = value;
        Q_EMIT phoneChanged();
        Q_EMIT changed();
    }

    QString firstName() const {
        return _firstName;
    }

    void setFirstName(QString value) {
        if( value == _firstName )
            return;
        _firstName = value;
        Q_EMIT firstNameChanged();
        Q_EMIT changed();
    }

    UserProfilePhotoObject* photo() const {
        return _photo;
    }

    void setPhoto(UserProfilePhotoObject* value) {
        if( value == _photo )
            return;
        _photo = value;
        Q_EMIT photoChanged();
        Q_EMIT changed();
    }

    UserStatusObject* status() const {
        return _status;
    }

    void setStatus(UserStatusObject* value) {
        if( value == _status )
            return;
        _status = value;
        Q_EMIT statusChanged();
        Q_EMIT changed();
    }

    QString lastName() const {
        return _lastName;
    }

    void setLastName(QString value) {
        if( value == _lastName )
            return;
        _lastName = value;
        Q_EMIT lastNameChanged();
        Q_EMIT changed();
    }

    QString username() const {
        return _username;
    }

    void setUsername(QString value) {
        if( value == _username )
            return;
        _username = value;
        Q_EMIT usernameChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const User & another) {
        _id = another.id();
        Q_EMIT idChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _phone = another.phone();
        Q_EMIT phoneChanged();
        _firstName = another.firstName();
        Q_EMIT firstNameChanged();
        *_photo = another.photo();
        Q_EMIT photoChanged();
        *_status = another.status();
        Q_EMIT statusChanged();
        _lastName = another.lastName();
        Q_EMIT lastNameChanged();
        _username = another.username();
        Q_EMIT usernameChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void idChanged();
    void accessHashChanged();
    void inactiveChanged();
    void phoneChanged();
    void firstNameChanged();
    void photoChanged();
    void statusChanged();
    void lastNameChanged();
    void usernameChanged();
    void classTypeChanged();

private:
    qint32 _id;
    qint64 _accessHash;
    QString _phone;
    QString _firstName;
    UserProfilePhotoObject* _photo;
    UserStatusObject* _status;
    QString _lastName;
    QString _username;
    quint32 _classType;

};

Q_DECLARE_METATYPE(UserObject*)

class TELEGRAMQMLSHARED_EXPORT StickerSetObject : public QObject
{
    Q_OBJECT
    Q_PROPERTY(qint64 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
    Q_PROPERTY(QString shortName READ shortName WRITE setShortName NOTIFY shortNameChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    StickerSetObject(const StickerSet & another, QObject *parent = 0) : QObject(parent){
        (void)another;
        _id = another.id();
        _accessHash = another.accessHash();
        _title = another.title();
        _shortName = another.shortName();
        _classType = another.classType();

    }
    StickerSetObject(QObject *parent = 0) : QObject(parent){}
    ~StickerSetObject(){}

    qint64 id() const {
        return _id;
    }

    void setId(qint64 value) {
        if( value == _id )
            return;
        _id = value;
        Q_EMIT idChanged();
        Q_EMIT changed();
    }

    qint64 accessHash() const {
        return _accessHash;
    }

    void setAccessHash(qint64 value) {
        if( value == _accessHash )
            return;
        _accessHash = value;
        Q_EMIT accessHashChanged();
        Q_EMIT changed();
    }

    QString title() const {
        return _title;
    }

    void setTitle(QString value) {
        if( value == _title )
            return;
        _title = value;
        Q_EMIT titleChanged();
        Q_EMIT changed();
    }

    QString shortName() const {
        return _shortName;
    }

    void setShortName(QString value) {
        if( value == _shortName )
            return;
        _shortName = value;
        Q_EMIT shortNameChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const StickerSet & another) {
        _id = another.id();
        Q_EMIT idChanged();
        _accessHash = another.accessHash();
        Q_EMIT accessHashChanged();
        _title = another.title();
        Q_EMIT titleChanged();
        _shortName = another.shortName();
        Q_EMIT shortNameChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void idChanged();
    void accessHashChanged();
    void titleChanged();
    void shortNameChanged();
    void classTypeChanged();

private:
    qint64 _id;
    qint64 _accessHash;
    QString _title;
    QString _shortName;
    quint32 _classType;

};

Q_DECLARE_METATYPE(StickerSetObject*)

class TELEGRAMQMLSHARED_EXPORT StickerPackObject : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString emoticon READ emoticon WRITE setEmoticon NOTIFY emoticonChanged)
    Q_PROPERTY(QList<qint64> documents READ documents WRITE setDocuments NOTIFY documentsChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    StickerPackObject(const StickerPack & another, QObject *parent = 0) : QObject(parent){
        (void)another;
        _emoticon = another.emoticon();
        _documents = another.documents();
        _classType = another.classType();

    }
    StickerPackObject(QObject *parent = 0) : QObject(parent){}
    ~StickerPackObject(){}

    QString emoticon() const {
        return _emoticon;
    }

    void setEmoticon(QString value) {
        if( value == _emoticon )
            return;
        _emoticon = value;
        Q_EMIT emoticonChanged();
        Q_EMIT changed();
    }

    QList<qint64> documents() const {
        return _documents;
    }

    void setDocuments(QList<qint64> value) {
        if( value == _documents )
            return;
        _documents = value;
        Q_EMIT documentsChanged();
        Q_EMIT changed();
    }

    quint32 classType() const {
        return _classType;
    }

    void setClassType(quint32 value) {
        if( value == _classType )
            return;
        _classType = value;
        Q_EMIT classTypeChanged();
        Q_EMIT changed();
    }


    void operator= ( const StickerPack & another) {
        _emoticon = another.emoticon();
        Q_EMIT emoticonChanged();
        _documents = another.documents();
        Q_EMIT documentsChanged();
        _classType = another.classType();
        Q_EMIT classTypeChanged();

    }

Q_SIGNALS:
    void changed();
    void emoticonChanged();
    void documentsChanged();
    void classTypeChanged();

private:
    QString _emoticon;
    QList<qint64> _documents;
    quint32 _classType;

};

Q_DECLARE_METATYPE(StickerPackObject*)

#endif //TELEGRAMQMLTYPEOBJECT_H
