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

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

// Extra includes
#include <pysidesignal.h>

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

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

using namespace Akonadi;

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

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

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

ItemFetchJobWrapper::ItemFetchJobWrapper(const ::Akonadi::Collection & collection, ::QObject * parent) : Akonadi::ItemFetchJob(collection, parent)
{
}

ItemFetchJobWrapper::ItemFetchJobWrapper(const ::Akonadi::Item & item, ::QObject * parent) : Akonadi::ItemFetchJob(item, parent)
{
}

ItemFetchJobWrapper::ItemFetchJobWrapper(const ::Akonadi::Tag & tag, ::QObject * parent) : Akonadi::ItemFetchJob(tag, parent)
{
}

ItemFetchJobWrapper::ItemFetchJobWrapper(const ::QList<Akonadi::Item> & items, ::QObject * parent) : Akonadi::ItemFetchJob(items, parent)
{
}

ItemFetchJobWrapper::ItemFetchJobWrapper(const ::QList<long long> & items, ::QObject * parent) : Akonadi::ItemFetchJob(items, parent)
{
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


    // Overloaded function decisor
    // 0: ItemFetchJob::ItemFetchJob(const Akonadi::Collection&,QObject*=)
    // 1: ItemFetchJob::ItemFetchJob(const Akonadi::Item&,QObject*=)
    // 2: ItemFetchJob::ItemFetchJob(const Akonadi::Tag&,QObject*=)
    // 3: ItemFetchJob::ItemFetchJob(const QList<Akonadi::Item>&,QObject*=)
    // 4: ItemFetchJob::ItemFetchJob(const QList<long long>&,QObject*=)
    if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkAkonadiCoreTypeConverters[SBK_AkonadiCore_QList_longlong_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 4; // ItemFetchJob(QList<qlonglong>,QObject*)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[1])))) {
            overloadId = 4; // ItemFetchJob::ItemFetchJob(const QList<long long>&,QObject*=)
        }
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 2; // ItemFetchJob(Akonadi::Tag,QObject*)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[1])))) {
            overloadId = 2; // ItemFetchJob::ItemFetchJob(const Akonadi::Tag&,QObject*=)
        }
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Item_IDX]), (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 1; // ItemFetchJob(Akonadi::Item,QObject*)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[1])))) {
            overloadId = 1; // ItemFetchJob::ItemFetchJob(const Akonadi::Item&,QObject*=)
        }
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkAkonadiCoreTypeConverters[SBK_AkonadiCore_QList_Akonadi_Item_IDX], (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 3; // ItemFetchJob(QList<Akonadi::Item>,QObject*)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[1])))) {
            overloadId = 3; // ItemFetchJob::ItemFetchJob(const QList<Akonadi::Item>&,QObject*=)
        }
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Collection_IDX]), (pyArgs[0])))) {
        if (numArgs == 1) {
            overloadId = 0; // ItemFetchJob(Akonadi::Collection,QObject*)
        } else if (numArgs >= 2
            && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QObject_IDX]), (pyArgs[1])))) {
            overloadId = 0; // ItemFetchJob::ItemFetchJob(const Akonadi::Collection&,QObject*=)
        }
    }

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

    // Resolve keyword arguments
    switch (overloadId) {
        case 0: // ItemFetchJob::ItemFetchJob(const Akonadi::Collection&,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_ItemFetchJob_IDX]);
                }
            }
            break;
        }
        case 1: // ItemFetchJob::ItemFetchJob(const Akonadi::Item&,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_ItemFetchJob_IDX]);
                }
            }
            break;
        }
        case 2: // ItemFetchJob::ItemFetchJob(const Akonadi::Tag&,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_ItemFetchJob_IDX]);
                }
            }
            break;
        }
        case 3: // ItemFetchJob::ItemFetchJob(const QList<Akonadi::Item>&,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_ItemFetchJob_IDX]);
                }
            }
            break;
        }
        case 4: // ItemFetchJob::ItemFetchJob(const QList<long long>&,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_ItemFetchJob_IDX]);
                }
            }
            break;
        }
    }

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

    // Call function/method
    switch (overloadId) {
        case 0: // ItemFetchJob(const Akonadi::Collection &collection, QObject *parent)
        {
            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);

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

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

            }
            break;
        }
        case 1: // ItemFetchJob(const Akonadi::Item &item, QObject *parent)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::Akonadi::Item cppArg0_local;
            ::Akonadi::Item *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) {
                // ItemFetchJob::ItemFetchJob(const Akonadi::Item&,QObject*=)
                void *addr = PySide::nextQObjectMemoryAddr();
                if (addr != nullptr) {
                    cptr = new (addr) ItemFetchJobWrapper(*cppArg0, cppArg1);
                    PySide::setNextQObjectMemoryAddr(nullptr);
                } else {
                    cptr = new ItemFetchJobWrapper(*cppArg0, cppArg1);
                }

            }
            break;
        }
        case 2: // ItemFetchJob(const Akonadi::Tag &tag, QObject *parent)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::Akonadi::Tag cppArg0_local;
            ::Akonadi::Tag *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) {
                // ItemFetchJob::ItemFetchJob(const Akonadi::Tag&,QObject*=)
                void *addr = PySide::nextQObjectMemoryAddr();
                if (addr != nullptr) {
                    cptr = new (addr) ItemFetchJobWrapper(*cppArg0, cppArg1);
                    PySide::setNextQObjectMemoryAddr(nullptr);
                } else {
                    cptr = new ItemFetchJobWrapper(*cppArg0, cppArg1);
                }

            }
            break;
        }
        case 3: // ItemFetchJob(const QList<Akonadi::Item> &items, QObject *parent)
        {
            ::QList<Akonadi::Item> cppArg0;
            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) {
                // ItemFetchJob::ItemFetchJob(const QList<Akonadi::Item>&,QObject*=)
                void *addr = PySide::nextQObjectMemoryAddr();
                if (addr != nullptr) {
                    cptr = new (addr) ItemFetchJobWrapper(cppArg0, cppArg1);
                    PySide::setNextQObjectMemoryAddr(nullptr);
                } else {
                    cptr = new ItemFetchJobWrapper(cppArg0, cppArg1);
                }

            }
            break;
        }
        case 4: // ItemFetchJob(const QList<long long> &items, QObject *parent)
        {
            ::QList<long long> cppArg0;
            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) {
                // ItemFetchJob::ItemFetchJob(const QList<long long>&,QObject*=)
                void *addr = PySide::nextQObjectMemoryAddr();
                if (addr != nullptr) {
                    cptr = new (addr) ItemFetchJobWrapper(cppArg0, cppArg1);
                    PySide::setNextQObjectMemoryAddr(nullptr);
                } else {
                    cptr = new ItemFetchJobWrapper(cppArg0, cppArg1);
                }

            }
            break;
        }
    }

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


    return 1;
}

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

    // Call function/method
    {

        // ItemFetchJob::clearItems()
        cppSelf->clearItems();
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

        // ItemFetchJob::count()const->int
        int cppResult = const_cast<const ::Akonadi::ItemFetchJob *>(cppSelf)->count();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // ItemFetchJob::deliveryOptions()const->QFlags<Akonadi::ItemFetchJob::DeliveryOption>
        QFlags<Akonadi::ItemFetchJob::DeliveryOption> cppResult = const_cast<const ::Akonadi::ItemFetchJob *>(cppSelf)->deliveryOptions();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Enum::getFlagsConverter(reinterpret_cast<SbkEnumType *>(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_QFlags_Akonadi_ItemFetchJob_DeliveryOption_IDX]))), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Overloaded function decisor
    // 0: ItemFetchJob::setCollection(const Akonadi::Collection&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Collection_IDX]), (pyArg)))) {
        overloadId = 0; // ItemFetchJob::setCollection(const Akonadi::Collection&)
    }

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

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


        if (Shiboken::Errors::occurred() == nullptr) {
            // ItemFetchJob::setCollection(const Akonadi::Collection&)
            cppSelf->setCollection(*cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: ItemFetchJob::setDeliveryOption(QFlags<Akonadi::ItemFetchJob::DeliveryOption>)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Enum::getFlagsConverter(reinterpret_cast<SbkEnumType *>(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_QFlags_Akonadi_ItemFetchJob_DeliveryOption_IDX]))), (pyArg)))) {
        overloadId = 0; // ItemFetchJob::setDeliveryOption(QFlags<Akonadi::ItemFetchJob::DeliveryOption>)
    }

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

    // Call function/method
    {
        ::QFlags<Akonadi::ItemFetchJob::DeliveryOption> cppArg0 = QFlags<Akonadi::ItemFetchJob::DeliveryOption>(0);
        pythonToCpp(pyArg, &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // ItemFetchJob::setDeliveryOption(QFlags<Akonadi::ItemFetchJob::DeliveryOption>)
            cppSelf->setDeliveryOption(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

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

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

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_Akonadi_ItemFetchJobFunc_setLimit(PyObject *self, PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::ItemFetchJob *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemFetchJob_IDX]), reinterpret_cast<SbkObject *>(self)));
    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
    errInfo.reset(Shiboken::checkInvalidArgumentCount(numArgs, 2, 3));
    if (!errInfo.isNull())
        return Shiboken::returnWrongArguments(args, "setLimit", errInfo, SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemFetchJob_IDX]);

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


    // Overloaded function decisor
    // 0: ItemFetchJob::setLimit(int,int,Qt::SortOrder=)
    if (numArgs >= 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[1])))) {
        if (numArgs == 2) {
            overloadId = 0; // setLimit(int,int,Qt::SortOrder)
        } else if (numArgs >= 3
            && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Enum::getConverter(reinterpret_cast<SbkEnumType *>(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_Qt_SortOrder_IDX]))), (pyArgs[2])))) {
            overloadId = 0; // ItemFetchJob::setLimit(int,int,Qt::SortOrder=)
        }
    }

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

    // Call function/method
    {
        if (kwds != nullptr && PyDict_Size(kwds) > 0) {
            static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"order", 2}};
            if (!Shiboken::parseKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                || (pyArgs[2] != nullptr && !((pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Enum::getConverter(reinterpret_cast<SbkEnumType *>(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_Qt_SortOrder_IDX]))), (pyArgs[2])))))) {
                Py_XINCREF(errInfo.object());
                return Shiboken::returnWrongArguments(args, "setLimit", errInfo, SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemFetchJob_IDX]);
            }
        }
        int cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        int cppArg1;
        pythonToCpp[1](pyArgs[1], &cppArg1);
        ::Qt::SortOrder cppArg2(Qt::DescendingOrder);
        if (pythonToCpp[2])
            pythonToCpp[2](pyArgs[2], &cppArg2);

        if (Shiboken::Errors::occurred() == nullptr) {
            // ItemFetchJob::setLimit(int,int,Qt::SortOrder=)
            cppSelf->setLimit(cppArg0, cppArg1, cppArg2);
        }
    }

     return Sbk_ReturnFromPython_None();
}


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

static const char *Sbk_Akonadi_ItemFetchJob_EnumFlagInfo[] = {
    "DeliveryOption:IntFlag:DeliveryOptions",
    nullptr // Sentinel
};

static PyMethodDef Sbk_Akonadi_ItemFetchJob_methods[] = {
    {"clearItems", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_clearItems), METH_NOARGS, nullptr},
    {"count", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_count), METH_NOARGS, nullptr},
    {"deliveryOptions", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_deliveryOptions), METH_NOARGS, nullptr},
    {"doStart", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_doStart), METH_NOARGS, nullptr},
    {"fetchScope", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_fetchScope), METH_NOARGS, nullptr},
    {"items", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_items), METH_NOARGS, nullptr},
    {"setCollection", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_setCollection), METH_O, nullptr},
    {"setDeliveryOption", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_setDeliveryOption), METH_O, nullptr},
    {"setFetchScope", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_setFetchScope), METH_O, nullptr},
    {"setLimit", reinterpret_cast<PyCFunction>(Sbk_Akonadi_ItemFetchJobFunc_setLimit), METH_VARARGS|METH_KEYWORDS, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static int Sbk_Akonadi_ItemFetchJob_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value != nullptr && PyCallable_Check(value) != 0) {
        auto plain_inst = reinterpret_cast< ::Akonadi::ItemFetchJob *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemFetchJob_IDX]), reinterpret_cast<SbkObject *>(self)));
        auto *inst = dynamic_cast<ItemFetchJobWrapper *>(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_ItemFetchJob_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_ItemFetchJob_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_ItemFetchJob_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_Akonadi_ItemFetchJob_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_ItemFetchJob_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_ItemFetchJob_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_ItemFetchJob_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_ItemFetchJob_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObject_tp_new)},
    {0, nullptr}
};
static PyType_Spec Sbk_Akonadi_ItemFetchJob_spec = {
    "1:AkonadiCore.Akonadi.ItemFetchJob",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_ItemFetchJob_slots
};

} //extern "C"

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


// Type conversion functions.

// Python to C++ enum conversion.
static void Enum_PythonToCpp_Akonadi_ItemFetchJob_DeliveryOption(PyObject *pyIn, void *cppOut)
{
    const auto value = static_cast<::Akonadi::ItemFetchJob::DeliveryOption>(Shiboken::Enum::getValue(pyIn));
    *reinterpret_cast<::Akonadi::ItemFetchJob::DeliveryOption *>(cppOut) = value;

}
static PythonToCppFunc is_Enum_PythonToCpp_Akonadi_ItemFetchJob_DeliveryOption_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemFetchJob_DeliveryOption_IDX])))
        return Enum_PythonToCpp_Akonadi_ItemFetchJob_DeliveryOption;
    return {};
}

static PyObject *Akonadi_ItemFetchJob_DeliveryOption_CppToPython_Enum(PyTypeObject *pyType, const void *cppIn)
{
    using IntType = std::underlying_type_t<::Akonadi::ItemFetchJob::DeliveryOption>;
    const auto castCppIn = IntType(*reinterpret_cast<const ::Akonadi::ItemFetchJob::DeliveryOption *>(cppIn));
    return Shiboken::Enum::newItem(pyType, castCppIn);

}

static void Flag_PythonToCpp_Akonadi_ItemFetchJob_DeliveryOption(PyObject *pyIn, void *cppOut)
{
    const auto value = QFlags<::Akonadi::ItemFetchJob::DeliveryOption>::fromInt(Shiboken::Enum::getValue(pyIn));
    *reinterpret_cast<QFlags<::Akonadi::ItemFetchJob::DeliveryOption> *>(cppOut) = value;

}

static PyObject *Akonadi_ItemFetchJob_DeliveryOption_CppToPython_Flag(const void *cppIn)
{
    const auto flags = *reinterpret_cast<const QFlags<::Akonadi::ItemFetchJob::DeliveryOption> *>(cppIn);
    return Shiboken::Enum::newItem(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemFetchJob_DeliveryOption_IDX]), flags.toInt());

}

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

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

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *Akonadi_ItemFetchJob_SignatureStrings[] = {
    "4:AkonadiCore.Akonadi.ItemFetchJob(self,collection:AkonadiCore.Akonadi.Collection,parent:PySide6.QtCore.QObject=nullptr)",
    "3:AkonadiCore.Akonadi.ItemFetchJob(self,item:AkonadiCore.Akonadi.Item,parent:PySide6.QtCore.QObject=nullptr)",
    "2:AkonadiCore.Akonadi.ItemFetchJob(self,tag:AkonadiCore.Akonadi.Tag,parent:PySide6.QtCore.QObject=nullptr)",
    "1:AkonadiCore.Akonadi.ItemFetchJob(self,items:QList[AkonadiCore.Akonadi.Item],parent:PySide6.QtCore.QObject=nullptr)",
    "0:AkonadiCore.Akonadi.ItemFetchJob(self,items:QList[long long],parent:PySide6.QtCore.QObject=nullptr)",
    "AkonadiCore.Akonadi.ItemFetchJob.clearItems(self)",
    "AkonadiCore.Akonadi.ItemFetchJob.count(self)->int",
    "AkonadiCore.Akonadi.ItemFetchJob.deliveryOptions(self)->AkonadiCore.Akonadi.ItemFetchJob.DeliveryOption",
    "AkonadiCore.Akonadi.ItemFetchJob.doStart(self)",
    "AkonadiCore.Akonadi.ItemFetchJob.fetchScope(self)->AkonadiCore.Akonadi.ItemFetchScope",
    "AkonadiCore.Akonadi.ItemFetchJob.items(self)->QList[AkonadiCore.Akonadi.Item]",
    "AkonadiCore.Akonadi.ItemFetchJob.setCollection(self,collection:AkonadiCore.Akonadi.Collection)",
    "AkonadiCore.Akonadi.ItemFetchJob.setDeliveryOption(self,options:AkonadiCore.Akonadi.ItemFetchJob.DeliveryOption)",
    "AkonadiCore.Akonadi.ItemFetchJob.setFetchScope(self,fetchScope:AkonadiCore.Akonadi.ItemFetchScope)",
    "AkonadiCore.Akonadi.ItemFetchJob.setLimit(self,limit:int,start:int,order:PySide6.QtCore.Qt.SortOrder=Qt.DescendingOrder)",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_ItemFetchJob_SignatureByteSize = 304;
static constexpr uint8_t Akonadi_ItemFetchJob_SignatureBytes[304] = {
    0x78, 0xda, 0x9d, 0x93, 0x4d, 0x6b, 0xc3, 0x30, 0x0c, 0x86, 0xef, 0xfd, 0x15, 0x3b, 0x2e, 0x90,
    0x86, 0x7d, 0xb1, 0x83, 0xa1, 0x85, 0xd1, 0x52, 0xd8, 0x28, 0x64, 0x21, 0xbb, 0x8d, 0x1d, 0x52,
    0x47, 0xcd, 0xbc, 0xb9, 0x56, 0xb0, 0xd5, 0x41, 0xff, 0xfd, 0xe2, 0x64, 0x5b, 0x08, 0x6b, 0xb1,
    0xd2, 0x4b, 0x50, 0x64, 0xbd, 0x7a, 0x6c, 0x7d, 0xdc, 0x89, 0x87, 0x4f, 0x34, 0x45, 0xa9, 0x16,
    0x68, 0x21, 0xf9, 0xb1, 0x93, 0x47, 0x82, 0xdd, 0x0a, 0x48, 0xbe, 0x3f, 0xe1, 0xe6, 0xd2, 0x81,
    0xde, 0xc6, 0x12, 0xb5, 0x06, 0x49, 0x0a, 0xcd, 0x51, 0xc1, 0xe2, 0xef, 0x38, 0xae, 0x0b, 0x0b,
    0x86, 0xc4, 0xf3, 0x21, 0x57, 0x25, 0xdc, 0x27, 0x19, 0xb5, 0x81, 0x59, 0xba, 0xf9, 0x68, 0x02,
    0x66, 0x66, 0xaf, 0x75, 0x4d, 0x36, 0x9a, 0xdc, 0x32, 0xc1, 0xaa, 0xf1, 0x9c, 0x0c, 0xe5, 0xc2,
    0x6e, 0x98, 0x30, 0x2a, 0xaa, 0xa3, 0x91, 0x2f, 0x45, 0xc5, 0x45, 0x5d, 0x8f, 0x78, 0x97, 0x13,
    0xd9, 0x5a, 0x39, 0x7a, 0x3d, 0xa5, 0x78, 0xe3, 0x42, 0xaf, 0xce, 0x80, 0x6a, 0x34, 0xd5, 0x85,
    0xff, 0xb0, 0x29, 0x21, 0x46, 0x22, 0x35, 0x14, 0xd6, 0x7b, 0x5c, 0x8b, 0xe3, 0x28, 0x70, 0x6f,
    0xa8, 0x0b, 0x9e, 0xce, 0x95, 0xa1, 0xb0, 0xa2, 0x04, 0xad, 0xbe, 0xc0, 0x1e, 0xd2, 0xda, 0x4f,
    0x9b, 0xfb, 0xd5, 0x06, 0x75, 0xcb, 0x81, 0x8e, 0xc1, 0xc1, 0x9c, 0x0a, 0x4b, 0xdc, 0x87, 0x6c,
    0xbd, 0x91, 0x4b, 0xac, 0x81, 0x75, 0xa3, 0x36, 0x32, 0x9c, 0x55, 0xf5, 0xb5, 0x9c, 0xce, 0x03,
    0xb3, 0x12, 0xce, 0xe6, 0x80, 0xfa, 0x3d, 0x1d, 0xb9, 0xd6, 0x11, 0x2b, 0xfd, 0xb0, 0xc8, 0x1d,
    0x02, 0xbb, 0x46, 0x89, 0x91, 0x1d, 0xe2, 0x01, 0x57, 0xc3, 0xb2, 0xc7, 0x7d, 0x1b, 0x44, 0xb8,
    0xfe, 0x3c, 0xc4, 0x5a, 0xed, 0x54, 0x37, 0x06, 0xb1, 0xf6, 0xa6, 0x68, 0xc6, 0x34, 0x76, 0x7e,
    0x36, 0x5a, 0x0b, 0x6d, 0x09, 0xf6, 0xdf, 0xea, 0x50, 0x92, 0xa3, 0xa5, 0xd4, 0x9f, 0xcd, 0x9a,
    0x9f, 0x25, 0x38, 0x09, 0xa6, 0x54, 0xa6, 0x6a, 0x5d, 0xd1, 0xe4, 0x1b, 0xb0, 0x02, 0xff, 0xdb
};
#endif

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

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "ItemFetchJob",
        "Akonadi::ItemFetchJob*",
        &Sbk_Akonadi_ItemFetchJob_spec,
        &Shiboken::callCppDestructor< Akonadi::ItemFetchJob >,
        Sbk_Akonadi_ItemFetchJob_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_ItemFetchJob_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_ItemFetchJob_SignatureBytes, Akonadi_ItemFetchJob_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_ItemFetchJob_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        ItemFetchJob_PythonToCpp_ItemFetchJob_PTR,
        is_ItemFetchJob_PythonToCpp_ItemFetchJob_PTR_Convertible,
        ItemFetchJob_PTR_CppToPython_ItemFetchJob);

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

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

    // Pass the ..._EnumFlagInfo to the class.
    SbkObjectType_SetEnumFlagInfo(pyType, Sbk_Akonadi_ItemFetchJob_EnumFlagInfo);

    // Initialization of enums.
    Shiboken::AutoDecRef tpDict{};
    [[maybe_unused]] PyTypeObject *EType{};

    // Initialization of enum 'DeliveryOption'.
    const char *DeliveryOption_Initializer[] = {
        "ItemGetter",
        "EmitItemsIndividually",
        "EmitItemsInBatches",
        "Default",
        nullptr};
    // "uint8_t" used instead of "unsigned int"
    constexpr uint8_t DeliveryOption_InitializerValues[] = {
        uint8_t(Akonadi::ItemFetchJob::DeliveryOption::ItemGetter),            //  0x01  1
        uint8_t(Akonadi::ItemFetchJob::DeliveryOption::EmitItemsIndividually), //  0x02  2
        uint8_t(Akonadi::ItemFetchJob::DeliveryOption::EmitItemsInBatches),    //  0x04  4
        uint8_t(Akonadi::ItemFetchJob::DeliveryOption::Default)                //  0x05  5
        };
    EType = Shiboken::Enum::createPythonEnum(pyType,
        "1:AkonadiCore.Akonadi.ItemFetchJob.DeliveryOption",
        DeliveryOption_Initializer, DeliveryOption_InitializerValues);
    SbkAkonadiCoreTypeStructs[SBK_Akonadi_ItemFetchJob_DeliveryOption_IDX].type = EType;
    // PYSIDE-1735: Mapping the flags class to the same enum class.
    SbkAkonadiCoreTypeStructs[SBK_QFlags_Akonadi_ItemFetchJob_DeliveryOption_IDX].type =
        EType;
    // Register converter for enum 'Akonadi::ItemFetchJob::DeliveryOption'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(EType,
            Akonadi_ItemFetchJob_DeliveryOption_CppToPython_Enum);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            Enum_PythonToCpp_Akonadi_ItemFetchJob_DeliveryOption,
            is_Enum_PythonToCpp_Akonadi_ItemFetchJob_DeliveryOption_Convertible);
        Shiboken::Conversions::registerConverterName(converter, "Akonadi::ItemFetchJob::DeliveryOption");
        Shiboken::Conversions::registerConverterAlias(converter, "ItemFetchJob::DeliveryOption");
        Shiboken::Conversions::registerConverterAlias(converter, "DeliveryOption");
        SbkConverter *flagsConverter = Shiboken::Conversions::createConverter(EType,
            Akonadi_ItemFetchJob_DeliveryOption_CppToPython_Flag);
        Shiboken::Conversions::addPythonToCppValueConversion(flagsConverter,
            Flag_PythonToCpp_Akonadi_ItemFetchJob_DeliveryOption,
            is_Enum_PythonToCpp_Akonadi_ItemFetchJob_DeliveryOption_Convertible);
        // Register converter for flag 'QFlags<Akonadi::ItemFetchJob::DeliveryOption>'.
        Shiboken::Conversions::registerConverterName(flagsConverter, "QFlags<Akonadi::ItemFetchJob::DeliveryOption>");
        Shiboken::Conversions::registerConverterName(flagsConverter, "Akonadi::ItemFetchJob::DeliveryOptions");
        Shiboken::Enum::setTypeConverter(EType, converter, flagsConverter);
    }
    // End of 'DeliveryOption' enum/flags.

    PySide::Signal::registerSignals(pyType, &::Akonadi::ItemFetchJob::staticMetaObject);
    qRegisterMetaType< ::Akonadi::ItemFetchJob::DeliveryOption >("ItemFetchJob::DeliveryOption");
    qRegisterMetaType< ::Akonadi::ItemFetchJob::DeliveryOption >("Akonadi::ItemFetchJob::DeliveryOption");
    Shiboken::ObjectType::setSubTypeInitHook(pyType, &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(pyType, &::Akonadi::ItemFetchJob::staticMetaObject, sizeof(ItemFetchJobWrapper));

    return pyType;
}
