class ClientConverter {

    public Client convert(ClientType clientType) {
        Client client = new Client();
        client.setId(convertId(clientType.getIdentifier()));
        client.setInstanceId(clientType.getIdentifier().getXRoadInstance());
        client.setMemberClass(clientType.getIdentifier().getMemberClass());
        client.setMemberCode(clientType.getIdentifier().getMemberCode());
        client.setSubsystemCode(clientType.getIdentifier().getSubsystemCode());
        client.setMemberName(globalConfFacade.getMemberName(clientType.getIdentifier()));
        client.setOwner(clientType.getIdentifier().equals(securityServerOwner.getServerId().getOwner()));
        client.setHasValidLocalSignCert(ClientUtils.hasValidLocalSignCert(clientType.getIdentifier(),
                currentSecurityServerSignCertificates.getSignCertificateInfos()));
        Optional<ClientStatus> status = ClientStatusMapping.map(clientType.getClientStatus());
        client.setStatus(status.orElse(null));
        Optional<ConnectionType> connectionTypeEnum =
                ConnectionTypeMapping.map(clientType.getIsAuthentication());
        client.setConnectionType(connectionTypeEnum.orElse(null));
        return client;
    }

    @Autowired public  ClientConverter(GlobalConfFacade globalConfFacade,
            CurrentSecurityServerId securityServerOwner,
            CurrentSecurityServerSignCertificates currentSecurityServerSignCertificates);

}