/*
 * Copyright (C) 2024 UBPorts Foundation
 *
 * WARNING: This is a generated file. Do not modify directly.
 * Any changes made to this file will be overwritten.
 * 
 * Generated on: 2024-07-26
 * Generated by: TELEports tlparser.py
 * 
 * For any modifications, please edit the source templates and regenerate this file.
 */

#ifndef QTDCHATMEMBERSTATUS_H
#define QTDCHATMEMBERSTATUS_H

#include <QObject>
#include <QList>
#include "common/qabstracttdobject.h"

#include "qtdchatadministratorrights.h"
#include "qtdchatpermissions.h"

    class QTdChatMemberStatus : public QTdObject {
    Q_OBJECT

public:
    explicit QTdChatMemberStatus(QObject *parent = nullptr);

    void unmarshalJson(const QJsonObject &json) override;
    QJsonObject marshalJson() override;

private:
    Q_DISABLE_COPY(QTdChatMemberStatus)

signals:
    void dataChanged();

};
class QTdChatMemberStatusCreator : public QTdChatMemberStatus {
    Q_OBJECT
    Q_PROPERTY(QString customTitle READ customTitle WRITE setCustomTitle NOTIFY dataChanged)
    Q_PROPERTY(bool isAnonymous READ isAnonymous WRITE setIsAnonymous NOTIFY dataChanged)
    Q_PROPERTY(bool isMember READ isMember WRITE setIsMember NOTIFY dataChanged)

public:
    explicit QTdChatMemberStatusCreator(QObject *parent = nullptr);
    explicit QTdChatMemberStatusCreator(QObject *parent, QString customTitle_, bool isAnonymous_, bool isMember_);

    QString customTitle() const;
    void setCustomTitle(QString value);
    bool isAnonymous() const;
    void setIsAnonymous(bool value);
    bool isMember() const;
    void setIsMember(bool value);

    void unmarshalJson(const QJsonObject &json) override;
    QJsonObject marshalJson() override;

private:
    Q_DISABLE_COPY(QTdChatMemberStatusCreator)
    QString m_customTitle;
    bool m_isAnonymous;
    bool m_isMember;

signals:
    void dataChanged();

};
class QTdChatMemberStatusAdministrator : public QTdChatMemberStatus {
    Q_OBJECT
    Q_PROPERTY(QString customTitle READ customTitle WRITE setCustomTitle NOTIFY dataChanged)
    Q_PROPERTY(bool canBeEdited READ canBeEdited WRITE setCanBeEdited NOTIFY dataChanged)
    Q_PROPERTY(QTdChatAdministratorRights* rights READ rights WRITE setRights NOTIFY dataChanged)

public:
    explicit QTdChatMemberStatusAdministrator(QObject *parent = nullptr);
    explicit QTdChatMemberStatusAdministrator(QObject *parent, QString customTitle_, bool canBeEdited_, QTdChatAdministratorRights* rights_);

    QString customTitle() const;
    void setCustomTitle(QString value);
    bool canBeEdited() const;
    void setCanBeEdited(bool value);
    QTdChatAdministratorRights* rights() const;
    void setRights(QTdChatAdministratorRights* value);

    void unmarshalJson(const QJsonObject &json) override;
    QJsonObject marshalJson() override;

private:
    Q_DISABLE_COPY(QTdChatMemberStatusAdministrator)
    QString m_customTitle;
    bool m_canBeEdited;
    QScopedPointer<QTdChatAdministratorRights> m_rights;

signals:
    void dataChanged();

};
class QTdChatMemberStatusMember : public QTdChatMemberStatus {
    Q_OBJECT

public:
    explicit QTdChatMemberStatusMember(QObject *parent = nullptr);

    void unmarshalJson(const QJsonObject &json) override;
    QJsonObject marshalJson() override;

private:
    Q_DISABLE_COPY(QTdChatMemberStatusMember)

signals:
    void dataChanged();

};
class QTdChatMemberStatusRestricted : public QTdChatMemberStatus {
    Q_OBJECT
    Q_PROPERTY(bool isMember READ isMember WRITE setIsMember NOTIFY dataChanged)
    Q_PROPERTY(qint32 restrictedUntilDate READ restrictedUntilDate WRITE setRestrictedUntilDate NOTIFY dataChanged)
    Q_PROPERTY(QTdChatPermissions* permissions READ permissions WRITE setPermissions NOTIFY dataChanged)

public:
    explicit QTdChatMemberStatusRestricted(QObject *parent = nullptr);
    explicit QTdChatMemberStatusRestricted(QObject *parent, bool isMember_, qint32 restrictedUntilDate_, QTdChatPermissions* permissions_);

    bool isMember() const;
    void setIsMember(bool value);
    qint32 restrictedUntilDate() const;
    void setRestrictedUntilDate(qint32 value);
    QTdChatPermissions* permissions() const;
    void setPermissions(QTdChatPermissions* value);

    void unmarshalJson(const QJsonObject &json) override;
    QJsonObject marshalJson() override;

private:
    Q_DISABLE_COPY(QTdChatMemberStatusRestricted)
    bool m_isMember;
    qint32 m_restrictedUntilDate;
    QScopedPointer<QTdChatPermissions> m_permissions;

signals:
    void dataChanged();

};
class QTdChatMemberStatusLeft : public QTdChatMemberStatus {
    Q_OBJECT

public:
    explicit QTdChatMemberStatusLeft(QObject *parent = nullptr);

    void unmarshalJson(const QJsonObject &json) override;
    QJsonObject marshalJson() override;

private:
    Q_DISABLE_COPY(QTdChatMemberStatusLeft)

signals:
    void dataChanged();

};
class QTdChatMemberStatusBanned : public QTdChatMemberStatus {
    Q_OBJECT
    Q_PROPERTY(qint32 bannedUntilDate READ bannedUntilDate WRITE setBannedUntilDate NOTIFY dataChanged)

public:
    explicit QTdChatMemberStatusBanned(QObject *parent = nullptr);
    explicit QTdChatMemberStatusBanned(QObject *parent, qint32 bannedUntilDate_);

    qint32 bannedUntilDate() const;
    void setBannedUntilDate(qint32 value);

    void unmarshalJson(const QJsonObject &json) override;
    QJsonObject marshalJson() override;

private:
    Q_DISABLE_COPY(QTdChatMemberStatusBanned)
    qint32 m_bannedUntilDate;

signals:
    void dataChanged();

};

struct QTdChatMemberStatusFactory
{
    static QTdChatMemberStatus *create(const QJsonObject &data, QObject *parent);
};

#endif // QTDCHATMEMBERSTATUS_H
