// 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_PAYMENTSPAYMENTFORM
#define LQTG_TYPE_PAYMENTSPAYMENTFORM

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include "invoice.h"
#include "datajson.h"
#include <QString>
#include "paymentsavedcredentials.h"
#include "paymentrequestedinfo.h"
#include <QList>
#include "user.h"

class LIBQTELEGRAMSHARED_EXPORT PaymentsPaymentForm : public TelegramTypeObject
{
public:
    enum PaymentsPaymentFormClassType {
        typePaymentsPaymentForm = 0x3f56aea3
    };

    PaymentsPaymentForm(PaymentsPaymentFormClassType classType = typePaymentsPaymentForm, InboundPkt *in = 0);
    PaymentsPaymentForm(InboundPkt *in);
    PaymentsPaymentForm(const Null&);
    PaymentsPaymentForm(const PaymentsPaymentForm &another);
    virtual ~PaymentsPaymentForm();

    void setBotId(qint32 botId);
    qint32 botId() const;

    void setCanSaveCredentials(bool canSaveCredentials);
    bool canSaveCredentials() const;

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

    void setInvoice(const Invoice &invoice);
    Invoice invoice() const;

    void setNativeParams(const DataJSON &nativeParams);
    DataJSON nativeParams() const;

    void setNativeProvider(const QString &nativeProvider);
    QString nativeProvider() const;

    void setPasswordMissing(bool passwordMissing);
    bool passwordMissing() const;

    void setProviderId(qint32 providerId);
    qint32 providerId() const;

    void setSavedCredentials(const PaymentSavedCredentials &savedCredentials);
    PaymentSavedCredentials savedCredentials() const;

    void setSavedInfo(const PaymentRequestedInfo &savedInfo);
    PaymentRequestedInfo savedInfo() const;

    void setUrl(const QString &url);
    QString url() const;

    void setUsers(const QList<User> &users);
    QList<User> users() const;

    void setClassType(PaymentsPaymentFormClassType classType);
    PaymentsPaymentFormClassType classType() const;

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

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

    bool operator ==(const PaymentsPaymentForm &b) const;
    PaymentsPaymentForm &operator =(const PaymentsPaymentForm &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:
    qint32 m_botId;
    qint32 m_flags;
    Invoice m_invoice;
    DataJSON m_nativeParams;
    QString m_nativeProvider;
    qint32 m_providerId;
    PaymentSavedCredentials m_savedCredentials;
    PaymentRequestedInfo m_savedInfo;
    QString m_url;
    QList<User> m_users;
    PaymentsPaymentFormClassType m_classType;
};

Q_DECLARE_METATYPE(PaymentsPaymentForm)

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

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

#endif // LQTG_TYPE_PAYMENTSPAYMENTFORM
