// 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_NEARESTDC
#define LQTG_TYPE_NEARESTDC

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QString>
#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT NearestDc : public TelegramTypeObject
{
public:
    enum NearestDcClassType {
        typeNearestDc = 0x8e1a1775
    };

    NearestDc(NearestDcClassType classType = typeNearestDc, InboundPkt *in = 0);
    NearestDc(InboundPkt *in);
    NearestDc(const Null&);
    NearestDc(const NearestDc &another);
    virtual ~NearestDc();

    void setCountry(const QString &country);
    QString country() const;

    void setNearestDc(qint32 nearestDc);
    qint32 nearestDc() const;

    void setThisDc(qint32 thisDc);
    qint32 thisDc() const;

    void setClassType(NearestDcClassType classType);
    NearestDcClassType classType() const;

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

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

    bool operator ==(const NearestDc &b) const;
    NearestDc &operator =(const NearestDc &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_country;
    qint32 m_nearestDc;
    qint32 m_thisDc;
    NearestDcClassType m_classType;
};

Q_DECLARE_METATYPE(NearestDc)

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

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

#endif // LQTG_TYPE_NEARESTDC
