// 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_CHATPHOTO
#define LQTG_TYPE_CHATPHOTO

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include "filelocation.h"

class LIBQTELEGRAMSHARED_EXPORT ChatPhoto : public TelegramTypeObject
{
public:
    enum ChatPhotoClassType {
        typeChatPhotoEmpty = 0x37c1011c,
        typeChatPhoto = 0x6153276a
    };

    ChatPhoto(ChatPhotoClassType classType = typeChatPhotoEmpty, InboundPkt *in = 0);
    ChatPhoto(InboundPkt *in);
    ChatPhoto(const Null&);
    ChatPhoto(const ChatPhoto &another);
    virtual ~ChatPhoto();

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

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

    void setClassType(ChatPhotoClassType classType);
    ChatPhotoClassType classType() const;

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

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

    bool operator ==(const ChatPhoto &b) const;
    ChatPhoto &operator =(const ChatPhoto &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;
    FileLocation m_photoSmall;
    ChatPhotoClassType m_classType;
};

Q_DECLARE_METATYPE(ChatPhoto)

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

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

#endif // LQTG_TYPE_CHATPHOTO
