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

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

using namespace Akonadi;

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

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

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

SearchCreateJobWrapper::SearchCreateJobWrapper(const ::QString & name, const ::Akonadi::SearchQuery & searchQuery, ::QObject * parent) : Akonadi::SearchCreateJob(name, searchQuery, parent)
{
}

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

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

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

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

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

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

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

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

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

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

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

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

void SearchCreateJobWrapper::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_SearchCreateJob_TypeF(), gil, funcName, m_PyMethodCache[12], nameCache));
    if (pyOverride.isNull()) {
        return this->::KCompositeJob::slotInfoMessage(job, message);
    }
    SpecialCollectionsDiscoveryJobWrapper::sbk_o_slotInfoMessage("SearchCreateJob", funcName, gil, pyOverride, job, message);
}

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

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

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

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

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

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

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

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

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

    SearchCreateJobWrapper *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:SearchCreateJob", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2])) == 0)
        return -1;


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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments_MinusOne(args, "__init__", SbkAkonadiCoreTypeStructs[SBK_Akonadi_SearchCreateJob_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_SearchCreateJob_IDX]);
            }
        }
    }

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

    // Call function/method
    {
        ::QString cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        if (!Shiboken::Object::isValid(pyArgs[1]))
            return -1;
        ::Akonadi::SearchQuery cppArg1_local;
        ::Akonadi::SearchQuery *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            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) {
            // SearchCreateJob::SearchCreateJob(const QString&,const Akonadi::SearchQuery&,QObject*=)
            void *addr = PySide::nextQObjectMemoryAddr();
            if (addr != nullptr) {
                cptr = new (addr) SearchCreateJobWrapper(cppArg0, *cppArg1, cppArg2);
                PySide::setNextQObjectMemoryAddr(nullptr);
            } else {
                cptr = new SearchCreateJobWrapper(cppArg0, *cppArg1, cppArg2);
            }

        }
    }

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


    return 1;
}

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

    // Call function/method
    {

        // SearchCreateJob::createdCollection()const->Akonadi::Collection
        Akonadi::Collection cppResult = const_cast<const ::Akonadi::SearchCreateJob *>(cppSelf)->createdCollection();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Collection_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

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

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

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

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

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

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

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

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

     return Sbk_ReturnFromPython_None();
}


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

static PyMethodDef Sbk_Akonadi_SearchCreateJob_methods[] = {
    {"createdCollection", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_createdCollection), METH_NOARGS, nullptr},
    {"doStart", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_doStart), METH_NOARGS, nullptr},
    {"isRecursive", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_isRecursive), METH_NOARGS, nullptr},
    {"isRemoteSearchEnabled", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_isRemoteSearchEnabled), METH_NOARGS, nullptr},
    {"searchCollections", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_searchCollections), METH_NOARGS, nullptr},
    {"searchMimeTypes", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_searchMimeTypes), METH_NOARGS, nullptr},
    {"setRecursive", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_setRecursive), METH_O, nullptr},
    {"setRemoteSearchEnabled", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_setRemoteSearchEnabled), METH_O, nullptr},
    {"setSearchCollections", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_setSearchCollections), METH_O, nullptr},
    {"setSearchMimeTypes", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SearchCreateJobFunc_setSearchMimeTypes), METH_O, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static int Sbk_Akonadi_SearchCreateJob_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value != nullptr && PyCallable_Check(value) != 0) {
        auto plain_inst = reinterpret_cast< ::Akonadi::SearchCreateJob *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_SearchCreateJob_IDX]), reinterpret_cast<SbkObject *>(self)));
        auto *inst = dynamic_cast<SearchCreateJobWrapper *>(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_SearchCreateJob_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_SearchCreateJob_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_SearchCreateJob_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_Akonadi_SearchCreateJob_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_SearchCreateJob_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_SearchCreateJob_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_SearchCreateJob_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_SearchCreateJob_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObject_tp_new)},
    {0, nullptr}
};
static PyType_Spec Sbk_Akonadi_SearchCreateJob_spec = {
    "1:AkonadiCore.Akonadi.SearchCreateJob",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_SearchCreateJob_slots
};

} //extern "C"

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

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

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *Akonadi_SearchCreateJob_SignatureStrings[] = {
    "AkonadiCore.Akonadi.SearchCreateJob(self,name:QString,searchQuery:typing.Union[AkonadiCore.Akonadi.SearchQuery, AkonadiCore.Akonadi.SearchTerm.Relation],parent:PySide6.QtCore.QObject=nullptr)",
    "AkonadiCore.Akonadi.SearchCreateJob.createdCollection(self)->AkonadiCore.Akonadi.Collection",
    "AkonadiCore.Akonadi.SearchCreateJob.doStart(self)",
    "AkonadiCore.Akonadi.SearchCreateJob.isRecursive(self)->bool",
    "AkonadiCore.Akonadi.SearchCreateJob.isRemoteSearchEnabled(self)->bool",
    "AkonadiCore.Akonadi.SearchCreateJob.searchCollections(self)->QList[AkonadiCore.Akonadi.Collection]",
    "AkonadiCore.Akonadi.SearchCreateJob.searchMimeTypes(self)->QStringList",
    "AkonadiCore.Akonadi.SearchCreateJob.setRecursive(self,recursive:bool)",
    "AkonadiCore.Akonadi.SearchCreateJob.setRemoteSearchEnabled(self,enabled:bool)",
    "AkonadiCore.Akonadi.SearchCreateJob.setSearchCollections(self,collections:QList[AkonadiCore.Akonadi.Collection])",
    "AkonadiCore.Akonadi.SearchCreateJob.setSearchMimeTypes(self,mimeTypes:QStringList)",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_SearchCreateJob_SignatureByteSize = 273;
static constexpr uint8_t Akonadi_SearchCreateJob_SignatureBytes[273] = {
    0x78, 0xda, 0x95, 0x92, 0xc1, 0x4e, 0xc3, 0x30, 0x0c, 0x86, 0xef, 0x7b, 0x0a, 0x8e, 0x54, 0x0a,
    0x39, 0x72, 0x88, 0x04, 0x52, 0x55, 0x71, 0x41, 0x20, 0xe8, 0x32, 0x4e, 0xd3, 0x0e, 0x69, 0xea,
    0x41, 0x20, 0x4d, 0x2a, 0xc7, 0x45, 0xea, 0xdb, 0xd3, 0x35, 0xaa, 0xca, 0xa4, 0x0e, 0xd2, 0x9b,
    0x6d, 0xf9, 0xff, 0x6c, 0xff, 0x49, 0xfe, 0xe5, 0x9d, 0xaa, 0x4d, 0xe1, 0x11, 0x78, 0x1e, 0x63,
    0x2e, 0x41, 0xa1, 0xfe, 0x28, 0x10, 0x14, 0xc1, 0xa3, 0xaf, 0xae, 0x03, 0xd8, 0x23, 0x73, 0xaa,
    0x01, 0x51, 0x4a, 0x42, 0xe3, 0xde, 0x59, 0x18, 0x3b, 0xca, 0x0e, 0xb0, 0x17, 0xd4, 0xb7, 0x43,
    0x89, 0xbf, 0x39, 0xe3, 0xdd, 0x3e, 0xbf, 0x88, 0x1b, 0x9b, 0xd9, 0xd5, 0xe5, 0x86, 0x1d, 0x60,
    0xc3, 0xb7, 0x60, 0x15, 0x0d, 0xa0, 0x03, 0x6b, 0x15, 0x82, 0x23, 0xf1, 0xda, 0x4b, 0x53, 0xc3,
    0x2d, 0x2f, 0x69, 0x94, 0x94, 0x2f, 0xd5, 0x27, 0x68, 0xba, 0x73, 0x9d, 0xb5, 0x2d, 0x61, 0xb6,
    0xc9, 0xff, 0xdf, 0x9f, 0xeb, 0x31, 0xaa, 0x0b, 0x6f, 0xed, 0xa0, 0x1d, 0xe8, 0xe3, 0x45, 0xd9,
    0xcd, 0xfd, 0x92, 0x78, 0xee, 0x4a, 0x62, 0xd7, 0x5e, 0x92, 0x42, 0x8a, 0xc4, 0x24, 0x85, 0x09,
    0x5b, 0xd0, 0x1d, 0x06, 0xf3, 0x0d, 0xd3, 0x1e, 0x95, 0xf7, 0x36, 0x59, 0xdb, 0x78, 0x82, 0x58,
    0x7f, 0x70, 0xaa, 0xb2, 0x50, 0xaf, 0xa6, 0xc4, 0xd7, 0x9b, 0x0f, 0x0d, 0x13, 0xa1, 0x7c, 0x32,
    0x81, 0xf6, 0x7f, 0xbb, 0x72, 0x58, 0x31, 0xe2, 0xd9, 0x34, 0xb0, 0xeb, 0x5b, 0x98, 0x07, 0xc4,
    0xff, 0x73, 0x1a, 0x93, 0x88, 0xa1, 0x73, 0xb3, 0x18, 0x4e, 0xa9, 0x38, 0x9d, 0x9b, 0xa5, 0x53,
    0x96, 0x6d, 0x63, 0x10, 0x93, 0x75, 0x34, 0xb9, 0x68, 0x20, 0xd3, 0x73, 0x41, 0x24, 0x59, 0xb9,
    0x72, 0xe0, 0xb9, 0x9d, 0xac, 0x99, 0x52, 0xf1, 0xcb, 0xd6, 0x6c, 0xf3, 0x03, 0xf5, 0x21, 0x6a,
    0x86
};
#endif

PyTypeObject *init_Akonadi_SearchCreateJob(PyObject *enclosingClass)
{
    auto &typeStruct = SbkAkonadiCoreTypeStructs[SBK_Akonadi_SearchCreateJob_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_SearchCreateJob_Type_bases(PyTuple_Pack(1, base1));

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "SearchCreateJob",
        "Akonadi::SearchCreateJob*",
        &Sbk_Akonadi_SearchCreateJob_spec,
        &Shiboken::callCppDestructor< Akonadi::SearchCreateJob >,
        Sbk_Akonadi_SearchCreateJob_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_SearchCreateJob_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_SearchCreateJob_SignatureBytes, Akonadi_SearchCreateJob_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_SearchCreateJob_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        SearchCreateJob_PythonToCpp_SearchCreateJob_PTR,
        is_SearchCreateJob_PythonToCpp_SearchCreateJob_PTR_Convertible,
        SearchCreateJob_PTR_CppToPython_SearchCreateJob);

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

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

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

    return pyType;
}
