// 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_MESSAGESDHCONFIG
#define LQTG_TYPE_MESSAGESDHCONFIG

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include <QByteArray>

class LIBQTELEGRAMSHARED_EXPORT MessagesDhConfig : public TelegramTypeObject
{
public:
    enum MessagesDhConfigClassType {
        typeMessagesDhConfigNotModified = 0xc0e24635,
        typeMessagesDhConfig = 0x2c221edd
    };

    MessagesDhConfig(MessagesDhConfigClassType classType = typeMessagesDhConfigNotModified, InboundPkt *in = 0);
    MessagesDhConfig(InboundPkt *in);
    MessagesDhConfig(const Null&);
    MessagesDhConfig(const MessagesDhConfig &another);
    virtual ~MessagesDhConfig();

    void setG(qint32 g);
    qint32 g() const;

    void setP(const QByteArray &p);
    QByteArray p() const;

    void setRandom(const QByteArray &random);
    QByteArray random() const;

    void setVersion(qint32 version);
    qint32 version() const;

    void setClassType(MessagesDhConfigClassType classType);
    MessagesDhConfigClassType classType() const;

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

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

    bool operator ==(const MessagesDhConfig &b) const;
    MessagesDhConfig &operator =(const MessagesDhConfig &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_g;
    QByteArray m_p;
    QByteArray m_random;
    qint32 m_version;
    MessagesDhConfigClassType m_classType;
};

Q_DECLARE_METATYPE(MessagesDhConfig)

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

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

#endif // LQTG_TYPE_MESSAGESDHCONFIG
