
// 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_itemsearchjob_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 <kjob.h>
#include <qmetaobject.h>
#include <qobject.h>
#include <qobjectdefs.h>
#include <searchquery.h>
#include <tagfetchscope.h>

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

using namespace Akonadi;

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

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

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

ItemSearchJobWrapper::ItemSearchJobWrapper(::QObject * parent) : Akonadi::ItemSearchJob(parent)
{
}

ItemSearchJobWrapper::ItemSearchJobWrapper(const ::Akonadi::SearchQuery & query, ::QObject * parent) : Akonadi::ItemSearchJob(query, parent)
{
}

bool ItemSearchJobWrapper::addSubjob(::KJob * job)
{
    static const char *funcName = "addSubjob";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_ItemSearchJob_TypeF(), gil, funcName, m_PyMethodCache[0], nameCache));
    if (pyOverride.isNull()) {
        return this->::Akonadi::Job::addSubjob(job);
    }
    return SpecialCollectionsDiscoveryJobWrapper::sbk_o_addSubjob("ItemSearchJob", funcName, gil, pyOverride, job);
}

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

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

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

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

bool ItemSearchJobWrapper::doKill()
{
    static const char *funcName = "doKill";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_ItemSearchJob_TypeF(), gil, funcName, m_PyMethodCache[5], nameCache));
    if (pyOverride.isNull()) {
        return this->::Akonadi::Job::doKill();
    }
    return TrashFilterProxyModelWrapper::sbk_o_submit("ItemSearchJob", funcName, gil, pyOverride);
}

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

void ItemSearchJobWrapper::doStart()
{
    static const char *funcName = "doStart";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_ItemSearchJob_TypeF(), gil, funcName, m_PyMethodCache[7], nameCache));
    if (pyOverride.isNull()) {
        return this->::Akonadi::ItemSearchJob::doStart();
    }
    TrashFilterProxyModelWrapper::sbk_o_resetInternalData("ItemSearchJob", funcName, gil, pyOverride);
}

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

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

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

bool ItemSearchJobWrapper::removeSubjob(::KJob * job)
{
    static const char *funcName = "removeSubjob";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_ItemSearchJob_TypeF(), gil, funcName, m_PyMethodCache[11], nameCache));
    if (pyOverride.isNull()) {
        return this->::Akonadi::Job::removeSubjob(job);
    }
    return SpecialCollectionsDiscoveryJobWrapper::sbk_o_addSubjob("ItemSearchJob", funcName, gil, pyOverride, job);
}

void ItemSearchJobWrapper::slotInfoMessage(::KJob * job, const ::QString & message)
{
    static const char *funcName = "slotInfoMessage";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_ItemSearchJob_TypeF(), gil, funcName, m_PyMethodCache[12], nameCache));
    if (pyOverride.isNull()) {
        return this->::KCompositeJob::slotInfoMessage(job, message);
    }
    SpecialCollectionsDiscoveryJobWrapper::sbk_o_slotInfoMessage("ItemSearchJob", funcName, gil, pyOverride, job, message);
}

void ItemSearchJobWrapper::slotResult(::KJob * job)
{
    static const char *funcName = "slotResult";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_ItemSearchJob_TypeF(), gil, funcName, m_PyMethodCache[13], nameCache));
    if (pyOverride.isNull()) {
        return this->::Akonadi::Job::slotResult(job);
    }
    SpecialCollectionsDiscoveryJobWrapper::sbk_o_slotResult("ItemSearchJob", funcName, gil, pyOverride, job);
}

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

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

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

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

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

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

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

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

    ItemSearchJobWrapper *cptr{};
    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_ParseTuple(args, "|OO:ItemSearchJob", &(pyArgs[0]), &(pyArgs[1])) == 0)
        return -1;


    // Overloaded function decisor
    // 0: ItemSearchJob::ItemSearchJob(QObject*=)
    // 1: ItemSearchJob::ItemSearchJob(const Akonadi::SearchQuery&,QObject*=)
    if (numArgs == 0) {
        overloadId = 0; // ItemSearchJob(QObject*)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_SearchQuery_IDX]), (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 1; // ItemSearchJob(Akonadi::SearchQuery,QObject*)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[1])))) {
            overloadId = 1; // ItemSearchJob::ItemSearchJob(const Akonadi::SearchQuery&,QObject*=)
        }
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[0])))) {
        overloadId = 0; // ItemSearchJob::ItemSearchJob(QObject*=)
    }

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

    // Resolve keyword arguments
    switch (overloadId) {
        case 0: // ItemSearchJob::ItemSearchJob(QObject*=)
        {
            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_ItemSearchJob_IDX]);
                }
            }
            break;
        }
        case 1: // ItemSearchJob::ItemSearchJob(const Akonadi::SearchQuery&,QObject*=)
        {
            if (kwds != nullptr && PyDict_Size(kwds) > 0) {
                static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"parent", 1}};
                if (!Shiboken::parseConstructorKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                    || (pyArgs[1] != nullptr && !((pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[1])))))) {
                    Py_XINCREF(errInfo.object());
                    return Shiboken::returnWrongArguments_MinusOne(args, "__init__", errInfo, SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemSearchJob_IDX]);
                }
            }
            break;
        }
    }

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

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

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

            }
            break;
        }
        case 1: // ItemSearchJob(const Akonadi::SearchQuery &query, QObject *parent)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::Akonadi::SearchQuery cppArg0_local;
            ::Akonadi::SearchQuery *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);

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

            if (Shiboken::Errors::occurred() == nullptr) {
                // ItemSearchJob::ItemSearchJob(const Akonadi::SearchQuery&,QObject*=)
                void *addr = PySide::nextQObjectMemoryAddr();
                if (addr != nullptr) {
                    cptr = new (addr) ItemSearchJobWrapper(*cppArg0, cppArg1);
                    PySide::setNextQObjectMemoryAddr(nullptr);
                } else {
                    cptr = new ItemSearchJobWrapper(*cppArg0, cppArg1);
                }

            }
            break;
        }
    }

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


    return 1;
}

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

    // Call function/method
    {

        // Job::doStart()
        Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
            ? cppSelf->::Akonadi::ItemSearchJob::doStart()
            : cppSelf->doStart();
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

        // ItemSearchJob::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_ItemSearchJobFunc_isRecursive(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::ItemSearchJob *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemSearchJob_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // ItemSearchJob::isRecursive()const->bool
        bool cppResult = const_cast<const ::Akonadi::ItemSearchJob *>(cppSelf)->isRecursive();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // ItemSearchJob::isRemoteSearchEnabled()const->bool
        bool cppResult = const_cast<const ::Akonadi::ItemSearchJob *>(cppSelf)->isRemoteSearchEnabled();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // ItemSearchJob::mimeTypes()const->QStringList
        QStringList cppResult = const_cast<const ::Akonadi::ItemSearchJob *>(cppSelf)->mimeTypes();
        pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QStringList_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // ItemSearchJob::searchCollections()const->QList<Akonadi::Collection>
        QList<Akonadi::Collection> cppResult = const_cast<const ::Akonadi::ItemSearchJob *>(cppSelf)->searchCollections();
        pyResult = Shiboken::Conversions::copyToPython(SbkAkonadiCoreTypeConverters[SBK_AkonadiCore_QList_Akonadi_Collection_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "setFetchScope", SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemSearchJob_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) {
            // ItemSearchJob::setFetchScope(const Akonadi::ItemFetchScope&)
            cppSelf->setFetchScope(*cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: ItemSearchJob::setMimeTypes(const QStringList&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QStringList_IDX], (pyArg)))) {
        overloadId = 0; // ItemSearchJob::setMimeTypes(const QStringList&)
    }

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

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // ItemSearchJob::setMimeTypes(const QStringList&)
            cppSelf->setMimeTypes(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: ItemSearchJob::setQuery(const Akonadi::SearchQuery&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_SearchQuery_IDX]), (pyArg)))) {
        overloadId = 0; // ItemSearchJob::setQuery(const Akonadi::SearchQuery&)
    }

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

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


        if (Shiboken::Errors::occurred() == nullptr) {
            // ItemSearchJob::setQuery(const Akonadi::SearchQuery&)
            cppSelf->setQuery(*cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: ItemSearchJob::setRecursive(bool)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), (pyArg)))) {
        overloadId = 0; // ItemSearchJob::setRecursive(bool)
    }

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

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // ItemSearchJob::setRecursive(bool)
            cppSelf->setRecursive(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: ItemSearchJob::setRemoteSearchEnabled(bool)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), (pyArg)))) {
        overloadId = 0; // ItemSearchJob::setRemoteSearchEnabled(bool)
    }

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

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // ItemSearchJob::setRemoteSearchEnabled(bool)
            cppSelf->setRemoteSearchEnabled(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: ItemSearchJob::setSearchCollections(const QList<Akonadi::Collection>&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkAkonadiCoreTypeConverters[SBK_AkonadiCore_QList_Akonadi_Collection_IDX], (pyArg)))) {
        overloadId = 0; // ItemSearchJob::setSearchCollections(const QList<Akonadi::Collection>&)
    }

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

    // Call function/method
    {
        ::QList<Akonadi::Collection> cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // ItemSearchJob::setSearchCollections(const QList<Akonadi::Collection>&)
            cppSelf->setSearchCollections(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: ItemSearchJob::setTagFetchScope(const Akonadi::TagFetchScope&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagFetchScope_IDX]), (pyArg)))) {
        overloadId = 0; // ItemSearchJob::setTagFetchScope(const Akonadi::TagFetchScope&)
    }

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

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


        if (Shiboken::Errors::occurred() == nullptr) {
            // ItemSearchJob::setTagFetchScope(const Akonadi::TagFetchScope&)
            cppSelf->setTagFetchScope(*cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

        // ItemSearchJob::tagFetchScope()->Akonadi::TagFetchScope&
        Akonadi::TagFetchScope & cppResult = cppSelf->tagFetchScope();
        pyResult = Shiboken::Conversions::referenceToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_TagFetchScope_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}


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

static PyMethodDef Sbk_Akonadi_ItemSearchJob_methods[] = {
    {"doStart", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_doStart), METH_NOARGS, nullptr},
    {"fetchScope", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_fetchScope), METH_NOARGS, nullptr},
    {"isRecursive", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_isRecursive), METH_NOARGS, nullptr},
    {"isRemoteSearchEnabled", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_isRemoteSearchEnabled), METH_NOARGS, nullptr},
    {"items", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_items), METH_NOARGS, nullptr},
    {"mimeTypes", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_mimeTypes), METH_NOARGS, nullptr},
    {"searchCollections", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_searchCollections), METH_NOARGS, nullptr},
    {"setFetchScope", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_setFetchScope), METH_O, nullptr},
    {"setMimeTypes", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_setMimeTypes), METH_O, nullptr},
    {"setQuery", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_setQuery), METH_O, nullptr},
    {"setRecursive", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_setRecursive), METH_O, nullptr},
    {"setRemoteSearchEnabled", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_setRemoteSearchEnabled), METH_O, nullptr},
    {"setSearchCollections", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_setSearchCollections), METH_O, nullptr},
    {"setTagFetchScope", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_setTagFetchScope), METH_O, nullptr},
    {"tagFetchScope", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemSearchJobFunc_tagFetchScope), METH_NOARGS, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static int Sbk_Akonadi_ItemSearchJob_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value != nullptr && PyCallable_Check(value) != 0) {
        auto plain_inst = reinterpret_cast< ::Akonadi::ItemSearchJob *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemSearchJob_IDX]), reinterpret_cast<SbkObject *>(self)));
        auto *inst = dynamic_cast<ItemSearchJobWrapper *>(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_ItemSearchJob_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_ItemSearchJob_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_ItemSearchJob_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_Akonadi_ItemSearchJob_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_ItemSearchJob_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_ItemSearchJob_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_ItemSearchJob_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_ItemSearchJob_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObject_tp_new)},
    {0, nullptr}
};
static PyType_Spec Sbk_Akonadi_ItemSearchJob_spec = {
    "1:AkonadiCore.Akonadi.ItemSearchJob",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_ItemSearchJob_slots
};

} //extern "C"

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

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

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *Akonadi_ItemSearchJob_SignatureStrings[] = {
    "1:AkonadiCore.Akonadi.ItemSearchJob(self,parent:PySide6.QtCore.QObject=nullptr)",
    "0:AkonadiCore.Akonadi.ItemSearchJob(self,query:typing.Union[AkonadiCore.Akonadi.SearchQuery, AkonadiCore.Akonadi.SearchTerm.Relation],parent:PySide6.QtCore.QObject=nullptr)",
    "AkonadiCore.Akonadi.ItemSearchJob.doStart(self)",
    "AkonadiCore.Akonadi.ItemSearchJob.fetchScope(self)->AkonadiCore.Akonadi.ItemFetchScope",
    "AkonadiCore.Akonadi.ItemSearchJob.isRecursive(self)->bool",
    "AkonadiCore.Akonadi.ItemSearchJob.isRemoteSearchEnabled(self)->bool",
    "AkonadiCore.Akonadi.ItemSearchJob.items(self)->QList[AkonadiCore.Akonadi.Item]",
    "AkonadiCore.Akonadi.ItemSearchJob.mimeTypes(self)->QStringList",
    "AkonadiCore.Akonadi.ItemSearchJob.searchCollections(self)->QList[AkonadiCore.Akonadi.Collection]",
    "AkonadiCore.Akonadi.ItemSearchJob.setFetchScope(self,fetchScope:AkonadiCore.Akonadi.ItemFetchScope)",
    "AkonadiCore.Akonadi.ItemSearchJob.setMimeTypes(self,mimeTypes:QStringList)",
    "AkonadiCore.Akonadi.ItemSearchJob.setQuery(self,query:typing.Union[AkonadiCore.Akonadi.SearchQuery, AkonadiCore.Akonadi.SearchTerm.Relation])",
    "AkonadiCore.Akonadi.ItemSearchJob.setRecursive(self,recursive:bool)",
    "AkonadiCore.Akonadi.ItemSearchJob.setRemoteSearchEnabled(self,enabled:bool)",
    "AkonadiCore.Akonadi.ItemSearchJob.setSearchCollections(self,collections:QList[AkonadiCore.Akonadi.Collection])",
    "AkonadiCore.Akonadi.ItemSearchJob.setTagFetchScope(self,fetchScope:AkonadiCore.Akonadi.TagFetchScope)",
    "AkonadiCore.Akonadi.ItemSearchJob.tagFetchScope(self)->AkonadiCore.Akonadi.TagFetchScope",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_ItemSearchJob_SignatureByteSize = 322;
static constexpr uint8_t Akonadi_ItemSearchJob_SignatureBytes[322] = {
    0x78, 0xda, 0xb5, 0x94, 0x4d, 0x4f, 0xc3, 0x30, 0x0c, 0x86, 0xef, 0xfb, 0x15, 0x1c, 0x99, 0x14,
    0x22, 0xb8, 0x70, 0x88, 0x04, 0x12, 0x9a, 0x98, 0x04, 0x02, 0x41, 0xd7, 0x72, 0x9a, 0x7a, 0x48,
    0x5b, 0x6f, 0x0b, 0xa4, 0x49, 0x49, 0x5d, 0xa4, 0xfe, 0x7b, 0xfa, 0xc1, 0x5a, 0x2a, 0x5a, 0xcd,
    0x3d, 0x70, 0x8b, 0x23, 0xbf, 0x8f, 0x2d, 0xfb, 0x4d, 0xae, 0xc4, 0xdd, 0x87, 0x35, 0x32, 0x51,
    0x2b, 0xeb, 0x80, 0xff, 0x9c, 0xf9, 0x03, 0x42, 0xea, 0x83, 0x74, 0xf1, 0xe1, 0xd1, 0x46, 0xe7,
    0x39, 0xe8, 0x1d, 0xcb, 0xa4, 0x03, 0x83, 0xe2, 0xb5, 0xf4, 0x55, 0x02, 0xd7, 0xdc, 0xc3, 0x46,
    0xe0, 0xbd, 0x44, 0xef, 0x10, 0xe3, 0x8d, 0x29, 0xb4, 0xce, 0xd0, 0x2d, 0x17, 0x97, 0x54, 0xde,
    0x67, 0x01, 0xae, 0x14, 0x58, 0x66, 0xca, 0xec, 0xf9, 0x9b, 0x51, 0xd6, 0x6c, 0xc7, 0x94, 0xad,
    0xca, 0xab, 0x93, 0xd9, 0xd9, 0x74, 0x42, 0x00, 0x2e, 0xe5, 0x1b, 0xd0, 0x12, 0x2b, 0x50, 0x48,
    0x6d, 0xf6, 0x64, 0xab, 0x3c, 0xb1, 0x3e, 0x4a, 0x87, 0x4d, 0xcb, 0x94, 0xfc, 0x1d, 0x60, 0x7c,
    0xf0, 0x63, 0x9b, 0x41, 0x2b, 0xb9, 0xb8, 0x9d, 0xd2, 0xac, 0xbb, 0x4c, 0x02, 0x56, 0xe5, 0x1b,
    0x88, 0x0b, 0x97, 0xab, 0xaf, 0x8e, 0x1b, 0x59, 0xab, 0x89, 0xca, 0xd4, 0x22, 0xb4, 0x37, 0xf7,
    0x46, 0x46, 0x1a, 0x92, 0xb9, 0x8c, 0x2a, 0xca, 0x8f, 0x1a, 0xef, 0x49, 0xe5, 0xb8, 0x9d, 0x12,
    0x85, 0x04, 0x5c, 0xaa, 0x52, 0x08, 0xca, 0x0c, 0x7a, 0xa4, 0x8f, 0xae, 0x72, 0x41, 0x0d, 0x26,
    0xc8, 0xf3, 0xe6, 0xb4, 0xb2, 0x5a, 0x57, 0xbb, 0xac, 0xb6, 0x4d, 0xe8, 0xac, 0x4f, 0x0e, 0x49,
    0x05, 0x70, 0x3d, 0x5c, 0x23, 0xeb, 0xd7, 0x2a, 0x4e, 0xef, 0x73, 0x49, 0xab, 0xf1, 0x3c, 0x18,
    0x03, 0xeb, 0xa6, 0x22, 0x7e, 0x8d, 0x83, 0x88, 0x6a, 0x9e, 0xc7, 0xff, 0x3f, 0x2b, 0x62, 0x37,
    0x43, 0xab, 0x32, 0x77, 0x0c, 0x45, 0x6d, 0x37, 0x32, 0x63, 0xdc, 0xb4, 0x0c, 0xda, 0x60, 0x0e,
    0xcb, 0x1f, 0x35, 0x0c, 0x8b, 0xfb, 0x0b, 0x41, 0xb2, 0x0e, 0xb1, 0x5c, 0x20, 0xf7, 0x33, 0xed,
    0x33, 0x50, 0x50, 0xaa, 0xe0, 0x9f, 0x12, 0x13, 0x1f, 0xcd, 0x80, 0xbc, 0xf8, 0x06, 0xb7, 0x2c,
    0x2e, 0x4e
};
#endif

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

    auto *base1 = reinterpret_cast<PyObject *>(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Job_IDX]));
    Shiboken::AutoDecRef Sbk_Akonadi_ItemSearchJob_Type_bases(PyTuple_Pack(1, base1));

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "ItemSearchJob",
        "Akonadi::ItemSearchJob*",
        &Sbk_Akonadi_ItemSearchJob_spec,
        &Shiboken::callCppDestructor< Akonadi::ItemSearchJob >,
        Sbk_Akonadi_ItemSearchJob_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_ItemSearchJob_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_ItemSearchJob_SignatureBytes, Akonadi_ItemSearchJob_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_ItemSearchJob_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        ItemSearchJob_PythonToCpp_ItemSearchJob_PTR,
        is_ItemSearchJob_PythonToCpp_ItemSearchJob_PTR_Convertible,
        ItemSearchJob_PTR_CppToPython_ItemSearchJob);

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

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

    PySide::Signal::registerSignals(pyType, &::Akonadi::ItemSearchJob::staticMetaObject);
    Shiboken::ObjectType::setSubTypeInitHook(pyType, &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(pyType, &::Akonadi::ItemSearchJob::staticMetaObject, sizeof(ItemSearchJobWrapper));

    return pyType;
}
