use of com.sequenceiq.cloudbreak.api.model.flex.CloudbreakFlexUsageJson in project cloudbreak by hortonworks.
the class FlexUsageGenerator method getUsages.
public CloudbreakFlexUsageJson getUsages(List<CloudbreakUsage> usages, Long fromDate) {
LOGGER.info("Generating Cloudbreak Flex related usages.");
CloudbreakFlexUsageJson result = new CloudbreakFlexUsageJson();
Optional<CloudbreakUsage> aUsage = usages.stream().findFirst();
result.setController(getFlexUsageControllerJson(usages, aUsage));
result.setProducts(Collections.emptyList());
if (controllerCreated == null || isValidFrom(fromDate)) {
result.setProducts(getFlexUsageProductJsons(usages, fromDate));
}
return result;
}
Aggregations