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

#include "py.Microsoft.Windows.Widgets.Feeds.Providers.h"

namespace py::cpp::Microsoft::Windows::Widgets::Feeds::Providers
{
    // ----- CustomQueryParametersRequestedArgs class --------------------

    static PyObject* _new_CustomQueryParametersRequestedArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersRequestedArgs>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersRequestedArgs>::type_name);
        return nullptr;
    }

    static void _dealloc_CustomQueryParametersRequestedArgs(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersRequestedArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* CustomQueryParametersRequestedArgs_get_FeedProviderDefinitionId(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersRequestedArgs* 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.Widgets.Feeds.Providers.CustomQueryParametersRequestedArgs", L"FeedProviderDefinitionId");
            }

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

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

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

    static PyObject* _from_CustomQueryParametersRequestedArgs(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::Widgets::Feeds::Providers::CustomQueryParametersRequestedArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CustomQueryParametersRequestedArgs[] = {
        { "_assign_array_", _assign_array_CustomQueryParametersRequestedArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CustomQueryParametersRequestedArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CustomQueryParametersRequestedArgs[] = {
        { "feed_provider_definition_id", reinterpret_cast<getter>(CustomQueryParametersRequestedArgs_get_FeedProviderDefinitionId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CustomQueryParametersRequestedArgs[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_CustomQueryParametersRequestedArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_CustomQueryParametersRequestedArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_CustomQueryParametersRequestedArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_CustomQueryParametersRequestedArgs) },
        { }
    };

    static PyType_Spec type_spec_CustomQueryParametersRequestedArgs = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.CustomQueryParametersRequestedArgs",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersRequestedArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CustomQueryParametersRequestedArgs};

    // ----- CustomQueryParametersUpdateOptions class --------------------

    static PyObject* _new_CustomQueryParametersUpdateOptions(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::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);

                winrt::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersUpdateOptions 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_CustomQueryParametersUpdateOptions(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersUpdateOptions* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* CustomQueryParametersUpdateOptions_get_CustomQueryParameters(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersUpdateOptions* 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.Widgets.Feeds.Providers.CustomQueryParametersUpdateOptions", L"CustomQueryParameters");
            }

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

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

    static PyObject* CustomQueryParametersUpdateOptions_get_FeedProviderDefinitionId(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersUpdateOptions* 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.Widgets.Feeds.Providers.CustomQueryParametersUpdateOptions", L"FeedProviderDefinitionId");
            }

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

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

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

    static PyObject* _from_CustomQueryParametersUpdateOptions(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::Widgets::Feeds::Providers::CustomQueryParametersUpdateOptions>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_CustomQueryParametersUpdateOptions[] = {
        { "_assign_array_", _assign_array_CustomQueryParametersUpdateOptions, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_CustomQueryParametersUpdateOptions), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_CustomQueryParametersUpdateOptions[] = {
        { "custom_query_parameters", reinterpret_cast<getter>(CustomQueryParametersUpdateOptions_get_CustomQueryParameters), nullptr, nullptr, nullptr },
        { "feed_provider_definition_id", reinterpret_cast<getter>(CustomQueryParametersUpdateOptions_get_FeedProviderDefinitionId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_CustomQueryParametersUpdateOptions[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_CustomQueryParametersUpdateOptions) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_CustomQueryParametersUpdateOptions) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_CustomQueryParametersUpdateOptions) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_CustomQueryParametersUpdateOptions) },
        { }
    };

    static PyType_Spec type_spec_CustomQueryParametersUpdateOptions = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.CustomQueryParametersUpdateOptions",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersUpdateOptions),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_CustomQueryParametersUpdateOptions};

    // ----- FeedDisabledArgs class --------------------

    static PyObject* _new_FeedDisabledArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedDisabledArgs>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedDisabledArgs>::type_name);
        return nullptr;
    }

    static void _dealloc_FeedDisabledArgs(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedDisabledArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* FeedDisabledArgs_get_FeedDefinitionId(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedDisabledArgs* 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.Widgets.Feeds.Providers.FeedDisabledArgs", L"FeedDefinitionId");
            }

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

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

    static PyObject* FeedDisabledArgs_get_FeedProviderDefinitionId(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedDisabledArgs* 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.Widgets.Feeds.Providers.FeedDisabledArgs", L"FeedProviderDefinitionId");
            }

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

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

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

    static PyObject* _from_FeedDisabledArgs(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::Widgets::Feeds::Providers::FeedDisabledArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_FeedDisabledArgs[] = {
        { "_assign_array_", _assign_array_FeedDisabledArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_FeedDisabledArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_FeedDisabledArgs[] = {
        { "feed_definition_id", reinterpret_cast<getter>(FeedDisabledArgs_get_FeedDefinitionId), nullptr, nullptr, nullptr },
        { "feed_provider_definition_id", reinterpret_cast<getter>(FeedDisabledArgs_get_FeedProviderDefinitionId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_FeedDisabledArgs[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_FeedDisabledArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_FeedDisabledArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_FeedDisabledArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_FeedDisabledArgs) },
        { }
    };

    static PyType_Spec type_spec_FeedDisabledArgs = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.FeedDisabledArgs",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedDisabledArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_FeedDisabledArgs};

    // ----- FeedEnabledArgs class --------------------

    static PyObject* _new_FeedEnabledArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedEnabledArgs>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedEnabledArgs>::type_name);
        return nullptr;
    }

    static void _dealloc_FeedEnabledArgs(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedEnabledArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* FeedEnabledArgs_get_FeedDefinitionId(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedEnabledArgs* 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.Widgets.Feeds.Providers.FeedEnabledArgs", L"FeedDefinitionId");
            }

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

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

    static PyObject* FeedEnabledArgs_get_FeedProviderDefinitionId(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedEnabledArgs* 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.Widgets.Feeds.Providers.FeedEnabledArgs", L"FeedProviderDefinitionId");
            }

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

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

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

    static PyObject* _from_FeedEnabledArgs(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::Widgets::Feeds::Providers::FeedEnabledArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_FeedEnabledArgs[] = {
        { "_assign_array_", _assign_array_FeedEnabledArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_FeedEnabledArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_FeedEnabledArgs[] = {
        { "feed_definition_id", reinterpret_cast<getter>(FeedEnabledArgs_get_FeedDefinitionId), nullptr, nullptr, nullptr },
        { "feed_provider_definition_id", reinterpret_cast<getter>(FeedEnabledArgs_get_FeedProviderDefinitionId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_FeedEnabledArgs[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_FeedEnabledArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_FeedEnabledArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_FeedEnabledArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_FeedEnabledArgs) },
        { }
    };

    static PyType_Spec type_spec_FeedEnabledArgs = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.FeedEnabledArgs",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedEnabledArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_FeedEnabledArgs};

    // ----- FeedManager class --------------------

    static PyObject* _new_FeedManager(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedManager>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedManager>::type_name);
        return nullptr;
    }

    static void _dealloc_FeedManager(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedManager* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

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

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.FeedManager", L"GetDefault", 0);
                }

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

                return py::convert(winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedManager::GetDefault());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* FeedManager_GetEnabledFeedProviders(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.FeedManager", L"GetEnabledFeedProviders", 0);
                }

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

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

    static PyObject* FeedManager_SetCustomQueryParameters(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.FeedManager", L"SetCustomQueryParameters", 1);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersUpdateOptions>(args, 0);

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

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

    static PyObject* _from_FeedManager(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::Widgets::Feeds::Providers::FeedManager>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_FeedManager[] = {
        { "get_enabled_feed_providers", reinterpret_cast<PyCFunction>(FeedManager_GetEnabledFeedProviders), METH_VARARGS, nullptr },
        { "set_custom_query_parameters", reinterpret_cast<PyCFunction>(FeedManager_SetCustomQueryParameters), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_FeedManager, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_FeedManager), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_FeedManager[] = {
        { }
    };

    static PyType_Slot _type_slots_FeedManager[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_FeedManager) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_FeedManager) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_FeedManager) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_FeedManager) },
        { }
    };

    static PyType_Spec type_spec_FeedManager = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.FeedManager",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedManager),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_FeedManager};

    static PyGetSetDef getset_FeedManager_Static[] = {
        { }
    };

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

    static PyType_Slot type_slots_FeedManager_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_FeedManager_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_FeedManager_Static) },
        { }
    };

    static PyType_Spec type_spec_FeedManager_Static =
    {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.FeedManager_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_FeedManager_Static
    };

    // ----- FeedProviderDisabledArgs class --------------------

    static PyObject* _new_FeedProviderDisabledArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderDisabledArgs>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderDisabledArgs>::type_name);
        return nullptr;
    }

    static void _dealloc_FeedProviderDisabledArgs(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderDisabledArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* FeedProviderDisabledArgs_get_FeedProviderDefinitionId(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderDisabledArgs* 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.Widgets.Feeds.Providers.FeedProviderDisabledArgs", L"FeedProviderDefinitionId");
            }

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

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

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

    static PyObject* _from_FeedProviderDisabledArgs(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::Widgets::Feeds::Providers::FeedProviderDisabledArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_FeedProviderDisabledArgs[] = {
        { "_assign_array_", _assign_array_FeedProviderDisabledArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_FeedProviderDisabledArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_FeedProviderDisabledArgs[] = {
        { "feed_provider_definition_id", reinterpret_cast<getter>(FeedProviderDisabledArgs_get_FeedProviderDefinitionId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_FeedProviderDisabledArgs[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_FeedProviderDisabledArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_FeedProviderDisabledArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_FeedProviderDisabledArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_FeedProviderDisabledArgs) },
        { }
    };

    static PyType_Spec type_spec_FeedProviderDisabledArgs = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.FeedProviderDisabledArgs",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderDisabledArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_FeedProviderDisabledArgs};

    // ----- FeedProviderEnabledArgs class --------------------

    static PyObject* _new_FeedProviderEnabledArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderEnabledArgs>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderEnabledArgs>::type_name);
        return nullptr;
    }

    static void _dealloc_FeedProviderEnabledArgs(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderEnabledArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* FeedProviderEnabledArgs_get_FeedProviderDefinitionId(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderEnabledArgs* 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.Widgets.Feeds.Providers.FeedProviderEnabledArgs", L"FeedProviderDefinitionId");
            }

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

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

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

    static PyObject* _from_FeedProviderEnabledArgs(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::Widgets::Feeds::Providers::FeedProviderEnabledArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_FeedProviderEnabledArgs[] = {
        { "_assign_array_", _assign_array_FeedProviderEnabledArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_FeedProviderEnabledArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_FeedProviderEnabledArgs[] = {
        { "feed_provider_definition_id", reinterpret_cast<getter>(FeedProviderEnabledArgs_get_FeedProviderDefinitionId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_FeedProviderEnabledArgs[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_FeedProviderEnabledArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_FeedProviderEnabledArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_FeedProviderEnabledArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_FeedProviderEnabledArgs) },
        { }
    };

    static PyType_Spec type_spec_FeedProviderEnabledArgs = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.FeedProviderEnabledArgs",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderEnabledArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_FeedProviderEnabledArgs};

    // ----- FeedProviderInfo class --------------------

    static PyObject* _new_FeedProviderInfo(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderInfo>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderInfo>::type_name);
        return nullptr;
    }

    static void _dealloc_FeedProviderInfo(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderInfo* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* FeedProviderInfo_get_EnabledFeedDefinitionIds(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderInfo* 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.Widgets.Feeds.Providers.FeedProviderInfo", L"EnabledFeedDefinitionIds");
            }

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

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

    static PyObject* FeedProviderInfo_get_FeedProviderDefinitionId(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderInfo* 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.Widgets.Feeds.Providers.FeedProviderInfo", L"FeedProviderDefinitionId");
            }

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

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

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

    static PyObject* _from_FeedProviderInfo(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::Widgets::Feeds::Providers::FeedProviderInfo>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_FeedProviderInfo[] = {
        { "_assign_array_", _assign_array_FeedProviderInfo, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_FeedProviderInfo), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_FeedProviderInfo[] = {
        { "enabled_feed_definition_ids", reinterpret_cast<getter>(FeedProviderInfo_get_EnabledFeedDefinitionIds), nullptr, nullptr, nullptr },
        { "feed_provider_definition_id", reinterpret_cast<getter>(FeedProviderInfo_get_FeedProviderDefinitionId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_FeedProviderInfo[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_FeedProviderInfo) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_FeedProviderInfo) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_FeedProviderInfo) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_FeedProviderInfo) },
        { }
    };

    static PyType_Spec type_spec_FeedProviderInfo = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.FeedProviderInfo",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderInfo),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_FeedProviderInfo};

    // ----- IFeedManager interface --------------------

    static PyObject* _new_IFeedManager(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::IFeedManager>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::IFeedManager>::type_name);
        return nullptr;
    }

    static void _dealloc_IFeedManager(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedManager* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IFeedManager_GetEnabledFeedProviders(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.IFeedManager", L"GetEnabledFeedProviders", 0);
                }

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

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

    static PyObject* IFeedManager_SetCustomQueryParameters(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.IFeedManager", L"SetCustomQueryParameters", 1);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersUpdateOptions>(args, 0);

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

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

    static PyObject* _from_IFeedManager(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::Widgets::Feeds::Providers::IFeedManager>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IFeedManager[] = {
        { "get_enabled_feed_providers", reinterpret_cast<PyCFunction>(IFeedManager_GetEnabledFeedProviders), METH_VARARGS, nullptr },
        { "set_custom_query_parameters", reinterpret_cast<PyCFunction>(IFeedManager_SetCustomQueryParameters), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_IFeedManager, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IFeedManager), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IFeedManager[] = {
        { }
    };

    static PyType_Slot _type_slots_IFeedManager[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IFeedManager) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IFeedManager) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IFeedManager) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IFeedManager) },
        { }
    };

    static PyType_Spec type_spec_IFeedManager = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.IFeedManager",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedManager),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IFeedManager};

    // ----- IFeedProvider interface --------------------

    static PyObject* _new_IFeedProvider(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::IFeedProvider>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Microsoft::Windows::Widgets::Feeds::Providers::IFeedProvider>::type_name);
        return nullptr;
    }

    static void _dealloc_IFeedProvider(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedProvider* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* IFeedProvider_OnCustomQueryParametersRequested(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedProvider* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.IFeedProvider", L"OnCustomQueryParametersRequested", 1);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::Widgets::Feeds::Providers::CustomQueryParametersRequestedArgs>(args, 0);

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

    static PyObject* IFeedProvider_OnFeedDisabled(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedProvider* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.IFeedProvider", L"OnFeedDisabled", 1);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedDisabledArgs>(args, 0);

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

    static PyObject* IFeedProvider_OnFeedEnabled(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedProvider* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.IFeedProvider", L"OnFeedEnabled", 1);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedEnabledArgs>(args, 0);

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

    static PyObject* IFeedProvider_OnFeedProviderDisabled(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedProvider* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.IFeedProvider", L"OnFeedProviderDisabled", 1);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderDisabledArgs>(args, 0);

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

    static PyObject* IFeedProvider_OnFeedProviderEnabled(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedProvider* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

                if (!is_overload_present.has_value())
                {
                    is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Microsoft.Windows.Widgets.Feeds.Providers.IFeedProvider", L"OnFeedProviderEnabled", 1);
                }

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

                auto param0 = py::convert_to<winrt::Microsoft::Windows::Widgets::Feeds::Providers::FeedProviderEnabledArgs>(args, 0);

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

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

    static PyObject* _from_IFeedProvider(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::Widgets::Feeds::Providers::IFeedProvider>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_IFeedProvider[] = {
        { "on_custom_query_parameters_requested", reinterpret_cast<PyCFunction>(IFeedProvider_OnCustomQueryParametersRequested), METH_VARARGS, nullptr },
        { "on_feed_disabled", reinterpret_cast<PyCFunction>(IFeedProvider_OnFeedDisabled), METH_VARARGS, nullptr },
        { "on_feed_enabled", reinterpret_cast<PyCFunction>(IFeedProvider_OnFeedEnabled), METH_VARARGS, nullptr },
        { "on_feed_provider_disabled", reinterpret_cast<PyCFunction>(IFeedProvider_OnFeedProviderDisabled), METH_VARARGS, nullptr },
        { "on_feed_provider_enabled", reinterpret_cast<PyCFunction>(IFeedProvider_OnFeedProviderEnabled), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_IFeedProvider, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_IFeedProvider), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_IFeedProvider[] = {
        { }
    };

    static PyType_Slot _type_slots_IFeedProvider[] = {
        { Py_tp_new, reinterpret_cast<void*>(_new_IFeedProvider) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IFeedProvider) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_IFeedProvider) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_IFeedProvider) },
        { }
    };

    static PyType_Spec type_spec_IFeedProvider = {
        "winrt._winrt_microsoft_windows_widgets_feeds_providers.IFeedProvider",
        sizeof(py::wrapper::Microsoft::Windows::Widgets::Feeds::Providers::IFeedProvider),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_IFeedProvider};

    // ----- Microsoft.Windows.Widgets.Feeds.Providers Initialization --------------------

    PyDoc_STRVAR(module_doc, "Microsoft.Windows.Widgets.Feeds.Providers");

    static PyModuleDef module_def = {
        PyModuleDef_HEAD_INIT,
        "_winrt_microsoft_windows_widgets_feeds_providers",
        module_doc,
        0,
        nullptr,
        nullptr,
        nullptr,
        nullptr,
        nullptr};
} // py::cpp::Microsoft::Windows::Widgets::Feeds::Providers

PyMODINIT_FUNC PyInit__winrt_microsoft_windows_widgets_feeds_providers(void) noexcept
{
    using namespace py::cpp::Microsoft::Windows::Widgets::Feeds::Providers;

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

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

    if (!module)
    {
        return nullptr;
    }

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

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

    if (!object_bases)
    {
        return nullptr;
    }

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

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

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

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

    py::pyobj_handle type_FeedManager_Static{PyType_FromSpec(&type_spec_FeedManager_Static)};
    if (!type_FeedManager_Static)
    {
        return nullptr;
    }

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

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

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

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

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

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


    return module.detach();
}
