// 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_PHOTOSPHOTO
#define LQTG_TYPE_PHOTOSPHOTO

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include "photo.h"
#include <QList>
#include "user.h"

class LIBQTELEGRAMSHARED_EXPORT PhotosPhoto : public TelegramTypeObject
{
public:
    enum PhotosPhotoClassType {
        typePhotosPhoto = 0x20212ca8
    };

    PhotosPhoto(PhotosPhotoClassType classType = typePhotosPhoto, InboundPkt *in = 0);
    PhotosPhoto(InboundPkt *in);
    PhotosPhoto(const Null&);
    PhotosPhoto(const PhotosPhoto &another);
    virtual ~PhotosPhoto();

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

    void setUsers(const QList<User> &users);
    QList<User> users() const;

    void setClassType(PhotosPhotoClassType classType);
    PhotosPhotoClassType classType() const;

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

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

    bool operator ==(const PhotosPhoto &b) const;
    PhotosPhoto &operator =(const PhotosPhoto &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:
    Photo m_photo;
    QList<User> m_users;
    PhotosPhotoClassType m_classType;
};

Q_DECLARE_METATYPE(PhotosPhoto)

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

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

#endif // LQTG_TYPE_PHOTOSPHOTO
