// 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_INPUTWEBFILELOCATION
#define LQTG_TYPE_INPUTWEBFILELOCATION

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include <QString>

class LIBQTELEGRAMSHARED_EXPORT InputWebFileLocation : public TelegramTypeObject
{
public:
    enum InputWebFileLocationClassType {
        typeInputWebFileLocation = 0xc239d686
    };

    InputWebFileLocation(InputWebFileLocationClassType classType = typeInputWebFileLocation, InboundPkt *in = 0);
    InputWebFileLocation(InboundPkt *in);
    InputWebFileLocation(const Null&);
    InputWebFileLocation(const InputWebFileLocation &another);
    virtual ~InputWebFileLocation();

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

    void setUrl(const QString &url);
    QString url() const;

    void setClassType(InputWebFileLocationClassType classType);
    InputWebFileLocationClassType classType() const;

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

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

    bool operator ==(const InputWebFileLocation &b) const;
    InputWebFileLocation &operator =(const InputWebFileLocation &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;
    QString m_url;
    InputWebFileLocationClassType m_classType;
};

Q_DECLARE_METATYPE(InputWebFileLocation)

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

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

#endif // LQTG_TYPE_INPUTWEBFILELOCATION
