// 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_SHIPPINGOPTION
#define LQTG_TYPE_SHIPPINGOPTION

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>
#include <QList>
#include "labeledprice.h"

class LIBQTELEGRAMSHARED_EXPORT ShippingOption : public TelegramTypeObject
{
public:
    enum ShippingOptionClassType {
        typeShippingOption = 0xb6213cdf
    };

    ShippingOption(ShippingOptionClassType classType = typeShippingOption, InboundPkt *in = 0);
    ShippingOption(InboundPkt *in);
    ShippingOption(const Null&);
    ShippingOption(const ShippingOption &another);
    virtual ~ShippingOption();

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

    void setPrices(const QList<LabeledPrice> &prices);
    QList<LabeledPrice> prices() const;

    void setTitle(const QString &title);
    QString title() const;

    void setClassType(ShippingOptionClassType classType);
    ShippingOptionClassType classType() const;

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

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

    bool operator ==(const ShippingOption &b) const;
    ShippingOption &operator =(const ShippingOption &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;
    QList<LabeledPrice> m_prices;
    QString m_title;
    ShippingOptionClassType m_classType;
};

Q_DECLARE_METATYPE(ShippingOption)

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

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

#endif // LQTG_TYPE_SHIPPINGOPTION
