// 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_INPUTPRIVACYKEY
#define LQTG_TYPE_INPUTPRIVACYKEY

#include "telegramtypeobject.h"

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

#include <QDataStream>


class LIBQTELEGRAMSHARED_EXPORT InputPrivacyKey : public TelegramTypeObject
{
public:
    enum InputPrivacyKeyClassType {
        typeInputPrivacyKeyStatusTimestamp = 0x4f96cb18,
        typeInputPrivacyKeyChatInvite = 0xbdfb0426,
        typeInputPrivacyKeyPhoneCall = 0xfabadc5f
    };

    InputPrivacyKey(InputPrivacyKeyClassType classType = typeInputPrivacyKeyStatusTimestamp, InboundPkt *in = 0);
    InputPrivacyKey(InboundPkt *in);
    InputPrivacyKey(const Null&);
    InputPrivacyKey(const InputPrivacyKey &another);
    virtual ~InputPrivacyKey();

    void setClassType(InputPrivacyKeyClassType classType);
    InputPrivacyKeyClassType classType() const;

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

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

    bool operator ==(const InputPrivacyKey &b) const;
    InputPrivacyKey &operator =(const InputPrivacyKey &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:
    InputPrivacyKeyClassType m_classType;
};

Q_DECLARE_METATYPE(InputPrivacyKey)

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

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

#endif // LQTG_TYPE_INPUTPRIVACYKEY
