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

#include "pybase.h"
#include "py.Windows.Security.Authentication.Web.Core.h"


namespace py::cpp::Windows::Security::Authentication::Web::Core
{
    struct module_state
    {
        PyObject* type_FindAllWebAccountsStatus;
        PyObject* type_WebTokenRequestPromptType;
        PyObject* type_WebTokenRequestStatus;
        PyTypeObject* type_FindAllAccountsResult;
        PyTypeObject* type_WebAccountEventArgs;
        PyTypeObject* type_WebAccountMonitor;
        PyTypeObject* type_WebAuthenticationCoreManager;
        PyTypeObject* type_WebProviderError;
        PyTypeObject* type_WebTokenRequest;
        PyTypeObject* type_WebTokenRequestResult;
        PyTypeObject* type_WebTokenResponse;
    };

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

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

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

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


        Py_RETURN_NONE;
    }

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

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

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

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


        Py_RETURN_NONE;
    }

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

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

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

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


        Py_RETURN_NONE;
    }

    // ----- FindAllAccountsResult class --------------------
    static constexpr const char* const type_name_FindAllAccountsResult = "FindAllAccountsResult";

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

    static void _dealloc_FindAllAccountsResult(py::wrapper::Windows::Security::Authentication::Web::Core::FindAllAccountsResult* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* FindAllAccountsResult_get_Accounts(py::wrapper::Windows::Security::Authentication::Web::Core::FindAllAccountsResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.FindAllAccountsResult", L"Accounts"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* FindAllAccountsResult_get_ProviderError(py::wrapper::Windows::Security::Authentication::Web::Core::FindAllAccountsResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.FindAllAccountsResult", L"ProviderError"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* FindAllAccountsResult_get_Status(py::wrapper::Windows::Security::Authentication::Web::Core::FindAllAccountsResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.FindAllAccountsResult", L"Status"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_FindAllAccountsResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Security::Authentication::Web::Core::FindAllAccountsResult>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_FindAllAccountsResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Security::Authentication::Web::Core::FindAllAccountsResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_FindAllAccountsResult[] = {
        { "_assign_array_", _assign_array_FindAllAccountsResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_FindAllAccountsResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_FindAllAccountsResult[] = {
        { "accounts", reinterpret_cast<getter>(FindAllAccountsResult_get_Accounts), nullptr, nullptr, nullptr },
        { "provider_error", reinterpret_cast<getter>(FindAllAccountsResult_get_ProviderError), nullptr, nullptr, nullptr },
        { "status", reinterpret_cast<getter>(FindAllAccountsResult_get_Status), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_FindAllAccountsResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_FindAllAccountsResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_FindAllAccountsResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_FindAllAccountsResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_FindAllAccountsResult) },
        { },
    };

    static PyType_Spec type_spec_FindAllAccountsResult =
    {
        "_winsdk_Windows_Security_Authentication_Web_Core.FindAllAccountsResult",
        sizeof(py::wrapper::Windows::Security::Authentication::Web::Core::FindAllAccountsResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_FindAllAccountsResult
    };

    // ----- WebAccountEventArgs class --------------------
    static constexpr const char* const type_name_WebAccountEventArgs = "WebAccountEventArgs";

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

    static void _dealloc_WebAccountEventArgs(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountEventArgs* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebAccountEventArgs_get_Account(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountEventArgs* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebAccountEventArgs", L"Account"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_WebAccountEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Security::Authentication::Web::Core::WebAccountEventArgs>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebAccountEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Security::Authentication::Web::Core::WebAccountEventArgs>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebAccountEventArgs[] = {
        { "_assign_array_", _assign_array_WebAccountEventArgs, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebAccountEventArgs), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebAccountEventArgs[] = {
        { "account", reinterpret_cast<getter>(WebAccountEventArgs_get_Account), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebAccountEventArgs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebAccountEventArgs) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebAccountEventArgs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebAccountEventArgs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebAccountEventArgs) },
        { },
    };

    static PyType_Spec type_spec_WebAccountEventArgs =
    {
        "_winsdk_Windows_Security_Authentication_Web_Core.WebAccountEventArgs",
        sizeof(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountEventArgs),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebAccountEventArgs
    };

    // ----- WebAccountMonitor class --------------------
    static constexpr const char* const type_name_WebAccountMonitor = "WebAccountMonitor";

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

    static void _dealloc_WebAccountMonitor(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebAccountMonitor_add_DefaultSignInAccountChanged(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Authentication.Web.Core.WebAccountMonitor", L"DefaultSignInAccountChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Security::Authentication::Web::Core::WebAccountMonitor, winrt::Windows::Foundation::IInspectable>>(arg);

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

    static PyObject* WebAccountMonitor_remove_DefaultSignInAccountChanged(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Authentication.Web.Core.WebAccountMonitor", L"DefaultSignInAccountChanged"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

            self->obj.DefaultSignInAccountChanged(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* WebAccountMonitor_add_Removed(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Authentication.Web.Core.WebAccountMonitor", L"Removed"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Security::Authentication::Web::Core::WebAccountMonitor, winrt::Windows::Security::Authentication::Web::Core::WebAccountEventArgs>>(arg);

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

    static PyObject* WebAccountMonitor_remove_Removed(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Authentication.Web.Core.WebAccountMonitor", L"Removed"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

            self->obj.Removed(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* WebAccountMonitor_add_Updated(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Authentication.Web.Core.WebAccountMonitor", L"Updated"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Security::Authentication::Web::Core::WebAccountMonitor, winrt::Windows::Security::Authentication::Web::Core::WebAccountEventArgs>>(arg);

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

    static PyObject* WebAccountMonitor_remove_Updated(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Authentication.Web.Core.WebAccountMonitor", L"Updated"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

            self->obj.Updated(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* WebAccountMonitor_add_AccountPictureUpdated(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Authentication.Web.Core.WebAccountMonitor", L"AccountPictureUpdated"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Security::Authentication::Web::Core::WebAccountMonitor, winrt::Windows::Security::Authentication::Web::Core::WebAccountEventArgs>>(arg);

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

    static PyObject* WebAccountMonitor_remove_AccountPictureUpdated(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor* self, PyObject* arg) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Authentication.Web.Core.WebAccountMonitor", L"AccountPictureUpdated"))
        {
            PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
            return nullptr;
        }

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

            self->obj.AccountPictureUpdated(param0);
            Py_RETURN_NONE;
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_WebAccountMonitor(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Security::Authentication::Web::Core::WebAccountMonitor>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebAccountMonitor(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Security::Authentication::Web::Core::WebAccountMonitor>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebAccountMonitor[] = {
        { "add_default_sign_in_account_changed", reinterpret_cast<PyCFunction>(WebAccountMonitor_add_DefaultSignInAccountChanged), METH_O, nullptr },
        { "remove_default_sign_in_account_changed", reinterpret_cast<PyCFunction>(WebAccountMonitor_remove_DefaultSignInAccountChanged), METH_O, nullptr },
        { "add_removed", reinterpret_cast<PyCFunction>(WebAccountMonitor_add_Removed), METH_O, nullptr },
        { "remove_removed", reinterpret_cast<PyCFunction>(WebAccountMonitor_remove_Removed), METH_O, nullptr },
        { "add_updated", reinterpret_cast<PyCFunction>(WebAccountMonitor_add_Updated), METH_O, nullptr },
        { "remove_updated", reinterpret_cast<PyCFunction>(WebAccountMonitor_remove_Updated), METH_O, nullptr },
        { "add_account_picture_updated", reinterpret_cast<PyCFunction>(WebAccountMonitor_add_AccountPictureUpdated), METH_O, nullptr },
        { "remove_account_picture_updated", reinterpret_cast<PyCFunction>(WebAccountMonitor_remove_AccountPictureUpdated), METH_O, nullptr },
        { "_assign_array_", _assign_array_WebAccountMonitor, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebAccountMonitor), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebAccountMonitor[] = {
        { }
    };

    static PyType_Slot _type_slots_WebAccountMonitor[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebAccountMonitor) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebAccountMonitor) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebAccountMonitor) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebAccountMonitor) },
        { },
    };

    static PyType_Spec type_spec_WebAccountMonitor =
    {
        "_winsdk_Windows_Security_Authentication_Web_Core.WebAccountMonitor",
        sizeof(py::wrapper::Windows::Security::Authentication::Web::Core::WebAccountMonitor),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebAccountMonitor
    };

    // ----- WebAuthenticationCoreManager class --------------------
    static constexpr const char* const type_name_WebAuthenticationCoreManager = "WebAuthenticationCoreManager";

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

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"CreateWebAccountMonitor", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Security::Credentials::WebAccount>>(args, 0);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::CreateWebAccountMonitor(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"FindAccountAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::WebAccountProvider>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::FindAccountAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"FindAccountProviderAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::FindAccountProviderAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"FindAccountProviderAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::FindAccountProviderAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"FindAccountProviderAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::System::User>(args, 2);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::FindAccountProviderAsync(param0, param1, param2));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"FindAllAccountsAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::WebAccountProvider>(args, 0);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::FindAllAccountsAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"FindAllAccountsAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::WebAccountProvider>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::FindAllAccountsAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"FindSystemAccountProviderAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::FindSystemAccountProviderAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"FindSystemAccountProviderAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::FindSystemAccountProviderAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"FindSystemAccountProviderAsync", 3))
            {
                py::set_arg_count_version_error(3);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::System::User>(args, 2);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::FindSystemAccountProviderAsync(param0, param1, param2));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"GetTokenSilentlyAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest>(args, 0);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::GetTokenSilentlyAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"GetTokenSilentlyAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Security::Credentials::WebAccount>(args, 1);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::GetTokenSilentlyAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"RequestTokenAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest>(args, 0);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::RequestTokenAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebAuthenticationCoreManager", L"RequestTokenAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Security::Credentials::WebAccount>(args, 1);

                return py::convert(winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager::RequestTokenAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebAuthenticationCoreManager[] = {
        { "create_web_account_monitor", reinterpret_cast<PyCFunction>(WebAuthenticationCoreManager_CreateWebAccountMonitor), METH_VARARGS | METH_STATIC, nullptr },
        { "find_account_async", reinterpret_cast<PyCFunction>(WebAuthenticationCoreManager_FindAccountAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "find_account_provider_async", reinterpret_cast<PyCFunction>(WebAuthenticationCoreManager_FindAccountProviderAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "find_all_accounts_async", reinterpret_cast<PyCFunction>(WebAuthenticationCoreManager_FindAllAccountsAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "find_system_account_provider_async", reinterpret_cast<PyCFunction>(WebAuthenticationCoreManager_FindSystemAccountProviderAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "get_token_silently_async", reinterpret_cast<PyCFunction>(WebAuthenticationCoreManager_GetTokenSilentlyAsync), METH_VARARGS | METH_STATIC, nullptr },
        { "request_token_async", reinterpret_cast<PyCFunction>(WebAuthenticationCoreManager_RequestTokenAsync), METH_VARARGS | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebAuthenticationCoreManager[] = {
        { }
    };

    static PyType_Slot _type_slots_WebAuthenticationCoreManager[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebAuthenticationCoreManager) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebAuthenticationCoreManager) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebAuthenticationCoreManager) },
        { },
    };

    static PyType_Spec type_spec_WebAuthenticationCoreManager =
    {
        "_winsdk_Windows_Security_Authentication_Web_Core.WebAuthenticationCoreManager",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebAuthenticationCoreManager
    };

    // ----- WebProviderError class --------------------
    static constexpr const char* const type_name_WebProviderError = "WebProviderError";

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

                winrt::Windows::Security::Authentication::Web::Core::WebProviderError 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_WebProviderError(py::wrapper::Windows::Security::Authentication::Web::Core::WebProviderError* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebProviderError_get_ErrorCode(py::wrapper::Windows::Security::Authentication::Web::Core::WebProviderError* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebProviderError", L"ErrorCode"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebProviderError_get_ErrorMessage(py::wrapper::Windows::Security::Authentication::Web::Core::WebProviderError* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebProviderError", L"ErrorMessage"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebProviderError_get_Properties(py::wrapper::Windows::Security::Authentication::Web::Core::WebProviderError* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebProviderError", L"Properties"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_WebProviderError(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Security::Authentication::Web::Core::WebProviderError>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebProviderError(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Security::Authentication::Web::Core::WebProviderError>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebProviderError[] = {
        { "_assign_array_", _assign_array_WebProviderError, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebProviderError), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebProviderError[] = {
        { "error_code", reinterpret_cast<getter>(WebProviderError_get_ErrorCode), nullptr, nullptr, nullptr },
        { "error_message", reinterpret_cast<getter>(WebProviderError_get_ErrorMessage), nullptr, nullptr, nullptr },
        { "properties", reinterpret_cast<getter>(WebProviderError_get_Properties), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebProviderError[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebProviderError) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebProviderError) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebProviderError) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebProviderError) },
        { },
    };

    static PyType_Spec type_spec_WebProviderError =
    {
        "_winsdk_Windows_Security_Authentication_Web_Core.WebProviderError",
        sizeof(py::wrapper::Windows::Security::Authentication::Web::Core::WebProviderError),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebProviderError
    };

    // ----- WebTokenRequest class --------------------
    static constexpr const char* const type_name_WebTokenRequest = "WebTokenRequest";

    static PyObject* _new_WebTokenRequest(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 == 3)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::WebAccountProvider>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);

                winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest instance{ param0, param1, param2 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 4)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::WebAccountProvider>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType>(args, 3);

                winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest instance{ param0, param1, param2, param3 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::WebAccountProvider>(args, 0);

                winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Credentials::WebAccountProvider>(args, 0);
                auto param1 = py::convert_to<winrt::hstring>(args, 1);

                winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest 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_WebTokenRequest(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebTokenRequest_get_ClientId(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequest", L"ClientId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenRequest_get_PromptType(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequest", L"PromptType"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenRequest_get_Properties(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequest", L"Properties"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenRequest_get_Scope(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequest", L"Scope"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenRequest_get_WebAccountProvider(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequest", L"WebAccountProvider"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenRequest_get_AppProperties(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequest", L"AppProperties"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenRequest_get_CorrelationId(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequest", L"CorrelationId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static int WebTokenRequest_put_CorrelationId(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequest", L"CorrelationId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return -1;
        }

        if (arg == nullptr)
        {
            PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
            return -1;
        }

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

            self->obj.CorrelationId(param0);
            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyObject* _assign_array_WebTokenRequest(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebTokenRequest(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebTokenRequest[] = {
        { "_assign_array_", _assign_array_WebTokenRequest, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebTokenRequest), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebTokenRequest[] = {
        { "client_id", reinterpret_cast<getter>(WebTokenRequest_get_ClientId), nullptr, nullptr, nullptr },
        { "prompt_type", reinterpret_cast<getter>(WebTokenRequest_get_PromptType), nullptr, nullptr, nullptr },
        { "properties", reinterpret_cast<getter>(WebTokenRequest_get_Properties), nullptr, nullptr, nullptr },
        { "scope", reinterpret_cast<getter>(WebTokenRequest_get_Scope), nullptr, nullptr, nullptr },
        { "web_account_provider", reinterpret_cast<getter>(WebTokenRequest_get_WebAccountProvider), nullptr, nullptr, nullptr },
        { "app_properties", reinterpret_cast<getter>(WebTokenRequest_get_AppProperties), nullptr, nullptr, nullptr },
        { "correlation_id", reinterpret_cast<getter>(WebTokenRequest_get_CorrelationId), reinterpret_cast<setter>(WebTokenRequest_put_CorrelationId), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebTokenRequest[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebTokenRequest) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebTokenRequest) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebTokenRequest) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebTokenRequest) },
        { },
    };

    static PyType_Spec type_spec_WebTokenRequest =
    {
        "_winsdk_Windows_Security_Authentication_Web_Core.WebTokenRequest",
        sizeof(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequest),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebTokenRequest
    };

    // ----- WebTokenRequestResult class --------------------
    static constexpr const char* const type_name_WebTokenRequestResult = "WebTokenRequestResult";

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

    static void _dealloc_WebTokenRequestResult(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequestResult* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebTokenRequestResult_InvalidateCacheAsync(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequestResult* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequestResult", L"InvalidateCacheAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* WebTokenRequestResult_get_ResponseData(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequestResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequestResult", L"ResponseData"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenRequestResult_get_ResponseError(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequestResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequestResult", L"ResponseError"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenRequestResult_get_ResponseStatus(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequestResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenRequestResult", L"ResponseStatus"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_WebTokenRequestResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestResult>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebTokenRequestResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebTokenRequestResult[] = {
        { "invalidate_cache_async", reinterpret_cast<PyCFunction>(WebTokenRequestResult_InvalidateCacheAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_WebTokenRequestResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebTokenRequestResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebTokenRequestResult[] = {
        { "response_data", reinterpret_cast<getter>(WebTokenRequestResult_get_ResponseData), nullptr, nullptr, nullptr },
        { "response_error", reinterpret_cast<getter>(WebTokenRequestResult_get_ResponseError), nullptr, nullptr, nullptr },
        { "response_status", reinterpret_cast<getter>(WebTokenRequestResult_get_ResponseStatus), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebTokenRequestResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebTokenRequestResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebTokenRequestResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebTokenRequestResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebTokenRequestResult) },
        { },
    };

    static PyType_Spec type_spec_WebTokenRequestResult =
    {
        "_winsdk_Windows_Security_Authentication_Web_Core.WebTokenRequestResult",
        sizeof(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenRequestResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebTokenRequestResult
    };

    // ----- WebTokenResponse class --------------------
    static constexpr const char* const type_name_WebTokenResponse = "WebTokenResponse";

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

                winrt::Windows::Security::Authentication::Web::Core::WebTokenResponse instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Security::Credentials::WebAccount>(args, 1);

                winrt::Windows::Security::Authentication::Web::Core::WebTokenResponse instance{ param0, param1 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Security::Credentials::WebAccount>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Security::Authentication::Web::Core::WebProviderError>(args, 2);

                winrt::Windows::Security::Authentication::Web::Core::WebTokenResponse instance{ param0, param1, param2 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 0)
        {
            try
            {
                winrt::Windows::Security::Authentication::Web::Core::WebTokenResponse instance{  };
                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_WebTokenResponse(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenResponse* self) noexcept
    {
        auto tp = Py_TYPE(self);

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

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

    static PyObject* WebTokenResponse_get_Properties(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenResponse* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenResponse", L"Properties"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenResponse_get_ProviderError(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenResponse* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenResponse", L"ProviderError"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenResponse_get_Token(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenResponse* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenResponse", L"Token"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* WebTokenResponse_get_WebAccount(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenResponse* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Web.Core.WebTokenResponse", L"WebAccount"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_WebTokenResponse(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Security::Authentication::Web::Core::WebTokenResponse>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_WebTokenResponse(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Security::Authentication::Web::Core::WebTokenResponse>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_WebTokenResponse[] = {
        { "_assign_array_", _assign_array_WebTokenResponse, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_WebTokenResponse), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_WebTokenResponse[] = {
        { "properties", reinterpret_cast<getter>(WebTokenResponse_get_Properties), nullptr, nullptr, nullptr },
        { "provider_error", reinterpret_cast<getter>(WebTokenResponse_get_ProviderError), nullptr, nullptr, nullptr },
        { "token", reinterpret_cast<getter>(WebTokenResponse_get_Token), nullptr, nullptr, nullptr },
        { "web_account", reinterpret_cast<getter>(WebTokenResponse_get_WebAccount), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_WebTokenResponse[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_WebTokenResponse) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_WebTokenResponse) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_WebTokenResponse) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_WebTokenResponse) },
        { },
    };

    static PyType_Spec type_spec_WebTokenResponse =
    {
        "_winsdk_Windows_Security_Authentication_Web_Core.WebTokenResponse",
        sizeof(py::wrapper::Windows::Security::Authentication::Web::Core::WebTokenResponse),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_WebTokenResponse
    };

    // ----- Windows.Security.Authentication.Web.Core Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Security::Authentication::Web::Core");

    static PyMethodDef module_methods[] = {
        {"_register_FindAllWebAccountsStatus", register_FindAllWebAccountsStatus, METH_O, "registers type"},
        {"_register_WebTokenRequestPromptType", register_WebTokenRequestPromptType, METH_O, "registers type"},
        {"_register_WebTokenRequestStatus", register_WebTokenRequestStatus, METH_O, "registers type"},
        {}};


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

        if (!state)
        {
            return 0;
        }

        Py_VISIT(state->type_FindAllWebAccountsStatus);
        Py_VISIT(state->type_WebTokenRequestPromptType);
        Py_VISIT(state->type_WebTokenRequestStatus);
        Py_VISIT(state->type_FindAllAccountsResult);
        Py_VISIT(state->type_WebAccountEventArgs);
        Py_VISIT(state->type_WebAccountMonitor);
        Py_VISIT(state->type_WebAuthenticationCoreManager);
        Py_VISIT(state->type_WebProviderError);
        Py_VISIT(state->type_WebTokenRequest);
        Py_VISIT(state->type_WebTokenRequestResult);
        Py_VISIT(state->type_WebTokenResponse);

        return 0;
    }

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

        if (!state)
        {
            return 0;
        }

        Py_CLEAR(state->type_FindAllWebAccountsStatus);
        Py_CLEAR(state->type_WebTokenRequestPromptType);
        Py_CLEAR(state->type_WebTokenRequestStatus);
        Py_CLEAR(state->type_FindAllAccountsResult);
        Py_CLEAR(state->type_WebAccountEventArgs);
        Py_CLEAR(state->type_WebAccountMonitor);
        Py_CLEAR(state->type_WebAuthenticationCoreManager);
        Py_CLEAR(state->type_WebProviderError);
        Py_CLEAR(state->type_WebTokenRequest);
        Py_CLEAR(state->type_WebTokenRequestResult);
        Py_CLEAR(state->type_WebTokenResponse);

        return 0;
    }


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

} // py::cpp::Windows::Security::Authentication::Web::Core

PyMODINIT_FUNC PyInit__winsdk_Windows_Security_Authentication_Web_Core(void) noexcept
{
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

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

    if (!module)
    {
        return nullptr;
    }

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

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

    if (!bases)
    {
        return nullptr;
    }

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

    if (!collections_abc_module)
    {
        return nullptr;
    }

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

    if (!sequence_type)
    {
        return nullptr;
    }

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

    if (!sequence_bases)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_type)
    {
        return nullptr;
    }

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

    if (!mutable_sequence_bases)
    {
        return nullptr;
    }

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

    if (!mapping_type)
    {
        return nullptr;
    }

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

    if (!mapping_bases)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_type)
    {
        return nullptr;
    }

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

    if (!mutable_mapping_bases)
    {
        return nullptr;
    }

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

    state->type_FindAllAccountsResult = py::register_python_type(module.get(), type_name_FindAllAccountsResult, &type_spec_FindAllAccountsResult, bases.get(), nullptr);
    if (!state->type_FindAllAccountsResult)
    {
        return nullptr;
    }

    state->type_WebAccountEventArgs = py::register_python_type(module.get(), type_name_WebAccountEventArgs, &type_spec_WebAccountEventArgs, bases.get(), nullptr);
    if (!state->type_WebAccountEventArgs)
    {
        return nullptr;
    }

    state->type_WebAccountMonitor = py::register_python_type(module.get(), type_name_WebAccountMonitor, &type_spec_WebAccountMonitor, bases.get(), nullptr);
    if (!state->type_WebAccountMonitor)
    {
        return nullptr;
    }

    state->type_WebAuthenticationCoreManager = py::register_python_type(module.get(), type_name_WebAuthenticationCoreManager, &type_spec_WebAuthenticationCoreManager, nullptr, nullptr);
    if (!state->type_WebAuthenticationCoreManager)
    {
        return nullptr;
    }

    state->type_WebProviderError = py::register_python_type(module.get(), type_name_WebProviderError, &type_spec_WebProviderError, bases.get(), nullptr);
    if (!state->type_WebProviderError)
    {
        return nullptr;
    }

    state->type_WebTokenRequest = py::register_python_type(module.get(), type_name_WebTokenRequest, &type_spec_WebTokenRequest, bases.get(), nullptr);
    if (!state->type_WebTokenRequest)
    {
        return nullptr;
    }

    state->type_WebTokenRequestResult = py::register_python_type(module.get(), type_name_WebTokenRequestResult, &type_spec_WebTokenRequestResult, bases.get(), nullptr);
    if (!state->type_WebTokenRequestResult)
    {
        return nullptr;
    }

    state->type_WebTokenResponse = py::register_python_type(module.get(), type_name_WebTokenResponse, &type_spec_WebTokenResponse, bases.get(), nullptr);
    if (!state->type_WebTokenResponse)
    {
        return nullptr;
    }


    return module.detach();
}

PyObject* py::py_type<winrt::Windows::Security::Authentication::Web::Core::FindAllWebAccountsStatus>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_FindAllWebAccountsStatus;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::FindAllWebAccountsStatus is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebTokenRequestPromptType;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestPromptType is not registered");
        return nullptr;
    }

    return python_type;
}

PyObject* py::py_type<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestStatus>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebTokenRequestStatus;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestStatus is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Security::Authentication::Web::Core::FindAllAccountsResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_FindAllAccountsResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::FindAllAccountsResult is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Security::Authentication::Web::Core::WebAccountEventArgs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebAccountEventArgs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::WebAccountEventArgs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Security::Authentication::Web::Core::WebAccountMonitor>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebAccountMonitor;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::WebAccountMonitor is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebAuthenticationCoreManager;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::WebAuthenticationCoreManager is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Security::Authentication::Web::Core::WebProviderError>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebProviderError;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::WebProviderError is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebTokenRequest;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::WebTokenRequest is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestResult>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebTokenRequestResult;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::WebTokenRequestResult is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::Security::Authentication::Web::Core::WebTokenResponse>::get_python_type() noexcept {
    using namespace py::cpp::Windows::Security::Authentication::Web::Core;

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_WebTokenResponse;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::Security::Authentication::Web::Core::WebTokenResponse is not registered");
        return nullptr;
    }

    return python_type;
}
