Search in sources :

Example 1 with AccessConfigJson

use of com.sequenceiq.cloudbreak.api.model.AccessConfigJson in project cloudbreak by hortonworks.

the class CloudAccessConfigsToPlatformAccessConfigsResponseConverter method convert.

@Override
public PlatformAccessConfigsResponse convert(CloudAccessConfigs source) {
    PlatformAccessConfigsResponse platformAccessConfigsResponse = new PlatformAccessConfigsResponse();
    Set<AccessConfigJson> result = new HashSet<>();
    for (CloudAccessConfig entry : source.getCloudAccessConfigs()) {
        AccessConfigJson actual = new AccessConfigJson(entry.getName(), entry.getId(), entry.getProperties());
        result.add(actual);
    }
    platformAccessConfigsResponse.setAccessConfigs(result);
    return platformAccessConfigsResponse;
}
Also used : CloudAccessConfig(com.sequenceiq.cloudbreak.cloud.model.CloudAccessConfig) PlatformAccessConfigsResponse(com.sequenceiq.cloudbreak.api.model.PlatformAccessConfigsResponse) AccessConfigJson(com.sequenceiq.cloudbreak.api.model.AccessConfigJson) HashSet(java.util.HashSet)

Aggregations

AccessConfigJson (com.sequenceiq.cloudbreak.api.model.AccessConfigJson)1 PlatformAccessConfigsResponse (com.sequenceiq.cloudbreak.api.model.PlatformAccessConfigsResponse)1 CloudAccessConfig (com.sequenceiq.cloudbreak.cloud.model.CloudAccessConfig)1 HashSet (java.util.HashSet)1