List of usage examples for com.squareup.okhttp Response newBuilder
public Builder newBuilder()
From source file:com.oracle.bdcs.bdm.client.api.JobTemplates.java
License:Apache License
private com.squareup.okhttp.Call createJobTemplateCall(TemplateobTemplate 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 createJobTemplate(Async)"); }/*from www .ja v a2s . co m*/ // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling createJobTemplate(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/jobTemplates".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.JobTemplates.java
License:Apache License
private com.squareup.okhttp.Call deleteJobTemplateCall(String jobTemplateName, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'jobTemplateName' is set if (jobTemplateName == null) { throw new ApiException( "Missing the required parameter 'jobTemplateName' when calling deleteJobTemplate(Async)"); }/*from w w w .ja v a 2s . com*/ // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling deleteJobTemplate(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/jobTemplates/{jobTemplateName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "jobTemplateName" + "\\}", apiClient.escapeString(jobTemplateName.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, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:com.oracle.bdcs.bdm.client.api.JobTemplates.java
License:Apache License
private com.squareup.okhttp.Call editJobTemplateCall(String jobTemplateName, TemplateobTemplate body, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'jobTemplateName' is set if (jobTemplateName == null) { throw new ApiException( "Missing the required parameter 'jobTemplateName' when calling editJobTemplate(Async)"); }/*from w w w .j a v a 2 s . c o m*/ // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling editJobTemplate(Async)"); } // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling editJobTemplate(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/jobTemplates/{jobTemplateName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "jobTemplateName" + "\\}", apiClient.escapeString(jobTemplateName.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.JobTemplates.java
License:Apache License
private com.squareup.okhttp.Call getJobTemplateCall(String jobTemplateName, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'jobTemplateName' is set if (jobTemplateName == null) { throw new ApiException( "Missing the required parameter 'jobTemplateName' when calling getJobTemplate(Async)"); }/*from w w w . j av a 2s. com*/ // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException( "Missing the required parameter 'tenantName' when calling getJobTemplate(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/jobTemplates/{jobTemplateName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "jobTemplateName" + "\\}", apiClient.escapeString(jobTemplateName.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.JobTemplates.java
License:Apache License
private com.squareup.okhttp.Call listAllJobTemplatesCall(String tenantName, Integer offset, Integer limit, String q, 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 listAllJobTemplates(Async)"); }//from ww w .ja va 2 s.co m // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/jobTemplates".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 (q != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "q", q)); 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.Metrics.java
License:Apache License
private com.squareup.okhttp.Call getMetricsCall(String clusterName, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'clusterName' is set if (clusterName == null) { throw new ApiException("Missing the required parameter 'clusterName' when calling getMetrics(Async)"); }/*from www . j ava 2 s . com*/ // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException("Missing the required parameter 'tenantName' when calling getMetrics(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/metrics/clusters/{clusterName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "clusterName" + "\\}", apiClient.escapeString(clusterName.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.Registry.java
License:Apache License
private com.squareup.okhttp.Call getServiceHealthCall(String tenantName, 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 getServiceHealth(Async)"); }//from w w w . j a v a2s .c o m // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/registry".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, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); }
From source file:com.oracle.bdcs.bdm.client.api.Registry.java
License:Apache License
private com.squareup.okhttp.Call listProvidersCall(String serviceName, String tenantName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'serviceName' is set if (serviceName == null) { throw new ApiException( "Missing the required parameter 'serviceName' when calling listProviders(Async)"); }// w w w .j ava 2 s .co m // verify the required parameter 'tenantName' is set if (tenantName == null) { throw new ApiException("Missing the required parameter 'tenantName' when calling listProviders(Async)"); } // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/registry/providers/{serviceName}" .replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "serviceName" + "\\}", apiClient.escapeString(serviceName.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.ScheduledJobs.java
License:Apache License
private com.squareup.okhttp.Call getJobTemplateCalendarScheduleCall(String tenantName, Integer density, Integer limit, Long timePeriodStart, Long timePeriodEnd, 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 getJobTemplateCalendarSchedule(Async)"); }/*from ww w . ja v a 2 s .co m*/ // create path and map variables String localVarPath = "/v1.0/tenants/{tenantName}/jobTemplatesSchedule".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tenantName" + "\\}", apiClient.escapeString(tenantName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (density != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "density", density)); if (limit != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); if (timePeriodStart != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "timePeriodStart", timePeriodStart)); if (timePeriodEnd != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "timePeriodEnd", timePeriodEnd)); 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.Sessions.java
License:Apache License
private com.squareup.okhttp.Call createSessionCall(SessionRequest body, 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 createSession(Async)"); }//from w ww . j a v a 2 s . c o m // create path and map variables String localVarPath = "/v1.0/session".replaceAll("\\{format\\}", "json"); 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); }