List of usage examples for com.squareup.okhttp Response newBuilder
public Builder newBuilder()
From source file:com.oracle.bdcs.bdm.client.api.DataSources.java
License:Apache License
private com.squareup.okhttp.Call getDataSourceCall(String dataSourceName, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'dataSourceName' is set if (dataSourceName == null) { throw new ApiException( "Missing the required parameter 'dataSourceName' when calling getDataSource(Async)"); }/*from w w w .ja v a2 s . com*/ // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException("Missing the required parameter 'tenantName' when calling getDataSource(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/dataSources/{dataSourceName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "dataSourceName" + "\\}", apiClient.escapeString(dataSourceName.toString())) .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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:com.oracle.bdcs.bdm.client.api.DataSources.java
License:Apache License
private com.squareup.okhttp.Call listAllDataSourcesCall(String tenantName, Integer offset, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling listAllDataSources(Async)"); }//from w w w.j ava 2s .c o m // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/dataSources".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (offset != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); if (limit != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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:com.oracle.bdcs.bdm.client.api.DataSources.java
License:Apache License
private com.squareup.okhttp.Call updateDataSourceCall(String dataSourceName, DataSource body, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'dataSourceName' is set if (dataSourceName == null) { throw new ApiException( "Missing the required parameter 'dataSourceName' when calling updateDataSource(Async)"); }//w w w . j a va2 s . co m // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updateDataSource(Async)"); } // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling updateDataSource(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/dataSources/{dataSourceName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "dataSourceName" + "\\}", apiClient.escapeString(dataSourceName.toString())) .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:com.oracle.bdcs.bdm.client.api.Files.java
License:Apache License
private com.squareup.okhttp.Call listFilesCall(String tenantName, FileSystemOperation body, String offset, String limit, Boolean startsWithMode, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException("Missing the required parameter 'tenantName' when calling listFiles(Async)"); }/*from w w w .j a v a2 s .c o m*/ // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling listFiles(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/files".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (offset != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); if (limit != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); if (startsWithMode != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "startsWithMode", startsWithMode)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:com.oracle.bdcs.bdm.client.api.Files.java
License:Apache License
private com.squareup.okhttp.Call resolveGlobsCall(String tenantName, ResolveGlobs body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException("Missing the required parameter 'tenantName' when calling resolveGlobs(Async)"); }// w ww . j a v a 2 s. co m // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling resolveGlobs(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/files/resolve".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:com.oracle.bdcs.bdm.client.api.Files.java
License:Apache License
private com.squareup.okhttp.Call storageAccountInformationCall(String tenantName, String providerName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling storageAccountInformation(Async)"); }// w w w . j a v a 2 s. c o m // verify the required parameter 'providerName' is set if (providerName == null) { throw new ApiException( "Missing the required parameter 'providerName' when calling storageAccountInformation(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/files/accountInformation/{providerName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())) .replaceAll("\\{" + "providerName" + "\\}", apiClient.escapeString(providerName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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:com.oracle.bdcs.bdm.client.api.Files.java
License:Apache License
private com.squareup.okhttp.Call storageContentSummaryCall(String providerName, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'providerName' is set if (providerName == null) { throw new ApiException( "Missing the required parameter 'providerName' when calling storageContentSummary(Async)"); }/*from ww w . j a v a 2 s . c o m*/ // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling storageContentSummary(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/files/storageSummary/{providerName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "providerName" + "\\}", apiClient.escapeString(providerName.toString())) .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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:com.oracle.bdcs.bdm.client.api.FileSystemProviders.java
License:Apache License
private com.squareup.okhttp.Call getProviderCall(String providerName, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'providerName' is set if (providerName == null) { throw new ApiException("Missing the required parameter 'providerName' when calling getProvider(Async)"); }/*from w w w . j a v a 2s . c o m*/ // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException("Missing the required parameter 'tenantName' when calling getProvider(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/fsProviders/{providerName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "providerName" + "\\}", apiClient.escapeString(providerName.toString())) .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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:com.oracle.bdcs.bdm.client.api.FileSystemProviders.java
License:Apache License
private com.squareup.okhttp.Call listAllProvidersCall(String tenantName, Integer offset, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling listAllProviders(Async)"); }// ww w . ja va 2s . com // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/fsProviders".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (offset != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); if (limit != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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:com.oracle.bdcs.bdm.client.api.FileSystemProviders.java
License:Apache License
private com.squareup.okhttp.Call registerNewProviderCall(FileSystemProvider body, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling registerNewProvider(Async)"); }// w w w.java2s. co m // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling registerNewProvider(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/fsProviders".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; 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, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }