// 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_PHONECALL_OBJECT
#define LQTG_TYPE_PHONECALL_OBJECT

#include "telegramtypeqobject.h"
#include "telegram/types/phonecall.h"

#include <QPointer>
#include "phoneconnectionobject.h"
#include "phonecallprotocolobject.h"
#include "phonecalldiscardreasonobject.h"

class LIBQTELEGRAMSHARED_EXPORT PhoneCallObject : public TelegramTypeQObject
{
    Q_OBJECT
    Q_ENUMS(PhoneCallClassType)
    Q_PROPERTY(qint64 accessHash READ accessHash WRITE setAccessHash NOTIFY accessHashChanged)
    Q_PROPERTY(qint32 adminId READ adminId WRITE setAdminId NOTIFY adminIdChanged)
    Q_PROPERTY(QList<PhoneConnection> alternativeConnections READ alternativeConnections WRITE setAlternativeConnections NOTIFY alternativeConnectionsChanged)
    Q_PROPERTY(PhoneConnectionObject* connection READ connection WRITE setConnection NOTIFY connectionChanged)
    Q_PROPERTY(qint32 date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(qint32 duration READ duration WRITE setDuration NOTIFY durationChanged)
    Q_PROPERTY(qint32 flags READ flags WRITE setFlags NOTIFY flagsChanged)
    Q_PROPERTY(QByteArray gAHash READ gAHash WRITE setGAHash NOTIFY gAHashChanged)
    Q_PROPERTY(QByteArray gAOrB READ gAOrB WRITE setGAOrB NOTIFY gAOrBChanged)
    Q_PROPERTY(QByteArray gB READ gB WRITE setGB NOTIFY gBChanged)
    Q_PROPERTY(qint64 id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(qint64 keyFingerprint READ keyFingerprint WRITE setKeyFingerprint NOTIFY keyFingerprintChanged)
    Q_PROPERTY(bool needDebug READ needDebug WRITE setNeedDebug NOTIFY needDebugChanged)
    Q_PROPERTY(bool needRating READ needRating WRITE setNeedRating NOTIFY needRatingChanged)
    Q_PROPERTY(qint32 participantId READ participantId WRITE setParticipantId NOTIFY participantIdChanged)
    Q_PROPERTY(PhoneCallProtocolObject* protocol READ protocol WRITE setProtocol NOTIFY protocolChanged)
    Q_PROPERTY(PhoneCallDiscardReasonObject* reason READ reason WRITE setReason NOTIFY reasonChanged)
    Q_PROPERTY(qint32 receiveDate READ receiveDate WRITE setReceiveDate NOTIFY receiveDateChanged)
    Q_PROPERTY(qint32 startDate READ startDate WRITE setStartDate NOTIFY startDateChanged)
    Q_PROPERTY(PhoneCall core READ core WRITE setCore NOTIFY coreChanged)
    Q_PROPERTY(quint32 classType READ classType WRITE setClassType NOTIFY classTypeChanged)

public:
    enum PhoneCallClassType {
        TypePhoneCallEmpty,
        TypePhoneCallWaiting,
        TypePhoneCallRequested,
        TypePhoneCallAccepted,
        TypePhoneCall,
        TypePhoneCallDiscarded
    };

    PhoneCallObject(const PhoneCall &core, QObject *parent = 0);
    PhoneCallObject(QObject *parent = 0);
    virtual ~PhoneCallObject();

    void setAccessHash(qint64 accessHash);
    qint64 accessHash() const;

    void setAdminId(qint32 adminId);
    qint32 adminId() const;

    void setAlternativeConnections(const QList<PhoneConnection> &alternativeConnections);
    QList<PhoneConnection> alternativeConnections() const;

    void setConnection(PhoneConnectionObject* connection);
    PhoneConnectionObject* connection() const;

    void setDate(qint32 date);
    qint32 date() const;

    void setDuration(qint32 duration);
    qint32 duration() const;

    void setFlags(qint32 flags);
    qint32 flags() const;

    void setGAHash(const QByteArray &gAHash);
    QByteArray gAHash() const;

    void setGAOrB(const QByteArray &gAOrB);
    QByteArray gAOrB() const;

    void setGB(const QByteArray &gB);
    QByteArray gB() const;

    void setId(qint64 id);
    qint64 id() const;

    void setKeyFingerprint(qint64 keyFingerprint);
    qint64 keyFingerprint() const;

    void setNeedDebug(bool needDebug);
    bool needDebug() const;

    void setNeedRating(bool needRating);
    bool needRating() const;

    void setParticipantId(qint32 participantId);
    qint32 participantId() const;

    void setProtocol(PhoneCallProtocolObject* protocol);
    PhoneCallProtocolObject* protocol() const;

    void setReason(PhoneCallDiscardReasonObject* reason);
    PhoneCallDiscardReasonObject* reason() const;

    void setReceiveDate(qint32 receiveDate);
    qint32 receiveDate() const;

    void setStartDate(qint32 startDate);
    qint32 startDate() const;

    void setClassType(quint32 classType);
    quint32 classType() const;

    void setCore(const PhoneCall &core);
    PhoneCall core() const;

    PhoneCallObject &operator =(const PhoneCall &b);
    bool operator ==(const PhoneCall &b) const;

Q_SIGNALS:
    void coreChanged();
    void classTypeChanged();
    void accessHashChanged();
    void adminIdChanged();
    void alternativeConnectionsChanged();
    void connectionChanged();
    void dateChanged();
    void durationChanged();
    void flagsChanged();
    void gAHashChanged();
    void gAOrBChanged();
    void gBChanged();
    void idChanged();
    void keyFingerprintChanged();
    void needDebugChanged();
    void needRatingChanged();
    void participantIdChanged();
    void protocolChanged();
    void reasonChanged();
    void receiveDateChanged();
    void startDateChanged();

private Q_SLOTS:
    void coreConnectionChanged();
    void coreProtocolChanged();
    void coreReasonChanged();

private:
    QPointer<PhoneConnectionObject> m_connection;
    QPointer<PhoneCallProtocolObject> m_protocol;
    QPointer<PhoneCallDiscardReasonObject> m_reason;
    PhoneCall m_core;
};

#endif // LQTG_TYPE_PHONECALL_OBJECT
