// 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_STORAGEFILETYPE
#define LQTG_TYPE_STORAGEFILETYPE

#include "telegramtypeobject.h"

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

#include <QDataStream>


class LIBQTELEGRAMSHARED_EXPORT StorageFileType : public TelegramTypeObject
{
public:
    enum StorageFileTypeClassType {
        typeStorageFileUnknown = 0xaa963b05,
        typeStorageFilePartial = 0x40bc6f52,
        typeStorageFileJpeg = 0x7efe0e,
        typeStorageFileGif = 0xcae1aadf,
        typeStorageFilePng = 0xa4f63c0,
        typeStorageFilePdf = 0xae1e508d,
        typeStorageFileMp3 = 0x528a0677,
        typeStorageFileMov = 0x4b09ebbc,
        typeStorageFileMp4 = 0xb3cea0e4,
        typeStorageFileWebp = 0x1081464c
    };

    StorageFileType(StorageFileTypeClassType classType = typeStorageFileUnknown, InboundPkt *in = 0);
    StorageFileType(InboundPkt *in);
    StorageFileType(const Null&);
    StorageFileType(const StorageFileType &another);
    virtual ~StorageFileType();

    void setClassType(StorageFileTypeClassType classType);
    StorageFileTypeClassType classType() const;

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

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

    bool operator ==(const StorageFileType &b) const;
    StorageFileType &operator =(const StorageFileType &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:
    StorageFileTypeClassType m_classType;
};

Q_DECLARE_METATYPE(StorageFileType)

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

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

#endif // LQTG_TYPE_STORAGEFILETYPE
