// WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9

#include "pybase.h"
#include "py.Windows.Storage.Search.h"


PyObject* py::converter<winrt::Windows::Storage::Search::SortEntry>::convert(winrt::Windows::Storage::Search::SortEntry instance) noexcept
{
    auto type = py::get_python_type<winrt::Windows::Storage::Search::SortEntry>();
    if (!type)
    {
        return nullptr;
    }

    return py::wrap_struct(instance, type);
}
winrt::Windows::Storage::Search::SortEntry py::converter<winrt::Windows::Storage::Search::SortEntry>::convert_to(PyObject* obj)
{
    throw_if_pyobj_null(obj);

    auto type =  py::get_python_type<winrt::Windows::Storage::Search::SortEntry>();

    if (!type) {
        throw python_exception();
    }

    if (Py_TYPE(obj) == type)
    {
        return reinterpret_cast<py::winrt_struct_wrapper<winrt::Windows::Storage::Search::SortEntry>*>(obj)->obj;
    }

    PyErr_SetString(PyExc_TypeError, "expecting winrt::Windows::Storage::Search::SortEntry");
    throw python_exception();
}

namespace py::cpp::Windows::Storage::Search
{
    struct module_state
    {
        PyObject* type_CommonFileQuery;
        PyObject* type_CommonFolderQuery;
        PyObject* type_DateStackOption;
        PyObject* type_FolderDepth;
        PyObject* type_IndexedState;
        PyObject* type_IndexerOption;
        PyTypeObject* type_ContentIndexer;
        PyTypeObject* type_ContentIndexerQuery;
        PyTypeObject* type_IndexableContent;
        PyTypeObject* type_QueryOptions;
        PyTypeObject* type_SortEntryVector;
        PyTypeObject* type_StorageFileQueryResult;
        PyTypeObject* type_StorageFolderQueryResult;
        PyTypeObject* type_StorageItemQueryResult;
        PyTypeObject* type_StorageLibraryChangeTrackerTriggerDetails;
        PyTypeObject* type_StorageLibraryContentChangedTriggerDetails;
        PyTypeObject* type_ValueAndLanguage;
        PyTypeObject* type_IIndexableContent;
        PyTypeObject* type_IStorageFolderQueryOperations;
        PyTypeObject* type_IStorageQueryResultBase;
        PyTypeObject* type_SortEntry;
    };

    static PyObject* register_CommonFileQuery(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_CommonFileQuery)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_CommonFileQuery = type;
        Py_INCREF(state->type_CommonFileQuery);


        Py_RETURN_NONE;
    }

    static PyObject* register_CommonFolderQuery(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_CommonFolderQuery)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_CommonFolderQuery = type;
        Py_INCREF(state->type_CommonFolderQuery);


        Py_RETURN_NONE;
    }

    static PyObject* register_DateStackOption(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_DateStackOption)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_DateStackOption = type;
        Py_INCREF(state->type_DateStackOption);


        Py_RETURN_NONE;
    }

    static PyObject* register_FolderDepth(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_FolderDepth)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_FolderDepth = type;
        Py_INCREF(state->type_FolderDepth);


        Py_RETURN_NONE;
    }

    static PyObject* register_IndexedState(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_IndexedState)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_IndexedState = type;
        Py_INCREF(state->type_IndexedState);


        Py_RETURN_NONE;
    }

    static PyObject* register_IndexerOption(PyObject* module, PyObject* type) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
        assert(state);

        if (state->type_IndexerOption)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_IndexerOption = type;
        Py_INCREF(state->type_IndexerOption);


        Py_RETURN_NONE;
    }

    // ----- ContentIndexer class --------------------
    static constexpr const char* const type_name_ContentIndexer = "ContentIndexer";

    static PyObject* _new_ContentIndexer(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_ContentIndexer);
        return nullptr;
    }

    static void _dealloc_ContentIndexer(py::wrapper::Windows::Storage::Search::ContentIndexer* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* ContentIndexer_AddAsync(py::wrapper::Windows::Storage::Search::ContentIndexer* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"AddAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::IIndexableContent>(args, 0);

                return py::convert(self->obj.AddAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexer_CreateQuery(py::wrapper::Windows::Storage::Search::ContentIndexer* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"CreateQuery", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 1);

                return py::convert(self->obj.CreateQuery(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"CreateQuery", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Storage::Search::SortEntry>>(args, 2);

                return py::convert(self->obj.CreateQuery(param0, param1, param2));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"CreateQuery", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Storage::Search::SortEntry>>(args, 2);
                auto param3 = py::convert_to<winrt::hstring>(args, 3);

                return py::convert(self->obj.CreateQuery(param0, param1, param2, param3));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexer_DeleteAllAsync(py::wrapper::Windows::Storage::Search::ContentIndexer* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"DeleteAllAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.DeleteAllAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexer_DeleteAsync(py::wrapper::Windows::Storage::Search::ContentIndexer* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"DeleteAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

                return py::convert(self->obj.DeleteAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexer_DeleteMultipleAsync(py::wrapper::Windows::Storage::Search::ContentIndexer* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"DeleteMultipleAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);

                return py::convert(self->obj.DeleteMultipleAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexer_GetIndexer(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"GetIndexer", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::Storage::Search::ContentIndexer::GetIndexer());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"GetIndexer", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

                return py::convert(winrt::Windows::Storage::Search::ContentIndexer::GetIndexer(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexer_RetrievePropertiesAsync(py::wrapper::Windows::Storage::Search::ContentIndexer* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"RetrievePropertiesAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 1);

                return py::convert(self->obj.RetrievePropertiesAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexer_UpdateAsync(py::wrapper::Windows::Storage::Search::ContentIndexer* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexer", L"UpdateAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::IIndexableContent>(args, 0);

                return py::convert(self->obj.UpdateAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexer_get_Revision(py::wrapper::Windows::Storage::Search::ContentIndexer* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.ContentIndexer", L"Revision"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Revision());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_ContentIndexer(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::ContentIndexer>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ContentIndexer(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::ContentIndexer>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ContentIndexer[] = {
        { "add_async", reinterpret_cast<PyCFunction>(ContentIndexer_AddAsync), METH_VARARGS, nullptr },
        { "create_query", reinterpret_cast<PyCFunction>(ContentIndexer_CreateQuery), METH_VARARGS, nullptr },
        { "delete_all_async", reinterpret_cast<PyCFunction>(ContentIndexer_DeleteAllAsync), METH_VARARGS, nullptr },
        { "delete_async", reinterpret_cast<PyCFunction>(ContentIndexer_DeleteAsync), METH_VARARGS, nullptr },
        { "delete_multiple_async", reinterpret_cast<PyCFunction>(ContentIndexer_DeleteMultipleAsync), METH_VARARGS, nullptr },
        { "get_indexer", reinterpret_cast<PyCFunction>(ContentIndexer_GetIndexer), METH_VARARGS | METH_STATIC, nullptr },
        { "retrieve_properties_async", reinterpret_cast<PyCFunction>(ContentIndexer_RetrievePropertiesAsync), METH_VARARGS, nullptr },
        { "update_async", reinterpret_cast<PyCFunction>(ContentIndexer_UpdateAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ContentIndexer, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ContentIndexer), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ContentIndexer[] = {
        { "revision", reinterpret_cast<getter>(ContentIndexer_get_Revision), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ContentIndexer[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ContentIndexer) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ContentIndexer) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ContentIndexer) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ContentIndexer) },
        { },
    };

    static PyType_Spec type_spec_ContentIndexer =
    {
        "_winsdk_Windows_Storage_Search.ContentIndexer",
        sizeof(py::wrapper::Windows::Storage::Search::ContentIndexer),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ContentIndexer
    };

    // ----- ContentIndexerQuery class --------------------
    static constexpr const char* const type_name_ContentIndexerQuery = "ContentIndexerQuery";

    static PyObject* _new_ContentIndexerQuery(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_ContentIndexerQuery);
        return nullptr;
    }

    static void _dealloc_ContentIndexerQuery(py::wrapper::Windows::Storage::Search::ContentIndexerQuery* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* ContentIndexerQuery_GetAsync(py::wrapper::Windows::Storage::Search::ContentIndexerQuery* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexerQuery", L"GetAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexerQuery", L"GetAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);

                return py::convert(self->obj.GetAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexerQuery_GetCountAsync(py::wrapper::Windows::Storage::Search::ContentIndexerQuery* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexerQuery", L"GetCountAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetCountAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexerQuery_GetPropertiesAsync(py::wrapper::Windows::Storage::Search::ContentIndexerQuery* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexerQuery", L"GetPropertiesAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetPropertiesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.ContentIndexerQuery", L"GetPropertiesAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);

                return py::convert(self->obj.GetPropertiesAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ContentIndexerQuery_get_QueryFolder(py::wrapper::Windows::Storage::Search::ContentIndexerQuery* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.ContentIndexerQuery", L"QueryFolder"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.QueryFolder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_ContentIndexerQuery(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::ContentIndexerQuery>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ContentIndexerQuery(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::ContentIndexerQuery>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ContentIndexerQuery[] = {
        { "get_async", reinterpret_cast<PyCFunction>(ContentIndexerQuery_GetAsync), METH_VARARGS, nullptr },
        { "get_count_async", reinterpret_cast<PyCFunction>(ContentIndexerQuery_GetCountAsync), METH_VARARGS, nullptr },
        { "get_properties_async", reinterpret_cast<PyCFunction>(ContentIndexerQuery_GetPropertiesAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ContentIndexerQuery, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ContentIndexerQuery), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ContentIndexerQuery[] = {
        { "query_folder", reinterpret_cast<getter>(ContentIndexerQuery_get_QueryFolder), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ContentIndexerQuery[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ContentIndexerQuery) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ContentIndexerQuery) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ContentIndexerQuery) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ContentIndexerQuery) },
        { },
    };

    static PyType_Spec type_spec_ContentIndexerQuery =
    {
        "_winsdk_Windows_Storage_Search.ContentIndexerQuery",
        sizeof(py::wrapper::Windows::Storage::Search::ContentIndexerQuery),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ContentIndexerQuery
    };

    // ----- IndexableContent class --------------------
    static constexpr const char* const type_name_IndexableContent = "IndexableContent";

    static PyObject* _new_IndexableContent(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Storage::Search::IndexableContent instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_IndexableContent(py::wrapper::Windows::Storage::Search::IndexableContent* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IndexableContent_get_StreamContentType(py::wrapper::Windows::Storage::Search::IndexableContent* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IndexableContent", L"StreamContentType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.StreamContentType());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int IndexableContent_put_StreamContentType(py::wrapper::Windows::Storage::Search::IndexableContent* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IndexableContent", L"StreamContentType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::hstring>(arg);

            self->obj.StreamContentType(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* IndexableContent_get_Stream(py::wrapper::Windows::Storage::Search::IndexableContent* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IndexableContent", L"Stream"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Stream());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int IndexableContent_put_Stream(py::wrapper::Windows::Storage::Search::IndexableContent* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IndexableContent", L"Stream"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IRandomAccessStream>(arg);

            self->obj.Stream(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* IndexableContent_get_Id(py::wrapper::Windows::Storage::Search::IndexableContent* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IndexableContent", L"Id"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Id());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int IndexableContent_put_Id(py::wrapper::Windows::Storage::Search::IndexableContent* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IndexableContent", L"Id"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::hstring>(arg);

            self->obj.Id(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* IndexableContent_get_Properties(py::wrapper::Windows::Storage::Search::IndexableContent* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IndexableContent", L"Properties"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Properties());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_IndexableContent(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::IndexableContent>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_IndexableContent(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::IndexableContent>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IndexableContent[] = {
        { "_assign_array_", _assign_array_IndexableContent, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IndexableContent), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IndexableContent[] = {
        { "stream_content_type", reinterpret_cast<getter>(IndexableContent_get_StreamContentType), reinterpret_cast<setter>(IndexableContent_put_StreamContentType), nullptr, nullptr },
        { "stream", reinterpret_cast<getter>(IndexableContent_get_Stream), reinterpret_cast<setter>(IndexableContent_put_Stream), nullptr, nullptr },
        { "id", reinterpret_cast<getter>(IndexableContent_get_Id), reinterpret_cast<setter>(IndexableContent_put_Id), nullptr, nullptr },
        { "properties", reinterpret_cast<getter>(IndexableContent_get_Properties), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_IndexableContent[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_IndexableContent) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IndexableContent) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IndexableContent) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IndexableContent) },
        { },
    };

    static PyType_Spec type_spec_IndexableContent =
    {
        "_winsdk_Windows_Storage_Search.IndexableContent",
        sizeof(py::wrapper::Windows::Storage::Search::IndexableContent),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IndexableContent
    };

    // ----- QueryOptions class --------------------
    static constexpr const char* const type_name_QueryOptions = "QueryOptions";

    static PyObject* _new_QueryOptions(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFileQuery>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 1);

                winrt::Windows::Storage::Search::QueryOptions instance{ param0, param1 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFolderQuery>(args, 0);

                winrt::Windows::Storage::Search::QueryOptions instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Storage::Search::QueryOptions instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_QueryOptions(py::wrapper::Windows::Storage::Search::QueryOptions* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* QueryOptions_LoadFromString(py::wrapper::Windows::Storage::Search::QueryOptions* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.QueryOptions", L"LoadFromString", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

                self->obj.LoadFromString(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* QueryOptions_SaveToString(py::wrapper::Windows::Storage::Search::QueryOptions* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.QueryOptions", L"SaveToString", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.SaveToString());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* QueryOptions_SetPropertyPrefetch(py::wrapper::Windows::Storage::Search::QueryOptions* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.QueryOptions", L"SetPropertyPrefetch", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::FileProperties::PropertyPrefetchOptions>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 1);

                self->obj.SetPropertyPrefetch(param0, param1);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* QueryOptions_SetThumbnailPrefetch(py::wrapper::Windows::Storage::Search::QueryOptions* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.QueryOptions", L"SetThumbnailPrefetch", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::FileProperties::ThumbnailMode>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Storage::FileProperties::ThumbnailOptions>(args, 2);

                self->obj.SetThumbnailPrefetch(param0, param1, param2);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* QueryOptions_get_UserSearchFilter(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"UserSearchFilter"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.UserSearchFilter());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int QueryOptions_put_UserSearchFilter(py::wrapper::Windows::Storage::Search::QueryOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"UserSearchFilter"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::hstring>(arg);

            self->obj.UserSearchFilter(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* QueryOptions_get_Language(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Language());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int QueryOptions_put_Language(py::wrapper::Windows::Storage::Search::QueryOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::hstring>(arg);

            self->obj.Language(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* QueryOptions_get_IndexerOption(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"IndexerOption"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.IndexerOption());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int QueryOptions_put_IndexerOption(py::wrapper::Windows::Storage::Search::QueryOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"IndexerOption"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Storage::Search::IndexerOption>(arg);

            self->obj.IndexerOption(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* QueryOptions_get_FolderDepth(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"FolderDepth"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.FolderDepth());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int QueryOptions_put_FolderDepth(py::wrapper::Windows::Storage::Search::QueryOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"FolderDepth"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Storage::Search::FolderDepth>(arg);

            self->obj.FolderDepth(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* QueryOptions_get_ApplicationSearchFilter(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"ApplicationSearchFilter"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.ApplicationSearchFilter());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int QueryOptions_put_ApplicationSearchFilter(py::wrapper::Windows::Storage::Search::QueryOptions* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"ApplicationSearchFilter"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::hstring>(arg);

            self->obj.ApplicationSearchFilter(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* QueryOptions_get_DateStackOption(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"DateStackOption"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.DateStackOption());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* QueryOptions_get_FileTypeFilter(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"FileTypeFilter"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.FileTypeFilter());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* QueryOptions_get_GroupPropertyName(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"GroupPropertyName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.GroupPropertyName());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* QueryOptions_get_SortOrder(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"SortOrder"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.SortOrder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* QueryOptions_get_StorageProviderIdFilter(py::wrapper::Windows::Storage::Search::QueryOptions* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.QueryOptions", L"StorageProviderIdFilter"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.StorageProviderIdFilter());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_QueryOptions(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::QueryOptions>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_QueryOptions(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::QueryOptions>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_QueryOptions[] = {
        { "load_from_string", reinterpret_cast<PyCFunction>(QueryOptions_LoadFromString), METH_VARARGS, nullptr },
        { "save_to_string", reinterpret_cast<PyCFunction>(QueryOptions_SaveToString), METH_VARARGS, nullptr },
        { "set_property_prefetch", reinterpret_cast<PyCFunction>(QueryOptions_SetPropertyPrefetch), METH_VARARGS, nullptr },
        { "set_thumbnail_prefetch", reinterpret_cast<PyCFunction>(QueryOptions_SetThumbnailPrefetch), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_QueryOptions, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_QueryOptions), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_QueryOptions[] = {
        { "user_search_filter", reinterpret_cast<getter>(QueryOptions_get_UserSearchFilter), reinterpret_cast<setter>(QueryOptions_put_UserSearchFilter), nullptr, nullptr },
        { "language", reinterpret_cast<getter>(QueryOptions_get_Language), reinterpret_cast<setter>(QueryOptions_put_Language), nullptr, nullptr },
        { "indexer_option", reinterpret_cast<getter>(QueryOptions_get_IndexerOption), reinterpret_cast<setter>(QueryOptions_put_IndexerOption), nullptr, nullptr },
        { "folder_depth", reinterpret_cast<getter>(QueryOptions_get_FolderDepth), reinterpret_cast<setter>(QueryOptions_put_FolderDepth), nullptr, nullptr },
        { "application_search_filter", reinterpret_cast<getter>(QueryOptions_get_ApplicationSearchFilter), reinterpret_cast<setter>(QueryOptions_put_ApplicationSearchFilter), nullptr, nullptr },
        { "date_stack_option", reinterpret_cast<getter>(QueryOptions_get_DateStackOption), nullptr, nullptr, nullptr },
        { "file_type_filter", reinterpret_cast<getter>(QueryOptions_get_FileTypeFilter), nullptr, nullptr, nullptr },
        { "group_property_name", reinterpret_cast<getter>(QueryOptions_get_GroupPropertyName), nullptr, nullptr, nullptr },
        { "sort_order", reinterpret_cast<getter>(QueryOptions_get_SortOrder), nullptr, nullptr, nullptr },
        { "storage_provider_id_filter", reinterpret_cast<getter>(QueryOptions_get_StorageProviderIdFilter), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_QueryOptions[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_QueryOptions) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_QueryOptions) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_QueryOptions) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_QueryOptions) },
        { },
    };

    static PyType_Spec type_spec_QueryOptions =
    {
        "_winsdk_Windows_Storage_Search.QueryOptions",
        sizeof(py::wrapper::Windows::Storage::Search::QueryOptions),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_QueryOptions
    };

    // ----- SortEntryVector class --------------------
    static constexpr const char* const type_name_SortEntryVector = "SortEntryVector";

    static PyObject* _new_SortEntryVector(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_SortEntryVector);
        return nullptr;
    }

    static void _dealloc_SortEntryVector(py::wrapper::Windows::Storage::Search::SortEntryVector* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* SortEntryVector_Append(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"Append", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::SortEntry>(args, 0);

                self->obj.Append(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_Clear(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"Clear", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Clear();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_First(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"First", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.First());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_GetAt(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"GetAt", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);

                return py::convert(self->obj.GetAt(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_GetMany(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"GetMany", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1 = py::convert_to<py::pybuf_view<winrt::Windows::Storage::Search::SortEntry, true>>(args, 1);

                return py::convert(self->obj.GetMany(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_GetView(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"GetView", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetView());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_IndexOf(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"IndexOf", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::SortEntry>(args, 0);
                uint32_t param1 {  };

                auto return_value = self->obj.IndexOf(param0, param1);

                py::pyobj_handle out_return_value{ py::convert(return_value) };
                if (!out_return_value)
                {
                    return nullptr;
                }
                py::pyobj_handle out1{ py::convert(param1) };
                if (!out1)
                {
                    return nullptr;
                }
                return PyTuple_Pack(2, out_return_value.get(), out1.get());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_InsertAt(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"InsertAt", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Storage::Search::SortEntry>(args, 1);

                self->obj.InsertAt(param0, param1);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_RemoveAt(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"RemoveAt", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);

                self->obj.RemoveAt(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_RemoveAtEnd(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"RemoveAtEnd", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.RemoveAtEnd();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_ReplaceAll(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"ReplaceAll", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<py::pybuf_view<winrt::Windows::Storage::Search::SortEntry, false>>(args, 0);

                self->obj.ReplaceAll(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_SetAt(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.SortEntryVector", L"SetAt", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Storage::Search::SortEntry>(args, 1);

                self->obj.SetAt(param0, param1);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SortEntryVector_get_Size(py::wrapper::Windows::Storage::Search::SortEntryVector* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.SortEntryVector", L"Size"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_SortEntryVector(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::SortEntryVector>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_SortEntryVector(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::SortEntryVector>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _iterator_SortEntryVector(py::wrapper::Windows::Storage::Search::SortEntryVector* self) noexcept
    {
        try
        {
            return py::convert(self->obj.First());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static Py_ssize_t _seq_length_SortEntryVector(py::wrapper::Windows::Storage::Search::SortEntryVector* self) noexcept
    {
        try
        {
            return static_cast<Py_ssize_t>(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _seq_item_SortEntryVector(py::wrapper::Windows::Storage::Search::SortEntryVector* self, Py_ssize_t i) noexcept
    {
        try
        {
            return py::convert(self->obj.GetAt(static_cast<uint32_t>(i)));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _seq_subscript_SortEntryVector(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* slice) noexcept
    {
        try
        {
            if (PyIndex_Check(slice))
            {
                pyobj_handle index{PyNumber_Index(slice)};

                if (!index)
                {
                    return nullptr;
                }

                auto i = PyNumber_AsSsize_t(index.get(), PyExc_IndexError);

                if (i == -1 && PyErr_Occurred())
                {
                    return nullptr;
                }

                return _seq_item_SortEntryVector(self, i);
            }

            if (!PySlice_Check(slice))
            {
                PyErr_Format(
                    PyExc_TypeError,
                    "indicies must be integers, not '%s'",
                    Py_TYPE(slice)->tp_name);
            }

            Py_ssize_t start, stop, step, length;

            if (PySlice_GetIndicesEx(
                    slice, self->obj.Size(), &start, &stop, &step, &length)
                < 0)
            {
                return nullptr;
            }

            if (step != 1)
            {
                PyErr_SetString(
                    PyExc_NotImplementedError,
                    "slices with step other than 1 are not implemented");
                return nullptr;
            }

            winrt::com_array<winrt::Windows::Storage::Search::SortEntry> items(length, empty_instance<winrt::Windows::Storage::Search::SortEntry>::get());

            auto count = self->obj.GetMany(start, items);

            if (count != length)
            {
                PyErr_Format(
                    PyExc_RuntimeError,
                    "returned count %d did not match requested length %zd",
                    count,
                    length);
                return nullptr;
            }

            return convert(items);}
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int _seq_assign_SortEntryVector(py::wrapper::Windows::Storage::Search::SortEntryVector* self, Py_ssize_t i, PyObject* value) noexcept
    {
        try
        {
            if (value == nullptr) { self->obj.RemoveAt(static_cast<uint32_t>(i)); }
            else { self->obj.SetAt(static_cast<uint32_t>(i), py::convert_to<winrt::Windows::Storage::Search::SortEntry>(value)); }
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* SortEntryVector_get_insert(PyObject* self) noexcept
    {
        return PyObject_GetAttrString(self, "insert_at");
    }

    static PyMethodDef _methods_SortEntryVector[] = {
        { "append", reinterpret_cast<PyCFunction>(SortEntryVector_Append), METH_VARARGS, nullptr },
        { "clear", reinterpret_cast<PyCFunction>(SortEntryVector_Clear), METH_VARARGS, nullptr },
        { "first", reinterpret_cast<PyCFunction>(SortEntryVector_First), METH_VARARGS, nullptr },
        { "get_at", reinterpret_cast<PyCFunction>(SortEntryVector_GetAt), METH_VARARGS, nullptr },
        { "get_many", reinterpret_cast<PyCFunction>(SortEntryVector_GetMany), METH_VARARGS, nullptr },
        { "get_view", reinterpret_cast<PyCFunction>(SortEntryVector_GetView), METH_VARARGS, nullptr },
        { "index_of", reinterpret_cast<PyCFunction>(SortEntryVector_IndexOf), METH_VARARGS, nullptr },
        { "insert_at", reinterpret_cast<PyCFunction>(SortEntryVector_InsertAt), METH_VARARGS, nullptr },
        { "remove_at", reinterpret_cast<PyCFunction>(SortEntryVector_RemoveAt), METH_VARARGS, nullptr },
        { "remove_at_end", reinterpret_cast<PyCFunction>(SortEntryVector_RemoveAtEnd), METH_VARARGS, nullptr },
        { "replace_all", reinterpret_cast<PyCFunction>(SortEntryVector_ReplaceAll), METH_VARARGS, nullptr },
        { "set_at", reinterpret_cast<PyCFunction>(SortEntryVector_SetAt), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_SortEntryVector, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_SortEntryVector), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_SortEntryVector[] = {
        { "size", reinterpret_cast<getter>(SortEntryVector_get_Size), nullptr, nullptr, nullptr },
        { "insert", reinterpret_cast<getter>(SortEntryVector_get_insert), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_SortEntryVector[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_SortEntryVector) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SortEntryVector) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_SortEntryVector) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SortEntryVector) },
        { Py_tp_iter, reinterpret_cast<void*>(_iterator_SortEntryVector) },
        { Py_sq_length, reinterpret_cast<void*>(_seq_length_SortEntryVector) },
        { Py_sq_item, reinterpret_cast<void*>(_seq_item_SortEntryVector) },
        { Py_mp_subscript, reinterpret_cast<void*>(_seq_subscript_SortEntryVector) },
        { Py_sq_ass_item, reinterpret_cast<void*>(_seq_assign_SortEntryVector) },
        { },
    };

    static PyType_Spec type_spec_SortEntryVector =
    {
        "_winsdk_Windows_Storage_Search.SortEntryVector",
        sizeof(py::wrapper::Windows::Storage::Search::SortEntryVector),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SortEntryVector
    };

    // ----- StorageFileQueryResult class --------------------
    static constexpr const char* const type_name_StorageFileQueryResult = "StorageFileQueryResult";

    static PyObject* _new_StorageFileQueryResult(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_StorageFileQueryResult);
        return nullptr;
    }

    static void _dealloc_StorageFileQueryResult(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* StorageFileQueryResult_ApplyNewQueryOptions(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"ApplyNewQueryOptions", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::QueryOptions>(args, 0);

                self->obj.ApplyNewQueryOptions(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_FindStartIndexAsync(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"FindStartIndexAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 0);

                return py::convert(self->obj.FindStartIndexAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_GetCurrentQueryOptions(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"GetCurrentQueryOptions", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetCurrentQueryOptions());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_GetFilesAsync(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"GetFilesAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetFilesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"GetFilesAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);

                return py::convert(self->obj.GetFilesAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_GetItemCountAsync(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"GetItemCountAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetItemCountAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_GetMatchingPropertiesWithRanges(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"GetMatchingPropertiesWithRanges", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::StorageFile>(args, 0);

                return py::convert(self->obj.GetMatchingPropertiesWithRanges(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_get_Folder(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"Folder"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Folder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_add_ContentsChanged(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"ContentsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Storage::Search::IStorageQueryResultBase, winrt::Windows::Foundation::IInspectable>>(arg);

            return py::convert(self->obj.ContentsChanged(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_remove_ContentsChanged(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"ContentsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.ContentsChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_add_OptionsChanged(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"OptionsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Storage::Search::IStorageQueryResultBase, winrt::Windows::Foundation::IInspectable>>(arg);

            return py::convert(self->obj.OptionsChanged(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageFileQueryResult_remove_OptionsChanged(py::wrapper::Windows::Storage::Search::StorageFileQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageFileQueryResult", L"OptionsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.OptionsChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_StorageFileQueryResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::StorageFileQueryResult>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_StorageFileQueryResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::StorageFileQueryResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_StorageFileQueryResult[] = {
        { "apply_new_query_options", reinterpret_cast<PyCFunction>(StorageFileQueryResult_ApplyNewQueryOptions), METH_VARARGS, nullptr },
        { "find_start_index_async", reinterpret_cast<PyCFunction>(StorageFileQueryResult_FindStartIndexAsync), METH_VARARGS, nullptr },
        { "get_current_query_options", reinterpret_cast<PyCFunction>(StorageFileQueryResult_GetCurrentQueryOptions), METH_VARARGS, nullptr },
        { "get_files_async", reinterpret_cast<PyCFunction>(StorageFileQueryResult_GetFilesAsync), METH_VARARGS, nullptr },
        { "get_item_count_async", reinterpret_cast<PyCFunction>(StorageFileQueryResult_GetItemCountAsync), METH_VARARGS, nullptr },
        { "get_matching_properties_with_ranges", reinterpret_cast<PyCFunction>(StorageFileQueryResult_GetMatchingPropertiesWithRanges), METH_VARARGS, nullptr },
        { "add_contents_changed", reinterpret_cast<PyCFunction>(StorageFileQueryResult_add_ContentsChanged), METH_O, nullptr },
        { "remove_contents_changed", reinterpret_cast<PyCFunction>(StorageFileQueryResult_remove_ContentsChanged), METH_O, nullptr },
        { "add_options_changed", reinterpret_cast<PyCFunction>(StorageFileQueryResult_add_OptionsChanged), METH_O, nullptr },
        { "remove_options_changed", reinterpret_cast<PyCFunction>(StorageFileQueryResult_remove_OptionsChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_StorageFileQueryResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_StorageFileQueryResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_StorageFileQueryResult[] = {
        { "folder", reinterpret_cast<getter>(StorageFileQueryResult_get_Folder), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_StorageFileQueryResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_StorageFileQueryResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_StorageFileQueryResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_StorageFileQueryResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_StorageFileQueryResult) },
        { },
    };

    static PyType_Spec type_spec_StorageFileQueryResult =
    {
        "_winsdk_Windows_Storage_Search.StorageFileQueryResult",
        sizeof(py::wrapper::Windows::Storage::Search::StorageFileQueryResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_StorageFileQueryResult
    };

    // ----- StorageFolderQueryResult class --------------------
    static constexpr const char* const type_name_StorageFolderQueryResult = "StorageFolderQueryResult";

    static PyObject* _new_StorageFolderQueryResult(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_StorageFolderQueryResult);
        return nullptr;
    }

    static void _dealloc_StorageFolderQueryResult(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* StorageFolderQueryResult_ApplyNewQueryOptions(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"ApplyNewQueryOptions", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::QueryOptions>(args, 0);

                self->obj.ApplyNewQueryOptions(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFolderQueryResult_FindStartIndexAsync(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"FindStartIndexAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 0);

                return py::convert(self->obj.FindStartIndexAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFolderQueryResult_GetCurrentQueryOptions(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"GetCurrentQueryOptions", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetCurrentQueryOptions());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFolderQueryResult_GetFoldersAsync(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"GetFoldersAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetFoldersAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"GetFoldersAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);

                return py::convert(self->obj.GetFoldersAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFolderQueryResult_GetItemCountAsync(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"GetItemCountAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetItemCountAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageFolderQueryResult_get_Folder(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"Folder"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Folder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageFolderQueryResult_add_ContentsChanged(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"ContentsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Storage::Search::IStorageQueryResultBase, winrt::Windows::Foundation::IInspectable>>(arg);

            return py::convert(self->obj.ContentsChanged(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageFolderQueryResult_remove_ContentsChanged(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"ContentsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.ContentsChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageFolderQueryResult_add_OptionsChanged(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"OptionsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Storage::Search::IStorageQueryResultBase, winrt::Windows::Foundation::IInspectable>>(arg);

            return py::convert(self->obj.OptionsChanged(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageFolderQueryResult_remove_OptionsChanged(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageFolderQueryResult", L"OptionsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.OptionsChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_StorageFolderQueryResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::StorageFolderQueryResult>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_StorageFolderQueryResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::StorageFolderQueryResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_StorageFolderQueryResult[] = {
        { "apply_new_query_options", reinterpret_cast<PyCFunction>(StorageFolderQueryResult_ApplyNewQueryOptions), METH_VARARGS, nullptr },
        { "find_start_index_async", reinterpret_cast<PyCFunction>(StorageFolderQueryResult_FindStartIndexAsync), METH_VARARGS, nullptr },
        { "get_current_query_options", reinterpret_cast<PyCFunction>(StorageFolderQueryResult_GetCurrentQueryOptions), METH_VARARGS, nullptr },
        { "get_folders_async", reinterpret_cast<PyCFunction>(StorageFolderQueryResult_GetFoldersAsync), METH_VARARGS, nullptr },
        { "get_item_count_async", reinterpret_cast<PyCFunction>(StorageFolderQueryResult_GetItemCountAsync), METH_VARARGS, nullptr },
        { "add_contents_changed", reinterpret_cast<PyCFunction>(StorageFolderQueryResult_add_ContentsChanged), METH_O, nullptr },
        { "remove_contents_changed", reinterpret_cast<PyCFunction>(StorageFolderQueryResult_remove_ContentsChanged), METH_O, nullptr },
        { "add_options_changed", reinterpret_cast<PyCFunction>(StorageFolderQueryResult_add_OptionsChanged), METH_O, nullptr },
        { "remove_options_changed", reinterpret_cast<PyCFunction>(StorageFolderQueryResult_remove_OptionsChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_StorageFolderQueryResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_StorageFolderQueryResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_StorageFolderQueryResult[] = {
        { "folder", reinterpret_cast<getter>(StorageFolderQueryResult_get_Folder), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_StorageFolderQueryResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_StorageFolderQueryResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_StorageFolderQueryResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_StorageFolderQueryResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_StorageFolderQueryResult) },
        { },
    };

    static PyType_Spec type_spec_StorageFolderQueryResult =
    {
        "_winsdk_Windows_Storage_Search.StorageFolderQueryResult",
        sizeof(py::wrapper::Windows::Storage::Search::StorageFolderQueryResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_StorageFolderQueryResult
    };

    // ----- StorageItemQueryResult class --------------------
    static constexpr const char* const type_name_StorageItemQueryResult = "StorageItemQueryResult";

    static PyObject* _new_StorageItemQueryResult(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_StorageItemQueryResult);
        return nullptr;
    }

    static void _dealloc_StorageItemQueryResult(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* StorageItemQueryResult_ApplyNewQueryOptions(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"ApplyNewQueryOptions", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::QueryOptions>(args, 0);

                self->obj.ApplyNewQueryOptions(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageItemQueryResult_FindStartIndexAsync(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"FindStartIndexAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 0);

                return py::convert(self->obj.FindStartIndexAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageItemQueryResult_GetCurrentQueryOptions(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"GetCurrentQueryOptions", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetCurrentQueryOptions());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageItemQueryResult_GetItemCountAsync(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"GetItemCountAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetItemCountAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageItemQueryResult_GetItemsAsync(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"GetItemsAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetItemsAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"GetItemsAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);

                return py::convert(self->obj.GetItemsAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageItemQueryResult_get_Folder(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"Folder"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Folder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageItemQueryResult_add_ContentsChanged(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"ContentsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Storage::Search::IStorageQueryResultBase, winrt::Windows::Foundation::IInspectable>>(arg);

            return py::convert(self->obj.ContentsChanged(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageItemQueryResult_remove_ContentsChanged(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"ContentsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.ContentsChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageItemQueryResult_add_OptionsChanged(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"OptionsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Storage::Search::IStorageQueryResultBase, winrt::Windows::Foundation::IInspectable>>(arg);

            return py::convert(self->obj.OptionsChanged(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageItemQueryResult_remove_OptionsChanged(py::wrapper::Windows::Storage::Search::StorageItemQueryResult* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.StorageItemQueryResult", L"OptionsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.OptionsChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_StorageItemQueryResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::StorageItemQueryResult>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_StorageItemQueryResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::StorageItemQueryResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_StorageItemQueryResult[] = {
        { "apply_new_query_options", reinterpret_cast<PyCFunction>(StorageItemQueryResult_ApplyNewQueryOptions), METH_VARARGS, nullptr },
        { "find_start_index_async", reinterpret_cast<PyCFunction>(StorageItemQueryResult_FindStartIndexAsync), METH_VARARGS, nullptr },
        { "get_current_query_options", reinterpret_cast<PyCFunction>(StorageItemQueryResult_GetCurrentQueryOptions), METH_VARARGS, nullptr },
        { "get_item_count_async", reinterpret_cast<PyCFunction>(StorageItemQueryResult_GetItemCountAsync), METH_VARARGS, nullptr },
        { "get_items_async", reinterpret_cast<PyCFunction>(StorageItemQueryResult_GetItemsAsync), METH_VARARGS, nullptr },
        { "add_contents_changed", reinterpret_cast<PyCFunction>(StorageItemQueryResult_add_ContentsChanged), METH_O, nullptr },
        { "remove_contents_changed", reinterpret_cast<PyCFunction>(StorageItemQueryResult_remove_ContentsChanged), METH_O, nullptr },
        { "add_options_changed", reinterpret_cast<PyCFunction>(StorageItemQueryResult_add_OptionsChanged), METH_O, nullptr },
        { "remove_options_changed", reinterpret_cast<PyCFunction>(StorageItemQueryResult_remove_OptionsChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_StorageItemQueryResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_StorageItemQueryResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_StorageItemQueryResult[] = {
        { "folder", reinterpret_cast<getter>(StorageItemQueryResult_get_Folder), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_StorageItemQueryResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_StorageItemQueryResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_StorageItemQueryResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_StorageItemQueryResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_StorageItemQueryResult) },
        { },
    };

    static PyType_Spec type_spec_StorageItemQueryResult =
    {
        "_winsdk_Windows_Storage_Search.StorageItemQueryResult",
        sizeof(py::wrapper::Windows::Storage::Search::StorageItemQueryResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_StorageItemQueryResult
    };

    // ----- StorageLibraryChangeTrackerTriggerDetails class --------------------
    static constexpr const char* const type_name_StorageLibraryChangeTrackerTriggerDetails = "StorageLibraryChangeTrackerTriggerDetails";

    static PyObject* _new_StorageLibraryChangeTrackerTriggerDetails(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_StorageLibraryChangeTrackerTriggerDetails);
        return nullptr;
    }

    static void _dealloc_StorageLibraryChangeTrackerTriggerDetails(py::wrapper::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* StorageLibraryChangeTrackerTriggerDetails_get_ChangeTracker(py::wrapper::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.StorageLibraryChangeTrackerTriggerDetails", L"ChangeTracker"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.ChangeTracker());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StorageLibraryChangeTrackerTriggerDetails_get_Folder(py::wrapper::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.StorageLibraryChangeTrackerTriggerDetails", L"Folder"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Folder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_StorageLibraryChangeTrackerTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_StorageLibraryChangeTrackerTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_StorageLibraryChangeTrackerTriggerDetails[] = {
        { "_assign_array_", _assign_array_StorageLibraryChangeTrackerTriggerDetails, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_StorageLibraryChangeTrackerTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_StorageLibraryChangeTrackerTriggerDetails[] = {
        { "change_tracker", reinterpret_cast<getter>(StorageLibraryChangeTrackerTriggerDetails_get_ChangeTracker), nullptr, nullptr, nullptr },
        { "folder", reinterpret_cast<getter>(StorageLibraryChangeTrackerTriggerDetails_get_Folder), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_StorageLibraryChangeTrackerTriggerDetails[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_StorageLibraryChangeTrackerTriggerDetails) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_StorageLibraryChangeTrackerTriggerDetails) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_StorageLibraryChangeTrackerTriggerDetails) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_StorageLibraryChangeTrackerTriggerDetails) },
        { },
    };

    static PyType_Spec type_spec_StorageLibraryChangeTrackerTriggerDetails =
    {
        "_winsdk_Windows_Storage_Search.StorageLibraryChangeTrackerTriggerDetails",
        sizeof(py::wrapper::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_StorageLibraryChangeTrackerTriggerDetails
    };

    // ----- StorageLibraryContentChangedTriggerDetails class --------------------
    static constexpr const char* const type_name_StorageLibraryContentChangedTriggerDetails = "StorageLibraryContentChangedTriggerDetails";

    static PyObject* _new_StorageLibraryContentChangedTriggerDetails(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_StorageLibraryContentChangedTriggerDetails);
        return nullptr;
    }

    static void _dealloc_StorageLibraryContentChangedTriggerDetails(py::wrapper::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* StorageLibraryContentChangedTriggerDetails_CreateModifiedSinceQuery(py::wrapper::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.StorageLibraryContentChangedTriggerDetails", L"CreateModifiedSinceQuery", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::DateTime>(args, 0);

                return py::convert(self->obj.CreateModifiedSinceQuery(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StorageLibraryContentChangedTriggerDetails_get_Folder(py::wrapper::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.StorageLibraryContentChangedTriggerDetails", L"Folder"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Folder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_StorageLibraryContentChangedTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_StorageLibraryContentChangedTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_StorageLibraryContentChangedTriggerDetails[] = {
        { "create_modified_since_query", reinterpret_cast<PyCFunction>(StorageLibraryContentChangedTriggerDetails_CreateModifiedSinceQuery), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_StorageLibraryContentChangedTriggerDetails, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_StorageLibraryContentChangedTriggerDetails), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_StorageLibraryContentChangedTriggerDetails[] = {
        { "folder", reinterpret_cast<getter>(StorageLibraryContentChangedTriggerDetails_get_Folder), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_StorageLibraryContentChangedTriggerDetails[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_StorageLibraryContentChangedTriggerDetails) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_StorageLibraryContentChangedTriggerDetails) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_StorageLibraryContentChangedTriggerDetails) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_StorageLibraryContentChangedTriggerDetails) },
        { },
    };

    static PyType_Spec type_spec_StorageLibraryContentChangedTriggerDetails =
    {
        "_winsdk_Windows_Storage_Search.StorageLibraryContentChangedTriggerDetails",
        sizeof(py::wrapper::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_StorageLibraryContentChangedTriggerDetails
    };

    // ----- ValueAndLanguage class --------------------
    static constexpr const char* const type_name_ValueAndLanguage = "ValueAndLanguage";

    static PyObject* _new_ValueAndLanguage(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        if (kwds != nullptr)
        {
            py::set_invalid_kwd_args_error();
            return nullptr;
        }

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Storage::Search::ValueAndLanguage instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_ValueAndLanguage(py::wrapper::Windows::Storage::Search::ValueAndLanguage* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* ValueAndLanguage_get_Value(py::wrapper::Windows::Storage::Search::ValueAndLanguage* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.ValueAndLanguage", L"Value"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Value());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int ValueAndLanguage_put_Value(py::wrapper::Windows::Storage::Search::ValueAndLanguage* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.ValueAndLanguage", L"Value"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);

            self->obj.Value(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* ValueAndLanguage_get_Language(py::wrapper::Windows::Storage::Search::ValueAndLanguage* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.ValueAndLanguage", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Language());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int ValueAndLanguage_put_Language(py::wrapper::Windows::Storage::Search::ValueAndLanguage* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.ValueAndLanguage", L"Language"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::hstring>(arg);

            self->obj.Language(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _assign_array_ValueAndLanguage(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::ValueAndLanguage>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ValueAndLanguage(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::ValueAndLanguage>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ValueAndLanguage[] = {
        { "_assign_array_", _assign_array_ValueAndLanguage, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ValueAndLanguage), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ValueAndLanguage[] = {
        { "value", reinterpret_cast<getter>(ValueAndLanguage_get_Value), reinterpret_cast<setter>(ValueAndLanguage_put_Value), nullptr, nullptr },
        { "language", reinterpret_cast<getter>(ValueAndLanguage_get_Language), reinterpret_cast<setter>(ValueAndLanguage_put_Language), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ValueAndLanguage[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ValueAndLanguage) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ValueAndLanguage) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ValueAndLanguage) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ValueAndLanguage) },
        { },
    };

    static PyType_Spec type_spec_ValueAndLanguage =
    {
        "_winsdk_Windows_Storage_Search.ValueAndLanguage",
        sizeof(py::wrapper::Windows::Storage::Search::ValueAndLanguage),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ValueAndLanguage
    };

    // ----- IIndexableContent interface --------------------
    static constexpr const char* const type_name_IIndexableContent = "IIndexableContent";

    static PyObject* _new_IIndexableContent(PyTypeObject* /* unused */, PyObject* /* unused */, PyObject* /* unused */) noexcept
    {
        py::set_invalid_activation_error(type_name_IIndexableContent);
        return nullptr;
    }

    static void _dealloc_IIndexableContent(py::wrapper::Windows::Storage::Search::IIndexableContent* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IIndexableContent_get_Id(py::wrapper::Windows::Storage::Search::IIndexableContent* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IIndexableContent", L"Id"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Id());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int IIndexableContent_put_Id(py::wrapper::Windows::Storage::Search::IIndexableContent* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IIndexableContent", L"Id"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::hstring>(arg);

            self->obj.Id(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* IIndexableContent_get_Properties(py::wrapper::Windows::Storage::Search::IIndexableContent* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IIndexableContent", L"Properties"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Properties());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IIndexableContent_get_Stream(py::wrapper::Windows::Storage::Search::IIndexableContent* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IIndexableContent", L"Stream"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Stream());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int IIndexableContent_put_Stream(py::wrapper::Windows::Storage::Search::IIndexableContent* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IIndexableContent", L"Stream"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IRandomAccessStream>(arg);

            self->obj.Stream(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* IIndexableContent_get_StreamContentType(py::wrapper::Windows::Storage::Search::IIndexableContent* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IIndexableContent", L"StreamContentType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.StreamContentType());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int IIndexableContent_put_StreamContentType(py::wrapper::Windows::Storage::Search::IIndexableContent* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IIndexableContent", L"StreamContentType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            auto param0 = py::convert_to<winrt::hstring>(arg);

            self->obj.StreamContentType(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _assign_array_IIndexableContent(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::IIndexableContent>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_IIndexableContent(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::IIndexableContent>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IIndexableContent[] = {
        { "_assign_array_", _assign_array_IIndexableContent, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IIndexableContent), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IIndexableContent[] = {
        { "id", reinterpret_cast<getter>(IIndexableContent_get_Id), reinterpret_cast<setter>(IIndexableContent_put_Id), nullptr, nullptr },
        { "properties", reinterpret_cast<getter>(IIndexableContent_get_Properties), nullptr, nullptr, nullptr },
        { "stream", reinterpret_cast<getter>(IIndexableContent_get_Stream), reinterpret_cast<setter>(IIndexableContent_put_Stream), nullptr, nullptr },
        { "stream_content_type", reinterpret_cast<getter>(IIndexableContent_get_StreamContentType), reinterpret_cast<setter>(IIndexableContent_put_StreamContentType), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_IIndexableContent[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_IIndexableContent) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IIndexableContent) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IIndexableContent) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IIndexableContent) },
        { },
    };

    static PyType_Spec type_spec_IIndexableContent =
    {
        "_winsdk_Windows_Storage_Search.IIndexableContent",
        sizeof(py::wrapper::Windows::Storage::Search::IIndexableContent),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IIndexableContent
    };

    // ----- IStorageFolderQueryOperations interface --------------------
    static constexpr const char* const type_name_IStorageFolderQueryOperations = "IStorageFolderQueryOperations";

    static PyObject* _new_IStorageFolderQueryOperations(PyTypeObject* /* unused */, PyObject* /* unused */, PyObject* /* unused */) noexcept
    {
        py::set_invalid_activation_error(type_name_IStorageFolderQueryOperations);
        return nullptr;
    }

    static void _dealloc_IStorageFolderQueryOperations(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IStorageFolderQueryOperations_AreQueryOptionsSupported(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"AreQueryOptionsSupported", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::QueryOptions>(args, 0);

                return py::convert(self->obj.AreQueryOptionsSupported(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_CreateFileQuery(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"CreateFileQuery", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.CreateFileQuery());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"CreateFileQuery", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFileQuery>(args, 0);

                return py::convert(self->obj.CreateFileQuery(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_CreateFileQueryWithOptions(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"CreateFileQueryWithOptions", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::QueryOptions>(args, 0);

                return py::convert(self->obj.CreateFileQueryWithOptions(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_CreateFolderQuery(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"CreateFolderQuery", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.CreateFolderQuery());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"CreateFolderQuery", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFolderQuery>(args, 0);

                return py::convert(self->obj.CreateFolderQuery(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_CreateFolderQueryWithOptions(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"CreateFolderQueryWithOptions", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::QueryOptions>(args, 0);

                return py::convert(self->obj.CreateFolderQueryWithOptions(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_CreateItemQuery(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"CreateItemQuery", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.CreateItemQuery());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_CreateItemQueryWithOptions(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"CreateItemQueryWithOptions", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::QueryOptions>(args, 0);

                return py::convert(self->obj.CreateItemQueryWithOptions(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_GetFilesAsync(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"GetFilesAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFileQuery>(args, 0);

                return py::convert(self->obj.GetFilesAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"GetFilesAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFileQuery>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);
                auto param2 = py::convert_to<uint32_t>(args, 2);

                return py::convert(self->obj.GetFilesAsync(param0, param1, param2));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_GetFoldersAsync(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"GetFoldersAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFolderQuery>(args, 0);

                return py::convert(self->obj.GetFoldersAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"GetFoldersAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFolderQuery>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);
                auto param2 = py::convert_to<uint32_t>(args, 2);

                return py::convert(self->obj.GetFoldersAsync(param0, param1, param2));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_GetIndexedStateAsync(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"GetIndexedStateAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetIndexedStateAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_GetItemsAsync(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"GetItemsAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);

                return py::convert(self->obj.GetItemsAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_IsCommonFileQuerySupported(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"IsCommonFileQuerySupported", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFileQuery>(args, 0);

                return py::convert(self->obj.IsCommonFileQuerySupported(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageFolderQueryOperations_IsCommonFolderQuerySupported(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageFolderQueryOperations", L"IsCommonFolderQuerySupported", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::CommonFolderQuery>(args, 0);

                return py::convert(self->obj.IsCommonFolderQuerySupported(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* _assign_array_IStorageFolderQueryOperations(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::IStorageFolderQueryOperations>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_IStorageFolderQueryOperations(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::IStorageFolderQueryOperations>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IStorageFolderQueryOperations[] = {
        { "are_query_options_supported", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_AreQueryOptionsSupported), METH_VARARGS, nullptr },
        { "create_file_query", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_CreateFileQuery), METH_VARARGS, nullptr },
        { "create_file_query_with_options", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_CreateFileQueryWithOptions), METH_VARARGS, nullptr },
        { "create_folder_query", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_CreateFolderQuery), METH_VARARGS, nullptr },
        { "create_folder_query_with_options", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_CreateFolderQueryWithOptions), METH_VARARGS, nullptr },
        { "create_item_query", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_CreateItemQuery), METH_VARARGS, nullptr },
        { "create_item_query_with_options", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_CreateItemQueryWithOptions), METH_VARARGS, nullptr },
        { "get_files_async", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_GetFilesAsync), METH_VARARGS, nullptr },
        { "get_folders_async", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_GetFoldersAsync), METH_VARARGS, nullptr },
        { "get_indexed_state_async", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_GetIndexedStateAsync), METH_VARARGS, nullptr },
        { "get_items_async", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_GetItemsAsync), METH_VARARGS, nullptr },
        { "is_common_file_query_supported", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_IsCommonFileQuerySupported), METH_VARARGS, nullptr },
        { "is_common_folder_query_supported", reinterpret_cast<PyCFunction>(IStorageFolderQueryOperations_IsCommonFolderQuerySupported), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_IStorageFolderQueryOperations, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IStorageFolderQueryOperations), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IStorageFolderQueryOperations[] = {
        { }
    };

    static PyType_Slot _type_slots_IStorageFolderQueryOperations[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_IStorageFolderQueryOperations) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IStorageFolderQueryOperations) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IStorageFolderQueryOperations) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IStorageFolderQueryOperations) },
        { },
    };

    static PyType_Spec type_spec_IStorageFolderQueryOperations =
    {
        "_winsdk_Windows_Storage_Search.IStorageFolderQueryOperations",
        sizeof(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IStorageFolderQueryOperations
    };

    // ----- IStorageQueryResultBase interface --------------------
    static constexpr const char* const type_name_IStorageQueryResultBase = "IStorageQueryResultBase";

    static PyObject* _new_IStorageQueryResultBase(PyTypeObject* /* unused */, PyObject* /* unused */, PyObject* /* unused */) noexcept
    {
        py::set_invalid_activation_error(type_name_IStorageQueryResultBase);
        return nullptr;
    }

    static void _dealloc_IStorageQueryResultBase(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IStorageQueryResultBase_ApplyNewQueryOptions(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageQueryResultBase", L"ApplyNewQueryOptions", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Storage::Search::QueryOptions>(args, 0);

                self->obj.ApplyNewQueryOptions(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageQueryResultBase_FindStartIndexAsync(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageQueryResultBase", L"FindStartIndexAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 0);

                return py::convert(self->obj.FindStartIndexAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageQueryResultBase_GetCurrentQueryOptions(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageQueryResultBase", L"GetCurrentQueryOptions", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetCurrentQueryOptions());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageQueryResultBase_GetItemCountAsync(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Storage.Search.IStorageQueryResultBase", L"GetItemCountAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.GetItemCountAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IStorageQueryResultBase_get_Folder(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Storage.Search.IStorageQueryResultBase", L"Folder"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Folder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IStorageQueryResultBase_add_ContentsChanged(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.IStorageQueryResultBase", L"ContentsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Storage::Search::IStorageQueryResultBase, winrt::Windows::Foundation::IInspectable>>(arg);

            return py::convert(self->obj.ContentsChanged(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IStorageQueryResultBase_remove_ContentsChanged(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.IStorageQueryResultBase", L"ContentsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.ContentsChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IStorageQueryResultBase_add_OptionsChanged(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.IStorageQueryResultBase", L"OptionsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Storage::Search::IStorageQueryResultBase, winrt::Windows::Foundation::IInspectable>>(arg);

            return py::convert(self->obj.OptionsChanged(param0));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IStorageQueryResultBase_remove_OptionsChanged(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Storage.Search.IStorageQueryResultBase", L"OptionsChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

            self->obj.OptionsChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_IStorageQueryResultBase(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Storage::Search::IStorageQueryResultBase>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_IStorageQueryResultBase(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Storage::Search::IStorageQueryResultBase>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IStorageQueryResultBase[] = {
        { "apply_new_query_options", reinterpret_cast<PyCFunction>(IStorageQueryResultBase_ApplyNewQueryOptions), METH_VARARGS, nullptr },
        { "find_start_index_async", reinterpret_cast<PyCFunction>(IStorageQueryResultBase_FindStartIndexAsync), METH_VARARGS, nullptr },
        { "get_current_query_options", reinterpret_cast<PyCFunction>(IStorageQueryResultBase_GetCurrentQueryOptions), METH_VARARGS, nullptr },
        { "get_item_count_async", reinterpret_cast<PyCFunction>(IStorageQueryResultBase_GetItemCountAsync), METH_VARARGS, nullptr },
        { "add_contents_changed", reinterpret_cast<PyCFunction>(IStorageQueryResultBase_add_ContentsChanged), METH_O, nullptr },
        { "remove_contents_changed", reinterpret_cast<PyCFunction>(IStorageQueryResultBase_remove_ContentsChanged), METH_O, nullptr },
        { "add_options_changed", reinterpret_cast<PyCFunction>(IStorageQueryResultBase_add_OptionsChanged), METH_O, nullptr },
        { "remove_options_changed", reinterpret_cast<PyCFunction>(IStorageQueryResultBase_remove_OptionsChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_IStorageQueryResultBase, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IStorageQueryResultBase), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IStorageQueryResultBase[] = {
        { "folder", reinterpret_cast<getter>(IStorageQueryResultBase_get_Folder), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_IStorageQueryResultBase[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_IStorageQueryResultBase) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IStorageQueryResultBase) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IStorageQueryResultBase) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IStorageQueryResultBase) },
        { },
    };

    static PyType_Spec type_spec_IStorageQueryResultBase =
    {
        "_winsdk_Windows_Storage_Search.IStorageQueryResultBase",
        sizeof(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IStorageQueryResultBase
    };

    // ----- SortEntry struct --------------------
    static constexpr const char* const type_name_SortEntry = "SortEntry";

    PyObject* _new_SortEntry(PyTypeObject* type, PyObject* args, PyObject* kwds)
    {
        auto tuple_size = PyTuple_Size(args);

        if ((tuple_size == 0) && (kwds == nullptr))
        {
            try
            {
                winrt::Windows::Storage::Search::SortEntry return_value{};
                return py::convert(return_value);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }

        winrt::hstring _PropertyName{};
        bool _AscendingOrder{};

        static const char* kwlist[] = {"property_name", "ascending_order", nullptr};
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "up", const_cast<char**>(kwlist), &_PropertyName, &_AscendingOrder))
        {
            return nullptr;
        }

        try
        {
            winrt::Windows::Storage::Search::SortEntry return_value{ _PropertyName, _AscendingOrder };
            return py::convert(return_value);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static void _dealloc_SortEntry(py::wrapper::Windows::Storage::Search::SortEntry* self) noexcept
    {
    }

    static PyObject* SortEntry_get_PropertyName(py::wrapper::Windows::Storage::Search::SortEntry* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.PropertyName);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int SortEntry_set_PropertyName(py::wrapper::Windows::Storage::Search::SortEntry* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.PropertyName = py::converter<winrt::hstring>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* SortEntry_get_AscendingOrder(py::wrapper::Windows::Storage::Search::SortEntry* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.AscendingOrder);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int SortEntry_set_AscendingOrder(py::wrapper::Windows::Storage::Search::SortEntry* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.AscendingOrder = py::converter<bool>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyGetSetDef _getset_SortEntry[] = {
        { "property_name", reinterpret_cast<getter>(SortEntry_get_PropertyName), reinterpret_cast<setter>(SortEntry_set_PropertyName), nullptr, nullptr },
        { "ascending_order", reinterpret_cast<getter>(SortEntry_get_AscendingOrder), reinterpret_cast<setter>(SortEntry_set_AscendingOrder), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_SortEntry[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_SortEntry) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SortEntry) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SortEntry) },
        { },
    };

    static PyType_Spec type_spec_SortEntry =
    {
        "_winsdk_Windows_Storage_Search.SortEntry",
        sizeof(py::wrapper::Windows::Storage::Search::SortEntry),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SortEntry
    };

    // ----- Windows.Storage.Search Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Storage::Search");

    static PyMethodDef module_methods[] = {
        {"_register_CommonFileQuery", register_CommonFileQuery, METH_O, "registers type"},
        {"_register_CommonFolderQuery", register_CommonFolderQuery, METH_O, "registers type"},
        {"_register_DateStackOption", register_DateStackOption, METH_O, "registers type"},
        {"_register_FolderDepth", register_FolderDepth, METH_O, "registers type"},
        {"_register_IndexedState", register_IndexedState, METH_O, "registers type"},
        {"_register_IndexerOption", register_IndexerOption, METH_O, "registers type"},
        {}};


    static int module_traverse(PyObject* module, visitproc visit, void* arg) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_VISIT(state->type_CommonFileQuery);
        Py_VISIT(state->type_CommonFolderQuery);
        Py_VISIT(state->type_DateStackOption);
        Py_VISIT(state->type_FolderDepth);
        Py_VISIT(state->type_IndexedState);
        Py_VISIT(state->type_IndexerOption);
        Py_VISIT(state->type_ContentIndexer);
        Py_VISIT(state->type_ContentIndexerQuery);
        Py_VISIT(state->type_IndexableContent);
        Py_VISIT(state->type_QueryOptions);
        Py_VISIT(state->type_SortEntryVector);
        Py_VISIT(state->type_StorageFileQueryResult);
        Py_VISIT(state->type_StorageFolderQueryResult);
        Py_VISIT(state->type_StorageItemQueryResult);
        Py_VISIT(state->type_StorageLibraryChangeTrackerTriggerDetails);
        Py_VISIT(state->type_StorageLibraryContentChangedTriggerDetails);
        Py_VISIT(state->type_ValueAndLanguage);
        Py_VISIT(state->type_IIndexableContent);
        Py_VISIT(state->type_IStorageFolderQueryOperations);
        Py_VISIT(state->type_IStorageQueryResultBase);
        Py_VISIT(state->type_SortEntry);

        return 0;
    }

    static int module_clear(PyObject* module) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_CLEAR(state->type_CommonFileQuery);
        Py_CLEAR(state->type_CommonFolderQuery);
        Py_CLEAR(state->type_DateStackOption);
        Py_CLEAR(state->type_FolderDepth);
        Py_CLEAR(state->type_IndexedState);
        Py_CLEAR(state->type_IndexerOption);
        Py_CLEAR(state->type_ContentIndexer);
        Py_CLEAR(state->type_ContentIndexerQuery);
        Py_CLEAR(state->type_IndexableContent);
        Py_CLEAR(state->type_QueryOptions);
        Py_CLEAR(state->type_SortEntryVector);
        Py_CLEAR(state->type_StorageFileQueryResult);
        Py_CLEAR(state->type_StorageFolderQueryResult);
        Py_CLEAR(state->type_StorageItemQueryResult);
        Py_CLEAR(state->type_StorageLibraryChangeTrackerTriggerDetails);
        Py_CLEAR(state->type_StorageLibraryContentChangedTriggerDetails);
        Py_CLEAR(state->type_ValueAndLanguage);
        Py_CLEAR(state->type_IIndexableContent);
        Py_CLEAR(state->type_IStorageFolderQueryOperations);
        Py_CLEAR(state->type_IStorageQueryResultBase);
        Py_CLEAR(state->type_SortEntry);

        return 0;
    }


    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winsdk_Windows_Storage_Search",
           module_doc,
           sizeof(module_state),
           module_methods,
           nullptr,
           module_traverse,
           module_clear,
           nullptr};

} // py::cpp::Windows::Storage::Search

PyMODINIT_FUNC PyInit__winsdk_Windows_Storage_Search(void) noexcept
{
    using namespace py::cpp::Windows::Storage::Search;

    py::pyobj_handle module{PyModule_Create(&module_def)};

    if (!module)
    {
        return nullptr;
    }

    auto object_type = py::get_python_type<py::Object>();
    if (!object_type)
    {
        return nullptr;
    }

    py::pyobj_handle bases{PyTuple_Pack(1, object_type)};

    if (!bases)
    {
        return nullptr;
    }

    py::pyobj_handle collections_abc_module{PyImport_ImportModule("collections.abc")};

    if (!collections_abc_module)
    {
        return nullptr;
    }

    py::pyobj_handle sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "Sequence")};

    if (!sequence_type)
    {
        return nullptr;
    }

    py::pyobj_handle sequence_bases{PyTuple_Pack(2, object_type, sequence_type.get())};

    if (!sequence_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableSequence")};

    if (!mutable_sequence_type)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_sequence_bases{PyTuple_Pack(2, object_type, mutable_sequence_type.get())};

    if (!mutable_sequence_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "Mapping")};

    if (!mapping_type)
    {
        return nullptr;
    }

    py::pyobj_handle mapping_bases{PyTuple_Pack(2, object_type, mapping_type.get())};

    if (!mapping_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableMapping")};

    if (!mutable_mapping_type)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_mapping_bases{PyTuple_Pack(2, object_type, mutable_mapping_type.get())};

    if (!mutable_mapping_bases)
    {
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module.get()));
    assert(state);

    state->type_ContentIndexer = py::register_python_type(module.get(), type_name_ContentIndexer, &type_spec_ContentIndexer, bases.get(), nullptr);
    if (!state->type_ContentIndexer)
    {
        return nullptr;
    }

    state->type_ContentIndexerQuery = py::register_python_type(module.get(), type_name_ContentIndexerQuery, &type_spec_ContentIndexerQuery, bases.get(), nullptr);
    if (!state->type_ContentIndexerQuery)
    {
        return nullptr;
    }

    state->type_IndexableContent = py::register_python_type(module.get(), type_name_IndexableContent, &type_spec_IndexableContent, bases.get(), nullptr);
    if (!state->type_IndexableContent)
    {
        return nullptr;
    }

    state->type_QueryOptions = py::register_python_type(module.get(), type_name_QueryOptions, &type_spec_QueryOptions, bases.get(), nullptr);
    if (!state->type_QueryOptions)
    {
        return nullptr;
    }

    state->type_SortEntryVector = py::register_python_type(module.get(), type_name_SortEntryVector, &type_spec_SortEntryVector, mutable_sequence_bases.get(), nullptr);
    if (!state->type_SortEntryVector)
    {
        return nullptr;
    }

    state->type_StorageFileQueryResult = py::register_python_type(module.get(), type_name_StorageFileQueryResult, &type_spec_StorageFileQueryResult, bases.get(), nullptr);
    if (!state->type_StorageFileQueryResult)
    {
        return nullptr;
    }

    state->type_StorageFolderQueryResult = py::register_python_type(module.get(), type_name_StorageFolderQueryResult, &type_spec_StorageFolderQueryResult, bases.get(), nullptr);
    if (!state->type_StorageFolderQueryResult)
    {
        return nullptr;
    }

    state->type_StorageItemQueryResult = py::register_python_type(module.get(), type_name_StorageItemQueryResult, &type_spec_StorageItemQueryResult, bases.get(), nullptr);
    if (!state->type_StorageItemQueryResult)
    {
        return nullptr;
    }

    state->type_StorageLibraryChangeTrackerTriggerDetails = py::register_python_type(module.get(), type_name_StorageLibraryChangeTrackerTriggerDetails, &type_spec_StorageLibraryChangeTrackerTriggerDetails, bases.get(), nullptr);
    if (!state->type_StorageLibraryChangeTrackerTriggerDetails)
    {
        return nullptr;
    }

    state->type_StorageLibraryContentChangedTriggerDetails = py::register_python_type(module.get(), type_name_StorageLibraryContentChangedTriggerDetails, &type_spec_StorageLibraryContentChangedTriggerDetails, bases.get(), nullptr);
    if (!state->type_StorageLibraryContentChangedTriggerDetails)
    {
        return nullptr;
    }

    state->type_ValueAndLanguage = py::register_python_type(module.get(), type_name_ValueAndLanguage, &type_spec_ValueAndLanguage, bases.get(), nullptr);
    if (!state->type_ValueAndLanguage)
    {
        return nullptr;
    }

    state->type_IIndexableContent = py::register_python_type(module.get(), type_name_IIndexableContent, &type_spec_IIndexableContent, bases.get(), nullptr);
    if (!state->type_IIndexableContent)
    {
        return nullptr;
    }

    state->type_IStorageFolderQueryOperations = py::register_python_type(module.get(), type_name_IStorageFolderQueryOperations, &type_spec_IStorageFolderQueryOperations, bases.get(), nullptr);
    if (!state->type_IStorageFolderQueryOperations)
    {
        return nullptr;
    }

    state->type_IStorageQueryResultBase = py::register_python_type(module.get(), type_name_IStorageQueryResultBase, &type_spec_IStorageQueryResultBase, bases.get(), nullptr);
    if (!state->type_IStorageQueryResultBase)
    {
        return nullptr;
    }

    state->type_SortEntry = py::register_python_type(module.get(), type_name_SortEntry, &type_spec_SortEntry, bases.get(), nullptr);
    if (!state->type_SortEntry)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::Storage::Search::CommonFileQuery>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_CommonFileQuery;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::CommonFileQuery is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Storage::Search::CommonFolderQuery>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_CommonFolderQuery;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::CommonFolderQuery is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Storage::Search::DateStackOption>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_DateStackOption;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::DateStackOption is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Storage::Search::FolderDepth>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_FolderDepth;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::FolderDepth is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Storage::Search::IndexedState>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_IndexedState;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::IndexedState is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Storage::Search::IndexerOption>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_IndexerOption;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::IndexerOption is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::ContentIndexer>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_ContentIndexer;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::ContentIndexer is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::ContentIndexerQuery>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_ContentIndexerQuery;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::ContentIndexerQuery is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::IndexableContent>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_IndexableContent;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::IndexableContent is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::QueryOptions>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_QueryOptions;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::QueryOptions is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::SortEntryVector>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_SortEntryVector;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::SortEntryVector is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageFileQueryResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_StorageFileQueryResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::StorageFileQueryResult is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageFolderQueryResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_StorageFolderQueryResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::StorageFolderQueryResult is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageItemQueryResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_StorageItemQueryResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::StorageItemQueryResult is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_StorageLibraryChangeTrackerTriggerDetails;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_StorageLibraryContentChangedTriggerDetails;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::ValueAndLanguage>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_ValueAndLanguage;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::ValueAndLanguage is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::IIndexableContent>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_IIndexableContent;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::IIndexableContent is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::IStorageFolderQueryOperations>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_IStorageFolderQueryOperations;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::IStorageFolderQueryOperations is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::IStorageQueryResultBase>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_IStorageQueryResultBase;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::IStorageQueryResultBase is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::SortEntry>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Storage::Search;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::Storage::Search");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_SortEntry;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Storage::Search::SortEntry is not registered");
        return nullptr;
    }

    return python_type;
}
