
// Workaround to access protected functions
#ifndef protected
#  define protected public
#endif

// default includes
#include <shiboken.h>
#include <sbkpep.h>
#include <sbkpepbuffer.h>

#define PYSIDE6_COMOPT_COMPRESS 1

#ifndef QT_NO_VERSION_TAGGING
#  define QT_NO_VERSION_TAGGING
#endif
#include <QtCore/QDebug>
#include <pysideqobject.h>
#include <pysidesignal.h>
#include <pysideproperty.h>
#include <signalmanager.h>
#include <pysidemetafunction.h>
#include <pysideqenum.h>
#include <pysideutils.h>
#include <feature_select.h>
QT_WARNING_DISABLE_DEPRECATED


// module include
#include "kcalendarcore_python.h"

// main header
#include "kcalendarcore_filestorage_wrapper.h"

// Wrappers providing overrides
#include "kcalendarcore_calendarlistmodel_wrapper.h"
#include "kcalendarcore_incidence_wrapper.h"

// Argument includes
#include <QString>
#include <calformat.h>
#include <qobject.h>
#include <qobjectdefs.h>

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

using namespace KCalendarCore;

extern "C" {
static PyTypeObject *Sbk_KCalendarCore_FileStorage_TypeF(void)
{
    return SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX].type;
}
} // extern "C"

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

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

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

bool FileStorageWrapper::close()
{
    static const char *funcName = "close";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_KCalendarCore_FileStorage_TypeF(), gil, funcName, m_PyMethodCache[1], nameCache));
    if (pyOverride.isNull()) {
        return this->::KCalendarCore::FileStorage::close();
    }
    return IncidenceWrapper::sbk_o_supportsGroupwareCommunication("FileStorage", funcName, gil, pyOverride);
}

void FileStorageWrapper::connectNotify(const ::QMetaMethod & signal)
{
    static const char *funcName = "connectNotify";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_KCalendarCore_FileStorage_TypeF(), gil, funcName, m_PyMethodCache[2], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::connectNotify(signal);
    }
    CalendarListModelWrapper::sbk_o_connectNotify("FileStorage", funcName, gil, pyOverride, signal);
}

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

void FileStorageWrapper::disconnectNotify(const ::QMetaMethod & signal)
{
    static const char *funcName = "disconnectNotify";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_KCalendarCore_FileStorage_TypeF(), gil, funcName, m_PyMethodCache[4], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::disconnectNotify(signal);
    }
    CalendarListModelWrapper::sbk_o_connectNotify("FileStorage", funcName, gil, pyOverride, signal);
}

bool FileStorageWrapper::event(::QEvent * event)
{
    static const char *funcName = "event";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_KCalendarCore_FileStorage_TypeF(), gil, funcName, m_PyMethodCache[5], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::event(event);
    }
    return CalendarListModelWrapper::sbk_o_event("FileStorage", funcName, gil, pyOverride, event);
}

bool FileStorageWrapper::eventFilter(::QObject * watched, ::QEvent * event)
{
    static const char *funcName = "eventFilter";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_KCalendarCore_FileStorage_TypeF(), gil, funcName, m_PyMethodCache[6], nameCache));
    if (pyOverride.isNull()) {
        return this->::QObject::eventFilter(watched, event);
    }
    return CalendarListModelWrapper::sbk_o_eventFilter("FileStorage", funcName, gil, pyOverride, watched, event);
}

bool FileStorageWrapper::load()
{
    static const char *funcName = "load";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_KCalendarCore_FileStorage_TypeF(), gil, funcName, m_PyMethodCache[7], nameCache));
    if (pyOverride.isNull()) {
        return this->::KCalendarCore::FileStorage::load();
    }
    return IncidenceWrapper::sbk_o_supportsGroupwareCommunication("FileStorage", funcName, gil, pyOverride);
}

bool FileStorageWrapper::open()
{
    static const char *funcName = "open";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_KCalendarCore_FileStorage_TypeF(), gil, funcName, m_PyMethodCache[8], nameCache));
    if (pyOverride.isNull()) {
        return this->::KCalendarCore::FileStorage::open();
    }
    return IncidenceWrapper::sbk_o_supportsGroupwareCommunication("FileStorage", funcName, gil, pyOverride);
}

bool FileStorageWrapper::save()
{
    static const char *funcName = "save";
    static PyObject *nameCache[2] = {};
    Shiboken::GilState gil(false);
    Shiboken::AutoDecRef pyOverride(Sbk_GetPyOverride(this, Sbk_KCalendarCore_FileStorage_TypeF(), gil, funcName, m_PyMethodCache[9], nameCache));
    if (pyOverride.isNull()) {
        return this->::KCalendarCore::FileStorage::save();
    }
    return IncidenceWrapper::sbk_o_supportsGroupwareCommunication("FileStorage", funcName, gil, pyOverride);
}

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

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

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

void *FileStorageWrapper::qt_metacast(const char *_clname)
{
    if (_clname == nullptr)
        return {};
    if (SbkObject *pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this)) {
        auto *obSelf = reinterpret_cast<PyObject *>(pySelf);
        if (PySide::inherits(Py_TYPE(obSelf), _clname))
            return static_cast<void *>(const_cast< FileStorageWrapper *>(this));
    }
    return KCalendarCore::FileStorage::qt_metacast(_clname);
}

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

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

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

static PyObject *Sbk_KCalendarCore_FileStorageFunc_close(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::FileStorage *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalStorage::close()->bool
        bool cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
            ? cppSelf->::KCalendarCore::FileStorage::close()
            : cppSelf->close();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_FileStorageFunc_fileName(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::FileStorage *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

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

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_FileStorageFunc_load(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::FileStorage *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalStorage::load()->bool
        bool cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
            ? cppSelf->::KCalendarCore::FileStorage::load()
            : cppSelf->load();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_FileStorageFunc_open(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::FileStorage *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalStorage::open()->bool
        bool cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
            ? cppSelf->::KCalendarCore::FileStorage::open()
            : cppSelf->open();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_FileStorageFunc_save(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::FileStorage *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // CalStorage::save()->bool
        bool cppResult = Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))
            ? cppSelf->::KCalendarCore::FileStorage::save()
            : cppSelf->save();
        pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

static PyObject *Sbk_KCalendarCore_FileStorageFunc_saveFormat(PyObject *self)
{
    if (!Shiboken::Object::isValid(self))
        return {};
    [[maybe_unused]] auto *cppSelf = reinterpret_cast< ::KCalendarCore::FileStorage *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX]), reinterpret_cast<SbkObject *>(self)));
    PyObject *pyResult{};
    Shiboken::PythonContextMarker pcm;

    // Call function/method
    {

        // FileStorage::saveFormat()const->KCalendarCore::CalFormat*
        KCalendarCore::CalFormat * cppResult = const_cast<const ::KCalendarCore::FileStorage *>(cppSelf)->saveFormat();
        pyResult = Shiboken::Conversions::pointerToPython(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFormat_IDX]), cppResult);
    }

    return Sbk_ReturnFromPython_Result(pyResult);
}

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

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

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "setFileName", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX]);

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

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

     return Sbk_ReturnFromPython_None();
}

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

    // Overloaded function decisor
    // 0: FileStorage::setSaveFormat(KCalendarCore::CalFormat*)
    if ((pythonToCpp = Shiboken::Conversions::pythonToCppPointerConversion(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalFormat_IDX]), (pyArg)))) {
        overloadId = 0; // FileStorage::setSaveFormat(KCalendarCore::CalFormat*)
    }

    // Function signature not found.
    if (overloadId == -1)
        return Shiboken::returnWrongArguments(pyArg, "setSaveFormat", SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX]);

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

        if (Shiboken::Errors::occurred() == nullptr) {
            // FileStorage::setSaveFormat(KCalendarCore::CalFormat*)
            cppSelf->setSaveFormat(cppArg0);
        }
    }

     return Sbk_ReturnFromPython_None();
}


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

static PyMethodDef Sbk_KCalendarCore_FileStorage_methods[] = {
    {"close", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_FileStorageFunc_close), METH_NOARGS, nullptr},
    {"fileName", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_FileStorageFunc_fileName), METH_NOARGS, nullptr},
    {"load", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_FileStorageFunc_load), METH_NOARGS, nullptr},
    {"open", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_FileStorageFunc_open), METH_NOARGS, nullptr},
    {"save", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_FileStorageFunc_save), METH_NOARGS, nullptr},
    {"saveFormat", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_FileStorageFunc_saveFormat), METH_NOARGS, nullptr},
    {"setFileName", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_FileStorageFunc_setFileName), METH_O, nullptr},
    {"setSaveFormat", reinterpret_cast<PyCFunction>(Sbk_KCalendarCore_FileStorageFunc_setSaveFormat), METH_O, nullptr},
    {nullptr, nullptr, 0, nullptr} // Sentinel
};

static int Sbk_KCalendarCore_FileStorage_setattro(PyObject *self, PyObject *name, PyObject *value)
{
    PySide::Feature::Select(self);
    if (value != nullptr && PyCallable_Check(value) != 0) {
        auto plain_inst = reinterpret_cast< ::KCalendarCore::FileStorage *>(Shiboken::Conversions::cppPointer(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX]), reinterpret_cast<SbkObject *>(self)));
        auto *inst = dynamic_cast<FileStorageWrapper *>(plain_inst);
        if (inst != nullptr)
            inst->resetPyMethodCache();
    }
    Shiboken::AutoDecRef pp(reinterpret_cast<PyObject *>(PySide::Property::getObject(self, name)));
    if (!pp.isNull())
        return PySide::Property::setValue(reinterpret_cast<PySideProperty *>(pp.object()), self, value);
    return PyObject_GenericSetAttr(self, name, value);
}

} // extern "C"

static int Sbk_KCalendarCore_FileStorage_traverse(PyObject *self, visitproc visit, void *arg)
{
    auto traverseProc = reinterpret_cast<traverseproc>(PyType_GetSlot(SbkObject_TypeF(), Py_tp_traverse));
    ;
    return traverseProc(self, visit, arg);
}
static int Sbk_KCalendarCore_FileStorage_clear(PyObject *self)
{
    auto clearProc = reinterpret_cast<inquiry>(PyType_GetSlot(SbkObject_TypeF(), Py_tp_clear));
    ;
    return clearProc(self);
}

// Class Definition -----------------------------------------------
extern "C" {

static PyType_Slot Sbk_KCalendarCore_FileStorage_slots[] = {
    {Py_tp_base,        nullptr}, // inserted by introduceWrapperType
    {Py_tp_dealloc,     reinterpret_cast<void *>(&SbkDeallocWrapper)},
    {Py_tp_setattro,    reinterpret_cast<void *>(Sbk_KCalendarCore_FileStorage_setattro)},
    {Py_tp_traverse,    reinterpret_cast<void *>(Sbk_KCalendarCore_FileStorage_traverse)},
    {Py_tp_clear,       reinterpret_cast<void *>(Sbk_KCalendarCore_FileStorage_clear)},
    {Py_tp_methods,     reinterpret_cast<void *>(Sbk_KCalendarCore_FileStorage_methods)},
    {Py_tp_init,        reinterpret_cast<void *>(Sbk_KCalendarCore_FileStorage_Init)},
    {Py_tp_new,         reinterpret_cast<void *>(SbkDummyNew /* PYSIDE-595: Prevent replacement of "0" with base->tp_new. */)},
    {0, nullptr}
};
static PyType_Spec Sbk_KCalendarCore_FileStorage_spec = {
    "1:KCalendarCore.KCalendarCore.FileStorage",
    sizeof(SbkObject),
    0,
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
    Sbk_KCalendarCore_FileStorage_slots
};

} //extern "C"

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


// Type conversion functions.

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

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

}

// The signatures string for the functions.
// Multiple signatures have their index "n:" in front.
#if PYSIDE6_COMOPT_COMPRESS == 0
static const char *KCalendarCore_FileStorage_SignatureStrings[] = {
    "KCalendarCore.KCalendarCore.FileStorage.close(self)->bool",
    "KCalendarCore.KCalendarCore.FileStorage.fileName(self)->QString",
    "KCalendarCore.KCalendarCore.FileStorage.load(self)->bool",
    "KCalendarCore.KCalendarCore.FileStorage.open(self)->bool",
    "KCalendarCore.KCalendarCore.FileStorage.save(self)->bool",
    "KCalendarCore.KCalendarCore.FileStorage.saveFormat(self)->KCalendarCore.KCalendarCore.CalFormat",
    "KCalendarCore.KCalendarCore.FileStorage.setFileName(self,fileName:QString)",
    "KCalendarCore.KCalendarCore.FileStorage.setSaveFormat(self,format:KCalendarCore.KCalendarCore.CalFormat)",
    nullptr}; // Sentinel
#else
static constexpr size_t KCalendarCore_FileStorage_SignatureByteSize = 139;
static constexpr uint8_t KCalendarCore_FileStorage_SignatureBytes[139] = {
    0x78, 0xda, 0xf3, 0x76, 0x4e, 0xcc, 0x49, 0xcd, 0x4b, 0x49, 0x2c, 0x72, 0xce, 0x2f, 0x4a, 0xd5,
    0xf3, 0x46, 0xe1, 0xb9, 0x65, 0xe6, 0xa4, 0x06, 0x97, 0xe4, 0x17, 0x25, 0xa6, 0xa7, 0xea, 0x25,
    0xe7, 0xe4, 0x17, 0xa7, 0x6a, 0x14, 0xa7, 0xe6, 0xa4, 0x69, 0xea, 0xda, 0x25, 0xe5, 0xe7, 0xe7,
    0x70, 0x79, 0x13, 0xa9, 0x33, 0x0d, 0xc8, 0xf6, 0x4b, 0xcc, 0x85, 0x6b, 0x0e, 0x0c, 0x2e, 0x29,
    0xca, 0xcc, 0x4b, 0x27, 0x5a, 0x7f, 0x4e, 0x7e, 0x62, 0x0a, 0x59, 0x16, 0xe7, 0x17, 0xa4, 0xe6,
    0x91, 0xa5, 0xb1, 0x38, 0xb1, 0x2c, 0x95, 0x6c, 0x8d, 0x6e, 0xf9, 0x45, 0xb9, 0x89, 0x25, 0x30,
    0xed, 0xf8, 0x74, 0x02, 0x39, 0x10, 0xc5, 0xc4, 0x9b, 0x9f, 0x5a, 0xe2, 0x86, 0x1c, 0x9a, 0x3a,
    0xb0, 0xb0, 0xb5, 0x82, 0x06, 0xaa, 0x26, 0x29, 0x46, 0x05, 0xa3, 0xba, 0x56, 0x27, 0x0d, 0xcc,
    0xb6, 0x22, 0xca, 0xc9, 0x9a, 0x5c, 0x00, 0x5b, 0x8d, 0xce, 0x7c
};
#endif

PyTypeObject *init_KCalendarCore_FileStorage(PyObject *enclosingClass)
{
    auto &typeStruct = SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_FileStorage_IDX];
    if (typeStruct.type != nullptr)
        return typeStruct.type;

    auto *base1 = reinterpret_cast<PyObject *>(Shiboken::Module::get(SbkKCalendarCoreTypeStructs[SBK_KCalendarCore_CalStorage_IDX]));
    Shiboken::AutoDecRef Sbk_KCalendarCore_FileStorage_Type_bases(PyTuple_Pack(1, base1));

    PyTypeObject *pyType = Shiboken::ObjectType::introduceWrapperType(
        enclosingClass,
        "FileStorage",
        "KCalendarCore::FileStorage*",
        &Sbk_KCalendarCore_FileStorage_spec,
        &Shiboken::callCppDestructor< KCalendarCore::FileStorage >,
        Sbk_KCalendarCore_FileStorage_Type_bases.object(),
        Shiboken::ObjectType::WrapperFlags::InnerClass);
#if PYSIDE6_COMOPT_COMPRESS == 0
    InitSignatureStrings(pyType, KCalendarCore_FileStorage_SignatureStrings);
#else
    InitSignatureBytes(pyType, KCalendarCore_FileStorage_SignatureBytes, KCalendarCore_FileStorage_SignatureByteSize);
#endif
    SbkObjectType_SetPropertyStrings(pyType, Sbk_KCalendarCore_FileStorage_PropertyStrings);
    typeStruct.type = pyType;

    // Register Converter
    SbkConverter *converter = Shiboken::Conversions::createConverter(pyType,
        FileStorage_PythonToCpp_FileStorage_PTR,
        is_FileStorage_PythonToCpp_FileStorage_PTR_Convertible,
        FileStorage_PTR_CppToPython_FileStorage);

    Shiboken::Conversions::registerConverterName(converter, "KCalendarCore::FileStorage");
    Shiboken::Conversions::registerConverterName(converter, "KCalendarCore::FileStorage*");
    Shiboken::Conversions::registerConverterName(converter, "KCalendarCore::FileStorage&");
    Shiboken::Conversions::registerConverterAlias(converter, "FileStorage");
    Shiboken::Conversions::registerConverterAlias(converter, "FileStorage*");
    Shiboken::Conversions::registerConverterAlias(converter, "FileStorage&");
    Shiboken::Conversions::registerConverterName(converter, typeid(::KCalendarCore::FileStorage).name());
    Shiboken::Conversions::registerConverterName(converter, typeid(FileStorageWrapper).name());

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

    Shiboken::ObjectType::setSubTypeInitHook(pyType, &PySide::initQObjectSubType);
    PySide::initDynamicMetaObject(pyType, &::KCalendarCore::FileStorage::staticMetaObject, sizeof(FileStorageWrapper));

    return pyType;
}
