// 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_LABELEDPRICE
#define LQTG_TYPE_LABELEDPRICE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include <QString>

class LIBQTELEGRAMSHARED_EXPORT LabeledPrice : public TelegramTypeObject
{
public:
    enum LabeledPriceClassType {
        typeLabeledPrice = 0xcb296bf8
    };

    LabeledPrice(LabeledPriceClassType classType = typeLabeledPrice, InboundPkt *in = 0);
    LabeledPrice(InboundPkt *in);
    LabeledPrice(const Null&);
    LabeledPrice(const LabeledPrice &another);
    virtual ~LabeledPrice();

    void setAmount(qint64 amount);
    qint64 amount() const;

    void setLabel(const QString &label);
    QString label() const;

    void setClassType(LabeledPriceClassType classType);
    LabeledPriceClassType classType() const;

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

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

    bool operator ==(const LabeledPrice &b) const;
    LabeledPrice &operator =(const LabeledPrice &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:
    qint64 m_amount;
    QString m_label;
    LabeledPriceClassType m_classType;
};

Q_DECLARE_METATYPE(LabeledPrice)

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

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

#endif // LQTG_TYPE_LABELEDPRICE
