// 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_PAYMENTSPAYMENTRESULT
#define LQTG_TYPE_PAYMENTSPAYMENTRESULT

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include "updatestype.h"
#include <QString>

class LIBQTELEGRAMSHARED_EXPORT PaymentsPaymentResult : public TelegramTypeObject
{
public:
    enum PaymentsPaymentResultClassType {
        typePaymentsPaymentResult = 0x4e5f810d,
        typePaymentsPaymentVerficationNeeded = 0x6b56b921
    };

    PaymentsPaymentResult(PaymentsPaymentResultClassType classType = typePaymentsPaymentResult, InboundPkt *in = 0);
    PaymentsPaymentResult(InboundPkt *in);
    PaymentsPaymentResult(const Null&);
    PaymentsPaymentResult(const PaymentsPaymentResult &another);
    virtual ~PaymentsPaymentResult();

    void setUpdates(const UpdatesType &updates);
    UpdatesType updates() const;

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

    void setClassType(PaymentsPaymentResultClassType classType);
    PaymentsPaymentResultClassType classType() const;

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

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

    bool operator ==(const PaymentsPaymentResult &b) const;
    PaymentsPaymentResult &operator =(const PaymentsPaymentResult &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:
    UpdatesType m_updates;
    QString m_url;
    PaymentsPaymentResultClassType m_classType;
};

Q_DECLARE_METATYPE(PaymentsPaymentResult)

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

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

#endif // LQTG_TYPE_PAYMENTSPAYMENTRESULT
