// 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_HELPTERMSOFSERVICE
#define LQTG_TYPE_HELPTERMSOFSERVICE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>

class LIBQTELEGRAMSHARED_EXPORT HelpTermsOfService : public TelegramTypeObject
{
public:
    enum HelpTermsOfServiceClassType {
        typeHelpTermsOfService = 0xf1ee3e90
    };

    HelpTermsOfService(HelpTermsOfServiceClassType classType = typeHelpTermsOfService, InboundPkt *in = 0);
    HelpTermsOfService(InboundPkt *in);
    HelpTermsOfService(const Null&);
    HelpTermsOfService(const HelpTermsOfService &another);
    virtual ~HelpTermsOfService();

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

    void setClassType(HelpTermsOfServiceClassType classType);
    HelpTermsOfServiceClassType classType() const;

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

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

    bool operator ==(const HelpTermsOfService &b) const;
    HelpTermsOfService &operator =(const HelpTermsOfService &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;
    HelpTermsOfServiceClassType m_classType;
};

Q_DECLARE_METATYPE(HelpTermsOfService)

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

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

#endif // LQTG_TYPE_HELPTERMSOFSERVICE
