// 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_HELPAPPUPDATE
#define LQTG_TYPE_HELPAPPUPDATE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include <QString>

class LIBQTELEGRAMSHARED_EXPORT HelpAppUpdate : public TelegramTypeObject
{
public:
    enum HelpAppUpdateClassType {
        typeHelpAppUpdate = 0x8987f311,
        typeHelpNoAppUpdate = 0xc45a6536
    };

    HelpAppUpdate(HelpAppUpdateClassType classType = typeHelpAppUpdate, InboundPkt *in = 0);
    HelpAppUpdate(InboundPkt *in);
    HelpAppUpdate(const Null&);
    HelpAppUpdate(const HelpAppUpdate &another);
    virtual ~HelpAppUpdate();

    void setCritical(bool critical);
    bool critical() const;

    void setId(qint32 id);
    qint32 id() const;

    void setText(const QString &text);
    QString text() const;

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

    void setClassType(HelpAppUpdateClassType classType);
    HelpAppUpdateClassType classType() const;

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

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

    bool operator ==(const HelpAppUpdate &b) const;
    HelpAppUpdate &operator =(const HelpAppUpdate &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:
    bool m_critical;
    qint32 m_id;
    QString m_text;
    QString m_url;
    HelpAppUpdateClassType m_classType;
};

Q_DECLARE_METATYPE(HelpAppUpdate)

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

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

#endif // LQTG_TYPE_HELPAPPUPDATE
