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

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


namespace py::cpp::Windows::Devices::Haptics
{
    struct module_state
    {
        PyObject* type_VibrationAccessStatus;
        PyTypeObject* type_KnownSimpleHapticsControllerWaveforms;
        PyTypeObject* type_SimpleHapticsController;
        PyTypeObject* type_SimpleHapticsControllerFeedback;
        PyTypeObject* type_VibrationDevice;
    };

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

        if (state->type_VibrationAccessStatus)
        {
            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_VibrationAccessStatus = type;
        Py_INCREF(state->type_VibrationAccessStatus);


        Py_RETURN_NONE;
    }

    // ----- KnownSimpleHapticsControllerWaveforms class --------------------
    static constexpr const char* const type_name_KnownSimpleHapticsControllerWaveforms = "KnownSimpleHapticsControllerWaveforms";

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

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_BuzzContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"BuzzContinuous"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::BuzzContinuous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Click(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Click"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Click());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Press(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Press"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Press());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Release(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Release"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Release());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_RumbleContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"RumbleContinuous"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::RumbleContinuous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_BrushContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"BrushContinuous"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::BrushContinuous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_ChiselMarkerContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"ChiselMarkerContinuous"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::ChiselMarkerContinuous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_EraserContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"EraserContinuous"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::EraserContinuous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Error(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Error"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Error());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_GalaxyPenContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"GalaxyPenContinuous"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::GalaxyPenContinuous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Hover(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Hover"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::Hover());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_InkContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"InkContinuous"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::InkContinuous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_MarkerContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"MarkerContinuous"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::MarkerContinuous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_PencilContinuous(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"PencilContinuous"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms::PencilContinuous());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* KnownSimpleHapticsControllerWaveforms_get_Success(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms", L"Success"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(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 =
    {
        "_winsdk_Windows_Devices_Haptics.KnownSimpleHapticsControllerWaveforms",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_KnownSimpleHapticsControllerWaveforms
    };

    static PyGetSetDef getset_KnownSimpleHapticsControllerWaveforms_Meta[] = {
        { "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 PyType_Slot type_slots_KnownSimpleHapticsControllerWaveforms_Meta[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_KnownSimpleHapticsControllerWaveforms_Meta) },
        { }
    };

    static PyType_Spec type_spec_KnownSimpleHapticsControllerWaveforms_Meta =
    {
        "_winsdk_Windows_Devices_Haptics.KnownSimpleHapticsControllerWaveforms_Meta",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_KnownSimpleHapticsControllerWaveforms_Meta
    };

    // ----- SimpleHapticsController class --------------------
    static constexpr const char* const type_name_SimpleHapticsController = "SimpleHapticsController";

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

    static void _dealloc_SimpleHapticsController(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* 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* SimpleHapticsController_SendHapticFeedback(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"SendHapticFeedback", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                self->obj.SendHapticFeedback(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"SendHapticFeedback", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                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_SendHapticFeedbackForDuration(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"SendHapticFeedbackForDuration", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                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);

                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_Size(args);

        if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"SendHapticFeedbackForPlayCount", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                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);

                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_StopFeedback(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"StopFeedback", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                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
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsController", L"Id"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

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

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

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

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

        try
        {
            return py::convert(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 },
        { "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 =
    {
        "_winsdk_Windows_Devices_Haptics.SimpleHapticsController",
        sizeof(py::wrapper::Windows::Devices::Haptics::SimpleHapticsController),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SimpleHapticsController
    };

    // ----- SimpleHapticsControllerFeedback class --------------------
    static constexpr const char* const type_name_SimpleHapticsControllerFeedback = "SimpleHapticsControllerFeedback";

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

    static void _dealloc_SimpleHapticsControllerFeedback(py::wrapper::Windows::Devices::Haptics::SimpleHapticsControllerFeedback* 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* SimpleHapticsControllerFeedback_get_Duration(py::wrapper::Windows::Devices::Haptics::SimpleHapticsControllerFeedback* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.SimpleHapticsControllerFeedback", L"Duration"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

        try
        {
            return py::convert(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 =
    {
        "_winsdk_Windows_Devices_Haptics.SimpleHapticsControllerFeedback",
        sizeof(py::wrapper::Windows::Devices::Haptics::SimpleHapticsControllerFeedback),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SimpleHapticsControllerFeedback
    };

    // ----- VibrationDevice class --------------------
    static constexpr const char* const type_name_VibrationDevice = "VibrationDevice";

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

    static void _dealloc_VibrationDevice(py::wrapper::Windows::Devices::Haptics::VibrationDevice* 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* VibrationDevice_FindAllAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"FindAllAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(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_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"FromIdAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::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_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"GetDefaultAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(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_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"GetDeviceSelector", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(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_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Haptics.VibrationDevice", L"RequestAccessAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(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
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Haptics.VibrationDevice", L"Id"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

        try
        {
            return py::convert(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[] = {
        { "find_all_async", reinterpret_cast<PyCFunction>(VibrationDevice_FindAllAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "from_id_async", reinterpret_cast<PyCFunction>(VibrationDevice_FromIdAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "get_default_async", reinterpret_cast<PyCFunction>(VibrationDevice_GetDefaultAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "get_device_selector", reinterpret_cast<PyCFunction>(VibrationDevice_GetDeviceSelector), METH_VARARGS | METH_STATIC, nullptr },
        { "request_access_async", reinterpret_cast<PyCFunction>(VibrationDevice_RequestAccessAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "_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 =
    {
        "_winsdk_Windows_Devices_Haptics.VibrationDevice",
        sizeof(py::wrapper::Windows::Devices::Haptics::VibrationDevice),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_VibrationDevice
    };

    // ----- Windows.Devices.Haptics Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Devices::Haptics");

    static PyMethodDef module_methods[] = {
        {"_register_VibrationAccessStatus", register_VibrationAccessStatus, 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_VibrationAccessStatus);
        Py_VISIT(state->type_KnownSimpleHapticsControllerWaveforms);
        Py_VISIT(state->type_SimpleHapticsController);
        Py_VISIT(state->type_SimpleHapticsControllerFeedback);
        Py_VISIT(state->type_VibrationDevice);

        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_VibrationAccessStatus);
        Py_CLEAR(state->type_KnownSimpleHapticsControllerWaveforms);
        Py_CLEAR(state->type_SimpleHapticsController);
        Py_CLEAR(state->type_SimpleHapticsControllerFeedback);
        Py_CLEAR(state->type_VibrationDevice);

        return 0;
    }


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

} // py::cpp::Windows::Devices::Haptics

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

    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);

    py::pyobj_handle type_KnownSimpleHapticsControllerWaveforms_Meta{PyType_FromSpec(&type_spec_KnownSimpleHapticsControllerWaveforms_Meta)};
    if (!type_KnownSimpleHapticsControllerWaveforms_Meta)
    {
        return nullptr;
    }

    state->type_KnownSimpleHapticsControllerWaveforms = py::register_python_type(module.get(), type_name_KnownSimpleHapticsControllerWaveforms, &type_spec_KnownSimpleHapticsControllerWaveforms, nullptr, reinterpret_cast<PyTypeObject*>(type_KnownSimpleHapticsControllerWaveforms_Meta.get()));
    if (!state->type_KnownSimpleHapticsControllerWaveforms)
    {
        return nullptr;
    }

    state->type_SimpleHapticsController = py::register_python_type(module.get(), type_name_SimpleHapticsController, &type_spec_SimpleHapticsController, bases.get(), nullptr);
    if (!state->type_SimpleHapticsController)
    {
        return nullptr;
    }

    state->type_SimpleHapticsControllerFeedback = py::register_python_type(module.get(), type_name_SimpleHapticsControllerFeedback, &type_spec_SimpleHapticsControllerFeedback, bases.get(), nullptr);
    if (!state->type_SimpleHapticsControllerFeedback)
    {
        return nullptr;
    }

    state->type_VibrationDevice = py::register_python_type(module.get(), type_name_VibrationDevice, &type_spec_VibrationDevice, bases.get(), nullptr);
    if (!state->type_VibrationDevice)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::Devices::Haptics::VibrationAccessStatus>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Haptics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_VibrationAccessStatus;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Haptics::VibrationAccessStatus is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Haptics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_KnownSimpleHapticsControllerWaveforms;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Haptics::KnownSimpleHapticsControllerWaveforms is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Haptics::SimpleHapticsController>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Haptics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SimpleHapticsController;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Haptics::SimpleHapticsController is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Haptics::SimpleHapticsControllerFeedback>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Haptics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SimpleHapticsControllerFeedback;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Haptics::SimpleHapticsControllerFeedback is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Devices::Haptics::VibrationDevice>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Devices::Haptics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_VibrationDevice;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Devices::Haptics::VibrationDevice is not registered");
        return nullptr;
    }

    return python_type;
}
