// 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_INPUTPAYMENTCREDENTIALS
#define LQTG_TYPE_INPUTPAYMENTCREDENTIALS

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include "datajson.h"
#include <QtGlobal>
#include <QString>
#include <QByteArray>

class LIBQTELEGRAMSHARED_EXPORT InputPaymentCredentials : public TelegramTypeObject
{
public:
    enum InputPaymentCredentialsClassType {
        typeInputPaymentCredentialsSaved = 0xc10eb2cf,
        typeInputPaymentCredentials = 0x3417d728
    };

    InputPaymentCredentials(InputPaymentCredentialsClassType classType = typeInputPaymentCredentialsSaved, InboundPkt *in = 0);
    InputPaymentCredentials(InboundPkt *in);
    InputPaymentCredentials(const Null&);
    InputPaymentCredentials(const InputPaymentCredentials &another);
    virtual ~InputPaymentCredentials();

    void setData(const DataJSON &data);
    DataJSON data() const;

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

    void setId(const QString &id);
    QString id() const;

    void setSave(bool save);
    bool save() const;

    void setTmpPassword(const QByteArray &tmpPassword);
    QByteArray tmpPassword() const;

    void setClassType(InputPaymentCredentialsClassType classType);
    InputPaymentCredentialsClassType classType() const;

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

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

    bool operator ==(const InputPaymentCredentials &b) const;
    InputPaymentCredentials &operator =(const InputPaymentCredentials &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:
    DataJSON m_data;
    qint32 m_flags;
    QString m_id;
    QByteArray m_tmpPassword;
    InputPaymentCredentialsClassType m_classType;
};

Q_DECLARE_METATYPE(InputPaymentCredentials)

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

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

#endif // LQTG_TYPE_INPUTPAYMENTCREDENTIALS
