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

// main header
#include "akonadi_history_wrapper.h"

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

// Argument includes
#include <QList>
#include <QString>
#include <akonadi/item.h>
#include <history.h>
#include <incidencechanger.h>
#include <qobject.h>
#include <qobjectdefs.h>
#include <qwidget.h>

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

using namespace Akonadi;

extern "C" {
static PyTypeObject *Sbk_Akonadi_History_TypeF(void)
{
    return SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX].type;
}
} // extern "C"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // Call function/method
    {

        // History::clear()->bool
        bool cppResult = cppSelf->clear();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // History::lastErrorString()const->QString&
        QString & cppResult = const_cast<const ::Akonadi::History *>(cppSelf)->lastErrorString();
        pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // History::nextRedoDescription()const->QString
        QString cppResult = const_cast<const ::Akonadi::History *>(cppSelf)->nextRedoDescription();
        pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // History::nextUndoDescription()const->QString
        QString cppResult = const_cast<const ::Akonadi::History *>(cppSelf)->nextUndoDescription();
        pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_Akonadi_HistoryFunc_recordCreation(PyObject *self, PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::History *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_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, "recordCreation", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

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


    // Overloaded function decisor
    // 0: History::recordCreation(const Akonadi::Item&,const QString&,const uint=)
    if (numArgs >= 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Item_IDX]), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], (pyArgs[1])))) {
        if (numArgs == 2) {
            overloadId = 0; // recordCreation(Akonadi::Item,QString,uint)
        } else if (numArgs >= 3
            && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<uint>(), (pyArgs[2])))) {
            overloadId = 0; // History::recordCreation(const Akonadi::Item&,const QString&,const uint=)
        }
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(args, "recordCreation", SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    // Call function/method
    {
        if (kwds != nullptr && PyDict_Size(kwds) > 0) {
            static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"atomicOperationId", 2}};
            if (!Shiboken::parseKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                || (pyArgs[2] != nullptr && !((pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<uint>(), (pyArgs[2])))))) {
                Py_XINCREF(errInfo.object());
                return Shiboken::returnWrongArguments(args, "recordCreation", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::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);

        ::QString cppArg1;
        pythonToCpp[1](pyArgs[1], &cppArg1);
        uint cppArg2 = 0;
        if (pythonToCpp[2])
            pythonToCpp[2](pyArgs[2], &cppArg2);

        if (Shiboken::Errors::occurred() == nullptr) {
            // History::recordCreation(const Akonadi::Item&,const QString&,const uint=)
            cppSelf->recordCreation(*cppArg0, cppArg1, cppArg2);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_Akonadi_HistoryFunc_recordDeletion(PyObject *self, PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::History *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_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, "recordDeletion", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

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


    // Overloaded function decisor
    // 0: History::recordDeletion(const Akonadi::Item&,const QString&,const uint=)
    if (numArgs >= 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Item_IDX]), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], (pyArgs[1])))) {
        if (numArgs == 2) {
            overloadId = 0; // recordDeletion(Akonadi::Item,QString,uint)
        } else if (numArgs >= 3
            && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<uint>(), (pyArgs[2])))) {
            overloadId = 0; // History::recordDeletion(const Akonadi::Item&,const QString&,const uint=)
        }
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(args, "recordDeletion", SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    // Call function/method
    {
        if (kwds != nullptr && PyDict_Size(kwds) > 0) {
            static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"atomicOperationId", 2}};
            if (!Shiboken::parseKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                || (pyArgs[2] != nullptr && !((pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<uint>(), (pyArgs[2])))))) {
                Py_XINCREF(errInfo.object());
                return Shiboken::returnWrongArguments(args, "recordDeletion", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::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);

        ::QString cppArg1;
        pythonToCpp[1](pyArgs[1], &cppArg1);
        uint cppArg2 = 0;
        if (pythonToCpp[2])
            pythonToCpp[2](pyArgs[2], &cppArg2);

        if (Shiboken::Errors::occurred() == nullptr) {
            // History::recordDeletion(const Akonadi::Item&,const QString&,const uint=)
            cppSelf->recordDeletion(*cppArg0, cppArg1, cppArg2);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_Akonadi_HistoryFunc_recordDeletions(PyObject *self, PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::History *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_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, "recordDeletions", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

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


    // Overloaded function decisor
    // 0: History::recordDeletions(const QList<Akonadi::Item>&,const QString&,const uint=)
    if (numArgs >= 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(SbkAkonadiCalendarTypeConverters[SBK_AkonadiCalendar_QList_Akonadi_Item_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], (pyArgs[1])))) {
        if (numArgs == 2) {
            overloadId = 0; // recordDeletions(QList<Akonadi::Item>,QString,uint)
        } else if (numArgs >= 3
            && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<uint>(), (pyArgs[2])))) {
            overloadId = 0; // History::recordDeletions(const QList<Akonadi::Item>&,const QString&,const uint=)
        }
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(args, "recordDeletions", SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    // Call function/method
    {
        if (kwds != nullptr && PyDict_Size(kwds) > 0) {
            static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"atomicOperationId", 2}};
            if (!Shiboken::parseKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                || (pyArgs[2] != nullptr && !((pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<uint>(), (pyArgs[2])))))) {
                Py_XINCREF(errInfo.object());
                return Shiboken::returnWrongArguments(args, "recordDeletions", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);
            }
        }
        ::QList<Akonadi::Item> cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        ::QString cppArg1;
        pythonToCpp[1](pyArgs[1], &cppArg1);
        uint cppArg2 = 0;
        if (pythonToCpp[2])
            pythonToCpp[2](pyArgs[2], &cppArg2);

        if (Shiboken::Errors::occurred() == nullptr) {
            // History::recordDeletions(const QList<Akonadi::Item>&,const QString&,const uint=)
            cppSelf->recordDeletions(cppArg0, cppArg1, cppArg2);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // invalid argument lengths
    errInfo.reset(Shiboken::checkInvalidArgumentCount(numArgs, 3, 4));
    if (!errInfo.isNull())
        return Shiboken::returnWrongArguments(args, "recordModification", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

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


    // Overloaded function decisor
    // 0: History::recordModification(const Akonadi::Item&,const Akonadi::Item&,const QString&,const uint=)
    if (numArgs >= 3
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Item_IDX]), (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Item_IDX]), (pyArgs[1])))
        && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], (pyArgs[2])))) {
        if (numArgs == 3) {
            overloadId = 0; // recordModification(Akonadi::Item,Akonadi::Item,QString,uint)
        } else if (numArgs >= 4
            && (pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<uint>(), (pyArgs[3])))) {
            overloadId = 0; // History::recordModification(const Akonadi::Item&,const Akonadi::Item&,const QString&,const uint=)
        }
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(args, "recordModification", SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    // Call function/method
    {
        if (kwds != nullptr && PyDict_Size(kwds) > 0) {
            static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"atomicOperationId", 3}};
            if (!Shiboken::parseKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                || (pyArgs[3] != nullptr && !((pythonToCpp[3] = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<uint>(), (pyArgs[3])))))) {
                Py_XINCREF(errInfo.object());
                return Shiboken::returnWrongArguments(args, "recordModification", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::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 {};
        ::Akonadi::Item cppArg1_local;
        ::Akonadi::Item *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            pythonToCpp[1](pyArgs[1], &cppArg1);

        ::QString cppArg2;
        pythonToCpp[2](pyArgs[2], &cppArg2);
        uint cppArg3 = 0;
        if (pythonToCpp[3])
            pythonToCpp[3](pyArgs[3], &cppArg3);

        if (Shiboken::Errors::occurred() == nullptr) {
            // History::recordModification(const Akonadi::Item&,const Akonadi::Item&,const QString&,const uint=)
            cppSelf->recordModification(*cppArg0, *cppArg1, cppArg2, cppArg3);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_Akonadi_HistoryFunc_redo(PyObject *self, PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::History *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]), reinterpret_cast<SbkObject *>(self)));
    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
    errInfo.reset(Shiboken::checkInvalidArgumentCount(numArgs, 0, 1));
    if (!errInfo.isNull())
        return Shiboken::returnWrongArguments(args, "redo", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    if (PyArg_ParseTuple(args, "|O:redo", &(pyArgs[0])) == 0)
        return {};


    // Overloaded function decisor
    // 0: History::redo(QWidget*=)
    if (numArgs == 0) {
        overloadId = 0; // redo(QWidget*)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtWidgetsTypeStructs[SBK_QWidget_IDX]), (pyArgs[0])))) {
        overloadId = 0; // History::redo(QWidget*=)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(args, "redo", SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    // Call function/method
    {
        if (kwds != nullptr && PyDict_Size(kwds) > 0) {
            static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"parent", 0}};
            if (!Shiboken::parseKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                || (pyArgs[0] != nullptr && !((pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtWidgetsTypeStructs[SBK_QWidget_IDX]), (pyArgs[0])))))) {
                Py_XINCREF(errInfo.object());
                return Shiboken::returnWrongArguments(args, "redo", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QWidget *cppArg0 = nullptr;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // History::redo(QWidget*=)
            cppSelf->redo(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_Akonadi_HistoryFunc_undo(PyObject *self, PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::History *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]), reinterpret_cast<SbkObject *>(self)));
    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
    errInfo.reset(Shiboken::checkInvalidArgumentCount(numArgs, 0, 1));
    if (!errInfo.isNull())
        return Shiboken::returnWrongArguments(args, "undo", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    if (PyArg_ParseTuple(args, "|O:undo", &(pyArgs[0])) == 0)
        return {};


    // Overloaded function decisor
    // 0: History::undo(QWidget*=)
    if (numArgs == 0) {
        overloadId = 0; // undo(QWidget*)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtWidgetsTypeStructs[SBK_QWidget_IDX]), (pyArgs[0])))) {
        overloadId = 0; // History::undo(QWidget*=)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(args, "undo", SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    // Call function/method
    {
        if (kwds != nullptr && PyDict_Size(kwds) > 0) {
            static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"parent", 0}};
            if (!Shiboken::parseKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                || (pyArgs[0] != nullptr && !((pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtWidgetsTypeStructs[SBK_QWidget_IDX]), (pyArgs[0])))))) {
                Py_XINCREF(errInfo.object());
                return Shiboken::returnWrongArguments(args, "undo", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QWidget *cppArg0 = nullptr;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // History::undo(QWidget*=)
            cppSelf->undo(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

static PyObject *Sbk_Akonadi_HistoryFunc_undoAll(PyObject *self, PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::History *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]), reinterpret_cast<SbkObject *>(self)));
    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
    errInfo.reset(Shiboken::checkInvalidArgumentCount(numArgs, 0, 1));
    if (!errInfo.isNull())
        return Shiboken::returnWrongArguments(args, "undoAll", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    if (PyArg_ParseTuple(args, "|O:undoAll", &(pyArgs[0])) == 0)
        return {};


    // Overloaded function decisor
    // 0: History::undoAll(QWidget*=)
    if (numArgs == 0) {
        overloadId = 0; // undoAll(QWidget*)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtWidgetsTypeStructs[SBK_QWidget_IDX]), (pyArgs[0])))) {
        overloadId = 0; // History::undoAll(QWidget*=)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(args, "undoAll", SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);

    // Call function/method
    {
        if (kwds != nullptr && PyDict_Size(kwds) > 0) {
            static const Shiboken::ArgumentNameIndexMapping mapping[1] = {{"parent", 0}};
            if (!Shiboken::parseKeywordArguments(kwds, mapping, 1, errInfo, pyArgs)
                || (pyArgs[0] != nullptr && !((pythonToCpp[0] = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkPySide6_QtWidgetsTypeStructs[SBK_QWidget_IDX]), (pyArgs[0])))))) {
                Py_XINCREF(errInfo.object());
                return Shiboken::returnWrongArguments(args, "undoAll", errInfo, SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]);
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QWidget *cppArg0 = nullptr;
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // History::undoAll(QWidget*=)
            cppSelf->undoAll(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}


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

static const char *Sbk_Akonadi_History_EnumFlagInfo[] = {
    "ResultCode:IntEnum",
    nullptr // Sentinel
};

static PyMethodDef Sbk_Akonadi_History_methods[] = {
    {"clear", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_clear), METH_NOARGS, nullptr},
    {"lastErrorString", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_lastErrorString), METH_NOARGS, nullptr},
    {"nextRedoDescription", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_nextRedoDescription), METH_NOARGS, nullptr},
    {"nextUndoDescription", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_nextUndoDescription), METH_NOARGS, nullptr},
    {"recordCreation", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_recordCreation), METH_VARARGS|METH_KEYWORDS, nullptr},
    {"recordDeletion", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_recordDeletion), METH_VARARGS|METH_KEYWORDS, nullptr},
    {"recordDeletions", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_recordDeletions), METH_VARARGS|METH_KEYWORDS, nullptr},
    {"recordModification", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_recordModification), METH_VARARGS|METH_KEYWORDS, nullptr},
    {"redo", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_redo), METH_VARARGS|METH_KEYWORDS, nullptr},
    {"redoAvailable", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_redoAvailable), METH_NOARGS, nullptr},
    {"undo", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_undo), METH_VARARGS|METH_KEYWORDS, nullptr},
    {"undoAll", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_undoAll), METH_VARARGS|METH_KEYWORDS, nullptr},
    {"undoAvailable", reinterpret_cast<PyCFunction>(Sbk_Akonadi_HistoryFunc_undoAvailable), METH_NOARGS, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static int Sbk_Akonadi_History_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value != nullptr && PyCallable_Check(value) != 0) {
        auto plain_inst = reinterpret_cast< ::Akonadi::History *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_IDX]), reinterpret_cast<SbkObject *>(self)));
        auto *inst = dynamic_cast<HistoryWrapper *>(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_History_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_History_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_History_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_Akonadi_History_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_History_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_History_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_History_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_History_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_History_spec = {
    "1:AkonadiCalendar.Akonadi.History",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_History_slots
};

} //extern "C"

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


// Type conversion functions.

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

}
static PythonToCppFunc is_Enum_PythonToCpp_Akonadi_History_ResultCode_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, Shiboken::Module::get(SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_ResultCode_IDX])))
        return Enum_PythonToCpp_Akonadi_History_ResultCode;
    return {};
}

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

}

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

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

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *Akonadi_History_SignatureStrings[] = {
    "AkonadiCalendar.Akonadi.History.clear(self)->bool",
    "AkonadiCalendar.Akonadi.History.lastErrorString(self)->QString",
    "AkonadiCalendar.Akonadi.History.nextRedoDescription(self)->QString",
    "AkonadiCalendar.Akonadi.History.nextUndoDescription(self)->QString",
    "AkonadiCalendar.Akonadi.History.recordCreation(self,item:AkonadiCore.Akonadi.Item,description:QString,atomicOperationId:uint=0)",
    "AkonadiCalendar.Akonadi.History.recordDeletion(self,item:AkonadiCore.Akonadi.Item,description:QString,atomicOperationId:uint=0)",
    "AkonadiCalendar.Akonadi.History.recordDeletions(self,items:QList[AkonadiCore.Akonadi.Item],description:QString,atomicOperationId:uint=0)",
    "AkonadiCalendar.Akonadi.History.recordModification(self,oldItem:AkonadiCore.Akonadi.Item,newItem:AkonadiCore.Akonadi.Item,description:QString,atomicOperationId:uint=0)",
    "AkonadiCalendar.Akonadi.History.redo(self,parent:PySide6.QtWidgets.QWidget=nullptr)",
    "AkonadiCalendar.Akonadi.History.redoAvailable(self)->bool",
    "AkonadiCalendar.Akonadi.History.undo(self,parent:PySide6.QtWidgets.QWidget=nullptr)",
    "AkonadiCalendar.Akonadi.History.undoAll(self,parent:PySide6.QtWidgets.QWidget=nullptr)",
    "AkonadiCalendar.Akonadi.History.undoAvailable(self)->bool",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_History_SignatureByteSize = 257;
static constexpr uint8_t Akonadi_History_SignatureBytes[257] = {
    0x78, 0xda, 0xcd, 0x93, 0x41, 0x4b, 0x03, 0x41, 0x0c, 0x85, 0xef, 0xfe, 0x12, 0x0b, 0xeb, 0xe2,
    0xc9, 0xc3, 0x42, 0x85, 0xa5, 0x15, 0x5c, 0x50, 0x74, 0x2d, 0xe2, 0x41, 0x3c, 0x4c, 0x37, 0x69,
    0x09, 0x4d, 0x93, 0x25, 0x93, 0x55, 0xfb, 0xef, 0xad, 0xae, 0x6d, 0x3d, 0xa8, 0xad, 0xd5, 0x4a,
    0x6f, 0x13, 0x66, 0xbe, 0xf7, 0xde, 0x24, 0x24, 0x9f, 0xa8, 0x04, 0xa0, 0x5e, 0x60, 0x14, 0x08,
    0x96, 0xe6, 0x6d, 0x9d, 0x9e, 0x53, 0x74, 0xb5, 0x59, 0x5a, 0x31, 0x06, 0x3b, 0x8c, 0xc8, 0xa3,
    0xce, 0xd1, 0xe9, 0x50, 0x95, 0x0f, 0xf2, 0x35, 0x04, 0x87, 0xe8, 0x67, 0x66, 0x6a, 0x03, 0x37,
    0x92, 0xf1, 0x82, 0x2d, 0xdb, 0x72, 0x2d, 0x2e, 0xf8, 0xec, 0x37, 0x08, 0xda, 0xc7, 0x58, 0x19,
    0xd5, 0x4e, 0x2a, 0xdb, 0x48, 0xdc, 0xca, 0xaf, 0x24, 0x0c, 0x2b, 0x35, 0xe8, 0x19, 0x86, 0x25,
    0x9d, 0x90, 0xe3, 0x34, 0x5b, 0x80, 0x6a, 0xb8, 0x84, 0x8a, 0xf9, 0x45, 0x02, 0x2b, 0xb3, 0xec,
    0xdd, 0x25, 0x09, 0xae, 0x53, 0xaa, 0xae, 0x6a, 0xb4, 0x37, 0x99, 0x02, 0xb2, 0x86, 0xc4, 0xbb,
    0xc7, 0x9d, 0x0d, 0xfd, 0xfb, 0xc8, 0xb8, 0x0f, 0xfe, 0x71, 0x15, 0x20, 0x66, 0xe5, 0xc5, 0xfc,
    0xcd, 0xfd, 0x57, 0x39, 0x1e, 0x76, 0x12, 0xe4, 0x52, 0x81, 0x46, 0x54, 0x7d, 0x18, 0x86, 0x32,
    0x14, 0xdf, 0xf6, 0x43, 0xf0, 0xa9, 0xf8, 0xd7, 0x86, 0x81, 0xb6, 0xc9, 0xea, 0x60, 0x28, 0x9e,
    0x5d, 0xcf, 0x06, 0x04, 0x78, 0x92, 0x96, 0x7e, 0x47, 0x30, 0x46, 0x8f, 0x69, 0xd9, 0x1e, 0xba,
    0xd2, 0x30, 0xd7, 0x6e, 0x9b, 0x69, 0xe6, 0x8f, 0x81, 0x38, 0x0c, 0x19, 0x7f, 0xb4, 0x83, 0x8d,
    0xfc, 0x7d, 0x9a, 0x57, 0xcd, 0x9c, 0x79, 0x27, 0xb2, 0x9f, 0x7e, 0xf2, 0x05, 0xa0, 0x13, 0xb7,
    0x39
};
#endif

PyTypeObject *init_Akonadi_History(PyObject *enclosingClass)
{
    auto &typeStruct = SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_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_History_Type_bases(PyTuple_Pack(1, base1));

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "History",
        "Akonadi::History*",
        &Sbk_Akonadi_History_spec,
        &Shiboken::callCppDestructor< Akonadi::History >,
        Sbk_Akonadi_History_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_History_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_History_SignatureBytes, Akonadi_History_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_History_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        History_PythonToCpp_History_PTR,
        is_History_PythonToCpp_History_PTR_Convertible,
        History_PTR_CppToPython_History);

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

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

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

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

    // Initialization of enum 'ResultCode'.
    const char *ResultCode_Initializer[] = {
        "ResultCodeSuccess",
        "ResultCodeError",
        nullptr};
    // "uint8_t" used instead of "unsigned int"
    constexpr uint8_t ResultCode_InitializerValues[] = {
        uint8_t(Akonadi::History::ResultCode::ResultCodeSuccess), //  0x00  0
        uint8_t(Akonadi::History::ResultCode::ResultCodeError)    //  0x01  1
        };
    EType = Shiboken::Enum::createPythonEnum(pyType,
        "1:AkonadiCalendar.Akonadi.History.ResultCode",
        ResultCode_Initializer, ResultCode_InitializerValues);
    SbkAkonadiCalendarTypeStructs[SBK_Akonadi_History_ResultCode_IDX].type = EType;
    // Register converter for enum 'Akonadi::History::ResultCode'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(EType,
            Akonadi_History_ResultCode_CppToPython_Enum);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            Enum_PythonToCpp_Akonadi_History_ResultCode,
            is_Enum_PythonToCpp_Akonadi_History_ResultCode_Convertible);
        Shiboken::Conversions::registerConverterName(converter, "Akonadi::History::ResultCode");
        Shiboken::Conversions::registerConverterAlias(converter, "History::ResultCode");
        Shiboken::Conversions::registerConverterAlias(converter, "ResultCode");
        Shiboken::Enum::setTypeConverter(EType, converter, nullptr);
    }
    // End of 'ResultCode' enum.

    PySide::Signal::registerSignals(pyType, &::Akonadi::History::staticMetaObject);
    qRegisterMetaType< ::Akonadi::History::ResultCode >("History::ResultCode");
    qRegisterMetaType< ::Akonadi::History::ResultCode >("Akonadi::History::ResultCode");
    Shiboken::ObjectType::setSubTypeInitHook(pyType, &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(pyType, &::Akonadi::History::staticMetaObject, sizeof(HistoryWrapper));

    return pyType;
}
