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


// module include
#include "akonadicore_python.h"

// main header
#include "akonadi_attribute_wrapper.h"

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

// Argument includes
#include <attribute.h>
#include <qbytearray.h>

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

using namespace Akonadi;

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

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

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

AttributeWrapper::AttributeWrapper()
{
}

::Akonadi::Attribute * AttributeWrapper::clone() const
{
    static const char *funcName = "clone";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_Attribute_TypeF(), gil, funcName, m_PyMethodCache[0], nameCache));
    if (pyOverride.isNull()) {
        gil.acquire();
        Shiboken::Errors::setPureVirtualMethodError("Attribute.clone");
        return nullptr;
    }
    return sbk_o_clone("Attribute", funcName, gil, pyOverride);
}

::Akonadi::Attribute * AttributeWrapper::sbk_o_clone([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride)
{
#if defined(PYPY_VERSION)
    Shiboken::AutoDecRef pyArgs(PyTuple_New(0));
#endif

#if !defined(PYPY_VERSION)
    Shiboken::AutoDecRef pyResult(PyObject_CallNoArgs(pyOverride));
#else
    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
#endif
    if (pyResult.isNull()) {
        // An error happened in python code!
        Shiboken::Errors::storePythonOverrideErrorOrPrint(ownerClassName, funcName);
        return nullptr;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Attribute_IDX]), pyResult);
    if (!pythonToCpp) {
        Shiboken::Warnings::warnInvalidReturnValue(ownerClassName, funcName, PepType_GetFullyQualifiedNameStr(Shiboken::SbkType< Akonadi::Attribute >()), Py_TYPE(pyResult)->tp_name);
        return nullptr;
    }
    ::Akonadi::Attribute *cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

void AttributeWrapper::deserialize(const ::QByteArray & data)
{
    static const char *funcName = "deserialize";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_Attribute_TypeF(), gil, funcName, m_PyMethodCache[1], nameCache));
    if (pyOverride.isNull()) {
        gil.acquire();
        Shiboken::Errors::setPureVirtualMethodError("Attribute.deserialize");
        return;
    }
    sbk_o_deserialize("Attribute", funcName, gil, pyOverride, data);
}

void AttributeWrapper::sbk_o_deserialize([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] const ::QByteArray & data)
{
#if !defined(PYPY_VERSION) && (!defined(Py_LIMITED_API) || Py_LIMITED_API >= 0x030C0000)
    PyObject *pyArgArray[1] = {
        Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), &data)
    };
#else
    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), &data)
    ));
#endif

#if !defined(PYPY_VERSION) && (!defined(Py_LIMITED_API) || Py_LIMITED_API >= 0x030C0000)
    Shiboken::AutoDecRef pyResult(PyObject_Vectorcall(pyOverride, pyArgArray, 1, nullptr));
    Py_DECREF(pyArgArray[0]);
#else
    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
#endif
    if (pyResult.isNull()) {
        // An error happened in python code!
        Shiboken::Errors::storePythonOverrideErrorOrPrint(ownerClassName, funcName);
        return;
    }
}

::QByteArray AttributeWrapper::serialized() const
{
    static const char *funcName = "serialized";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_Attribute_TypeF(), gil, funcName, m_PyMethodCache[2], nameCache));
    if (pyOverride.isNull()) {
        gil.acquire();
        Shiboken::Errors::setPureVirtualMethodError("Attribute.serialized");
        return {};
    }
    return ExceptionWrapper::sbk_o_type("Attribute", funcName, gil, pyOverride);
}

::QByteArray AttributeWrapper::type() const
{
    static const char *funcName = "type";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_Akonadi_Attribute_TypeF(), gil, funcName, m_PyMethodCache[3], nameCache));
    if (pyOverride.isNull()) {
        gil.acquire();
        Shiboken::Errors::setPureVirtualMethodError("Attribute.type");
        return {};
    }
    return ExceptionWrapper::sbk_o_type("Attribute", funcName, gil, pyOverride);
}

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

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

extern "C" {
static int
Sbk_Akonadi_Attribute_Init(PyObject *self, [[maybe_unused]] PyObject *args, [[maybe_unused]] PyObject *kwds)
{
    auto *sbkSelf = reinterpret_cast<SbkObject *>(self);
    PyTypeObject *type = self->ob_type;
    PyTypeObject *myType = Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Attribute_IDX]);
    if (type == myType) {
        Shiboken::Errors::setInstantiateAbstractClass("Akonadi::Attribute");
        return -1;
    }

    PySide::Feature::Select(self);
    if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Akonadi::Attribute >()))
        return -1;

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


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

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


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

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

            // Attribute::Attribute()
            cptr = new AttributeWrapper();
            break;
        }
        case 1: // Attribute(const Akonadi::Attribute &arg__1)
        {
            if (!Shiboken::Object::isValid(pyArgs[0]))
                return -1;
            ::Akonadi::Attribute *cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);

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

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

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


    return 1;
}

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

    // Call function/method
    {

        // Attribute::clone()const->Akonadi::Attribute*
        if (Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))) {
            Shiboken::Errors::setPureVirtualMethodError("Attribute.clone");
            return {};
        }
        Akonadi::Attribute * cppResult = const_cast<const ::Akonadi::Attribute *>(cppSelf)->clone();
        pyResult = Shiboken::Conversions::pointerToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Attribute_IDX]), cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "deserialize", SbkAkonadiCoreTypeStructs[SBK_Akonadi_Attribute_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) {
            // Attribute::deserialize(const QByteArray&)
            if (Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))) {
                Shiboken::Errors::setPureVirtualMethodError("Attribute.deserialize");
                return {};
            }
            cppSelf->deserialize(*cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

        // Attribute::serialized()const->QByteArray
        if (Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))) {
            Shiboken::Errors::setPureVirtualMethodError("Attribute.serialized");
            return {};
        }
        QByteArray cppResult = const_cast<const ::Akonadi::Attribute *>(cppSelf)->serialized();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // Attribute::type()const->QByteArray
        if (Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))) {
            Shiboken::Errors::setPureVirtualMethodError("Attribute.type");
            return {};
        }
        QByteArray cppResult = const_cast<const ::Akonadi::Attribute *>(cppSelf)->type();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}


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

static PyMethodDef Sbk_Akonadi_Attribute_methods[] = {
    {"clone", reinterpret_cast<PyCFunction>(Sbk_Akonadi_AttributeFunc_clone), METH_NOARGS, nullptr},
    {"deserialize", reinterpret_cast<PyCFunction>(Sbk_Akonadi_AttributeFunc_deserialize), METH_O, nullptr},
    {"serialized", reinterpret_cast<PyCFunction>(Sbk_Akonadi_AttributeFunc_serialized), METH_NOARGS, nullptr},
    {"type", reinterpret_cast<PyCFunction>(Sbk_Akonadi_AttributeFunc_type), METH_NOARGS, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static int Sbk_Akonadi_Attribute_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value != nullptr && PyCallable_Check(value) != 0) {
        auto plain_inst = reinterpret_cast< ::Akonadi::Attribute *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Attribute_IDX]), reinterpret_cast<SbkObject *>(self)));
        auto *inst = dynamic_cast<AttributeWrapper *>(plain_inst);
        if (inst != nullptr)
            inst->resetPyMethodCache();
    }
    return PyObject_GenericSetAttr(self, name, value);
}

} // extern "C"

static int Sbk_Akonadi_Attribute_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_Attribute_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_Attribute_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_Akonadi_Attribute_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_Attribute_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_Attribute_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_Attribute_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_Attribute_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObject_tp_new)},
    {0, nullptr}
};
static PyType_Spec Sbk_Akonadi_Attribute_spec = {
    "1:AkonadiCore.Akonadi.Attribute",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_Attribute_slots
};

} //extern "C"

// Type conversion functions.

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

// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
static PyObject *Attribute_PTR_CppToPython_Attribute(const void *cppIn)
{
    auto *pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn, Sbk_Akonadi_Attribute_TypeF()));
    if (pyOut) {
        Py_INCREF(pyOut);
        return pyOut;
    }
    auto *tCppIn = reinterpret_cast<const ::Akonadi::Attribute *>(cppIn);
    const char *typeName = typeid(*tCppIn).name();
    return Shiboken::Object::newObjectForPointer(Sbk_Akonadi_Attribute_TypeF(), const_cast<void *>(cppIn), false, typeName);

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *Akonadi_Attribute_SignatureStrings[] = {
    "1:AkonadiCore.Akonadi.Attribute(self)",
    "0:AkonadiCore.Akonadi.Attribute(self,arg__1:AkonadiCore.Akonadi.Attribute)",
    "AkonadiCore.Akonadi.Attribute.clone(self)->AkonadiCore.Akonadi.Attribute",
    "AkonadiCore.Akonadi.Attribute.deserialize(self,data:typing.Union[PySide6.QtCore.QByteArray, char*])",
    "AkonadiCore.Akonadi.Attribute.serialized(self)->PySide6.QtCore.QByteArray",
    "AkonadiCore.Akonadi.Attribute.type(self)->PySide6.QtCore.QByteArray",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_Attribute_SignatureByteSize = 150;
static constexpr uint8_t Akonadi_Attribute_SignatureBytes[150] = {
    0x78, 0xda, 0x33, 0xb4, 0x72, 0xcc, 0xce, 0xcf, 0x4b, 0x4c, 0xc9, 0x74, 0xce, 0x2f, 0x4a, 0xd5,
    0x83, 0xb2, 0xf5, 0x1c, 0x4b, 0x4a, 0x8a, 0x32, 0x93, 0x4a, 0x4b, 0x52, 0x35, 0x8a, 0x53, 0x73,
    0xd2, 0x34, 0xb9, 0x0c, 0x88, 0x50, 0xa5, 0x93, 0x58, 0x94, 0x1e, 0x1f, 0x6f, 0x88, 0x5f, 0xa5,
    0x26, 0x17, 0x5e, 0x69, 0xbd, 0xe4, 0x9c, 0xfc, 0x3c, 0xa8, 0xa5, 0xba, 0x76, 0x78, 0x95, 0x12,
    0x30, 0x28, 0x25, 0xb5, 0x38, 0xb5, 0x28, 0x33, 0x31, 0x27, 0xb3, 0x0a, 0xea, 0xba, 0x94, 0xc4,
    0x92, 0x44, 0xab, 0x92, 0xca, 0x82, 0xcc, 0xbc, 0x74, 0xbd, 0xd0, 0xbc, 0xcc, 0xfc, 0xbc, 0xe8,
    0x80, 0xca, 0xe0, 0xcc, 0x94, 0x54, 0x33, 0xbd, 0xc0, 0x12, 0xb0, 0x19, 0x81, 0x4e, 0x95, 0x25,
    0xa9, 0x8e, 0x45, 0x45, 0x89, 0x95, 0x3a, 0x0a, 0xc9, 0x19, 0x89, 0x45, 0x5a, 0xb1, 0x84, 0x1c,
    0x0b, 0xb7, 0x21, 0x05, 0xe6, 0x62, 0x9c, 0x46, 0x12, 0x30, 0x09, 0xe8, 0xae, 0x54, 0xc2, 0x66,
    0x00, 0x00, 0x3b, 0xd9, 0x9b, 0x18
};
#endif

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

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

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "Attribute",
        "Akonadi::Attribute*",
        &Sbk_Akonadi_Attribute_spec,
        &Shiboken::callCppDestructor< Akonadi::Attribute >,
        Sbk_Akonadi_Attribute_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_Attribute_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_Attribute_SignatureBytes, Akonadi_Attribute_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_Attribute_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        Attribute_PythonToCpp_Attribute_PTR,
        is_Attribute_PythonToCpp_Attribute_PTR_Convertible,
        Attribute_PTR_CppToPython_Attribute);

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

    qRegisterMetaType< ::Akonadi::Attribute *>();

    return pyType;
}
