class IntentSlotRenderer {

    public Slot renderSlot(String slotName, SlotTypeDefinition slotType, IntentData intentData) {
        IntentSlotData data = intentData.getSlots().get(slotName);
        List<String> samples = null;
        if (data != null && !data.getSamples().isEmpty()) {
            samples = new ArrayList<>(data.getSamples());
        }
        return Slot.builder()
            .withName(slotName)
            .withType(slotType.getName())
            .withSamples(samples)
            .build();
    }

}