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

#include "py.Windows.UI.Xaml.Core.Direct.h"

namespace py::cpp::Windows::UI::Xaml::Core::Direct
{
    // ----- XamlDirect class --------------------

    static PyObject* _new_XamlDirect(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::UI::Xaml::Core::Direct::XamlDirect>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::UI::Xaml::Core::Direct::XamlDirect>::type_name);
        return nullptr;
    }

    static void _dealloc_XamlDirect(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* XamlDirect_AddEventHandler(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"AddEventHandler", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlEventIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 2);

                self->obj.AddEventHandler(param0, param1, param2);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 4)
        {
            try
            {
                static std::optional<bool> is_overload_present{};

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Core.Direct.XamlDirect", L"AddEventHandler", 4);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlEventIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 2);
                auto param3 = py::convert_to<bool>(args, 3);

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

    static PyObject* XamlDirect_AddToCollection(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"AddToCollection", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 1);

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

    static PyObject* XamlDirect_ClearCollection(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"ClearCollection", 1);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);

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

    static PyObject* XamlDirect_ClearProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"ClearProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_CreateInstance(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"CreateInstance", 1);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlTypeIndex>(args, 0);

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

    static PyObject* XamlDirect_GetBooleanProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetBooleanProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetCollectionCount(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetCollectionCount", 1);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);

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

    static PyObject* XamlDirect_GetColorProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetColorProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetCornerRadiusProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetCornerRadiusProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetDateTimeProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetDateTimeProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetDefault(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.UI.Xaml.Core.Direct.XamlDirect", L"GetDefault", 0);
                }

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

                return py::convert(winrt::Windows::UI::Xaml::Core::Direct::XamlDirect::GetDefault());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* XamlDirect_GetDoubleProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetDoubleProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetDurationProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetDurationProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetEnumProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetEnumProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetGridLengthProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetGridLengthProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetInt32Property(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetInt32Property", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetMatrix3DProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetMatrix3DProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetMatrixProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetMatrixProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetObject(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetObject", 1);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);

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

    static PyObject* XamlDirect_GetObjectProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetObjectProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetPointProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetPointProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetRectProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetRectProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetSizeProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetSizeProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetStringProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetStringProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetThicknessProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetThicknessProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetTimeSpanProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetTimeSpanProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_GetXamlDirectObject(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetXamlDirectObject", 1);
                }

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

                auto param0 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 0);

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

    static PyObject* XamlDirect_GetXamlDirectObjectFromCollectionAt(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetXamlDirectObjectFromCollectionAt", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);

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

    static PyObject* XamlDirect_GetXamlDirectObjectProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"GetXamlDirectObjectProperty", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);

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

    static PyObject* XamlDirect_InsertIntoCollectionAt(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"InsertIntoCollectionAt", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 2);

                self->obj.InsertIntoCollectionAt(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* XamlDirect_RemoveEventHandler(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"RemoveEventHandler", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlEventIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 2);

                self->obj.RemoveEventHandler(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* XamlDirect_RemoveFromCollection(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"RemoveFromCollection", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 1);

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

    static PyObject* XamlDirect_RemoveFromCollectionAt(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"RemoveFromCollectionAt", 2);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<uint32_t>(args, 1);

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

    static PyObject* XamlDirect_SetBooleanProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetBooleanProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<bool>(args, 2);

                self->obj.SetBooleanProperty(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* XamlDirect_SetColorProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetColorProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Color>(args, 2);

                self->obj.SetColorProperty(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* XamlDirect_SetCornerRadiusProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetCornerRadiusProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Xaml::CornerRadius>(args, 2);

                self->obj.SetCornerRadiusProperty(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* XamlDirect_SetDateTimeProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetDateTimeProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::DateTime>(args, 2);

                self->obj.SetDateTimeProperty(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* XamlDirect_SetDoubleProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetDoubleProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<double>(args, 2);

                self->obj.SetDoubleProperty(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* XamlDirect_SetDurationProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetDurationProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Xaml::Duration>(args, 2);

                self->obj.SetDurationProperty(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* XamlDirect_SetEnumProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetEnumProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<uint32_t>(args, 2);

                self->obj.SetEnumProperty(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* XamlDirect_SetGridLengthProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetGridLengthProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Xaml::GridLength>(args, 2);

                self->obj.SetGridLengthProperty(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* XamlDirect_SetInt32Property(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetInt32Property", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<int32_t>(args, 2);

                self->obj.SetInt32Property(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* XamlDirect_SetMatrix3DProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetMatrix3DProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Xaml::Media::Media3D::Matrix3D>(args, 2);

                self->obj.SetMatrix3DProperty(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* XamlDirect_SetMatrixProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetMatrixProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Xaml::Media::Matrix>(args, 2);

                self->obj.SetMatrixProperty(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* XamlDirect_SetObjectProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetObjectProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::IInspectable>(args, 2);

                self->obj.SetObjectProperty(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* XamlDirect_SetPointProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetPointProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::Point>(args, 2);

                self->obj.SetPointProperty(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* XamlDirect_SetRectProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetRectProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::Rect>(args, 2);

                self->obj.SetRectProperty(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* XamlDirect_SetSizeProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetSizeProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::Size>(args, 2);

                self->obj.SetSizeProperty(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* XamlDirect_SetStringProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetStringProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);

                self->obj.SetStringProperty(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* XamlDirect_SetThicknessProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetThicknessProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Xaml::Thickness>(args, 2);

                self->obj.SetThicknessProperty(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* XamlDirect_SetTimeSpanProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetTimeSpanProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 2);

                self->obj.SetTimeSpanProperty(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* XamlDirect_SetXamlDirectObjectProperty(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect* 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.UI.Xaml.Core.Direct.XamlDirect", L"SetXamlDirectObjectProperty", 3);
                }

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

                auto param0 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>(args, 2);

                self->obj.SetXamlDirectObjectProperty(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* _assign_array_XamlDirect(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::UI::Xaml::Core::Direct::XamlDirect>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_XamlDirect(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::UI::Xaml::Core::Direct::XamlDirect>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_XamlDirect[] = {
        { "add_event_handler", reinterpret_cast<PyCFunction>(XamlDirect_AddEventHandler), METH_VARARGS, nullptr },
        { "add_to_collection", reinterpret_cast<PyCFunction>(XamlDirect_AddToCollection), METH_VARARGS, nullptr },
        { "clear_collection", reinterpret_cast<PyCFunction>(XamlDirect_ClearCollection), METH_VARARGS, nullptr },
        { "clear_property", reinterpret_cast<PyCFunction>(XamlDirect_ClearProperty), METH_VARARGS, nullptr },
        { "create_instance", reinterpret_cast<PyCFunction>(XamlDirect_CreateInstance), METH_VARARGS, nullptr },
        { "get_boolean_property", reinterpret_cast<PyCFunction>(XamlDirect_GetBooleanProperty), METH_VARARGS, nullptr },
        { "get_collection_count", reinterpret_cast<PyCFunction>(XamlDirect_GetCollectionCount), METH_VARARGS, nullptr },
        { "get_color_property", reinterpret_cast<PyCFunction>(XamlDirect_GetColorProperty), METH_VARARGS, nullptr },
        { "get_corner_radius_property", reinterpret_cast<PyCFunction>(XamlDirect_GetCornerRadiusProperty), METH_VARARGS, nullptr },
        { "get_date_time_property", reinterpret_cast<PyCFunction>(XamlDirect_GetDateTimeProperty), METH_VARARGS, nullptr },
        { "get_double_property", reinterpret_cast<PyCFunction>(XamlDirect_GetDoubleProperty), METH_VARARGS, nullptr },
        { "get_duration_property", reinterpret_cast<PyCFunction>(XamlDirect_GetDurationProperty), METH_VARARGS, nullptr },
        { "get_enum_property", reinterpret_cast<PyCFunction>(XamlDirect_GetEnumProperty), METH_VARARGS, nullptr },
        { "get_grid_length_property", reinterpret_cast<PyCFunction>(XamlDirect_GetGridLengthProperty), METH_VARARGS, nullptr },
        { "get_int32_property", reinterpret_cast<PyCFunction>(XamlDirect_GetInt32Property), METH_VARARGS, nullptr },
        { "get_matrix3_d_property", reinterpret_cast<PyCFunction>(XamlDirect_GetMatrix3DProperty), METH_VARARGS, nullptr },
        { "get_matrix_property", reinterpret_cast<PyCFunction>(XamlDirect_GetMatrixProperty), METH_VARARGS, nullptr },
        { "get_object", reinterpret_cast<PyCFunction>(XamlDirect_GetObject), METH_VARARGS, nullptr },
        { "get_object_property", reinterpret_cast<PyCFunction>(XamlDirect_GetObjectProperty), METH_VARARGS, nullptr },
        { "get_point_property", reinterpret_cast<PyCFunction>(XamlDirect_GetPointProperty), METH_VARARGS, nullptr },
        { "get_rect_property", reinterpret_cast<PyCFunction>(XamlDirect_GetRectProperty), METH_VARARGS, nullptr },
        { "get_size_property", reinterpret_cast<PyCFunction>(XamlDirect_GetSizeProperty), METH_VARARGS, nullptr },
        { "get_string_property", reinterpret_cast<PyCFunction>(XamlDirect_GetStringProperty), METH_VARARGS, nullptr },
        { "get_thickness_property", reinterpret_cast<PyCFunction>(XamlDirect_GetThicknessProperty), METH_VARARGS, nullptr },
        { "get_time_span_property", reinterpret_cast<PyCFunction>(XamlDirect_GetTimeSpanProperty), METH_VARARGS, nullptr },
        { "get_xaml_direct_object", reinterpret_cast<PyCFunction>(XamlDirect_GetXamlDirectObject), METH_VARARGS, nullptr },
        { "get_xaml_direct_object_from_collection_at", reinterpret_cast<PyCFunction>(XamlDirect_GetXamlDirectObjectFromCollectionAt), METH_VARARGS, nullptr },
        { "get_xaml_direct_object_property", reinterpret_cast<PyCFunction>(XamlDirect_GetXamlDirectObjectProperty), METH_VARARGS, nullptr },
        { "insert_into_collection_at", reinterpret_cast<PyCFunction>(XamlDirect_InsertIntoCollectionAt), METH_VARARGS, nullptr },
        { "remove_event_handler", reinterpret_cast<PyCFunction>(XamlDirect_RemoveEventHandler), METH_VARARGS, nullptr },
        { "remove_from_collection", reinterpret_cast<PyCFunction>(XamlDirect_RemoveFromCollection), METH_VARARGS, nullptr },
        { "remove_from_collection_at", reinterpret_cast<PyCFunction>(XamlDirect_RemoveFromCollectionAt), METH_VARARGS, nullptr },
        { "set_boolean_property", reinterpret_cast<PyCFunction>(XamlDirect_SetBooleanProperty), METH_VARARGS, nullptr },
        { "set_color_property", reinterpret_cast<PyCFunction>(XamlDirect_SetColorProperty), METH_VARARGS, nullptr },
        { "set_corner_radius_property", reinterpret_cast<PyCFunction>(XamlDirect_SetCornerRadiusProperty), METH_VARARGS, nullptr },
        { "set_date_time_property", reinterpret_cast<PyCFunction>(XamlDirect_SetDateTimeProperty), METH_VARARGS, nullptr },
        { "set_double_property", reinterpret_cast<PyCFunction>(XamlDirect_SetDoubleProperty), METH_VARARGS, nullptr },
        { "set_duration_property", reinterpret_cast<PyCFunction>(XamlDirect_SetDurationProperty), METH_VARARGS, nullptr },
        { "set_enum_property", reinterpret_cast<PyCFunction>(XamlDirect_SetEnumProperty), METH_VARARGS, nullptr },
        { "set_grid_length_property", reinterpret_cast<PyCFunction>(XamlDirect_SetGridLengthProperty), METH_VARARGS, nullptr },
        { "set_int32_property", reinterpret_cast<PyCFunction>(XamlDirect_SetInt32Property), METH_VARARGS, nullptr },
        { "set_matrix3_d_property", reinterpret_cast<PyCFunction>(XamlDirect_SetMatrix3DProperty), METH_VARARGS, nullptr },
        { "set_matrix_property", reinterpret_cast<PyCFunction>(XamlDirect_SetMatrixProperty), METH_VARARGS, nullptr },
        { "set_object_property", reinterpret_cast<PyCFunction>(XamlDirect_SetObjectProperty), METH_VARARGS, nullptr },
        { "set_point_property", reinterpret_cast<PyCFunction>(XamlDirect_SetPointProperty), METH_VARARGS, nullptr },
        { "set_rect_property", reinterpret_cast<PyCFunction>(XamlDirect_SetRectProperty), METH_VARARGS, nullptr },
        { "set_size_property", reinterpret_cast<PyCFunction>(XamlDirect_SetSizeProperty), METH_VARARGS, nullptr },
        { "set_string_property", reinterpret_cast<PyCFunction>(XamlDirect_SetStringProperty), METH_VARARGS, nullptr },
        { "set_thickness_property", reinterpret_cast<PyCFunction>(XamlDirect_SetThicknessProperty), METH_VARARGS, nullptr },
        { "set_time_span_property", reinterpret_cast<PyCFunction>(XamlDirect_SetTimeSpanProperty), METH_VARARGS, nullptr },
        { "set_xaml_direct_object_property", reinterpret_cast<PyCFunction>(XamlDirect_SetXamlDirectObjectProperty), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_XamlDirect, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_XamlDirect), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_XamlDirect[] = {
        { }
    };

    static PyType_Slot _type_slots_XamlDirect[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_XamlDirect) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_XamlDirect) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_XamlDirect) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_XamlDirect) },
        { }
    };

    static PyType_Spec type_spec_XamlDirect = {
        "winrt._winrt_windows_ui_xaml_core_direct.XamlDirect",
        sizeof(py::wrapper::Windows::UI::Xaml::Core::Direct::XamlDirect),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_XamlDirect};

    static PyGetSetDef getset_XamlDirect_Static[] = {
        { }
    };

    static PyMethodDef methods_XamlDirect_Static[] = {
        { "get_default", reinterpret_cast<PyCFunction>(XamlDirect_GetDefault), METH_VARARGS, nullptr },
        { }
    };

    static PyType_Slot type_slots_XamlDirect_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_XamlDirect_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_XamlDirect_Static) },
        { }
    };

    static PyType_Spec type_spec_XamlDirect_Static =
    {
        "winrt._winrt_windows_ui_xaml_core_direct.XamlDirect_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_XamlDirect_Static
    };

    // ----- IXamlDirectObject interface --------------------

    static PyObject* _new_IXamlDirectObject(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>::type_name);
        return nullptr;
    }

    static void _dealloc_IXamlDirectObject(py::wrapper::Windows::UI::Xaml::Core::Direct::IXamlDirectObject* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

    static PyObject* _from_IXamlDirectObject(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IXamlDirectObject[] = {
        { "_assign_array_", _assign_array_IXamlDirectObject, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IXamlDirectObject), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IXamlDirectObject[] = {
        { }
    };

    static PyType_Slot _type_slots_IXamlDirectObject[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IXamlDirectObject) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IXamlDirectObject) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IXamlDirectObject) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IXamlDirectObject) },
        { }
    };

    static PyType_Spec type_spec_IXamlDirectObject = {
        "winrt._winrt_windows_ui_xaml_core_direct.IXamlDirectObject",
        sizeof(py::wrapper::Windows::UI::Xaml::Core::Direct::IXamlDirectObject),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IXamlDirectObject};

    // ----- Windows.UI.Xaml.Core.Direct Initialization --------------------

    PyDoc_STRVAR(module_doc, "Windows.UI.Xaml.Core.Direct");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_winrt_windows_ui_xaml_core_direct",
        module_doc,
        0,
        nullptr,
        nullptr,
        nullptr,
        nullptr,
        nullptr};
} // py::cpp::Windows::UI::Xaml::Core::Direct

PyMODINIT_FUNC PyInit__winrt_windows_ui_xaml_core_direct(void) noexcept
{
    using namespace py::cpp::Windows::UI::Xaml::Core::Direct;

    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_XamlDirect_Static{PyType_FromSpec(&type_spec_XamlDirect_Static)};
    if (!type_XamlDirect_Static)
    {
        return nullptr;
    }

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

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


    return module.detach();
}
