Search in sources :

Example 1 with GatewayV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.cluster.gateway.GatewayV4Response in project cloudbreak by hortonworks.

the class ClusterToClusterV4ResponseConverter method convertNullableProperties.

private void convertNullableProperties(Cluster source, ClusterV4Response clusterResponse) {
    if (source.getGateway() != null) {
        GatewayV4Response gatewayV4Response = gatewayToGatewayV4ResponseConverter.convert(source.getGateway());
        clusterResponse.setGateway(gatewayV4Response);
    }
    if (source.getAttributes() != null) {
        Json fromVault = new Json(source.getAttributes());
        clusterResponse.setAttributes(fromVault.getMap());
    }
}
Also used : GatewayV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.cluster.gateway.GatewayV4Response) Json(com.sequenceiq.cloudbreak.common.json.Json)

Example 2 with GatewayV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.cluster.gateway.GatewayV4Response in project cloudbreak by hortonworks.

the class GatewayToGatewayV4ResponseConverter method convert.

public GatewayV4Response convert(Gateway source) {
    GatewayV4Response response = new GatewayV4Response();
    response.setGatewayType(source.getGatewayType());
    response.setPath(source.getPath());
    response.setSsoProvider(source.getSsoProvider());
    response.setSsoType(source.getSsoType());
    response.setTokenCert(source.getTokenCert());
    response.setTopologies(source.getTopologies().stream().map(t -> gatewayTopologyToGatewayTopologyV4ResponseConverter.convert(t)).collect(Collectors.toList()));
    return response;
}
Also used : GatewayV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.cluster.gateway.GatewayV4Response)

Aggregations

GatewayV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.cluster.gateway.GatewayV4Response)2 Json (com.sequenceiq.cloudbreak.common.json.Json)1