// 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_EXPORTEDCHATINVITE
#define LQTG_TYPE_EXPORTEDCHATINVITE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>

class LIBQTELEGRAMSHARED_EXPORT ExportedChatInvite : public TelegramTypeObject
{
public:
    enum ExportedChatInviteClassType {
        typeChatInviteEmpty = 0x69df3769,
        typeChatInviteExported = 0xfc2e05bc
    };

    ExportedChatInvite(ExportedChatInviteClassType classType = typeChatInviteEmpty, InboundPkt *in = 0);
    ExportedChatInvite(InboundPkt *in);
    ExportedChatInvite(const Null&);
    ExportedChatInvite(const ExportedChatInvite &another);
    virtual ~ExportedChatInvite();

    void setLink(const QString &link);
    QString link() const;

    void setClassType(ExportedChatInviteClassType classType);
    ExportedChatInviteClassType classType() const;

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

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

    bool operator ==(const ExportedChatInvite &b) const;
    ExportedChatInvite &operator =(const ExportedChatInvite &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_link;
    ExportedChatInviteClassType m_classType;
};

Q_DECLARE_METATYPE(ExportedChatInvite)

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

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

#endif // LQTG_TYPE_EXPORTEDCHATINVITE
