// 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_MESSAGESHIGHSCORES
#define LQTG_TYPE_MESSAGESHIGHSCORES

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QList>
#include "highscore.h"
#include "user.h"

class LIBQTELEGRAMSHARED_EXPORT MessagesHighScores : public TelegramTypeObject
{
public:
    enum MessagesHighScoresClassType {
        typeMessagesHighScores = 0x9a3bfd99
    };

    MessagesHighScores(MessagesHighScoresClassType classType = typeMessagesHighScores, InboundPkt *in = 0);
    MessagesHighScores(InboundPkt *in);
    MessagesHighScores(const Null&);
    MessagesHighScores(const MessagesHighScores &another);
    virtual ~MessagesHighScores();

    void setScores(const QList<HighScore> &scores);
    QList<HighScore> scores() const;

    void setUsers(const QList<User> &users);
    QList<User> users() const;

    void setClassType(MessagesHighScoresClassType classType);
    MessagesHighScoresClassType classType() const;

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

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

    bool operator ==(const MessagesHighScores &b) const;
    MessagesHighScores &operator =(const MessagesHighScores &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<HighScore> m_scores;
    QList<User> m_users;
    MessagesHighScoresClassType m_classType;
};

Q_DECLARE_METATYPE(MessagesHighScores)

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

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

#endif // LQTG_TYPE_MESSAGESHIGHSCORES
