class HubEventLogger {

    public void logIdpFraudEvent(SessionId sessionId, String idpEntityID, String requestIssuerEntityID, PersistentId persistentId, DateTime sessionExpiryTimestamp, FraudDetectedDetails fraudDetectedDetails,
                                 Optional<String> principalIpAddressSeenByIdp, String principalIpAddressSeenByHub, String requestId, String analyticsSessionId, String journeyType) {
        Map<EventDetailsKey, String> details = new HashMap<>();
        details.put(idp_entity_id, idpEntityID);
        details.put(pid, persistentId.getNameId());
        details.put(idp_fraud_event_id, fraudDetectedDetails.getIdpFraudEventId());
        details.put(gpg45_status, fraudDetectedDetails.getFraudIndicator());
        details.put(analytics_session_id, analyticsSessionId);
        details.put(journey_type, journeyType);

        if (principalIpAddressSeenByIdp.isPresent()) {
            details.put(principal_ip_address_as_seen_by_idp, principalIpAddressSeenByIdp.get());
        }
        details.put(principal_ip_address_as_seen_by_hub, principalIpAddressSeenByHub);

        logSessionEvent(sessionId, requestIssuerEntityID, sessionExpiryTimestamp, requestId, FRAUD_DETECTED, details);
    }

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

}