// 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_AUTHCHECKEDPHONE
#define LQTG_TYPE_AUTHCHECKEDPHONE

#include "telegramtypeobject.h"

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

#include <QDataStream>


class LIBQTELEGRAMSHARED_EXPORT AuthCheckedPhone : public TelegramTypeObject
{
public:
    enum AuthCheckedPhoneClassType {
        typeAuthCheckedPhone = 0x811ea28e
    };

    AuthCheckedPhone(AuthCheckedPhoneClassType classType = typeAuthCheckedPhone, InboundPkt *in = 0);
    AuthCheckedPhone(InboundPkt *in);
    AuthCheckedPhone(const Null&);
    AuthCheckedPhone(const AuthCheckedPhone &another);
    virtual ~AuthCheckedPhone();

    void setPhoneRegistered(bool phoneRegistered);
    bool phoneRegistered() const;

    void setClassType(AuthCheckedPhoneClassType classType);
    AuthCheckedPhoneClassType classType() const;

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

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

    bool operator ==(const AuthCheckedPhone &b) const;
    AuthCheckedPhone &operator =(const AuthCheckedPhone &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_phoneRegistered;
    AuthCheckedPhoneClassType m_classType;
};

Q_DECLARE_METATYPE(AuthCheckedPhone)

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

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

#endif // LQTG_TYPE_AUTHCHECKEDPHONE
