class AnalyticsEventsManager {

  @VisibleForTesting
  static Set<String> extractAnalyticsEventNames(FetchEligibleCampaignsResponse response) {
    Set<String> analyticsEvents = new HashSet<>();
    for (CampaignProto.ThickContent content : response.getMessagesList()) {
      for (CommonTypesProto.TriggeringCondition condition : content.getTriggeringConditionsList()) {
        if (!TextUtils.isEmpty(condition.getEvent().getName())) {
          analyticsEvents.add(condition.getEvent().getName());
        }
      }
    }
    // The analytics connector will automatically filter down to the maximum number of allowable
    // events,
    // and track sdks 'abusing' that limit, but we want to note this for the developers as well
    // Additionally, analytics also filters out 'ineligible' event names - which might result in
    // fewer than 50 eligible ones to register as contextual triggers.
    if (analyticsEvents.size() > AnalyticsConstants.MAX_REGISTERED_EVENTS) {
      Logging.logi(TOO_MANY_CONTEXTUAL_TRIGGERS_ERROR);
    }
    return analyticsEvents;
  }

  public  AnalyticsEventsManager(AnalyticsConnector analyticsConnector);

}