class GCPInstancePriceService implements CloudInstancePriceService<GCPRegion> {

    @Override
    public List<InstanceOffer> refreshPriceListForRegion(final GCPRegion region) {
        try {
            final List<AbstractGCPObject> objects = availableObjects(region);
            final Map<String, GCPResourceMapping> mappings = loadResourceMappings();
            final List<GCPResourceRequest> requests = requests(objects, mappings);
            final Set<GCPResourcePrice> prices = priceLoader.load(region, requests);
            return objects.stream()
                    .flatMap(object -> Arrays.stream(GCPBilling.values())
                            .map(billing -> object.toInstanceOffer(billing,
                                    getPrice(object, billing, prices, region.getRegionCode()), region.getId())))
                    .collect(Collectors.toList());
        } catch (GCPInstancePriceException e) {
            log.error("Failed to get instance types and prices from GCP.", e);
            return Collections.emptyList();
        }
    }

}