@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call postVrpValidateBeforeCall(String key, Request body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling postVrp(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling postVrp(Async)"); } com.squareup.okhttp.Call call = postVrpCall(key, body, progressListener, progressRequestListener); return call; }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return ApiResponse<JobId> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<JobId> postVrpWithHttpInfo(String key, Request body) throws ApiException { com.squareup.okhttp.Call call = postVrpValidateBeforeCall(key, body, null, null); Type localVarReturnType = new TypeToken<JobId>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return JobId * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public JobId postVrp(String key, Request body) throws ApiException { ApiResponse<JobId> resp = postVrpWithHttpInfo(key, body); return resp.getData(); }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
/** * Solves vehicle routing problems * * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * * @throws ApiException * if the Api call fails */ @Test public void postVrpTest() throws ApiException { String key = null; Request body = null; JobId response = api.postVrp(key, body); // TODO: test validations }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
/** * Solves vehicle routing problems * * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * * @throws ApiException * if the Api call fails */ @Test public void postVrpTest() throws ApiException { String key = null; Request body = null; JobId response = api.postVrp(key, body); // TODO: test validations }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return ApiResponse<JobId> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<JobId> postVrpWithHttpInfo(String key, Request body) throws ApiException { com.squareup.okhttp.Call call = postVrpValidateBeforeCall(key, body, null, null); Type localVarReturnType = new TypeToken<JobId>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return JobId * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public JobId postVrp(String key, Request body) throws ApiException { ApiResponse<JobId> resp = postVrpWithHttpInfo(key, body); return resp.getData(); }
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call postVrpValidateBeforeCall(String key, Request body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling postVrp(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling postVrp(Async)"); } com.squareup.okhttp.Call call = postVrpCall(key, body, progressListener, progressRequestListener); return call; }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return ApiResponse<JobId> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<JobId> postVrpWithHttpInfo(String key, Request body) throws ApiException { com.squareup.okhttp.Call call = postVrpValidateBeforeCall(key, body, null, null); Type localVarReturnType = new TypeToken<JobId>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return JobId * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public JobId postVrp(String key, Request body) throws ApiException { ApiResponse<JobId> resp = postVrpWithHttpInfo(key, body); return resp.getData(); }
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call postVrpValidateBeforeCall(String key, Request body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling postVrp(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling postVrp(Async)"); } com.squareup.okhttp.Call call = postVrpCall(key, body, progressListener, progressRequestListener); return call; }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); // System.out.println(rsp); // if(rsp.getStatus() == null) continue; if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
com.squareup.okhttp.Call call = postVrpValidateBeforeCall(key, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<JobId>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback);
com.squareup.okhttp.Call call = postVrpValidateBeforeCall(key, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<JobId>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback);
com.squareup.okhttp.Call call = postVrpValidateBeforeCall(key, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<JobId>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback);