// 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_PAYMENTCHARGE
#define LQTG_TYPE_PAYMENTCHARGE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>

class LIBQTELEGRAMSHARED_EXPORT PaymentCharge : public TelegramTypeObject
{
public:
    enum PaymentChargeClassType {
        typePaymentCharge = 0xea02c27e
    };

    PaymentCharge(PaymentChargeClassType classType = typePaymentCharge, InboundPkt *in = 0);
    PaymentCharge(InboundPkt *in);
    PaymentCharge(const Null&);
    PaymentCharge(const PaymentCharge &another);
    virtual ~PaymentCharge();

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

    void setProviderChargeId(const QString &providerChargeId);
    QString providerChargeId() const;

    void setClassType(PaymentChargeClassType classType);
    PaymentChargeClassType classType() const;

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

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

    bool operator ==(const PaymentCharge &b) const;
    PaymentCharge &operator =(const PaymentCharge &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_id;
    QString m_providerChargeId;
    PaymentChargeClassType m_classType;
};

Q_DECLARE_METATYPE(PaymentCharge)

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

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

#endif // LQTG_TYPE_PAYMENTCHARGE
