// 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_REPORTREASON
#define LQTG_TYPE_REPORTREASON

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>

class LIBQTELEGRAMSHARED_EXPORT ReportReason : public TelegramTypeObject
{
public:
    enum ReportReasonClassType {
        typeInputReportReasonSpam = 0x58dbcab8,
        typeInputReportReasonViolence = 0x1e22c78d,
        typeInputReportReasonPornography = 0x2e59d922,
        typeInputReportReasonOther = 0xe1746d0a
    };

    ReportReason(ReportReasonClassType classType = typeInputReportReasonSpam, InboundPkt *in = 0);
    ReportReason(InboundPkt *in);
    ReportReason(const Null&);
    ReportReason(const ReportReason &another);
    virtual ~ReportReason();

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

    void setClassType(ReportReasonClassType classType);
    ReportReasonClassType classType() const;

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

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

    bool operator ==(const ReportReason &b) const;
    ReportReason &operator =(const ReportReason &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:
    QString m_text;
    ReportReasonClassType m_classType;
};

Q_DECLARE_METATYPE(ReportReason)

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

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

#endif // LQTG_TYPE_REPORTREASON
