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