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


namespace py::cpp::Windows::Security::Authentication::OnlineId
{
    struct module_state
    {
        PyObject* type_CredentialPromptType;
        PyObject* type_OnlineIdSystemTicketStatus;
        PyTypeObject* type_OnlineIdAuthenticator;
        PyTypeObject* type_OnlineIdServiceTicket;
        PyTypeObject* type_OnlineIdServiceTicketRequest;
        PyTypeObject* type_OnlineIdSystemAuthenticator;
        PyTypeObject* type_OnlineIdSystemAuthenticatorForUser;
        PyTypeObject* type_OnlineIdSystemIdentity;
        PyTypeObject* type_OnlineIdSystemTicketResult;
        PyTypeObject* type_SignOutUserOperation;
        PyTypeObject* type_UserAuthenticationOperation;
        PyTypeObject* type_UserIdentity;
    };

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

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


        Py_RETURN_NONE;
    }

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

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


        Py_RETURN_NONE;
    }

    // ----- OnlineIdAuthenticator class --------------------
    static constexpr const char* const type_name_OnlineIdAuthenticator = "OnlineIdAuthenticator";

    static PyObject* _new_OnlineIdAuthenticator(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 == 0)
        {
            try
            {
                winrt::Windows::Security::Authentication::OnlineId::OnlineIdAuthenticator 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_OnlineIdAuthenticator(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdAuthenticator* 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* OnlineIdAuthenticator_AuthenticateUserAsync(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdAuthenticator* 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.OnlineId.OnlineIdAuthenticator", L"AuthenticateUserAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(self->obj.AuthenticateUserAsync(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.OnlineId.OnlineIdAuthenticator", L"AuthenticateUserAsync", 2))
            {
                py::set_arg_count_version_error(2);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest>>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Security::Authentication::OnlineId::CredentialPromptType>(args, 1);

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

    static PyObject* OnlineIdAuthenticator_SignOutUserAsync(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdAuthenticator* 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.OnlineId.OnlineIdAuthenticator", L"SignOutUserAsync", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

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

    static int OnlineIdAuthenticator_put_ApplicationId(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdAuthenticator* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.OnlineId.OnlineIdAuthenticator", L"ApplicationId"))
        {
            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::guid>(arg);

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

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

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

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

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

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

    static PyObject* _from_OnlineIdAuthenticator(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::OnlineId::OnlineIdAuthenticator>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_OnlineIdAuthenticator[] = {
        { "authenticate_user_async", reinterpret_cast<PyCFunction>(OnlineIdAuthenticator_AuthenticateUserAsync), METH_VARARGS, nullptr },
        { "sign_out_user_async", reinterpret_cast<PyCFunction>(OnlineIdAuthenticator_SignOutUserAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_OnlineIdAuthenticator, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_OnlineIdAuthenticator), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_OnlineIdAuthenticator[] = {
        { "application_id", reinterpret_cast<getter>(OnlineIdAuthenticator_get_ApplicationId), reinterpret_cast<setter>(OnlineIdAuthenticator_put_ApplicationId), nullptr, nullptr },
        { "authenticated_safe_customer_id", reinterpret_cast<getter>(OnlineIdAuthenticator_get_AuthenticatedSafeCustomerId), nullptr, nullptr, nullptr },
        { "can_sign_out", reinterpret_cast<getter>(OnlineIdAuthenticator_get_CanSignOut), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_OnlineIdAuthenticator[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_OnlineIdAuthenticator) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_OnlineIdAuthenticator) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_OnlineIdAuthenticator) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_OnlineIdAuthenticator) },
        { },
    };

    static PyType_Spec type_spec_OnlineIdAuthenticator =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.OnlineIdAuthenticator",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdAuthenticator),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdAuthenticator
    };

    // ----- OnlineIdServiceTicket class --------------------
    static constexpr const char* const type_name_OnlineIdServiceTicket = "OnlineIdServiceTicket";

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

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

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

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

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

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

    static PyObject* _from_OnlineIdServiceTicket(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::OnlineId::OnlineIdServiceTicket>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_OnlineIdServiceTicket[] = {
        { "_assign_array_", _assign_array_OnlineIdServiceTicket, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_OnlineIdServiceTicket), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_OnlineIdServiceTicket[] = {
        { "error_code", reinterpret_cast<getter>(OnlineIdServiceTicket_get_ErrorCode), nullptr, nullptr, nullptr },
        { "request", reinterpret_cast<getter>(OnlineIdServiceTicket_get_Request), nullptr, nullptr, nullptr },
        { "value", reinterpret_cast<getter>(OnlineIdServiceTicket_get_Value), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_OnlineIdServiceTicket[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_OnlineIdServiceTicket) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_OnlineIdServiceTicket) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_OnlineIdServiceTicket) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_OnlineIdServiceTicket) },
        { },
    };

    static PyType_Spec type_spec_OnlineIdServiceTicket =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.OnlineIdServiceTicket",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicket),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdServiceTicket
    };

    // ----- OnlineIdServiceTicketRequest class --------------------
    static constexpr const char* const type_name_OnlineIdServiceTicketRequest = "OnlineIdServiceTicketRequest";

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

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

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

                winrt::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest instance{ param0 };
                return py::wrap(instance, type);
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

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

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

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

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

    static PyObject* _from_OnlineIdServiceTicketRequest(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::OnlineId::OnlineIdServiceTicketRequest>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_OnlineIdServiceTicketRequest[] = {
        { "_assign_array_", _assign_array_OnlineIdServiceTicketRequest, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_OnlineIdServiceTicketRequest), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_OnlineIdServiceTicketRequest[] = {
        { "policy", reinterpret_cast<getter>(OnlineIdServiceTicketRequest_get_Policy), nullptr, nullptr, nullptr },
        { "service", reinterpret_cast<getter>(OnlineIdServiceTicketRequest_get_Service), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_OnlineIdServiceTicketRequest[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_OnlineIdServiceTicketRequest) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_OnlineIdServiceTicketRequest) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_OnlineIdServiceTicketRequest) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_OnlineIdServiceTicketRequest) },
        { },
    };

    static PyType_Spec type_spec_OnlineIdServiceTicketRequest =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.OnlineIdServiceTicketRequest",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdServiceTicketRequest
    };

    // ----- OnlineIdSystemAuthenticator class --------------------
    static constexpr const char* const type_name_OnlineIdSystemAuthenticator = "OnlineIdSystemAuthenticator";

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

    static PyObject* OnlineIdSystemAuthenticator_GetForUser(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.OnlineId.OnlineIdSystemAuthenticator", L"GetForUser", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

                return py::convert(winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticator::GetForUser(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

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

        try
        {
            return py::convert(winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticator::Default());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_OnlineIdSystemAuthenticator[] = {
        { "get_for_user", reinterpret_cast<PyCFunction>(OnlineIdSystemAuthenticator_GetForUser), METH_VARARGS | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_OnlineIdSystemAuthenticator[] = {
        { }
    };

    static PyType_Slot _type_slots_OnlineIdSystemAuthenticator[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_OnlineIdSystemAuthenticator) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_OnlineIdSystemAuthenticator) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_OnlineIdSystemAuthenticator) },
        { },
    };

    static PyType_Spec type_spec_OnlineIdSystemAuthenticator =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.OnlineIdSystemAuthenticator",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdSystemAuthenticator
    };

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

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

    static PyType_Spec type_spec_OnlineIdSystemAuthenticator_Meta =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.OnlineIdSystemAuthenticator_Meta",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_OnlineIdSystemAuthenticator_Meta
    };

    // ----- OnlineIdSystemAuthenticatorForUser class --------------------
    static constexpr const char* const type_name_OnlineIdSystemAuthenticatorForUser = "OnlineIdSystemAuthenticatorForUser";

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

    static void _dealloc_OnlineIdSystemAuthenticatorForUser(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticatorForUser* 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* OnlineIdSystemAuthenticatorForUser_GetTicketAsync(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticatorForUser* 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.OnlineId.OnlineIdSystemAuthenticatorForUser", L"GetTicketAsync", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

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

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

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

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

    static int OnlineIdSystemAuthenticatorForUser_put_ApplicationId(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticatorForUser* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticatorForUser", L"ApplicationId"))
        {
            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::guid>(arg);

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

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

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

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

    static PyObject* _from_OnlineIdSystemAuthenticatorForUser(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::OnlineId::OnlineIdSystemAuthenticatorForUser>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_OnlineIdSystemAuthenticatorForUser[] = {
        { "get_ticket_async", reinterpret_cast<PyCFunction>(OnlineIdSystemAuthenticatorForUser_GetTicketAsync), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_OnlineIdSystemAuthenticatorForUser, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_OnlineIdSystemAuthenticatorForUser), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_OnlineIdSystemAuthenticatorForUser[] = {
        { "application_id", reinterpret_cast<getter>(OnlineIdSystemAuthenticatorForUser_get_ApplicationId), reinterpret_cast<setter>(OnlineIdSystemAuthenticatorForUser_put_ApplicationId), nullptr, nullptr },
        { "user", reinterpret_cast<getter>(OnlineIdSystemAuthenticatorForUser_get_User), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_OnlineIdSystemAuthenticatorForUser[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_OnlineIdSystemAuthenticatorForUser) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_OnlineIdSystemAuthenticatorForUser) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_OnlineIdSystemAuthenticatorForUser) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_OnlineIdSystemAuthenticatorForUser) },
        { },
    };

    static PyType_Spec type_spec_OnlineIdSystemAuthenticatorForUser =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.OnlineIdSystemAuthenticatorForUser",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticatorForUser),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdSystemAuthenticatorForUser
    };

    // ----- OnlineIdSystemIdentity class --------------------
    static constexpr const char* const type_name_OnlineIdSystemIdentity = "OnlineIdSystemIdentity";

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

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

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

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

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

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

    static PyObject* _from_OnlineIdSystemIdentity(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::OnlineId::OnlineIdSystemIdentity>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_OnlineIdSystemIdentity[] = {
        { "_assign_array_", _assign_array_OnlineIdSystemIdentity, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_OnlineIdSystemIdentity), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_OnlineIdSystemIdentity[] = {
        { "id", reinterpret_cast<getter>(OnlineIdSystemIdentity_get_Id), nullptr, nullptr, nullptr },
        { "ticket", reinterpret_cast<getter>(OnlineIdSystemIdentity_get_Ticket), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_OnlineIdSystemIdentity[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_OnlineIdSystemIdentity) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_OnlineIdSystemIdentity) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_OnlineIdSystemIdentity) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_OnlineIdSystemIdentity) },
        { },
    };

    static PyType_Spec type_spec_OnlineIdSystemIdentity =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.OnlineIdSystemIdentity",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemIdentity),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdSystemIdentity
    };

    // ----- OnlineIdSystemTicketResult class --------------------
    static constexpr const char* const type_name_OnlineIdSystemTicketResult = "OnlineIdSystemTicketResult";

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

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

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

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

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

    static PyObject* OnlineIdSystemTicketResult_get_Status(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemTicketResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult", 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_OnlineIdSystemTicketResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemTicketResult>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_OnlineIdSystemTicketResult(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::OnlineId::OnlineIdSystemTicketResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_OnlineIdSystemTicketResult[] = {
        { "_assign_array_", _assign_array_OnlineIdSystemTicketResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_OnlineIdSystemTicketResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_OnlineIdSystemTicketResult[] = {
        { "extended_error", reinterpret_cast<getter>(OnlineIdSystemTicketResult_get_ExtendedError), nullptr, nullptr, nullptr },
        { "identity", reinterpret_cast<getter>(OnlineIdSystemTicketResult_get_Identity), nullptr, nullptr, nullptr },
        { "status", reinterpret_cast<getter>(OnlineIdSystemTicketResult_get_Status), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_OnlineIdSystemTicketResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_OnlineIdSystemTicketResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_OnlineIdSystemTicketResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_OnlineIdSystemTicketResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_OnlineIdSystemTicketResult) },
        { },
    };

    static PyType_Spec type_spec_OnlineIdSystemTicketResult =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.OnlineIdSystemTicketResult",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemTicketResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdSystemTicketResult
    };

    // ----- SignOutUserOperation class --------------------
    static constexpr const char* const type_name_SignOutUserOperation = "SignOutUserOperation";

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

    static void _dealloc_SignOutUserOperation(py::wrapper::Windows::Security::Authentication::OnlineId::SignOutUserOperation* 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* SignOutUserOperation_Cancel(py::wrapper::Windows::Security::Authentication::OnlineId::SignOutUserOperation* 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.OnlineId.SignOutUserOperation", L"Cancel", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* SignOutUserOperation_Close(py::wrapper::Windows::Security::Authentication::OnlineId::SignOutUserOperation* 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.OnlineId.SignOutUserOperation", L"Close", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* SignOutUserOperation_GetResults(py::wrapper::Windows::Security::Authentication::OnlineId::SignOutUserOperation* 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.OnlineId.SignOutUserOperation", L"GetResults", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

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

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

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

    static int SignOutUserOperation_put_Completed(py::wrapper::Windows::Security::Authentication::OnlineId::SignOutUserOperation* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.OnlineId.SignOutUserOperation", L"Completed"))
        {
            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::Windows::Foundation::AsyncActionCompletedHandler>(arg);

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

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

    static PyObject* _from_SignOutUserOperation(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::OnlineId::SignOutUserOperation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _await_SignOutUserOperation(py::wrapper::Windows::Security::Authentication::OnlineId::SignOutUserOperation* self) noexcept
    {
        return py::dunder_await(self->obj);
    }

    static PyMethodDef _methods_SignOutUserOperation[] = {
        { "cancel", reinterpret_cast<PyCFunction>(SignOutUserOperation_Cancel), METH_VARARGS, nullptr },
        { "close", reinterpret_cast<PyCFunction>(SignOutUserOperation_Close), METH_VARARGS, nullptr },
        { "get_results", reinterpret_cast<PyCFunction>(SignOutUserOperation_GetResults), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_SignOutUserOperation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_SignOutUserOperation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_SignOutUserOperation[] = {
        { "error_code", reinterpret_cast<getter>(SignOutUserOperation_get_ErrorCode), nullptr, nullptr, nullptr },
        { "id", reinterpret_cast<getter>(SignOutUserOperation_get_Id), nullptr, nullptr, nullptr },
        { "status", reinterpret_cast<getter>(SignOutUserOperation_get_Status), nullptr, nullptr, nullptr },
        { "completed", reinterpret_cast<getter>(SignOutUserOperation_get_Completed), reinterpret_cast<setter>(SignOutUserOperation_put_Completed), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_SignOutUserOperation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_SignOutUserOperation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SignOutUserOperation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_SignOutUserOperation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_SignOutUserOperation) },
        { Py_am_await, reinterpret_cast<void*>(_await_SignOutUserOperation) },
        { },
    };

    static PyType_Spec type_spec_SignOutUserOperation =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.SignOutUserOperation",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::SignOutUserOperation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SignOutUserOperation
    };

    // ----- UserAuthenticationOperation class --------------------
    static constexpr const char* const type_name_UserAuthenticationOperation = "UserAuthenticationOperation";

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

    static void _dealloc_UserAuthenticationOperation(py::wrapper::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation* 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* UserAuthenticationOperation_Cancel(py::wrapper::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation* 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.OnlineId.UserAuthenticationOperation", L"Cancel", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* UserAuthenticationOperation_Close(py::wrapper::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation* 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.OnlineId.UserAuthenticationOperation", L"Close", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

    static PyObject* UserAuthenticationOperation_GetResults(py::wrapper::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation* 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.OnlineId.UserAuthenticationOperation", L"GetResults", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

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

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

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

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

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

    static int UserAuthenticationOperation_put_Completed(py::wrapper::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation* self, PyObject* arg, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.OnlineId.UserAuthenticationOperation", L"Completed"))
        {
            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::Windows::Foundation::AsyncOperationCompletedHandler<winrt::Windows::Security::Authentication::OnlineId::UserIdentity>>(arg);

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

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

    static PyObject* _from_UserAuthenticationOperation(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::OnlineId::UserAuthenticationOperation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _await_UserAuthenticationOperation(py::wrapper::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation* self) noexcept
    {
        return py::dunder_await(self->obj);
    }

    static PyMethodDef _methods_UserAuthenticationOperation[] = {
        { "cancel", reinterpret_cast<PyCFunction>(UserAuthenticationOperation_Cancel), METH_VARARGS, nullptr },
        { "close", reinterpret_cast<PyCFunction>(UserAuthenticationOperation_Close), METH_VARARGS, nullptr },
        { "get_results", reinterpret_cast<PyCFunction>(UserAuthenticationOperation_GetResults), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_UserAuthenticationOperation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_UserAuthenticationOperation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_UserAuthenticationOperation[] = {
        { "error_code", reinterpret_cast<getter>(UserAuthenticationOperation_get_ErrorCode), nullptr, nullptr, nullptr },
        { "id", reinterpret_cast<getter>(UserAuthenticationOperation_get_Id), nullptr, nullptr, nullptr },
        { "status", reinterpret_cast<getter>(UserAuthenticationOperation_get_Status), nullptr, nullptr, nullptr },
        { "completed", reinterpret_cast<getter>(UserAuthenticationOperation_get_Completed), reinterpret_cast<setter>(UserAuthenticationOperation_put_Completed), nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_UserAuthenticationOperation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_UserAuthenticationOperation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserAuthenticationOperation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_UserAuthenticationOperation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_UserAuthenticationOperation) },
        { Py_am_await, reinterpret_cast<void*>(_await_UserAuthenticationOperation) },
        { },
    };

    static PyType_Spec type_spec_UserAuthenticationOperation =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.UserAuthenticationOperation",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_UserAuthenticationOperation
    };

    // ----- UserIdentity class --------------------
    static constexpr const char* const type_name_UserIdentity = "UserIdentity";

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    static PyObject* _from_UserIdentity(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::OnlineId::UserIdentity>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_UserIdentity[] = {
        { "_assign_array_", _assign_array_UserIdentity, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_UserIdentity), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_UserIdentity[] = {
        { "first_name", reinterpret_cast<getter>(UserIdentity_get_FirstName), nullptr, nullptr, nullptr },
        { "id", reinterpret_cast<getter>(UserIdentity_get_Id), nullptr, nullptr, nullptr },
        { "is_beta_account", reinterpret_cast<getter>(UserIdentity_get_IsBetaAccount), nullptr, nullptr, nullptr },
        { "is_confirmed_p_c", reinterpret_cast<getter>(UserIdentity_get_IsConfirmedPC), nullptr, nullptr, nullptr },
        { "last_name", reinterpret_cast<getter>(UserIdentity_get_LastName), nullptr, nullptr, nullptr },
        { "safe_customer_id", reinterpret_cast<getter>(UserIdentity_get_SafeCustomerId), nullptr, nullptr, nullptr },
        { "sign_in_name", reinterpret_cast<getter>(UserIdentity_get_SignInName), nullptr, nullptr, nullptr },
        { "tickets", reinterpret_cast<getter>(UserIdentity_get_Tickets), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_UserIdentity[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_UserIdentity) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserIdentity) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_UserIdentity) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_UserIdentity) },
        { },
    };

    static PyType_Spec type_spec_UserIdentity =
    {
        "_winsdk_Windows_Security_Authentication_OnlineId.UserIdentity",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::UserIdentity),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_UserIdentity
    };

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

    static PyMethodDef module_methods[] = {
        {"_register_CredentialPromptType", register_CredentialPromptType, METH_O, "registers type"},
        {"_register_OnlineIdSystemTicketStatus", register_OnlineIdSystemTicketStatus, 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_CredentialPromptType);
        Py_VISIT(state->type_OnlineIdSystemTicketStatus);
        Py_VISIT(state->type_OnlineIdAuthenticator);
        Py_VISIT(state->type_OnlineIdServiceTicket);
        Py_VISIT(state->type_OnlineIdServiceTicketRequest);
        Py_VISIT(state->type_OnlineIdSystemAuthenticator);
        Py_VISIT(state->type_OnlineIdSystemAuthenticatorForUser);
        Py_VISIT(state->type_OnlineIdSystemIdentity);
        Py_VISIT(state->type_OnlineIdSystemTicketResult);
        Py_VISIT(state->type_SignOutUserOperation);
        Py_VISIT(state->type_UserAuthenticationOperation);
        Py_VISIT(state->type_UserIdentity);

        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_CredentialPromptType);
        Py_CLEAR(state->type_OnlineIdSystemTicketStatus);
        Py_CLEAR(state->type_OnlineIdAuthenticator);
        Py_CLEAR(state->type_OnlineIdServiceTicket);
        Py_CLEAR(state->type_OnlineIdServiceTicketRequest);
        Py_CLEAR(state->type_OnlineIdSystemAuthenticator);
        Py_CLEAR(state->type_OnlineIdSystemAuthenticatorForUser);
        Py_CLEAR(state->type_OnlineIdSystemIdentity);
        Py_CLEAR(state->type_OnlineIdSystemTicketResult);
        Py_CLEAR(state->type_SignOutUserOperation);
        Py_CLEAR(state->type_UserAuthenticationOperation);
        Py_CLEAR(state->type_UserIdentity);

        return 0;
    }


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

} // py::cpp::Windows::Security::Authentication::OnlineId

PyMODINIT_FUNC PyInit__winsdk_Windows_Security_Authentication_OnlineId(void) noexcept
{
    using namespace py::cpp::Windows::Security::Authentication::OnlineId;

    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_OnlineIdAuthenticator = py::register_python_type(module.get(), type_name_OnlineIdAuthenticator, &type_spec_OnlineIdAuthenticator, bases.get(), nullptr);
    if (!state->type_OnlineIdAuthenticator)
    {
        return nullptr;
    }

    state->type_OnlineIdServiceTicket = py::register_python_type(module.get(), type_name_OnlineIdServiceTicket, &type_spec_OnlineIdServiceTicket, bases.get(), nullptr);
    if (!state->type_OnlineIdServiceTicket)
    {
        return nullptr;
    }

    state->type_OnlineIdServiceTicketRequest = py::register_python_type(module.get(), type_name_OnlineIdServiceTicketRequest, &type_spec_OnlineIdServiceTicketRequest, bases.get(), nullptr);
    if (!state->type_OnlineIdServiceTicketRequest)
    {
        return nullptr;
    }

    py::pyobj_handle type_OnlineIdSystemAuthenticator_Meta{PyType_FromSpec(&type_spec_OnlineIdSystemAuthenticator_Meta)};
    if (!type_OnlineIdSystemAuthenticator_Meta)
    {
        return nullptr;
    }

    state->type_OnlineIdSystemAuthenticator = py::register_python_type(module.get(), type_name_OnlineIdSystemAuthenticator, &type_spec_OnlineIdSystemAuthenticator, nullptr, reinterpret_cast<PyTypeObject*>(type_OnlineIdSystemAuthenticator_Meta.get()));
    if (!state->type_OnlineIdSystemAuthenticator)
    {
        return nullptr;
    }

    state->type_OnlineIdSystemAuthenticatorForUser = py::register_python_type(module.get(), type_name_OnlineIdSystemAuthenticatorForUser, &type_spec_OnlineIdSystemAuthenticatorForUser, bases.get(), nullptr);
    if (!state->type_OnlineIdSystemAuthenticatorForUser)
    {
        return nullptr;
    }

    state->type_OnlineIdSystemIdentity = py::register_python_type(module.get(), type_name_OnlineIdSystemIdentity, &type_spec_OnlineIdSystemIdentity, bases.get(), nullptr);
    if (!state->type_OnlineIdSystemIdentity)
    {
        return nullptr;
    }

    state->type_OnlineIdSystemTicketResult = py::register_python_type(module.get(), type_name_OnlineIdSystemTicketResult, &type_spec_OnlineIdSystemTicketResult, bases.get(), nullptr);
    if (!state->type_OnlineIdSystemTicketResult)
    {
        return nullptr;
    }

    state->type_SignOutUserOperation = py::register_python_type(module.get(), type_name_SignOutUserOperation, &type_spec_SignOutUserOperation, bases.get(), nullptr);
    if (!state->type_SignOutUserOperation)
    {
        return nullptr;
    }

    state->type_UserAuthenticationOperation = py::register_python_type(module.get(), type_name_UserAuthenticationOperation, &type_spec_UserAuthenticationOperation, bases.get(), nullptr);
    if (!state->type_UserAuthenticationOperation)
    {
        return nullptr;
    }

    state->type_UserIdentity = py::register_python_type(module.get(), type_name_UserIdentity, &type_spec_UserIdentity, bases.get(), nullptr);
    if (!state->type_UserIdentity)
    {
        return nullptr;
    }


    return module.detach();
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_CredentialPromptType;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_OnlineIdSystemTicketStatus;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_OnlineIdAuthenticator;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_OnlineIdServiceTicket;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_OnlineIdServiceTicketRequest;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_OnlineIdSystemAuthenticator;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_OnlineIdSystemAuthenticatorForUser;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_OnlineIdSystemIdentity;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_OnlineIdSystemTicketResult;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_SignOutUserOperation;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_UserAuthenticationOperation;

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

    return python_type;
}

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

    PyObject* module = PyState_FindModule(&module_def);

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

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

    auto python_type = state->type_UserIdentity;

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

    return python_type;
}
