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

#include "pybase.h"
#include "py.Windows.Gaming.Input.ForceFeedback.h"


namespace py::cpp::Windows::Gaming::Input::ForceFeedback
{
    struct module_state
    {
        PyObject* type_ConditionForceEffectKind;
        PyObject* type_ForceFeedbackEffectAxes;
        PyObject* type_ForceFeedbackEffectState;
        PyObject* type_ForceFeedbackLoadEffectResult;
        PyObject* type_PeriodicForceEffectKind;
        PyTypeObject* type_ConditionForceEffect;
        PyTypeObject* type_ConstantForceEffect;
        PyTypeObject* type_ForceFeedbackMotor;
        PyTypeObject* type_PeriodicForceEffect;
        PyTypeObject* type_RampForceEffect;
        PyTypeObject* type_IForceFeedbackEffect;
    };

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

    // ----- ConditionForceEffect class --------------------
    static constexpr const char* const type_name_ConditionForceEffect = "ConditionForceEffect";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffectKind>(args, 0);

                winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_ConditionForceEffect(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect* 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* ConditionForceEffect_SetParameters(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 7)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"SetParameters", 7))
            {
                py::set_arg_count_version_error(7);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 0);
                auto param1 = py::convert_to<float>(args, 1);
                auto param2 = py::convert_to<float>(args, 2);
                auto param3 = py::convert_to<float>(args, 3);
                auto param4 = py::convert_to<float>(args, 4);
                auto param5 = py::convert_to<float>(args, 5);
                auto param6 = py::convert_to<float>(args, 6);

                self->obj.SetParameters(param0, param1, param2, param3, param4, param5, param6);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ConditionForceEffect_Start(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Start", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Start();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ConditionForceEffect_Stop(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Stop", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Stop();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ConditionForceEffect_get_Kind(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Kind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ConditionForceEffect_get_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ConditionForceEffect_put_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ConditionForceEffect_get_State(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"State"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_ConditionForceEffect(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ConditionForceEffect(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::Gaming::Input::ForceFeedback::ConditionForceEffect>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ConditionForceEffect[] = {
        { "set_parameters", reinterpret_cast<PyCFunction>(ConditionForceEffect_SetParameters), METH_VARARGS, nullptr },
        { "start", reinterpret_cast<PyCFunction>(ConditionForceEffect_Start), METH_VARARGS, nullptr },
        { "stop", reinterpret_cast<PyCFunction>(ConditionForceEffect_Stop), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ConditionForceEffect, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ConditionForceEffect), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ConditionForceEffect[] = {
        { "kind", reinterpret_cast<getter>(ConditionForceEffect_get_Kind), nullptr, nullptr, nullptr },
        { "gain", reinterpret_cast<getter>(ConditionForceEffect_get_Gain), reinterpret_cast<setter>(ConditionForceEffect_put_Gain), nullptr, nullptr },
        { "state", reinterpret_cast<getter>(ConditionForceEffect_get_State), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ConditionForceEffect[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ConditionForceEffect) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ConditionForceEffect) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ConditionForceEffect) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ConditionForceEffect) },
        { },
    };

    static PyType_Spec type_spec_ConditionForceEffect =
    {
        "_winsdk_Windows_Gaming_Input_ForceFeedback.ConditionForceEffect",
        sizeof(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ConditionForceEffect
    };

    // ----- ConstantForceEffect class --------------------
    static constexpr const char* const type_name_ConstantForceEffect = "ConstantForceEffect";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_ConstantForceEffect(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect* 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* ConstantForceEffect_SetParameters(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"SetParameters", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);

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

    static PyObject* ConstantForceEffect_SetParametersWithEnvelope(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 9)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"SetParametersWithEnvelope", 9))
            {
                py::set_arg_count_version_error(9);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 0);
                auto param1 = py::convert_to<float>(args, 1);
                auto param2 = py::convert_to<float>(args, 2);
                auto param3 = py::convert_to<float>(args, 3);
                auto param4 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 4);
                auto param5 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 5);
                auto param6 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 6);
                auto param7 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 7);
                auto param8 = py::convert_to<uint32_t>(args, 8);

                self->obj.SetParametersWithEnvelope(param0, param1, param2, param3, param4, param5, param6, param7, param8);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ConstantForceEffect_Start(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Start", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Start();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ConstantForceEffect_Stop(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Stop", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Stop();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ConstantForceEffect_get_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ConstantForceEffect_put_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ConstantForceEffect_get_State(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"State"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_ConstantForceEffect(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ConstantForceEffect(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::Gaming::Input::ForceFeedback::ConstantForceEffect>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ConstantForceEffect[] = {
        { "set_parameters", reinterpret_cast<PyCFunction>(ConstantForceEffect_SetParameters), METH_VARARGS, nullptr },
        { "set_parameters_with_envelope", reinterpret_cast<PyCFunction>(ConstantForceEffect_SetParametersWithEnvelope), METH_VARARGS, nullptr },
        { "start", reinterpret_cast<PyCFunction>(ConstantForceEffect_Start), METH_VARARGS, nullptr },
        { "stop", reinterpret_cast<PyCFunction>(ConstantForceEffect_Stop), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ConstantForceEffect, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ConstantForceEffect), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ConstantForceEffect[] = {
        { "gain", reinterpret_cast<getter>(ConstantForceEffect_get_Gain), reinterpret_cast<setter>(ConstantForceEffect_put_Gain), nullptr, nullptr },
        { "state", reinterpret_cast<getter>(ConstantForceEffect_get_State), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ConstantForceEffect[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ConstantForceEffect) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ConstantForceEffect) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ConstantForceEffect) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ConstantForceEffect) },
        { },
    };

    static PyType_Spec type_spec_ConstantForceEffect =
    {
        "_winsdk_Windows_Gaming_Input_ForceFeedback.ConstantForceEffect",
        sizeof(py::wrapper::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ConstantForceEffect
    };

    // ----- ForceFeedbackMotor class --------------------
    static constexpr const char* const type_name_ForceFeedbackMotor = "ForceFeedbackMotor";

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

    static void _dealloc_ForceFeedbackMotor(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* 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* ForceFeedbackMotor_LoadEffectAsync(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"LoadEffectAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect>(args, 0);

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

    static PyObject* ForceFeedbackMotor_PauseAllEffects(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"PauseAllEffects", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.PauseAllEffects();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ForceFeedbackMotor_ResumeAllEffects(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"ResumeAllEffects", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.ResumeAllEffects();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ForceFeedbackMotor_StopAllEffects(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"StopAllEffects", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.StopAllEffects();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ForceFeedbackMotor_TryDisableAsync(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryDisableAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.TryDisableAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ForceFeedbackMotor_TryEnableAsync(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryEnableAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.TryEnableAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ForceFeedbackMotor_TryResetAsync(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryResetAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                return py::convert(self->obj.TryResetAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ForceFeedbackMotor_TryUnloadEffectAsync(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryUnloadEffectAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect>(args, 0);

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

    static PyObject* ForceFeedbackMotor_get_MasterGain(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"MasterGain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int ForceFeedbackMotor_put_MasterGain(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"MasterGain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* ForceFeedbackMotor_get_AreEffectsPaused(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"AreEffectsPaused"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ForceFeedbackMotor_get_IsEnabled(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"IsEnabled"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ForceFeedbackMotor_get_SupportedAxes(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"SupportedAxes"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_ForceFeedbackMotor(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ForceFeedbackMotor(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::Gaming::Input::ForceFeedback::ForceFeedbackMotor>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ForceFeedbackMotor[] = {
        { "load_effect_async", reinterpret_cast<PyCFunction>(ForceFeedbackMotor_LoadEffectAsync), METH_VARARGS, nullptr },
        { "pause_all_effects", reinterpret_cast<PyCFunction>(ForceFeedbackMotor_PauseAllEffects), METH_VARARGS, nullptr },
        { "resume_all_effects", reinterpret_cast<PyCFunction>(ForceFeedbackMotor_ResumeAllEffects), METH_VARARGS, nullptr },
        { "stop_all_effects", reinterpret_cast<PyCFunction>(ForceFeedbackMotor_StopAllEffects), METH_VARARGS, nullptr },
        { "try_disable_async", reinterpret_cast<PyCFunction>(ForceFeedbackMotor_TryDisableAsync), METH_VARARGS, nullptr },
        { "try_enable_async", reinterpret_cast<PyCFunction>(ForceFeedbackMotor_TryEnableAsync), METH_VARARGS, nullptr },
        { "try_reset_async", reinterpret_cast<PyCFunction>(ForceFeedbackMotor_TryResetAsync), METH_VARARGS, nullptr },
        { "try_unload_effect_async", reinterpret_cast<PyCFunction>(ForceFeedbackMotor_TryUnloadEffectAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ForceFeedbackMotor, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ForceFeedbackMotor), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ForceFeedbackMotor[] = {
        { "master_gain", reinterpret_cast<getter>(ForceFeedbackMotor_get_MasterGain), reinterpret_cast<setter>(ForceFeedbackMotor_put_MasterGain), nullptr, nullptr },
        { "are_effects_paused", reinterpret_cast<getter>(ForceFeedbackMotor_get_AreEffectsPaused), nullptr, nullptr, nullptr },
        { "is_enabled", reinterpret_cast<getter>(ForceFeedbackMotor_get_IsEnabled), nullptr, nullptr, nullptr },
        { "supported_axes", reinterpret_cast<getter>(ForceFeedbackMotor_get_SupportedAxes), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ForceFeedbackMotor[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ForceFeedbackMotor) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ForceFeedbackMotor) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ForceFeedbackMotor) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ForceFeedbackMotor) },
        { },
    };

    static PyType_Spec type_spec_ForceFeedbackMotor =
    {
        "_winsdk_Windows_Gaming_Input_ForceFeedback.ForceFeedbackMotor",
        sizeof(py::wrapper::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ForceFeedbackMotor
    };

    // ----- PeriodicForceEffect class --------------------
    static constexpr const char* const type_name_PeriodicForceEffect = "PeriodicForceEffect";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffectKind>(args, 0);

                winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_PeriodicForceEffect(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect* 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* PeriodicForceEffect_SetParameters(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 5)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"SetParameters", 5))
            {
                py::set_arg_count_version_error(5);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 0);
                auto param1 = py::convert_to<float>(args, 1);
                auto param2 = py::convert_to<float>(args, 2);
                auto param3 = py::convert_to<float>(args, 3);
                auto param4 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 4);

                self->obj.SetParameters(param0, param1, param2, param3, param4);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PeriodicForceEffect_SetParametersWithEnvelope(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 12)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"SetParametersWithEnvelope", 12))
            {
                py::set_arg_count_version_error(12);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 0);
                auto param1 = py::convert_to<float>(args, 1);
                auto param2 = py::convert_to<float>(args, 2);
                auto param3 = py::convert_to<float>(args, 3);
                auto param4 = py::convert_to<float>(args, 4);
                auto param5 = py::convert_to<float>(args, 5);
                auto param6 = py::convert_to<float>(args, 6);
                auto param7 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 7);
                auto param8 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 8);
                auto param9 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 9);
                auto param10 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 10);
                auto param11 = py::convert_to<uint32_t>(args, 11);

                self->obj.SetParametersWithEnvelope(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PeriodicForceEffect_Start(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Start", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Start();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PeriodicForceEffect_Stop(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Stop", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Stop();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* PeriodicForceEffect_get_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int PeriodicForceEffect_put_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* PeriodicForceEffect_get_State(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"State"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PeriodicForceEffect_get_Kind(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Kind"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_PeriodicForceEffect(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_PeriodicForceEffect(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::Gaming::Input::ForceFeedback::PeriodicForceEffect>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PeriodicForceEffect[] = {
        { "set_parameters", reinterpret_cast<PyCFunction>(PeriodicForceEffect_SetParameters), METH_VARARGS, nullptr },
        { "set_parameters_with_envelope", reinterpret_cast<PyCFunction>(PeriodicForceEffect_SetParametersWithEnvelope), METH_VARARGS, nullptr },
        { "start", reinterpret_cast<PyCFunction>(PeriodicForceEffect_Start), METH_VARARGS, nullptr },
        { "stop", reinterpret_cast<PyCFunction>(PeriodicForceEffect_Stop), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_PeriodicForceEffect, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PeriodicForceEffect), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PeriodicForceEffect[] = {
        { "gain", reinterpret_cast<getter>(PeriodicForceEffect_get_Gain), reinterpret_cast<setter>(PeriodicForceEffect_put_Gain), nullptr, nullptr },
        { "state", reinterpret_cast<getter>(PeriodicForceEffect_get_State), nullptr, nullptr, nullptr },
        { "kind", reinterpret_cast<getter>(PeriodicForceEffect_get_Kind), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PeriodicForceEffect[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PeriodicForceEffect) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PeriodicForceEffect) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PeriodicForceEffect) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PeriodicForceEffect) },
        { },
    };

    static PyType_Spec type_spec_PeriodicForceEffect =
    {
        "_winsdk_Windows_Gaming_Input_ForceFeedback.PeriodicForceEffect",
        sizeof(py::wrapper::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PeriodicForceEffect
    };

    // ----- RampForceEffect class --------------------
    static constexpr const char* const type_name_RampForceEffect = "RampForceEffect";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Gaming::Input::ForceFeedback::RampForceEffect instance{  };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_RampForceEffect(py::wrapper::Windows::Gaming::Input::ForceFeedback::RampForceEffect* 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* RampForceEffect_SetParameters(py::wrapper::Windows::Gaming::Input::ForceFeedback::RampForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"SetParameters", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 2);

                self->obj.SetParameters(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* RampForceEffect_SetParametersWithEnvelope(py::wrapper::Windows::Gaming::Input::ForceFeedback::RampForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 10)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"SetParametersWithEnvelope", 10))
            {
                py::set_arg_count_version_error(10);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 1);
                auto param2 = py::convert_to<float>(args, 2);
                auto param3 = py::convert_to<float>(args, 3);
                auto param4 = py::convert_to<float>(args, 4);
                auto param5 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 5);
                auto param6 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 6);
                auto param7 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 7);
                auto param8 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 8);
                auto param9 = py::convert_to<uint32_t>(args, 9);

                self->obj.SetParametersWithEnvelope(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* RampForceEffect_Start(py::wrapper::Windows::Gaming::Input::ForceFeedback::RampForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Start", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Start();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* RampForceEffect_Stop(py::wrapper::Windows::Gaming::Input::ForceFeedback::RampForceEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Stop", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Stop();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* RampForceEffect_get_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::RampForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int RampForceEffect_put_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::RampForceEffect* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* RampForceEffect_get_State(py::wrapper::Windows::Gaming::Input::ForceFeedback::RampForceEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"State"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_RampForceEffect(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Gaming::Input::ForceFeedback::RampForceEffect>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_RampForceEffect(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::Gaming::Input::ForceFeedback::RampForceEffect>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_RampForceEffect[] = {
        { "set_parameters", reinterpret_cast<PyCFunction>(RampForceEffect_SetParameters), METH_VARARGS, nullptr },
        { "set_parameters_with_envelope", reinterpret_cast<PyCFunction>(RampForceEffect_SetParametersWithEnvelope), METH_VARARGS, nullptr },
        { "start", reinterpret_cast<PyCFunction>(RampForceEffect_Start), METH_VARARGS, nullptr },
        { "stop", reinterpret_cast<PyCFunction>(RampForceEffect_Stop), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_RampForceEffect, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_RampForceEffect), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_RampForceEffect[] = {
        { "gain", reinterpret_cast<getter>(RampForceEffect_get_Gain), reinterpret_cast<setter>(RampForceEffect_put_Gain), nullptr, nullptr },
        { "state", reinterpret_cast<getter>(RampForceEffect_get_State), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_RampForceEffect[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_RampForceEffect) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_RampForceEffect) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_RampForceEffect) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_RampForceEffect) },
        { },
    };

    static PyType_Spec type_spec_RampForceEffect =
    {
        "_winsdk_Windows_Gaming_Input_ForceFeedback.RampForceEffect",
        sizeof(py::wrapper::Windows::Gaming::Input::ForceFeedback::RampForceEffect),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_RampForceEffect
    };

    // ----- IForceFeedbackEffect interface --------------------
    static constexpr const char* const type_name_IForceFeedbackEffect = "IForceFeedbackEffect";

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

    static void _dealloc_IForceFeedbackEffect(py::wrapper::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect* 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* IForceFeedbackEffect_Start(py::wrapper::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Start", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Start();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IForceFeedbackEffect_Stop(py::wrapper::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Stop", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.Stop();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* IForceFeedbackEffect_get_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int IForceFeedbackEffect_put_Gain(py::wrapper::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Gain"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

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

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

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

    static PyObject* IForceFeedbackEffect_get_State(py::wrapper::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"State"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_IForceFeedbackEffect(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_IForceFeedbackEffect(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::Gaming::Input::ForceFeedback::IForceFeedbackEffect>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IForceFeedbackEffect[] = {
        { "start", reinterpret_cast<PyCFunction>(IForceFeedbackEffect_Start), METH_VARARGS, nullptr },
        { "stop", reinterpret_cast<PyCFunction>(IForceFeedbackEffect_Stop), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_IForceFeedbackEffect, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IForceFeedbackEffect), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IForceFeedbackEffect[] = {
        { "gain", reinterpret_cast<getter>(IForceFeedbackEffect_get_Gain), reinterpret_cast<setter>(IForceFeedbackEffect_put_Gain), nullptr, nullptr },
        { "state", reinterpret_cast<getter>(IForceFeedbackEffect_get_State), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_IForceFeedbackEffect[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_IForceFeedbackEffect) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IForceFeedbackEffect) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IForceFeedbackEffect) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IForceFeedbackEffect) },
        { },
    };

    static PyType_Spec type_spec_IForceFeedbackEffect =
    {
        "_winsdk_Windows_Gaming_Input_ForceFeedback.IForceFeedbackEffect",
        sizeof(py::wrapper::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IForceFeedbackEffect
    };

    // ----- Windows.Gaming.Input.ForceFeedback Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Gaming::Input::ForceFeedback");

    static PyMethodDef module_methods[] = {
        {"_register_ConditionForceEffectKind", register_ConditionForceEffectKind, METH_O, "registers type"},
        {"_register_ForceFeedbackEffectAxes", register_ForceFeedbackEffectAxes, METH_O, "registers type"},
        {"_register_ForceFeedbackEffectState", register_ForceFeedbackEffectState, METH_O, "registers type"},
        {"_register_ForceFeedbackLoadEffectResult", register_ForceFeedbackLoadEffectResult, METH_O, "registers type"},
        {"_register_PeriodicForceEffectKind", register_PeriodicForceEffectKind, 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_ConditionForceEffectKind);
        Py_VISIT(state->type_ForceFeedbackEffectAxes);
        Py_VISIT(state->type_ForceFeedbackEffectState);
        Py_VISIT(state->type_ForceFeedbackLoadEffectResult);
        Py_VISIT(state->type_PeriodicForceEffectKind);
        Py_VISIT(state->type_ConditionForceEffect);
        Py_VISIT(state->type_ConstantForceEffect);
        Py_VISIT(state->type_ForceFeedbackMotor);
        Py_VISIT(state->type_PeriodicForceEffect);
        Py_VISIT(state->type_RampForceEffect);
        Py_VISIT(state->type_IForceFeedbackEffect);

        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_ConditionForceEffectKind);
        Py_CLEAR(state->type_ForceFeedbackEffectAxes);
        Py_CLEAR(state->type_ForceFeedbackEffectState);
        Py_CLEAR(state->type_ForceFeedbackLoadEffectResult);
        Py_CLEAR(state->type_PeriodicForceEffectKind);
        Py_CLEAR(state->type_ConditionForceEffect);
        Py_CLEAR(state->type_ConstantForceEffect);
        Py_CLEAR(state->type_ForceFeedbackMotor);
        Py_CLEAR(state->type_PeriodicForceEffect);
        Py_CLEAR(state->type_RampForceEffect);
        Py_CLEAR(state->type_IForceFeedbackEffect);

        return 0;
    }


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

} // py::cpp::Windows::Gaming::Input::ForceFeedback

PyMODINIT_FUNC PyInit__winsdk_Windows_Gaming_Input_ForceFeedback(void) noexcept
{
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

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

    if (!module)
    {
        return nullptr;
    }

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

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

    if (!bases)
    {
        return nullptr;
    }

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

    if (!collections_abc_module)
    {
        return nullptr;
    }

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

    if (!sequence_type)
    {
        return nullptr;
    }

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

    if (!sequence_bases)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_type)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_bases)
    {
        return nullptr;
    }

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

    if (!mapping_type)
    {
        return nullptr;
    }

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

    if (!mapping_bases)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_type)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_bases)
    {
        return nullptr;
    }

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

    state->type_ConditionForceEffect = py::register_python_type(module.get(), type_name_ConditionForceEffect, &type_spec_ConditionForceEffect, bases.get(), nullptr);
    if (!state->type_ConditionForceEffect)
    {
        return nullptr;
    }

    state->type_ConstantForceEffect = py::register_python_type(module.get(), type_name_ConstantForceEffect, &type_spec_ConstantForceEffect, bases.get(), nullptr);
    if (!state->type_ConstantForceEffect)
    {
        return nullptr;
    }

    state->type_ForceFeedbackMotor = py::register_python_type(module.get(), type_name_ForceFeedbackMotor, &type_spec_ForceFeedbackMotor, bases.get(), nullptr);
    if (!state->type_ForceFeedbackMotor)
    {
        return nullptr;
    }

    state->type_PeriodicForceEffect = py::register_python_type(module.get(), type_name_PeriodicForceEffect, &type_spec_PeriodicForceEffect, bases.get(), nullptr);
    if (!state->type_PeriodicForceEffect)
    {
        return nullptr;
    }

    state->type_RampForceEffect = py::register_python_type(module.get(), type_name_RampForceEffect, &type_spec_RampForceEffect, bases.get(), nullptr);
    if (!state->type_RampForceEffect)
    {
        return nullptr;
    }

    state->type_IForceFeedbackEffect = py::register_python_type(module.get(), type_name_IForceFeedbackEffect, &type_spec_IForceFeedbackEffect, bases.get(), nullptr);
    if (!state->type_IForceFeedbackEffect)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffectKind>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ConditionForceEffectKind;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffectKind is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackEffectAxes>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ForceFeedbackEffectAxes;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackEffectAxes is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackEffectState>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ForceFeedbackEffectState;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackEffectState is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackLoadEffectResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ForceFeedbackLoadEffectResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackLoadEffectResult is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffectKind>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PeriodicForceEffectKind;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffectKind is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ConditionForceEffect;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ConstantForceEffect;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ForceFeedbackMotor;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PeriodicForceEffect;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Gaming::Input::ForceFeedback::RampForceEffect>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_RampForceEffect;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::RampForceEffect is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Gaming::Input::ForceFeedback;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_IForceFeedbackEffect;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Gaming::Input::ForceFeedback::IForceFeedbackEffect is not registered");
        return nullptr;
    }

    return python_type;
}
