// 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.Identity.Core.h"


namespace py::cpp::Windows::Security::Authentication::Identity::Core
{
    struct module_state
    {
        PyObject* type_MicrosoftAccountMultiFactorAuthenticationType;
        PyObject* type_MicrosoftAccountMultiFactorServiceResponse;
        PyObject* type_MicrosoftAccountMultiFactorSessionApprovalStatus;
        PyObject* type_MicrosoftAccountMultiFactorSessionAuthenticationStatus;
        PyTypeObject* type_MicrosoftAccountMultiFactorAuthenticationManager;
        PyTypeObject* type_MicrosoftAccountMultiFactorGetSessionsResult;
        PyTypeObject* type_MicrosoftAccountMultiFactorOneTimeCodedInfo;
        PyTypeObject* type_MicrosoftAccountMultiFactorSessionInfo;
        PyTypeObject* type_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo;
    };

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

        if (state->type_MicrosoftAccountMultiFactorAuthenticationType)
        {
            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_MicrosoftAccountMultiFactorAuthenticationType = type;
        Py_INCREF(state->type_MicrosoftAccountMultiFactorAuthenticationType);


        Py_RETURN_NONE;
    }

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

        if (state->type_MicrosoftAccountMultiFactorServiceResponse)
        {
            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_MicrosoftAccountMultiFactorServiceResponse = type;
        Py_INCREF(state->type_MicrosoftAccountMultiFactorServiceResponse);


        Py_RETURN_NONE;
    }

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

        if (state->type_MicrosoftAccountMultiFactorSessionApprovalStatus)
        {
            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_MicrosoftAccountMultiFactorSessionApprovalStatus = type;
        Py_INCREF(state->type_MicrosoftAccountMultiFactorSessionApprovalStatus);


        Py_RETURN_NONE;
    }

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

        if (state->type_MicrosoftAccountMultiFactorSessionAuthenticationStatus)
        {
            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_MicrosoftAccountMultiFactorSessionAuthenticationStatus = type;
        Py_INCREF(state->type_MicrosoftAccountMultiFactorSessionAuthenticationStatus);


        Py_RETURN_NONE;
    }

    // ----- MicrosoftAccountMultiFactorAuthenticationManager class --------------------
    static constexpr const char* const type_name_MicrosoftAccountMultiFactorAuthenticationManager = "MicrosoftAccountMultiFactorAuthenticationManager";

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

    static void _dealloc_MicrosoftAccountMultiFactorAuthenticationManager(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager* 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* MicrosoftAccountMultiFactorAuthenticationManager_AddDeviceAsync(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"AddDeviceAsync", 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::hstring>(args, 2);

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

    static PyObject* MicrosoftAccountMultiFactorAuthenticationManager_ApproveSessionAsync(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionAuthenticationStatus>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo>(args, 1);

                return py::convert(self->obj.ApproveSessionAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"ApproveSessionAsync", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionAuthenticationStatus>(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::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType>(args, 3);

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

    static PyObject* MicrosoftAccountMultiFactorAuthenticationManager_DenySessionAsync(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

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

                return py::convert(self->obj.DenySessionAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"DenySessionAsync", 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::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType>(args, 2);

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

    static PyObject* MicrosoftAccountMultiFactorAuthenticationManager_GetOneTimePassCodeAsync(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"GetOneTimePassCodeAsync", 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<uint32_t>(args, 1);

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

    static PyObject* MicrosoftAccountMultiFactorAuthenticationManager_GetSessionsAndUnregisteredAccountsAsync(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

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

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

    static PyObject* MicrosoftAccountMultiFactorAuthenticationManager_GetSessionsAsync(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

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

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

    static PyObject* MicrosoftAccountMultiFactorAuthenticationManager_RemoveDeviceAsync(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

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

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

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

    static PyObject* MicrosoftAccountMultiFactorAuthenticationManager_UpdateWnsChannelAsync(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"UpdateWnsChannelAsync", 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(self->obj.UpdateWnsChannelAsync(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* MicrosoftAccountMultiFactorAuthenticationManager_get_Current(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"Current"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager::Current());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

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

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

    static PyMethodDef _methods_MicrosoftAccountMultiFactorAuthenticationManager[] = {
        { "add_device_async", reinterpret_cast<PyCFunction>(MicrosoftAccountMultiFactorAuthenticationManager_AddDeviceAsync), METH_VARARGS, nullptr },
        { "approve_session_async", reinterpret_cast<PyCFunction>(MicrosoftAccountMultiFactorAuthenticationManager_ApproveSessionAsync), METH_VARARGS, nullptr },
        { "deny_session_async", reinterpret_cast<PyCFunction>(MicrosoftAccountMultiFactorAuthenticationManager_DenySessionAsync), METH_VARARGS, nullptr },
        { "get_one_time_pass_code_async", reinterpret_cast<PyCFunction>(MicrosoftAccountMultiFactorAuthenticationManager_GetOneTimePassCodeAsync), METH_VARARGS, nullptr },
        { "get_sessions_and_unregistered_accounts_async", reinterpret_cast<PyCFunction>(MicrosoftAccountMultiFactorAuthenticationManager_GetSessionsAndUnregisteredAccountsAsync), METH_VARARGS, nullptr },
        { "get_sessions_async", reinterpret_cast<PyCFunction>(MicrosoftAccountMultiFactorAuthenticationManager_GetSessionsAsync), METH_VARARGS, nullptr },
        { "remove_device_async", reinterpret_cast<PyCFunction>(MicrosoftAccountMultiFactorAuthenticationManager_RemoveDeviceAsync), METH_VARARGS, nullptr },
        { "update_wns_channel_async", reinterpret_cast<PyCFunction>(MicrosoftAccountMultiFactorAuthenticationManager_UpdateWnsChannelAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_MicrosoftAccountMultiFactorAuthenticationManager, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_MicrosoftAccountMultiFactorAuthenticationManager), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_MicrosoftAccountMultiFactorAuthenticationManager[] = {
        { }
    };

    static PyType_Slot _type_slots_MicrosoftAccountMultiFactorAuthenticationManager[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorAuthenticationManager) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorAuthenticationManager) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorAuthenticationManager) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorAuthenticationManager) },
        { },
    };

    static PyType_Spec type_spec_MicrosoftAccountMultiFactorAuthenticationManager =
    {
        "_winsdk_Windows_Security_Authentication_Identity_Core.MicrosoftAccountMultiFactorAuthenticationManager",
        sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_MicrosoftAccountMultiFactorAuthenticationManager
    };

    static PyGetSetDef getset_MicrosoftAccountMultiFactorAuthenticationManager_Meta[] = {
        { "current", reinterpret_cast<getter>(MicrosoftAccountMultiFactorAuthenticationManager_get_Current), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot type_slots_MicrosoftAccountMultiFactorAuthenticationManager_Meta[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_MicrosoftAccountMultiFactorAuthenticationManager_Meta) },
        { }
    };

    static PyType_Spec type_spec_MicrosoftAccountMultiFactorAuthenticationManager_Meta =
    {
        "_winsdk_Windows_Security_Authentication_Identity_Core.MicrosoftAccountMultiFactorAuthenticationManager_Meta",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_MicrosoftAccountMultiFactorAuthenticationManager_Meta
    };

    // ----- MicrosoftAccountMultiFactorGetSessionsResult class --------------------
    static constexpr const char* const type_name_MicrosoftAccountMultiFactorGetSessionsResult = "MicrosoftAccountMultiFactorGetSessionsResult";

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

    static void _dealloc_MicrosoftAccountMultiFactorGetSessionsResult(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorGetSessionsResult* 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* MicrosoftAccountMultiFactorGetSessionsResult_get_ServiceResponse(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorGetSessionsResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorGetSessionsResult", L"ServiceResponse"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

    static PyMethodDef _methods_MicrosoftAccountMultiFactorGetSessionsResult[] = {
        { "_assign_array_", _assign_array_MicrosoftAccountMultiFactorGetSessionsResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_MicrosoftAccountMultiFactorGetSessionsResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_MicrosoftAccountMultiFactorGetSessionsResult[] = {
        { "service_response", reinterpret_cast<getter>(MicrosoftAccountMultiFactorGetSessionsResult_get_ServiceResponse), nullptr, nullptr, nullptr },
        { "sessions", reinterpret_cast<getter>(MicrosoftAccountMultiFactorGetSessionsResult_get_Sessions), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_MicrosoftAccountMultiFactorGetSessionsResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorGetSessionsResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorGetSessionsResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorGetSessionsResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorGetSessionsResult) },
        { },
    };

    static PyType_Spec type_spec_MicrosoftAccountMultiFactorGetSessionsResult =
    {
        "_winsdk_Windows_Security_Authentication_Identity_Core.MicrosoftAccountMultiFactorGetSessionsResult",
        sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorGetSessionsResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_MicrosoftAccountMultiFactorGetSessionsResult
    };

    // ----- MicrosoftAccountMultiFactorOneTimeCodedInfo class --------------------
    static constexpr const char* const type_name_MicrosoftAccountMultiFactorOneTimeCodedInfo = "MicrosoftAccountMultiFactorOneTimeCodedInfo";

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

    static void _dealloc_MicrosoftAccountMultiFactorOneTimeCodedInfo(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorOneTimeCodedInfo* 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* MicrosoftAccountMultiFactorOneTimeCodedInfo_get_Code(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorOneTimeCodedInfo* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorOneTimeCodedInfo", L"Code"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

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

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

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

    static PyMethodDef _methods_MicrosoftAccountMultiFactorOneTimeCodedInfo[] = {
        { "_assign_array_", _assign_array_MicrosoftAccountMultiFactorOneTimeCodedInfo, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_MicrosoftAccountMultiFactorOneTimeCodedInfo), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_MicrosoftAccountMultiFactorOneTimeCodedInfo[] = {
        { "code", reinterpret_cast<getter>(MicrosoftAccountMultiFactorOneTimeCodedInfo_get_Code), nullptr, nullptr, nullptr },
        { "service_response", reinterpret_cast<getter>(MicrosoftAccountMultiFactorOneTimeCodedInfo_get_ServiceResponse), nullptr, nullptr, nullptr },
        { "time_interval", reinterpret_cast<getter>(MicrosoftAccountMultiFactorOneTimeCodedInfo_get_TimeInterval), nullptr, nullptr, nullptr },
        { "time_to_live", reinterpret_cast<getter>(MicrosoftAccountMultiFactorOneTimeCodedInfo_get_TimeToLive), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_MicrosoftAccountMultiFactorOneTimeCodedInfo[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorOneTimeCodedInfo) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorOneTimeCodedInfo) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorOneTimeCodedInfo) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorOneTimeCodedInfo) },
        { },
    };

    static PyType_Spec type_spec_MicrosoftAccountMultiFactorOneTimeCodedInfo =
    {
        "_winsdk_Windows_Security_Authentication_Identity_Core.MicrosoftAccountMultiFactorOneTimeCodedInfo",
        sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorOneTimeCodedInfo),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_MicrosoftAccountMultiFactorOneTimeCodedInfo
    };

    // ----- MicrosoftAccountMultiFactorSessionInfo class --------------------
    static constexpr const char* const type_name_MicrosoftAccountMultiFactorSessionInfo = "MicrosoftAccountMultiFactorSessionInfo";

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

    static void _dealloc_MicrosoftAccountMultiFactorSessionInfo(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo* 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* MicrosoftAccountMultiFactorSessionInfo_get_ApprovalStatus(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"ApprovalStatus"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    static PyMethodDef _methods_MicrosoftAccountMultiFactorSessionInfo[] = {
        { "_assign_array_", _assign_array_MicrosoftAccountMultiFactorSessionInfo, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_MicrosoftAccountMultiFactorSessionInfo), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_MicrosoftAccountMultiFactorSessionInfo[] = {
        { "approval_status", reinterpret_cast<getter>(MicrosoftAccountMultiFactorSessionInfo_get_ApprovalStatus), nullptr, nullptr, nullptr },
        { "authentication_type", reinterpret_cast<getter>(MicrosoftAccountMultiFactorSessionInfo_get_AuthenticationType), nullptr, nullptr, nullptr },
        { "display_session_id", reinterpret_cast<getter>(MicrosoftAccountMultiFactorSessionInfo_get_DisplaySessionId), nullptr, nullptr, nullptr },
        { "expiration_time", reinterpret_cast<getter>(MicrosoftAccountMultiFactorSessionInfo_get_ExpirationTime), nullptr, nullptr, nullptr },
        { "request_time", reinterpret_cast<getter>(MicrosoftAccountMultiFactorSessionInfo_get_RequestTime), nullptr, nullptr, nullptr },
        { "session_id", reinterpret_cast<getter>(MicrosoftAccountMultiFactorSessionInfo_get_SessionId), nullptr, nullptr, nullptr },
        { "user_account_id", reinterpret_cast<getter>(MicrosoftAccountMultiFactorSessionInfo_get_UserAccountId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_MicrosoftAccountMultiFactorSessionInfo[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorSessionInfo) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorSessionInfo) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorSessionInfo) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorSessionInfo) },
        { },
    };

    static PyType_Spec type_spec_MicrosoftAccountMultiFactorSessionInfo =
    {
        "_winsdk_Windows_Security_Authentication_Identity_Core.MicrosoftAccountMultiFactorSessionInfo",
        sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_MicrosoftAccountMultiFactorSessionInfo
    };

    // ----- MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo class --------------------
    static constexpr const char* const type_name_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo = "MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo";

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

    static void _dealloc_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo* 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* MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo_get_ServiceResponse(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo", L"ServiceResponse"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

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

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

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

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

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

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

    static PyMethodDef _methods_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo[] = {
        { "_assign_array_", _assign_array_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo[] = {
        { "service_response", reinterpret_cast<getter>(MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo_get_ServiceResponse), nullptr, nullptr, nullptr },
        { "sessions", reinterpret_cast<getter>(MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo_get_Sessions), nullptr, nullptr, nullptr },
        { "unregistered_accounts", reinterpret_cast<getter>(MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo_get_UnregisteredAccounts), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo) },
        { },
    };

    static PyType_Spec type_spec_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo =
    {
        "_winsdk_Windows_Security_Authentication_Identity_Core.MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo",
        sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo
    };

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

    static PyMethodDef module_methods[] = {
        {"_register_MicrosoftAccountMultiFactorAuthenticationType", register_MicrosoftAccountMultiFactorAuthenticationType, METH_O, "registers type"},
        {"_register_MicrosoftAccountMultiFactorServiceResponse", register_MicrosoftAccountMultiFactorServiceResponse, METH_O, "registers type"},
        {"_register_MicrosoftAccountMultiFactorSessionApprovalStatus", register_MicrosoftAccountMultiFactorSessionApprovalStatus, METH_O, "registers type"},
        {"_register_MicrosoftAccountMultiFactorSessionAuthenticationStatus", register_MicrosoftAccountMultiFactorSessionAuthenticationStatus, 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_MicrosoftAccountMultiFactorAuthenticationType);
        Py_VISIT(state->type_MicrosoftAccountMultiFactorServiceResponse);
        Py_VISIT(state->type_MicrosoftAccountMultiFactorSessionApprovalStatus);
        Py_VISIT(state->type_MicrosoftAccountMultiFactorSessionAuthenticationStatus);
        Py_VISIT(state->type_MicrosoftAccountMultiFactorAuthenticationManager);
        Py_VISIT(state->type_MicrosoftAccountMultiFactorGetSessionsResult);
        Py_VISIT(state->type_MicrosoftAccountMultiFactorOneTimeCodedInfo);
        Py_VISIT(state->type_MicrosoftAccountMultiFactorSessionInfo);
        Py_VISIT(state->type_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo);

        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_MicrosoftAccountMultiFactorAuthenticationType);
        Py_CLEAR(state->type_MicrosoftAccountMultiFactorServiceResponse);
        Py_CLEAR(state->type_MicrosoftAccountMultiFactorSessionApprovalStatus);
        Py_CLEAR(state->type_MicrosoftAccountMultiFactorSessionAuthenticationStatus);
        Py_CLEAR(state->type_MicrosoftAccountMultiFactorAuthenticationManager);
        Py_CLEAR(state->type_MicrosoftAccountMultiFactorGetSessionsResult);
        Py_CLEAR(state->type_MicrosoftAccountMultiFactorOneTimeCodedInfo);
        Py_CLEAR(state->type_MicrosoftAccountMultiFactorSessionInfo);
        Py_CLEAR(state->type_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo);

        return 0;
    }


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

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

PyMODINIT_FUNC PyInit__winsdk_Windows_Security_Authentication_Identity_Core(void) noexcept
{
    using namespace py::cpp::Windows::Security::Authentication::Identity::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);

    py::pyobj_handle type_MicrosoftAccountMultiFactorAuthenticationManager_Meta{PyType_FromSpec(&type_spec_MicrosoftAccountMultiFactorAuthenticationManager_Meta)};
    if (!type_MicrosoftAccountMultiFactorAuthenticationManager_Meta)
    {
        return nullptr;
    }

    state->type_MicrosoftAccountMultiFactorAuthenticationManager = py::register_python_type(module.get(), type_name_MicrosoftAccountMultiFactorAuthenticationManager, &type_spec_MicrosoftAccountMultiFactorAuthenticationManager, bases.get(), reinterpret_cast<PyTypeObject*>(type_MicrosoftAccountMultiFactorAuthenticationManager_Meta.get()));
    if (!state->type_MicrosoftAccountMultiFactorAuthenticationManager)
    {
        return nullptr;
    }

    state->type_MicrosoftAccountMultiFactorGetSessionsResult = py::register_python_type(module.get(), type_name_MicrosoftAccountMultiFactorGetSessionsResult, &type_spec_MicrosoftAccountMultiFactorGetSessionsResult, bases.get(), nullptr);
    if (!state->type_MicrosoftAccountMultiFactorGetSessionsResult)
    {
        return nullptr;
    }

    state->type_MicrosoftAccountMultiFactorOneTimeCodedInfo = py::register_python_type(module.get(), type_name_MicrosoftAccountMultiFactorOneTimeCodedInfo, &type_spec_MicrosoftAccountMultiFactorOneTimeCodedInfo, bases.get(), nullptr);
    if (!state->type_MicrosoftAccountMultiFactorOneTimeCodedInfo)
    {
        return nullptr;
    }

    state->type_MicrosoftAccountMultiFactorSessionInfo = py::register_python_type(module.get(), type_name_MicrosoftAccountMultiFactorSessionInfo, &type_spec_MicrosoftAccountMultiFactorSessionInfo, bases.get(), nullptr);
    if (!state->type_MicrosoftAccountMultiFactorSessionInfo)
    {
        return nullptr;
    }

    state->type_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo = py::register_python_type(module.get(), type_name_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo, &type_spec_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo, bases.get(), nullptr);
    if (!state->type_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo)
    {
        return nullptr;
    }


    return module.detach();
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MicrosoftAccountMultiFactorAuthenticationType;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MicrosoftAccountMultiFactorServiceResponse;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MicrosoftAccountMultiFactorSessionApprovalStatus;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MicrosoftAccountMultiFactorSessionAuthenticationStatus;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MicrosoftAccountMultiFactorAuthenticationManager;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MicrosoftAccountMultiFactorGetSessionsResult;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MicrosoftAccountMultiFactorOneTimeCodedInfo;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MicrosoftAccountMultiFactorSessionInfo;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo;

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

    return python_type;
}
