use of com.sequenceiq.cloudbreak.api.model.rds.RDSConfigResponse in project cloudbreak by hortonworks.
the class RDSConfigToRDSConfigResponseConverter method convert.
@Override
public RDSConfigResponse convert(RDSConfig source) {
RDSConfigResponse json = new RDSConfigResponse();
json.setId(source.getId());
json.setName(source.getName());
json.setConnectionURL(source.getConnectionURL());
json.setDatabaseEngine(source.getDatabaseEngine());
json.setConnectionDriver(source.getConnectionDriver());
json.setPublicInAccount(source.isPublicInAccount());
json.setCreationDate(source.getCreationDate());
if (source.getClusters() != null) {
json.setClusterNames(source.getClusters().stream().map(Cluster::getName).collect(Collectors.toSet()));
} else {
json.setClusterNames(new HashSet<>());
}
json.setStackVersion(source.getStackVersion());
json.setType(source.getType());
return json;
}
Aggregations