// 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_DOCUMENTATTRIBUTE
#define LQTG_TYPE_DOCUMENTATTRIBUTE

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>
#include <QtGlobal>
#include "maskcoords.h"
#include "inputstickerset.h"
#include <QByteArray>

class LIBQTELEGRAMSHARED_EXPORT DocumentAttribute : public TelegramTypeObject
{
public:
    enum DocumentAttributeClassType {
        typeDocumentAttributeImageSize = 0x6c37c15c,
        typeDocumentAttributeAnimated = 0x11b58939,
        typeDocumentAttributeSticker = 0x6319d612,
        typeDocumentAttributeVideo = 0xef02ce6,
        typeDocumentAttributeAudio = 0x9852f9c6,
        typeDocumentAttributeFilename = 0x15590068,
        typeDocumentAttributeHasStickers = 0x9801d2f7,
        typeDocumentAttributeImageSizeSecret23 = 0x6c37c15c,
        typeDocumentAttributeAnimatedSecret23 = 0x11b58939,
        typeDocumentAttributeStickerSecret23 = 0xfb0a5727,
        typeDocumentAttributeVideoSecret23 = 0x5910cccb,
        typeDocumentAttributeAudioSecret23 = 0x51448e5,
        typeDocumentAttributeFilenameSecret23 = 0x15590068
    };

    DocumentAttribute(DocumentAttributeClassType classType = typeDocumentAttributeImageSize, InboundPkt *in = 0);
    DocumentAttribute(InboundPkt *in);
    DocumentAttribute(const Null&);
    DocumentAttribute(const DocumentAttribute &another);
    virtual ~DocumentAttribute();

    void setAlt(const QString &alt);
    QString alt() const;

    void setDuration(qint32 duration);
    qint32 duration() const;

    void setFileName(const QString &fileName);
    QString fileName() const;

    void setFlags(qint32 flags);
    qint32 flags() const;

    void setH(qint32 h);
    qint32 h() const;

    void setMask(bool mask);
    bool mask() const;

    void setMaskCoords(const MaskCoords &maskCoords);
    MaskCoords maskCoords() const;

    void setPerformer(const QString &performer);
    QString performer() const;

    void setRoundMessage(bool roundMessage);
    bool roundMessage() const;

    void setStickerset(const InputStickerSet &stickerset);
    InputStickerSet stickerset() const;

    void setTitle(const QString &title);
    QString title() const;

    void setVoice(bool voice);
    bool voice() const;

    void setW(qint32 w);
    qint32 w() const;

    void setWaveform(const QByteArray &waveform);
    QByteArray waveform() const;

    void setClassType(DocumentAttributeClassType classType);
    DocumentAttributeClassType classType() const;

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

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

    bool operator ==(const DocumentAttribute &b) const;
    DocumentAttribute &operator =(const DocumentAttribute &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_alt;
    qint32 m_duration;
    QString m_fileName;
    qint32 m_flags;
    qint32 m_h;
    MaskCoords m_maskCoords;
    QString m_performer;
    InputStickerSet m_stickerset;
    QString m_title;
    qint32 m_w;
    QByteArray m_waveform;
    DocumentAttributeClassType m_classType;
};

Q_DECLARE_METATYPE(DocumentAttribute)

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

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

#endif // LQTG_TYPE_DOCUMENTATTRIBUTE
