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

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

// Argument includes
#include <QString>
#include <agentinstance.h>
#include <collection.h>
#include <qbytearray.h>
#include <qmetaobject.h>
#include <qobject.h>
#include <qobjectdefs.h>

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

using namespace Akonadi;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

extern "C" {
static int Sbk_Akonadi_SpecialCollections_Init(PyObject *, PyObject *, PyObject *)
{
    Shiboken::Errors::setInstantiateNonConstructible("SpecialCollections");
    return -1;
}

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

    // invalid argument lengths

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


    // Overloaded function decisor
    // 0: SpecialCollections::collection(const QByteArray&,const Akonadi::AgentInstance&)const->Akonadi::Collection
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_AgentInstance_IDX]), (pyArgs[1])))) {
        overloadId = 0; // SpecialCollections::collection(const QByteArray&,const Akonadi::AgentInstance&)const->Akonadi::Collection
    }

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

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QByteArray cppArg0_local;
        ::QByteArray *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 {};
        ::Akonadi::AgentInstance cppArg1_local;
        ::Akonadi::AgentInstance *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            pythonToCpp[1](pyArgs[1], &cppArg1);


        if (Shiboken::Errors::occurred() == nullptr) {
            // SpecialCollections::collection(const QByteArray&,const Akonadi::AgentInstance&)const->Akonadi::Collection
            Akonadi::Collection cppResult = const_cast<const ::Akonadi::SpecialCollections *>(cppSelf)->collection(*cppArg0, *cppArg1);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Collection_IDX]), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

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

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


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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // invalid argument lengths

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


    // Overloaded function decisor
    // 0: SpecialCollections::hasCollection(const QByteArray&,const Akonadi::AgentInstance&)const->bool
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_AgentInstance_IDX]), (pyArgs[1])))) {
        overloadId = 0; // SpecialCollections::hasCollection(const QByteArray&,const Akonadi::AgentInstance&)const->bool
    }

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

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QByteArray cppArg0_local;
        ::QByteArray *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 {};
        ::Akonadi::AgentInstance cppArg1_local;
        ::Akonadi::AgentInstance *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            pythonToCpp[1](pyArgs[1], &cppArg1);


        if (Shiboken::Errors::occurred() == nullptr) {
            // SpecialCollections::hasCollection(const QByteArray&,const Akonadi::AgentInstance&)const->bool
            bool cppResult = const_cast<const ::Akonadi::SpecialCollections *>(cppSelf)->hasCollection(*cppArg0, *cppArg1);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

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

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


        if (Shiboken::Errors::occurred() == nullptr) {
            // SpecialCollections::hasDefaultCollection(const QByteArray&)const->bool
            bool cppResult = const_cast<const ::Akonadi::SpecialCollections *>(cppSelf)->hasDefaultCollection(*cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

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

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // SpecialCollections::isSpecialAgent(const QString&)const->bool
            bool cppResult = const_cast<const ::Akonadi::SpecialCollections *>(cppSelf)->isSpecialAgent(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // invalid argument lengths

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


    // Overloaded function decisor
    // 0: SpecialCollections::registerCollection(const QByteArray&,const Akonadi::Collection&)->bool
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Collection_IDX]), (pyArgs[1])))) {
        overloadId = 0; // SpecialCollections::registerCollection(const QByteArray&,const Akonadi::Collection&)->bool
    }

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

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QByteArray cppArg0_local;
        ::QByteArray *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 {};
        ::Akonadi::Collection cppArg1_local;
        ::Akonadi::Collection *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            pythonToCpp[1](pyArgs[1], &cppArg1);


        if (Shiboken::Errors::occurred() == nullptr) {
            // SpecialCollections::registerCollection(const QByteArray&,const Akonadi::Collection&)->bool
            bool cppResult = cppSelf->registerCollection(*cppArg0, *cppArg1);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // invalid argument lengths

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


    // Overloaded function decisor
    // 0: static SpecialCollections::setSpecialCollectionType(const QByteArray&,const Akonadi::Collection&)
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Collection_IDX]), (pyArgs[1])))) {
        overloadId = 0; // static SpecialCollections::setSpecialCollectionType(const QByteArray&,const Akonadi::Collection&)
    }

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

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QByteArray cppArg0_local;
        ::QByteArray *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 {};
        ::Akonadi::Collection cppArg1_local;
        ::Akonadi::Collection *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            pythonToCpp[1](pyArgs[1], &cppArg1);


        if (Shiboken::Errors::occurred() == nullptr) {
            // static SpecialCollections::setSpecialCollectionType(const QByteArray&,const Akonadi::Collection&)
            ::Akonadi::SpecialCollections::setSpecialCollectionType(*cppArg0, *cppArg1);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "unregisterCollection", SbkAkonadiCoreTypeStructs[SBK_Akonadi_SpecialCollections_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) {
            // SpecialCollections::unregisterCollection(const Akonadi::Collection&)->bool
            bool cppResult = cppSelf->unregisterCollection(*cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_Akonadi_SpecialCollectionsFunc_unsetSpecialCollection([[maybe_unused]] PyObject *self, PyObject *pyArg)
{
    Shiboken::AutoDecRef errInfo{};
    Shiboken::PythonContextMarker pcm;
    int overloadId = -1;
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;

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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "unsetSpecialCollection", SbkAkonadiCoreTypeStructs[SBK_Akonadi_SpecialCollections_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) {
            // static SpecialCollections::unsetSpecialCollection(const Akonadi::Collection&)
            ::Akonadi::SpecialCollections::unsetSpecialCollection(*cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}


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

static PyMethodDef Sbk_Akonadi_SpecialCollections_methods[] = {
    {"collection", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SpecialCollectionsFunc_collection), METH_VARARGS, nullptr},
    {"defaultCollection", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SpecialCollectionsFunc_defaultCollection), METH_O, nullptr},
    {"hasCollection", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SpecialCollectionsFunc_hasCollection), METH_VARARGS, nullptr},
    {"hasDefaultCollection", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SpecialCollectionsFunc_hasDefaultCollection), METH_O, nullptr},
    {"isSpecialAgent", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SpecialCollectionsFunc_isSpecialAgent), METH_O, nullptr},
    {"registerCollection", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SpecialCollectionsFunc_registerCollection), METH_VARARGS, nullptr},
    {"setSpecialCollectionType", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SpecialCollectionsFunc_setSpecialCollectionType), METH_VARARGS|METH_STATIC, nullptr},
    {"unregisterCollection", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SpecialCollectionsFunc_unregisterCollection), METH_O, nullptr},
    {"unsetSpecialCollection", reinterpret_cast<PyCFunction>(Sbk_Akonadi_SpecialCollectionsFunc_unsetSpecialCollection), METH_O|METH_STATIC, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static int Sbk_Akonadi_SpecialCollections_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value != nullptr && PyCallable_Check(value) != 0) {
        auto plain_inst = reinterpret_cast< ::Akonadi::SpecialCollections *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_SpecialCollections_IDX]), reinterpret_cast<SbkObject *>(self)));
        auto *inst = dynamic_cast<SpecialCollectionsWrapper *>(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_SpecialCollections_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_SpecialCollections_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_SpecialCollections_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_Akonadi_SpecialCollections_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_SpecialCollections_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_SpecialCollections_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_SpecialCollections_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_SpecialCollections_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkDummyNew /* PYSIDE-595: Prevent replacement of "0" with base->tp_new. */)},
    {0, nullptr}
};
static PyType_Spec Sbk_Akonadi_SpecialCollections_spec = {
    "1:AkonadiCore.Akonadi.SpecialCollections",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_SpecialCollections_slots
};

} //extern "C"

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

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

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *Akonadi_SpecialCollections_SignatureStrings[] = {
    "AkonadiCore.Akonadi.SpecialCollections.collection(self,type:typing.Union[PySide6.QtCore.QByteArray, char*],instance:AkonadiCore.Akonadi.AgentInstance)->AkonadiCore.Akonadi.Collection",
    "AkonadiCore.Akonadi.SpecialCollections.defaultCollection(self,type:typing.Union[PySide6.QtCore.QByteArray, char*])->AkonadiCore.Akonadi.Collection",
    "AkonadiCore.Akonadi.SpecialCollections.hasCollection(self,type:typing.Union[PySide6.QtCore.QByteArray, char*],instance:AkonadiCore.Akonadi.AgentInstance)->bool",
    "AkonadiCore.Akonadi.SpecialCollections.hasDefaultCollection(self,type:typing.Union[PySide6.QtCore.QByteArray, char*])->bool",
    "AkonadiCore.Akonadi.SpecialCollections.isSpecialAgent(self,instanceIdentifier:QString)->bool",
    "AkonadiCore.Akonadi.SpecialCollections.registerCollection(self,type:typing.Union[PySide6.QtCore.QByteArray, char*],collection:AkonadiCore.Akonadi.Collection)->bool",
    "AkonadiCore.Akonadi.SpecialCollections.setSpecialCollectionType(type:typing.Union[PySide6.QtCore.QByteArray, char*],collection:AkonadiCore.Akonadi.Collection)",
    "AkonadiCore.Akonadi.SpecialCollections.unregisterCollection(self,collection:AkonadiCore.Akonadi.Collection)->bool",
    "AkonadiCore.Akonadi.SpecialCollections.unsetSpecialCollection(collection:AkonadiCore.Akonadi.Collection)",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_SpecialCollections_SignatureByteSize = 231;
static constexpr uint8_t Akonadi_SpecialCollections_SignatureBytes[231] = {
    0x78, 0xda, 0xbd, 0x93, 0x31, 0x8f, 0xc2, 0x30, 0x0c, 0x85, 0x77, 0x7e, 0x05, 0x63, 0x41, 0x25,
    0x23, 0x43, 0x07, 0xa4, 0xd0, 0x5b, 0xd8, 0xa8, 0x0a, 0x13, 0x62, 0xc8, 0xa5, 0x6e, 0xb1, 0x88,
    0x1c, 0x94, 0xb8, 0x43, 0xff, 0x3d, 0x11, 0x70, 0xc7, 0x70, 0x05, 0x11, 0x51, 0x6e, 0x89, 0xac,
    0x27, 0xcb, 0xfe, 0xde, 0x93, 0x23, 0x8f, 0x96, 0x54, 0x85, 0xb9, 0x75, 0x20, 0xe4, 0xb5, 0x16,
    0xe5, 0x09, 0x34, 0x2a, 0x93, 0x5b, 0x63, 0x40, 0x33, 0x5a, 0xf2, 0x42, 0xff, 0xd6, 0x89, 0x07,
    0x53, 0xa7, 0xdc, 0x9d, 0x20, 0x0b, 0x0f, 0x52, 0x23, 0xb6, 0x14, 0xe4, 0xdd, 0xba, 0x2b, 0xb1,
    0x82, 0xb9, 0x28, 0xf8, 0x32, 0xab, 0x58, 0x76, 0x0c, 0xd2, 0x39, 0xd5, 0xa5, 0x63, 0x7d, 0x50,
    0x6e, 0xba, 0x4f, 0x91, 0x3c, 0x2b, 0xd2, 0x90, 0xc9, 0x9e, 0x9d, 0xb2, 0x01, 0xe2, 0xd5, 0xad,
    0x63, 0x32, 0x5b, 0xf4, 0xf5, 0xdc, 0x81, 0x46, 0xf2, 0x35, 0xec, 0x0a, 0x6a, 0xd5, 0x1a, 0xce,
    0xdf, 0xa7, 0x1f, 0x0c, 0xe9, 0xa0, 0x7c, 0xfe, 0xdf, 0x61, 0x7e, 0x5b, 0x6b, 0x22, 0xf8, 0xbe,
    0x86, 0x4c, 0x2d, 0x66, 0x37, 0xfa, 0x9b, 0x78, 0x31, 0x70, 0xdd, 0xfa, 0x63, 0x74, 0x55, 0x05,
    0x09, 0x6b, 0x04, 0x97, 0x15, 0x25, 0xbb, 0x00, 0x11, 0x39, 0xdc, 0x41, 0x83, 0x9e, 0xc1, 0x0d,
    0x91, 0xfe, 0xfd, 0x3b, 0x64, 0xcf, 0xaf, 0x22, 0x92, 0xd1, 0x03, 0xff, 0x51, 0x37, 0x81, 0x2f,
    0xf9, 0x2c, 0xe4, 0xab, 0x78, 0x2d, 0x3d, 0x0a, 0xf1, 0x53, 0x81, 0xb4, 0xd4, 0x17, 0x49, 0x12,
    0x61, 0xed, 0x0c, 0xd7, 0xc7, 0xd1, 0x99
};
#endif

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

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

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "SpecialCollections",
        "Akonadi::SpecialCollections*",
        &Sbk_Akonadi_SpecialCollections_spec,
        &Shiboken::callCppDestructor< Akonadi::SpecialCollections >,
        Sbk_Akonadi_SpecialCollections_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_SpecialCollections_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_SpecialCollections_SignatureBytes, Akonadi_SpecialCollections_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_SpecialCollections_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        SpecialCollections_PythonToCpp_SpecialCollections_PTR,
        is_SpecialCollections_PythonToCpp_SpecialCollections_PTR_Convertible,
        SpecialCollections_PTR_CppToPython_SpecialCollections);

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

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

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

    return pyType;
}
