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

#include "py.Windows.Security.Authentication.OnlineId.h"


namespace py::cpp::Windows::Security::Authentication::OnlineId
{
    // ----- OnlineIdAuthenticator class --------------------

    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);
        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 =
    {
        "winrt._winrt_windows_security_authentication_onlineid.OnlineIdAuthenticator",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdAuthenticator),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdAuthenticator
    };

    // ----- OnlineIdServiceTicket class --------------------

    static PyObject* _new_OnlineIdServiceTicket(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicket>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicket>::type_name);
        return nullptr;
    }

    static void _dealloc_OnlineIdServiceTicket(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicket* self) noexcept
    {
        auto tp = Py_TYPE(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 =
    {
        "winrt._winrt_windows_security_authentication_onlineid.OnlineIdServiceTicket",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicket),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdServiceTicket
    };

    // ----- OnlineIdServiceTicketRequest class --------------------

    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);
        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 =
    {
        "winrt._winrt_windows_security_authentication_onlineid.OnlineIdServiceTicketRequest",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdServiceTicketRequest),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdServiceTicketRequest
    };

    // ----- OnlineIdSystemAuthenticator class --------------------

    static PyObject* _new_OnlineIdSystemAuthenticator(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticator>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticator>::type_name);
        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[] = {
        { }
    };

    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 =
    {
        "winrt._winrt_windows_security_authentication_onlineid.OnlineIdSystemAuthenticator",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdSystemAuthenticator
    };

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

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

    static PyType_Slot type_slots_OnlineIdSystemAuthenticator_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_OnlineIdSystemAuthenticator_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_OnlineIdSystemAuthenticator_Static) },
        { }
    };

    static PyType_Spec type_spec_OnlineIdSystemAuthenticator_Static =
    {
        "winrt._winrt_windows_security_authentication_onlineid.OnlineIdSystemAuthenticator_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_OnlineIdSystemAuthenticator_Static
    };

    // ----- OnlineIdSystemAuthenticatorForUser class --------------------

    static PyObject* _new_OnlineIdSystemAuthenticatorForUser(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticatorForUser>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticatorForUser>::type_name);
        return nullptr;
    }

    static void _dealloc_OnlineIdSystemAuthenticatorForUser(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticatorForUser* self) noexcept
    {
        auto tp = Py_TYPE(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 =
    {
        "winrt._winrt_windows_security_authentication_onlineid.OnlineIdSystemAuthenticatorForUser",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemAuthenticatorForUser),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdSystemAuthenticatorForUser
    };

    // ----- OnlineIdSystemIdentity class --------------------

    static PyObject* _new_OnlineIdSystemIdentity(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemIdentity>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemIdentity>::type_name);
        return nullptr;
    }

    static void _dealloc_OnlineIdSystemIdentity(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemIdentity* self) noexcept
    {
        auto tp = Py_TYPE(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 =
    {
        "winrt._winrt_windows_security_authentication_onlineid.OnlineIdSystemIdentity",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemIdentity),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdSystemIdentity
    };

    // ----- OnlineIdSystemTicketResult class --------------------

    static PyObject* _new_OnlineIdSystemTicketResult(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemTicketResult>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Security::Authentication::OnlineId::OnlineIdSystemTicketResult>::type_name);
        return nullptr;
    }

    static void _dealloc_OnlineIdSystemTicketResult(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemTicketResult* self) noexcept
    {
        auto tp = Py_TYPE(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 =
    {
        "winrt._winrt_windows_security_authentication_onlineid.OnlineIdSystemTicketResult",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::OnlineIdSystemTicketResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_OnlineIdSystemTicketResult
    };

    // ----- SignOutUserOperation class --------------------

    static PyObject* _new_SignOutUserOperation(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Security::Authentication::OnlineId::SignOutUserOperation>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Security::Authentication::OnlineId::SignOutUserOperation>::type_name);
        return nullptr;
    }

    static void _dealloc_SignOutUserOperation(py::wrapper::Windows::Security::Authentication::OnlineId::SignOutUserOperation* self) noexcept
    {
        auto tp = Py_TYPE(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 =
    {
        "winrt._winrt_windows_security_authentication_onlineid.SignOutUserOperation",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::SignOutUserOperation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SignOutUserOperation
    };

    // ----- UserAuthenticationOperation class --------------------

    static PyObject* _new_UserAuthenticationOperation(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation>::type_name);
        return nullptr;
    }

    static void _dealloc_UserAuthenticationOperation(py::wrapper::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation* self) noexcept
    {
        auto tp = Py_TYPE(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 =
    {
        "winrt._winrt_windows_security_authentication_onlineid.UserAuthenticationOperation",
        sizeof(py::wrapper::Windows::Security::Authentication::OnlineId::UserAuthenticationOperation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_UserAuthenticationOperation
    };

    // ----- UserIdentity class --------------------

    static PyObject* _new_UserIdentity(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Security::Authentication::OnlineId::UserIdentity>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Security::Authentication::OnlineId::UserIdentity>::type_name);
        return nullptr;
    }

    static void _dealloc_UserIdentity(py::wrapper::Windows::Security::Authentication::OnlineId::UserIdentity* self) noexcept
    {
        auto tp = Py_TYPE(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 =
    {
        "winrt._winrt_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 PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winrt_windows_security_authentication_onlineid",
           module_doc,
           0,
           nullptr,
           nullptr,
           nullptr,
           nullptr,
           nullptr};

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

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

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

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

    if (!module)
    {
        return nullptr;
    }

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

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

    if (!object_bases)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_OnlineIdAuthenticator, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_OnlineIdServiceTicket, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_OnlineIdServiceTicketRequest, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    py::pyobj_handle type_OnlineIdSystemAuthenticator_Static{PyType_FromSpec(&type_spec_OnlineIdSystemAuthenticator_Static)};
    if (!type_OnlineIdSystemAuthenticator_Static)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_OnlineIdSystemAuthenticator, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_OnlineIdSystemAuthenticator_Static.get())) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_OnlineIdSystemAuthenticatorForUser, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_OnlineIdSystemIdentity, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_OnlineIdSystemTicketResult, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_SignOutUserOperation, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_UserAuthenticationOperation, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_UserIdentity, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }


    return module.detach();
}
