// WARNING: Please don't edit this file. It was generated by Python/WinRT v3.2.1

#include "py.Windows.Devices.Haptics.h"

namespace py::cpp::Windows::Devices::Haptics
{
    // ----- KnownSimpleHapticsControllerWaveforms class --------------------

    static PyObject* _new_KnownSimpleHapticsControllerWaveforms(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms>::type_name);
        return nullptr;
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_BuzzContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"BuzzContinuous");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::BuzzContinuous();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Click(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Click");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Click();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Press(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Press");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Press();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Release(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Release");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Release();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_RumbleContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"RumbleContinuous");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::RumbleContinuous();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_BrushContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"BrushContinuous");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::BrushContinuous();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_ChiselMarkerContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"ChiselMarkerContinuous");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::ChiselMarkerContinuous();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_EraserContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"EraserContinuous");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::EraserContinuous();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Error(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Error");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Error();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_GalaxyPenContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"GalaxyPenContinuous");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::GalaxyPenContinuous();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Hover(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Hover");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Hover();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_InkContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"InkContinuous");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::InkContinuous();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_MarkerContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"MarkerContinuous");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::MarkerContinuous();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_PencilContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"PencilContinuous");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::PencilContinuous();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Success(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Success");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Success();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_KnownSimpleHapticsControllerWaveforms[] = {
        { }};

    static PyGetSetDef _getset_KnownSimpleHapticsControllerWaveforms[] = {
        { }};

    static PyType_Slot _type_slots_KnownSimpleHapticsControllerWaveforms[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_KnownSimpleHapticsControllerWaveforms) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_KnownSimpleHapticsControllerWaveforms) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_KnownSimpleHapticsControllerWaveforms) },
        { }};

    static PyType_Spec type_spec_KnownSimpleHapticsControllerWaveforms = {
        "winrt._winrt_windows_devices_haptics.KnownSimpleHapticsControllerWaveforms",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_KnownSimpleHapticsControllerWaveforms};

    static PyGetSetDef getset_KnownSimpleHapticsControllerWaveforms_Static[] = {
        { "buzz_continuous", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_BuzzContinuous), nullptr, nullptr, nullptr },
        { "click", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_Click), nullptr, nullptr, nullptr },
        { "press", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_Press), nullptr, nullptr, nullptr },
        { "release", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_Release), nullptr, nullptr, nullptr },
        { "rumble_continuous", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_RumbleContinuous), nullptr, nullptr, nullptr },
        { "brush_continuous", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_BrushContinuous), nullptr, nullptr, nullptr },
        { "chisel_marker_continuous", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_ChiselMarkerContinuous), nullptr, nullptr, nullptr },
        { "eraser_continuous", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_EraserContinuous), nullptr, nullptr, nullptr },
        { "error", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_Error), nullptr, nullptr, nullptr },
        { "galaxy_pen_continuous", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_GalaxyPenContinuous), nullptr, nullptr, nullptr },
        { "hover", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_Hover), nullptr, nullptr, nullptr },
        { "ink_continuous", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_InkContinuous), nullptr, nullptr, nullptr },
        { "marker_continuous", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_MarkerContinuous), nullptr, nullptr, nullptr },
        { "pencil_continuous", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_PencilContinuous), nullptr, nullptr, nullptr },
        { "success", reinterpret_cast<getter>(KnownSimpleHapticsControllerWaveforms_get_Success), nullptr, nullptr, nullptr },
        { }};

    static PyMethodDef methods_KnownSimpleHapticsControllerWaveforms_Static[] = {
        { }};

    static PyType_Slot type_slots_KnownSimpleHapticsControllerWaveforms_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_KnownSimpleHapticsControllerWaveforms_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_KnownSimpleHapticsControllerWaveforms_Static) },
        { }
    };

    static PyType_Spec type_spec_KnownSimpleHapticsControllerWaveforms_Static = {
        "winrt._winrt_windows_devices_haptics.KnownSimpleHapticsControllerWaveforms_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_KnownSimpleHapticsControllerWaveforms_Static};

    // ----- SimpleHapticsController class --------------------

    static PyObject* _new_SimpleHapticsController(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Haptics::SimpleHapticsController>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Haptics::SimpleHapticsController>::type_name);
        return nullptr;
    }

    static void _dealloc_SimpleHapticsController(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* SimpleHapticsController_SendHapticFeedback(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"SendHapticFeedback", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Haptics::SimpleHapticsControllerFeedback>(args, 0);

                {
                    auto _gil = release_gil();
                    self->obj.SendHapticFeedback(param0);
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_SendHapticFeedbackForDuration(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 3)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"SendHapticFeedbackForDuration", 3);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(3);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Haptics::SimpleHapticsControllerFeedback>(args, 0);
                auto param1 = py::convert_to<double>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 2);

                {
                    auto _gil = release_gil();
                    self->obj.SendHapticFeedbackForDuration(param0, param1, param2);
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_SendHapticFeedbackForPlayCount(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 4)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"SendHapticFeedbackForPlayCount", 4);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(4);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Haptics::SimpleHapticsControllerFeedback>(args, 0);
                auto param1 = py::convert_to<double>(args, 1);
                auto param2 = py::convert_to<int32_t>(args, 2);
                auto param3 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 3);

                {
                    auto _gil = release_gil();
                    self->obj.SendHapticFeedbackForPlayCount(param0, param1, param2, param3);
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_SendHapticFeedbackWithIntensity(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 2)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"SendHapticFeedback", 2);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(2);
                    return nullptr;
                }

                auto param0 = py::convert_to<winrt::Windows::Devices::Haptics::SimpleHapticsControllerFeedback>(args, 0);
                auto param1 = py::convert_to<double>(args, 1);

                {
                    auto _gil = release_gil();
                    self->obj.SendHapticFeedback(param0, param1);
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_StopFeedback(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"StopFeedback", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                {
                    auto _gil = release_gil();
                    self->obj.StopFeedback();
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_get_Id(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"Id");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Id();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_get_IsIntensitySupported(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"IsIntensitySupported");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.IsIntensitySupported();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_get_IsPlayCountSupported(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"IsPlayCountSupported");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.IsPlayCountSupported();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_get_IsPlayDurationSupported(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"IsPlayDurationSupported");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.IsPlayDurationSupported();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_get_IsReplayPauseIntervalSupported(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"IsReplayPauseIntervalSupported");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.IsReplayPauseIntervalSupported();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsController_get_SupportedFeedback(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"SupportedFeedback");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.SupportedFeedback();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

    static PyObject* _from_SimpleHapticsController(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::Devices::Haptics::SimpleHapticsController>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_SimpleHapticsController[] = {
        { "send_haptic_feedback", reinterpret_cast<PyCFunction>(SimpleHapticsController_SendHapticFeedback), METH_VARARGS, nullptr },
        { "send_haptic_feedback_for_duration", reinterpret_cast<PyCFunction>(SimpleHapticsController_SendHapticFeedbackForDuration), METH_VARARGS, nullptr },
        { "send_haptic_feedback_for_play_count", reinterpret_cast<PyCFunction>(SimpleHapticsController_SendHapticFeedbackForPlayCount), METH_VARARGS, nullptr },
        { "send_haptic_feedback_with_intensity", reinterpret_cast<PyCFunction>(SimpleHapticsController_SendHapticFeedbackWithIntensity), METH_VARARGS, nullptr },
        { "stop_feedback", reinterpret_cast<PyCFunction>(SimpleHapticsController_StopFeedback), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_SimpleHapticsController, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_SimpleHapticsController), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_SimpleHapticsController[] = {
        { "id", reinterpret_cast<getter>(SimpleHapticsController_get_Id), nullptr, nullptr, nullptr },
        { "is_intensity_supported", reinterpret_cast<getter>(SimpleHapticsController_get_IsIntensitySupported), nullptr, nullptr, nullptr },
        { "is_play_count_supported", reinterpret_cast<getter>(SimpleHapticsController_get_IsPlayCountSupported), nullptr, nullptr, nullptr },
        { "is_play_duration_supported", reinterpret_cast<getter>(SimpleHapticsController_get_IsPlayDurationSupported), nullptr, nullptr, nullptr },
        { "is_replay_pause_interval_supported", reinterpret_cast<getter>(SimpleHapticsController_get_IsReplayPauseIntervalSupported), nullptr, nullptr, nullptr },
        { "supported_feedback", reinterpret_cast<getter>(SimpleHapticsController_get_SupportedFeedback), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_SimpleHapticsController[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_SimpleHapticsController) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SimpleHapticsController) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_SimpleHapticsController) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SimpleHapticsController) },
        { }};

    static PyType_Spec type_spec_SimpleHapticsController = {
        "winrt._winrt_windows_devices_haptics.SimpleHapticsController",
        sizeof(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SimpleHapticsController};

    // ----- SimpleHapticsControllerFeedback class --------------------

    static PyObject* _new_SimpleHapticsControllerFeedback(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Haptics::SimpleHapticsControllerFeedback>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Haptics::SimpleHapticsControllerFeedback>::type_name);
        return nullptr;
    }

    static void _dealloc_SimpleHapticsControllerFeedback(py::wrapper::Windows::Devices::Haptics::SimpleHapticsControllerFeedback* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* SimpleHapticsControllerFeedback_get_Duration(py::wrapper::Windows::Devices::Haptics::SimpleHapticsControllerFeedback* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsControllerFeedback", L"Duration");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Duration();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* SimpleHapticsControllerFeedback_get_Waveform(py::wrapper::Windows::Devices::Haptics::SimpleHapticsControllerFeedback* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsControllerFeedback", L"Waveform");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Waveform();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

    static PyObject* _from_SimpleHapticsControllerFeedback(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::Devices::Haptics::SimpleHapticsControllerFeedback>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_SimpleHapticsControllerFeedback[] = {
        { "_assign_array_", _assign_array_SimpleHapticsControllerFeedback, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_SimpleHapticsControllerFeedback), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_SimpleHapticsControllerFeedback[] = {
        { "duration", reinterpret_cast<getter>(SimpleHapticsControllerFeedback_get_Duration), nullptr, nullptr, nullptr },
        { "waveform", reinterpret_cast<getter>(SimpleHapticsControllerFeedback_get_Waveform), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_SimpleHapticsControllerFeedback[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_SimpleHapticsControllerFeedback) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SimpleHapticsControllerFeedback) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_SimpleHapticsControllerFeedback) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SimpleHapticsControllerFeedback) },
        { }};

    static PyType_Spec type_spec_SimpleHapticsControllerFeedback = {
        "winrt._winrt_windows_devices_haptics.SimpleHapticsControllerFeedback",
        sizeof(py::wrapper::Windows::Devices::Haptics::SimpleHapticsControllerFeedback),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SimpleHapticsControllerFeedback};

    // ----- VibrationDevice class --------------------

    static PyObject* _new_VibrationDevice(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Devices::Haptics::VibrationDevice>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Haptics::VibrationDevice>::type_name);
        return nullptr;
    }

    static void _dealloc_VibrationDevice(py::wrapper::Windows::Devices::Haptics::VibrationDevice* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* VibrationDevice_FindAllAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"FindAllAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Haptics::VibrationDevice::FindAllAsync();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VibrationDevice_FromIdAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 1)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"FromIdAsync", 1);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(1);
                    return nullptr;
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Haptics::VibrationDevice::FromIdAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VibrationDevice_GetDefaultAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"GetDefaultAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Haptics::VibrationDevice::GetDefaultAsync();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VibrationDevice_GetDeviceSelector(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"GetDeviceSelector", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Haptics::VibrationDevice::GetDeviceSelector();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VibrationDevice_RequestAccessAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_SIZE(args);

        if (arg_count == 0)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"RequestAccessAsync", 0);
                }

                if (!is_overload_present.value())
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Windows::Devices::Haptics::VibrationDevice::RequestAccessAsync();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* VibrationDevice_get_Id(py::wrapper::Windows::Devices::Haptics::VibrationDevice* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.VibrationDevice", L"Id");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Id();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* VibrationDevice_get_SimpleHapticsController(py::wrapper::Windows::Devices::Haptics::VibrationDevice* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.VibrationDevice", L"SimpleHapticsController");
            }

            if (!is_property_present.value())
            {
                PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
                return nullptr;
            }

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.SimpleHapticsController();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

    static PyObject* _from_VibrationDevice(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::Devices::Haptics::VibrationDevice>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_VibrationDevice[] = {
        { "_assign_array_", _assign_array_VibrationDevice, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_VibrationDevice), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_VibrationDevice[] = {
        { "id", reinterpret_cast<getter>(VibrationDevice_get_Id), nullptr, nullptr, nullptr },
        { "simple_haptics_controller", reinterpret_cast<getter>(VibrationDevice_get_SimpleHapticsController), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_VibrationDevice[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_VibrationDevice) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_VibrationDevice) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_VibrationDevice) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_VibrationDevice) },
        { }};

    static PyType_Spec type_spec_VibrationDevice = {
        "winrt._winrt_windows_devices_haptics.VibrationDevice",
        sizeof(py::wrapper::Windows::Devices::Haptics::VibrationDevice),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_VibrationDevice};

    static PyGetSetDef getset_VibrationDevice_Static[] = {
        { }};

    static PyMethodDef methods_VibrationDevice_Static[] = {
        { "find_all_async", reinterpret_cast<PyCFunction>(VibrationDevice_FindAllAsync), METH_VARARGS, nullptr },
        { "from_id_async", reinterpret_cast<PyCFunction>(VibrationDevice_FromIdAsync), METH_VARARGS, nullptr },
        { "get_default_async", reinterpret_cast<PyCFunction>(VibrationDevice_GetDefaultAsync), METH_VARARGS, nullptr },
        { "get_device_selector", reinterpret_cast<PyCFunction>(VibrationDevice_GetDeviceSelector), METH_VARARGS, nullptr },
        { "request_access_async", reinterpret_cast<PyCFunction>(VibrationDevice_RequestAccessAsync), METH_VARARGS, nullptr },
        { }};

    static PyType_Slot type_slots_VibrationDevice_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_VibrationDevice_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_VibrationDevice_Static) },
        { }
    };

    static PyType_Spec type_spec_VibrationDevice_Static = {
        "winrt._winrt_windows_devices_haptics.VibrationDevice_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_VibrationDevice_Static};

    // ----- Windows.Devices.Haptics Initialization --------------------

    PyDoc_STRVAR(module_doc, "Windows.Devices.Haptics");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_winrt_windows_devices_haptics",
        module_doc,
        0,
        nullptr,
        nullptr,
        nullptr,
        nullptr,
        nullptr};
} // py::cpp::Windows::Devices::Haptics

PyMODINIT_FUNC PyInit__winrt_windows_devices_haptics(void) noexcept
{
    using namespace py::cpp::Windows::Devices::Haptics;

    if (py::import_winrt_runtime() == -1)
    {
        return nullptr;
    }

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

    if (!module)
    {
        return nullptr;
    }

    auto inspectable_meta_type = py::get_inspectable_meta_type();
    if (!inspectable_meta_type)
    {
        return nullptr;
    }

    auto object_type = py::get_object_type();
    if (!object_type)
    {
        return nullptr;
    }

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

    if (!object_bases)
    {
        return nullptr;
    }

    py::pyobj_handle KnownSimpleHapticsControllerWaveforms_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
    if (!KnownSimpleHapticsControllerWaveforms_Static_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_KnownSimpleHapticsControllerWaveforms_Static{PyType_FromSpecWithBases(&type_spec_KnownSimpleHapticsControllerWaveforms_Static, KnownSimpleHapticsControllerWaveforms_Static_bases.get())};
    if (!type_KnownSimpleHapticsControllerWaveforms_Static)
    {
        return nullptr;
    }

    py::pytype_handle KnownSimpleHapticsControllerWaveforms_type{py::register_python_type(module.get(), &type_spec_KnownSimpleHapticsControllerWaveforms, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_KnownSimpleHapticsControllerWaveforms_Static.get()))};
    if (!KnownSimpleHapticsControllerWaveforms_type)
    {
        return nullptr;
    }

    py::pytype_handle SimpleHapticsController_type{py::register_python_type(module.get(), &type_spec_SimpleHapticsController, object_bases.get(), inspectable_meta_type)};
    if (!SimpleHapticsController_type)
    {
        return nullptr;
    }

    py::pytype_handle SimpleHapticsControllerFeedback_type{py::register_python_type(module.get(), &type_spec_SimpleHapticsControllerFeedback, object_bases.get(), inspectable_meta_type)};
    if (!SimpleHapticsControllerFeedback_type)
    {
        return nullptr;
    }

    py::pyobj_handle VibrationDevice_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
    if (!VibrationDevice_Static_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_VibrationDevice_Static{PyType_FromSpecWithBases(&type_spec_VibrationDevice_Static, VibrationDevice_Static_bases.get())};
    if (!type_VibrationDevice_Static)
    {
        return nullptr;
    }

    py::pytype_handle VibrationDevice_type{py::register_python_type(module.get(), &type_spec_VibrationDevice, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_VibrationDevice_Static.get()))};
    if (!VibrationDevice_type)
    {
        return nullptr;
    }


    return module.detach();
}
