@Override
    public RegisteredService save(final RegisteredService registeredService) {
        return FunctionUtils.doUnchecked(() -> {
            registeredService.assignIdIfNecessary();
            invokeServiceRegistryListenerPreSave(registeredService);
            LOGGER.debug("Saved registered service: [{}]", registeredService);
            val writeResult = firestore.collection(collectionName)
                .document(String.valueOf(registeredService.getId()))
                .set(Map.of("json", serializer.toString(registeredService)))
                .get();
            LOGGER.debug("Added service [{}] to [{}] @ [{}]", registeredService.getName(),
                collectionName, writeResult.getUpdateTime());
            return registeredService;
        });
    }
This is {@link GoogleCloudFirestoreServiceRegistry}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-gcp-firestore-service-registry/src/main/java/org/apereo/cas/services/GoogleCloudFirestoreServiceRegistry.java