// 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_PAYMENTSVALIDATEDREQUESTEDINFO
#define LQTG_TYPE_PAYMENTSVALIDATEDREQUESTEDINFO

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include <QString>
#include <QList>
#include "shippingoption.h"

class LIBQTELEGRAMSHARED_EXPORT PaymentsValidatedRequestedInfo : public TelegramTypeObject
{
public:
    enum PaymentsValidatedRequestedInfoClassType {
        typePaymentsValidatedRequestedInfo = 0xd1451883
    };

    PaymentsValidatedRequestedInfo(PaymentsValidatedRequestedInfoClassType classType = typePaymentsValidatedRequestedInfo, InboundPkt *in = 0);
    PaymentsValidatedRequestedInfo(InboundPkt *in);
    PaymentsValidatedRequestedInfo(const Null&);
    PaymentsValidatedRequestedInfo(const PaymentsValidatedRequestedInfo &another);
    virtual ~PaymentsValidatedRequestedInfo();

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

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

    void setShippingOptions(const QList<ShippingOption> &shippingOptions);
    QList<ShippingOption> shippingOptions() const;

    void setClassType(PaymentsValidatedRequestedInfoClassType classType);
    PaymentsValidatedRequestedInfoClassType classType() const;

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

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

    bool operator ==(const PaymentsValidatedRequestedInfo &b) const;
    PaymentsValidatedRequestedInfo &operator =(const PaymentsValidatedRequestedInfo &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_flags;
    QString m_id;
    QList<ShippingOption> m_shippingOptions;
    PaymentsValidatedRequestedInfoClassType m_classType;
};

Q_DECLARE_METATYPE(PaymentsValidatedRequestedInfo)

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

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

#endif // LQTG_TYPE_PAYMENTSVALIDATEDREQUESTEDINFO
