// 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_INPUTCONTACT
#define LQTG_TYPE_INPUTCONTACT

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include <QString>

class LIBQTELEGRAMSHARED_EXPORT InputContact : public TelegramTypeObject
{
public:
    enum InputContactClassType {
        typeInputPhoneContact = 0xf392b7f4
    };

    InputContact(InputContactClassType classType = typeInputPhoneContact, InboundPkt *in = 0);
    InputContact(InboundPkt *in);
    InputContact(const Null&);
    InputContact(const InputContact &another);
    virtual ~InputContact();

    void setClientId(qint64 clientId);
    qint64 clientId() const;

    void setFirstName(const QString &firstName);
    QString firstName() const;

    void setLastName(const QString &lastName);
    QString lastName() const;

    void setPhone(const QString &phone);
    QString phone() const;

    void setClassType(InputContactClassType classType);
    InputContactClassType classType() const;

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

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

    bool operator ==(const InputContact &b) const;
    InputContact &operator =(const InputContact &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:
    qint64 m_clientId;
    QString m_firstName;
    QString m_lastName;
    QString m_phone;
    InputContactClassType m_classType;
};

Q_DECLARE_METATYPE(InputContact)

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

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

#endif // LQTG_TYPE_INPUTCONTACT
