class FluentConfigService {

    public FluentConfigView createFluentConfigs(TelemetryClusterDetails clusterDetails,
            boolean databusEnabled, boolean meteringEnabled, Telemetry telemetry) {
        final FluentConfigView.Builder builder = new FluentConfigView.Builder();
        boolean enabled = false;
        if (telemetry != null) {
            if (telemetry.getFluentAttributes() != null) {
                builder.withOverrideAttributes(
                        telemetry.getFluentAttributes() != null ? new HashMap<>(telemetry.getFluentAttributes()) : new HashMap<>()
                );
            }
            enabled = determineAndSetLogging(builder, telemetry, databusEnabled, meteringEnabled);
            if (telemetry.isClusterLogsCollectionEnabled()) {
                LOGGER.debug("Set anonymization rules (only for cluster log collection)");
                builder.withAnonymizationRules(anonymizationRuleResolver.decodeRules(telemetry.getRules()));
            }
            if (enabled && meteringEnabled) {
                builder
                        .withMeteringAppName(meteringConfiguration.getDbusAppName())
                        .withMeteringStreamName(meteringConfiguration.getDbusAppName());
            }
        }
        if (!enabled) {
            LOGGER.debug("Fluent based logging is disabled");
        }

        return builder
                .withEnabled(enabled)
                .withClusterDetails(clusterDetails)
                .build();
    }

    public  FluentConfigService(S3ConfigGenerator s3ConfigGenerator,
            AdlsGen2ConfigGenerator adlsGen2ConfigGenerator,
            GcsConfigGenerator gcsConfigGenerator,
            AnonymizationRuleResolver anonymizationRuleResolver,
            MeteringConfiguration meteringConfiguration);

}