
// 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 <QtCore/QBuffer>
#include <pysideqenum.h>
#include <pysideutils.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED


// module include
#include "akonadicore_python.h"

// main header
#include "akonadi_cachepolicy_wrapper.h"

// Argument includes
#include <QStringList>
#include <cachepolicy.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_CachePolicy_TypeF(void)
{
    return SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX].type;
}
} // extern "C"


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

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

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

    // invalid argument lengths

    if (PyArg_UnpackTuple(args, "CachePolicy", 0, 1, &(pyArgs[0])) == 0)
        return -1;


    // Overloaded function decisor
    // 0: CachePolicy::CachePolicy()
    // 1: CachePolicy::CachePolicy(const Akonadi::CachePolicy&)
    if (numArgs == 0) {
        overloadId = 0; // CachePolicy()
    } else if (numArgs == 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX]), (pyArgs[0])))) {
        overloadId = 1; // CachePolicy::CachePolicy(const Akonadi::CachePolicy&)
    }

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


    // PyMI support
    Shiboken::callInheritedInit(self, args, kwds, SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX]);
    if (Shiboken::Errors::occurred() != nullptr)
        return -1;

    // Call function/method
    switch (overloadId) {
        case 0: // CachePolicy()
        {

            // CachePolicy::CachePolicy()
            cptr = new ::Akonadi::CachePolicy();
            break;
        }
        case 1: // CachePolicy(const Akonadi::CachePolicy &other)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::Akonadi::CachePolicy cppArg0_local;
            ::Akonadi::CachePolicy *cppArg0 = &cppArg0_local;
            if (pythonToCpp[0].isValue())
                pythonToCpp[0](pyArgs[0], &cppArg0_local);
            else
                pythonToCpp[0](pyArgs[0], &cppArg0);


            if (Shiboken::Errors::occurred() == nullptr) {
                // CachePolicy::CachePolicy(const Akonadi::CachePolicy&)
                cptr = new ::Akonadi::CachePolicy(*cppArg0);
            }
            break;
        }
    }

    if (Shiboken::Errors::occurred() != nullptr || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::Akonadi::CachePolicy >(), cptr)) {
        delete cptr;
        return -1;
    }
    if (cptr == nullptr)
        return Shiboken::returnWrongArguments_MinusOne(args, "__init__", SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX]);

    Shiboken::Object::setValidCpp(sbkSelf, true);
    Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);


    return 1;
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Overloaded function decisor
    // 0: CachePolicy::setCacheTimeout(int)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 0; // CachePolicy::setCacheTimeout(int)
    }

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

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // CachePolicy::setCacheTimeout(int)
            cppSelf->setCacheTimeout(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

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

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: CachePolicy::setIntervalCheckTime(int)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
        overloadId = 0; // CachePolicy::setIntervalCheckTime(int)
    }

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

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // CachePolicy::setIntervalCheckTime(int)
            cppSelf->setIntervalCheckTime(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

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

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

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

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_Akonadi_CachePolicy__copy__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto &cppSelf = *reinterpret_cast< ::Akonadi::CachePolicy *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX]), &cppSelf);
    if (Shiboken::Errors::occurred() != nullptr || pyResult == nullptr) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}


static const char *Sbk_Akonadi_CachePolicy_PropertyStrings[] = {
    "cacheTimeout::",
    "inheritFromParent::",
    "intervalCheckTime::",
    "localParts::",
    "syncOnDemand::",
    nullptr // Sentinel
};

static PyMethodDef Sbk_Akonadi_CachePolicy_methods[] = {
    {"cacheTimeout", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_cacheTimeout), METH_NOARGS, nullptr},
    {"inheritFromParent", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_inheritFromParent), METH_NOARGS, nullptr},
    {"intervalCheckTime", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_intervalCheckTime), METH_NOARGS, nullptr},
    {"localParts", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_localParts), METH_NOARGS, nullptr},
    {"setCacheTimeout", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_setCacheTimeout), METH_O, nullptr},
    {"setInheritFromParent", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_setInheritFromParent), METH_O, nullptr},
    {"setIntervalCheckTime", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_setIntervalCheckTime), METH_O, nullptr},
    {"setLocalParts", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_setLocalParts), METH_O, nullptr},
    {"setSyncOnDemand", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_setSyncOnDemand), METH_O, nullptr},
    {"syncOnDemand", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicyFunc_syncOnDemand), METH_NOARGS, nullptr},
    {"__copy__", reinterpret_cast<PyCFunction>(Sbk_Akonadi_CachePolicy__copy__), METH_NOARGS, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

// Rich comparison
static PyObject * Sbk_Akonadi_CachePolicy_richcompare(PyObject *self, PyObject *pyArg, int op)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto &cppSelf = *reinterpret_cast< ::Akonadi::CachePolicy *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    switch (op) {
        case Py_EQ:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX]), (pyArg)))) {
                // CachePolicy::operator==(const Akonadi::CachePolicy&)const->bool
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::Akonadi::CachePolicy cppArg0_local;
                ::Akonadi::CachePolicy *cppArg0 = &cppArg0_local;
                if (pythonToCpp.isValue())
                    pythonToCpp(pyArg, &cppArg0_local);
                else
                    pythonToCpp(pyArg, &cppArg0);

                bool cppResult = cppSelf == (*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            } else {
                pyResult = Py_False;
                Py_INCREF(pyResult);
            }

            break;
        default:
            // PYSIDE-74: By default, we redirect to object's tp_richcompare (which is `==`, `!=`).
            return FallbackRichCompare(self, pyArg, op);
    }

    return Shiboken::returnFromRichCompare(pyResult);
}

} // extern "C"

static int Sbk_Akonadi_CachePolicy_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_CachePolicy_clear(PyObject *self)
{
    auto clearProc = reinterpret_cast<inquiry>(PyType_GetSlot(SbkObject_TypeF(), Py_tp_clear));
    ;
    return clearProc(self);
}
extern "C"
{
static PyObject *Sbk_Akonadi_CachePolicy__repr__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::CachePolicy *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX]), reinterpret_cast<SbkObject *>(self)));
    QBuffer buffer;
    buffer.open(QBuffer::ReadWrite);
    QDebug dbg(&buffer);
    dbg << *cppSelf;
    buffer.close();
    QByteArray str = buffer.data();
    const auto idx = str.indexOf('(');
    auto *typeName = Py_TYPE(self)->tp_name;
    if (idx >= 0)
        str.replace(0, idx, typeName);
    str = str.trimmed();
    Shiboken::AutoDecRef tpDict(PepType_GetDict(Py_TYPE(self)));
    PyObject *mod = PyDict_GetItem(tpDict.object(), Shiboken::PyMagicName::module());
    if (mod != nullptr && std::strchr(typeName, '.') == nullptr)
        return Shiboken::String::fromFormat("<%s.%s at %p>", Shiboken::String::toCString(mod), str.constData(), self);
    return Shiboken::String::fromFormat("<%s at %p>", str.constData(), self);
}
} // extern C


// Class Definition -----------------------------------------------
extern "C" {

static PyType_Slot Sbk_Akonadi_CachePolicy_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        reinterpret_cast<void *>(Sbk_Akonadi_CachePolicy__repr__)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_CachePolicy_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_CachePolicy_clear)},
    {Py_tp_richcompare, reinterpret_cast<void *>(Sbk_Akonadi_CachePolicy_richcompare)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_CachePolicy_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_CachePolicy_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObject_tp_new)},
    {0, nullptr}
};
static PyType_Spec Sbk_Akonadi_CachePolicy_spec = {
    "1:AkonadiCore.Akonadi.CachePolicy",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_CachePolicy_slots
};

} //extern "C"

// Type conversion functions.

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

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *CachePolicy_PTR_CppToPython_CachePolicy(const void *cppIn)
{
    auto *pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn, Sbk_Akonadi_CachePolicy_TypeF()));
    if (pyOut) {
        Py_INCREF(pyOut);
        return pyOut;
    }
    return Shiboken::Object::newObjectWithHeuristics(Sbk_Akonadi_CachePolicy_TypeF(), const_cast<void *>(cppIn), false);

}

// C++ to Python copy conversion.
static PyObject *CachePolicy_COPY_CppToPython_CachePolicy(const void *cppIn)
{
    auto *source = reinterpret_cast<const ::Akonadi::CachePolicy *>(cppIn);
    return Shiboken::Object::newObject(Sbk_Akonadi_CachePolicy_TypeF(), new ::Akonadi::CachePolicy(*source), true, true);
}

// Python to C++ copy conversion.
static void CachePolicy_PythonToCpp_CachePolicy_COPY(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::Akonadi::CachePolicy *>(cppOut) = *reinterpret_cast< ::Akonadi::CachePolicy *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_CachePolicy_IDX]), reinterpret_cast<SbkObject *>(pyIn)));
}
static PythonToCppFunc is_CachePolicy_PythonToCpp_CachePolicy_COPY_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, Sbk_Akonadi_CachePolicy_TypeF()))
        return CachePolicy_PythonToCpp_CachePolicy_COPY;
    return {};
}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *Akonadi_CachePolicy_SignatureStrings[] = {
    "1:AkonadiCore.Akonadi.CachePolicy(self,*:KeywordOnly=None,inheritFromParent:bool=None,localParts:QStringList=None,cacheTimeout:int=None,intervalCheckTime:int=None,syncOnDemand:bool=None)",
    "0:AkonadiCore.Akonadi.CachePolicy(self,other:AkonadiCore.Akonadi.CachePolicy,*:KeywordOnly=None,inheritFromParent:bool=None,localParts:QStringList=None,cacheTimeout:int=None,intervalCheckTime:int=None,syncOnDemand:bool=None)",
    "AkonadiCore.Akonadi.CachePolicy.cacheTimeout(self)->int",
    "AkonadiCore.Akonadi.CachePolicy.inheritFromParent(self)->bool",
    "AkonadiCore.Akonadi.CachePolicy.intervalCheckTime(self)->int",
    "AkonadiCore.Akonadi.CachePolicy.localParts(self)->QStringList",
    "AkonadiCore.Akonadi.CachePolicy.setCacheTimeout(self,timeout:int)",
    "AkonadiCore.Akonadi.CachePolicy.setInheritFromParent(self,inherit:bool)",
    "AkonadiCore.Akonadi.CachePolicy.setIntervalCheckTime(self,time:int)",
    "AkonadiCore.Akonadi.CachePolicy.setLocalParts(self,parts:QStringList)",
    "AkonadiCore.Akonadi.CachePolicy.setSyncOnDemand(self,enable:bool)",
    "AkonadiCore.Akonadi.CachePolicy.syncOnDemand(self)->bool",
    "AkonadiCore.Akonadi.CachePolicy.__copy__(self)->typing._Self",
    "AkonadiCore.Akonadi.CachePolicy.__eq__(self,other:AkonadiCore.Akonadi.CachePolicy)->bool",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_CachePolicy_SignatureByteSize = 277;
static constexpr uint8_t Akonadi_CachePolicy_SignatureBytes[277] = {
    0x78, 0xda, 0xcd, 0x53, 0xc1, 0x4e, 0x84, 0x30, 0x10, 0xbd, 0xfb, 0x25, 0x62, 0x90, 0xb8, 0x57,
    0x12, 0x4d, 0x0c, 0xc6, 0xc4, 0xec, 0xc6, 0x5d, 0x83, 0x77, 0xd2, 0x2d, 0xb3, 0xd2, 0x6c, 0x99,
    0xc1, 0x32, 0x6a, 0xfa, 0xf7, 0x16, 0xd8, 0x06, 0xc4, 0x4d, 0xa8, 0x37, 0x6f, 0x6d, 0xa7, 0xef,
    0xcd, 0x7b, 0xaf, 0xd3, 0x55, 0x7a, 0x7f, 0x24, 0x14, 0xa5, 0xca, 0xc8, 0x40, 0x72, 0x5a, 0x27,
    0x99, 0x90, 0x15, 0xec, 0x48, 0x2b, 0x69, 0x2f, 0x5b, 0xd0, 0x87, 0xf8, 0x2a, 0x5d, 0x83, 0xfd,
    0x22, 0x53, 0x6e, 0x51, 0xdb, 0xdb, 0x67, 0x42, 0x88, 0x15, 0x56, 0x60, 0x14, 0x3f, 0x1a, 0xaa,
    0x77, 0xc2, 0x00, 0x72, 0xba, 0x27, 0xd2, 0x43, 0x4d, 0x93, 0x14, 0xda, 0x9d, 0x72, 0x9b, 0xbe,
    0xe4, 0x6c, 0x14, 0xbe, 0x6d, 0x54, 0xcb, 0x43, 0x4d, 0x76, 0xdc, 0xaf, 0xaa, 0x06, 0xfa, 0xe0,
    0x54, 0x21, 0x7b, 0x36, 0x06, 0xf3, 0x29, 0x74, 0x56, 0x81, 0x3c, 0x76, 0xd5, 0xb1, 0xd4, 0x5a,
    0x94, 0x5b, 0x7c, 0x80, 0x5a, 0x60, 0x39, 0xf6, 0x88, 0x2e, 0x6e, 0xc2, 0xa4, 0x13, 0x3b, 0x9d,
    0x4b, 0x57, 0xff, 0xa5, 0xc1, 0x05, 0xcd, 0xc9, 0xb4, 0x51, 0xef, 0x35, 0xba, 0xbe, 0x73, 0xa4,
    0x8b, 0xb8, 0x5f, 0xc6, 0x3c, 0xb8, 0xeb, 0x1d, 0x80, 0x9e, 0x19, 0xf9, 0x4b, 0xeb, 0x31, 0x37,
    0x8f, 0x9a, 0xc4, 0xb7, 0x88, 0x6e, 0x81, 0xb3, 0xb9, 0xe7, 0x98, 0xc7, 0xa4, 0xa3, 0x10, 0x86,
    0xa7, 0xb3, 0xee, 0xfd, 0x6b, 0xf7, 0xf9, 0x07, 0xf2, 0x9c, 0xcb, 0xa1, 0x97, 0x13, 0xac, 0x65,
    0xf3, 0x33, 0x8e, 0xb8, 0x99, 0x4f, 0x54, 0x10, 0x4b, 0x3e, 0x99, 0x9f, 0x81, 0x07, 0x50, 0xec,
    0x35, 0x84, 0x7a, 0x99, 0xc3, 0x43, 0x27, 0xa1, 0x28, 0x24, 0x35, 0xb6, 0x28, 0x3c, 0x88, 0x6d,
    0xe3, 0x64, 0x27, 0x45, 0xee, 0xb6, 0x01, 0x60, 0x78, 0x3f, 0x41, 0xc3, 0xbe, 0xa8, 0x57, 0xf5,
    0x0d, 0x12, 0x31, 0xbb, 0xa1
};
#endif

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

    auto *base1 = SbkObject_TypeF();
    Shiboken::AutoDecRef Sbk_Akonadi_CachePolicy_Type_bases(PyTuple_Pack(1, base1));

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "CachePolicy",
        "Akonadi::CachePolicy",
        &Sbk_Akonadi_CachePolicy_spec,
        &Shiboken::callCppDestructor< ::Akonadi::CachePolicy >,
        Sbk_Akonadi_CachePolicy_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass | Shiboken::ObjectType::WrapperFlags::Value);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_CachePolicy_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_CachePolicy_SignatureBytes, Akonadi_CachePolicy_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_CachePolicy_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        CachePolicy_PythonToCpp_CachePolicy_PTR,
        is_CachePolicy_PythonToCpp_CachePolicy_PTR_Convertible,
        CachePolicy_PTR_CppToPython_CachePolicy,
        CachePolicy_COPY_CppToPython_CachePolicy);

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

    // Add Python to C++ copy (value, not pointer neither reference) conversion to type converter.
    Shiboken::Conversions::addPythonToCppValueConversion(converter,
        CachePolicy_PythonToCpp_CachePolicy_COPY,
        is_CachePolicy_PythonToCpp_CachePolicy_COPY_Convertible);

    qRegisterMetaType< ::Akonadi::CachePolicy >("CachePolicy");
    qRegisterMetaType< ::Akonadi::CachePolicy >("Akonadi::CachePolicy");

    return pyType;
}
