// 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_GEOPOINT
#define LQTG_TYPE_GEOPOINT

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>

class LIBQTELEGRAMSHARED_EXPORT GeoPoint : public TelegramTypeObject
{
public:
    enum GeoPointClassType {
        typeGeoPointEmpty = 0x1117dd5f,
        typeGeoPoint = 0x2049d70c
    };

    GeoPoint(GeoPointClassType classType = typeGeoPointEmpty, InboundPkt *in = 0);
    GeoPoint(InboundPkt *in);
    GeoPoint(const Null&);
    GeoPoint(const GeoPoint &another);
    virtual ~GeoPoint();

    void setLat(qreal lat);
    qreal lat() const;

    void setLongValue(qreal longValue);
    qreal longValue() const;

    void setClassType(GeoPointClassType classType);
    GeoPointClassType classType() const;

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

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

    bool operator ==(const GeoPoint &b) const;
    GeoPoint &operator =(const GeoPoint &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:
    qreal m_lat;
    qreal m_longValue;
    GeoPointClassType m_classType;
};

Q_DECLARE_METATYPE(GeoPoint)

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

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

#endif // LQTG_TYPE_GEOPOINT
