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

#include "pybase.h"
#include "py.Windows.UI.Core.AnimationMetrics.h"


namespace py::cpp::Windows::UI::Core::AnimationMetrics
{
    struct module_state
    {
        PyObject* type_AnimationEffect;
        PyObject* type_AnimationEffectTarget;
        PyObject* type_PropertyAnimationType;
        PyTypeObject* type_AnimationDescription;
        PyTypeObject* type_OpacityAnimation;
        PyTypeObject* type_PropertyAnimation;
        PyTypeObject* type_ScaleAnimation;
        PyTypeObject* type_TranslationAnimation;
        PyTypeObject* type_IPropertyAnimation;
    };

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

        if (state->type_AnimationEffect)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_AnimationEffect = type;
        Py_INCREF(state->type_AnimationEffect);


        Py_RETURN_NONE;
    }

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

        if (state->type_AnimationEffectTarget)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_AnimationEffectTarget = type;
        Py_INCREF(state->type_AnimationEffectTarget);


        Py_RETURN_NONE;
    }

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

        if (state->type_PropertyAnimationType)
        {
            PyErr_SetString(PyExc_RuntimeError, "type has already been registered");
            return nullptr;
        }

        if (!PyType_Check(type))
        {
            PyErr_SetString(PyExc_TypeError, "argument is not a type");
            return nullptr;
        }

        state->type_PropertyAnimationType = type;
        Py_INCREF(state->type_PropertyAnimationType);


        Py_RETURN_NONE;
    }

    // ----- AnimationDescription class --------------------
    static constexpr const char* const type_name_AnimationDescription = "AnimationDescription";

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

        auto arg_count = PyTuple_Size(args);
        if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::UI::Core::AnimationMetrics::AnimationEffect>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::UI::Core::AnimationMetrics::AnimationEffectTarget>(args, 1);

                winrt::Windows::UI::Core::AnimationMetrics::AnimationDescription instance{ param0, param1 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_AnimationDescription(py::wrapper::Windows::UI::Core::AnimationMetrics::AnimationDescription* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* AnimationDescription_get_Animations(py::wrapper::Windows::UI::Core::AnimationMetrics::AnimationDescription* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.AnimationDescription", L"Animations"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AnimationDescription_get_DelayLimit(py::wrapper::Windows::UI::Core::AnimationMetrics::AnimationDescription* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.AnimationDescription", L"DelayLimit"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AnimationDescription_get_StaggerDelay(py::wrapper::Windows::UI::Core::AnimationMetrics::AnimationDescription* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.AnimationDescription", L"StaggerDelay"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AnimationDescription_get_StaggerDelayFactor(py::wrapper::Windows::UI::Core::AnimationMetrics::AnimationDescription* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.AnimationDescription", L"StaggerDelayFactor"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AnimationDescription_get_ZOrder(py::wrapper::Windows::UI::Core::AnimationMetrics::AnimationDescription* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.AnimationDescription", L"ZOrder"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_AnimationDescription(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::Core::AnimationMetrics::AnimationDescription>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AnimationDescription[] = {
        { "_assign_array_", _assign_array_AnimationDescription, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AnimationDescription), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AnimationDescription[] = {
        { "animations", reinterpret_cast<getter>(AnimationDescription_get_Animations), nullptr, nullptr, nullptr },
        { "delay_limit", reinterpret_cast<getter>(AnimationDescription_get_DelayLimit), nullptr, nullptr, nullptr },
        { "stagger_delay", reinterpret_cast<getter>(AnimationDescription_get_StaggerDelay), nullptr, nullptr, nullptr },
        { "stagger_delay_factor", reinterpret_cast<getter>(AnimationDescription_get_StaggerDelayFactor), nullptr, nullptr, nullptr },
        { "z_order", reinterpret_cast<getter>(AnimationDescription_get_ZOrder), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AnimationDescription[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AnimationDescription) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AnimationDescription) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AnimationDescription) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AnimationDescription) },
        { },
    };

    static PyType_Spec type_spec_AnimationDescription =
    {
        "_winsdk_Windows_UI_Core_AnimationMetrics.AnimationDescription",
        sizeof(py::wrapper::Windows::UI::Core::AnimationMetrics::AnimationDescription),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AnimationDescription
    };

    // ----- OpacityAnimation class --------------------
    static constexpr const char* const type_name_OpacityAnimation = "OpacityAnimation";

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

    static void _dealloc_OpacityAnimation(py::wrapper::Windows::UI::Core::AnimationMetrics::OpacityAnimation* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* OpacityAnimation_get_FinalOpacity(py::wrapper::Windows::UI::Core::AnimationMetrics::OpacityAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.OpacityAnimation", L"FinalOpacity"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* OpacityAnimation_get_InitialOpacity(py::wrapper::Windows::UI::Core::AnimationMetrics::OpacityAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.OpacityAnimation", L"InitialOpacity"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* OpacityAnimation_get_Control1(py::wrapper::Windows::UI::Core::AnimationMetrics::OpacityAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.OpacityAnimation", L"Control1"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* OpacityAnimation_get_Control2(py::wrapper::Windows::UI::Core::AnimationMetrics::OpacityAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.OpacityAnimation", L"Control2"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* OpacityAnimation_get_Delay(py::wrapper::Windows::UI::Core::AnimationMetrics::OpacityAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.OpacityAnimation", L"Delay"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* OpacityAnimation_get_Duration(py::wrapper::Windows::UI::Core::AnimationMetrics::OpacityAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.OpacityAnimation", L"Duration"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* OpacityAnimation_get_Type(py::wrapper::Windows::UI::Core::AnimationMetrics::OpacityAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.OpacityAnimation", L"Type"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_OpacityAnimation(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::Core::AnimationMetrics::OpacityAnimation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_OpacityAnimation[] = {
        { "_assign_array_", _assign_array_OpacityAnimation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_OpacityAnimation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_OpacityAnimation[] = {
        { "final_opacity", reinterpret_cast<getter>(OpacityAnimation_get_FinalOpacity), nullptr, nullptr, nullptr },
        { "initial_opacity", reinterpret_cast<getter>(OpacityAnimation_get_InitialOpacity), nullptr, nullptr, nullptr },
        { "control1", reinterpret_cast<getter>(OpacityAnimation_get_Control1), nullptr, nullptr, nullptr },
        { "control2", reinterpret_cast<getter>(OpacityAnimation_get_Control2), nullptr, nullptr, nullptr },
        { "delay", reinterpret_cast<getter>(OpacityAnimation_get_Delay), nullptr, nullptr, nullptr },
        { "duration", reinterpret_cast<getter>(OpacityAnimation_get_Duration), nullptr, nullptr, nullptr },
        { "type", reinterpret_cast<getter>(OpacityAnimation_get_Type), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_OpacityAnimation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_OpacityAnimation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_OpacityAnimation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_OpacityAnimation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_OpacityAnimation) },
        { },
    };

    static PyType_Spec type_spec_OpacityAnimation =
    {
        "_winsdk_Windows_UI_Core_AnimationMetrics.OpacityAnimation",
        sizeof(py::wrapper::Windows::UI::Core::AnimationMetrics::OpacityAnimation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OpacityAnimation
    };

    // ----- PropertyAnimation class --------------------
    static constexpr const char* const type_name_PropertyAnimation = "PropertyAnimation";

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

    static void _dealloc_PropertyAnimation(py::wrapper::Windows::UI::Core::AnimationMetrics::PropertyAnimation* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* PropertyAnimation_get_Control1(py::wrapper::Windows::UI::Core::AnimationMetrics::PropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.PropertyAnimation", L"Control1"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PropertyAnimation_get_Control2(py::wrapper::Windows::UI::Core::AnimationMetrics::PropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.PropertyAnimation", L"Control2"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PropertyAnimation_get_Delay(py::wrapper::Windows::UI::Core::AnimationMetrics::PropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.PropertyAnimation", L"Delay"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PropertyAnimation_get_Duration(py::wrapper::Windows::UI::Core::AnimationMetrics::PropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.PropertyAnimation", L"Duration"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* PropertyAnimation_get_Type(py::wrapper::Windows::UI::Core::AnimationMetrics::PropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.PropertyAnimation", L"Type"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_PropertyAnimation(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::Core::AnimationMetrics::PropertyAnimation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_PropertyAnimation[] = {
        { "_assign_array_", _assign_array_PropertyAnimation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_PropertyAnimation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_PropertyAnimation[] = {
        { "control1", reinterpret_cast<getter>(PropertyAnimation_get_Control1), nullptr, nullptr, nullptr },
        { "control2", reinterpret_cast<getter>(PropertyAnimation_get_Control2), nullptr, nullptr, nullptr },
        { "delay", reinterpret_cast<getter>(PropertyAnimation_get_Delay), nullptr, nullptr, nullptr },
        { "duration", reinterpret_cast<getter>(PropertyAnimation_get_Duration), nullptr, nullptr, nullptr },
        { "type", reinterpret_cast<getter>(PropertyAnimation_get_Type), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_PropertyAnimation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PropertyAnimation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PropertyAnimation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PropertyAnimation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PropertyAnimation) },
        { },
    };

    static PyType_Spec type_spec_PropertyAnimation =
    {
        "_winsdk_Windows_UI_Core_AnimationMetrics.PropertyAnimation",
        sizeof(py::wrapper::Windows::UI::Core::AnimationMetrics::PropertyAnimation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PropertyAnimation
    };

    // ----- ScaleAnimation class --------------------
    static constexpr const char* const type_name_ScaleAnimation = "ScaleAnimation";

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

    static void _dealloc_ScaleAnimation(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* ScaleAnimation_get_Control1(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"Control1"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ScaleAnimation_get_Control2(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"Control2"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ScaleAnimation_get_Delay(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"Delay"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ScaleAnimation_get_Duration(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"Duration"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ScaleAnimation_get_Type(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"Type"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ScaleAnimation_get_FinalScaleX(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"FinalScaleX"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ScaleAnimation_get_FinalScaleY(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"FinalScaleY"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ScaleAnimation_get_InitialScaleX(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"InitialScaleX"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ScaleAnimation_get_InitialScaleY(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"InitialScaleY"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ScaleAnimation_get_NormalizedOrigin(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.ScaleAnimation", L"NormalizedOrigin"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_ScaleAnimation(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::Core::AnimationMetrics::ScaleAnimation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ScaleAnimation[] = {
        { "_assign_array_", _assign_array_ScaleAnimation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ScaleAnimation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ScaleAnimation[] = {
        { "control1", reinterpret_cast<getter>(ScaleAnimation_get_Control1), nullptr, nullptr, nullptr },
        { "control2", reinterpret_cast<getter>(ScaleAnimation_get_Control2), nullptr, nullptr, nullptr },
        { "delay", reinterpret_cast<getter>(ScaleAnimation_get_Delay), nullptr, nullptr, nullptr },
        { "duration", reinterpret_cast<getter>(ScaleAnimation_get_Duration), nullptr, nullptr, nullptr },
        { "type", reinterpret_cast<getter>(ScaleAnimation_get_Type), nullptr, nullptr, nullptr },
        { "final_scale_x", reinterpret_cast<getter>(ScaleAnimation_get_FinalScaleX), nullptr, nullptr, nullptr },
        { "final_scale_y", reinterpret_cast<getter>(ScaleAnimation_get_FinalScaleY), nullptr, nullptr, nullptr },
        { "initial_scale_x", reinterpret_cast<getter>(ScaleAnimation_get_InitialScaleX), nullptr, nullptr, nullptr },
        { "initial_scale_y", reinterpret_cast<getter>(ScaleAnimation_get_InitialScaleY), nullptr, nullptr, nullptr },
        { "normalized_origin", reinterpret_cast<getter>(ScaleAnimation_get_NormalizedOrigin), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ScaleAnimation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ScaleAnimation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ScaleAnimation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ScaleAnimation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ScaleAnimation) },
        { },
    };

    static PyType_Spec type_spec_ScaleAnimation =
    {
        "_winsdk_Windows_UI_Core_AnimationMetrics.ScaleAnimation",
        sizeof(py::wrapper::Windows::UI::Core::AnimationMetrics::ScaleAnimation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ScaleAnimation
    };

    // ----- TranslationAnimation class --------------------
    static constexpr const char* const type_name_TranslationAnimation = "TranslationAnimation";

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

    static void _dealloc_TranslationAnimation(py::wrapper::Windows::UI::Core::AnimationMetrics::TranslationAnimation* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* TranslationAnimation_get_Control1(py::wrapper::Windows::UI::Core::AnimationMetrics::TranslationAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.TranslationAnimation", L"Control1"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* TranslationAnimation_get_Control2(py::wrapper::Windows::UI::Core::AnimationMetrics::TranslationAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.TranslationAnimation", L"Control2"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* TranslationAnimation_get_Delay(py::wrapper::Windows::UI::Core::AnimationMetrics::TranslationAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.TranslationAnimation", L"Delay"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* TranslationAnimation_get_Duration(py::wrapper::Windows::UI::Core::AnimationMetrics::TranslationAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.TranslationAnimation", L"Duration"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* TranslationAnimation_get_Type(py::wrapper::Windows::UI::Core::AnimationMetrics::TranslationAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.TranslationAnimation", L"Type"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_TranslationAnimation(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::Core::AnimationMetrics::TranslationAnimation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_TranslationAnimation[] = {
        { "_assign_array_", _assign_array_TranslationAnimation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_TranslationAnimation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_TranslationAnimation[] = {
        { "control1", reinterpret_cast<getter>(TranslationAnimation_get_Control1), nullptr, nullptr, nullptr },
        { "control2", reinterpret_cast<getter>(TranslationAnimation_get_Control2), nullptr, nullptr, nullptr },
        { "delay", reinterpret_cast<getter>(TranslationAnimation_get_Delay), nullptr, nullptr, nullptr },
        { "duration", reinterpret_cast<getter>(TranslationAnimation_get_Duration), nullptr, nullptr, nullptr },
        { "type", reinterpret_cast<getter>(TranslationAnimation_get_Type), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_TranslationAnimation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_TranslationAnimation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TranslationAnimation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_TranslationAnimation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_TranslationAnimation) },
        { },
    };

    static PyType_Spec type_spec_TranslationAnimation =
    {
        "_winsdk_Windows_UI_Core_AnimationMetrics.TranslationAnimation",
        sizeof(py::wrapper::Windows::UI::Core::AnimationMetrics::TranslationAnimation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_TranslationAnimation
    };

    // ----- IPropertyAnimation interface --------------------
    static constexpr const char* const type_name_IPropertyAnimation = "IPropertyAnimation";

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

    static void _dealloc_IPropertyAnimation(py::wrapper::Windows::UI::Core::AnimationMetrics::IPropertyAnimation* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IPropertyAnimation_get_Control1(py::wrapper::Windows::UI::Core::AnimationMetrics::IPropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.IPropertyAnimation", L"Control1"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* IPropertyAnimation_get_Control2(py::wrapper::Windows::UI::Core::AnimationMetrics::IPropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.IPropertyAnimation", L"Control2"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* IPropertyAnimation_get_Delay(py::wrapper::Windows::UI::Core::AnimationMetrics::IPropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.IPropertyAnimation", L"Delay"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* IPropertyAnimation_get_Duration(py::wrapper::Windows::UI::Core::AnimationMetrics::IPropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.IPropertyAnimation", L"Duration"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* IPropertyAnimation_get_Type(py::wrapper::Windows::UI::Core::AnimationMetrics::IPropertyAnimation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Core.AnimationMetrics.IPropertyAnimation", L"Type"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

    static PyObject* _from_IPropertyAnimation(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::Core::AnimationMetrics::IPropertyAnimation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IPropertyAnimation[] = {
        { "_assign_array_", _assign_array_IPropertyAnimation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IPropertyAnimation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IPropertyAnimation[] = {
        { "control1", reinterpret_cast<getter>(IPropertyAnimation_get_Control1), nullptr, nullptr, nullptr },
        { "control2", reinterpret_cast<getter>(IPropertyAnimation_get_Control2), nullptr, nullptr, nullptr },
        { "delay", reinterpret_cast<getter>(IPropertyAnimation_get_Delay), nullptr, nullptr, nullptr },
        { "duration", reinterpret_cast<getter>(IPropertyAnimation_get_Duration), nullptr, nullptr, nullptr },
        { "type", reinterpret_cast<getter>(IPropertyAnimation_get_Type), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_IPropertyAnimation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_IPropertyAnimation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IPropertyAnimation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IPropertyAnimation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IPropertyAnimation) },
        { },
    };

    static PyType_Spec type_spec_IPropertyAnimation =
    {
        "_winsdk_Windows_UI_Core_AnimationMetrics.IPropertyAnimation",
        sizeof(py::wrapper::Windows::UI::Core::AnimationMetrics::IPropertyAnimation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IPropertyAnimation
    };

    // ----- Windows.UI.Core.AnimationMetrics Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::UI::Core::AnimationMetrics");

    static PyMethodDef module_methods[] = {
        {"_register_AnimationEffect", register_AnimationEffect, METH_O, "registers type"},
        {"_register_AnimationEffectTarget", register_AnimationEffectTarget, METH_O, "registers type"},
        {"_register_PropertyAnimationType", register_PropertyAnimationType, METH_O, "registers type"},
        {}};


    static int module_traverse(PyObject* module, visitproc visit, void* arg) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_VISIT(state->type_AnimationEffect);
        Py_VISIT(state->type_AnimationEffectTarget);
        Py_VISIT(state->type_PropertyAnimationType);
        Py_VISIT(state->type_AnimationDescription);
        Py_VISIT(state->type_OpacityAnimation);
        Py_VISIT(state->type_PropertyAnimation);
        Py_VISIT(state->type_ScaleAnimation);
        Py_VISIT(state->type_TranslationAnimation);
        Py_VISIT(state->type_IPropertyAnimation);

        return 0;
    }

    static int module_clear(PyObject* module) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_CLEAR(state->type_AnimationEffect);
        Py_CLEAR(state->type_AnimationEffectTarget);
        Py_CLEAR(state->type_PropertyAnimationType);
        Py_CLEAR(state->type_AnimationDescription);
        Py_CLEAR(state->type_OpacityAnimation);
        Py_CLEAR(state->type_PropertyAnimation);
        Py_CLEAR(state->type_ScaleAnimation);
        Py_CLEAR(state->type_TranslationAnimation);
        Py_CLEAR(state->type_IPropertyAnimation);

        return 0;
    }


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

} // py::cpp::Windows::UI::Core::AnimationMetrics

PyMODINIT_FUNC PyInit__winsdk_Windows_UI_Core_AnimationMetrics(void) noexcept
{
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

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

    if (!module)
    {
        return nullptr;
    }

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

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

    if (!bases)
    {
        return nullptr;
    }

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

    if (!collections_abc_module)
    {
        return nullptr;
    }

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

    if (!sequence_type)
    {
        return nullptr;
    }

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

    if (!sequence_bases)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_type)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_bases)
    {
        return nullptr;
    }

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

    if (!mapping_type)
    {
        return nullptr;
    }

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

    if (!mapping_bases)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_type)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_bases)
    {
        return nullptr;
    }

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

    state->type_AnimationDescription = py::register_python_type(module.get(), type_name_AnimationDescription, &type_spec_AnimationDescription, bases.get(), nullptr);
    if (!state->type_AnimationDescription)
    {
        return nullptr;
    }

    state->type_OpacityAnimation = py::register_python_type(module.get(), type_name_OpacityAnimation, &type_spec_OpacityAnimation, bases.get(), nullptr);
    if (!state->type_OpacityAnimation)
    {
        return nullptr;
    }

    state->type_PropertyAnimation = py::register_python_type(module.get(), type_name_PropertyAnimation, &type_spec_PropertyAnimation, bases.get(), nullptr);
    if (!state->type_PropertyAnimation)
    {
        return nullptr;
    }

    state->type_ScaleAnimation = py::register_python_type(module.get(), type_name_ScaleAnimation, &type_spec_ScaleAnimation, bases.get(), nullptr);
    if (!state->type_ScaleAnimation)
    {
        return nullptr;
    }

    state->type_TranslationAnimation = py::register_python_type(module.get(), type_name_TranslationAnimation, &type_spec_TranslationAnimation, bases.get(), nullptr);
    if (!state->type_TranslationAnimation)
    {
        return nullptr;
    }

    state->type_IPropertyAnimation = py::register_python_type(module.get(), type_name_IPropertyAnimation, &type_spec_IPropertyAnimation, bases.get(), nullptr);
    if (!state->type_IPropertyAnimation)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::UI::Core::AnimationMetrics::AnimationEffect>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AnimationEffect;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::Core::AnimationMetrics::AnimationEffect is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::UI::Core::AnimationMetrics::AnimationEffectTarget>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AnimationEffectTarget;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::Core::AnimationMetrics::AnimationEffectTarget is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::UI::Core::AnimationMetrics::PropertyAnimationType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PropertyAnimationType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::Core::AnimationMetrics::PropertyAnimationType is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::Core::AnimationMetrics::AnimationDescription>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_AnimationDescription;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::Core::AnimationMetrics::AnimationDescription is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::Core::AnimationMetrics::OpacityAnimation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_OpacityAnimation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::Core::AnimationMetrics::OpacityAnimation is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::Core::AnimationMetrics::PropertyAnimation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_PropertyAnimation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::Core::AnimationMetrics::PropertyAnimation is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::Core::AnimationMetrics::ScaleAnimation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_ScaleAnimation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::Core::AnimationMetrics::ScaleAnimation is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::Core::AnimationMetrics::TranslationAnimation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_TranslationAnimation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::Core::AnimationMetrics::TranslationAnimation is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::UI::Core::AnimationMetrics::IPropertyAnimation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::UI::Core::AnimationMetrics;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_IPropertyAnimation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::UI::Core::AnimationMetrics::IPropertyAnimation is not registered");
        return nullptr;
    }

    return python_type;
}
