class NetworkV1ToNetworkV4Converter {

    public NetworkV4Request convertToNetworkV4Request(Pair<NetworkV1Request, DetailedEnvironmentResponse> network) {
        EnvironmentNetworkResponse value = network.getValue().getNetwork();
        NetworkV1Request key = network.getKey();
        if (key == null) {
            key = new NetworkV1Request();
        }

        NetworkV4Request request = new NetworkV4Request();

        switch (network.getValue().getCloudPlatform()) {
            case "AWS":
                request.setAws(getAwsNetworkParameters(Optional.ofNullable(key.getAws()), value));
                break;
            case "AZURE":
                request.setAzure(getAzureNetworkParameters(Optional.ofNullable(key.getAzure()), value));
                break;
            case "MOCK":
                request.setMock(getMockNetworkParameters(Optional.ofNullable(key.getMock()), value));
                break;
            case "GCP":
                request.setGcp(getGcpNetworkParameters(Optional.ofNullable(key.getGcp()), value));
                break;
            default:
        }
        return request;
    }

}