// 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_INPUTFILELOCATION
#define LQTG_TYPE_INPUTFILELOCATION

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT InputFileLocation : public TelegramTypeObject
{
public:
    enum InputFileLocationClassType {
        typeInputFileLocation = 0x14637196,
        typeInputEncryptedFileLocation = 0xf5235d55,
        typeInputDocumentFileLocation = 0x430f0724
    };

    InputFileLocation(InputFileLocationClassType classType = typeInputFileLocation, InboundPkt *in = 0);
    InputFileLocation(InboundPkt *in);
    InputFileLocation(const Null&);
    InputFileLocation(const InputFileLocation &another);
    virtual ~InputFileLocation();

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

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

    void setLocalId(qint32 localId);
    qint32 localId() const;

    void setSecret(qint64 secret);
    qint64 secret() const;

    void setVersion(qint32 version);
    qint32 version() const;

    void setVolumeId(qint64 volumeId);
    qint64 volumeId() const;

    void setClassType(InputFileLocationClassType classType);
    InputFileLocationClassType classType() const;

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

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

    bool operator ==(const InputFileLocation &b) const;
    InputFileLocation &operator =(const InputFileLocation &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_localId;
    qint64 m_secret;
    qint32 m_version;
    qint64 m_volumeId;
    InputFileLocationClassType m_classType;
};

Q_DECLARE_METATYPE(InputFileLocation)

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

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

#endif // LQTG_TYPE_INPUTFILELOCATION
