
// Workaround to access protected functions
#ifndef protected
#  define protected public
#endif

// default includes
#include <shiboken.h>
#include <sbkpep.h>
#include <sbkpepbuffer.h>

#define PYSIDE6_COMOPT_COMPRESS 1

#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QtCore/QDebug>
#include <pysideqobject.h>
#include <pysidesignal.h>
#include <pysideproperty.h>
#include <signalmanager.h>
#include <pysidemetafunction.h>
#include <pysideqenum.h>
#include <pysideutils.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED


// module include
#include "akonadicore_python.h"

// main header
#include "akonadi_tagcache_wrapper.h"

// Wrappers providing overrides
#include "akonadi_trashfilterproxymodel_wrapper.h"

// Argument includes
#include <QString>
#include <qbytearray.h>
#include <qcolor.h>
#include <qmetaobject.h>
#include <qobject.h>
#include <qobjectdefs.h>
#include <tag.h>
#include <tagcache.h>

#include <cctype>
#include <cstring>
#include <iterator>
#include <type_traits>
#include <typeinfo>

using namespace Akonadi;

extern "C" {
static PyTypeObject *Sbk_Akonadi_TagCache_TypeF(void)
{
    return SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX].type;
}
} // extern "C"

// Native ---------------------------------------------------------

void TagCacheWrapper::resetPyMethodCache()
{
    std::fill(m_PyMethodCache.begin(), m_PyMethodCache.end(), nullptr);
}

TagCacheWrapper::TagCacheWrapper(::QObject * parent) : Akonadi::TagCache(parent)
{
}

void TagCacheWrapper::childEvent(::QChildEvent * event)
{
    static const char *funcName = "childEvent";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_TagCache_TypeF(), gil, funcName, m_PyMethodCache[0], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::childEvent(event);
    }
    TrashFilterProxyModelWrapper::sbk_o_childEvent("TagCache", funcName, gil, pyOverride, event);
}

void TagCacheWrapper::connectNotify(const ::QMetaMethod & signal)
{
    static const char *funcName = "connectNotify";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_TagCache_TypeF(), gil, funcName, m_PyMethodCache[1], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::connectNotify(signal);
    }
    TrashFilterProxyModelWrapper::sbk_o_connectNotify("TagCache", funcName, gil, pyOverride, signal);
}

void TagCacheWrapper::customEvent(::QEvent * event)
{
    static const char *funcName = "customEvent";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_TagCache_TypeF(), gil, funcName, m_PyMethodCache[2], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::customEvent(event);
    }
    TrashFilterProxyModelWrapper::sbk_o_customEvent("TagCache", funcName, gil, pyOverride, event);
}

void TagCacheWrapper::disconnectNotify(const ::QMetaMethod & signal)
{
    static const char *funcName = "disconnectNotify";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_TagCache_TypeF(), gil, funcName, m_PyMethodCache[3], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::disconnectNotify(signal);
    }
    TrashFilterProxyModelWrapper::sbk_o_connectNotify("TagCache", funcName, gil, pyOverride, signal);
}

bool TagCacheWrapper::event(::QEvent * event)
{
    static const char *funcName = "event";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_TagCache_TypeF(), gil, funcName, m_PyMethodCache[4], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::event(event);
    }
    return TrashFilterProxyModelWrapper::sbk_o_event("TagCache", funcName, gil, pyOverride, event);
}

bool TagCacheWrapper::eventFilter(::QObject * watched, ::QEvent * event)
{
    static const char *funcName = "eventFilter";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_TagCache_TypeF(), gil, funcName, m_PyMethodCache[5], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::eventFilter(watched, event);
    }
    return TrashFilterProxyModelWrapper::sbk_o_eventFilter("TagCache", funcName, gil, pyOverride, watched, event);
}

void TagCacheWrapper::timerEvent(::QTimerEvent * event)
{
    static const char *funcName = "timerEvent";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_TagCache_TypeF(), gil, funcName, m_PyMethodCache[6], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::timerEvent(event);
    }
    TrashFilterProxyModelWrapper::sbk_o_timerEvent("TagCache", funcName, gil, pyOverride, event);
}

const QMetaObject *TagCacheWrapper::metaObject() const
{
    if (QObject::d_ptr->metaObject != nullptr)
        return QObject::d_ptr->dynamicMetaObject();
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf == nullptr)
        return Akonadi::TagCache::metaObject();
    return PySide::SignalManager::retrieveMetaObject(reinterpret_cast<PyObject *>(pySelf));
}

int TagCacheWrapper::qt_metacall(QMetaObject::Call call, int id, void **args)
{
    int result = Akonadi::TagCache::qt_metacall(call, id, args);
    return result < 0 ? result : PySide::SignalManager::qt_metacall(this, call, id, args);
}

void *TagCacheWrapper::qt_metacast(const char *_clname)
{
    if (_clname == nullptr)
        return {};
    if (SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this)) {
        auto *obSelf = reinterpret_cast<PyObject *>(pySelf);
        if (PySide::inherits(Py_TYPE(obSelf), _clname))
            return static_cast<void *>(const_cast< TagCacheWrapper *>(this));
    }
    return Akonadi::TagCache::qt_metacast(_clname);
}

TagCacheWrapper::~TagCacheWrapper()
{
    auto *wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this, Sbk_Akonadi_TagCache_TypeF());
    Shiboken::Object::destroy(wrapper, this);
}

// Target ---------------------------------------------------------

extern "C" {
static int
Sbk_Akonadi_TagCache_Init(PyObject *self, PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    auto *sbkSelf = reinterpret_cast<SbkObject *>(self);
    PySide::Feature::Select(self);
    if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Akonadi::TagCache >()))
        return -1;

    TagCacheWrapper *cptr{};
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    const Py_ssize_t numArgs = PyTuple_Size(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {nullptr};

    // invalid argument lengths

    if (PyArg_ParseTuple(args, "|O:TagCache", &(pyArgs[0])) == 0)
        return -1;


    // Overloaded function decisor
    // 0: TagCache::TagCache(QObject*=)
    if (numArgs == 0) {
        overloadId = 0; // TagCache(QObject*)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[0])))) {
        overloadId = 0; // TagCache::TagCache(QObject*=)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments_MinusOne(args, "__init__", SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]);

    // Resolve keyword arguments
    {
        if (kwds != nullptr && PyDict_Size(kwds) > 0) {
            static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"parent", 0}};
            if (!Shiboken::parseConstructorKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                || (pyArgs[0] != nullptr && !((pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[0])))))) {
                Py_XINCREF(errInfo.object());
                return Shiboken::returnWrongArguments_MinusOne(args, "__init__", errInfo, SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]);
            }
        }
    }

    // PyMI support
    [[maybe_unused]] const bool usesPyMI = Shiboken::callInheritedInit(self, args, errInfo.isNull() ? kwds : errInfo.object(), SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]);
    if (Shiboken::Errors::occurred() != nullptr)
        return -1;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return -1;
        ::QObject *cppArg0 = nullptr;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // TagCache::TagCache(QObject*=)
            void *addr = PySide::nextQObjectMemoryAddr();
            if (addr != nullptr) {
                cptr = new (addr) TagCacheWrapper(cppArg0);
                PySide::setNextQObjectMemoryAddr(nullptr);
            } else {
                cptr = new TagCacheWrapper(cppArg0);
            }

        }
    }

    if (Shiboken::Errors::occurred() != nullptr || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< Akonadi::TagCache >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (cptr == nullptr)
        return Shiboken::returnWrongArguments_MinusOne(args, "__init__", SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]);

    Shiboken::Object::setValidCpp(sbkSelf, true);
    Shiboken::Object::setHasCppWrapper(sbkSelf, true);
    Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);

    // QObject setup
    PySide::Signal::updateSourceObject(self);
    const auto *metaObject = cptr->metaObject(); // <- init python qt properties
    if (!errInfo.isNull() && PyDict_Check(errInfo.object())) {
        if (!PySide::fillQtProperties(self, metaObject, errInfo, usesPyMI))
            return Shiboken::returnWrongArguments_MinusOne(args, "__init__", errInfo, SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]);
    };


    return 1;
}

static PyObject *Sbk_Akonadi_TagCacheFunc_instance([[maybe_unused]] PyObject *self)
{
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // static TagCache::instance()->Akonadi::TagCache*
        Akonadi::TagCache * cppResult = ::Akonadi::TagCache::instance();
        pyResult = Shiboken::Conversions::pointerToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]), cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_Akonadi_TagCacheFunc_setTagColor(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::TagCache *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]), reinterpret_cast<SbkObject *>(self)));
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    const Py_ssize_t numArgs = PyTuple_Size(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {nullptr, nullptr};

    // invalid argument lengths

    if (PyArg_UnpackTuple(args, "setTagColor", 2, 2, &(pyArgs[0]), &(pyArgs[1])) == 0)
        return {};


    // Overloaded function decisor
    // 0: TagCache::setTagColor(const QString&,const QColor&)
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkPySide6_QtGuiTypeStructs[SBK_QColor_IDX]), (pyArgs[1])))) {
        overloadId = 0; // TagCache::setTagColor(const QString&,const QColor&)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(args, "setTagColor", SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]);

    // Call function/method
    {
        ::QString cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        if (!Shiboken::Object::isValid(pyArgs[1]))
            return {};
        ::QColor cppArg1_local;
        ::QColor *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            pythonToCpp[1](pyArgs[1], &cppArg1);


        if (Shiboken::Errors::occurred() == nullptr) {
            // TagCache::setTagColor(const QString&,const QColor&)
            cppSelf->setTagColor(cppArg0, *cppArg1);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_Akonadi_TagCacheFunc_tagByGid(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::TagCache *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

    // Overloaded function decisor
    // 0: TagCache::tagByGid(const QByteArray&)const->Akonadi::Tag
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), (pyArg)))) {
        overloadId = 0; // TagCache::tagByGid(const QByteArray&)const->Akonadi::Tag
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "tagByGid", SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]);

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::QByteArray cppArg0_local;
        ::QByteArray *cppArg0 = &cppArg0_local;
        if (pythonToCpp.isValue())
            pythonToCpp(pyArg, &cppArg0_local);
        else
            pythonToCpp(pyArg, &cppArg0);


        if (Shiboken::Errors::occurred() == nullptr) {
            // TagCache::tagByGid(const QByteArray&)const->Akonadi::Tag
            Akonadi::Tag cppResult = const_cast<const ::Akonadi::TagCache *>(cppSelf)->tagByGid(*cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_Akonadi_TagCacheFunc_tagByName(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::TagCache *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

    // Overloaded function decisor
    // 0: TagCache::tagByName(const QString&)const->Akonadi::Tag
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], (pyArg)))) {
        overloadId = 0; // TagCache::tagByName(const QString&)const->Akonadi::Tag
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "tagByName", SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]);

    // Call function/method
    {
        ::QString cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // TagCache::tagByName(const QString&)const->Akonadi::Tag
            Akonadi::Tag cppResult = const_cast<const ::Akonadi::TagCache *>(cppSelf)->tagByName(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_Akonadi_TagCacheFunc_tagColor(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::TagCache *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

    // Overloaded function decisor
    // 0: TagCache::tagColor(const QString&)const->QColor
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], (pyArg)))) {
        overloadId = 0; // TagCache::tagColor(const QString&)const->QColor
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "tagColor", SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]);

    // Call function/method
    {
        ::QString cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // TagCache::tagColor(const QString&)const->QColor
            QColor cppResult = const_cast<const ::Akonadi::TagCache *>(cppSelf)->tagColor(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkPySide6_QtGuiTypeStructs[SBK_QColor_IDX]), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}


static const char *Sbk_Akonadi_TagCache_PropertyStrings[] = {
    nullptr // Sentinel
};

static PyMethodDef Sbk_Akonadi_TagCache_methods[] = {
    {"instance", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagCacheFunc_instance), METH_NOARGS|METH_STATIC, nullptr},
    {"setTagColor", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagCacheFunc_setTagColor), METH_VARARGS, nullptr},
    {"tagByGid", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagCacheFunc_tagByGid), METH_O, nullptr},
    {"tagByName", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagCacheFunc_tagByName), METH_O, nullptr},
    {"tagColor", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagCacheFunc_tagColor), METH_O, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static int Sbk_Akonadi_TagCache_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value != nullptr && PyCallable_Check(value) != 0) {
        auto plain_inst = reinterpret_cast< ::Akonadi::TagCache *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX]), reinterpret_cast<SbkObject *>(self)));
        auto *inst = dynamic_cast<TagCacheWrapper *>(plain_inst);
        if (inst != nullptr)
            inst->resetPyMethodCache();
    }
    Shiboken::AutoDecRef pp(reinterpret_cast<PyObject *>(PySide::Property::getObject(self, name)));
    if (!pp.isNull())
        return PySide::Property::setValue(reinterpret_cast<PySideProperty *>(pp.object()), self, value);
    return PyObject_GenericSetAttr(self, name, value);
}

} // extern "C"

static int Sbk_Akonadi_TagCache_traverse(PyObject *self, visitproc visit, void *arg)
{
    auto traverseProc = reinterpret_cast<traverseproc>(PyType_GetSlot(SbkObject_TypeF(), Py_tp_traverse));
    ;
    return traverseProc(self, visit, arg);
}
static int Sbk_Akonadi_TagCache_clear(PyObject *self)
{
    auto clearProc = reinterpret_cast<inquiry>(PyType_GetSlot(SbkObject_TypeF(), Py_tp_clear));
    ;
    return clearProc(self);
}

// Class Definition -----------------------------------------------
extern "C" {

static PyType_Slot Sbk_Akonadi_TagCache_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_Akonadi_TagCache_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_TagCache_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_TagCache_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_TagCache_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_TagCache_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObject_tp_new)},
    {0, nullptr}
};
static PyType_Spec Sbk_Akonadi_TagCache_spec = {
    "1:AkonadiCore.Akonadi.TagCache",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_TagCache_slots
};

} //extern "C"

static void *Sbk_Akonadi_TagCache_typeDiscovery([[maybe_unused]] void *cptr, [[maybe_unused]] PyTypeObject *instanceType)
{
    if (instanceType == Shiboken::SbkType< ::QObject >())
        return dynamic_cast< ::Akonadi::TagCache *>(reinterpret_cast< ::QObject *>(cptr));
    return {};
}


// Type conversion functions.

// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void TagCache_PythonToCpp_TagCache_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_Akonadi_TagCache_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_TagCache_PythonToCpp_TagCache_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, Sbk_Akonadi_TagCache_TypeF()))
        return TagCache_PythonToCpp_TagCache_PTR;
    return {};
}

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *TagCache_PTR_CppToPython_TagCache(const void *cppIn)
{
    return PySide::getWrapperForQObject(reinterpret_cast<::Akonadi::TagCache *>(const_cast<void *>(cppIn)), Sbk_Akonadi_TagCache_TypeF());

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *Akonadi_TagCache_SignatureStrings[] = {
    "AkonadiCore.Akonadi.TagCache(self,parent:PySide6.QtCore.QObject=nullptr)",
    "AkonadiCore.Akonadi.TagCache.instance()->AkonadiCore.Akonadi.TagCache",
    "AkonadiCore.Akonadi.TagCache.setTagColor(self,tagName:QString,color:typing.Union[PySide6.QtGui.QColor, QLatin1String, PySide6.QtGui.QRgba64, QVariant, PySide6.QtCore.Qt.GlobalColor, QString, unsigned int])",
    "AkonadiCore.Akonadi.TagCache.tagByGid(self,gid:typing.Union[PySide6.QtCore.QByteArray, char*])->AkonadiCore.Akonadi.Tag",
    "AkonadiCore.Akonadi.TagCache.tagByName(self,name:QString)->AkonadiCore.Akonadi.Tag",
    "AkonadiCore.Akonadi.TagCache.tagColor(self,tagName:QString)->PySide6.QtGui.QColor",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_TagCache_SignatureByteSize = 248;
static constexpr uint8_t Akonadi_TagCache_SignatureBytes[248] = {
    0x78, 0xda, 0xa5, 0x91, 0x41, 0x4f, 0xc3, 0x30, 0x0c, 0x85, 0xef, 0xfb, 0x15, 0x3d, 0x6e, 0xa8,
    0x44, 0x42, 0x42, 0x3b, 0x54, 0x02, 0xa9, 0xdb, 0xa1, 0x17, 0x04, 0x94, 0x01, 0x17, 0xb4, 0x83,
    0xdb, 0x98, 0xcc, 0x10, 0x9c, 0x2a, 0x75, 0x0f, 0xf9, 0xf7, 0xb4, 0x0b, 0x13, 0x13, 0xa2, 0x1d,
    0x12, 0x37, 0x47, 0x79, 0xfe, 0xfc, 0xfc, 0x9c, 0xbf, 0x3b, 0x06, 0x4d, 0x6b, 0xe7, 0x51, 0xe5,
    0xb1, 0x56, 0x8f, 0x60, 0xd6, 0x50, 0xef, 0x70, 0xde, 0xa2, 0x7d, 0x4d, 0x1b, 0xf0, 0xc8, 0x92,
    0xdd, 0x87, 0x0d, 0x69, 0x5c, 0xaa, 0x52, 0xf6, 0xda, 0xf2, 0xae, 0x7a, 0xc3, 0x5a, 0xae, 0xb8,
    0xb3, 0xb6, 0x11, 0xbf, 0x98, 0xe5, 0x13, 0x20, 0x45, 0xdc, 0x0a, 0x70, 0x8d, 0xf3, 0xc5, 0xf9,
    0xf5, 0x94, 0x70, 0x9a, 0xd2, 0xa2, 0x0c, 0xb5, 0xb3, 0xce, 0x47, 0x6b, 0x02, 0xe6, 0x16, 0x3e,
    0x30, 0x2b, 0x37, 0xe2, 0x89, 0x4d, 0x5a, 0x0f, 0x5f, 0x99, 0x84, 0xa6, 0x7f, 0xa8, 0x27, 0x26,
    0xc7, 0x2f, 0xdf, 0xb6, 0x8b, 0x8e, 0x54, 0xb9, 0x6f, 0x4e, 0x93, 0xf2, 0x06, 0x84, 0xf8, 0xe2,
    0xab, 0x2d, 0xf9, 0x21, 0x7a, 0x30, 0x15, 0x2c, 0x2f, 0x7b, 0xd5, 0x33, 0x78, 0x02, 0x96, 0x63,
    0x41, 0x5c, 0x5e, 0x54, 0x61, 0x5d, 0x05, 0xf6, 0x80, 0x3b, 0x80, 0x3a, 0x6e, 0xc9, 0x30, 0xea,
    0x84, 0x58, 0xb6, 0x27, 0x32, 0xe9, 0xcd, 0xaf, 0x42, 0x41, 0x3a, 0xae, 0x62, 0x48, 0x8f, 0x19,
    0x8f, 0x23, 0x57, 0x41, 0x30, 0xf7, 0x1e, 0x42, 0x9a, 0xd4, 0x3b, 0xf0, 0x67, 0xdb, 0xf1, 0x28,
    0xff, 0x30, 0x77, 0x88, 0x2d, 0x0e, 0xe6, 0xa3, 0x00, 0xff, 0x81, 0x1c, 0xbf, 0x4a, 0x0f, 0xfd,
    0xed, 0x08, 0xb3, 0x4f, 0xd8, 0x35, 0xe1, 0x5b
};
#endif

PyTypeObject *init_Akonadi_TagCache(PyObject *enclosingClass)
{
    auto &typeStruct = SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagCache_IDX];
    if (typeStruct.type != nullptr)
        return typeStruct.type;

    auto *base1 = reinterpret_cast<PyObject *>(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]));
    Shiboken::AutoDecRef Sbk_Akonadi_TagCache_Type_bases(PyTuple_Pack(1, base1));

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "TagCache",
        "Akonadi::TagCache*",
        &Sbk_Akonadi_TagCache_spec,
        &Shiboken::callCppDestructor< Akonadi::TagCache >,
        Sbk_Akonadi_TagCache_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_TagCache_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_TagCache_SignatureBytes, Akonadi_TagCache_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_TagCache_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        TagCache_PythonToCpp_TagCache_PTR,
        is_TagCache_PythonToCpp_TagCache_PTR_Convertible,
        TagCache_PTR_CppToPython_TagCache);

    Shiboken::Conversions::registerConverterName(converter, "Akonadi::TagCache");
    Shiboken::Conversions::registerConverterName(converter, "Akonadi::TagCache*");
    Shiboken::Conversions::registerConverterName(converter, "Akonadi::TagCache&");
    Shiboken::Conversions::registerConverterAlias(converter, "TagCache");
    Shiboken::Conversions::registerConverterAlias(converter, "TagCache*");
    Shiboken::Conversions::registerConverterAlias(converter, "TagCache&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::Akonadi::TagCache).name());
    Shiboken::Conversions::registerConverterName(converter, typeid(TagCacheWrapper).name());

    Shiboken::ObjectType::setTypeDiscoveryFunctionV2(pyType, &Sbk_Akonadi_TagCache_typeDiscovery);

    Shiboken::ObjectType::setSubTypeInitHook(pyType, &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(pyType, &::Akonadi::TagCache::staticMetaObject, sizeof(TagCacheWrapper));

    return pyType;
}
