class NetworkToNetworkV4ResponseConverter extends AbstractConversionServiceAwareConverter<Stack, NetworkV4Response> {

    @Override
    public NetworkV4Response convert(Stack source) {
        NetworkV4Response networkResp = null;
        Network network = source.getNetwork();
        if (network != null) {
            networkResp = new NetworkV4Response();
            networkResp.setSubnetCIDR(network.getSubnetCIDR());
            if (network.getAttributes() != null) {
                Map<String, Object> parameters = cleanMap(network.getAttributes().getMap());
                putNetworkResourcesIntoResponse(source, parameters);
                providerParameterCalculator.parse(parameters, networkResp);
            }
        }
        return networkResp;
    }

}