// 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_ACCOUNTDAYSTTL
#define LQTG_TYPE_ACCOUNTDAYSTTL

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT AccountDaysTTL : public TelegramTypeObject
{
public:
    enum AccountDaysTTLClassType {
        typeAccountDaysTTL = 0xb8d0afdf
    };

    AccountDaysTTL(AccountDaysTTLClassType classType = typeAccountDaysTTL, InboundPkt *in = 0);
    AccountDaysTTL(InboundPkt *in);
    AccountDaysTTL(const Null&);
    AccountDaysTTL(const AccountDaysTTL &another);
    virtual ~AccountDaysTTL();

    void setDays(qint32 days);
    qint32 days() const;

    void setClassType(AccountDaysTTLClassType classType);
    AccountDaysTTLClassType classType() const;

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

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

    bool operator ==(const AccountDaysTTL &b) const;
    AccountDaysTTL &operator =(const AccountDaysTTL &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_days;
    AccountDaysTTLClassType m_classType;
};

Q_DECLARE_METATYPE(AccountDaysTTL)

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

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

#endif // LQTG_TYPE_ACCOUNTDAYSTTL
