// 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_AUTHEXPORTEDAUTHORIZATION
#define LQTG_TYPE_AUTHEXPORTEDAUTHORIZATION

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QByteArray>
#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT AuthExportedAuthorization : public TelegramTypeObject
{
public:
    enum AuthExportedAuthorizationClassType {
        typeAuthExportedAuthorization = 0xdf969c2d
    };

    AuthExportedAuthorization(AuthExportedAuthorizationClassType classType = typeAuthExportedAuthorization, InboundPkt *in = 0);
    AuthExportedAuthorization(InboundPkt *in);
    AuthExportedAuthorization(const Null&);
    AuthExportedAuthorization(const AuthExportedAuthorization &another);
    virtual ~AuthExportedAuthorization();

    void setBytes(const QByteArray &bytes);
    QByteArray bytes() const;

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

    void setClassType(AuthExportedAuthorizationClassType classType);
    AuthExportedAuthorizationClassType classType() const;

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

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

    bool operator ==(const AuthExportedAuthorization &b) const;
    AuthExportedAuthorization &operator =(const AuthExportedAuthorization &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:
    QByteArray m_bytes;
    qint32 m_id;
    AuthExportedAuthorizationClassType m_classType;
};

Q_DECLARE_METATYPE(AuthExportedAuthorization)

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

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

#endif // LQTG_TYPE_AUTHEXPORTEDAUTHORIZATION
