// 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_UPLOADCDNFILE
#define LQTG_TYPE_UPLOADCDNFILE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QByteArray>

class LIBQTELEGRAMSHARED_EXPORT UploadCdnFile : public TelegramTypeObject
{
public:
    enum UploadCdnFileClassType {
        typeUploadCdnFileReuploadNeeded = 0xeea8e46e,
        typeUploadCdnFile = 0xa99fca4f
    };

    UploadCdnFile(UploadCdnFileClassType classType = typeUploadCdnFileReuploadNeeded, InboundPkt *in = 0);
    UploadCdnFile(InboundPkt *in);
    UploadCdnFile(const Null&);
    UploadCdnFile(const UploadCdnFile &another);
    virtual ~UploadCdnFile();

    void setBytes(const QByteArray &bytes);
    QByteArray bytes() const;

    void setRequestToken(const QByteArray &requestToken);
    QByteArray requestToken() const;

    void setClassType(UploadCdnFileClassType classType);
    UploadCdnFileClassType classType() const;

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

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

    bool operator ==(const UploadCdnFile &b) const;
    UploadCdnFile &operator =(const UploadCdnFile &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:
    QByteArray m_bytes;
    QByteArray m_requestToken;
    UploadCdnFileClassType m_classType;
};

Q_DECLARE_METATYPE(UploadCdnFile)

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

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

#endif // LQTG_TYPE_UPLOADCDNFILE
