use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.
the class CoreV1Api method replaceNamespaceCall.
/**
* Build call for replaceNamespace
* @param name name of the Namespace (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 replaceNamespaceCall(String name, V1Namespace 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/{name}".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 = { "*/*" };
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 proxyOPTIONSNamespacedServiceWithPathCall.
/**
* Build call for proxyOPTIONSNamespacedServiceWithPath
* @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 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 proxyOPTIONSNamespacedServiceWithPathCall(String name, String namespace, String path, 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}/{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>();
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, "OPTIONS", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.
the class CoreV1Api method patchNamespaceCall.
/**
* Build call for patchNamespace
* @param name name of the Namespace (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 patchNamespaceCall(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/namespaces/{name}".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);
}
use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.
the class CoreV1Api method createNamespacedConfigMapCall.
/**
* Build call for createNamespacedConfigMap
* @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 createNamespacedConfigMapCall(String namespace, V1ConfigMap 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}/configmaps".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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.
the class CoreV1Api method replaceNamespacedPersistentVolumeClaimStatusCall.
/**
* Build call for replaceNamespacedPersistentVolumeClaimStatus
* @param name name of the PersistentVolumeClaim (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 replaceNamespacedPersistentVolumeClaimStatusCall(String name, String namespace, V1PersistentVolumeClaim 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}/persistentvolumeclaims/{name}/status".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);
}
Aggregations