EventLogExternalSendSettings (@NotNull String productVersion) { EventLogConfigVersions version = findMajorVersion(productVersion); if (version == null) { return EMPTY; } Map<EventLogBuildType, EventLogSendConfiguration> configurations = new EnumMap<>(EventLogBuildType.class); for (EventLogConfigFilterCondition filter : version.getFilters()) { EventLogBuildType[] types = EventLogBuildType.getTypesByString(filter.releaseType); for (EventLogBuildType type : types) { EventLogBucketRange range = filter.getBucketRange(); if (range != null) { if (!configurations.containsKey(type)) { configurations.put(type, new EventLogSendConfiguration(new ArrayList<>())); } configurations.get(type).addBucketRange(range); } } } return new EventLogExternalSendSettings(version.getEndpoints(), version.getOptions(), configurations); }