class UmsEventGenerationIdsProvider {

    public UmsEventGenerationIds getEventGenerationIds(String accountId, Optional<String> requestId) {
        EventGenerationIds eventGenerationIds =
                grpcUmsClient.getEventGenerationIds(INTERNAL_ACTOR_CRN, accountId, requestId)
                .getEventGenerationIds();

        UmsEventGenerationIds umsEventGenerationIds = new UmsEventGenerationIds();
        Map<String, String> eventGenerationIdsMap = Maps.newHashMap();
        for (Descriptors.FieldDescriptor fd : eventGenerationIds.getDescriptorForType().getFields()) {
            if (Descriptors.FieldDescriptor.Type.STRING.equals(fd.getType()) && eventGenerationIds.hasField(fd)) {
                eventGenerationIdsMap.put(fd.getName(), (String) eventGenerationIds.getField(fd));
            }
        }
        umsEventGenerationIds.setEventGenerationIds(eventGenerationIdsMap);

        return umsEventGenerationIds;
    }

}