// 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_BOT_TYPE_BOTUSER
#define LQTG_BOT_TYPE_BOTUSER

#include "telegrambottypeobject.h"

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

#include <QDataStream>
#include <QDebug>

#include <QString>
#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT BotUser : public TelegramBotTypeObject
{
public:
    enum BotUserClassType {
        typeTypeUser = 0xffa800
    };

    BotUser(const QMap<QString, QVariant> &map);
    BotUser(const Null &_null = TelegramBotTypeObject::null);
    BotUser(const BotUser &another);
    virtual ~BotUser();

    void setFirstName(const QString &firstName);
    QString firstName() const;

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

    void setLastName(const QString &lastName);
    QString lastName() const;

    void setUsername(const QString &username);
    QString username() const;

    void setClassType(BotUserClassType classType);
    BotUserClassType classType() const;

    QMap<QString, QVariant> toMap() const;
    void fromMap(const QMap<QString, QVariant> &map);
    bool operator ==(const BotUser &b) const;
    BotUser &operator =(const BotUser &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_firstName;
    qint32 m_id;
    QString m_lastName;
    QString m_username;
    BotUserClassType m_classType;
};

Q_DECLARE_METATYPE(BotUser)

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

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

#endif // LQTG_BOT_TYPE_BOTUSER
