
// 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_recursiveitemfetchjob_wrapper.h"

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

// Argument includes
#include <QList>
#include <QString>
#include <QStringList>
#include <collection.h>
#include <item.h>
#include <itemfetchscope.h>
#include <qmetaobject.h>
#include <qobject.h>
#include <qobjectdefs.h>

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

using namespace Akonadi;

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

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

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

RecursiveItemFetchJobWrapper::RecursiveItemFetchJobWrapper(const ::Akonadi::Collection & collection, const ::QStringList & mimeTypes, ::QObject * parent) : Akonadi::RecursiveItemFetchJob(collection, mimeTypes, parent)
{
}

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

void RecursiveItemFetchJobWrapper::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_RecursiveItemFetchJob_TypeF(), gil, funcName, m_PyMethodCache[1], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::connectNotify(signal);
    }
    TrashFilterProxyModelWrapper::sbk_o_connectNotify("RecursiveItemFetchJob", funcName, gil, pyOverride, signal);
}

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

void RecursiveItemFetchJobWrapper::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_RecursiveItemFetchJob_TypeF(), gil, funcName, m_PyMethodCache[3], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::disconnectNotify(signal);
    }
    TrashFilterProxyModelWrapper::sbk_o_connectNotify("RecursiveItemFetchJob", funcName, gil, pyOverride, signal);
}

bool RecursiveItemFetchJobWrapper::doKill()
{
    static const char *funcName = "doKill";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_RecursiveItemFetchJob_TypeF(), gil, funcName, m_PyMethodCache[4], nameCache));
    if (pyOverride.isNull()) {
        return this->::KJob::doKill();
    }
    return TrashFilterProxyModelWrapper::sbk_o_submit("RecursiveItemFetchJob", funcName, gil, pyOverride);
}

bool RecursiveItemFetchJobWrapper::doResume()
{
    static const char *funcName = "doResume";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_RecursiveItemFetchJob_TypeF(), gil, funcName, m_PyMethodCache[5], nameCache));
    if (pyOverride.isNull()) {
        return this->::KJob::doResume();
    }
    return TrashFilterProxyModelWrapper::sbk_o_submit("RecursiveItemFetchJob", funcName, gil, pyOverride);
}

bool RecursiveItemFetchJobWrapper::doSuspend()
{
    static const char *funcName = "doSuspend";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_RecursiveItemFetchJob_TypeF(), gil, funcName, m_PyMethodCache[6], nameCache));
    if (pyOverride.isNull()) {
        return this->::KJob::doSuspend();
    }
    return TrashFilterProxyModelWrapper::sbk_o_submit("RecursiveItemFetchJob", funcName, gil, pyOverride);
}

::QString RecursiveItemFetchJobWrapper::errorString() const
{
    // This method belongs to a property.
    static const char *funcName = "1:errorString";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_RecursiveItemFetchJob_TypeF(), gil, funcName, m_PyMethodCache[7], nameCache));
    if (pyOverride.isNull()) {
        return this->::KJob::errorString();
    }
    return SpecialCollectionsDiscoveryJobWrapper::sbk_o_errorString("RecursiveItemFetchJob", funcName, gil, pyOverride);
}

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

bool RecursiveItemFetchJobWrapper::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_RecursiveItemFetchJob_TypeF(), gil, funcName, m_PyMethodCache[9], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::eventFilter(watched, event);
    }
    return TrashFilterProxyModelWrapper::sbk_o_eventFilter("RecursiveItemFetchJob", funcName, gil, pyOverride, watched, event);
}

void RecursiveItemFetchJobWrapper::start()
{
    static const char *funcName = "start";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_RecursiveItemFetchJob_TypeF(), gil, funcName, m_PyMethodCache[10], nameCache));
    if (pyOverride.isNull()) {
        return this->::Akonadi::RecursiveItemFetchJob::start();
    }
    TrashFilterProxyModelWrapper::sbk_o_resetInternalData("RecursiveItemFetchJob", funcName, gil, pyOverride);
}

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

const QMetaObject *RecursiveItemFetchJobWrapper::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::RecursiveItemFetchJob::metaObject();
    return PySide::SignalManager::retrieveMetaObject(reinterpret_cast<PyObject *>(pySelf));
}

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

void *RecursiveItemFetchJobWrapper::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< RecursiveItemFetchJobWrapper *>(this));
    }
    return Akonadi::RecursiveItemFetchJob::qt_metacast(_clname);
}

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

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

extern "C" {
static int
Sbk_Akonadi_RecursiveItemFetchJob_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::RecursiveItemFetchJob >()))
        return -1;

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

    // invalid argument lengths

    if (PyArg_ParseTuple(args, "|OOO:RecursiveItemFetchJob", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2])) == 0)
        return -1;


    // Overloaded function decisor
    // 0: RecursiveItemFetchJob::RecursiveItemFetchJob(const Akonadi::Collection&,const QStringList&,QObject*=)
    if (numArgs >= 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Collection_IDX]), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QStringList_IDX], (pyArgs[1])))) {
        if (numArgs == 2) {
            overloadId = 0; // RecursiveItemFetchJob(Akonadi::Collection,QStringList,QObject*)
        } else if (numArgs >= 3
            && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[2])))) {
            overloadId = 0; // RecursiveItemFetchJob::RecursiveItemFetchJob(const Akonadi::Collection&,const QStringList&,QObject*=)
        }
    }

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

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

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

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return -1;
        ::Akonadi::Collection cppArg0_local;
        ::Akonadi::Collection *cppArg0 = &cppArg0_local;
        if (pythonToCpp[0].isValue())
            pythonToCpp[0](pyArgs[0], &cppArg0_local);
        else
            pythonToCpp[0](pyArgs[0], &cppArg0);

        ::QStringList cppArg1;
        pythonToCpp[1](pyArgs[1], &cppArg1);
        if (!Shiboken::Object::isValid(pyArgs[2]))
            return -1;
        ::QObject *cppArg2 = nullptr;
        if (pythonToCpp[2])
            pythonToCpp[2](pyArgs[2], &cppArg2);

        if (Shiboken::Errors::occurred() == nullptr) {
            // RecursiveItemFetchJob::RecursiveItemFetchJob(const Akonadi::Collection&,const QStringList&,QObject*=)
            void *addr = PySide::nextQObjectMemoryAddr();
            if (addr != nullptr) {
                cptr = new (addr) RecursiveItemFetchJobWrapper(*cppArg0, cppArg1, cppArg2);
                PySide::setNextQObjectMemoryAddr(nullptr);
            } else {
                cptr = new RecursiveItemFetchJobWrapper(*cppArg0, cppArg1, cppArg2);
            }

        }
    }

    if (Shiboken::Errors::occurred() != nullptr || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< Akonadi::RecursiveItemFetchJob >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (cptr == nullptr)
        return Shiboken::returnWrongArguments_MinusOne(args, "__init__", SbkAkonadiCoreTypeStructs[SBK_Akonadi_RecursiveItemFetchJob_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_RecursiveItemFetchJob_IDX]);
    };


    return 1;
}

static PyObject *Sbk_Akonadi_RecursiveItemFetchJobFunc_fetchScope(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::RecursiveItemFetchJob *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_RecursiveItemFetchJob_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // RecursiveItemFetchJob::fetchScope()->Akonadi::ItemFetchScope&
        Akonadi::ItemFetchScope & cppResult = cppSelf->fetchScope();
        pyResult = Shiboken::Conversions::referenceToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemFetchScope_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_Akonadi_RecursiveItemFetchJobFunc_items(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::RecursiveItemFetchJob *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_RecursiveItemFetchJob_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // RecursiveItemFetchJob::items()const->QList<Akonadi::Item>
        QList<Akonadi::Item> cppResult = const_cast<const ::Akonadi::RecursiveItemFetchJob *>(cppSelf)->items();
        pyResult = Shiboken::Conversions::copyToPython(SbkAkonadiCoreTypeConverters[SBK_AkonadiCore_QList_Akonadi_Item_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Overloaded function decisor
    // 0: RecursiveItemFetchJob::setFetchScope(const Akonadi::ItemFetchScope&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemFetchScope_IDX]), (pyArg)))) {
        overloadId = 0; // RecursiveItemFetchJob::setFetchScope(const Akonadi::ItemFetchScope&)
    }

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

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


        if (Shiboken::Errors::occurred() == nullptr) {
            // RecursiveItemFetchJob::setFetchScope(const Akonadi::ItemFetchScope&)
            cppSelf->setFetchScope(*cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_Akonadi_RecursiveItemFetchJobFunc_start(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::RecursiveItemFetchJob *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_RecursiveItemFetchJob_IDX]), reinterpret_cast<SbkObject *>(self)));
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // KJob::start()
        Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
            ? cppSelf->::Akonadi::RecursiveItemFetchJob::start()
            : cppSelf->start();
    }

     return Sbk_ReturnFromPython_None();
}


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

static PyMethodDef Sbk_Akonadi_RecursiveItemFetchJob_methods[] = {
    {"fetchScope", reinterpret_cast<PyCFunction>(Sbk_Akonadi_RecursiveItemFetchJobFunc_fetchScope), METH_NOARGS, nullptr},
    {"items", reinterpret_cast<PyCFunction>(Sbk_Akonadi_RecursiveItemFetchJobFunc_items), METH_NOARGS, nullptr},
    {"setFetchScope", reinterpret_cast<PyCFunction>(Sbk_Akonadi_RecursiveItemFetchJobFunc_setFetchScope), METH_O, nullptr},
    {"start", reinterpret_cast<PyCFunction>(Sbk_Akonadi_RecursiveItemFetchJobFunc_start), METH_NOARGS, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static int Sbk_Akonadi_RecursiveItemFetchJob_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value != nullptr && PyCallable_Check(value) != 0) {
        auto plain_inst = reinterpret_cast< ::Akonadi::RecursiveItemFetchJob *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_RecursiveItemFetchJob_IDX]), reinterpret_cast<SbkObject *>(self)));
        auto *inst = dynamic_cast<RecursiveItemFetchJobWrapper *>(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_RecursiveItemFetchJob_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_RecursiveItemFetchJob_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_RecursiveItemFetchJob_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_Akonadi_RecursiveItemFetchJob_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_RecursiveItemFetchJob_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_RecursiveItemFetchJob_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_RecursiveItemFetchJob_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_RecursiveItemFetchJob_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObject_tp_new)},
    {0, nullptr}
};
static PyType_Spec Sbk_Akonadi_RecursiveItemFetchJob_spec = {
    "1:AkonadiCore.Akonadi.RecursiveItemFetchJob",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_RecursiveItemFetchJob_slots
};

} //extern "C"

static void *Sbk_Akonadi_RecursiveItemFetchJob_typeDiscovery([[maybe_unused]] void *cptr, [[maybe_unused]] PyTypeObject *instanceType)
{
    if (instanceType == Shiboken::SbkType< ::QObject >())
        return dynamic_cast< ::Akonadi::RecursiveItemFetchJob *>(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 RecursiveItemFetchJob_PythonToCpp_RecursiveItemFetchJob_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_Akonadi_RecursiveItemFetchJob_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_RecursiveItemFetchJob_PythonToCpp_RecursiveItemFetchJob_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, Sbk_Akonadi_RecursiveItemFetchJob_TypeF()))
        return RecursiveItemFetchJob_PythonToCpp_RecursiveItemFetchJob_PTR;
    return {};
}

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

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *Akonadi_RecursiveItemFetchJob_SignatureStrings[] = {
    "AkonadiCore.Akonadi.RecursiveItemFetchJob(self,collection:AkonadiCore.Akonadi.Collection,mimeTypes:QStringList,parent:PySide6.QtCore.QObject=nullptr)",
    "AkonadiCore.Akonadi.RecursiveItemFetchJob.fetchScope(self)->AkonadiCore.Akonadi.ItemFetchScope",
    "AkonadiCore.Akonadi.RecursiveItemFetchJob.items(self)->QList[AkonadiCore.Akonadi.Item]",
    "AkonadiCore.Akonadi.RecursiveItemFetchJob.setFetchScope(self,fetchScope:AkonadiCore.Akonadi.ItemFetchScope)",
    "AkonadiCore.Akonadi.RecursiveItemFetchJob.start(self)",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_RecursiveItemFetchJob_SignatureByteSize = 186;
static constexpr uint8_t Akonadi_RecursiveItemFetchJob_SignatureBytes[186] = {
    0x78, 0xda, 0x95, 0x90, 0x4f, 0x0b, 0x82, 0x40, 0x10, 0xc5, 0xef, 0x7e, 0x92, 0x84, 0xcd, 0x63,
    0x87, 0x85, 0x02, 0x11, 0x84, 0x22, 0x28, 0xb3, 0x5b, 0x74, 0xd0, 0x75, 0xac, 0xa9, 0x75, 0x57,
    0x76, 0xc7, 0xc0, 0x6f, 0x9f, 0x7f, 0xc8, 0x08, 0x8c, 0xf2, 0xf6, 0x86, 0x99, 0xdf, 0xe3, 0xbd,
    0xf1, 0xef, 0x5a, 0x25, 0x19, 0x06, 0xda, 0x80, 0xe7, 0xf7, 0xda, 0x3b, 0x80, 0xa8, 0x8c, 0xc5,
    0x07, 0xac, 0x09, 0x8a, 0x10, 0x48, 0x5c, 0x37, 0x3a, 0x9d, 0x59, 0x90, 0x39, 0x13, 0x5a, 0x4a,
    0x10, 0x84, 0x5a, 0x71, 0x7f, 0x84, 0x0c, 0x86, 0x35, 0x2b, 0xb0, 0x80, 0x63, 0x5d, 0x82, 0xe5,
    0x51, 0x4c, 0x06, 0xd5, 0x65, 0x8b, 0x96, 0x58, 0x99, 0x18, 0x50, 0xc4, 0xf7, 0x75, 0x8c, 0x19,
    0x2c, 0xbc, 0x88, 0x3a, 0x3c, 0xda, 0xa5, 0xb7, 0x06, 0x5b, 0xaa, 0x4a, 0xca, 0x92, 0x8c, 0xeb,
    0xf8, 0xff, 0xa6, 0xf2, 0xf2, 0x56, 0xc4, 0x42, 0x97, 0xd0, 0x05, 0x74, 0xe7, 0xab, 0x31, 0x76,
    0x40, 0xba, 0xcb, 0x09, 0xf6, 0xd8, 0x0c, 0xf6, 0xe5, 0x1c, 0xb5, 0x15, 0x4e, 0xdf, 0xfc, 0xcf,
    0x13, 0x6c, 0x2d, 0x50, 0xf8, 0x19, 0x9c, 0xbd, 0x8b, 0xf0, 0xdf, 0x0d, 0xa6, 0x7c, 0xc8, 0x52,
    0x62, 0xa8, 0xaf, 0xe0, 0x3c, 0x01, 0x17, 0xa1, 0xb7, 0x50
};
#endif

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

    auto *base1 = reinterpret_cast<PyObject *>(Shiboken::Module::get(SbkKCoreAddonsTypeStructs[SBK_KJob_IDX]));
    Shiboken::AutoDecRef Sbk_Akonadi_RecursiveItemFetchJob_Type_bases(PyTuple_Pack(1, base1));

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "RecursiveItemFetchJob",
        "Akonadi::RecursiveItemFetchJob*",
        &Sbk_Akonadi_RecursiveItemFetchJob_spec,
        &Shiboken::callCppDestructor< Akonadi::RecursiveItemFetchJob >,
        Sbk_Akonadi_RecursiveItemFetchJob_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_RecursiveItemFetchJob_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_RecursiveItemFetchJob_SignatureBytes, Akonadi_RecursiveItemFetchJob_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_RecursiveItemFetchJob_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        RecursiveItemFetchJob_PythonToCpp_RecursiveItemFetchJob_PTR,
        is_RecursiveItemFetchJob_PythonToCpp_RecursiveItemFetchJob_PTR_Convertible,
        RecursiveItemFetchJob_PTR_CppToPython_RecursiveItemFetchJob);

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

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

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

    return pyType;
}
