class TelemetryConverter {

    public TelemetryRequest convertToRequest(Telemetry telemetry) {
        TelemetryRequest telemetryRequest = new TelemetryRequest();
        if (telemetry != null) {
            LoggingRequest loggingRequest = createLoggingRequestFromSource(telemetry);
            WorkloadAnalyticsRequest waRequest = createWorkloadAnalyticsRequestFromSource(telemetry);
            FeaturesRequest featuresRequest = createFeaturesRequestFromSource(telemetry);

            telemetryRequest.setWorkloadAnalytics(waRequest);
            telemetryRequest.setLogging(loggingRequest);
            telemetryRequest.setFluentAttributes(telemetry.getFluentAttributes());
            telemetryRequest.setFeatures(featuresRequest);
        }
        return telemetryRequest;
    }

    public  TelemetryConverter(TelemetryConfiguration configuration,
            @Value("${cb.cm.telemetrypublisher.enabled:false}") boolean telemetryPublisherEnabled,
            @Value("${cb.cm.telemetrypublisher.default:true}") boolean telemetryPublisherDefaultValue);

}