class PublicApiKeyDataConverter {

    public PublicApiKeyData convert(PersistentApiKeyType persistentApiKeyType) {
        PublicApiKeyData publicApiKeyData = new PublicApiKeyData();
        publicApiKeyData.setId(persistentApiKeyType.getId());
        publicApiKeyData.setKey(persistentApiKeyType.getPlaintTextKey());
        publicApiKeyData.setRoles(persistentApiKeyType.getRoles());
        return publicApiKeyData;
    }

}