for (Entry<?, ?> entry : services.entrySet()) {
Object serviceNameObj = entry.getKey();
if (serviceNameObj instanceof String) {
String serviceName = (String) serviceNameObj;
if (!servicesToBind.containsKey(serviceName)) {
LocalCloudService service = new LocalCloudService(serviceName);
servicesToBind.put(serviceName, service);
Object servicePropertiesObj = entry.getValue();
if (servicePropertiesObj instanceof Map<?, ?>) {
Map<?, ?> serviceProperties = (Map<?, ?>) servicePropertiesObj;
String label = getStringValue(serviceProperties, LABEL_PROP);
if (label != null) {
service.setLabel(label);
}
String provider = getStringValue(serviceProperties, PROVIDER_PROP);
if (provider != null) {
service.setProvider(provider);
}
String version = getStringValue(serviceProperties, VERSION_PROP);
if (version != null) {
service.setVersion(version);
}
String plan = getStringValue(serviceProperties, PLAN_PROP);
if (plan != null) {
service.setPlan(plan);
}
}
}
}
}