// 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_PHONEPHONECALL
#define LQTG_TYPE_PHONEPHONECALL

#include "telegramtypeobject.h"

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

#include <QDataStream>

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

class LIBQTELEGRAMSHARED_EXPORT PhonePhoneCall : public TelegramTypeObject
{
public:
    enum PhonePhoneCallClassType {
        typePhonePhoneCall = 0xec82e140
    };

    PhonePhoneCall(PhonePhoneCallClassType classType = typePhonePhoneCall, InboundPkt *in = 0);
    PhonePhoneCall(InboundPkt *in);
    PhonePhoneCall(const Null&);
    PhonePhoneCall(const PhonePhoneCall &another);
    virtual ~PhonePhoneCall();

    void setPhoneCall(const PhoneCall &phoneCall);
    PhoneCall phoneCall() const;

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

    void setClassType(PhonePhoneCallClassType classType);
    PhonePhoneCallClassType classType() const;

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

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

    bool operator ==(const PhonePhoneCall &b) const;
    PhonePhoneCall &operator =(const PhonePhoneCall &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:
    PhoneCall m_phoneCall;
    QList<User> m_users;
    PhonePhoneCallClassType m_classType;
};

Q_DECLARE_METATYPE(PhonePhoneCall)

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

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

#endif // LQTG_TYPE_PHONEPHONECALL
