app.setRunningInstances(runningInstancesAttribute);
}
String command = getEntityAttribute(resource, "command", String.class);
String buildpack = getEntityAttribute(resource, "buildpack", String.class);
Map<String, Object> stackResource = getEmbeddedResource(resource, "stack");
CloudStack stack = mapStackResource(stackResource);
Integer healthCheckTimeout = getEntityAttribute(resource, "health_check_timeout", Integer.class);
Staging staging = new Staging(command, buildpack, stack.getName(), healthCheckTimeout);
app.setStaging(staging);
Map envMap = getEntityAttribute(resource, "environment_json", Map.class);
if (envMap.size() > 0) {
app.setEnv(envMap);