// 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_MESSAGESSENTENCRYPTEDMESSAGE
#define LQTG_TYPE_MESSAGESSENTENCRYPTEDMESSAGE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include "encryptedfile.h"

class LIBQTELEGRAMSHARED_EXPORT MessagesSentEncryptedMessage : public TelegramTypeObject
{
public:
    enum MessagesSentEncryptedMessageClassType {
        typeMessagesSentEncryptedMessage = 0x560f8935,
        typeMessagesSentEncryptedFile = 0x9493ff32
    };

    MessagesSentEncryptedMessage(MessagesSentEncryptedMessageClassType classType = typeMessagesSentEncryptedMessage, InboundPkt *in = 0);
    MessagesSentEncryptedMessage(InboundPkt *in);
    MessagesSentEncryptedMessage(const Null&);
    MessagesSentEncryptedMessage(const MessagesSentEncryptedMessage &another);
    virtual ~MessagesSentEncryptedMessage();

    void setDate(qint32 date);
    qint32 date() const;

    void setFile(const EncryptedFile &file);
    EncryptedFile file() const;

    void setClassType(MessagesSentEncryptedMessageClassType classType);
    MessagesSentEncryptedMessageClassType classType() const;

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

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

    bool operator ==(const MessagesSentEncryptedMessage &b) const;
    MessagesSentEncryptedMessage &operator =(const MessagesSentEncryptedMessage &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_date;
    EncryptedFile m_file;
    MessagesSentEncryptedMessageClassType m_classType;
};

Q_DECLARE_METATYPE(MessagesSentEncryptedMessage)

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

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

#endif // LQTG_TYPE_MESSAGESSENTENCRYPTEDMESSAGE
