// 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_INPUTNOTIFYPEER
#define LQTG_TYPE_INPUTNOTIFYPEER

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include "inputpeer.h"

class LIBQTELEGRAMSHARED_EXPORT InputNotifyPeer : public TelegramTypeObject
{
public:
    enum InputNotifyPeerClassType {
        typeInputNotifyPeer = 0xb8bc5b0c,
        typeInputNotifyUsers = 0x193b4417,
        typeInputNotifyChats = 0x4a95e84e,
        typeInputNotifyAll = 0xa429b886
    };

    InputNotifyPeer(InputNotifyPeerClassType classType = typeInputNotifyPeer, InboundPkt *in = 0);
    InputNotifyPeer(InboundPkt *in);
    InputNotifyPeer(const Null&);
    InputNotifyPeer(const InputNotifyPeer &another);
    virtual ~InputNotifyPeer();

    void setPeer(const InputPeer &peer);
    InputPeer peer() const;

    void setClassType(InputNotifyPeerClassType classType);
    InputNotifyPeerClassType classType() const;

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

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

    bool operator ==(const InputNotifyPeer &b) const;
    InputNotifyPeer &operator =(const InputNotifyPeer &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:
    InputPeer m_peer;
    InputNotifyPeerClassType m_classType;
};

Q_DECLARE_METATYPE(InputNotifyPeer)

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

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

#endif // LQTG_TYPE_INPUTNOTIFYPEER
