// 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_AUTHCODETYPE
#define LQTG_TYPE_AUTHCODETYPE

#include "telegramtypeobject.h"

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

#include <QDataStream>


class LIBQTELEGRAMSHARED_EXPORT AuthCodeType : public TelegramTypeObject
{
public:
    enum AuthCodeTypeClassType {
        typeAuthCodeTypeSms = 0x72a3158c,
        typeAuthCodeTypeCall = 0x741cd3e3,
        typeAuthCodeTypeFlashCall = 0x226ccefb
    };

    AuthCodeType(AuthCodeTypeClassType classType = typeAuthCodeTypeSms, InboundPkt *in = 0);
    AuthCodeType(InboundPkt *in);
    AuthCodeType(const Null&);
    AuthCodeType(const AuthCodeType &another);
    virtual ~AuthCodeType();

    void setClassType(AuthCodeTypeClassType classType);
    AuthCodeTypeClassType classType() const;

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

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

    bool operator ==(const AuthCodeType &b) const;
    AuthCodeType &operator =(const AuthCodeType &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:
    AuthCodeTypeClassType m_classType;
};

Q_DECLARE_METATYPE(AuthCodeType)

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

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

#endif // LQTG_TYPE_AUTHCODETYPE
