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

// Argument includes
#include <QList>
#include <QString>
#include <attribute.h>
#include <qbytearray.h>
#include <qurl.h>
#include <tag.h>

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

using namespace Akonadi;

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


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

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

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


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

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


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

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

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


            if (Shiboken::Errors::occurred() == nullptr) {
                // Tag::Tag(const Akonadi::Tag&)
                cptr = new ::Akonadi::Tag(*cppArg0);
            }
            break;
        }
        case 2: // Tag(const QString &name)
        {
            ::QString cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);

            if (Shiboken::Errors::occurred() == nullptr) {
                // Tag::Tag(const QString&)
                cptr = new ::Akonadi::Tag(cppArg0);
            }
            break;
        }
        case 3: // Tag(long long id)
        {
            long long cppArg0;
            pythonToCpp[0](pyArgs[0], &cppArg0);

            if (Shiboken::Errors::occurred() == nullptr) {
                // Tag::Tag(long long)
                cptr = new ::Akonadi::Tag(cppArg0);
            }
            break;
        }
    }

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

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


    return 1;
}

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

    // Overloaded function decisor
    // 0: Tag::addAttribute(Akonadi::Attribute*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Attribute_IDX]), (pyArg)))) {
        overloadId = 0; // Tag::addAttribute(Akonadi::Attribute*)
    }

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

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArg))
            return {};
        ::Akonadi::Attribute *cppArg0;
        pythonToCpp(pyArg, &cppArg0);

        if (Shiboken::Errors::occurred() == nullptr) {
            // Tag::addAttribute(Akonadi::Attribute*)
            cppSelf->addAttribute(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "attribute", SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_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) {
            // Tag::attribute(const QByteArray&)->Akonadi::Attribute*
            Akonadi::Attribute * cppResult = cppSelf->attribute(*cppArg0);
            pyResult = Shiboken::Conversions::pointerToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Attribute_IDX]), cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // Tag::attributes()const->QList<Akonadi::Attribute*>
        QList<Akonadi::Attribute*> cppResult = const_cast<const ::Akonadi::Tag *>(cppSelf)->attributes();
        pyResult = Shiboken::Conversions::copyToPython(SbkAkonadiCoreTypeConverters[SBK_AkonadiCore_QList_Akonadi_AttributePTR_IDX], &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // Tag::clearAttributes()
        cppSelf->clearAttributes();
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: static Tag::fromUrl(const QUrl&)->Akonadi::Tag
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QUrl_IDX]), (pyArg)))) {
        overloadId = 0; // static Tag::fromUrl(const QUrl&)->Akonadi::Tag
    }

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

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


        if (Shiboken::Errors::occurred() == nullptr) {
            // static Tag::fromUrl(const QUrl&)->Akonadi::Tag
            Akonadi::Tag cppResult = ::Akonadi::Tag::fromUrl(*cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

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

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // static Tag::genericTag(const QString&)->Akonadi::Tag
            Akonadi::Tag cppResult = ::Akonadi::Tag::genericTag(cppArg0);
            pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), &cppResult);
        }
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // Tag::gid()const->QByteArray
        QByteArray cppResult = const_cast<const ::Akonadi::Tag *>(cppSelf)->gid();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // Tag::id()const->long long
        long long cppResult = const_cast<const ::Akonadi::Tag *>(cppSelf)->id();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<long long>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // Tag::parent()const->Akonadi::Tag
        Akonadi::Tag cppResult = const_cast<const ::Akonadi::Tag *>(cppSelf)->parent();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // Tag::remoteId()const->QByteArray
        QByteArray cppResult = const_cast<const ::Akonadi::Tag *>(cppSelf)->remoteId();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: Tag::setId(long long)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<long long>(), (pyArg)))) {
        overloadId = 0; // Tag::setId(long long)
    }

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

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // Tag::setId(long long)
            cppSelf->setId(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: Tag::setName(const QString&)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppConversion(SbkPySide6_QtCoreTypeConverters[SBK_QString_IDX], (pyArg)))) {
        overloadId = 0; // Tag::setName(const QString&)
    }

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

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // Tag::setName(const QString&)
            cppSelf->setName(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}

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

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

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

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


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

     return Sbk_ReturnFromPython_None();
}

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

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

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

     return Sbk_ReturnFromPython_None();
}

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

    // Call function/method
    {

        // Tag::type()const->QByteArray
        QByteArray cppResult = const_cast<const ::Akonadi::Tag *>(cppSelf)->type();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QByteArray_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

    // Call function/method
    {

        // Tag::url()const->QUrl
        QUrl cppResult = const_cast<const ::Akonadi::Tag *>(cppSelf)->url();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Module::get(SbkPySide6_QtCoreTypeStructs[SBK_QUrl_IDX]), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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


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

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

static PyMethodDef Sbk_Akonadi_Tag_methods[] = {
    {"addAttribute", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_addAttribute), METH_O, nullptr},
    {"attribute", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_attribute), METH_O, nullptr},
    {"attributes", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_attributes), METH_NOARGS, nullptr},
    {"clearAttributes", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_clearAttributes), METH_NOARGS, nullptr},
    {"fromUrl", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_fromUrl), METH_O|METH_STATIC, nullptr},
    {"genericTag", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_genericTag), METH_O|METH_STATIC, nullptr},
    {"gid", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_gid), METH_NOARGS, nullptr},
    {"hasAttribute", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_hasAttribute), METH_O, nullptr},
    {"id", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_id), METH_NOARGS, nullptr},
    {"isImmutable", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_isImmutable), METH_NOARGS, nullptr},
    {"isValid", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_isValid), METH_NOARGS, nullptr},
    {"name", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_name), METH_NOARGS, nullptr},
    {"parent", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_parent), METH_NOARGS, nullptr},
    {"remoteId", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_remoteId), METH_NOARGS, nullptr},
    {"removeAttribute", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_removeAttribute), METH_O, nullptr},
    {"setGid", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_setGid), METH_O, nullptr},
    {"setId", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_setId), METH_O, nullptr},
    {"setName", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_setName), METH_O, nullptr},
    {"setParent", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_setParent), METH_O, nullptr},
    {"setRemoteId", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_setRemoteId), METH_O, nullptr},
    {"setType", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_setType), METH_O, nullptr},
    {"type", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_type), METH_NOARGS, nullptr},
    {"url", reinterpret_cast<PyCFunction>(Sbk_Akonadi_TagFunc_url), METH_NOARGS, nullptr},
    {"__copy__", reinterpret_cast<PyCFunction>(Sbk_Akonadi_Tag__copy__), METH_NOARGS, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

// Rich comparison
static PyObject * Sbk_Akonadi_Tag_richcompare(PyObject *self, PyObject *pyArg, int op)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto &cppSelf = *reinterpret_cast< ::Akonadi::Tag *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    [[maybe_unused]] Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    switch (op) {
        case Py_NE:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), (pyArg)))) {
                // Tag::operator!=(const Akonadi::Tag&)const->bool
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::Akonadi::Tag cppArg0_local;
                ::Akonadi::Tag *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_True;
                Py_INCREF(pyResult);
            }

            break;
        case Py_EQ:
            if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), (pyArg)))) {
                // Tag::operator==(const Akonadi::Tag&)const->bool
                if (!Shiboken::Object::isValid(pyArg))
                    return {};
                ::Akonadi::Tag cppArg0_local;
                ::Akonadi::Tag *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_Tag_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_Tag_clear(PyObject *self)
{
    auto clearProc = reinterpret_cast<inquiry>(PyType_GetSlot(SbkObject_TypeF(), Py_tp_clear));
    ;
    return clearProc(self);
}
extern "C"
{
static PyObject *Sbk_Akonadi_Tag__repr__(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::Akonadi::Tag *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_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_Tag_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        reinterpret_cast<void *>(Sbk_Akonadi_Tag__repr__)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_Akonadi_Tag_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_Akonadi_Tag_clear)},
    {Py_tp_richcompare, reinterpret_cast<void *>(Sbk_Akonadi_Tag_richcompare)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_Akonadi_Tag_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_Akonadi_Tag_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObject_tp_new)},
    {0, nullptr}
};
static PyType_Spec Sbk_Akonadi_Tag_spec = {
    "1:AkonadiCore.Akonadi.Tag",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_Akonadi_Tag_slots
};

} //extern "C"

// Type conversion functions.

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

}
static PythonToCppFunc is_Enum_PythonToCpp_Akonadi_Tag_CreateOption_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_CreateOption_IDX])))
        return Enum_PythonToCpp_Akonadi_Tag_CreateOption;
    return {};
}

static PyObject *Akonadi_Tag_CreateOption_CppToPython_Enum(PyTypeObject *pyType, const void *cppIn)
{
    using IntType = std::underlying_type_t<::Akonadi::Tag::CreateOption>;
    const auto castCppIn = IntType(*reinterpret_cast<const ::Akonadi::Tag::CreateOption *>(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 Tag_PythonToCpp_Tag_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_Akonadi_Tag_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_Tag_PythonToCpp_Tag_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, Sbk_Akonadi_Tag_TypeF()))
        return Tag_PythonToCpp_Tag_PTR;
    return {};
}

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

}

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

// Python to C++ copy conversion.
static void Tag_PythonToCpp_Tag_COPY(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::Akonadi::Tag *>(cppOut) = *reinterpret_cast< ::Akonadi::Tag *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_IDX]), reinterpret_cast<SbkObject *>(pyIn)));
}
static PythonToCppFunc is_Tag_PythonToCpp_Tag_COPY_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, Sbk_Akonadi_Tag_TypeF()))
        return Tag_PythonToCpp_Tag_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_Tag_SignatureStrings[] = {
    "3:AkonadiCore.Akonadi.Tag(self)",
    "2:AkonadiCore.Akonadi.Tag(self,arg__1:AkonadiCore.Akonadi.Tag)",
    "1:AkonadiCore.Akonadi.Tag(self,name:QString)",
    "0:AkonadiCore.Akonadi.Tag(self,id:long long)",
    "AkonadiCore.Akonadi.Tag.addAttribute(self,attribute:AkonadiCore.Akonadi.Attribute)",
    "AkonadiCore.Akonadi.Tag.attribute(self,name:typing.Union[PySide6.QtCore.QByteArray, char*])->AkonadiCore.Akonadi.Attribute",
    "AkonadiCore.Akonadi.Tag.attributes(self)->QList[AkonadiCore.Akonadi.Attribute]",
    "AkonadiCore.Akonadi.Tag.clearAttributes(self)",
    "AkonadiCore.Akonadi.Tag.fromUrl(url:typing.Union[PySide6.QtCore.QUrl, QString])->AkonadiCore.Akonadi.Tag",
    "AkonadiCore.Akonadi.Tag.genericTag(name:QString)->AkonadiCore.Akonadi.Tag",
    "AkonadiCore.Akonadi.Tag.gid(self)->PySide6.QtCore.QByteArray",
    "AkonadiCore.Akonadi.Tag.hasAttribute(self,name:typing.Union[PySide6.QtCore.QByteArray, char*])->bool",
    "AkonadiCore.Akonadi.Tag.id(self)->long long",
    "AkonadiCore.Akonadi.Tag.isImmutable(self)->bool",
    "AkonadiCore.Akonadi.Tag.isValid(self)->bool",
    "AkonadiCore.Akonadi.Tag.name(self)->QString",
    "AkonadiCore.Akonadi.Tag.parent(self)->AkonadiCore.Akonadi.Tag",
    "AkonadiCore.Akonadi.Tag.remoteId(self)->PySide6.QtCore.QByteArray",
    "AkonadiCore.Akonadi.Tag.removeAttribute(self,name:typing.Union[PySide6.QtCore.QByteArray, char*])",
    "AkonadiCore.Akonadi.Tag.setGid(self,gid:typing.Union[PySide6.QtCore.QByteArray, char*])",
    "AkonadiCore.Akonadi.Tag.setId(self,identifier:long long)",
    "AkonadiCore.Akonadi.Tag.setName(self,name:QString)",
    "AkonadiCore.Akonadi.Tag.setParent(self,parent:AkonadiCore.Akonadi.Tag)",
    "AkonadiCore.Akonadi.Tag.setRemoteId(self,remoteId:typing.Union[PySide6.QtCore.QByteArray, char*])",
    "AkonadiCore.Akonadi.Tag.setType(self,type:typing.Union[PySide6.QtCore.QByteArray, char*])",
    "AkonadiCore.Akonadi.Tag.type(self)->PySide6.QtCore.QByteArray",
    "AkonadiCore.Akonadi.Tag.url(self)->PySide6.QtCore.QUrl",
    "AkonadiCore.Akonadi.Tag.__copy__(self)->typing._Self",
    "AkonadiCore.Akonadi.Tag.__ne__(self,arg__1:AkonadiCore.Akonadi.Tag)->bool",
    "AkonadiCore.Akonadi.Tag.__eq__(self,arg__1:AkonadiCore.Akonadi.Tag)->bool",
    nullptr}; // Sentinel
#else
static constexpr size_t Akonadi_Tag_SignatureByteSize = 402;
static constexpr uint8_t Akonadi_Tag_SignatureBytes[402] = {
    0x78, 0xda, 0xad, 0x55, 0x5d, 0x6b, 0xc2, 0x30, 0x14, 0x7d, 0xf7, 0x57, 0xf8, 0x68, 0x47, 0x2d,
    0x73, 0x83, 0x3d, 0xf8, 0x20, 0x74, 0x7b, 0x18, 0xc2, 0x18, 0x76, 0xea, 0x5e, 0x44, 0x42, 0x6c,
    0xaf, 0x35, 0x2c, 0x4d, 0xba, 0x34, 0x0e, 0xfa, 0xef, 0x17, 0x35, 0xd1, 0x29, 0xbb, 0x71, 0xba,
    0xbe, 0x94, 0x86, 0x9e, 0x73, 0xee, 0xc7, 0xb9, 0xbd, 0xb9, 0xef, 0xc7, 0x1f, 0x52, 0xd0, 0x8c,
    0x3d, 0x49, 0x05, 0x91, 0x7d, 0x8f, 0x26, 0x34, 0xef, 0x54, 0xc0, 0x97, 0x41, 0xeb, 0xce, 0xfb,
    0x3d, 0xa4, 0x2a, 0x27, 0xa4, 0x87, 0x61, 0x82, 0x56, 0xcf, 0x4f, 0x17, 0xb4, 0x80, 0x7e, 0x32,
    0xd6, 0x8a, 0x09, 0x03, 0xbe, 0xf5, 0x83, 0x59, 0xd6, 0xe7, 0x52, 0xe4, 0xed, 0xcd, 0x23, 0x68,
    0x21, 0xd0, 0x88, 0x66, 0x59, 0xac, 0x8d, 0xe0, 0x62, 0xad, 0xc1, 0xe6, 0xe8, 0x8e, 0xbf, 0xca,
    0xef, 0xc1, 0x1e, 0xc9, 0x63, 0xbd, 0x6d, 0xd2, 0xba, 0x2e, 0x4d, 0xce, 0xd1, 0x54, 0x30, 0x29,
    0x66, 0xa3, 0x7a, 0xcc, 0x32, 0x78, 0x88, 0x12, 0xbd, 0xe5, 0x26, 0x8f, 0xb5, 0x86, 0x58, 0x29,
    0x5a, 0x87, 0xed, 0x74, 0x45, 0xd5, 0xcd, 0x3c, 0xe8, 0x0e, 0xbc, 0xb1, 0xcf, 0x87, 0xae, 0x76,
    0x7e, 0x74, 0x07, 0xc9, 0x0b, 0xab, 0xf4, 0xcc, 0xab, 0x36, 0x47, 0xe5, 0x52, 0x0e, 0x54, 0xc5,
    0x27, 0x9a, 0x28, 0x7a, 0xa9, 0x64, 0x31, 0x55, 0xbc, 0xb3, 0x56, 0xdc, 0x5f, 0xaf, 0x01, 0x85,
    0x6d, 0x6b, 0x23, 0x56, 0xab, 0x11, 0x44, 0x03, 0xe5, 0x20, 0x40, 0xb1, 0x74, 0xe3, 0xf4, 0xd1,
    0x44, 0x5c, 0xa1, 0xc4, 0x32, 0xd7, 0x28, 0xd4, 0x14, 0x94, 0xbc, 0xa2, 0x55, 0xdc, 0x84, 0xd5,
    0x0b, 0x29, 0x39, 0x1a, 0xe4, 0x90, 0xe0, 0x7e, 0x98, 0x71, 0x6c, 0x35, 0x2c, 0x8a, 0xb5, 0xa6,
    0x0b, 0x0e, 0x8e, 0xe4, 0xd7, 0xae, 0xde, 0x29, 0x3f, 0x04, 0xf0, 0x62, 0x37, 0xa5, 0xed, 0x67,
    0x6a, 0xd7, 0x6f, 0x14, 0x5b, 0x52, 0x05, 0x42, 0x3b, 0xf4, 0xa5, 0x9e, 0x28, 0x28, 0xa4, 0x86,
    0xe1, 0x3f, 0x8c, 0xd9, 0x28, 0x7c, 0x41, 0x03, 0xde, 0xa0, 0x11, 0x2a, 0xd0, 0xcf, 0xb6, 0x71,
    0xa1, 0x99, 0xa1, 0x26, 0x75, 0x6d, 0xe1, 0x66, 0x7d, 0x99, 0x1e, 0xb2, 0x25, 0x03, 0xf5, 0x97,
    0x35, 0x66, 0x88, 0xaf, 0xce, 0xa1, 0x93, 0x35, 0xe9, 0xa1, 0x8c, 0x0e, 0x46, 0x85, 0x3b, 0xd3,
    0xf0, 0xd5, 0xec, 0x91, 0x79, 0xfb, 0xe9, 0x58, 0xe8, 0xfc, 0x6b, 0xb2, 0x29, 0x93, 0xba, 0xb4,
    0xb5, 0x19, 0xd1, 0xe6, 0x6c, 0xd4, 0x4e, 0xf6, 0xaa, 0x31, 0x33, 0x7b, 0x0e, 0x23, 0x9b, 0x0d,
    0x87, 0xd2, 0x08, 0x49, 0x65, 0x59, 0x13, 0xe2, 0xb8, 0xb6, 0x18, 0x32, 0x36, 0x47, 0x0f, 0x49,
    0x80, 0xa5, 0x9c, 0xbb, 0x44, 0xcf, 0xfc, 0xc8, 0x84, 0xc0, 0xe7, 0x65, 0x4a, 0xdf, 0xee, 0x50,
    0xd7, 0x21
};
#endif

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

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

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "Tag",
        "Akonadi::Tag",
        &Sbk_Akonadi_Tag_spec,
        &Shiboken::callCppDestructor< ::Akonadi::Tag >,
        Sbk_Akonadi_Tag_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass | Shiboken::ObjectType::WrapperFlags::Value);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, Akonadi_Tag_SignatureStrings);
#else
    InitSignatureBytes(pyType, Akonadi_Tag_SignatureBytes, Akonadi_Tag_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_Akonadi_Tag_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        Tag_PythonToCpp_Tag_PTR,
        is_Tag_PythonToCpp_Tag_PTR_Convertible,
        Tag_PTR_CppToPython_Tag,
        Tag_COPY_CppToPython_Tag);

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

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

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

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

    // Initialization of enum 'CreateOption'.
    const char *CreateOption_Initializer[] = {
        "AddIfMissing",
        "DontCreate",
        nullptr};
    // "uint8_t" used instead of "unsigned int"
    constexpr uint8_t CreateOption_InitializerValues[] = {
        uint8_t(Akonadi::Tag::CreateOption::AddIfMissing), //  0x00  0
        uint8_t(Akonadi::Tag::CreateOption::DontCreate)    //  0x01  1
        };
    EType = Shiboken::Enum::createPythonEnum(pyType,
        "1:AkonadiCore.Akonadi.Tag.CreateOption",
        CreateOption_Initializer, CreateOption_InitializerValues);
    SbkAkonadiCoreTypeStructs[SBK_Akonadi_Tag_CreateOption_IDX].type = EType;
    // Register converter for enum 'Akonadi::Tag::CreateOption'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(EType,
            Akonadi_Tag_CreateOption_CppToPython_Enum);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            Enum_PythonToCpp_Akonadi_Tag_CreateOption,
            is_Enum_PythonToCpp_Akonadi_Tag_CreateOption_Convertible);
        Shiboken::Conversions::registerConverterName(converter, "Akonadi::Tag::CreateOption");
        Shiboken::Conversions::registerConverterAlias(converter, "Tag::CreateOption");
        Shiboken::Conversions::registerConverterAlias(converter, "CreateOption");
        Shiboken::Enum::setTypeConverter(EType, converter, nullptr);
    }
    // End of 'CreateOption' enum.

    qRegisterMetaType< ::Akonadi::Tag >("Tag");
    qRegisterMetaType< ::Akonadi::Tag >("Akonadi::Tag");
    qRegisterMetaType< ::Akonadi::Tag::CreateOption >("Tag::CreateOption");
    qRegisterMetaType< ::Akonadi::Tag::CreateOption >("Akonadi::Tag::CreateOption");

    return pyType;
}

PyTypeObject *init_Akonadi_TagStaticFields(PyObject *module)
{
    auto *obContainerType = PyObject_GetAttrString(module, "Akonadi");
    auto *obType = PyObject_GetAttrString(obContainerType, "Tag");
    auto *type = reinterpret_cast<PyTypeObject *>(obType);
    Shiboken::AutoDecRef dict(PepType_GetDict(type));
    PyDict_SetItemString(dict, "PLAIN",
                         Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<const char *>(), Akonadi::Tag::PLAIN));
    PyDict_SetItemString(dict, "GENERIC",
                         Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<const char *>(), Akonadi::Tag::GENERIC));
    return type;
}
