// 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_ACCOUNTPASSWORDINPUTSETTINGS
#define LQTG_TYPE_ACCOUNTPASSWORDINPUTSETTINGS

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>
#include <QtGlobal>
#include <QByteArray>

class LIBQTELEGRAMSHARED_EXPORT AccountPasswordInputSettings : public TelegramTypeObject
{
public:
    enum AccountPasswordInputSettingsClassType {
        typeAccountPasswordInputSettings = 0x86916deb
    };

    AccountPasswordInputSettings(AccountPasswordInputSettingsClassType classType = typeAccountPasswordInputSettings, InboundPkt *in = 0);
    AccountPasswordInputSettings(InboundPkt *in);
    AccountPasswordInputSettings(const Null&);
    AccountPasswordInputSettings(const AccountPasswordInputSettings &another);
    virtual ~AccountPasswordInputSettings();

    void setEmail(const QString &email);
    QString email() const;

    void setFlags(qint32 flags);
    qint32 flags() const;

    void setHint(const QString &hint);
    QString hint() const;

    void setNewPasswordHash(const QByteArray &newPasswordHash);
    QByteArray newPasswordHash() const;

    void setNewSalt(const QByteArray &newSalt);
    QByteArray newSalt() const;

    void setClassType(AccountPasswordInputSettingsClassType classType);
    AccountPasswordInputSettingsClassType classType() const;

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

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

    bool operator ==(const AccountPasswordInputSettings &b) const;
    AccountPasswordInputSettings &operator =(const AccountPasswordInputSettings &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_email;
    qint32 m_flags;
    QString m_hint;
    QByteArray m_newPasswordHash;
    QByteArray m_newSalt;
    AccountPasswordInputSettingsClassType m_classType;
};

Q_DECLARE_METATYPE(AccountPasswordInputSettings)

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

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

#endif // LQTG_TYPE_ACCOUNTPASSWORDINPUTSETTINGS
