use of com.sequenceiq.cloudbreak.api.model.PlatformGatewaysResponse in project cloudbreak by hortonworks.
the class CloudGatewayssToPlatformGatewaysResponseConverter method convert.
@Override
public PlatformGatewaysResponse convert(CloudGateWays source) {
Map<String, Set<CloudGatewayJson>> result = new HashMap<>();
for (Entry<String, Set<CloudGateWay>> entry : source.getCloudGateWayResponses().entrySet()) {
Set<CloudGatewayJson> cloudGatewayJsons = new HashSet<>();
for (CloudGateWay gateway : entry.getValue()) {
CloudGatewayJson actual = new CloudGatewayJson(gateway.getName(), gateway.getId(), gateway.getProperties());
cloudGatewayJsons.add(actual);
}
result.put(entry.getKey(), cloudGatewayJsons);
}
return new PlatformGatewaysResponse(result);
}
Aggregations