// 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_CONFIG
#define LQTG_TYPE_CONFIG

#include "telegramtypeobject.h"

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

#include <QDataStream>

#include <QtGlobal>
#include <QList>
#include "dcoption.h"
#include "disabledfeature.h"
#include <QString>

class LIBQTELEGRAMSHARED_EXPORT Config : public TelegramTypeObject
{
public:
    enum ConfigClassType {
        typeConfig = 0x7feec888
    };

    Config(ConfigClassType classType = typeConfig, InboundPkt *in = 0);
    Config(InboundPkt *in);
    Config(const Null&);
    Config(const Config &another);
    virtual ~Config();

    void setCallConnectTimeoutMs(qint32 callConnectTimeoutMs);
    qint32 callConnectTimeoutMs() const;

    void setCallPacketTimeoutMs(qint32 callPacketTimeoutMs);
    qint32 callPacketTimeoutMs() const;

    void setCallReceiveTimeoutMs(qint32 callReceiveTimeoutMs);
    qint32 callReceiveTimeoutMs() const;

    void setCallRingTimeoutMs(qint32 callRingTimeoutMs);
    qint32 callRingTimeoutMs() const;

    void setChatBigSize(qint32 chatBigSize);
    qint32 chatBigSize() const;

    void setChatSizeMax(qint32 chatSizeMax);
    qint32 chatSizeMax() const;

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

    void setDcOptions(const QList<DcOption> &dcOptions);
    QList<DcOption> dcOptions() const;

    void setDisabledFeatures(const QList<DisabledFeature> &disabledFeatures);
    QList<DisabledFeature> disabledFeatures() const;

    void setEditTimeLimit(qint32 editTimeLimit);
    qint32 editTimeLimit() const;

    void setExpires(qint32 expires);
    qint32 expires() const;

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

    void setForwardedCountMax(qint32 forwardedCountMax);
    qint32 forwardedCountMax() const;

    void setLangPackVersion(qint32 langPackVersion);
    qint32 langPackVersion() const;

    void setMeUrlPrefix(const QString &meUrlPrefix);
    QString meUrlPrefix() const;

    void setMegagroupSizeMax(qint32 megagroupSizeMax);
    qint32 megagroupSizeMax() const;

    void setNotifyCloudDelayMs(qint32 notifyCloudDelayMs);
    qint32 notifyCloudDelayMs() const;

    void setNotifyDefaultDelayMs(qint32 notifyDefaultDelayMs);
    qint32 notifyDefaultDelayMs() const;

    void setOfflineBlurTimeoutMs(qint32 offlineBlurTimeoutMs);
    qint32 offlineBlurTimeoutMs() const;

    void setOfflineIdleTimeoutMs(qint32 offlineIdleTimeoutMs);
    qint32 offlineIdleTimeoutMs() const;

    void setOnlineCloudTimeoutMs(qint32 onlineCloudTimeoutMs);
    qint32 onlineCloudTimeoutMs() const;

    void setOnlineUpdatePeriodMs(qint32 onlineUpdatePeriodMs);
    qint32 onlineUpdatePeriodMs() const;

    void setPhonecallsEnabled(bool phonecallsEnabled);
    bool phonecallsEnabled() const;

    void setPinnedDialogsCountMax(qint32 pinnedDialogsCountMax);
    qint32 pinnedDialogsCountMax() const;

    void setPushChatLimit(qint32 pushChatLimit);
    qint32 pushChatLimit() const;

    void setPushChatPeriodMs(qint32 pushChatPeriodMs);
    qint32 pushChatPeriodMs() const;

    void setRatingEDecay(qint32 ratingEDecay);
    qint32 ratingEDecay() const;

    void setSavedGifsLimit(qint32 savedGifsLimit);
    qint32 savedGifsLimit() const;

    void setStickersRecentLimit(qint32 stickersRecentLimit);
    qint32 stickersRecentLimit() const;

    void setSuggestedLangCode(const QString &suggestedLangCode);
    QString suggestedLangCode() const;

    void setTestMode(bool testMode);
    bool testMode() const;

    void setThisDc(qint32 thisDc);
    qint32 thisDc() const;

    void setTmpSessions(qint32 tmpSessions);
    qint32 tmpSessions() const;

    void setClassType(ConfigClassType classType);
    ConfigClassType classType() const;

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

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

    bool operator ==(const Config &b) const;
    Config &operator =(const Config &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:
    qint32 m_callConnectTimeoutMs;
    qint32 m_callPacketTimeoutMs;
    qint32 m_callReceiveTimeoutMs;
    qint32 m_callRingTimeoutMs;
    qint32 m_chatBigSize;
    qint32 m_chatSizeMax;
    qint32 m_date;
    QList<DcOption> m_dcOptions;
    QList<DisabledFeature> m_disabledFeatures;
    qint32 m_editTimeLimit;
    qint32 m_expires;
    qint32 m_flags;
    qint32 m_forwardedCountMax;
    qint32 m_langPackVersion;
    QString m_meUrlPrefix;
    qint32 m_megagroupSizeMax;
    qint32 m_notifyCloudDelayMs;
    qint32 m_notifyDefaultDelayMs;
    qint32 m_offlineBlurTimeoutMs;
    qint32 m_offlineIdleTimeoutMs;
    qint32 m_onlineCloudTimeoutMs;
    qint32 m_onlineUpdatePeriodMs;
    qint32 m_pinnedDialogsCountMax;
    qint32 m_pushChatLimit;
    qint32 m_pushChatPeriodMs;
    qint32 m_ratingEDecay;
    qint32 m_savedGifsLimit;
    qint32 m_stickersRecentLimit;
    QString m_suggestedLangCode;
    bool m_testMode;
    qint32 m_thisDc;
    qint32 m_tmpSessions;
    ConfigClassType m_classType;
};

Q_DECLARE_METATYPE(Config)

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

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

#endif // LQTG_TYPE_CONFIG
