class HubEventLogger {

    public void logIdpAuthnSucceededEvent(SessionId sessionId,
                                          DateTime sessionExpiryTimestamp,
                                          String idpEntityId,
                                          String transactionEntityId,
                                          PersistentId persistentId,
                                          String requestId,
                                          LevelOfAssurance minimumLevelOfAssurance,
                                          LevelOfAssurance maximumLevelOfAssurance,
                                          LevelOfAssurance preferredLevelOfAssurance,
                                          LevelOfAssurance providedLevelOfAssurance,
                                          Optional<String> principalIpAddress,
                                          String principalIpAddressAsSeenByHub,
                                          String analyticsSessionId,
                                          String journeyType) {

        Map<EventDetailsKey, String> details = new HashMap<>();
        details.put(idp_entity_id, idpEntityId);
        details.put(pid, persistentId.getNameId());
        details.put(minimum_level_of_assurance, minimumLevelOfAssurance.name());
        details.put(maximum_level_of_assurance, maximumLevelOfAssurance.name());
        details.put(preferred_level_of_assurance, preferredLevelOfAssurance.name());
        details.put(provided_level_of_assurance, providedLevelOfAssurance.name());
        if (principalIpAddress.isPresent()) {
            details.put(principal_ip_address_as_seen_by_idp, principalIpAddress.get());
        }
        details.put(principal_ip_address_as_seen_by_hub, principalIpAddressAsSeenByHub);
        details.put(analytics_session_id, analyticsSessionId);
        details.put(journey_type, journeyType);
        logSessionEvent(sessionId, transactionEntityId, sessionExpiryTimestamp, requestId, IDP_AUTHN_SUCCEEDED, details);
    }

    @Inject public  HubEventLogger(ServiceInfoConfiguration serviceInfo,
                          EventSinkProxy eventSinkProxy,
                          EventEmitter eventEmitter);

}