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

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

PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::ContentIndexer>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::ContentIndexerQuery>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::IndexableContent>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::QueryOptions>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::SortEntryVector>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageFileQueryResult>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageFolderQueryResult>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageItemQueryResult>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::ValueAndLanguage>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::IIndexableContent>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::IStorageFolderQueryOperations>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::IStorageQueryResultBase>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Storage::Search::SortEntry>::python_type;

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

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

    if (!PyDict_Check(obj))
    {
        throw winrt::hresult_invalid_argument();
    }

    winrt::Windows::Storage::Search::SortEntry return_value{};

    PyObject* py_PropertyName = PyDict_GetItemString(obj, "property_name");
    if (!py_PropertyName) { throw winrt::hresult_invalid_argument(); }
    return_value.PropertyName = converter<winrt::hstring>::convert_to(py_PropertyName);

    PyObject* py_AscendingOrder = PyDict_GetItemString(obj, "ascending_order");
    if (!py_AscendingOrder) { throw winrt::hresult_invalid_argument(); }
    return_value.AscendingOrder = converter<bool>::convert_to(py_AscendingOrder);

    return return_value;
}

namespace py::cpp::Windows::Storage::Search
{
    // ----- ContentIndexer class --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            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)
        {
            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)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(winrt::Windows::Storage::Search::ContentIndexer::GetIndexer());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        try
        {
            return py::convert(self->obj.Revision());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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 },
        { "_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, _new_ContentIndexer },
        { Py_tp_dealloc, _dealloc_ContentIndexer },
        { Py_tp_methods, _methods_ContentIndexer },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 0)
        {
            try
            {
                return py::convert(self->obj.GetAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(self->obj.GetPropertiesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            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
    {
        try
        {
            return py::convert(self->obj.QueryFolder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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 },
        { "_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, _new_ContentIndexerQuery },
        { Py_tp_dealloc, _dealloc_ContentIndexerQuery },
        { Py_tp_methods, _methods_ContentIndexerQuery },
        { Py_tp_getset, _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 --------------------
    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;
        }

        Py_ssize_t 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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* IndexableContent_get_StreamContentType(py::wrapper::Windows::Storage::Search::IndexableContent* self, void* /*unused*/) noexcept
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        try
        {
            return py::convert(self->obj.Properties());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_IndexableContent },
        { Py_tp_dealloc, _dealloc_IndexableContent },
        { Py_tp_methods, _methods_IndexableContent },
        { Py_tp_getset, _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 --------------------
    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;
        }

        Py_ssize_t 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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        try
        {
            return py::convert(self->obj.StorageProviderIdFilter());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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 },
        { "_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, _new_QueryOptions },
        { Py_tp_dealloc, _dealloc_QueryOptions },
        { Py_tp_methods, _methods_QueryOptions },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);
                auto param1_count = py::convert_to<winrt::com_array<winrt::Windows::Storage::Search::SortEntry>::size_type>(args, 1);
                winrt::com_array<winrt::Windows::Storage::Search::SortEntry> param1 ( param1_count, py::empty_instance<winrt::Windows::Storage::Search::SortEntry>::get() );

                auto return_value = self->obj.GetMany(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_GetView(py::wrapper::Windows::Storage::Search::SortEntryVector* self, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::array_view<winrt::Windows::Storage::Search::SortEntry>>(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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            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
    {
        try
        {
            return py::convert(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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 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 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 },
        { "_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 },
        { }
    };

    static PyType_Slot _type_slots_SortEntryVector[] = 
    {
        { Py_tp_new, _new_SortEntryVector },
        { Py_tp_dealloc, _dealloc_SortEntryVector },
        { Py_tp_methods, _methods_SortEntryVector },
        { Py_tp_getset, _getset_SortEntryVector },
        { Py_tp_iter, _iterator_SortEntryVector },
        { Py_sq_length, _seq_length_SortEntryVector },
        { Py_sq_item, _seq_item_SortEntryVector },
        { Py_sq_ass_item, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(self->obj.GetFilesAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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* _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 },
        { "_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, _new_StorageFileQueryResult },
        { Py_tp_dealloc, _dealloc_StorageFileQueryResult },
        { Py_tp_methods, _methods_StorageFileQueryResult },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(self->obj.GetFoldersAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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* _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 },
        { "_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, _new_StorageFolderQueryResult },
        { Py_tp_dealloc, _dealloc_StorageFolderQueryResult },
        { Py_tp_methods, _methods_StorageFolderQueryResult },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(self->obj.GetItemsAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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* _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 },
        { "_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, _new_StorageItemQueryResult },
        { Py_tp_dealloc, _dealloc_StorageItemQueryResult },
        { Py_tp_methods, _methods_StorageItemQueryResult },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* StorageLibraryChangeTrackerTriggerDetails_get_ChangeTracker(py::wrapper::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails* self, void* /*unused*/) noexcept
    {
        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
    {
        try
        {
            return py::convert(self->obj.Folder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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[] = {
        { "_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, _new_StorageLibraryChangeTrackerTriggerDetails },
        { Py_tp_dealloc, _dealloc_StorageLibraryChangeTrackerTriggerDetails },
        { Py_tp_methods, _methods_StorageLibraryChangeTrackerTriggerDetails },
        { Py_tp_getset, _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 --------------------
    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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 1)
        {
            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
    {
        try
        {
            return py::convert(self->obj.Folder());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    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 },
        { "_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, _new_StorageLibraryContentChangedTriggerDetails },
        { Py_tp_dealloc, _dealloc_StorageLibraryContentChangedTriggerDetails },
        { Py_tp_methods, _methods_StorageLibraryContentChangedTriggerDetails },
        { Py_tp_getset, _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 --------------------
    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;
        }

        Py_ssize_t 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)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* ValueAndLanguage_get_Value(py::wrapper::Windows::Storage::Search::ValueAndLanguage* self, void* /*unused*/) noexcept
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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* _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[] = {
        { "_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, _new_ValueAndLanguage },
        { Py_tp_dealloc, _dealloc_ValueAndLanguage },
        { Py_tp_methods, _methods_ValueAndLanguage },
        { Py_tp_getset, _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 --------------------
    constexpr const char* const _type_name_IIndexableContent = "IIndexableContent";

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

    static void _dealloc_IIndexableContent(py::wrapper::Windows::Storage::Search::IIndexableContent* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* IIndexableContent_get_Id(py::wrapper::Windows::Storage::Search::IIndexableContent* self, void* /*unused*/) noexcept
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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
    {
        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 (arg == nullptr)
        {
            PyErr_SetString(PyExc_TypeError, "property delete not supported");
            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* _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[] = {
        { "_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, _new_IIndexableContent },
        { Py_tp_dealloc, _dealloc_IIndexableContent },
        { Py_tp_methods, _methods_IIndexableContent },
        { Py_tp_getset, _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 --------------------
    constexpr const char* const _type_name_IStorageFolderQueryOperations = "IStorageFolderQueryOperations";

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

    static void _dealloc_IStorageFolderQueryOperations(py::wrapper::Windows::Storage::Search::IStorageFolderQueryOperations* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(self->obj.CreateFileQuery());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            try
            {
                return py::convert(self->obj.CreateFolderQuery());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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* _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 },
        { "_from", reinterpret_cast<PyCFunction>(_from_IStorageFolderQueryOperations), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IStorageFolderQueryOperations[] = {
        { }
    };

    static PyType_Slot _type_slots_IStorageFolderQueryOperations[] = 
    {
        { Py_tp_new, _new_IStorageFolderQueryOperations },
        { Py_tp_dealloc, _dealloc_IStorageFolderQueryOperations },
        { Py_tp_methods, _methods_IStorageFolderQueryOperations },
        { Py_tp_getset, _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 --------------------
    constexpr const char* const _type_name_IStorageQueryResultBase = "IStorageQueryResultBase";

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

    static void _dealloc_IStorageQueryResultBase(py::wrapper::Windows::Storage::Search::IStorageQueryResultBase* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

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

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            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
    {
        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
    {
        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
    {
        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
    {
        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
    {
        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* _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 },
        { "_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, _new_IStorageQueryResultBase },
        { Py_tp_dealloc, _dealloc_IStorageQueryResultBase },
        { Py_tp_methods, _methods_IStorageQueryResultBase },
        { Py_tp_getset, _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 --------------------
    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;
            }
        }

        if ((tuple_size == 1) && (kwds == nullptr))
        {
            auto arg = PyTuple_GetItem(args, 0);
            if (PyDict_Check(arg))
            {
                try
                {
                    auto return_value = py::convert_to<winrt::Windows::Storage::Search::SortEntry>(arg);
                    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)
    {
    }

    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_TypeError, "property delete not supported");
            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_TypeError, "property delete not supported");
            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, _new_SortEntry },
        { Py_tp_dealloc, _dealloc_SortEntry },
        { Py_tp_getset, _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 --------------------
    static int module_exec(PyObject* module) noexcept
    {
        try
        {
            py::pyobj_handle bases { PyTuple_Pack(1, py::winrt_type<py::Object>::python_type) };

            py::winrt_type<winrt::Windows::Storage::Search::ContentIndexer>::python_type = py::register_python_type(module, _type_name_ContentIndexer, &_type_spec_ContentIndexer, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::ContentIndexerQuery>::python_type = py::register_python_type(module, _type_name_ContentIndexerQuery, &_type_spec_ContentIndexerQuery, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::IndexableContent>::python_type = py::register_python_type(module, _type_name_IndexableContent, &_type_spec_IndexableContent, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::QueryOptions>::python_type = py::register_python_type(module, _type_name_QueryOptions, &_type_spec_QueryOptions, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::SortEntryVector>::python_type = py::register_python_type(module, _type_name_SortEntryVector, &_type_spec_SortEntryVector, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::StorageFileQueryResult>::python_type = py::register_python_type(module, _type_name_StorageFileQueryResult, &_type_spec_StorageFileQueryResult, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::StorageFolderQueryResult>::python_type = py::register_python_type(module, _type_name_StorageFolderQueryResult, &_type_spec_StorageFolderQueryResult, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::StorageItemQueryResult>::python_type = py::register_python_type(module, _type_name_StorageItemQueryResult, &_type_spec_StorageItemQueryResult, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::StorageLibraryChangeTrackerTriggerDetails>::python_type = py::register_python_type(module, _type_name_StorageLibraryChangeTrackerTriggerDetails, &_type_spec_StorageLibraryChangeTrackerTriggerDetails, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::StorageLibraryContentChangedTriggerDetails>::python_type = py::register_python_type(module, _type_name_StorageLibraryContentChangedTriggerDetails, &_type_spec_StorageLibraryContentChangedTriggerDetails, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::ValueAndLanguage>::python_type = py::register_python_type(module, _type_name_ValueAndLanguage, &_type_spec_ValueAndLanguage, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::IIndexableContent>::python_type = py::register_python_type(module, _type_name_IIndexableContent, &_type_spec_IIndexableContent, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::IStorageFolderQueryOperations>::python_type = py::register_python_type(module, _type_name_IStorageFolderQueryOperations, &_type_spec_IStorageFolderQueryOperations, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::IStorageQueryResultBase>::python_type = py::register_python_type(module, _type_name_IStorageQueryResultBase, &_type_spec_IStorageQueryResultBase, bases.get());
            py::winrt_type<winrt::Windows::Storage::Search::SortEntry>::python_type = py::register_python_type(module, _type_name_SortEntry, &_type_spec_SortEntry, bases.get());

            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyModuleDef_Slot module_slots[] = {{Py_mod_exec, module_exec}, {}};

    PyDoc_STRVAR(module_doc, "Windows.Storage.Search");

    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winsdk_Windows_Storage_Search",
           module_doc,
           0,
           nullptr,
           module_slots,
           nullptr,
           nullptr,
           nullptr};
} // py::cpp::Windows::Storage::Search

PyMODINIT_FUNC
PyInit__winsdk_Windows_Storage_Search (void) noexcept
{
    return PyModuleDef_Init(&py::cpp::Windows::Storage::Search::module_def);
}
