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

#include "pybase.h"
#include "py.Windows.UI.WebUI.Core.h"


namespace py::cpp::Windows::UI::WebUI::Core
{
    struct module_state
    {
        PyObject* type_WebUICommandBarClosedDisplayMode;
        PyTypeObject* type_WebUICommandBar;
        PyTypeObject* type_WebUICommandBarBitmapIcon;
        PyTypeObject* type_WebUICommandBarConfirmationButton;
        PyTypeObject* type_WebUICommandBarIconButton;
        PyTypeObject* type_WebUICommandBarItemInvokedEventArgs;
        PyTypeObject* type_WebUICommandBarSizeChangedEventArgs;
        PyTypeObject* type_WebUICommandBarSymbolIcon;
        PyTypeObject* type_IWebUICommandBarElement;
        PyTypeObject* type_IWebUICommandBarIcon;
    };

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

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

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

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


        Py_RETURN_NONE;
    }

    // ----- WebUICommandBar class --------------------
    static constexpr const char* const type_name_WebUICommandBar = "WebUICommandBar";

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

    static void _dealloc_WebUICommandBar(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

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

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"GetForCurrentView", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(winrt::Windows::UI::WebUI::Core::WebUICommandBar::GetForCurrentView());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* WebUICommandBar_get_Visible(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"Visible"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBar_put_Visible(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"Visible"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBar_get_Opacity(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"Opacity"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBar_put_Opacity(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"Opacity"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBar_get_IsOpen(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"IsOpen"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBar_put_IsOpen(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"IsOpen"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBar_get_ForegroundColor(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"ForegroundColor"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBar_put_ForegroundColor(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"ForegroundColor"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBar_get_ClosedDisplayMode(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"ClosedDisplayMode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBar_put_ClosedDisplayMode(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"ClosedDisplayMode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

        try
        {
            auto param0 = py::convert_to<winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode>(arg);

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

    static PyObject* WebUICommandBar_get_BackgroundColor(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"BackgroundColor"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBar_put_BackgroundColor(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"BackgroundColor"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBar_get_PrimaryCommands(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"PrimaryCommands"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebUICommandBar_get_SecondaryCommands(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"SecondaryCommands"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

    static PyObject* WebUICommandBar_add_MenuClosed(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"MenuClosed"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::UI::WebUI::Core::MenuClosedEventHandler>(arg);

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

    static PyObject* WebUICommandBar_remove_MenuClosed(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"MenuClosed"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* WebUICommandBar_add_MenuOpened(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"MenuOpened"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::UI::WebUI::Core::MenuOpenedEventHandler>(arg);

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

    static PyObject* WebUICommandBar_remove_MenuOpened(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"MenuOpened"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* WebUICommandBar_add_SizeChanged(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"SizeChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::UI::WebUI::Core::SizeChangedEventHandler>(arg);

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

    static PyObject* WebUICommandBar_remove_SizeChanged(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBar", L"SizeChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _assign_array_WebUICommandBar(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::WebUI::Core::WebUICommandBar>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebUICommandBar(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::UI::WebUI::Core::WebUICommandBar>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebUICommandBar[] = {
        { "get_for_current_view", reinterpret_cast<PyCFunction>(WebUICommandBar_GetForCurrentView), METH_VARARGS | METH_STATIC, nullptr },
        { "add_menu_closed", reinterpret_cast<PyCFunction>(WebUICommandBar_add_MenuClosed), METH_O, nullptr },
        { "remove_menu_closed", reinterpret_cast<PyCFunction>(WebUICommandBar_remove_MenuClosed), METH_O, nullptr },
        { "add_menu_opened", reinterpret_cast<PyCFunction>(WebUICommandBar_add_MenuOpened), METH_O, nullptr },
        { "remove_menu_opened", reinterpret_cast<PyCFunction>(WebUICommandBar_remove_MenuOpened), METH_O, nullptr },
        { "add_size_changed", reinterpret_cast<PyCFunction>(WebUICommandBar_add_SizeChanged), METH_O, nullptr },
        { "remove_size_changed", reinterpret_cast<PyCFunction>(WebUICommandBar_remove_SizeChanged), METH_O, nullptr },
        { "_assign_array_", _assign_array_WebUICommandBar, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebUICommandBar), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebUICommandBar[] = {
        { "visible", reinterpret_cast<getter>(WebUICommandBar_get_Visible), reinterpret_cast<setter>(WebUICommandBar_put_Visible), nullptr, nullptr },
        { "opacity", reinterpret_cast<getter>(WebUICommandBar_get_Opacity), reinterpret_cast<setter>(WebUICommandBar_put_Opacity), nullptr, nullptr },
        { "is_open", reinterpret_cast<getter>(WebUICommandBar_get_IsOpen), reinterpret_cast<setter>(WebUICommandBar_put_IsOpen), nullptr, nullptr },
        { "foreground_color", reinterpret_cast<getter>(WebUICommandBar_get_ForegroundColor), reinterpret_cast<setter>(WebUICommandBar_put_ForegroundColor), nullptr, nullptr },
        { "closed_display_mode", reinterpret_cast<getter>(WebUICommandBar_get_ClosedDisplayMode), reinterpret_cast<setter>(WebUICommandBar_put_ClosedDisplayMode), nullptr, nullptr },
        { "background_color", reinterpret_cast<getter>(WebUICommandBar_get_BackgroundColor), reinterpret_cast<setter>(WebUICommandBar_put_BackgroundColor), nullptr, nullptr },
        { "primary_commands", reinterpret_cast<getter>(WebUICommandBar_get_PrimaryCommands), nullptr, nullptr, nullptr },
        { "secondary_commands", reinterpret_cast<getter>(WebUICommandBar_get_SecondaryCommands), nullptr, nullptr, nullptr },
        { "size", reinterpret_cast<getter>(WebUICommandBar_get_Size), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebUICommandBar[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebUICommandBar) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebUICommandBar) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebUICommandBar) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebUICommandBar) },
        { },
    };

    static PyType_Spec type_spec_WebUICommandBar =
    {
        "_winsdk_Windows_UI_WebUI_Core.WebUICommandBar",
        sizeof(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBar),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebUICommandBar
    };

    // ----- WebUICommandBarBitmapIcon class --------------------
    static constexpr const char* const type_name_WebUICommandBarBitmapIcon = "WebUICommandBarBitmapIcon";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 0);

                winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 0)
        {
            try
            {
                winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon 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_WebUICommandBarBitmapIcon(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebUICommandBarBitmapIcon_get_Uri(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarBitmapIcon", L"Uri"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBarBitmapIcon_put_Uri(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarBitmapIcon", L"Uri"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* _assign_array_WebUICommandBarBitmapIcon(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebUICommandBarBitmapIcon(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::UI::WebUI::Core::WebUICommandBarBitmapIcon>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebUICommandBarBitmapIcon[] = {
        { "_assign_array_", _assign_array_WebUICommandBarBitmapIcon, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebUICommandBarBitmapIcon), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebUICommandBarBitmapIcon[] = {
        { "uri", reinterpret_cast<getter>(WebUICommandBarBitmapIcon_get_Uri), reinterpret_cast<setter>(WebUICommandBarBitmapIcon_put_Uri), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebUICommandBarBitmapIcon[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebUICommandBarBitmapIcon) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebUICommandBarBitmapIcon) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebUICommandBarBitmapIcon) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebUICommandBarBitmapIcon) },
        { },
    };

    static PyType_Spec type_spec_WebUICommandBarBitmapIcon =
    {
        "_winsdk_Windows_UI_WebUI_Core.WebUICommandBarBitmapIcon",
        sizeof(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebUICommandBarBitmapIcon
    };

    // ----- WebUICommandBarConfirmationButton class --------------------
    static constexpr const char* const type_name_WebUICommandBarConfirmationButton = "WebUICommandBarConfirmationButton";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton 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_WebUICommandBarConfirmationButton(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebUICommandBarConfirmationButton_get_Text(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarConfirmationButton", L"Text"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBarConfirmationButton_put_Text(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarConfirmationButton", L"Text"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBarConfirmationButton_add_ItemInvoked(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBarConfirmationButton", L"ItemInvoked"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton, winrt::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs>>(arg);

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

    static PyObject* WebUICommandBarConfirmationButton_remove_ItemInvoked(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBarConfirmationButton", L"ItemInvoked"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _assign_array_WebUICommandBarConfirmationButton(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebUICommandBarConfirmationButton(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::UI::WebUI::Core::WebUICommandBarConfirmationButton>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebUICommandBarConfirmationButton[] = {
        { "add_item_invoked", reinterpret_cast<PyCFunction>(WebUICommandBarConfirmationButton_add_ItemInvoked), METH_O, nullptr },
        { "remove_item_invoked", reinterpret_cast<PyCFunction>(WebUICommandBarConfirmationButton_remove_ItemInvoked), METH_O, nullptr },
        { "_assign_array_", _assign_array_WebUICommandBarConfirmationButton, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebUICommandBarConfirmationButton), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebUICommandBarConfirmationButton[] = {
        { "text", reinterpret_cast<getter>(WebUICommandBarConfirmationButton_get_Text), reinterpret_cast<setter>(WebUICommandBarConfirmationButton_put_Text), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebUICommandBarConfirmationButton[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebUICommandBarConfirmationButton) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebUICommandBarConfirmationButton) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebUICommandBarConfirmationButton) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebUICommandBarConfirmationButton) },
        { },
    };

    static PyType_Spec type_spec_WebUICommandBarConfirmationButton =
    {
        "_winsdk_Windows_UI_WebUI_Core.WebUICommandBarConfirmationButton",
        sizeof(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebUICommandBarConfirmationButton
    };

    // ----- WebUICommandBarIconButton class --------------------
    static constexpr const char* const type_name_WebUICommandBarIconButton = "WebUICommandBarIconButton";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::UI::WebUI::Core::WebUICommandBarIconButton 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_WebUICommandBarIconButton(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebUICommandBarIconButton_get_Label(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"Label"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBarIconButton_put_Label(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"Label"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBarIconButton_get_IsToggleButton(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"IsToggleButton"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBarIconButton_put_IsToggleButton(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"IsToggleButton"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBarIconButton_get_IsChecked(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"IsChecked"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBarIconButton_put_IsChecked(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"IsChecked"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBarIconButton_get_Icon(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"Icon"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBarIconButton_put_Icon(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"Icon"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

        try
        {
            auto param0 = py::convert_to<winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon>(arg);

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

    static PyObject* WebUICommandBarIconButton_get_Enabled(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"Enabled"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBarIconButton_put_Enabled(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"Enabled"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* WebUICommandBarIconButton_add_ItemInvoked(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"ItemInvoked"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::WebUI::Core::WebUICommandBarIconButton, winrt::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs>>(arg);

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

    static PyObject* WebUICommandBarIconButton_remove_ItemInvoked(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.WebUI.Core.WebUICommandBarIconButton", L"ItemInvoked"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _assign_array_WebUICommandBarIconButton(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::WebUI::Core::WebUICommandBarIconButton>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebUICommandBarIconButton(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::UI::WebUI::Core::WebUICommandBarIconButton>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebUICommandBarIconButton[] = {
        { "add_item_invoked", reinterpret_cast<PyCFunction>(WebUICommandBarIconButton_add_ItemInvoked), METH_O, nullptr },
        { "remove_item_invoked", reinterpret_cast<PyCFunction>(WebUICommandBarIconButton_remove_ItemInvoked), METH_O, nullptr },
        { "_assign_array_", _assign_array_WebUICommandBarIconButton, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebUICommandBarIconButton), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebUICommandBarIconButton[] = {
        { "label", reinterpret_cast<getter>(WebUICommandBarIconButton_get_Label), reinterpret_cast<setter>(WebUICommandBarIconButton_put_Label), nullptr, nullptr },
        { "is_toggle_button", reinterpret_cast<getter>(WebUICommandBarIconButton_get_IsToggleButton), reinterpret_cast<setter>(WebUICommandBarIconButton_put_IsToggleButton), nullptr, nullptr },
        { "is_checked", reinterpret_cast<getter>(WebUICommandBarIconButton_get_IsChecked), reinterpret_cast<setter>(WebUICommandBarIconButton_put_IsChecked), nullptr, nullptr },
        { "icon", reinterpret_cast<getter>(WebUICommandBarIconButton_get_Icon), reinterpret_cast<setter>(WebUICommandBarIconButton_put_Icon), nullptr, nullptr },
        { "enabled", reinterpret_cast<getter>(WebUICommandBarIconButton_get_Enabled), reinterpret_cast<setter>(WebUICommandBarIconButton_put_Enabled), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebUICommandBarIconButton[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebUICommandBarIconButton) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebUICommandBarIconButton) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebUICommandBarIconButton) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebUICommandBarIconButton) },
        { },
    };

    static PyType_Spec type_spec_WebUICommandBarIconButton =
    {
        "_winsdk_Windows_UI_WebUI_Core.WebUICommandBarIconButton",
        sizeof(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarIconButton),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebUICommandBarIconButton
    };

    // ----- WebUICommandBarItemInvokedEventArgs class --------------------
    static constexpr const char* const type_name_WebUICommandBarItemInvokedEventArgs = "WebUICommandBarItemInvokedEventArgs";

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

    static void _dealloc_WebUICommandBarItemInvokedEventArgs(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebUICommandBarItemInvokedEventArgs_get_IsPrimaryCommand(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarItemInvokedEventArgs", L"IsPrimaryCommand"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_WebUICommandBarItemInvokedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebUICommandBarItemInvokedEventArgs(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::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebUICommandBarItemInvokedEventArgs[] = {
        { "_assign_array_", _assign_array_WebUICommandBarItemInvokedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebUICommandBarItemInvokedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebUICommandBarItemInvokedEventArgs[] = {
        { "is_primary_command", reinterpret_cast<getter>(WebUICommandBarItemInvokedEventArgs_get_IsPrimaryCommand), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebUICommandBarItemInvokedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebUICommandBarItemInvokedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebUICommandBarItemInvokedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebUICommandBarItemInvokedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebUICommandBarItemInvokedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_WebUICommandBarItemInvokedEventArgs =
    {
        "_winsdk_Windows_UI_WebUI_Core.WebUICommandBarItemInvokedEventArgs",
        sizeof(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebUICommandBarItemInvokedEventArgs
    };

    // ----- WebUICommandBarSizeChangedEventArgs class --------------------
    static constexpr const char* const type_name_WebUICommandBarSizeChangedEventArgs = "WebUICommandBarSizeChangedEventArgs";

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

    static void _dealloc_WebUICommandBarSizeChangedEventArgs(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

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

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

    static PyObject* _assign_array_WebUICommandBarSizeChangedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebUICommandBarSizeChangedEventArgs(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::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebUICommandBarSizeChangedEventArgs[] = {
        { "_assign_array_", _assign_array_WebUICommandBarSizeChangedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebUICommandBarSizeChangedEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebUICommandBarSizeChangedEventArgs[] = {
        { "size", reinterpret_cast<getter>(WebUICommandBarSizeChangedEventArgs_get_Size), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebUICommandBarSizeChangedEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebUICommandBarSizeChangedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebUICommandBarSizeChangedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebUICommandBarSizeChangedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebUICommandBarSizeChangedEventArgs) },
        { },
    };

    static PyType_Spec type_spec_WebUICommandBarSizeChangedEventArgs =
    {
        "_winsdk_Windows_UI_WebUI_Core.WebUICommandBarSizeChangedEventArgs",
        sizeof(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebUICommandBarSizeChangedEventArgs
    };

    // ----- WebUICommandBarSymbolIcon class --------------------
    static constexpr const char* const type_name_WebUICommandBarSymbolIcon = "WebUICommandBarSymbolIcon";

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

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

                winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 0)
        {
            try
            {
                winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon 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_WebUICommandBarSymbolIcon(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebUICommandBarSymbolIcon_get_Symbol(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarSymbolIcon", L"Symbol"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebUICommandBarSymbolIcon_put_Symbol(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.WebUI.Core.WebUICommandBarSymbolIcon", L"Symbol"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* _assign_array_WebUICommandBarSymbolIcon(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebUICommandBarSymbolIcon(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::UI::WebUI::Core::WebUICommandBarSymbolIcon>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebUICommandBarSymbolIcon[] = {
        { "_assign_array_", _assign_array_WebUICommandBarSymbolIcon, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebUICommandBarSymbolIcon), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebUICommandBarSymbolIcon[] = {
        { "symbol", reinterpret_cast<getter>(WebUICommandBarSymbolIcon_get_Symbol), reinterpret_cast<setter>(WebUICommandBarSymbolIcon_put_Symbol), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebUICommandBarSymbolIcon[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebUICommandBarSymbolIcon) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebUICommandBarSymbolIcon) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebUICommandBarSymbolIcon) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebUICommandBarSymbolIcon) },
        { },
    };

    static PyType_Spec type_spec_WebUICommandBarSymbolIcon =
    {
        "_winsdk_Windows_UI_WebUI_Core.WebUICommandBarSymbolIcon",
        sizeof(py::wrapper::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebUICommandBarSymbolIcon
    };

    // ----- IWebUICommandBarElement interface --------------------
    static constexpr const char* const type_name_IWebUICommandBarElement = "IWebUICommandBarElement";

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

    static void _dealloc_IWebUICommandBarElement(py::wrapper::Windows::UI::WebUI::Core::IWebUICommandBarElement* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* _assign_array_IWebUICommandBarElement(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::WebUI::Core::IWebUICommandBarElement>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_IWebUICommandBarElement(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::UI::WebUI::Core::IWebUICommandBarElement>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IWebUICommandBarElement[] = {
        { "_assign_array_", _assign_array_IWebUICommandBarElement, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IWebUICommandBarElement), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IWebUICommandBarElement[] = {
        { }
    };

    static PyType_Slot _type_slots_IWebUICommandBarElement[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_IWebUICommandBarElement) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IWebUICommandBarElement) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IWebUICommandBarElement) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IWebUICommandBarElement) },
        { },
    };

    static PyType_Spec type_spec_IWebUICommandBarElement =
    {
        "_winsdk_Windows_UI_WebUI_Core.IWebUICommandBarElement",
        sizeof(py::wrapper::Windows::UI::WebUI::Core::IWebUICommandBarElement),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IWebUICommandBarElement
    };

    // ----- IWebUICommandBarIcon interface --------------------
    static constexpr const char* const type_name_IWebUICommandBarIcon = "IWebUICommandBarIcon";

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

    static void _dealloc_IWebUICommandBarIcon(py::wrapper::Windows::UI::WebUI::Core::IWebUICommandBarIcon* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* _assign_array_IWebUICommandBarIcon(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_IWebUICommandBarIcon(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::UI::WebUI::Core::IWebUICommandBarIcon>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IWebUICommandBarIcon[] = {
        { "_assign_array_", _assign_array_IWebUICommandBarIcon, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IWebUICommandBarIcon), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IWebUICommandBarIcon[] = {
        { }
    };

    static PyType_Slot _type_slots_IWebUICommandBarIcon[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_IWebUICommandBarIcon) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IWebUICommandBarIcon) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IWebUICommandBarIcon) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IWebUICommandBarIcon) },
        { },
    };

    static PyType_Spec type_spec_IWebUICommandBarIcon =
    {
        "_winsdk_Windows_UI_WebUI_Core.IWebUICommandBarIcon",
        sizeof(py::wrapper::Windows::UI::WebUI::Core::IWebUICommandBarIcon),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IWebUICommandBarIcon
    };

    // ----- Windows.UI.WebUI.Core Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::UI::WebUI::Core");

    static PyMethodDef module_methods[] = {
        {"_register_WebUICommandBarClosedDisplayMode", register_WebUICommandBarClosedDisplayMode, METH_O, "registers type"},
        {}};


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

        if (!state)
        {
            return 0;
        }

        Py_VISIT(state->type_WebUICommandBarClosedDisplayMode);
        Py_VISIT(state->type_WebUICommandBar);
        Py_VISIT(state->type_WebUICommandBarBitmapIcon);
        Py_VISIT(state->type_WebUICommandBarConfirmationButton);
        Py_VISIT(state->type_WebUICommandBarIconButton);
        Py_VISIT(state->type_WebUICommandBarItemInvokedEventArgs);
        Py_VISIT(state->type_WebUICommandBarSizeChangedEventArgs);
        Py_VISIT(state->type_WebUICommandBarSymbolIcon);
        Py_VISIT(state->type_IWebUICommandBarElement);
        Py_VISIT(state->type_IWebUICommandBarIcon);

        return 0;
    }

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

        if (!state)
        {
            return 0;
        }

        Py_CLEAR(state->type_WebUICommandBarClosedDisplayMode);
        Py_CLEAR(state->type_WebUICommandBar);
        Py_CLEAR(state->type_WebUICommandBarBitmapIcon);
        Py_CLEAR(state->type_WebUICommandBarConfirmationButton);
        Py_CLEAR(state->type_WebUICommandBarIconButton);
        Py_CLEAR(state->type_WebUICommandBarItemInvokedEventArgs);
        Py_CLEAR(state->type_WebUICommandBarSizeChangedEventArgs);
        Py_CLEAR(state->type_WebUICommandBarSymbolIcon);
        Py_CLEAR(state->type_IWebUICommandBarElement);
        Py_CLEAR(state->type_IWebUICommandBarIcon);

        return 0;
    }


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

} // py::cpp::Windows::UI::WebUI::Core

PyMODINIT_FUNC PyInit__winsdk_Windows_UI_WebUI_Core(void) noexcept
{
    using namespace py::cpp::Windows::UI::WebUI::Core;

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

    if (!module)
    {
        return nullptr;
    }

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

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

    if (!bases)
    {
        return nullptr;
    }

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

    if (!collections_abc_module)
    {
        return nullptr;
    }

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

    if (!sequence_type)
    {
        return nullptr;
    }

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

    if (!sequence_bases)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_type)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_bases)
    {
        return nullptr;
    }

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

    if (!mapping_type)
    {
        return nullptr;
    }

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

    if (!mapping_bases)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_type)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_bases)
    {
        return nullptr;
    }

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

    state->type_WebUICommandBar = py::register_python_type(module.get(), type_name_WebUICommandBar, &type_spec_WebUICommandBar, bases.get(), nullptr);
    if (!state->type_WebUICommandBar)
    {
        return nullptr;
    }

    state->type_WebUICommandBarBitmapIcon = py::register_python_type(module.get(), type_name_WebUICommandBarBitmapIcon, &type_spec_WebUICommandBarBitmapIcon, bases.get(), nullptr);
    if (!state->type_WebUICommandBarBitmapIcon)
    {
        return nullptr;
    }

    state->type_WebUICommandBarConfirmationButton = py::register_python_type(module.get(), type_name_WebUICommandBarConfirmationButton, &type_spec_WebUICommandBarConfirmationButton, bases.get(), nullptr);
    if (!state->type_WebUICommandBarConfirmationButton)
    {
        return nullptr;
    }

    state->type_WebUICommandBarIconButton = py::register_python_type(module.get(), type_name_WebUICommandBarIconButton, &type_spec_WebUICommandBarIconButton, bases.get(), nullptr);
    if (!state->type_WebUICommandBarIconButton)
    {
        return nullptr;
    }

    state->type_WebUICommandBarItemInvokedEventArgs = py::register_python_type(module.get(), type_name_WebUICommandBarItemInvokedEventArgs, &type_spec_WebUICommandBarItemInvokedEventArgs, bases.get(), nullptr);
    if (!state->type_WebUICommandBarItemInvokedEventArgs)
    {
        return nullptr;
    }

    state->type_WebUICommandBarSizeChangedEventArgs = py::register_python_type(module.get(), type_name_WebUICommandBarSizeChangedEventArgs, &type_spec_WebUICommandBarSizeChangedEventArgs, bases.get(), nullptr);
    if (!state->type_WebUICommandBarSizeChangedEventArgs)
    {
        return nullptr;
    }

    state->type_WebUICommandBarSymbolIcon = py::register_python_type(module.get(), type_name_WebUICommandBarSymbolIcon, &type_spec_WebUICommandBarSymbolIcon, bases.get(), nullptr);
    if (!state->type_WebUICommandBarSymbolIcon)
    {
        return nullptr;
    }

    state->type_IWebUICommandBarElement = py::register_python_type(module.get(), type_name_IWebUICommandBarElement, &type_spec_IWebUICommandBarElement, bases.get(), nullptr);
    if (!state->type_IWebUICommandBarElement)
    {
        return nullptr;
    }

    state->type_IWebUICommandBarIcon = py::register_python_type(module.get(), type_name_IWebUICommandBarIcon, &type_spec_IWebUICommandBarIcon, bases.get(), nullptr);
    if (!state->type_IWebUICommandBarIcon)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebUICommandBarClosedDisplayMode;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::WebUI::Core::WebUICommandBar>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebUICommandBar;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::WebUICommandBar is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebUICommandBarBitmapIcon;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebUICommandBarConfirmationButton;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarIconButton>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebUICommandBarIconButton;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::WebUICommandBarIconButton is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebUICommandBarItemInvokedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebUICommandBarSizeChangedEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebUICommandBarSymbolIcon;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::WebUI::Core::IWebUICommandBarElement>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_IWebUICommandBarElement;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::IWebUICommandBarElement is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::WebUI::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_IWebUICommandBarIcon;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon is not registered");
        return nullptr;
    }

    return python_type;
}
