class C2NiFiRegistryClient {

    public Optional<String> resolveNiFiRegistryBucketId() throws NiFiRegistryException, IOException {
        if (registryBucketId != null) {
            logger.debug("Using configured bucketId '{}'", registryBucketId);
            return Optional.of(registryBucketId);
        }
        Optional<String> bucketIdForName = getBucketIdByName();
        if (bucketIdForName.isPresent()) {
            logger.debug("Resolved bucketId={} for bucketName={}", bucketIdForName.get(), registryBucketName);
        } else {
            logger.debug("Could not determine bucketId. Bucket named '{}' not found.", registryBucketName);
        }
        return bucketIdForName;
    }

    @Autowired public  C2NiFiRegistryClient(
            final NifiRegistryProperties nifiRegistryProperties,
            final ServerProperties serverProperties);
      C2NiFiRegistryClient(
            final NifiRegistryProperties nifiRegistryProperties,
            final ServerProperties serverProperties,
            final NiFiRegistryClient client);

}