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

#include "pybase.h"
#include "py.Windows.Foundation.Collections.h"

PyTypeObject* py::winrt_type<winrt::Windows::Foundation::Collections::PropertySet>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Foundation::Collections::StringMap>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Foundation::Collections::ValueSet>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IIterable>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IIterator>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IKeyValuePair>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IMapChangedEventArgs>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IMapView>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IMap>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IObservableMap>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IObservableVector>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Foundation::Collections::IPropertySet>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Foundation::Collections::IVectorChangedEventArgs>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IVectorView>::python_type;
PyTypeObject* py::winrt_type<py::proj::Windows::Foundation::Collections::IVector>::python_type;

namespace py::cpp::Windows::Foundation::Collections
{
    // ----- PropertySet class --------------------
    constexpr const char* const _type_name_PropertySet = "PropertySet";

    static PyObject* _new_PropertySet(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::Foundation::Collections::PropertySet 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_PropertySet(py::wrapper::Windows::Foundation::Collections::PropertySet* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* PropertySet_Clear(py::wrapper::Windows::Foundation::Collections::PropertySet* 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* PropertySet_First(py::wrapper::Windows::Foundation::Collections::PropertySet* 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* PropertySet_GetView(py::wrapper::Windows::Foundation::Collections::PropertySet* 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* PropertySet_HasKey(py::wrapper::Windows::Foundation::Collections::PropertySet* 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.HasKey(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PropertySet_Insert(py::wrapper::Windows::Foundation::Collections::PropertySet* 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::IInspectable>(args, 1);

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

    static PyObject* PropertySet_Lookup(py::wrapper::Windows::Foundation::Collections::PropertySet* 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.Lookup(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PropertySet_Remove(py::wrapper::Windows::Foundation::Collections::PropertySet* 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.Remove(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PropertySet_get_Size(py::wrapper::Windows::Foundation::Collections::PropertySet* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* PropertySet_add_MapChanged(py::wrapper::Windows::Foundation::Collections::PropertySet* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::MapChangedEventHandler<winrt::hstring, winrt::Windows::Foundation::IInspectable>>(arg);

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

    static PyObject* PropertySet_remove_MapChanged(py::wrapper::Windows::Foundation::Collections::PropertySet* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

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

    static PyObject* _from_PropertySet(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::Foundation::Collections::PropertySet>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _iterator_PropertySet(py::wrapper::Windows::Foundation::Collections::PropertySet* self) noexcept
    {
        try
        {
            return py::convert(self->obj.First());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static Py_ssize_t _map_length_PropertySet(py::wrapper::Windows::Foundation::Collections::PropertySet* self) noexcept
    {
        try
        {
            return static_cast<Py_ssize_t>(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _map_subscript_PropertySet(py::wrapper::Windows::Foundation::Collections::PropertySet* self, PyObject* key) noexcept
    {
        try
        {
            return py::convert(self->obj.Lookup(py::convert_to<winrt::hstring>(key)));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int _map_assign_PropertySet(py::wrapper::Windows::Foundation::Collections::PropertySet* self, PyObject* key, PyObject* value) noexcept
    {
        try
        {
            auto _key = py::convert_to<winrt::hstring>(key);
            if (value == nullptr) { self->obj.Remove(_key); }
            else { self->obj.Insert(_key, py::convert_to<winrt::Windows::Foundation::IInspectable>(value)); }
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyMethodDef _methods_PropertySet[] = {
        { "lookup", (PyCFunction)PropertySet_Lookup, METH_VARARGS, nullptr },
        { "has_key", (PyCFunction)PropertySet_HasKey, METH_VARARGS, nullptr },
        { "get_view", (PyCFunction)PropertySet_GetView, METH_VARARGS, nullptr },
        { "insert", (PyCFunction)PropertySet_Insert, METH_VARARGS, nullptr },
        { "remove", (PyCFunction)PropertySet_Remove, METH_VARARGS, nullptr },
        { "clear", (PyCFunction)PropertySet_Clear, METH_VARARGS, nullptr },
        { "first", (PyCFunction)PropertySet_First, METH_VARARGS, nullptr },
        { "add_map_changed", (PyCFunction)PropertySet_add_MapChanged, METH_O, nullptr },
        { "remove_map_changed", (PyCFunction)PropertySet_remove_MapChanged, METH_O, nullptr },
        { "_from", (PyCFunction)_from_PropertySet, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_PropertySet[] = {
        { const_cast<char*>("size"), (getter)PropertySet_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_PropertySet[] = 
    {
        { Py_tp_new, _new_PropertySet },
        { Py_tp_dealloc, _dealloc_PropertySet },
        { Py_tp_methods, _methods_PropertySet },
        { Py_tp_getset, _getset_PropertySet },
        { Py_tp_iter, _iterator_PropertySet },
        { Py_mp_length, _map_length_PropertySet },
        { Py_mp_subscript, _map_subscript_PropertySet },
        { Py_mp_ass_subscript, _map_assign_PropertySet },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_PropertySet =
    {
        "_bleak_winrt_Windows_Foundation_Collections.PropertySet",
        sizeof(py::wrapper::Windows::Foundation::Collections::PropertySet),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PropertySet
    };

    // ----- StringMap class --------------------
    constexpr const char* const _type_name_StringMap = "StringMap";

    static PyObject* _new_StringMap(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::Foundation::Collections::StringMap 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_StringMap(py::wrapper::Windows::Foundation::Collections::StringMap* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* StringMap_Clear(py::wrapper::Windows::Foundation::Collections::StringMap* 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* StringMap_First(py::wrapper::Windows::Foundation::Collections::StringMap* 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* StringMap_GetView(py::wrapper::Windows::Foundation::Collections::StringMap* 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* StringMap_HasKey(py::wrapper::Windows::Foundation::Collections::StringMap* 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.HasKey(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StringMap_Insert(py::wrapper::Windows::Foundation::Collections::StringMap* 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::hstring>(args, 1);

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

    static PyObject* StringMap_Lookup(py::wrapper::Windows::Foundation::Collections::StringMap* 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.Lookup(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StringMap_Remove(py::wrapper::Windows::Foundation::Collections::StringMap* 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.Remove(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* StringMap_get_Size(py::wrapper::Windows::Foundation::Collections::StringMap* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* StringMap_add_MapChanged(py::wrapper::Windows::Foundation::Collections::StringMap* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::MapChangedEventHandler<winrt::hstring, winrt::hstring>>(arg);

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

    static PyObject* StringMap_remove_MapChanged(py::wrapper::Windows::Foundation::Collections::StringMap* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

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

    static PyObject* _from_StringMap(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::Foundation::Collections::StringMap>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _iterator_StringMap(py::wrapper::Windows::Foundation::Collections::StringMap* self) noexcept
    {
        try
        {
            return py::convert(self->obj.First());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static Py_ssize_t _map_length_StringMap(py::wrapper::Windows::Foundation::Collections::StringMap* self) noexcept
    {
        try
        {
            return static_cast<Py_ssize_t>(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _map_subscript_StringMap(py::wrapper::Windows::Foundation::Collections::StringMap* self, PyObject* key) noexcept
    {
        try
        {
            return py::convert(self->obj.Lookup(py::convert_to<winrt::hstring>(key)));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int _map_assign_StringMap(py::wrapper::Windows::Foundation::Collections::StringMap* self, PyObject* key, PyObject* value) noexcept
    {
        try
        {
            auto _key = py::convert_to<winrt::hstring>(key);
            if (value == nullptr) { self->obj.Remove(_key); }
            else { self->obj.Insert(_key, py::convert_to<winrt::hstring>(value)); }
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyMethodDef _methods_StringMap[] = {
        { "lookup", (PyCFunction)StringMap_Lookup, METH_VARARGS, nullptr },
        { "has_key", (PyCFunction)StringMap_HasKey, METH_VARARGS, nullptr },
        { "get_view", (PyCFunction)StringMap_GetView, METH_VARARGS, nullptr },
        { "insert", (PyCFunction)StringMap_Insert, METH_VARARGS, nullptr },
        { "remove", (PyCFunction)StringMap_Remove, METH_VARARGS, nullptr },
        { "clear", (PyCFunction)StringMap_Clear, METH_VARARGS, nullptr },
        { "first", (PyCFunction)StringMap_First, METH_VARARGS, nullptr },
        { "add_map_changed", (PyCFunction)StringMap_add_MapChanged, METH_O, nullptr },
        { "remove_map_changed", (PyCFunction)StringMap_remove_MapChanged, METH_O, nullptr },
        { "_from", (PyCFunction)_from_StringMap, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_StringMap[] = {
        { const_cast<char*>("size"), (getter)StringMap_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_StringMap[] = 
    {
        { Py_tp_new, _new_StringMap },
        { Py_tp_dealloc, _dealloc_StringMap },
        { Py_tp_methods, _methods_StringMap },
        { Py_tp_getset, _getset_StringMap },
        { Py_tp_iter, _iterator_StringMap },
        { Py_mp_length, _map_length_StringMap },
        { Py_mp_subscript, _map_subscript_StringMap },
        { Py_mp_ass_subscript, _map_assign_StringMap },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_StringMap =
    {
        "_bleak_winrt_Windows_Foundation_Collections.StringMap",
        sizeof(py::wrapper::Windows::Foundation::Collections::StringMap),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_StringMap
    };

    // ----- ValueSet class --------------------
    constexpr const char* const _type_name_ValueSet = "ValueSet";

    static PyObject* _new_ValueSet(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::Foundation::Collections::ValueSet 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_ValueSet(py::wrapper::Windows::Foundation::Collections::ValueSet* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* ValueSet_Clear(py::wrapper::Windows::Foundation::Collections::ValueSet* 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* ValueSet_First(py::wrapper::Windows::Foundation::Collections::ValueSet* 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* ValueSet_GetView(py::wrapper::Windows::Foundation::Collections::ValueSet* 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* ValueSet_HasKey(py::wrapper::Windows::Foundation::Collections::ValueSet* 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.HasKey(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ValueSet_Insert(py::wrapper::Windows::Foundation::Collections::ValueSet* 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::IInspectable>(args, 1);

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

    static PyObject* ValueSet_Lookup(py::wrapper::Windows::Foundation::Collections::ValueSet* 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.Lookup(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ValueSet_Remove(py::wrapper::Windows::Foundation::Collections::ValueSet* 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.Remove(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ValueSet_get_Size(py::wrapper::Windows::Foundation::Collections::ValueSet* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* ValueSet_add_MapChanged(py::wrapper::Windows::Foundation::Collections::ValueSet* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::MapChangedEventHandler<winrt::hstring, winrt::Windows::Foundation::IInspectable>>(arg);

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

    static PyObject* ValueSet_remove_MapChanged(py::wrapper::Windows::Foundation::Collections::ValueSet* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

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

    static PyObject* _from_ValueSet(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::Foundation::Collections::ValueSet>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _iterator_ValueSet(py::wrapper::Windows::Foundation::Collections::ValueSet* self) noexcept
    {
        try
        {
            return py::convert(self->obj.First());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static Py_ssize_t _map_length_ValueSet(py::wrapper::Windows::Foundation::Collections::ValueSet* self) noexcept
    {
        try
        {
            return static_cast<Py_ssize_t>(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _map_subscript_ValueSet(py::wrapper::Windows::Foundation::Collections::ValueSet* self, PyObject* key) noexcept
    {
        try
        {
            return py::convert(self->obj.Lookup(py::convert_to<winrt::hstring>(key)));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int _map_assign_ValueSet(py::wrapper::Windows::Foundation::Collections::ValueSet* self, PyObject* key, PyObject* value) noexcept
    {
        try
        {
            auto _key = py::convert_to<winrt::hstring>(key);
            if (value == nullptr) { self->obj.Remove(_key); }
            else { self->obj.Insert(_key, py::convert_to<winrt::Windows::Foundation::IInspectable>(value)); }
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyMethodDef _methods_ValueSet[] = {
        { "lookup", (PyCFunction)ValueSet_Lookup, METH_VARARGS, nullptr },
        { "has_key", (PyCFunction)ValueSet_HasKey, METH_VARARGS, nullptr },
        { "get_view", (PyCFunction)ValueSet_GetView, METH_VARARGS, nullptr },
        { "insert", (PyCFunction)ValueSet_Insert, METH_VARARGS, nullptr },
        { "remove", (PyCFunction)ValueSet_Remove, METH_VARARGS, nullptr },
        { "clear", (PyCFunction)ValueSet_Clear, METH_VARARGS, nullptr },
        { "first", (PyCFunction)ValueSet_First, METH_VARARGS, nullptr },
        { "add_map_changed", (PyCFunction)ValueSet_add_MapChanged, METH_O, nullptr },
        { "remove_map_changed", (PyCFunction)ValueSet_remove_MapChanged, METH_O, nullptr },
        { "_from", (PyCFunction)_from_ValueSet, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_ValueSet[] = {
        { const_cast<char*>("size"), (getter)ValueSet_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_ValueSet[] = 
    {
        { Py_tp_new, _new_ValueSet },
        { Py_tp_dealloc, _dealloc_ValueSet },
        { Py_tp_methods, _methods_ValueSet },
        { Py_tp_getset, _getset_ValueSet },
        { Py_tp_iter, _iterator_ValueSet },
        { Py_mp_length, _map_length_ValueSet },
        { Py_mp_subscript, _map_subscript_ValueSet },
        { Py_mp_ass_subscript, _map_assign_ValueSet },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_ValueSet =
    {
        "_bleak_winrt_Windows_Foundation_Collections.ValueSet",
        sizeof(py::wrapper::Windows::Foundation::Collections::ValueSet),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ValueSet
    };

    // ----- IIterable interface --------------------
    constexpr const char* const _type_name_IIterable = "IIterable";

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

    static void _dealloc_IIterable(py::wrapper::Windows::Foundation::Collections::IIterable* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IIterable_First(py::wrapper::Windows::Foundation::Collections::IIterable* self, PyObject* args) noexcept
    {
        return self->obj->First(args);
    }

    static PyObject* _iterator_IIterable(py::wrapper::Windows::Foundation::Collections::IIterable* self) noexcept
    {
        return self->obj->dunder_iter();
    }

    static PyMethodDef _methods_IIterable[] = {
        { "first", (PyCFunction)IIterable_First, METH_VARARGS, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IIterable[] = {
        { nullptr }
    };

    static PyType_Slot _type_slots_IIterable[] = 
    {
        { Py_tp_new, _new_IIterable },
        { Py_tp_dealloc, _dealloc_IIterable },
        { Py_tp_methods, _methods_IIterable },
        { Py_tp_getset, _getset_IIterable },
        { Py_tp_iter, _iterator_IIterable },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IIterable =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IIterable",
        sizeof(py::wrapper::Windows::Foundation::Collections::IIterable),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IIterable
    };

    // ----- IIterator interface --------------------
    constexpr const char* const _type_name_IIterator = "IIterator";

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

    static void _dealloc_IIterator(py::wrapper::Windows::Foundation::Collections::IIterator* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IIterator_GetMany(py::wrapper::Windows::Foundation::Collections::IIterator* self, PyObject* args) noexcept
    {
        return self->obj->GetMany(args);
    }

    static PyObject* IIterator_MoveNext(py::wrapper::Windows::Foundation::Collections::IIterator* self, PyObject* args) noexcept
    {
        return self->obj->MoveNext(args);
    }

    static PyObject* IIterator_get_Current(py::wrapper::Windows::Foundation::Collections::IIterator* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Current();
    }

    static PyObject* IIterator_get_HasCurrent(py::wrapper::Windows::Foundation::Collections::IIterator* self, void* /*unused*/) noexcept
    {
        return self->obj->get_HasCurrent();
    }

    static PyObject* _iterator_IIterator(py::wrapper::Windows::Foundation::Collections::IIterator* self) noexcept
    {
        return self->obj->dunder_iter();
    }

    static PyObject* _iterator_next_IIterator(py::wrapper::Windows::Foundation::Collections::IIterator* self) noexcept
    {
        return self->obj->dunder_iternext();
    }

    static PyMethodDef _methods_IIterator[] = {
        { "move_next", (PyCFunction)IIterator_MoveNext, METH_VARARGS, nullptr },
        { "get_many", (PyCFunction)IIterator_GetMany, METH_VARARGS, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IIterator[] = {
        { const_cast<char*>("current"), (getter)IIterator_get_Current, nullptr, nullptr, nullptr },
        { const_cast<char*>("has_current"), (getter)IIterator_get_HasCurrent, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IIterator[] = 
    {
        { Py_tp_new, _new_IIterator },
        { Py_tp_dealloc, _dealloc_IIterator },
        { Py_tp_methods, _methods_IIterator },
        { Py_tp_getset, _getset_IIterator },
        { Py_tp_iter, _iterator_IIterator },
        { Py_tp_iternext, _iterator_next_IIterator },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IIterator =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IIterator",
        sizeof(py::wrapper::Windows::Foundation::Collections::IIterator),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IIterator
    };

    // ----- IKeyValuePair interface --------------------
    constexpr const char* const _type_name_IKeyValuePair = "IKeyValuePair";

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

    static void _dealloc_IKeyValuePair(py::wrapper::Windows::Foundation::Collections::IKeyValuePair* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IKeyValuePair_get_Key(py::wrapper::Windows::Foundation::Collections::IKeyValuePair* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Key();
    }

    static PyObject* IKeyValuePair_get_Value(py::wrapper::Windows::Foundation::Collections::IKeyValuePair* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Value();
    }

    static PyMethodDef _methods_IKeyValuePair[] = {
        { nullptr }
    };

    static PyGetSetDef _getset_IKeyValuePair[] = {
        { const_cast<char*>("key"), (getter)IKeyValuePair_get_Key, nullptr, nullptr, nullptr },
        { const_cast<char*>("value"), (getter)IKeyValuePair_get_Value, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IKeyValuePair[] = 
    {
        { Py_tp_new, _new_IKeyValuePair },
        { Py_tp_dealloc, _dealloc_IKeyValuePair },
        { Py_tp_methods, _methods_IKeyValuePair },
        { Py_tp_getset, _getset_IKeyValuePair },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IKeyValuePair =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IKeyValuePair",
        sizeof(py::wrapper::Windows::Foundation::Collections::IKeyValuePair),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IKeyValuePair
    };

    // ----- IMapChangedEventArgs interface --------------------
    constexpr const char* const _type_name_IMapChangedEventArgs = "IMapChangedEventArgs";

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

    static void _dealloc_IMapChangedEventArgs(py::wrapper::Windows::Foundation::Collections::IMapChangedEventArgs* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IMapChangedEventArgs_get_CollectionChange(py::wrapper::Windows::Foundation::Collections::IMapChangedEventArgs* self, void* /*unused*/) noexcept
    {
        return self->obj->get_CollectionChange();
    }

    static PyObject* IMapChangedEventArgs_get_Key(py::wrapper::Windows::Foundation::Collections::IMapChangedEventArgs* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Key();
    }

    static PyMethodDef _methods_IMapChangedEventArgs[] = {
        { nullptr }
    };

    static PyGetSetDef _getset_IMapChangedEventArgs[] = {
        { const_cast<char*>("collection_change"), (getter)IMapChangedEventArgs_get_CollectionChange, nullptr, nullptr, nullptr },
        { const_cast<char*>("key"), (getter)IMapChangedEventArgs_get_Key, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IMapChangedEventArgs[] = 
    {
        { Py_tp_new, _new_IMapChangedEventArgs },
        { Py_tp_dealloc, _dealloc_IMapChangedEventArgs },
        { Py_tp_methods, _methods_IMapChangedEventArgs },
        { Py_tp_getset, _getset_IMapChangedEventArgs },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IMapChangedEventArgs =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IMapChangedEventArgs",
        sizeof(py::wrapper::Windows::Foundation::Collections::IMapChangedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IMapChangedEventArgs
    };

    // ----- IMapView interface --------------------
    constexpr const char* const _type_name_IMapView = "IMapView";

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

    static void _dealloc_IMapView(py::wrapper::Windows::Foundation::Collections::IMapView* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IMapView_First(py::wrapper::Windows::Foundation::Collections::IMapView* self, PyObject* args) noexcept
    {
        return self->obj->First(args);
    }

    static PyObject* IMapView_HasKey(py::wrapper::Windows::Foundation::Collections::IMapView* self, PyObject* args) noexcept
    {
        return self->obj->HasKey(args);
    }

    static PyObject* IMapView_Lookup(py::wrapper::Windows::Foundation::Collections::IMapView* self, PyObject* args) noexcept
    {
        return self->obj->Lookup(args);
    }

    static PyObject* IMapView_Split(py::wrapper::Windows::Foundation::Collections::IMapView* self, PyObject* args) noexcept
    {
        return self->obj->Split(args);
    }

    static PyObject* IMapView_get_Size(py::wrapper::Windows::Foundation::Collections::IMapView* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Size();
    }

    static PyObject* _iterator_IMapView(py::wrapper::Windows::Foundation::Collections::IMapView* self) noexcept
    {
        return self->obj->dunder_iter();
    }

    static Py_ssize_t _map_length_IMapView(py::wrapper::Windows::Foundation::Collections::IMapView* self) noexcept
    {
        return self->obj->map_length();
    }

    static PyObject* _map_subscript_IMapView(py::wrapper::Windows::Foundation::Collections::IMapView* self, PyObject* key) noexcept
    {
        return self->obj->map_subscript(key);
    }

    static PyMethodDef _methods_IMapView[] = {
        { "lookup", (PyCFunction)IMapView_Lookup, METH_VARARGS, nullptr },
        { "has_key", (PyCFunction)IMapView_HasKey, METH_VARARGS, nullptr },
        { "split", (PyCFunction)IMapView_Split, METH_VARARGS, nullptr },
        { "first", (PyCFunction)IMapView_First, METH_VARARGS, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IMapView[] = {
        { const_cast<char*>("size"), (getter)IMapView_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IMapView[] = 
    {
        { Py_tp_new, _new_IMapView },
        { Py_tp_dealloc, _dealloc_IMapView },
        { Py_tp_methods, _methods_IMapView },
        { Py_tp_getset, _getset_IMapView },
        { Py_tp_iter, _iterator_IMapView },
        { Py_mp_length, _map_length_IMapView },
        { Py_mp_subscript, _map_subscript_IMapView },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IMapView =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IMapView",
        sizeof(py::wrapper::Windows::Foundation::Collections::IMapView),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IMapView
    };

    // ----- IMap interface --------------------
    constexpr const char* const _type_name_IMap = "IMap";

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

    static void _dealloc_IMap(py::wrapper::Windows::Foundation::Collections::IMap* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IMap_Clear(py::wrapper::Windows::Foundation::Collections::IMap* self, PyObject* args) noexcept
    {
        return self->obj->Clear(args);
    }

    static PyObject* IMap_First(py::wrapper::Windows::Foundation::Collections::IMap* self, PyObject* args) noexcept
    {
        return self->obj->First(args);
    }

    static PyObject* IMap_GetView(py::wrapper::Windows::Foundation::Collections::IMap* self, PyObject* args) noexcept
    {
        return self->obj->GetView(args);
    }

    static PyObject* IMap_HasKey(py::wrapper::Windows::Foundation::Collections::IMap* self, PyObject* args) noexcept
    {
        return self->obj->HasKey(args);
    }

    static PyObject* IMap_Insert(py::wrapper::Windows::Foundation::Collections::IMap* self, PyObject* args) noexcept
    {
        return self->obj->Insert(args);
    }

    static PyObject* IMap_Lookup(py::wrapper::Windows::Foundation::Collections::IMap* self, PyObject* args) noexcept
    {
        return self->obj->Lookup(args);
    }

    static PyObject* IMap_Remove(py::wrapper::Windows::Foundation::Collections::IMap* self, PyObject* args) noexcept
    {
        return self->obj->Remove(args);
    }

    static PyObject* IMap_get_Size(py::wrapper::Windows::Foundation::Collections::IMap* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Size();
    }

    static PyObject* _iterator_IMap(py::wrapper::Windows::Foundation::Collections::IMap* self) noexcept
    {
        return self->obj->dunder_iter();
    }

    static Py_ssize_t _map_length_IMap(py::wrapper::Windows::Foundation::Collections::IMap* self) noexcept
    {
        return self->obj->map_length();
    }

    static PyObject* _map_subscript_IMap(py::wrapper::Windows::Foundation::Collections::IMap* self, PyObject* key) noexcept
    {
        return self->obj->map_subscript(key);
    }

    static int _map_assign_IMap(py::wrapper::Windows::Foundation::Collections::IMap* self, PyObject* key, PyObject* value) noexcept
    {
        return self->obj->map_assign(key, value);
    }

    static PyMethodDef _methods_IMap[] = {
        { "lookup", (PyCFunction)IMap_Lookup, METH_VARARGS, nullptr },
        { "has_key", (PyCFunction)IMap_HasKey, METH_VARARGS, nullptr },
        { "get_view", (PyCFunction)IMap_GetView, METH_VARARGS, nullptr },
        { "insert", (PyCFunction)IMap_Insert, METH_VARARGS, nullptr },
        { "remove", (PyCFunction)IMap_Remove, METH_VARARGS, nullptr },
        { "clear", (PyCFunction)IMap_Clear, METH_VARARGS, nullptr },
        { "first", (PyCFunction)IMap_First, METH_VARARGS, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IMap[] = {
        { const_cast<char*>("size"), (getter)IMap_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IMap[] = 
    {
        { Py_tp_new, _new_IMap },
        { Py_tp_dealloc, _dealloc_IMap },
        { Py_tp_methods, _methods_IMap },
        { Py_tp_getset, _getset_IMap },
        { Py_tp_iter, _iterator_IMap },
        { Py_mp_length, _map_length_IMap },
        { Py_mp_subscript, _map_subscript_IMap },
        { Py_mp_ass_subscript, _map_assign_IMap },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IMap =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IMap",
        sizeof(py::wrapper::Windows::Foundation::Collections::IMap),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IMap
    };

    // ----- IObservableMap interface --------------------
    constexpr const char* const _type_name_IObservableMap = "IObservableMap";

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

    static void _dealloc_IObservableMap(py::wrapper::Windows::Foundation::Collections::IObservableMap* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IObservableMap_Clear(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* args) noexcept
    {
        return self->obj->Clear(args);
    }

    static PyObject* IObservableMap_First(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* args) noexcept
    {
        return self->obj->First(args);
    }

    static PyObject* IObservableMap_GetView(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* args) noexcept
    {
        return self->obj->GetView(args);
    }

    static PyObject* IObservableMap_HasKey(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* args) noexcept
    {
        return self->obj->HasKey(args);
    }

    static PyObject* IObservableMap_Insert(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* args) noexcept
    {
        return self->obj->Insert(args);
    }

    static PyObject* IObservableMap_Lookup(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* args) noexcept
    {
        return self->obj->Lookup(args);
    }

    static PyObject* IObservableMap_Remove(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* args) noexcept
    {
        return self->obj->Remove(args);
    }

    static PyObject* IObservableMap_get_Size(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Size();
    }

    static PyObject* IObservableMap_add_MapChanged(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* arg) noexcept
    {
        return self->obj->add_MapChanged(arg);
    }

    static PyObject* IObservableMap_remove_MapChanged(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* arg) noexcept
    {
        return self->obj->remove_MapChanged(arg);
    }

    static PyObject* _iterator_IObservableMap(py::wrapper::Windows::Foundation::Collections::IObservableMap* self) noexcept
    {
        return self->obj->dunder_iter();
    }

    static Py_ssize_t _map_length_IObservableMap(py::wrapper::Windows::Foundation::Collections::IObservableMap* self) noexcept
    {
        return self->obj->map_length();
    }

    static PyObject* _map_subscript_IObservableMap(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* key) noexcept
    {
        return self->obj->map_subscript(key);
    }

    static int _map_assign_IObservableMap(py::wrapper::Windows::Foundation::Collections::IObservableMap* self, PyObject* key, PyObject* value) noexcept
    {
        return self->obj->map_assign(key, value);
    }

    static PyMethodDef _methods_IObservableMap[] = {
        { "lookup", (PyCFunction)IObservableMap_Lookup, METH_VARARGS, nullptr },
        { "has_key", (PyCFunction)IObservableMap_HasKey, METH_VARARGS, nullptr },
        { "get_view", (PyCFunction)IObservableMap_GetView, METH_VARARGS, nullptr },
        { "insert", (PyCFunction)IObservableMap_Insert, METH_VARARGS, nullptr },
        { "remove", (PyCFunction)IObservableMap_Remove, METH_VARARGS, nullptr },
        { "clear", (PyCFunction)IObservableMap_Clear, METH_VARARGS, nullptr },
        { "first", (PyCFunction)IObservableMap_First, METH_VARARGS, nullptr },
        { "add_map_changed", (PyCFunction)IObservableMap_add_MapChanged, METH_O, nullptr },
        { "remove_map_changed", (PyCFunction)IObservableMap_remove_MapChanged, METH_O, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IObservableMap[] = {
        { const_cast<char*>("size"), (getter)IObservableMap_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IObservableMap[] = 
    {
        { Py_tp_new, _new_IObservableMap },
        { Py_tp_dealloc, _dealloc_IObservableMap },
        { Py_tp_methods, _methods_IObservableMap },
        { Py_tp_getset, _getset_IObservableMap },
        { Py_tp_iter, _iterator_IObservableMap },
        { Py_mp_length, _map_length_IObservableMap },
        { Py_mp_subscript, _map_subscript_IObservableMap },
        { Py_mp_ass_subscript, _map_assign_IObservableMap },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IObservableMap =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IObservableMap",
        sizeof(py::wrapper::Windows::Foundation::Collections::IObservableMap),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IObservableMap
    };

    // ----- IObservableVector interface --------------------
    constexpr const char* const _type_name_IObservableVector = "IObservableVector";

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

    static void _dealloc_IObservableVector(py::wrapper::Windows::Foundation::Collections::IObservableVector* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IObservableVector_Append(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->Append(args);
    }

    static PyObject* IObservableVector_Clear(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->Clear(args);
    }

    static PyObject* IObservableVector_First(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->First(args);
    }

    static PyObject* IObservableVector_GetAt(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->GetAt(args);
    }

    static PyObject* IObservableVector_GetMany(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->GetMany(args);
    }

    static PyObject* IObservableVector_GetView(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->GetView(args);
    }

    static PyObject* IObservableVector_IndexOf(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->IndexOf(args);
    }

    static PyObject* IObservableVector_InsertAt(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->InsertAt(args);
    }

    static PyObject* IObservableVector_RemoveAt(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->RemoveAt(args);
    }

    static PyObject* IObservableVector_RemoveAtEnd(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->RemoveAtEnd(args);
    }

    static PyObject* IObservableVector_ReplaceAll(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->ReplaceAll(args);
    }

    static PyObject* IObservableVector_SetAt(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* args) noexcept
    {
        return self->obj->SetAt(args);
    }

    static PyObject* IObservableVector_get_Size(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Size();
    }

    static PyObject* IObservableVector_add_VectorChanged(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* arg) noexcept
    {
        return self->obj->add_VectorChanged(arg);
    }

    static PyObject* IObservableVector_remove_VectorChanged(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, PyObject* arg) noexcept
    {
        return self->obj->remove_VectorChanged(arg);
    }

    static PyObject* _iterator_IObservableVector(py::wrapper::Windows::Foundation::Collections::IObservableVector* self) noexcept
    {
        return self->obj->dunder_iter();
    }

    static Py_ssize_t _seq_length_IObservableVector(py::wrapper::Windows::Foundation::Collections::IObservableVector* self) noexcept
    {
        return self->obj->seq_length();
    }

    static PyObject* _seq_item_IObservableVector(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, Py_ssize_t i) noexcept
    {
        return self->obj->seq_item(i);
    }

    static int _seq_assign_IObservableVector(py::wrapper::Windows::Foundation::Collections::IObservableVector* self, Py_ssize_t i, PyObject* value) noexcept
    {
        return self->obj->seq_assign(i, value);
    }

    static PyMethodDef _methods_IObservableVector[] = {
        { "get_at", (PyCFunction)IObservableVector_GetAt, METH_VARARGS, nullptr },
        { "get_view", (PyCFunction)IObservableVector_GetView, METH_VARARGS, nullptr },
        { "index_of", (PyCFunction)IObservableVector_IndexOf, METH_VARARGS, nullptr },
        { "set_at", (PyCFunction)IObservableVector_SetAt, METH_VARARGS, nullptr },
        { "insert_at", (PyCFunction)IObservableVector_InsertAt, METH_VARARGS, nullptr },
        { "remove_at", (PyCFunction)IObservableVector_RemoveAt, METH_VARARGS, nullptr },
        { "append", (PyCFunction)IObservableVector_Append, METH_VARARGS, nullptr },
        { "remove_at_end", (PyCFunction)IObservableVector_RemoveAtEnd, METH_VARARGS, nullptr },
        { "clear", (PyCFunction)IObservableVector_Clear, METH_VARARGS, nullptr },
        { "get_many", (PyCFunction)IObservableVector_GetMany, METH_VARARGS, nullptr },
        { "replace_all", (PyCFunction)IObservableVector_ReplaceAll, METH_VARARGS, nullptr },
        { "first", (PyCFunction)IObservableVector_First, METH_VARARGS, nullptr },
        { "add_vector_changed", (PyCFunction)IObservableVector_add_VectorChanged, METH_O, nullptr },
        { "remove_vector_changed", (PyCFunction)IObservableVector_remove_VectorChanged, METH_O, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IObservableVector[] = {
        { const_cast<char*>("size"), (getter)IObservableVector_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IObservableVector[] = 
    {
        { Py_tp_new, _new_IObservableVector },
        { Py_tp_dealloc, _dealloc_IObservableVector },
        { Py_tp_methods, _methods_IObservableVector },
        { Py_tp_getset, _getset_IObservableVector },
        { Py_tp_iter, _iterator_IObservableVector },
        { Py_sq_length, _seq_length_IObservableVector },
        { Py_sq_item, _seq_item_IObservableVector },
        { Py_sq_ass_item, _seq_assign_IObservableVector },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IObservableVector =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IObservableVector",
        sizeof(py::wrapper::Windows::Foundation::Collections::IObservableVector),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IObservableVector
    };

    // ----- IPropertySet interface --------------------
    constexpr const char* const _type_name_IPropertySet = "IPropertySet";

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

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

    static PyObject* IPropertySet_Clear(py::wrapper::Windows::Foundation::Collections::IPropertySet* 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* IPropertySet_First(py::wrapper::Windows::Foundation::Collections::IPropertySet* 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* IPropertySet_GetView(py::wrapper::Windows::Foundation::Collections::IPropertySet* 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* IPropertySet_HasKey(py::wrapper::Windows::Foundation::Collections::IPropertySet* 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.HasKey(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IPropertySet_Insert(py::wrapper::Windows::Foundation::Collections::IPropertySet* 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::IInspectable>(args, 1);

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

    static PyObject* IPropertySet_Lookup(py::wrapper::Windows::Foundation::Collections::IPropertySet* 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.Lookup(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IPropertySet_Remove(py::wrapper::Windows::Foundation::Collections::IPropertySet* 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.Remove(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IPropertySet_get_Size(py::wrapper::Windows::Foundation::Collections::IPropertySet* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IPropertySet_add_MapChanged(py::wrapper::Windows::Foundation::Collections::IPropertySet* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::MapChangedEventHandler<winrt::hstring, winrt::Windows::Foundation::IInspectable>>(arg);

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

    static PyObject* IPropertySet_remove_MapChanged(py::wrapper::Windows::Foundation::Collections::IPropertySet* self, PyObject* arg) noexcept
    {
        try
        {
            auto param0 = py::convert_to<winrt::event_token>(arg);

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

    static PyObject* _from_IPropertySet(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::Foundation::Collections::IPropertySet>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _iterator_IPropertySet(py::wrapper::Windows::Foundation::Collections::IPropertySet* self) noexcept
    {
        try
        {
            return py::convert(self->obj.First());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static Py_ssize_t _map_length_IPropertySet(py::wrapper::Windows::Foundation::Collections::IPropertySet* self) noexcept
    {
        try
        {
            return static_cast<Py_ssize_t>(self->obj.Size());
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _map_subscript_IPropertySet(py::wrapper::Windows::Foundation::Collections::IPropertySet* self, PyObject* key) noexcept
    {
        try
        {
            return py::convert(self->obj.Lookup(py::convert_to<winrt::hstring>(key)));
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int _map_assign_IPropertySet(py::wrapper::Windows::Foundation::Collections::IPropertySet* self, PyObject* key, PyObject* value) noexcept
    {
        try
        {
            auto _key = py::convert_to<winrt::hstring>(key);
            if (value == nullptr) { self->obj.Remove(_key); }
            else { self->obj.Insert(_key, py::convert_to<winrt::Windows::Foundation::IInspectable>(value)); }
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyMethodDef _methods_IPropertySet[] = {
        { "lookup", (PyCFunction)IPropertySet_Lookup, METH_VARARGS, nullptr },
        { "has_key", (PyCFunction)IPropertySet_HasKey, METH_VARARGS, nullptr },
        { "get_view", (PyCFunction)IPropertySet_GetView, METH_VARARGS, nullptr },
        { "insert", (PyCFunction)IPropertySet_Insert, METH_VARARGS, nullptr },
        { "remove", (PyCFunction)IPropertySet_Remove, METH_VARARGS, nullptr },
        { "clear", (PyCFunction)IPropertySet_Clear, METH_VARARGS, nullptr },
        { "first", (PyCFunction)IPropertySet_First, METH_VARARGS, nullptr },
        { "add_map_changed", (PyCFunction)IPropertySet_add_MapChanged, METH_O, nullptr },
        { "remove_map_changed", (PyCFunction)IPropertySet_remove_MapChanged, METH_O, nullptr },
        { "_from", (PyCFunction)_from_IPropertySet, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IPropertySet[] = {
        { const_cast<char*>("size"), (getter)IPropertySet_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IPropertySet[] = 
    {
        { Py_tp_new, _new_IPropertySet },
        { Py_tp_dealloc, _dealloc_IPropertySet },
        { Py_tp_methods, _methods_IPropertySet },
        { Py_tp_getset, _getset_IPropertySet },
        { Py_tp_iter, _iterator_IPropertySet },
        { Py_mp_length, _map_length_IPropertySet },
        { Py_mp_subscript, _map_subscript_IPropertySet },
        { Py_mp_ass_subscript, _map_assign_IPropertySet },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IPropertySet =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IPropertySet",
        sizeof(py::wrapper::Windows::Foundation::Collections::IPropertySet),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IPropertySet
    };

    // ----- IVectorChangedEventArgs interface --------------------
    constexpr const char* const _type_name_IVectorChangedEventArgs = "IVectorChangedEventArgs";

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

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

    static PyObject* IVectorChangedEventArgs_get_CollectionChange(py::wrapper::Windows::Foundation::Collections::IVectorChangedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.CollectionChange());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* IVectorChangedEventArgs_get_Index(py::wrapper::Windows::Foundation::Collections::IVectorChangedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Index());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_IVectorChangedEventArgs(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::Foundation::Collections::IVectorChangedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IVectorChangedEventArgs[] = {
        { "_from", (PyCFunction)_from_IVectorChangedEventArgs, METH_O | METH_STATIC, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IVectorChangedEventArgs[] = {
        { const_cast<char*>("collection_change"), (getter)IVectorChangedEventArgs_get_CollectionChange, nullptr, nullptr, nullptr },
        { const_cast<char*>("index"), (getter)IVectorChangedEventArgs_get_Index, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IVectorChangedEventArgs[] = 
    {
        { Py_tp_new, _new_IVectorChangedEventArgs },
        { Py_tp_dealloc, _dealloc_IVectorChangedEventArgs },
        { Py_tp_methods, _methods_IVectorChangedEventArgs },
        { Py_tp_getset, _getset_IVectorChangedEventArgs },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IVectorChangedEventArgs =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IVectorChangedEventArgs",
        sizeof(py::wrapper::Windows::Foundation::Collections::IVectorChangedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IVectorChangedEventArgs
    };

    // ----- IVectorView interface --------------------
    constexpr const char* const _type_name_IVectorView = "IVectorView";

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

    static void _dealloc_IVectorView(py::wrapper::Windows::Foundation::Collections::IVectorView* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IVectorView_First(py::wrapper::Windows::Foundation::Collections::IVectorView* self, PyObject* args) noexcept
    {
        return self->obj->First(args);
    }

    static PyObject* IVectorView_GetAt(py::wrapper::Windows::Foundation::Collections::IVectorView* self, PyObject* args) noexcept
    {
        return self->obj->GetAt(args);
    }

    static PyObject* IVectorView_GetMany(py::wrapper::Windows::Foundation::Collections::IVectorView* self, PyObject* args) noexcept
    {
        return self->obj->GetMany(args);
    }

    static PyObject* IVectorView_IndexOf(py::wrapper::Windows::Foundation::Collections::IVectorView* self, PyObject* args) noexcept
    {
        return self->obj->IndexOf(args);
    }

    static PyObject* IVectorView_get_Size(py::wrapper::Windows::Foundation::Collections::IVectorView* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Size();
    }

    static PyObject* _iterator_IVectorView(py::wrapper::Windows::Foundation::Collections::IVectorView* self) noexcept
    {
        return self->obj->dunder_iter();
    }

    static Py_ssize_t _seq_length_IVectorView(py::wrapper::Windows::Foundation::Collections::IVectorView* self) noexcept
    {
        return self->obj->seq_length();
    }

    static PyObject* _seq_item_IVectorView(py::wrapper::Windows::Foundation::Collections::IVectorView* self, Py_ssize_t i) noexcept
    {
        return self->obj->seq_item(i);
    }

    static PyMethodDef _methods_IVectorView[] = {
        { "get_at", (PyCFunction)IVectorView_GetAt, METH_VARARGS, nullptr },
        { "index_of", (PyCFunction)IVectorView_IndexOf, METH_VARARGS, nullptr },
        { "get_many", (PyCFunction)IVectorView_GetMany, METH_VARARGS, nullptr },
        { "first", (PyCFunction)IVectorView_First, METH_VARARGS, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IVectorView[] = {
        { const_cast<char*>("size"), (getter)IVectorView_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IVectorView[] = 
    {
        { Py_tp_new, _new_IVectorView },
        { Py_tp_dealloc, _dealloc_IVectorView },
        { Py_tp_methods, _methods_IVectorView },
        { Py_tp_getset, _getset_IVectorView },
        { Py_tp_iter, _iterator_IVectorView },
        { Py_sq_length, _seq_length_IVectorView },
        { Py_sq_item, _seq_item_IVectorView },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IVectorView =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IVectorView",
        sizeof(py::wrapper::Windows::Foundation::Collections::IVectorView),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IVectorView
    };

    // ----- IVector interface --------------------
    constexpr const char* const _type_name_IVector = "IVector";

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

    static void _dealloc_IVector(py::wrapper::Windows::Foundation::Collections::IVector* self)
    {
        auto hash_value = self->obj->hash();
        py::wrapped_instance(hash_value, nullptr);
        self->obj.reset();
    }

    static PyObject* IVector_Append(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->Append(args);
    }

    static PyObject* IVector_Clear(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->Clear(args);
    }

    static PyObject* IVector_First(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->First(args);
    }

    static PyObject* IVector_GetAt(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->GetAt(args);
    }

    static PyObject* IVector_GetMany(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->GetMany(args);
    }

    static PyObject* IVector_GetView(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->GetView(args);
    }

    static PyObject* IVector_IndexOf(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->IndexOf(args);
    }

    static PyObject* IVector_InsertAt(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->InsertAt(args);
    }

    static PyObject* IVector_RemoveAt(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->RemoveAt(args);
    }

    static PyObject* IVector_RemoveAtEnd(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->RemoveAtEnd(args);
    }

    static PyObject* IVector_ReplaceAll(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->ReplaceAll(args);
    }

    static PyObject* IVector_SetAt(py::wrapper::Windows::Foundation::Collections::IVector* self, PyObject* args) noexcept
    {
        return self->obj->SetAt(args);
    }

    static PyObject* IVector_get_Size(py::wrapper::Windows::Foundation::Collections::IVector* self, void* /*unused*/) noexcept
    {
        return self->obj->get_Size();
    }

    static PyObject* _iterator_IVector(py::wrapper::Windows::Foundation::Collections::IVector* self) noexcept
    {
        return self->obj->dunder_iter();
    }

    static Py_ssize_t _seq_length_IVector(py::wrapper::Windows::Foundation::Collections::IVector* self) noexcept
    {
        return self->obj->seq_length();
    }

    static PyObject* _seq_item_IVector(py::wrapper::Windows::Foundation::Collections::IVector* self, Py_ssize_t i) noexcept
    {
        return self->obj->seq_item(i);
    }

    static int _seq_assign_IVector(py::wrapper::Windows::Foundation::Collections::IVector* self, Py_ssize_t i, PyObject* value) noexcept
    {
        return self->obj->seq_assign(i, value);
    }

    static PyMethodDef _methods_IVector[] = {
        { "get_at", (PyCFunction)IVector_GetAt, METH_VARARGS, nullptr },
        { "get_view", (PyCFunction)IVector_GetView, METH_VARARGS, nullptr },
        { "index_of", (PyCFunction)IVector_IndexOf, METH_VARARGS, nullptr },
        { "set_at", (PyCFunction)IVector_SetAt, METH_VARARGS, nullptr },
        { "insert_at", (PyCFunction)IVector_InsertAt, METH_VARARGS, nullptr },
        { "remove_at", (PyCFunction)IVector_RemoveAt, METH_VARARGS, nullptr },
        { "append", (PyCFunction)IVector_Append, METH_VARARGS, nullptr },
        { "remove_at_end", (PyCFunction)IVector_RemoveAtEnd, METH_VARARGS, nullptr },
        { "clear", (PyCFunction)IVector_Clear, METH_VARARGS, nullptr },
        { "get_many", (PyCFunction)IVector_GetMany, METH_VARARGS, nullptr },
        { "replace_all", (PyCFunction)IVector_ReplaceAll, METH_VARARGS, nullptr },
        { "first", (PyCFunction)IVector_First, METH_VARARGS, nullptr },
        { nullptr }
    };

    static PyGetSetDef _getset_IVector[] = {
        { const_cast<char*>("size"), (getter)IVector_get_Size, nullptr, nullptr, nullptr },
        { nullptr }
    };

    static PyType_Slot _type_slots_IVector[] = 
    {
        { Py_tp_new, _new_IVector },
        { Py_tp_dealloc, _dealloc_IVector },
        { Py_tp_methods, _methods_IVector },
        { Py_tp_getset, _getset_IVector },
        { Py_tp_iter, _iterator_IVector },
        { Py_sq_length, _seq_length_IVector },
        { Py_sq_item, _seq_item_IVector },
        { Py_sq_ass_item, _seq_assign_IVector },
        { 0, nullptr },
    };

    static PyType_Spec _type_spec_IVector =
    {
        "_bleak_winrt_Windows_Foundation_Collections.IVector",
        sizeof(py::wrapper::Windows::Foundation::Collections::IVector),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IVector
    };

    // ----- Windows.Foundation.Collections Initialization --------------------
    static int module_exec(PyObject* module) noexcept
    {
        try
        {
            py::pyobj_handle bases { PyTuple_Pack(1, py::winrt_type<py::winrt_base>::python_type) };

            py::winrt_type<winrt::Windows::Foundation::Collections::PropertySet>::python_type = py::register_python_type(module, _type_name_PropertySet, &_type_spec_PropertySet, bases.get());
            py::winrt_type<winrt::Windows::Foundation::Collections::StringMap>::python_type = py::register_python_type(module, _type_name_StringMap, &_type_spec_StringMap, bases.get());
            py::winrt_type<winrt::Windows::Foundation::Collections::ValueSet>::python_type = py::register_python_type(module, _type_name_ValueSet, &_type_spec_ValueSet, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IIterable>::python_type = py::register_python_type(module, _type_name_IIterable, &_type_spec_IIterable, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IIterator>::python_type = py::register_python_type(module, _type_name_IIterator, &_type_spec_IIterator, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IKeyValuePair>::python_type = py::register_python_type(module, _type_name_IKeyValuePair, &_type_spec_IKeyValuePair, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IMapChangedEventArgs>::python_type = py::register_python_type(module, _type_name_IMapChangedEventArgs, &_type_spec_IMapChangedEventArgs, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IMapView>::python_type = py::register_python_type(module, _type_name_IMapView, &_type_spec_IMapView, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IMap>::python_type = py::register_python_type(module, _type_name_IMap, &_type_spec_IMap, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IObservableMap>::python_type = py::register_python_type(module, _type_name_IObservableMap, &_type_spec_IObservableMap, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IObservableVector>::python_type = py::register_python_type(module, _type_name_IObservableVector, &_type_spec_IObservableVector, bases.get());
            py::winrt_type<winrt::Windows::Foundation::Collections::IPropertySet>::python_type = py::register_python_type(module, _type_name_IPropertySet, &_type_spec_IPropertySet, bases.get());
            py::winrt_type<winrt::Windows::Foundation::Collections::IVectorChangedEventArgs>::python_type = py::register_python_type(module, _type_name_IVectorChangedEventArgs, &_type_spec_IVectorChangedEventArgs, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IVectorView>::python_type = py::register_python_type(module, _type_name_IVectorView, &_type_spec_IVectorView, bases.get());
            py::winrt_type<py::proj::Windows::Foundation::Collections::IVector>::python_type = py::register_python_type(module, _type_name_IVector, &_type_spec_IVector, bases.get());

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

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

    PyDoc_STRVAR(module_doc, "Windows.Foundation.Collections");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_bleak_winrt_Windows_Foundation_Collections",
        module_doc,
        0,
        nullptr,
        module_slots,
        nullptr,
        nullptr,
        nullptr
    };
} // py::cpp::Windows::Foundation::Collections

PyMODINIT_FUNC
PyInit__bleak_winrt_Windows_Foundation_Collections (void) noexcept
{
    return PyModuleDef_Init(&py::cpp::Windows::Foundation::Collections::module_def);
}
