// 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_SENDMESSAGEACTION
#define LQTG_TYPE_SENDMESSAGEACTION

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT SendMessageAction : public TelegramTypeObject
{
public:
    enum SendMessageActionClassType {
        typeSendMessageTypingAction = 0x16bf744e,
        typeSendMessageCancelAction = 0xfd5ec8f5,
        typeSendMessageRecordVideoAction = 0xa187d66f,
        typeSendMessageUploadVideoAction = 0xe9763aec,
        typeSendMessageRecordAudioAction = 0xd52f73f7,
        typeSendMessageUploadAudioAction = 0xf351d7ab,
        typeSendMessageUploadPhotoAction = 0xd1d34a26,
        typeSendMessageUploadDocumentAction = 0xaa0cd9e4,
        typeSendMessageGeoLocationAction = 0x176f8ba1,
        typeSendMessageChooseContactAction = 0x628cbc6f,
        typeSendMessageGamePlayAction = 0xdd6a8f48,
        typeSendMessageRecordRoundAction = 0x88f27fbc,
        typeSendMessageUploadRoundAction = 0x243e1c66,
        typeSendMessageTypingActionSecret17 = 0x16bf744e,
        typeSendMessageCancelActionSecret17 = 0xfd5ec8f5,
        typeSendMessageRecordVideoActionSecret17 = 0xa187d66f,
        typeSendMessageUploadVideoActionSecret17 = 0x92042ff7,
        typeSendMessageRecordAudioActionSecret17 = 0xd52f73f7,
        typeSendMessageUploadAudioActionSecret17 = 0xe6ac8a6f,
        typeSendMessageUploadPhotoActionSecret17 = 0x990a3c1a,
        typeSendMessageUploadDocumentActionSecret17 = 0x8faee98e,
        typeSendMessageGeoLocationActionSecret17 = 0x176f8ba1,
        typeSendMessageChooseContactActionSecret17 = 0x628cbc6f
    };

    SendMessageAction(SendMessageActionClassType classType = typeSendMessageTypingAction, InboundPkt *in = 0);
    SendMessageAction(InboundPkt *in);
    SendMessageAction(const Null&);
    SendMessageAction(const SendMessageAction &another);
    virtual ~SendMessageAction();

    void setProgress(qint32 progress);
    qint32 progress() const;

    void setClassType(SendMessageActionClassType classType);
    SendMessageActionClassType classType() const;

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

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

    bool operator ==(const SendMessageAction &b) const;
    SendMessageAction &operator =(const SendMessageAction &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_progress;
    SendMessageActionClassType m_classType;
};

Q_DECLARE_METATYPE(SendMessageAction)

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

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

#endif // LQTG_TYPE_SENDMESSAGEACTION
