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

#include "py.Windows.Perception.People.h"

namespace py::cpp::Windows::Perception::People
{
    // ----- EyesPose class --------------------

    static PyObject* _new_EyesPose(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Perception::People::EyesPose>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Perception::People::EyesPose>::type_name);
        return nullptr;
    }

    static void _dealloc_EyesPose(py::wrapper::Windows::Perception::People::EyesPose* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.People.EyesPose", L"IsSupported", 0);
                }

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

                return py::convert(winrt::Windows::Perception::People::EyesPose::IsSupported());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.People.EyesPose", L"RequestAccessAsync", 0);
                }

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

                return py::convert(winrt::Windows::Perception::People::EyesPose::RequestAccessAsync());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* EyesPose_get_Gaze(py::wrapper::Windows::Perception::People::EyesPose* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.EyesPose", L"Gaze");
            }

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

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

    static PyObject* EyesPose_get_IsCalibrationValid(py::wrapper::Windows::Perception::People::EyesPose* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.EyesPose", L"IsCalibrationValid");
            }

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

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

    static PyObject* EyesPose_get_UpdateTimestamp(py::wrapper::Windows::Perception::People::EyesPose* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.EyesPose", L"UpdateTimestamp");
            }

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

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

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

    static PyObject* _from_EyesPose(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::Perception::People::EyesPose>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_EyesPose[] = {
        { "_assign_array_", _assign_array_EyesPose, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_EyesPose), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_EyesPose[] = {
        { "gaze", reinterpret_cast<getter>(EyesPose_get_Gaze), nullptr, nullptr, nullptr },
        { "is_calibration_valid", reinterpret_cast<getter>(EyesPose_get_IsCalibrationValid), nullptr, nullptr, nullptr },
        { "update_timestamp", reinterpret_cast<getter>(EyesPose_get_UpdateTimestamp), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_EyesPose[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_EyesPose) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_EyesPose) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_EyesPose) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_EyesPose) },
        { }
    };

    static PyType_Spec type_spec_EyesPose = {
        "winrt._winrt_windows_perception_people.EyesPose",
        sizeof(py::wrapper::Windows::Perception::People::EyesPose),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_EyesPose};

    static PyGetSetDef getset_EyesPose_Static[] = {
        { }
    };

    static PyMethodDef methods_EyesPose_Static[] = {
        { "is_supported", reinterpret_cast<PyCFunction>(EyesPose_IsSupported), METH_VARARGS, nullptr },
        { "request_access_async", reinterpret_cast<PyCFunction>(EyesPose_RequestAccessAsync), METH_VARARGS, nullptr },
        { }
    };

    static PyType_Slot type_slots_EyesPose_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_EyesPose_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_EyesPose_Static) },
        { }
    };

    static PyType_Spec type_spec_EyesPose_Static =
    {
        "winrt._winrt_windows_perception_people.EyesPose_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_EyesPose_Static
    };

    // ----- HandMeshObserver class --------------------

    static PyObject* _new_HandMeshObserver(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Perception::People::HandMeshObserver>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Perception::People::HandMeshObserver>::type_name);
        return nullptr;
    }

    static void _dealloc_HandMeshObserver(py::wrapper::Windows::Perception::People::HandMeshObserver* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* HandMeshObserver_GetTriangleIndices(py::wrapper::Windows::Perception::People::HandMeshObserver* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.People.HandMeshObserver", L"GetTriangleIndices", 0);
                }

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

                auto param0 = py::convert_to<py::pybuf_view<uint16_t, true>>(args, 0);

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

    static PyObject* HandMeshObserver_GetVertexStateForPose(py::wrapper::Windows::Perception::People::HandMeshObserver* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.People.HandMeshObserver", L"GetVertexStateForPose", 1);
                }

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

                auto param0 = py::convert_to<winrt::Windows::Perception::People::HandPose>(args, 0);

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

    static PyObject* HandMeshObserver_get_ModelId(py::wrapper::Windows::Perception::People::HandMeshObserver* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HandMeshObserver", L"ModelId");
            }

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

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

    static PyObject* HandMeshObserver_get_NeutralPose(py::wrapper::Windows::Perception::People::HandMeshObserver* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HandMeshObserver", L"NeutralPose");
            }

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

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

    static PyObject* HandMeshObserver_get_NeutralPoseVersion(py::wrapper::Windows::Perception::People::HandMeshObserver* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HandMeshObserver", L"NeutralPoseVersion");
            }

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

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

    static PyObject* HandMeshObserver_get_Source(py::wrapper::Windows::Perception::People::HandMeshObserver* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HandMeshObserver", L"Source");
            }

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

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

    static PyObject* HandMeshObserver_get_TriangleIndexCount(py::wrapper::Windows::Perception::People::HandMeshObserver* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HandMeshObserver", L"TriangleIndexCount");
            }

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

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

    static PyObject* HandMeshObserver_get_VertexCount(py::wrapper::Windows::Perception::People::HandMeshObserver* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HandMeshObserver", L"VertexCount");
            }

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

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

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

    static PyObject* _from_HandMeshObserver(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::Perception::People::HandMeshObserver>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_HandMeshObserver[] = {
        { "get_triangle_indices", reinterpret_cast<PyCFunction>(HandMeshObserver_GetTriangleIndices), METH_VARARGS, nullptr },
        { "get_vertex_state_for_pose", reinterpret_cast<PyCFunction>(HandMeshObserver_GetVertexStateForPose), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_HandMeshObserver, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_HandMeshObserver), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_HandMeshObserver[] = {
        { "model_id", reinterpret_cast<getter>(HandMeshObserver_get_ModelId), nullptr, nullptr, nullptr },
        { "neutral_pose", reinterpret_cast<getter>(HandMeshObserver_get_NeutralPose), nullptr, nullptr, nullptr },
        { "neutral_pose_version", reinterpret_cast<getter>(HandMeshObserver_get_NeutralPoseVersion), nullptr, nullptr, nullptr },
        { "source", reinterpret_cast<getter>(HandMeshObserver_get_Source), nullptr, nullptr, nullptr },
        { "triangle_index_count", reinterpret_cast<getter>(HandMeshObserver_get_TriangleIndexCount), nullptr, nullptr, nullptr },
        { "vertex_count", reinterpret_cast<getter>(HandMeshObserver_get_VertexCount), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_HandMeshObserver[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_HandMeshObserver) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_HandMeshObserver) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_HandMeshObserver) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_HandMeshObserver) },
        { }
    };

    static PyType_Spec type_spec_HandMeshObserver = {
        "winrt._winrt_windows_perception_people.HandMeshObserver",
        sizeof(py::wrapper::Windows::Perception::People::HandMeshObserver),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_HandMeshObserver};

    // ----- HandMeshVertexState class --------------------

    static PyObject* _new_HandMeshVertexState(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Perception::People::HandMeshVertexState>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Perception::People::HandMeshVertexState>::type_name);
        return nullptr;
    }

    static void _dealloc_HandMeshVertexState(py::wrapper::Windows::Perception::People::HandMeshVertexState* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* HandMeshVertexState_GetVertices(py::wrapper::Windows::Perception::People::HandMeshVertexState* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.People.HandMeshVertexState", L"GetVertices", 0);
                }

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

                auto param0 = py::convert_to<py::pybuf_view<winrt::Windows::Perception::People::HandMeshVertex, true>>(args, 0);

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

    static PyObject* HandMeshVertexState_get_CoordinateSystem(py::wrapper::Windows::Perception::People::HandMeshVertexState* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HandMeshVertexState", L"CoordinateSystem");
            }

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

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

    static PyObject* HandMeshVertexState_get_UpdateTimestamp(py::wrapper::Windows::Perception::People::HandMeshVertexState* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HandMeshVertexState", L"UpdateTimestamp");
            }

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

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

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

    static PyObject* _from_HandMeshVertexState(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::Perception::People::HandMeshVertexState>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_HandMeshVertexState[] = {
        { "get_vertices", reinterpret_cast<PyCFunction>(HandMeshVertexState_GetVertices), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_HandMeshVertexState, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_HandMeshVertexState), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_HandMeshVertexState[] = {
        { "coordinate_system", reinterpret_cast<getter>(HandMeshVertexState_get_CoordinateSystem), nullptr, nullptr, nullptr },
        { "update_timestamp", reinterpret_cast<getter>(HandMeshVertexState_get_UpdateTimestamp), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_HandMeshVertexState[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_HandMeshVertexState) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_HandMeshVertexState) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_HandMeshVertexState) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_HandMeshVertexState) },
        { }
    };

    static PyType_Spec type_spec_HandMeshVertexState = {
        "winrt._winrt_windows_perception_people.HandMeshVertexState",
        sizeof(py::wrapper::Windows::Perception::People::HandMeshVertexState),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_HandMeshVertexState};

    // ----- HandPose class --------------------

    static PyObject* _new_HandPose(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Perception::People::HandPose>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Perception::People::HandPose>::type_name);
        return nullptr;
    }

    static void _dealloc_HandPose(py::wrapper::Windows::Perception::People::HandPose* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* HandPose_GetRelativeJoint(py::wrapper::Windows::Perception::People::HandPose* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.People.HandPose", L"GetRelativeJoint", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::Perception::People::HandJointKind>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Perception::People::HandJointKind>(args, 1);

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

    static PyObject* HandPose_GetRelativeJoints(py::wrapper::Windows::Perception::People::HandPose* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.People.HandPose", L"GetRelativeJoints", 2);
                }

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

                auto param0 = py::convert_to<py::pybuf_view<winrt::Windows::Perception::People::HandJointKind, false>>(args, 0);
                auto param1 = py::convert_to<py::pybuf_view<winrt::Windows::Perception::People::HandJointKind, false>>(args, 1);
                auto param2 = py::convert_to<py::pybuf_view<winrt::Windows::Perception::People::JointPose, true>>(args, 2);

                self->obj.GetRelativeJoints(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* HandPose_TryGetJoint(py::wrapper::Windows::Perception::People::HandPose* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.People.HandPose", L"TryGetJoint", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::Perception::Spatial::SpatialCoordinateSystem>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Perception::People::HandJointKind>(args, 1);
                winrt::Windows::Perception::People::JointPose param2{};

                auto return_value = self->obj.TryGetJoint(param0, param1, param2);

                py::pyobj_handle out_return_value{ py::convert(return_value) };
                if (!out_return_value)
                {
                    return nullptr;
                }
                py::pyobj_handle out2{ py::convert(param2) };
                if (!out2)
                {
                    return nullptr;
                }
                return PyTuple_Pack(2, out_return_value.get(), out2.get());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* HandPose_TryGetJoints(py::wrapper::Windows::Perception::People::HandPose* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.People.HandPose", L"TryGetJoints", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::Perception::Spatial::SpatialCoordinateSystem>(args, 0);
                auto param1 = py::convert_to<py::pybuf_view<winrt::Windows::Perception::People::HandJointKind, false>>(args, 1);
                auto param2 = py::convert_to<py::pybuf_view<winrt::Windows::Perception::People::JointPose, true>>(args, 2);

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

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

    static PyObject* _from_HandPose(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::Perception::People::HandPose>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_HandPose[] = {
        { "get_relative_joint", reinterpret_cast<PyCFunction>(HandPose_GetRelativeJoint), METH_VARARGS, nullptr },
        { "get_relative_joints", reinterpret_cast<PyCFunction>(HandPose_GetRelativeJoints), METH_VARARGS, nullptr },
        { "try_get_joint", reinterpret_cast<PyCFunction>(HandPose_TryGetJoint), METH_VARARGS, nullptr },
        { "try_get_joints", reinterpret_cast<PyCFunction>(HandPose_TryGetJoints), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_HandPose, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_HandPose), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_HandPose[] = {
        { }
    };

    static PyType_Slot _type_slots_HandPose[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_HandPose) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_HandPose) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_HandPose) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_HandPose) },
        { }
    };

    static PyType_Spec type_spec_HandPose = {
        "winrt._winrt_windows_perception_people.HandPose",
        sizeof(py::wrapper::Windows::Perception::People::HandPose),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_HandPose};

    // ----- HeadPose class --------------------

    static PyObject* _new_HeadPose(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Perception::People::HeadPose>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Perception::People::HeadPose>::type_name);
        return nullptr;
    }

    static void _dealloc_HeadPose(py::wrapper::Windows::Perception::People::HeadPose* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* HeadPose_get_ForwardDirection(py::wrapper::Windows::Perception::People::HeadPose* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HeadPose", L"ForwardDirection");
            }

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

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

    static PyObject* HeadPose_get_Position(py::wrapper::Windows::Perception::People::HeadPose* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HeadPose", L"Position");
            }

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

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

    static PyObject* HeadPose_get_UpDirection(py::wrapper::Windows::Perception::People::HeadPose* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.People.HeadPose", L"UpDirection");
            }

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

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

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

    static PyObject* _from_HeadPose(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::Perception::People::HeadPose>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_HeadPose[] = {
        { "_assign_array_", _assign_array_HeadPose, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_HeadPose), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_HeadPose[] = {
        { "forward_direction", reinterpret_cast<getter>(HeadPose_get_ForwardDirection), nullptr, nullptr, nullptr },
        { "position", reinterpret_cast<getter>(HeadPose_get_Position), nullptr, nullptr, nullptr },
        { "up_direction", reinterpret_cast<getter>(HeadPose_get_UpDirection), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_HeadPose[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_HeadPose) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_HeadPose) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_HeadPose) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_HeadPose) },
        { }
    };

    static PyType_Spec type_spec_HeadPose = {
        "winrt._winrt_windows_perception_people.HeadPose",
        sizeof(py::wrapper::Windows::Perception::People::HeadPose),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_HeadPose};

    // ----- HandMeshVertex struct --------------------

    winrt_struct_wrapper<winrt::Windows::Perception::People::HandMeshVertex>* _new_HandMeshVertex(PyTypeObject* subclass, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        auto self = reinterpret_cast<winrt_struct_wrapper<winrt::Windows::Perception::People::HandMeshVertex>*>(subclass->tp_alloc(subclass, 0));

        if (!self)
        {
            return nullptr;
        }

        std::construct_at(&self->obj);

        return self;
    }

    int _init_HandMeshVertex(winrt_struct_wrapper<winrt::Windows::Perception::People::HandMeshVertex>* self, PyObject* args, PyObject* kwds) noexcept
    {
        auto tuple_size = PyTuple_Size(args);

        if ((tuple_size == 0) && (kwds == nullptr))
        {
            self->obj = {};
            return 0;
        }

        PyObject* _Position{};
        PyObject* _Normal{};

        static const char* kwlist[] = {"position", "normal", nullptr};
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", const_cast<char**>(kwlist), &_Position, &_Normal))
        {
            return -1;
        }

        try
        {
            self->obj.Position = py::converter<winrt::Windows::Foundation::Numerics::float3>::convert_to(_Position);
            self->obj.Normal = py::converter<winrt::Windows::Foundation::Numerics::float3>::convert_to(_Normal);

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

    static void _dealloc_HandMeshVertex(py::wrapper::Windows::Perception::People::HandMeshVertex* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

    static PyMethodDef _methods_HandMeshVertex[] = {
        { "_assign_array_", _assign_array_HandMeshVertex, METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyObject* HandMeshVertex_get_Position(py::wrapper::Windows::Perception::People::HandMeshVertex* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Position);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int HandMeshVertex_set_Position(py::wrapper::Windows::Perception::People::HandMeshVertex* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.Position = py::converter<winrt::Windows::Foundation::Numerics::float3>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* HandMeshVertex_get_Normal(py::wrapper::Windows::Perception::People::HandMeshVertex* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Normal);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int HandMeshVertex_set_Normal(py::wrapper::Windows::Perception::People::HandMeshVertex* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.Normal = py::converter<winrt::Windows::Foundation::Numerics::float3>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyGetSetDef _getset_HandMeshVertex[] = {
        { "position", reinterpret_cast<getter>(HandMeshVertex_get_Position), reinterpret_cast<setter>(HandMeshVertex_set_Position), nullptr, nullptr },
        { "normal", reinterpret_cast<getter>(HandMeshVertex_get_Normal), reinterpret_cast<setter>(HandMeshVertex_set_Normal), nullptr, nullptr },
        { }
    };

    static PyObject* _richcompare_HandMeshVertex(py::wrapper::Windows::Perception::People::HandMeshVertex* self, PyObject* other, int op) noexcept
    {
        try
        {
            auto _other = py::converter<winrt::Windows::Perception::People::HandMeshVertex>::convert_to(other);

            if (op == Py_EQ)
            {
                if (self->obj == _other)
                {
                    Py_RETURN_TRUE;
                }

                Py_RETURN_FALSE;
            }

            if (op == Py_NE)
            {
                if (self->obj != _other)
                {
                    Py_RETURN_TRUE;
                }

                Py_RETURN_FALSE;
            }

            Py_RETURN_NOTIMPLEMENTED;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _repr_HandMeshVertex(PyObject* self) noexcept
    {
        py::pyobj_handle Position{PyObject_GetAttrString(self, "position")};
        if (!Position)
        {
            return nullptr;
        }

        py::pyobj_handle Normal{PyObject_GetAttrString(self, "normal")};
        if (!Normal)
        {
            return nullptr;
        }

        return PyUnicode_FromFormat("HandMeshVertex(position=%R, normal=%R)", Position.get(), Normal.get());
    }

    static PyType_Slot _type_slots_HandMeshVertex[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_HandMeshVertex) },
        { Py_tp_init, reinterpret_cast<void*>(_init_HandMeshVertex) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_HandMeshVertex) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_HandMeshVertex) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_HandMeshVertex) },
        { Py_tp_richcompare, reinterpret_cast<void*>(_richcompare_HandMeshVertex) },
        { Py_tp_repr, reinterpret_cast<void*>(_repr_HandMeshVertex) },
        { }
    };

    static PyType_Spec type_spec_HandMeshVertex = {
        "winrt._winrt_windows_perception_people.HandMeshVertex",
        sizeof(py::wrapper::Windows::Perception::People::HandMeshVertex),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_HandMeshVertex};

    // ----- JointPose struct --------------------

    winrt_struct_wrapper<winrt::Windows::Perception::People::JointPose>* _new_JointPose(PyTypeObject* subclass, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        auto self = reinterpret_cast<winrt_struct_wrapper<winrt::Windows::Perception::People::JointPose>*>(subclass->tp_alloc(subclass, 0));

        if (!self)
        {
            return nullptr;
        }

        std::construct_at(&self->obj);

        return self;
    }

    int _init_JointPose(winrt_struct_wrapper<winrt::Windows::Perception::People::JointPose>* self, PyObject* args, PyObject* kwds) noexcept
    {
        auto tuple_size = PyTuple_Size(args);

        if ((tuple_size == 0) && (kwds == nullptr))
        {
            self->obj = {};
            return 0;
        }

        PyObject* _Orientation{};
        PyObject* _Position{};
        float _Radius{};
        int32_t _Accuracy{};

        static const char* kwlist[] = {"orientation", "position", "radius", "accuracy", nullptr};
        if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOfi", const_cast<char**>(kwlist), &_Orientation, &_Position, &_Radius, &_Accuracy))
        {
            return -1;
        }

        try
        {
            self->obj.Orientation = py::converter<winrt::Windows::Foundation::Numerics::quaternion>::convert_to(_Orientation);
            self->obj.Position = py::converter<winrt::Windows::Foundation::Numerics::float3>::convert_to(_Position);
            self->obj.Radius = _Radius;
            self->obj.Accuracy = static_cast<winrt::Windows::Perception::People::JointPoseAccuracy>(_Accuracy);

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

    static void _dealloc_JointPose(py::wrapper::Windows::Perception::People::JointPose* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

    static PyMethodDef _methods_JointPose[] = {
        { "_assign_array_", _assign_array_JointPose, METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyObject* JointPose_get_Orientation(py::wrapper::Windows::Perception::People::JointPose* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Orientation);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int JointPose_set_Orientation(py::wrapper::Windows::Perception::People::JointPose* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.Orientation = py::converter<winrt::Windows::Foundation::Numerics::quaternion>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* JointPose_get_Position(py::wrapper::Windows::Perception::People::JointPose* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Position);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int JointPose_set_Position(py::wrapper::Windows::Perception::People::JointPose* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.Position = py::converter<winrt::Windows::Foundation::Numerics::float3>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* JointPose_get_Radius(py::wrapper::Windows::Perception::People::JointPose* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Radius);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int JointPose_set_Radius(py::wrapper::Windows::Perception::People::JointPose* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.Radius = py::converter<float>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* JointPose_get_Accuracy(py::wrapper::Windows::Perception::People::JointPose* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.Accuracy);
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int JointPose_set_Accuracy(py::wrapper::Windows::Perception::People::JointPose* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            self->obj.Accuracy = py::converter<winrt::Windows::Perception::People::JointPoseAccuracy>::convert_to(arg);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyGetSetDef _getset_JointPose[] = {
        { "orientation", reinterpret_cast<getter>(JointPose_get_Orientation), reinterpret_cast<setter>(JointPose_set_Orientation), nullptr, nullptr },
        { "position", reinterpret_cast<getter>(JointPose_get_Position), reinterpret_cast<setter>(JointPose_set_Position), nullptr, nullptr },
        { "radius", reinterpret_cast<getter>(JointPose_get_Radius), reinterpret_cast<setter>(JointPose_set_Radius), nullptr, nullptr },
        { "accuracy", reinterpret_cast<getter>(JointPose_get_Accuracy), reinterpret_cast<setter>(JointPose_set_Accuracy), nullptr, nullptr },
        { }
    };

    static PyObject* _richcompare_JointPose(py::wrapper::Windows::Perception::People::JointPose* self, PyObject* other, int op) noexcept
    {
        try
        {
            auto _other = py::converter<winrt::Windows::Perception::People::JointPose>::convert_to(other);

            if (op == Py_EQ)
            {
                if (self->obj == _other)
                {
                    Py_RETURN_TRUE;
                }

                Py_RETURN_FALSE;
            }

            if (op == Py_NE)
            {
                if (self->obj != _other)
                {
                    Py_RETURN_TRUE;
                }

                Py_RETURN_FALSE;
            }

            Py_RETURN_NOTIMPLEMENTED;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _repr_JointPose(PyObject* self) noexcept
    {
        py::pyobj_handle Orientation{PyObject_GetAttrString(self, "orientation")};
        if (!Orientation)
        {
            return nullptr;
        }

        py::pyobj_handle Position{PyObject_GetAttrString(self, "position")};
        if (!Position)
        {
            return nullptr;
        }

        py::pyobj_handle Radius{PyObject_GetAttrString(self, "radius")};
        if (!Radius)
        {
            return nullptr;
        }

        py::pyobj_handle Accuracy{PyObject_GetAttrString(self, "accuracy")};
        if (!Accuracy)
        {
            return nullptr;
        }

        return PyUnicode_FromFormat("JointPose(orientation=%R, position=%R, radius=%R, accuracy=%R)", Orientation.get(), Position.get(), Radius.get(), Accuracy.get());
    }

    static PyType_Slot _type_slots_JointPose[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_JointPose) },
        { Py_tp_init, reinterpret_cast<void*>(_init_JointPose) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_JointPose) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_JointPose) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_JointPose) },
        { Py_tp_richcompare, reinterpret_cast<void*>(_richcompare_JointPose) },
        { Py_tp_repr, reinterpret_cast<void*>(_repr_JointPose) },
        { }
    };

    static PyType_Spec type_spec_JointPose = {
        "winrt._winrt_windows_perception_people.JointPose",
        sizeof(py::wrapper::Windows::Perception::People::JointPose),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_JointPose};

    // ----- Windows.Perception.People Initialization --------------------

    PyDoc_STRVAR(module_doc, "Windows.Perception.People");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_winrt_windows_perception_people",
        module_doc,
        0,
        nullptr,
        nullptr,
        nullptr,
        nullptr,
        nullptr};
} // py::cpp::Windows::Perception::People

PyMODINIT_FUNC PyInit__winrt_windows_perception_people(void) noexcept
{
    using namespace py::cpp::Windows::Perception::People;

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

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

    if (!module)
    {
        return nullptr;
    }

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

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

    if (!object_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_EyesPose_Static{PyType_FromSpec(&type_spec_EyesPose_Static)};
    if (!type_EyesPose_Static)
    {
        return nullptr;
    }

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

    py::pytype_handle HandMeshObserver_type{py::register_python_type(module.get(), &type_spec_HandMeshObserver, object_bases.get(), nullptr)};
    if (!HandMeshObserver_type)
    {
        return nullptr;
    }

    py::pytype_handle HandMeshVertexState_type{py::register_python_type(module.get(), &type_spec_HandMeshVertexState, object_bases.get(), nullptr)};
    if (!HandMeshVertexState_type)
    {
        return nullptr;
    }

    py::pytype_handle HandPose_type{py::register_python_type(module.get(), &type_spec_HandPose, object_bases.get(), nullptr)};
    if (!HandPose_type)
    {
        return nullptr;
    }

    py::pytype_handle HeadPose_type{py::register_python_type(module.get(), &type_spec_HeadPose, object_bases.get(), nullptr)};
    if (!HeadPose_type)
    {
        return nullptr;
    }

    py::pytype_handle HandMeshVertex_type{py::register_python_type(module.get(), &type_spec_HandMeshVertex, nullptr, nullptr)};
    if (!HandMeshVertex_type)
    {
        return nullptr;
    }

    py::pytype_handle JointPose_type{py::register_python_type(module.get(), &type_spec_JointPose, nullptr, nullptr)};
    if (!JointPose_type)
    {
        return nullptr;
    }


    return module.detach();
}
