use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.
the class CoreV1Api method proxyDELETENamespacedServiceCall.
/**
* Build call for proxyDELETENamespacedService
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call proxyDELETENamespacedServiceCall(String name, String namespace, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/proxy/namespaces/{namespace}/services/{name}".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())).replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = 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[] { "BearerToken" };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.
the class CoreV1Api method connectDeleteNamespacedServiceProxyWithPathCall.
/**
* Build call for connectDeleteNamespacedServiceProxyWithPath
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path path to the resource (required)
* @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call connectDeleteNamespacedServiceProxyWithPathCall(String name, String namespace, String path, String path2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())).replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString())).replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
if (path2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path2));
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[] { "BearerToken" };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.
the class CoreV1Api method replaceNamespacedPodTemplateCall.
/**
* Build call for replaceNamespacedPodTemplate
* @param name name of the PodTemplate (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param body (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call replaceNamespacedPodTemplateCall(String name, String namespace, V1PodTemplate body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/api/v1/namespaces/{namespace}/podtemplates/{name}".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())).replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
if (pretty != null)
localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
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[] { "BearerToken" };
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.
the class CoreV1Api method connectHeadNodeProxyCall.
/**
* Build call for connectHeadNodeProxy
* @param name name of the Node (required)
* @param path Path is the URL path to use for the current proxy request to node. (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call connectHeadNodeProxyCall(String name, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/nodes/{name}/proxy".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
if (path != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path));
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[] { "BearerToken" };
return apiClient.buildCall(localVarPath, "HEAD", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.
the class CoreV1Api method patchNodeStatusCall.
/**
* Build call for patchNodeStatus
* @param name name of the Node (required)
* @param body (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call patchNodeStatusCall(String name, Object body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/api/v1/nodes/{name}/status".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
if (pretty != null)
localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null)
localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = { "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+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[] { "BearerToken" };
return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
Aggregations