/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt for Python.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

//workaround to access protected functions
#define protected public

// default includes
#include <shiboken.h>
#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QDebug>
#include <pysidesignal.h>
#include <pysideproperty.h>
#include <pyside.h>
#include <pysideqenum.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED

#include <typeinfo>
#include <signalmanager.h>
#include <pysidemetafunction.h>
#include <iterator>

// module include
#include "pyside6_qtbluetooth_python.h"

// main header
#include "qlowenergyservice_wrapper.h"

// inner classes

#include <cctype>
#include <cstring>



template <class T>
static const char *typeNameOf(const T &t)
{
    const char *typeName =  typeid(t).name();
    auto size = std::strlen(typeName);
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
    if (auto lastStar = strchr(typeName, '*')) {
        // MSVC: "class QPaintDevice * __ptr64"
        while (*--lastStar == ' ') {
        }
        size = lastStar - typeName + 1;
    }
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
    if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
        ++typeName;
        --size;
    }
#endif
    char *result = new char[size + 1];
    result[size] = '\0';
    memcpy(result, typeName, size);
    return result;
}

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

void QLowEnergyServiceWrapper::resetPyMethodCache()
{
    std::fill_n(m_PyMethodCache, sizeof(m_PyMethodCache) / sizeof(m_PyMethodCache[0]), false);
}

void QLowEnergyServiceWrapper::childEvent(QChildEvent * event)
{
    if (m_PyMethodCache[0]) {
        return this->::QObject::childEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "childEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[0] = true;
        return this->::QObject::childEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QCHILDEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QLowEnergyServiceWrapper::connectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[1]) {
        return this->::QObject::connectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "connectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[1] = true;
        return this->::QObject::connectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QLowEnergyServiceWrapper::customEvent(QEvent * event)
{
    if (m_PyMethodCache[2]) {
        return this->::QObject::customEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "customEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[2] = true;
        return this->::QObject::customEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

void QLowEnergyServiceWrapper::disconnectNotify(const QMetaMethod & signal)
{
    if (m_PyMethodCache[3]) {
        return this->::QObject::disconnectNotify(signal);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "disconnectNotify";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[3] = true;
        return this->::QObject::disconnectNotify(signal);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QMETAMETHOD_IDX], &signal)
    ));

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

bool QLowEnergyServiceWrapper::event(QEvent * event)
{
    if (m_PyMethodCache[4])
        return this->::QObject::event(event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "event";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[4] = true;
        return this->::QObject::event(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLowEnergyService.event",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

bool QLowEnergyServiceWrapper::eventFilter(QObject * watched, QEvent * event)
{
    if (m_PyMethodCache[5])
        return this->::QObject::eventFilter(watched, event);
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return false;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "eventFilter";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[5] = true;
        return this->::QObject::eventFilter(watched, event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(NN)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], watched),
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QEVENT_IDX], event)
    ));
    bool invalidateArg2 = PyTuple_GET_ITEM(pyArgs, 1)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg2)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 1));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return false;
    }
    // Check return type
    Shiboken::Conversions::PythonToCppConversion pythonToCpp =
        Shiboken::Conversions::pythonToCppConversion(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), pyResult);
    if (!pythonToCpp) {
        Shiboken::warning(PyExc_RuntimeWarning, 2,
            "Invalid return value in function %s, expected %s, got %s.",
            "QLowEnergyService.eventFilter",
            "bool",
            Py_TYPE(pyResult)->tp_name);
        return false;
    }
    bool cppResult;
    pythonToCpp(pyResult, &cppResult);
    return cppResult;
}

void QLowEnergyServiceWrapper::timerEvent(QTimerEvent * event)
{
    if (m_PyMethodCache[7]) {
        return this->::QObject::timerEvent(event);
    }
    Shiboken::GilState gil;
    if (PyErr_Occurred())
        return;
    static PyObject *nameCache[2] = {};
    static const char *funcName = "timerEvent";
    Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, nameCache, funcName));
    if (pyOverride.isNull()) {
        gil.release();
        m_PyMethodCache[7] = true;
        return this->::QObject::timerEvent(event);
    }

    Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)",
        Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QTIMEREVENT_IDX], event)
    ));
    bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1;

    Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, nullptr));
    if (invalidateArg1)
        Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0));
    if (pyResult.isNull()) {
        // An error happened in python code!
        PyErr_Print();
        return;
    }
}

const QMetaObject *QLowEnergyServiceWrapper::metaObject() const
{
    if (QObject::d_ptr->metaObject)
        return QObject::d_ptr->dynamicMetaObject();
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf == nullptr)
        return QLowEnergyService::metaObject();
    return PySide::SignalManager::retrieveMetaObject(reinterpret_cast<PyObject *>(pySelf));
}

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

void *QLowEnergyServiceWrapper::qt_metacast(const char *_clname)
{
    if (!_clname)
        return {};
    SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this);
    if (pySelf && PySide::inherits(Py_TYPE(pySelf), _clname))
        return static_cast<void *>(const_cast< QLowEnergyServiceWrapper *>(this));
    return QLowEnergyService::qt_metacast(_clname);
}

QLowEnergyServiceWrapper::~QLowEnergyServiceWrapper()
{
    SbkObject *wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this);
    Shiboken::Object::destroy(wrapper, this);
}

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

extern "C" {
static PyObject *Sbk_QLowEnergyServiceFunc_characteristic(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.characteristic";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QLowEnergyService::characteristic(QBluetoothUuid)const->QLowEnergyCharacteristic
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtBluetoothTypes[SBK_QBLUETOOTHUUID_IDX], (pyArg)))) {
        overloadId = 0; // characteristic(QBluetoothUuid)const
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLowEnergyServiceFunc_characteristic_TypeError;

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


        if (!PyErr_Occurred()) {
            // characteristic(QBluetoothUuid)const
            QLowEnergyCharacteristic* cppResult = new QLowEnergyCharacteristic(const_cast<const ::QLowEnergyService *>(cppSelf)->characteristic(*cppArg0));
            pyResult = Shiboken::Object::newObject(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYCHARACTERISTIC_IDX], cppResult, true, true);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLowEnergyServiceFunc_characteristic_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLowEnergyServiceFunc_characteristics(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.characteristics";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // characteristics()const
            QList<QLowEnergyCharacteristic > cppResult = const_cast<const ::QLowEnergyService *>(cppSelf)->characteristics();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtBluetoothTypeConverters[SBK_QTBLUETOOTH_QLIST_QLOWENERGYCHARACTERISTIC_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLowEnergyServiceFunc_contains(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.contains";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QLowEnergyService::contains(QLowEnergyCharacteristic)const->bool
    // 1: QLowEnergyService::contains(QLowEnergyDescriptor)const->bool
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYDESCRIPTOR_IDX], (pyArg)))) {
        overloadId = 1; // contains(QLowEnergyDescriptor)const
    } else if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYCHARACTERISTIC_IDX], (pyArg)))) {
        overloadId = 0; // contains(QLowEnergyCharacteristic)const
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLowEnergyServiceFunc_contains_TypeError;

    // Call function/method
    switch (overloadId) {
        case 0: // contains(const QLowEnergyCharacteristic & characteristic) const
        {
            if (!Shiboken::Object::isValid(pyArg))
                return {};
            ::QLowEnergyCharacteristic *cppArg0;
            pythonToCpp(pyArg, &cppArg0);

            if (!PyErr_Occurred()) {
                // contains(QLowEnergyCharacteristic)const
                bool cppResult = const_cast<const ::QLowEnergyService *>(cppSelf)->contains(*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            }
            break;
        }
        case 1: // contains(const QLowEnergyDescriptor & descriptor) const
        {
            if (!Shiboken::Object::isValid(pyArg))
                return {};
            ::QLowEnergyDescriptor *cppArg0;
            pythonToCpp(pyArg, &cppArg0);

            if (!PyErr_Occurred()) {
                // contains(QLowEnergyDescriptor)const
                bool cppResult = const_cast<const ::QLowEnergyService *>(cppSelf)->contains(*cppArg0);
                pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
            }
            break;
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;

    Sbk_QLowEnergyServiceFunc_contains_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLowEnergyServiceFunc_discoverDetails(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.discoverDetails";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[1];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0};

    // invalid argument lengths
    if (numArgs > 1) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QLowEnergyServiceFunc_discoverDetails_TypeError;
    }

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


    // Overloaded function decisor
    // 0: QLowEnergyService::discoverDetails(QLowEnergyService::DiscoveryMode)
    if (numArgs == 0) {
        overloadId = 0; // discoverDetails(QLowEnergyService::DiscoveryMode)
    } else if (numArgs >= 1
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX]))->converter, (pyArgs[0])))) {
        overloadId = 0; // discoverDetails(QLowEnergyService::DiscoveryMode)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLowEnergyServiceFunc_discoverDetails_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_mode = Shiboken::String::createStaticString("mode");
            if (PyDict_Contains(kwds, key_mode)) {
                value = PyDict_GetItem(kwds, key_mode);
                if (value && pyArgs[0]) {
                    errInfo.reset(key_mode);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLowEnergyServiceFunc_discoverDetails_TypeError;
                }
                if (value) {
                    pyArgs[0] = value;
                    if (!(pythonToCpp[0] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX]))->converter, (pyArgs[0]))))
                        goto Sbk_QLowEnergyServiceFunc_discoverDetails_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_mode);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QLowEnergyServiceFunc_discoverDetails_TypeError;
            }
        }
        ::QLowEnergyService::DiscoveryMode cppArg0(QLowEnergyService::DiscoveryMode::FullDiscovery);
        if (pythonToCpp[0])
            pythonToCpp[0](pyArgs[0], &cppArg0);

        if (!PyErr_Occurred()) {
            // discoverDetails(QLowEnergyService::DiscoveryMode)
            cppSelf->discoverDetails(cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLowEnergyServiceFunc_discoverDetails_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLowEnergyServiceFunc_error(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.error";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // error()const
            QLowEnergyService::ServiceError cppResult = const_cast<const ::QLowEnergyService *>(cppSelf)->error();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLowEnergyServiceFunc_includedServices(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.includedServices";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // includedServices()const
            QList<QBluetoothUuid > cppResult = const_cast<const ::QLowEnergyService *>(cppSelf)->includedServices();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtBluetoothTypeConverters[SBK_QTBLUETOOTH_QLIST_QBLUETOOTHUUID_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLowEnergyServiceFunc_readCharacteristic(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.readCharacteristic";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QLowEnergyService::readCharacteristic(QLowEnergyCharacteristic)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYCHARACTERISTIC_IDX], (pyArg)))) {
        overloadId = 0; // readCharacteristic(QLowEnergyCharacteristic)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLowEnergyServiceFunc_readCharacteristic_TypeError;

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

        if (!PyErr_Occurred()) {
            // readCharacteristic(QLowEnergyCharacteristic)
            cppSelf->readCharacteristic(*cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLowEnergyServiceFunc_readCharacteristic_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLowEnergyServiceFunc_readDescriptor(PyObject *self, PyObject *pyArg)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.readDescriptor";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp;
    SBK_UNUSED(pythonToCpp)

    // Overloaded function decisor
    // 0: QLowEnergyService::readDescriptor(QLowEnergyDescriptor)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYDESCRIPTOR_IDX], (pyArg)))) {
        overloadId = 0; // readDescriptor(QLowEnergyDescriptor)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLowEnergyServiceFunc_readDescriptor_TypeError;

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

        if (!PyErr_Occurred()) {
            // readDescriptor(QLowEnergyDescriptor)
            cppSelf->readDescriptor(*cppArg0);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLowEnergyServiceFunc_readDescriptor_TypeError:
        Shiboken::setErrorAboutWrongArguments(pyArg, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLowEnergyServiceFunc_serviceName(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.serviceName";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // serviceName()const
            QString cppResult = const_cast<const ::QLowEnergyService *>(cppSelf)->serviceName();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLowEnergyServiceFunc_serviceUuid(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.serviceUuid";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // serviceUuid()const
            QBluetoothUuid cppResult = const_cast<const ::QLowEnergyService *>(cppSelf)->serviceUuid();
            pyResult = Shiboken::Conversions::copyToPython(SbkPySide6_QtBluetoothTypes[SBK_QBLUETOOTHUUID_IDX], &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLowEnergyServiceFunc_state(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.state";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // state()const
            QLowEnergyService::ServiceState cppResult = const_cast<const ::QLowEnergyService *>(cppSelf)->state();
            pyResult = Shiboken::Conversions::copyToPython(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLowEnergyServiceFunc_type(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    PyObject *pyResult{};
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.type";
    SBK_UNUSED(fullName)

    // Call function/method
    {

        if (!PyErr_Occurred()) {
            // type()const
            QFlags<QLowEnergyService::ServiceType> cppResult = const_cast<const ::QLowEnergyService *>(cppSelf)->type();
            pyResult = Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]))->converter, &cppResult);
        }
    }

    if (PyErr_Occurred() || !pyResult) {
        Py_XDECREF(pyResult);
        return {};
    }
    return pyResult;
}

static PyObject *Sbk_QLowEnergyServiceFunc_writeCharacteristic(PyObject *self, PyObject *args, PyObject *kwds)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.writeCharacteristic";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[3];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0, 0};

    // invalid argument lengths
    if (numArgs > 3) {
        static PyObject *const too_many = Shiboken::String::createStaticString(">");
        errInfo.reset(too_many);
        Py_INCREF(errInfo.object());
        goto Sbk_QLowEnergyServiceFunc_writeCharacteristic_TypeError;
    } else if (numArgs < 2) {
        static PyObject *const too_few = Shiboken::String::createStaticString("<");
        errInfo.reset(too_few);
        Py_INCREF(errInfo.object());
        goto Sbk_QLowEnergyServiceFunc_writeCharacteristic_TypeError;
    }

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


    // Overloaded function decisor
    // 0: QLowEnergyService::writeCharacteristic(QLowEnergyCharacteristic,QByteArray,QLowEnergyService::WriteMode)
    if (numArgs >= 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYCHARACTERISTIC_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX], (pyArgs[1])))) {
        if (numArgs == 2) {
            overloadId = 0; // writeCharacteristic(QLowEnergyCharacteristic,QByteArray,QLowEnergyService::WriteMode)
        } else if (numArgs >= 3
            && (pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX]))->converter, (pyArgs[2])))) {
            overloadId = 0; // writeCharacteristic(QLowEnergyCharacteristic,QByteArray,QLowEnergyService::WriteMode)
        }
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLowEnergyServiceFunc_writeCharacteristic_TypeError;

    // Call function/method
    {
        if (kwds && PyDict_Size(kwds) > 0) {
            PyObject *value{};
            Shiboken::AutoDecRef kwds_dup(PyDict_Copy(kwds));
            static PyObject *const key_mode = Shiboken::String::createStaticString("mode");
            if (PyDict_Contains(kwds, key_mode)) {
                value = PyDict_GetItem(kwds, key_mode);
                if (value && pyArgs[2]) {
                    errInfo.reset(key_mode);
                    Py_INCREF(errInfo.object());
                    goto Sbk_QLowEnergyServiceFunc_writeCharacteristic_TypeError;
                }
                if (value) {
                    pyArgs[2] = value;
                    if (!(pythonToCpp[2] = Shiboken::Conversions::pythonToCppConversion(PepType_SETP(reinterpret_cast<SbkEnumType *>(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX]))->converter, (pyArgs[2]))))
                        goto Sbk_QLowEnergyServiceFunc_writeCharacteristic_TypeError;
                }
                PyDict_DelItem(kwds_dup, key_mode);
            }
            if (PyDict_Size(kwds_dup) > 0) {
                errInfo.reset(kwds_dup.release());
                goto Sbk_QLowEnergyServiceFunc_writeCharacteristic_TypeError;
            }
        }
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QLowEnergyCharacteristic *cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        if (!Shiboken::Object::isValid(pyArgs[1]))
            return {};
        ::QByteArray cppArg1_local;
        ::QByteArray *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            pythonToCpp[1](pyArgs[1], &cppArg1);

        ::QLowEnergyService::WriteMode cppArg2(QLowEnergyService::WriteMode::WriteWithResponse);
        if (pythonToCpp[2])
            pythonToCpp[2](pyArgs[2], &cppArg2);

        if (!PyErr_Occurred()) {
            // writeCharacteristic(QLowEnergyCharacteristic,QByteArray,QLowEnergyService::WriteMode)
            cppSelf->writeCharacteristic(*cppArg0, *cppArg1, cppArg2);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLowEnergyServiceFunc_writeCharacteristic_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}

static PyObject *Sbk_QLowEnergyServiceFunc_writeDescriptor(PyObject *self, PyObject *args)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    auto cppSelf = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
    SBK_UNUSED(cppSelf)
    Shiboken::AutoDecRef errInfo{};
    static const char *fullName = "PySide6.QtBluetooth.QLowEnergyService.writeDescriptor";
    SBK_UNUSED(fullName)
    int overloadId = -1;
    Shiboken::Conversions::PythonToCppConversion pythonToCpp[2];
    SBK_UNUSED(pythonToCpp)
    const Py_ssize_t numArgs = PyTuple_GET_SIZE(args);
    SBK_UNUSED(numArgs)
    PyObject *pyArgs[] = {0, 0};

    // invalid argument lengths


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


    // Overloaded function decisor
    // 0: QLowEnergyService::writeDescriptor(QLowEnergyDescriptor,QByteArray)
    if (numArgs == 2
        && (pythonToCpp[0] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYDESCRIPTOR_IDX], (pyArgs[0])))
        && (pythonToCpp[1] = Shiboken::Conversions::pythonToCppReferenceConversion(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX], (pyArgs[1])))) {
        overloadId = 0; // writeDescriptor(QLowEnergyDescriptor,QByteArray)
    }

    // Function signature not found.
    if (overloadId == -1) goto Sbk_QLowEnergyServiceFunc_writeDescriptor_TypeError;

    // Call function/method
    {
        if (!Shiboken::Object::isValid(pyArgs[0]))
            return {};
        ::QLowEnergyDescriptor *cppArg0;
        pythonToCpp[0](pyArgs[0], &cppArg0);
        if (!Shiboken::Object::isValid(pyArgs[1]))
            return {};
        ::QByteArray cppArg1_local;
        ::QByteArray *cppArg1 = &cppArg1_local;
        if (pythonToCpp[1].isValue())
            pythonToCpp[1](pyArgs[1], &cppArg1_local);
        else
            pythonToCpp[1](pyArgs[1], &cppArg1);


        if (!PyErr_Occurred()) {
            // writeDescriptor(QLowEnergyDescriptor,QByteArray)
            cppSelf->writeDescriptor(*cppArg0, *cppArg1);
        }
    }

    if (PyErr_Occurred()) {
        return {};
    }
    Py_RETURN_NONE;

    Sbk_QLowEnergyServiceFunc_writeDescriptor_TypeError:
        Shiboken::setErrorAboutWrongArguments(args, fullName, errInfo);
        return {};
}


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

static PyMethodDef Sbk_QLowEnergyService_methods[] = {
    {"characteristic", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_characteristic), METH_O},
    {"characteristics", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_characteristics), METH_NOARGS},
    {"contains", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_contains), METH_O},
    {"discoverDetails", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_discoverDetails), METH_VARARGS|METH_KEYWORDS},
    {"error", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_error), METH_NOARGS},
    {"includedServices", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_includedServices), METH_NOARGS},
    {"readCharacteristic", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_readCharacteristic), METH_O},
    {"readDescriptor", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_readDescriptor), METH_O},
    {"serviceName", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_serviceName), METH_NOARGS},
    {"serviceUuid", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_serviceUuid), METH_NOARGS},
    {"state", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_state), METH_NOARGS},
    {"type", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_type), METH_NOARGS},
    {"writeCharacteristic", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_writeCharacteristic), METH_VARARGS|METH_KEYWORDS},
    {"writeDescriptor", reinterpret_cast<PyCFunction>(Sbk_QLowEnergyServiceFunc_writeDescriptor), METH_VARARGS},

    {nullptr, nullptr} // Sentinel
};

static int Sbk_QLowEnergyService_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value && PyCallable_Check(value)) {
        auto plain_inst = reinterpret_cast< ::QLowEnergyService *>(Shiboken::Conversions::cppPointer(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX], reinterpret_cast<SbkObject *>(self)));
        auto inst = dynamic_cast<QLowEnergyServiceWrapper *>(plain_inst);
        if (inst)
            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_QLowEnergyService_traverse(PyObject *self, visitproc visit, void *arg)
{
    return SbkObject_TypeF()->tp_traverse(self, visit, arg);
}
static int Sbk_QLowEnergyService_clear(PyObject *self)
{
    return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
}
// Class Definition -----------------------------------------------
extern "C" {
static PyTypeObject *_Sbk_QLowEnergyService_Type = nullptr;
static PyTypeObject *Sbk_QLowEnergyService_TypeF(void)
{
    return _Sbk_QLowEnergyService_Type;
}

static PyType_Slot Sbk_QLowEnergyService_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_repr,        nullptr},
    {Py_tp_hash,        nullptr},
    {Py_tp_call,        nullptr},
    {Py_tp_str,         nullptr},
    {Py_tp_getattro,    nullptr},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_QLowEnergyService_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_QLowEnergyService_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_QLowEnergyService_clear)},
    {Py_tp_richcompare, nullptr},
    {Py_tp_iter,        nullptr},
    {Py_tp_iternext,    nullptr},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_QLowEnergyService_methods)},
    {Py_tp_getset,      nullptr},
    {Py_tp_init,        nullptr},
    {Py_tp_new,         reinterpret_cast<void *>(SbkObjectTpNew)},
    {0, nullptr}
};
static PyType_Spec Sbk_QLowEnergyService_spec = {
    "2:PySide6.QtBluetooth.QLowEnergyService",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_QLowEnergyService_slots
};

} //extern "C"

static void *Sbk_QLowEnergyService_typeDiscovery(void *cptr, PyTypeObject *instanceType)
{
    if (instanceType == Shiboken::SbkType< ::QObject >())
        return dynamic_cast< ::QLowEnergyService *>(reinterpret_cast< ::QObject *>(cptr));
    return {};
}

PyObject *SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType___and__(PyObject *self, PyObject *pyArg)
{
    ::QLowEnergyService::ServiceTypes cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QLowEnergyService::ServiceTypes>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QLowEnergyService::ServiceTypes>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf & cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType___or__(PyObject *self, PyObject *pyArg)
{
    ::QLowEnergyService::ServiceTypes cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QLowEnergyService::ServiceTypes>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QLowEnergyService::ServiceTypes>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf | cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType___xor__(PyObject *self, PyObject *pyArg)
{
    ::QLowEnergyService::ServiceTypes cppResult, cppSelf, cppArg;
    cppSelf = static_cast<::QLowEnergyService::ServiceTypes>(int(PyLong_AsLong(self)));
    if (PyErr_Occurred())
        return nullptr;
    cppArg = static_cast<QLowEnergyService::ServiceTypes>(int(PyLong_AsLong(pyArg)));
    if (PyErr_Occurred())
        return nullptr;
    cppResult = cppSelf ^ cppArg;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]))->converter, &cppResult);
}

PyObject *SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType___invert__(PyObject *self, PyObject *pyArg)
{
    ::QLowEnergyService::ServiceTypes cppSelf;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]))->converter, self, &cppSelf);
    ::QLowEnergyService::ServiceTypes cppResult = ~cppSelf;
    return Shiboken::Conversions::copyToPython(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]))->converter, &cppResult);
}

static PyObject *SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType_long(PyObject *self)
{
    int val;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]))->converter, self, &val);
    return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &val);
}
static int SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType__nonzero(PyObject *self)
{
    int val;
    Shiboken::Conversions::pythonToCppCopy(PepType_PFTP(reinterpret_cast<PySideQFlagsType *>(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]))->converter, self, &val);
    return val != 0;
}

static PyType_Slot SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType_number_slots[] = {
    {Py_nb_bool,    reinterpret_cast<void *>(SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType__nonzero)},
    {Py_nb_invert,  reinterpret_cast<void *>(SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType___invert__)},
    {Py_nb_and,     reinterpret_cast<void *>(SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType___and__)},
    {Py_nb_xor,     reinterpret_cast<void *>(SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType___xor__)},
    {Py_nb_or,      reinterpret_cast<void *>(SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType___or__)},
    {Py_nb_int,     reinterpret_cast<void *>(SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType_long)},
    {Py_nb_index,   reinterpret_cast<void *>(SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType_long)},
    {0, nullptr} // sentinel
};



// Type conversion functions.

// Python to C++ enum conversion.
static void QLowEnergyService_ServiceType_PythonToCpp_QLowEnergyService_ServiceType(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QLowEnergyService::ServiceType *>(cppOut) =
        static_cast<::QLowEnergyService::ServiceType>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QLowEnergyService_ServiceType_PythonToCpp_QLowEnergyService_ServiceType_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX]))
        return QLowEnergyService_ServiceType_PythonToCpp_QLowEnergyService_ServiceType;
    return {};
}
static PyObject *QLowEnergyService_ServiceType_CppToPython_QLowEnergyService_ServiceType(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QLowEnergyService::ServiceType *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX], castCppIn);

}

static void QFlags_QLowEnergyService_ServiceType__PythonToCpp_QFlags_QLowEnergyService_ServiceType_(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QFlags<QLowEnergyService::ServiceType> *>(cppOut) =
        ::QFlags<QLowEnergyService::ServiceType>(QFlag(int(PySide::QFlags::getValue(reinterpret_cast<PySideQFlagsObject *>(pyIn)))));

}
static PythonToCppFunc is_QFlags_QLowEnergyService_ServiceType__PythonToCpp_QFlags_QLowEnergyService_ServiceType__Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]))
        return QFlags_QLowEnergyService_ServiceType__PythonToCpp_QFlags_QLowEnergyService_ServiceType_;
    return {};
}
static PyObject *QFlags_QLowEnergyService_ServiceType__CppToPython_QFlags_QLowEnergyService_ServiceType_(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QFlags<QLowEnergyService::ServiceType> *>(cppIn));
    return reinterpret_cast<PyObject *>(PySide::QFlags::newObject(castCppIn, SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]));

}

static void QLowEnergyService_ServiceType_PythonToCpp_QFlags_QLowEnergyService_ServiceType_(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QFlags<QLowEnergyService::ServiceType> *>(cppOut) =
        ::QFlags<QLowEnergyService::ServiceType>(QFlag(int(Shiboken::Enum::getValue(pyIn))));

}
static PythonToCppFunc is_QLowEnergyService_ServiceType_PythonToCpp_QFlags_QLowEnergyService_ServiceType__Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX]))
        return QLowEnergyService_ServiceType_PythonToCpp_QFlags_QLowEnergyService_ServiceType_;
    return {};
}
static void number_PythonToCpp_QFlags_QLowEnergyService_ServiceType_(PyObject *pyIn, void *cppOut)
{
    Shiboken::AutoDecRef pyLong(PyNumber_Long(pyIn));
    *reinterpret_cast<::QFlags<QLowEnergyService::ServiceType> *>(cppOut) =
        ::QFlags<QLowEnergyService::ServiceType>(QFlag(int(PyLong_AsLong(pyLong.object()))));

}
static PythonToCppFunc is_number_PythonToCpp_QFlags_QLowEnergyService_ServiceType__Convertible(PyObject *pyIn)
{
    if (PyNumber_Check(pyIn) && PyObject_TypeCheck(pyIn, SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX]))
        return number_PythonToCpp_QFlags_QLowEnergyService_ServiceType_;
    return {};
}
static void QLowEnergyService_ServiceError_PythonToCpp_QLowEnergyService_ServiceError(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QLowEnergyService::ServiceError *>(cppOut) =
        static_cast<::QLowEnergyService::ServiceError>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QLowEnergyService_ServiceError_PythonToCpp_QLowEnergyService_ServiceError_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX]))
        return QLowEnergyService_ServiceError_PythonToCpp_QLowEnergyService_ServiceError;
    return {};
}
static PyObject *QLowEnergyService_ServiceError_CppToPython_QLowEnergyService_ServiceError(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QLowEnergyService::ServiceError *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX], castCppIn);

}

static void QLowEnergyService_ServiceState_PythonToCpp_QLowEnergyService_ServiceState(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QLowEnergyService::ServiceState *>(cppOut) =
        static_cast<::QLowEnergyService::ServiceState>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QLowEnergyService_ServiceState_PythonToCpp_QLowEnergyService_ServiceState_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX]))
        return QLowEnergyService_ServiceState_PythonToCpp_QLowEnergyService_ServiceState;
    return {};
}
static PyObject *QLowEnergyService_ServiceState_CppToPython_QLowEnergyService_ServiceState(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QLowEnergyService::ServiceState *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX], castCppIn);

}

static void QLowEnergyService_DiscoveryMode_PythonToCpp_QLowEnergyService_DiscoveryMode(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QLowEnergyService::DiscoveryMode *>(cppOut) =
        static_cast<::QLowEnergyService::DiscoveryMode>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QLowEnergyService_DiscoveryMode_PythonToCpp_QLowEnergyService_DiscoveryMode_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX]))
        return QLowEnergyService_DiscoveryMode_PythonToCpp_QLowEnergyService_DiscoveryMode;
    return {};
}
static PyObject *QLowEnergyService_DiscoveryMode_CppToPython_QLowEnergyService_DiscoveryMode(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QLowEnergyService::DiscoveryMode *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX], castCppIn);

}

static void QLowEnergyService_WriteMode_PythonToCpp_QLowEnergyService_WriteMode(PyObject *pyIn, void *cppOut)
{
    *reinterpret_cast<::QLowEnergyService::WriteMode *>(cppOut) =
        static_cast<::QLowEnergyService::WriteMode>(Shiboken::Enum::getValue(pyIn));

}
static PythonToCppFunc is_QLowEnergyService_WriteMode_PythonToCpp_QLowEnergyService_WriteMode_Convertible(PyObject *pyIn)
{
    if (PyObject_TypeCheck(pyIn, SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX]))
        return QLowEnergyService_WriteMode_PythonToCpp_QLowEnergyService_WriteMode;
    return {};
}
static PyObject *QLowEnergyService_WriteMode_CppToPython_QLowEnergyService_WriteMode(const void *cppIn)
{
    const int castCppIn = int(*reinterpret_cast<const ::QLowEnergyService::WriteMode *>(cppIn));
    return Shiboken::Enum::newItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX], castCppIn);

}

// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
static void QLowEnergyService_PythonToCpp_QLowEnergyService_PTR(PyObject *pyIn, void *cppOut)
{
    Shiboken::Conversions::pythonToCppPointer(Sbk_QLowEnergyService_TypeF(), pyIn, cppOut);
}
static PythonToCppFunc is_QLowEnergyService_PythonToCpp_QLowEnergyService_PTR_Convertible(PyObject *pyIn)
{
    if (pyIn == Py_None)
        return Shiboken::Conversions::nonePythonToCppNullPtr;
    if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject *>(Sbk_QLowEnergyService_TypeF())))
        return QLowEnergyService_PythonToCpp_QLowEnergyService_PTR;
    return {};
}

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

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
static const char *QLowEnergyService_SignatureStrings[] = {
    "PySide6.QtBluetooth.QLowEnergyService.characteristic(self,uuid:typing.Union[PySide6.QtBluetooth.QBluetoothUuid, PySide6.QtBluetooth.QBluetoothUuid.CharacteristicType, PySide6.QtBluetooth.QBluetoothUuid.DescriptorType, PySide6.QtBluetooth.QBluetoothUuid.ProtocolUuid, PySide6.QtBluetooth.QBluetoothUuid.ServiceClassUuid, PySide6.QtCore.QUuid])->PySide6.QtBluetooth.QLowEnergyCharacteristic",
    "PySide6.QtBluetooth.QLowEnergyService.characteristics(self)->QList[PySide6.QtBluetooth.QLowEnergyCharacteristic]",
    "1:PySide6.QtBluetooth.QLowEnergyService.contains(self,characteristic:PySide6.QtBluetooth.QLowEnergyCharacteristic)->bool",
    "0:PySide6.QtBluetooth.QLowEnergyService.contains(self,descriptor:PySide6.QtBluetooth.QLowEnergyDescriptor)->bool",
    "PySide6.QtBluetooth.QLowEnergyService.discoverDetails(self,mode:PySide6.QtBluetooth.QLowEnergyService.DiscoveryMode=QLowEnergyService.DiscoveryMode.FullDiscovery)",
    "PySide6.QtBluetooth.QLowEnergyService.error(self)->PySide6.QtBluetooth.QLowEnergyService.ServiceError",
    "PySide6.QtBluetooth.QLowEnergyService.includedServices(self)->QList[PySide6.QtBluetooth.QBluetoothUuid]",
    "PySide6.QtBluetooth.QLowEnergyService.readCharacteristic(self,characteristic:PySide6.QtBluetooth.QLowEnergyCharacteristic)",
    "PySide6.QtBluetooth.QLowEnergyService.readDescriptor(self,descriptor:PySide6.QtBluetooth.QLowEnergyDescriptor)",
    "PySide6.QtBluetooth.QLowEnergyService.serviceName(self)->QString",
    "PySide6.QtBluetooth.QLowEnergyService.serviceUuid(self)->PySide6.QtBluetooth.QBluetoothUuid",
    "PySide6.QtBluetooth.QLowEnergyService.state(self)->PySide6.QtBluetooth.QLowEnergyService.ServiceState",
    "PySide6.QtBluetooth.QLowEnergyService.type(self)->PySide6.QtBluetooth.QLowEnergyService.ServiceTypes",
    "PySide6.QtBluetooth.QLowEnergyService.writeCharacteristic(self,characteristic:PySide6.QtBluetooth.QLowEnergyCharacteristic,newValue:typing.Union[PySide6.QtCore.QByteArray, char*],mode:PySide6.QtBluetooth.QLowEnergyService.WriteMode=QLowEnergyService.WriteMode.WriteWithResponse)",
    "PySide6.QtBluetooth.QLowEnergyService.writeDescriptor(self,descriptor:PySide6.QtBluetooth.QLowEnergyDescriptor,newValue:typing.Union[PySide6.QtCore.QByteArray, char*])",
    nullptr}; // Sentinel

void init_QLowEnergyService(PyObject *module)
{
    _Sbk_QLowEnergyService_Type = Shiboken::ObjectType::introduceWrapperType(
        module,
        "QLowEnergyService",
        "QLowEnergyService*",
        &Sbk_QLowEnergyService_spec,
        &Shiboken::callCppDestructor< ::QLowEnergyService >,
        SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX],
        0,
        0);
    auto *pyType = Sbk_QLowEnergyService_TypeF(); // references _Sbk_QLowEnergyService_Type
    InitSignatureStrings(pyType, QLowEnergyService_SignatureStrings);
    SbkObjectType_SetPropertyStrings(reinterpret_cast<PyTypeObject *>(_Sbk_QLowEnergyService_Type), Sbk_QLowEnergyService_PropertyStrings);
    SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_IDX]
        = Sbk_QLowEnergyService_TypeF();

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(Sbk_QLowEnergyService_TypeF(),
        QLowEnergyService_PythonToCpp_QLowEnergyService_PTR,
        is_QLowEnergyService_PythonToCpp_QLowEnergyService_PTR_Convertible,
        QLowEnergyService_PTR_CppToPython_QLowEnergyService);

    Shiboken::Conversions::registerConverterName(converter, "QLowEnergyService");
    Shiboken::Conversions::registerConverterName(converter, "QLowEnergyService*");
    Shiboken::Conversions::registerConverterName(converter, "QLowEnergyService&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::QLowEnergyService).name());
    Shiboken::Conversions::registerConverterName(converter, typeid(::QLowEnergyServiceWrapper).name());


    Shiboken::ObjectType::setTypeDiscoveryFunctionV2(Sbk_QLowEnergyService_TypeF(), &Sbk_QLowEnergyService_typeDiscovery);

    // Initialization of enums.

    // Initialization of enum 'ServiceType'.
    SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX] = PySide::QFlags::create("2:PySide6.QtBluetooth.QLowEnergyService.ServiceTypes", SbkPySide6_QtBluetooth_QLowEnergyService_ServiceType_number_slots);
    SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QLowEnergyService_TypeF(),
        "ServiceType",
        "2:PySide6.QtBluetooth.QLowEnergyService.ServiceType",
        "QLowEnergyService::ServiceType",
        SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX]);
    if (!SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX],
        Sbk_QLowEnergyService_TypeF(), "PrimaryService", (long) QLowEnergyService::ServiceType::PrimaryService))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX],
        Sbk_QLowEnergyService_TypeF(), "IncludedService", (long) QLowEnergyService::ServiceType::IncludedService))
        return;
    // Register converter for enum 'QLowEnergyService::ServiceType'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX],
            QLowEnergyService_ServiceType_CppToPython_QLowEnergyService_ServiceType);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLowEnergyService_ServiceType_PythonToCpp_QLowEnergyService_ServiceType,
            is_QLowEnergyService_ServiceType_PythonToCpp_QLowEnergyService_ServiceType_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICETYPE_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QLowEnergyService::ServiceType");
        Shiboken::Conversions::registerConverterName(converter, "ServiceType");
    }
    // Register converter for flag 'QFlags<QLowEnergyService::ServiceType>'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX],
            QFlags_QLowEnergyService_ServiceType__CppToPython_QFlags_QLowEnergyService_ServiceType_);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLowEnergyService_ServiceType_PythonToCpp_QFlags_QLowEnergyService_ServiceType_,
            is_QLowEnergyService_ServiceType_PythonToCpp_QFlags_QLowEnergyService_ServiceType__Convertible);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QFlags_QLowEnergyService_ServiceType__PythonToCpp_QFlags_QLowEnergyService_ServiceType_,
            is_QFlags_QLowEnergyService_ServiceType__PythonToCpp_QFlags_QLowEnergyService_ServiceType__Convertible);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            number_PythonToCpp_QFlags_QLowEnergyService_ServiceType_,
            is_number_PythonToCpp_QFlags_QLowEnergyService_ServiceType__Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtBluetoothTypes[SBK_QFLAGS_QLOWENERGYSERVICE_SERVICETYPE_IDX], converter, true);
        Shiboken::Conversions::registerConverterName(converter, "QLowEnergyService::ServiceTypes");
        Shiboken::Conversions::registerConverterName(converter, "ServiceTypes");
        Shiboken::Conversions::registerConverterName(converter, "QFlags<QLowEnergyService::ServiceType>");
    }
    // End of 'ServiceType' enum/flags.

    // Initialization of enum 'ServiceError'.
    SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QLowEnergyService_TypeF(),
        "ServiceError",
        "2:PySide6.QtBluetooth.QLowEnergyService.ServiceError",
        "QLowEnergyService::ServiceError");
    if (!SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX],
        Sbk_QLowEnergyService_TypeF(), "NoError", (long) QLowEnergyService::ServiceError::NoError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX],
        Sbk_QLowEnergyService_TypeF(), "OperationError", (long) QLowEnergyService::ServiceError::OperationError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX],
        Sbk_QLowEnergyService_TypeF(), "CharacteristicWriteError", (long) QLowEnergyService::ServiceError::CharacteristicWriteError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX],
        Sbk_QLowEnergyService_TypeF(), "DescriptorWriteError", (long) QLowEnergyService::ServiceError::DescriptorWriteError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX],
        Sbk_QLowEnergyService_TypeF(), "UnknownError", (long) QLowEnergyService::ServiceError::UnknownError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX],
        Sbk_QLowEnergyService_TypeF(), "CharacteristicReadError", (long) QLowEnergyService::ServiceError::CharacteristicReadError))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX],
        Sbk_QLowEnergyService_TypeF(), "DescriptorReadError", (long) QLowEnergyService::ServiceError::DescriptorReadError))
        return;
    // Register converter for enum 'QLowEnergyService::ServiceError'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX],
            QLowEnergyService_ServiceError_CppToPython_QLowEnergyService_ServiceError);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLowEnergyService_ServiceError_PythonToCpp_QLowEnergyService_ServiceError,
            is_QLowEnergyService_ServiceError_PythonToCpp_QLowEnergyService_ServiceError_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICEERROR_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QLowEnergyService::ServiceError");
        Shiboken::Conversions::registerConverterName(converter, "ServiceError");
    }
    // End of 'ServiceError' enum.

    // Initialization of enum 'ServiceState'.
    SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QLowEnergyService_TypeF(),
        "ServiceState",
        "2:PySide6.QtBluetooth.QLowEnergyService.ServiceState",
        "QLowEnergyService::ServiceState");
    if (!SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX],
        Sbk_QLowEnergyService_TypeF(), "InvalidService", (long) QLowEnergyService::ServiceState::InvalidService))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX],
        Sbk_QLowEnergyService_TypeF(), "RemoteService", (long) QLowEnergyService::ServiceState::RemoteService))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX],
        Sbk_QLowEnergyService_TypeF(), "RemoteServiceDiscovering", (long) QLowEnergyService::ServiceState::RemoteServiceDiscovering))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX],
        Sbk_QLowEnergyService_TypeF(), "RemoteServiceDiscovered", (long) QLowEnergyService::ServiceState::RemoteServiceDiscovered))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX],
        Sbk_QLowEnergyService_TypeF(), "LocalService", (long) QLowEnergyService::ServiceState::LocalService))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX],
        Sbk_QLowEnergyService_TypeF(), "DiscoveryRequired", (long) QLowEnergyService::ServiceState::DiscoveryRequired))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX],
        Sbk_QLowEnergyService_TypeF(), "DiscoveringService", (long) QLowEnergyService::ServiceState::DiscoveringService))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX],
        Sbk_QLowEnergyService_TypeF(), "ServiceDiscovered", (long) QLowEnergyService::ServiceState::ServiceDiscovered))
        return;
    // Register converter for enum 'QLowEnergyService::ServiceState'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX],
            QLowEnergyService_ServiceState_CppToPython_QLowEnergyService_ServiceState);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLowEnergyService_ServiceState_PythonToCpp_QLowEnergyService_ServiceState,
            is_QLowEnergyService_ServiceState_PythonToCpp_QLowEnergyService_ServiceState_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_SERVICESTATE_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QLowEnergyService::ServiceState");
        Shiboken::Conversions::registerConverterName(converter, "ServiceState");
    }
    // End of 'ServiceState' enum.

    // Initialization of enum 'DiscoveryMode'.
    SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QLowEnergyService_TypeF(),
        "DiscoveryMode",
        "2:PySide6.QtBluetooth.QLowEnergyService.DiscoveryMode",
        "QLowEnergyService::DiscoveryMode");
    if (!SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX],
        Sbk_QLowEnergyService_TypeF(), "FullDiscovery", (long) QLowEnergyService::DiscoveryMode::FullDiscovery))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX],
        Sbk_QLowEnergyService_TypeF(), "SkipValueDiscovery", (long) QLowEnergyService::DiscoveryMode::SkipValueDiscovery))
        return;
    // Register converter for enum 'QLowEnergyService::DiscoveryMode'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX],
            QLowEnergyService_DiscoveryMode_CppToPython_QLowEnergyService_DiscoveryMode);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLowEnergyService_DiscoveryMode_PythonToCpp_QLowEnergyService_DiscoveryMode,
            is_QLowEnergyService_DiscoveryMode_PythonToCpp_QLowEnergyService_DiscoveryMode_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_DISCOVERYMODE_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QLowEnergyService::DiscoveryMode");
        Shiboken::Conversions::registerConverterName(converter, "DiscoveryMode");
    }
    // End of 'DiscoveryMode' enum.

    // Initialization of enum 'WriteMode'.
    SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX] = Shiboken::Enum::createScopedEnum(Sbk_QLowEnergyService_TypeF(),
        "WriteMode",
        "2:PySide6.QtBluetooth.QLowEnergyService.WriteMode",
        "QLowEnergyService::WriteMode");
    if (!SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX])
        return;

    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX],
        Sbk_QLowEnergyService_TypeF(), "WriteWithResponse", (long) QLowEnergyService::WriteMode::WriteWithResponse))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX],
        Sbk_QLowEnergyService_TypeF(), "WriteWithoutResponse", (long) QLowEnergyService::WriteMode::WriteWithoutResponse))
        return;
    if (!Shiboken::Enum::createScopedEnumItem(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX],
        Sbk_QLowEnergyService_TypeF(), "WriteSigned", (long) QLowEnergyService::WriteMode::WriteSigned))
        return;
    // Register converter for enum 'QLowEnergyService::WriteMode'.
    {
        SbkConverter *converter = Shiboken::Conversions::createConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX],
            QLowEnergyService_WriteMode_CppToPython_QLowEnergyService_WriteMode);
        Shiboken::Conversions::addPythonToCppValueConversion(converter,
            QLowEnergyService_WriteMode_PythonToCpp_QLowEnergyService_WriteMode,
            is_QLowEnergyService_WriteMode_PythonToCpp_QLowEnergyService_WriteMode_Convertible);
        Shiboken::Enum::setTypeConverter(SbkPySide6_QtBluetoothTypes[SBK_QLOWENERGYSERVICE_WRITEMODE_IDX], converter, false);
        Shiboken::Conversions::registerConverterName(converter, "QLowEnergyService::WriteMode");
        Shiboken::Conversions::registerConverterName(converter, "WriteMode");
    }
    // End of 'WriteMode' enum.

    PySide::Signal::registerSignals(Sbk_QLowEnergyService_TypeF(), &::QLowEnergyService::staticMetaObject);
    qRegisterMetaType< ::QLowEnergyService::ServiceType >("QLowEnergyService::ServiceType");
    qRegisterMetaType< ::QLowEnergyService::ServiceTypes >("QLowEnergyService::ServiceTypes");
    qRegisterMetaType< ::QLowEnergyService::ServiceError >("QLowEnergyService::ServiceError");
    qRegisterMetaType< ::QLowEnergyService::ServiceState >("QLowEnergyService::ServiceState");
    qRegisterMetaType< ::QLowEnergyService::DiscoveryMode >("QLowEnergyService::DiscoveryMode");
    qRegisterMetaType< ::QLowEnergyService::WriteMode >("QLowEnergyService::WriteMode");
    Shiboken::ObjectType::setSubTypeInitHook(Sbk_QLowEnergyService_TypeF(), &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(Sbk_QLowEnergyService_TypeF(), &::QLowEnergyService::staticMetaObject, sizeof(QLowEnergyServiceWrapper));
}
