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

#include "py.Microsoft.Windows.AppNotifications.h"

namespace py::cpp::Microsoft::Windows::AppNotifications
{
    // ----- AppNotification class --------------------

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

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

                winrt::Microsoft::Windows::AppNotifications::AppNotification instance{param0};
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_AppNotification(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* AppNotification_get_Tag(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Tag");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Tag();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotification_put_Tag(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Tag");
            }

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

            auto param0 = py::convert_to<winrt::hstring>(arg);

            {
                auto _gil = release_gil();
                self->obj.Tag(param0);
            }

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

    static PyObject* AppNotification_get_SuppressDisplay(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"SuppressDisplay");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.SuppressDisplay();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotification_put_SuppressDisplay(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"SuppressDisplay");
            }

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

            auto param0 = py::convert_to<bool>(arg);

            {
                auto _gil = release_gil();
                self->obj.SuppressDisplay(param0);
            }

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

    static PyObject* AppNotification_get_Progress(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Progress");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Progress();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotification_put_Progress(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Progress");
            }

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

            auto param0 = py::convert_to<winrt::Microsoft::Windows::AppNotifications::AppNotificationProgressData>(arg);

            {
                auto _gil = release_gil();
                self->obj.Progress(param0);
            }

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

    static PyObject* AppNotification_get_Priority(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Priority");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Priority();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotification_put_Priority(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Priority");
            }

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

            auto param0 = py::convert_to<winrt::Microsoft::Windows::AppNotifications::AppNotificationPriority>(arg);

            {
                auto _gil = release_gil();
                self->obj.Priority(param0);
            }

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

    static PyObject* AppNotification_get_Group(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Group");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Group();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotification_put_Group(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Group");
            }

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

            auto param0 = py::convert_to<winrt::hstring>(arg);

            {
                auto _gil = release_gil();
                self->obj.Group(param0);
            }

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

    static PyObject* AppNotification_get_ExpiresOnReboot(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"ExpiresOnReboot");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.ExpiresOnReboot();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotification_put_ExpiresOnReboot(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"ExpiresOnReboot");
            }

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

            auto param0 = py::convert_to<bool>(arg);

            {
                auto _gil = release_gil();
                self->obj.ExpiresOnReboot(param0);
            }

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

    static PyObject* AppNotification_get_Expiration(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Expiration");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Expiration();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotification_put_Expiration(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Expiration");
            }

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

            auto param0 = py::convert_to<winrt::Windows::Foundation::DateTime>(arg);

            {
                auto _gil = release_gil();
                self->obj.Expiration(param0);
            }

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

    static PyObject* AppNotification_get_Id(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Id");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Id();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppNotification_get_Payload(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotification", L"Payload");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Payload();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

    static PyObject* _from_AppNotification(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Microsoft::Windows::AppNotifications::AppNotification>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppNotification[] = {
        { "_assign_array_", _assign_array_AppNotification, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppNotification), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_AppNotification[] = {
        { "tag", reinterpret_cast<getter>(AppNotification_get_Tag), reinterpret_cast<setter>(AppNotification_put_Tag), nullptr, nullptr },
        { "suppress_display", reinterpret_cast<getter>(AppNotification_get_SuppressDisplay), reinterpret_cast<setter>(AppNotification_put_SuppressDisplay), nullptr, nullptr },
        { "progress", reinterpret_cast<getter>(AppNotification_get_Progress), reinterpret_cast<setter>(AppNotification_put_Progress), nullptr, nullptr },
        { "priority", reinterpret_cast<getter>(AppNotification_get_Priority), reinterpret_cast<setter>(AppNotification_put_Priority), nullptr, nullptr },
        { "group", reinterpret_cast<getter>(AppNotification_get_Group), reinterpret_cast<setter>(AppNotification_put_Group), nullptr, nullptr },
        { "expires_on_reboot", reinterpret_cast<getter>(AppNotification_get_ExpiresOnReboot), reinterpret_cast<setter>(AppNotification_put_ExpiresOnReboot), nullptr, nullptr },
        { "expiration", reinterpret_cast<getter>(AppNotification_get_Expiration), reinterpret_cast<setter>(AppNotification_put_Expiration), nullptr, nullptr },
        { "id", reinterpret_cast<getter>(AppNotification_get_Id), nullptr, nullptr, nullptr },
        { "payload", reinterpret_cast<getter>(AppNotification_get_Payload), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_AppNotification[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppNotification) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppNotification) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppNotification) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppNotification) },
        { }};

    static PyType_Spec type_spec_AppNotification = {
        "winui3._winui3_microsoft_windows_appnotifications.AppNotification",
        sizeof(py::wrapper::Microsoft::Windows::AppNotifications::AppNotification),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppNotification};

    // ----- AppNotificationActivatedEventArgs class --------------------

    static PyObject* _new_AppNotificationActivatedEventArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs>::type_name);
        return nullptr;
    }

    static void _dealloc_AppNotificationActivatedEventArgs(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* AppNotificationActivatedEventArgs_get_Argument(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationActivatedEventArgs", L"Argument");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Argument();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppNotificationActivatedEventArgs_get_UserInput(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationActivatedEventArgs", L"UserInput");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.UserInput();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppNotificationActivatedEventArgs_get_Arguments(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationActivatedEventArgs", L"Arguments");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Arguments();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

    static PyObject* _from_AppNotificationActivatedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppNotificationActivatedEventArgs[] = {
        { "_assign_array_", _assign_array_AppNotificationActivatedEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppNotificationActivatedEventArgs), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_AppNotificationActivatedEventArgs[] = {
        { "argument", reinterpret_cast<getter>(AppNotificationActivatedEventArgs_get_Argument), nullptr, nullptr, nullptr },
        { "user_input", reinterpret_cast<getter>(AppNotificationActivatedEventArgs_get_UserInput), nullptr, nullptr, nullptr },
        { "arguments", reinterpret_cast<getter>(AppNotificationActivatedEventArgs_get_Arguments), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_AppNotificationActivatedEventArgs[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppNotificationActivatedEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppNotificationActivatedEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppNotificationActivatedEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppNotificationActivatedEventArgs) },
        { }};

    static PyType_Spec type_spec_AppNotificationActivatedEventArgs = {
        "winui3._winui3_microsoft_windows_appnotifications.AppNotificationActivatedEventArgs",
        sizeof(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppNotificationActivatedEventArgs};

    // ----- AppNotificationManager class --------------------

    static PyObject* _new_AppNotificationManager(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::AppNotifications::AppNotificationManager>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::AppNotifications::AppNotificationManager>::type_name);
        return nullptr;
    }

    static void _dealloc_AppNotificationManager(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* AppNotificationManager_GetAllAsync(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"GetAllAsync", 0);
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.GetAllAsync();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_IsSupported(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"IsSupported", 0);
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return winrt::Microsoft::Windows::AppNotifications::AppNotificationManager::IsSupported();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_Register(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"Register", 0);
                }

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

                {
                    auto _gil = release_gil();
                    self->obj.Register();
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else 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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"Register", 2);
                }

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

                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 1);

                {
                    auto _gil = release_gil();
                    self->obj.Register(param0, param1);
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_RemoveAllAsync(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"RemoveAllAsync", 0);
                }

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.RemoveAllAsync();
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_RemoveByGroupAsync(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"RemoveByGroupAsync", 1);
                }

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

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.RemoveByGroupAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_RemoveByIdAsync(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"RemoveByIdAsync", 1);
                }

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

                auto param0 = py::convert_to<uint32_t>(args, 0);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.RemoveByIdAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_RemoveByTagAndGroupAsync(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"RemoveByTagAndGroupAsync", 2);
                }

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

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.RemoveByTagAndGroupAsync(param0, param1);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_RemoveByTagAsync(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"RemoveByTagAsync", 1);
                }

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

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

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.RemoveByTagAsync(param0);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_Show(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"Show", 1);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::AppNotifications::AppNotification>(args, 0);

                {
                    auto _gil = release_gil();
                    self->obj.Show(param0);
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_Unregister(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"Unregister", 0);
                }

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

                {
                    auto _gil = release_gil();
                    self->obj.Unregister();
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_UnregisterAll(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"UnregisterAll", 0);
                }

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

                {
                    auto _gil = release_gil();
                    self->obj.UnregisterAll();
                }

                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_UpdateAsync(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"UpdateAsync", 3);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::AppNotifications::AppNotificationProgressData>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.UpdateAsync(param0, param1, param2);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_UpdateAsync2(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_GET_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"Microsoft.Windows.AppNotifications.AppNotificationManager", L"UpdateAsync", 2);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::AppNotifications::AppNotificationProgressData>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);

                return py::convert([&]()
                {
                    auto _gil = release_gil();
                    return self->obj.UpdateAsync(param0, param1);
                }());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_get_Setting(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationManager", L"Setting");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Setting();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_get_Default(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationManager", L"Default");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return winrt::Microsoft::Windows::AppNotifications::AppNotificationManager::Default();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_add_NotificationInvoked(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* arg) noexcept
    {
        try
        {
            static std::optional<bool> is_event_present{};

            if (!is_event_present.has_value())
            {
                is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Microsoft.Windows.AppNotifications.AppNotificationManager", L"NotificationInvoked");
            }

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

            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::Windows::AppNotifications::AppNotificationManager, winrt::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs>>(arg);

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.NotificationInvoked(param0);
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppNotificationManager_remove_NotificationInvoked(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager* self, PyObject* arg) noexcept
    {
        try
        {
            static std::optional<bool> is_event_present{};

            if (!is_event_present.has_value())
            {
                is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Microsoft.Windows.AppNotifications.AppNotificationManager", L"NotificationInvoked");
            }

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

            auto param0 = py::convert_to<winrt::event_token>(arg);

            {
                auto _gil = release_gil();
                self->obj.NotificationInvoked(param0);
            }

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

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

    static PyObject* _from_AppNotificationManager(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Microsoft::Windows::AppNotifications::AppNotificationManager>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppNotificationManager[] = {
        { "get_all_async", reinterpret_cast<PyCFunction>(AppNotificationManager_GetAllAsync), METH_VARARGS, nullptr },
        { "register", reinterpret_cast<PyCFunction>(AppNotificationManager_Register), METH_VARARGS, nullptr },
        { "remove_all_async", reinterpret_cast<PyCFunction>(AppNotificationManager_RemoveAllAsync), METH_VARARGS, nullptr },
        { "remove_by_group_async", reinterpret_cast<PyCFunction>(AppNotificationManager_RemoveByGroupAsync), METH_VARARGS, nullptr },
        { "remove_by_id_async", reinterpret_cast<PyCFunction>(AppNotificationManager_RemoveByIdAsync), METH_VARARGS, nullptr },
        { "remove_by_tag_and_group_async", reinterpret_cast<PyCFunction>(AppNotificationManager_RemoveByTagAndGroupAsync), METH_VARARGS, nullptr },
        { "remove_by_tag_async", reinterpret_cast<PyCFunction>(AppNotificationManager_RemoveByTagAsync), METH_VARARGS, nullptr },
        { "show", reinterpret_cast<PyCFunction>(AppNotificationManager_Show), METH_VARARGS, nullptr },
        { "unregister", reinterpret_cast<PyCFunction>(AppNotificationManager_Unregister), METH_VARARGS, nullptr },
        { "unregister_all", reinterpret_cast<PyCFunction>(AppNotificationManager_UnregisterAll), METH_VARARGS, nullptr },
        { "update_async", reinterpret_cast<PyCFunction>(AppNotificationManager_UpdateAsync), METH_VARARGS, nullptr },
        { "update_async2", reinterpret_cast<PyCFunction>(AppNotificationManager_UpdateAsync2), METH_VARARGS, nullptr },
        { "add_notification_invoked", reinterpret_cast<PyCFunction>(AppNotificationManager_add_NotificationInvoked), METH_O, nullptr },
        { "remove_notification_invoked", reinterpret_cast<PyCFunction>(AppNotificationManager_remove_NotificationInvoked), METH_O, nullptr },
        { "_assign_array_", _assign_array_AppNotificationManager, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppNotificationManager), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_AppNotificationManager[] = {
        { "setting", reinterpret_cast<getter>(AppNotificationManager_get_Setting), nullptr, nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_AppNotificationManager[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppNotificationManager) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppNotificationManager) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppNotificationManager) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppNotificationManager) },
        { }};

    static PyType_Spec type_spec_AppNotificationManager = {
        "winui3._winui3_microsoft_windows_appnotifications.AppNotificationManager",
        sizeof(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationManager),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppNotificationManager};

    static PyGetSetDef getset_AppNotificationManager_Static[] = {
        { "default", reinterpret_cast<getter>(AppNotificationManager_get_Default), nullptr, nullptr, nullptr },
        { }};

    static PyMethodDef methods_AppNotificationManager_Static[] = {
        { "is_supported", reinterpret_cast<PyCFunction>(AppNotificationManager_IsSupported), METH_VARARGS, nullptr },
        { }};

    static PyType_Slot type_slots_AppNotificationManager_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_AppNotificationManager_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_AppNotificationManager_Static) },
        { }
    };

    static PyType_Spec type_spec_AppNotificationManager_Static = {
        "winui3._winui3_microsoft_windows_appnotifications.AppNotificationManager_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_AppNotificationManager_Static};

    // ----- AppNotificationProgressData class --------------------

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

        auto arg_count = PyTuple_GET_SIZE(args);
        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<uint32_t>(args, 0);

                winrt::Microsoft::Windows::AppNotifications::AppNotificationProgressData instance{param0};
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static void _dealloc_AppNotificationProgressData(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* AppNotificationProgressData_get_ValueStringOverride(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"ValueStringOverride");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.ValueStringOverride();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotificationProgressData_put_ValueStringOverride(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"ValueStringOverride");
            }

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

            auto param0 = py::convert_to<winrt::hstring>(arg);

            {
                auto _gil = release_gil();
                self->obj.ValueStringOverride(param0);
            }

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

    static PyObject* AppNotificationProgressData_get_Value(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"Value");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Value();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotificationProgressData_put_Value(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"Value");
            }

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

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

            {
                auto _gil = release_gil();
                self->obj.Value(param0);
            }

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

    static PyObject* AppNotificationProgressData_get_Title(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"Title");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Title();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotificationProgressData_put_Title(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"Title");
            }

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

            auto param0 = py::convert_to<winrt::hstring>(arg);

            {
                auto _gil = release_gil();
                self->obj.Title(param0);
            }

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

    static PyObject* AppNotificationProgressData_get_Status(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"Status");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.Status();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotificationProgressData_put_Status(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"Status");
            }

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

            auto param0 = py::convert_to<winrt::hstring>(arg);

            {
                auto _gil = release_gil();
                self->obj.Status(param0);
            }

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

    static PyObject* AppNotificationProgressData_get_SequenceNumber(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, void* /*unused*/) noexcept
    {
        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"SequenceNumber");
            }

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

            return py::convert([&]()
            {
                auto _gil = release_gil();
                return self->obj.SequenceNumber();
            }());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static int AppNotificationProgressData_put_SequenceNumber(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!arg)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

        try
        {
            static std::optional<bool> is_property_present{};

            if (!is_property_present.has_value())
            {
                is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Microsoft.Windows.AppNotifications.AppNotificationProgressData", L"SequenceNumber");
            }

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

            auto param0 = py::convert_to<uint32_t>(arg);

            {
                auto _gil = release_gil();
                self->obj.SequenceNumber(param0);
            }

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

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

    static PyObject* _from_AppNotificationProgressData(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Microsoft::Windows::AppNotifications::AppNotificationProgressData>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppNotificationProgressData[] = {
        { "_assign_array_", _assign_array_AppNotificationProgressData, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AppNotificationProgressData), METH_O | METH_STATIC, nullptr },
        { }};

    static PyGetSetDef _getset_AppNotificationProgressData[] = {
        { "value_string_override", reinterpret_cast<getter>(AppNotificationProgressData_get_ValueStringOverride), reinterpret_cast<setter>(AppNotificationProgressData_put_ValueStringOverride), nullptr, nullptr },
        { "value", reinterpret_cast<getter>(AppNotificationProgressData_get_Value), reinterpret_cast<setter>(AppNotificationProgressData_put_Value), nullptr, nullptr },
        { "title", reinterpret_cast<getter>(AppNotificationProgressData_get_Title), reinterpret_cast<setter>(AppNotificationProgressData_put_Title), nullptr, nullptr },
        { "status", reinterpret_cast<getter>(AppNotificationProgressData_get_Status), reinterpret_cast<setter>(AppNotificationProgressData_put_Status), nullptr, nullptr },
        { "sequence_number", reinterpret_cast<getter>(AppNotificationProgressData_get_SequenceNumber), reinterpret_cast<setter>(AppNotificationProgressData_put_SequenceNumber), nullptr, nullptr },
        { }};

    static PyType_Slot _type_slots_AppNotificationProgressData[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppNotificationProgressData) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AppNotificationProgressData) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppNotificationProgressData) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppNotificationProgressData) },
        { }};

    static PyType_Spec type_spec_AppNotificationProgressData = {
        "winui3._winui3_microsoft_windows_appnotifications.AppNotificationProgressData",
        sizeof(py::wrapper::Microsoft::Windows::AppNotifications::AppNotificationProgressData),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppNotificationProgressData};

    // ----- Microsoft.Windows.AppNotifications Initialization --------------------

    PyDoc_STRVAR(module_doc, "Microsoft.Windows.AppNotifications");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_winui3_microsoft_windows_appnotifications",
        module_doc,
        0,
        nullptr,
        nullptr,
        nullptr,
        nullptr,
        nullptr};
} // py::cpp::Microsoft::Windows::AppNotifications

PyMODINIT_FUNC PyInit__winui3_microsoft_windows_appnotifications(void) noexcept
{
    using namespace py::cpp::Microsoft::Windows::AppNotifications;

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

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

    if (!module)
    {
        return nullptr;
    }

    auto inspectable_meta_type = py::get_inspectable_meta_type();
    if (!inspectable_meta_type)
    {
        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::pytype_handle AppNotification_type{py::register_python_type(module.get(), &type_spec_AppNotification, object_bases.get(), inspectable_meta_type)};
    if (!AppNotification_type)
    {
        return nullptr;
    }

    py::pytype_handle AppNotificationActivatedEventArgs_type{py::register_python_type(module.get(), &type_spec_AppNotificationActivatedEventArgs, object_bases.get(), inspectable_meta_type)};
    if (!AppNotificationActivatedEventArgs_type)
    {
        return nullptr;
    }

    py::pyobj_handle AppNotificationManager_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
    if (!AppNotificationManager_Static_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_AppNotificationManager_Static{PyType_FromSpecWithBases(&type_spec_AppNotificationManager_Static, AppNotificationManager_Static_bases.get())};
    if (!type_AppNotificationManager_Static)
    {
        return nullptr;
    }

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

    py::pytype_handle AppNotificationProgressData_type{py::register_python_type(module.get(), &type_spec_AppNotificationProgressData, object_bases.get(), inspectable_meta_type)};
    if (!AppNotificationProgressData_type)
    {
        return nullptr;
    }


    return module.detach();
}
