/****************************************************************************
**
** 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$
**
****************************************************************************/

#include <sbkpython.h>
#include <shiboken.h>
#include <algorithm>
#include <signature.h>
#include <sbkcontainer.h>
#include <sbkstaticstrings.h>
#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QDebug>
#include <pyside.h>
#include <pysideqenum.h>
#include <feature_select.h>
#include "pyside6_qtnetworkauth_python.h"



// Current module's type array.
PyTypeObject **SbkPySide6_QtNetworkAuthTypes = nullptr;
// Current module's PyObject pointer.
PyObject *SbkPySide6_QtNetworkAuthModuleObject = nullptr;
// Current module's converter array.
SbkConverter **SbkPySide6_QtNetworkAuthTypeConverters = nullptr;
void cleanTypesAttributes() {
    for (int i = 0, imax = SBK_QtNetworkAuth_IDX_COUNT; i < imax; i++) {
        PyObject *pyType = reinterpret_cast<PyObject *>(SbkPySide6_QtNetworkAuthTypes[i]);
        Shiboken::AutoDecRef attrName(Py_BuildValue("s", "staticMetaObject"));
        if (pyType && PyObject_HasAttr(pyType, attrName))
            PyObject_SetAttr(pyType, attrName, Py_None);
    }
}
// Global functions ------------------------------------------------------------

static PyMethodDef QtNetworkAuth_methods[] = {
    {0} // Sentinel
};

// Classes initialization functions ------------------------------------------------------------
void init_QAbstractOAuthReplyHandler(PyObject *module);
void init_QOAuthOobReplyHandler(PyObject *module);
void init_QOAuthHttpServerReplyHandler(PyObject *module);
void init_QAbstractOAuth(PyObject *module);
void init_QOAuth1(PyObject *module);
void init_QAbstractOAuth2(PyObject *module);
void init_QOAuth2AuthorizationCodeFlow(PyObject *module);
void init_QOAuth1Signature(PyObject *module);

// Required modules' type and converter arrays.
PyTypeObject **SbkPySide6_QtNetworkTypes;
SbkConverter **SbkPySide6_QtNetworkTypeConverters;
PyTypeObject **SbkPySide6_QtCoreTypes;
SbkConverter **SbkPySide6_QtCoreTypeConverters;

// Module initialization ------------------------------------------------------------
// Container Type converters.

// C++ to Python conversion for container type 'QMap<QString,QVariant >'.
static PyObject *_QMap_QString_QVariant__CppToPython__QMap_QString_QVariant_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QMap<QString,QVariant > *>(cppIn);
    // TEMPLATE - cppmap_to_pymap_conversion - START
    PyObject *pyOut = PyDict_New();
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it) {
        const auto &key = it.key();
        const auto &value = it.value();
        PyObject *pyKey = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &key);
        PyObject *pyValue = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], &value);
        PyDict_SetItem(pyOut, pyKey, pyValue);
        Py_DECREF(pyKey);
        Py_DECREF(pyValue);
    }
    return pyOut;
    // TEMPLATE - cppmap_to_pymap_conversion - END

}
static void _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QMap<QString,QVariant > *>(cppOut);
    // TEMPLATE - pydict_to_cppmap_conversion - START
    PyObject *key;
    PyObject *value;
    Py_ssize_t pos = 0;
    while (PyDict_Next(pyIn, &pos, &key, &value)) {
        ::QString cppKey;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], key, &(cppKey));
        ::QVariant cppValue;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], value, &(cppValue));
        cppOutRef.insert(cppKey, cppValue);
    }
    // TEMPLATE - pydict_to_cppmap_conversion - END

}
static PythonToCppFunc is__QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleDictTypes(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], false, SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], false, pyIn))
        return _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_;
    return {};
}

// C++ to Python conversion for container type 'QList<QObject* >'.
static PyObject *_QList_QObjectPTR__CppToPython__QList_QObjectPTR_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QObject* > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QObjectPTR__PythonToCpp__QList_QObjectPTR_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QObject* > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QObject* cppItem{nullptr};
    Shiboken::Conversions::pythonToCppPointer(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QObjectPTR__PythonToCpp__QList_QObjectPTR__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::checkSequenceTypes(SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], pyIn))
        return _QList_QObjectPTR__PythonToCpp__QList_QObjectPTR_;
    return {};
}

// C++ to Python conversion for container type 'QList<QByteArray >'.
static PyObject *_QList_QByteArray__CppToPython__QList_QByteArray_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QByteArray > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX], &cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QByteArray__PythonToCpp__QList_QByteArray_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QByteArray > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QByteArray cppItem;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QByteArray__PythonToCpp__QList_QByteArray__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX], pyIn))
        return _QList_QByteArray__PythonToCpp__QList_QByteArray_;
    return {};
}

// C++ to Python conversion for container type 'QMultiMap<QString,QVariant >'.
static PyObject *_QMultiMap_QString_QVariant__CppToPython__QMultiMap_QString_QVariant_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QMultiMap<QString,QVariant > *>(cppIn);
    // TEMPLATE - cppmultimap_to_pymap_conversion - START
    PyObject *pyOut = PyDict_New();
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ) {
        const auto &key = it.key();
        PyObject *pyKey = Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &key);
        ::QMultiMap<QString,QVariant >::const_iterator keyEnd = cppInRef.upperBound(key);
        const auto count = Py_ssize_t(std::distance(it, keyEnd));
        PyObject *pyValues = PyList_New(count);
        Py_ssize_t idx = 0;
        for ( ; it != keyEnd; ++it, ++idx) {
            const auto &cppItem = it.value();
            PyList_SET_ITEM(pyValues, idx, Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], &cppItem));
        }
        PyDict_SetItem(pyOut, pyKey, pyValues);
        Py_DECREF(pyKey);
    }
    return pyOut;
    // TEMPLATE - cppmultimap_to_pymap_conversion - END

}
static void _QMultiMap_QString_QVariant__PythonToCpp__QMultiMap_QString_QVariant_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QMultiMap<QString,QVariant > *>(cppOut);
    // TEMPLATE - pydict_to_cppmultimap_conversion - START
    PyObject *key;
    PyObject *values;
    Py_ssize_t pos = 0;
    while (PyDict_Next(pyIn, &pos, &key, &values)) {
        ::QString cppKey;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], key, &(cppKey));
        const Py_ssize_t size = PySequence_Size(values);
        for (Py_ssize_t i = 0; i < size; ++i) {
            Shiboken::AutoDecRef value(PySequence_GetItem(values, i));
            ::QVariant cppValue;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], value, &(cppValue));
            cppOutRef.insert(cppKey, cppValue);
        }
    }
    // TEMPLATE - pydict_to_cppmultimap_conversion - END

}
static PythonToCppFunc is__QMultiMap_QString_QVariant__PythonToCpp__QMultiMap_QString_QVariant__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleMultiDictTypes(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], false, SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], false, pyIn))
        return _QMultiMap_QString_QVariant__PythonToCpp__QMultiMap_QString_QVariant_;
    return {};
}

// C++ to Python conversion for container type 'QPair<QString,QString >'.
static PyObject *_QPair_QString_QString__CppToPython__QPair_QString_QString_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QPair<QString,QString > *>(cppIn);
    // ========================================================================
    // START of custom code block [file: ../glue/qtcore.cpp (return-qpair)]
    PyObject *pyOut = PyTuple_New(2);
    PyTuple_SET_ITEM(pyOut, 0, Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppInRef.first));
    PyTuple_SET_ITEM(pyOut, 1, Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppInRef.second));
    return pyOut;
    // END of custom code block [file: ../glue/qtcore.cpp (return-qpair)]
    // ========================================================================

}
static void _QPair_QString_QString__PythonToCpp__QPair_QString_QString_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QPair<QString,QString > *>(cppOut);
    // ========================================================================
    // START of custom code block [file: ../glue/qtcore.cpp (conversion-qpair-pysequence)]
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], PySequence_Fast_GET_ITEM(pyIn, 0), &(cppOutRef.first));
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], PySequence_Fast_GET_ITEM(pyIn, 1), &(cppOutRef.second));
    // END of custom code block [file: ../glue/qtcore.cpp (conversion-qpair-pysequence)]
    // ========================================================================

}
static PythonToCppFunc is__QPair_QString_QString__PythonToCpp__QPair_QString_QString__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertiblePairTypes(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], false, SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], false, pyIn))
        return _QPair_QString_QString__PythonToCpp__QPair_QString_QString_;
    return {};
}

// C++ to Python conversion for container type 'QList<QString >'.
static PyObject *_QList_QString__CppToPython__QList_QString_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QString > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QString__PythonToCpp__QList_QString_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QString > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QString cppItem;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QString__PythonToCpp__QList_QString__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide6_QtCoreTypeConverters[SBK_QSTRING_IDX], pyIn))
        return _QList_QString__PythonToCpp__QList_QString_;
    return {};
}

// C++ to Python conversion for container type 'QList<QVariant >'.
static PyObject *_QList_QVariant__CppToPython__QList_QVariant_(const void *cppIn)
{
    const auto &cppInRef = *reinterpret_cast<const ::QList<QVariant > *>(cppIn);
    // TEMPLATE - cpplist_to_pylist_conversion - START
    PyObject *pyOut = PyList_New(Py_ssize_t(cppInRef.size()));
    Py_ssize_t idx = 0;
    for (auto it = cppInRef.cbegin(), end = cppInRef.cend(); it != end; ++it, ++idx) {
        const auto &cppItem = *it;
        PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], &cppItem));
    }
    return pyOut;
    // TEMPLATE - cpplist_to_pylist_conversion - END

}
static void _QList_QVariant__PythonToCpp__QList_QVariant_(PyObject *pyIn, void *cppOut)
{
    auto &cppOutRef = *reinterpret_cast<::QList<QVariant > *>(cppOut);
    // TEMPLATE - pyseq_to_cpplist_conversion - START
    // PYSIDE-795: Turn all sequences into iterables.
    if (PyList_Check(pyIn)) {
        const Py_ssize_t size = PySequence_Size(pyIn);
        if (size > 10)
            (cppOutRef).reserve(size);
    }

    Shiboken::AutoDecRef it(PyObject_GetIter(pyIn));
    PyObject *(*iternext)(PyObject *) = *Py_TYPE(it)->tp_iternext;
    for (;;) {
        Shiboken::AutoDecRef pyItem(iternext(it));
        if (pyItem.isNull()) {
            if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration))
                PyErr_Clear();
            break;
        }
        ::QVariant cppItem;
    Shiboken::Conversions::pythonToCppCopy(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyItem, &(cppItem));
        cppOutRef << cppItem;
    }
    // TEMPLATE - pyseq_to_cpplist_conversion - END

}
static PythonToCppFunc is__QList_QVariant__PythonToCpp__QList_QVariant__Convertible(PyObject *pyIn)
{
    if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide6_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyIn))
        return _QList_QVariant__PythonToCpp__QList_QVariant_;
    return {};
}


static struct PyModuleDef moduledef = {
    /* m_base     */ PyModuleDef_HEAD_INIT,
    /* m_name     */ "QtNetworkAuth",
    /* m_doc      */ nullptr,
    /* m_size     */ -1,
    /* m_methods  */ QtNetworkAuth_methods,
    /* m_reload   */ nullptr,
    /* m_traverse */ nullptr,
    /* m_clear    */ nullptr,
    /* m_free     */ nullptr
};

// The signatures string for the global functions.
// Multiple signatures have their index "n:" in front.
static const char *QtNetworkAuth_SignatureStrings[] = {
    nullptr}; // Sentinel

extern "C" LIBSHIBOKEN_EXPORT PyObject *PyInit_QtNetworkAuth()
{
    if (SbkPySide6_QtNetworkAuthModuleObject != nullptr)
        return SbkPySide6_QtNetworkAuthModuleObject;
    {
        Shiboken::AutoDecRef requiredModule(Shiboken::Module::import("PySide6.QtNetwork"));
        if (requiredModule.isNull())
            return nullptr;
        SbkPySide6_QtNetworkTypes = Shiboken::Module::getTypes(requiredModule);
        SbkPySide6_QtNetworkTypeConverters = Shiboken::Module::getTypeConverters(requiredModule);
    }

    {
        Shiboken::AutoDecRef requiredModule(Shiboken::Module::import("PySide6.QtCore"));
        if (requiredModule.isNull())
            return nullptr;
        SbkPySide6_QtCoreTypes = Shiboken::Module::getTypes(requiredModule);
        SbkPySide6_QtCoreTypeConverters = Shiboken::Module::getTypeConverters(requiredModule);
    }

    // Create an array of wrapper types for the current module.
    static PyTypeObject *cppApi[SBK_QtNetworkAuth_IDX_COUNT];
    SbkPySide6_QtNetworkAuthTypes = cppApi;

    // Create an array of primitive type converters for the current module.
    static SbkConverter *sbkConverters[SBK_QtNetworkAuth_CONVERTERS_IDX_COUNT];
    SbkPySide6_QtNetworkAuthTypeConverters = sbkConverters;

    PyObject *module = Shiboken::Module::create("QtNetworkAuth", &moduledef);

    // Make module available from global scope
    SbkPySide6_QtNetworkAuthModuleObject = module;

    // Initialize classes in the type system
    init_QAbstractOAuthReplyHandler(module);
    init_QOAuthOobReplyHandler(module);
    init_QOAuthHttpServerReplyHandler(module);
    init_QAbstractOAuth(module);
    init_QOAuth1(module);
    init_QAbstractOAuth2(module);
    init_QOAuth2AuthorizationCodeFlow(module);
    init_QOAuth1Signature(module);

    // Register converter for type 'QMap<QString,QVariant>'.
    SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QMAP_QSTRING_QVARIANT_IDX] = Shiboken::Conversions::createConverter(&PyDict_Type, _QMap_QString_QVariant__CppToPython__QMap_QString_QVariant_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QMAP_QSTRING_QVARIANT_IDX], "QMap<QString,QVariant>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QMAP_QSTRING_QVARIANT_IDX],
        _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_,
        is__QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant__Convertible);

    // Register converter for type 'QList<QObject*>'.
    SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QOBJECTPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QObjectPTR__CppToPython__QList_QObjectPTR_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QOBJECTPTR_IDX], "QList<QObject*>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QOBJECTPTR_IDX],
        _QList_QObjectPTR__PythonToCpp__QList_QObjectPTR_,
        is__QList_QObjectPTR__PythonToCpp__QList_QObjectPTR__Convertible);

    // Register converter for type 'QList<QByteArray>'.
    SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QBYTEARRAY_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QByteArray__CppToPython__QList_QByteArray_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QBYTEARRAY_IDX], "QList<QByteArray>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QBYTEARRAY_IDX],
        _QList_QByteArray__PythonToCpp__QList_QByteArray_,
        is__QList_QByteArray__PythonToCpp__QList_QByteArray__Convertible);

    // Register converter for type 'QMultiMap<QString,QVariant>'.
    SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QMULTIMAP_QSTRING_QVARIANT_IDX] = Shiboken::Conversions::createConverter(&PyDict_Type, _QMultiMap_QString_QVariant__CppToPython__QMultiMap_QString_QVariant_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QMULTIMAP_QSTRING_QVARIANT_IDX], "QMultiMap<QString,QVariant>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QMULTIMAP_QSTRING_QVARIANT_IDX],
        _QMultiMap_QString_QVariant__PythonToCpp__QMultiMap_QString_QVariant_,
        is__QMultiMap_QString_QVariant__PythonToCpp__QMultiMap_QString_QVariant__Convertible);

    // Register converter for type 'QPair<QString,QString>'.
    SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QPAIR_QSTRING_QSTRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QPair_QString_QString__CppToPython__QPair_QString_QString_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QPAIR_QSTRING_QSTRING_IDX], "QPair<QString,QString>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QPAIR_QSTRING_QSTRING_IDX],
        _QPair_QString_QString__PythonToCpp__QPair_QString_QString_,
        is__QPair_QString_QString__PythonToCpp__QPair_QString_QString__Convertible);

    // Register converter for type 'QList<QString>'.
    SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QSTRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QString__CppToPython__QList_QString_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QSTRING_IDX], "QList<QString>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QSTRING_IDX],
        _QList_QString__PythonToCpp__QList_QString_,
        is__QList_QString__PythonToCpp__QList_QString__Convertible);

    // Register converter for type 'QList<QVariant>'.
    SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QVARIANT_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QVariant__CppToPython__QList_QVariant_);
    Shiboken::Conversions::registerConverterName(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QVARIANT_IDX], "QList<QVariant>");
    Shiboken::Conversions::addPythonToCppValueConversion(SbkPySide6_QtNetworkAuthTypeConverters[SBK_QTNETWORKAUTH_QLIST_QVARIANT_IDX],
        _QList_QVariant__PythonToCpp__QList_QVariant_,
        is__QList_QVariant__PythonToCpp__QList_QVariant__Convertible);

    // Register primitive types converters.

    Shiboken::Module::registerTypes(module, SbkPySide6_QtNetworkAuthTypes);
    Shiboken::Module::registerTypeConverters(module, SbkPySide6_QtNetworkAuthTypeConverters);

    if (PyErr_Occurred()) {
        PyErr_Print();
        Py_FatalError("can't initialize module QtNetworkAuth");
    }
    PySide::registerCleanupFunction(cleanTypesAttributes);

    FinishSignatureInitialization(module, QtNetworkAuth_SignatureStrings);

    return module;
}
