class MetricsLoggerClient {

  void logImpression(InAppMessage message) {
    if (!isTestCampaign(message)) {
      // If message is not a test message then log
      firebaseInstallations
          .getId()
          .addOnSuccessListener(
              id ->
                  engagementMetricsLogger.logEvent(
                      createEventEntry(message, id, IMPRESSION_EVENT_TYPE).toByteArray()));
      // For impressions log to analytics as well
      logEventAsync(
          message,
          AnalyticsConstants.ANALYTICS_IMPRESSION_EVENT,
          impressionCountsAsConversion(message));
    }
    // No matter what, always trigger developer callbacks
    developerListenerManager.impressionDetected(message);
  }

  public  MetricsLoggerClient(
      EngagementMetricsLoggerInterface engagementMetricsLogger,
      AnalyticsConnector analyticsConnector,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      Clock clock,
      DeveloperListenerManager developerListenerManager);

}