// 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_CDNCONFIG
#define LQTG_TYPE_CDNCONFIG

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QList>
#include "cdnpublickey.h"

class LIBQTELEGRAMSHARED_EXPORT CdnConfig : public TelegramTypeObject
{
public:
    enum CdnConfigClassType {
        typeCdnConfig = 0x5725e40a
    };

    CdnConfig(CdnConfigClassType classType = typeCdnConfig, InboundPkt *in = 0);
    CdnConfig(InboundPkt *in);
    CdnConfig(const Null&);
    CdnConfig(const CdnConfig &another);
    virtual ~CdnConfig();

    void setPublicKeys(const QList<CdnPublicKey> &publicKeys);
    QList<CdnPublicKey> publicKeys() const;

    void setClassType(CdnConfigClassType classType);
    CdnConfigClassType classType() const;

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

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

    bool operator ==(const CdnConfig &b) const;
    CdnConfig &operator =(const CdnConfig &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:
    QList<CdnPublicKey> m_publicKeys;
    CdnConfigClassType m_classType;
};

Q_DECLARE_METATYPE(CdnConfig)

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

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

#endif // LQTG_TYPE_CDNCONFIG
