List of usage examples for com.squareup.okhttp Response newBuilder
public Builder newBuilder()
From source file:io.swagger.client.api.BioentityApi.java
License:Apache License
private com.squareup.okhttp.Call getVariantObjectCall(String id, Boolean fetchObjects, Integer rows, Boolean excludeAutomaticAssertions, Boolean unselectEvidence, Boolean useCompactAssociations, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getVariantObject(Async)"); }/*from w w w .j av a 2 s . c om*/ // create path and map variables String localVarPath = "/bioentity/variant/{id}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (fetchObjects != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "fetch_objects", fetchObjects)); if (rows != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "rows", rows)); if (excludeAutomaticAssertions != null) localVarQueryParams.addAll( apiClient.parameterToPairs("", "exclude_automatic_assertions", excludeAutomaticAssertions)); if (unselectEvidence != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "unselect_evidence", unselectEvidence)); if (useCompactAssociations != null) localVarQueryParams .addAll(apiClient.parameterToPairs("", "use_compact_associations", useCompactAssociations)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:io.swagger.client.api.BioentityApi.java
License:Apache License
private com.squareup.okhttp.Call getVariantPhenotypeAssociationsCall(String id, Boolean fetchObjects, Integer rows, Boolean excludeAutomaticAssertions, Boolean unselectEvidence, Boolean useCompactAssociations, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { throw new ApiException( "Missing the required parameter 'id' when calling getVariantPhenotypeAssociations(Async)"); }//from www. ja v a2 s . c om // create path and map variables String localVarPath = "/bioentity/variant/{id}/phenotypes/".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (fetchObjects != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "fetch_objects", fetchObjects)); if (rows != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "rows", rows)); if (excludeAutomaticAssertions != null) localVarQueryParams.addAll( apiClient.parameterToPairs("", "exclude_automatic_assertions", excludeAutomaticAssertions)); if (unselectEvidence != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "unselect_evidence", unselectEvidence)); if (useCompactAssociations != null) localVarQueryParams .addAll(apiClient.parameterToPairs("", "use_compact_associations", useCompactAssociations)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:io.swagger.client.api.BioentitysetApi.java
License:Apache License
private com.squareup.okhttp.Call getEntitySetAssociationsCall(String objectSlim, String objectCategory, List<String> subject, List<String> background, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/bioentityset/associations/".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (objectSlim != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim)); if (objectCategory != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory)); if (subject != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject)); if (background != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override// w w w . j a v a 2s .c om public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:io.swagger.client.api.BioentitysetApi.java
License:Apache License
private com.squareup.okhttp.Call getEntitySetGraphResourceCall(String objectSlim, String objectCategory, List<String> subject, List<String> background, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/bioentityset/graph/".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (objectSlim != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim)); if (objectCategory != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory)); if (subject != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject)); if (background != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override// www . j av a 2 s. c o m public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:io.swagger.client.api.BioentitysetApi.java
License:Apache License
private com.squareup.okhttp.Call getEntitySetHomologsDeprecatedCall(String objectSlim, String objectCategory, List<String> subject, List<String> background, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/bioentityset/DEPRECATEDhomologs/".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (objectSlim != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim)); if (objectCategory != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory)); if (subject != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject)); if (background != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override/*from w w w . j ava 2s . com*/ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:io.swagger.client.api.BioentitysetApi.java
License:Apache License
private com.squareup.okhttp.Call getEntitySetOverRepresentationAnalysisCall(String objectCategory, String objectCategory2, String objectSlim, List<String> subject, List<String> background, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'objectCategory' is set if (objectCategory == null) { throw new ApiException( "Missing the required parameter 'objectCategory' when calling getEntitySetOverRepresentationAnalysis(Async)"); }//from w ww . j a v a 2 s . c om // verify the required parameter 'objectCategory2' is set if (objectCategory2 == null) { throw new ApiException( "Missing the required parameter 'objectCategory2' when calling getEntitySetOverRepresentationAnalysis(Async)"); } // create path and map variables String localVarPath = "/bioentityset/ora/".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "object_category" + "\\}", apiClient.escapeString(objectCategory.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (objectSlim != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim)); if (objectCategory2 != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory2)); if (subject != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject)); if (background != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:io.swagger.client.api.BioentitysetApi.java
License:Apache License
private com.squareup.okhttp.Call getEntitySetOverRepresentationAnalysis_0Call(String objectCategory, String objectCategory2, String objectSlim, List<String> subject, List<String> background, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'objectCategory' is set if (objectCategory == null) { throw new ApiException( "Missing the required parameter 'objectCategory' when calling getEntitySetOverRepresentationAnalysis_0(Async)"); }/*www. j a v a 2 s.c om*/ // verify the required parameter 'objectCategory2' is set if (objectCategory2 == null) { throw new ApiException( "Missing the required parameter 'objectCategory2' when calling getEntitySetOverRepresentationAnalysis_0(Async)"); } // create path and map variables String localVarPath = "/bioentityset/ora/{object_category}/".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "object_category" + "\\}", apiClient.escapeString(objectCategory.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (objectSlim != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim)); if (objectCategory2 != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory2)); if (subject != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject)); if (background != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:io.swagger.client.api.BioentitysetApi.java
License:Apache License
private com.squareup.okhttp.Call getEntitySetSummaryCall(String objectSlim, String objectCategory, List<String> subject, List<String> background, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/bioentityset/descriptor/counts/".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (objectSlim != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim)); if (objectCategory != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory)); if (subject != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject)); if (background != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override/*from w ww . ja v a2 s . co m*/ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:io.swagger.client.api.BioentitysethomologsApi.java
License:Apache License
private com.squareup.okhttp.Call getEntitySetHomologsCall(List<String> subject, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/bioentityset/homologs/homologs/".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (subject != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override//from ww w . j a v a2s . com public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }