@Override
    public RegisteredService save(final RegisteredService registeredService) {
        return FunctionUtils.doUnchecked(() -> {
            registeredService.assignIdIfNecessary();
            invokeServiceRegistryListenerPreSave(registeredService);
            LOGGER.debug("Saved registered service: [{}]", registeredService);
            val filename = namingStrategy.build(registeredService, FILE_EXTENSION);
            val bucket = determineBucketForRegisteredService(registeredService);
            createBucketIfNecessary(bucket);
            try (val baos = new ByteArrayOutputStream()) {
                val blobId = BlobId.of(bucket, filename);
                val blobInfo = BlobInfo.newBuilder(blobId)
                    .setMetadata(Map.of(
                        "name", registeredService.getName(),
                        "id", String.valueOf(registeredService.getId()),
                        "description", registeredService.getDescription()
                    ))
                    .setContentEncoding(StandardCharsets.UTF_8.name())
                    .setContentType(MediaType.APPLICATION_JSON_VALUE)
                    .build();
                serializer.to(baos, registeredService);
                cloudStorage.create(blobInfo, baos.toByteArray());
                LOGGER.debug("Added service [{}] to [{}] in bucket [{}]", registeredService.getName(), filename, bucket);
                return registeredService;
            }
        });
    }
This is {@link GoogleCloudStorageServiceRegistry}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-gcp-storage-service-registry/src/main/java/org/apereo/cas/services/GoogleCloudStorageServiceRegistry.java