// This file generated by libqtelegram-code-generator.
// You can download it from: https://github.com/Aseman-Land/libqtelegram-code-generator
// DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

#ifndef LQTG_TYPE_USERPROFILEPHOTO
#define LQTG_TYPE_USERPROFILEPHOTO

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include "filelocation.h"
#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT UserProfilePhoto : public TelegramTypeObject
{
public:
    enum UserProfilePhotoClassType {
        typeUserProfilePhotoEmpty = 0x4f11bae1,
        typeUserProfilePhoto = 0xd559d8c8
    };

    UserProfilePhoto(UserProfilePhotoClassType classType = typeUserProfilePhotoEmpty, InboundPkt *in = 0);
    UserProfilePhoto(InboundPkt *in);
    UserProfilePhoto(const Null&);
    UserProfilePhoto(const UserProfilePhoto &another);
    virtual ~UserProfilePhoto();

    void setPhotoBig(const FileLocation &photoBig);
    FileLocation photoBig() const;

    void setPhotoId(qint64 photoId);
    qint64 photoId() const;

    void setPhotoSmall(const FileLocation &photoSmall);
    FileLocation photoSmall() const;

    void setClassType(UserProfilePhotoClassType classType);
    UserProfilePhotoClassType classType() const;

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

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

    bool operator ==(const UserProfilePhoto &b) const;
    UserProfilePhoto &operator =(const UserProfilePhoto &b);

    bool operator==(bool stt) const { return isNull() != stt; }
    bool operator!=(bool stt) const { return !operator ==(stt); }

    QByteArray getHash(QCryptographicHash::Algorithm alg = QCryptographicHash::Md5) const;

private:
    FileLocation m_photoBig;
    qint64 m_photoId;
    FileLocation m_photoSmall;
    UserProfilePhotoClassType m_classType;
};

Q_DECLARE_METATYPE(UserProfilePhoto)

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

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

#endif // LQTG_TYPE_USERPROFILEPHOTO
