// 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_INPUTENCRYPTEDFILE
#define LQTG_TYPE_INPUTENCRYPTEDFILE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include <QString>

class LIBQTELEGRAMSHARED_EXPORT InputEncryptedFile : public TelegramTypeObject
{
public:
    enum InputEncryptedFileClassType {
        typeInputEncryptedFileEmpty = 0x1837c364,
        typeInputEncryptedFileUploaded = 0x64bd0306,
        typeInputEncryptedFile = 0x5a17b5e5,
        typeInputEncryptedFileBigUploaded = 0x2dc173c8
    };

    InputEncryptedFile(InputEncryptedFileClassType classType = typeInputEncryptedFileEmpty, InboundPkt *in = 0);
    InputEncryptedFile(InboundPkt *in);
    InputEncryptedFile(const Null&);
    InputEncryptedFile(const InputEncryptedFile &another);
    virtual ~InputEncryptedFile();

    void setAccessHash(qint64 accessHash);
    qint64 accessHash() const;

    void setId(qint64 id);
    qint64 id() const;

    void setKeyFingerprint(qint32 keyFingerprint);
    qint32 keyFingerprint() const;

    void setMd5Checksum(const QString &md5Checksum);
    QString md5Checksum() const;

    void setParts(qint32 parts);
    qint32 parts() const;

    void setClassType(InputEncryptedFileClassType classType);
    InputEncryptedFileClassType classType() const;

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

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

    bool operator ==(const InputEncryptedFile &b) const;
    InputEncryptedFile &operator =(const InputEncryptedFile &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:
    qint64 m_accessHash;
    qint64 m_id;
    qint32 m_keyFingerprint;
    QString m_md5Checksum;
    qint32 m_parts;
    InputEncryptedFileClassType m_classType;
};

Q_DECLARE_METATYPE(InputEncryptedFile)

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

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

#endif // LQTG_TYPE_INPUTENCRYPTEDFILE
