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 getSequenceFeatureObjectCall(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 getSequenceFeatureObject(Async)"); }//from w ww . ja v a 2s . c o m // create path and map variables String localVarPath = "/bioentity/sequence_feature/{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 getSubstanceExposuresCall(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 getSubstanceExposures(Async)"); }//www .j a v a2 s .co m // create path and map variables String localVarPath = "/bioentity/substance/{id}/exposures/".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 getSubstanceInteractionsCall(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 getSubstanceInteractions(Async)"); }/*from w ww . j a v a 2 s .co m*/ // create path and map variables String localVarPath = "/bioentity/substance/{id}/interactions/".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 getSubstanceObjectCall(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 getSubstanceObject(Async)"); }/*from www .j a v a2s .c om*/ // create path and map variables String localVarPath = "/bioentity/substance/{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 getSubstanceParticipantInAssociationsCall(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 getSubstanceParticipantInAssociations(Async)"); }/*from w w w . j a v a 2s .c om*/ // create path and map variables String localVarPath = "/bioentity/substance/{id}/participant_in/".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 getSubstanceRelationshipsCall(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 getSubstanceRelationships(Async)"); }//from w w w . ja va 2s.co m // create path and map variables String localVarPath = "/bioentity/substance/{id}/substances/".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 getSubstanceRoleAssociationsCall(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 getSubstanceRoleAssociations(Async)"); }//from ww w . j av a2 s . c o m // create path and map variables String localVarPath = "/bioentity/substance/{id}/roles/".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 getSubstanceTargetAssociationsCall(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 getSubstanceTargetAssociations(Async)"); }//from w ww.j av a 2 s .c o m // create path and map variables String localVarPath = "/bioentity/substance/{id}/targets/".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 getVariantGeneAssociationsCall(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 getVariantGeneAssociations(Async)"); }//from w ww. j a v a2 s.co m // create path and map variables String localVarPath = "/bioentity/variant/{id}/genes/".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 getVariantGenotypeAssociationsCall(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 getVariantGenotypeAssociations(Async)"); }//from ww w. j a v a 2s . c o m // create path and map variables String localVarPath = "/bioentity/variant/{id}/genotypes/".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); }