Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Kubernetes
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.11.1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.kubernetes.client.apis;
import io.kubernetes.client.ApiCallback;
import io.kubernetes.client.ApiClient;
import io.kubernetes.client.ApiException;
import io.kubernetes.client.ApiResponse;
import io.kubernetes.client.Configuration;
import io.kubernetes.client.Pair;
import io.kubernetes.client.ProgressRequestBody;
import io.kubernetes.client.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import io.kubernetes.client.models.V1APIResourceList;
import io.kubernetes.client.models.V1Binding;
import io.kubernetes.client.models.V1ComponentStatus;
import io.kubernetes.client.models.V1ComponentStatusList;
import io.kubernetes.client.models.V1ConfigMap;
import io.kubernetes.client.models.V1ConfigMapList;
import io.kubernetes.client.models.V1DeleteOptions;
import io.kubernetes.client.models.V1Endpoints;
import io.kubernetes.client.models.V1EndpointsList;
import io.kubernetes.client.models.V1Event;
import io.kubernetes.client.models.V1EventList;
import io.kubernetes.client.models.V1LimitRange;
import io.kubernetes.client.models.V1LimitRangeList;
import io.kubernetes.client.models.V1Namespace;
import io.kubernetes.client.models.V1NamespaceList;
import io.kubernetes.client.models.V1Node;
import io.kubernetes.client.models.V1NodeList;
import io.kubernetes.client.models.V1PersistentVolume;
import io.kubernetes.client.models.V1PersistentVolumeClaim;
import io.kubernetes.client.models.V1PersistentVolumeClaimList;
import io.kubernetes.client.models.V1PersistentVolumeList;
import io.kubernetes.client.models.V1Pod;
import io.kubernetes.client.models.V1PodList;
import io.kubernetes.client.models.V1PodTemplate;
import io.kubernetes.client.models.V1PodTemplateList;
import io.kubernetes.client.models.V1ReplicationController;
import io.kubernetes.client.models.V1ReplicationControllerList;
import io.kubernetes.client.models.V1ResourceQuota;
import io.kubernetes.client.models.V1ResourceQuotaList;
import io.kubernetes.client.models.V1Scale;
import io.kubernetes.client.models.V1Secret;
import io.kubernetes.client.models.V1SecretList;
import io.kubernetes.client.models.V1Service;
import io.kubernetes.client.models.V1ServiceAccount;
import io.kubernetes.client.models.V1ServiceAccountList;
import io.kubernetes.client.models.V1ServiceList;
import io.kubernetes.client.models.V1Status;
import io.kubernetes.client.models.V1beta1Eviction;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CoreV1Api {
private ApiClient apiClient;
public CoreV1Api() {
this(Configuration.getDefaultApiClient());
}
public CoreV1Api(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Build call for connectDeleteNamespacedPodProxy
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (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 connectDeleteNamespacedPodProxyCall(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/namespaces/{namespace}/pods/{name}/proxy"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectDeleteNamespacedPodProxyValidateBeforeCall(String name, String namespace, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectDeleteNamespacedPodProxy(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectDeleteNamespacedPodProxy(Async)");
}
com.squareup.okhttp.Call call = connectDeleteNamespacedPodProxyCall(name, namespace, path, progressListener, progressRequestListener);
return call;
}
/**
*
* connect DELETE requests to proxy of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectDeleteNamespacedPodProxy(String name, String namespace, String path) throws ApiException {
ApiResponse resp = connectDeleteNamespacedPodProxyWithHttpInfo(name, namespace, path);
return resp.getData();
}
/**
*
* connect DELETE requests to proxy of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectDeleteNamespacedPodProxyWithHttpInfo(String name, String namespace, String path) throws ApiException {
com.squareup.okhttp.Call call = connectDeleteNamespacedPodProxyValidateBeforeCall(name, namespace, path, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect DELETE requests to proxy of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectDeleteNamespacedPodProxyAsync(String name, String namespace, String path, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectDeleteNamespacedPodProxyValidateBeforeCall(name, namespace, path, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectDeleteNamespacedPodProxyWithPath
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (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 connectDeleteNamespacedPodProxyWithPathCall(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}/pods/{name}/proxy/{path}"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()))
.replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path2));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectDeleteNamespacedPodProxyWithPathValidateBeforeCall(String name, String namespace, String path, String path2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectDeleteNamespacedPodProxyWithPath(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectDeleteNamespacedPodProxyWithPath(Async)");
}
// verify the required parameter 'path' is set
if (path == null) {
throw new ApiException("Missing the required parameter 'path' when calling connectDeleteNamespacedPodProxyWithPath(Async)");
}
com.squareup.okhttp.Call call = connectDeleteNamespacedPodProxyWithPathCall(name, namespace, path, path2, progressListener, progressRequestListener);
return call;
}
/**
*
* connect DELETE requests to proxy of Pod
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectDeleteNamespacedPodProxyWithPath(String name, String namespace, String path, String path2) throws ApiException {
ApiResponse resp = connectDeleteNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2);
return resp.getData();
}
/**
*
* connect DELETE requests to proxy of Pod
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectDeleteNamespacedPodProxyWithPathWithHttpInfo(String name, String namespace, String path, String path2) throws ApiException {
com.squareup.okhttp.Call call = connectDeleteNamespacedPodProxyWithPathValidateBeforeCall(name, namespace, path, path2, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect DELETE requests to proxy of Pod
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectDeleteNamespacedPodProxyWithPathAsync(String name, String namespace, String path, String path2, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectDeleteNamespacedPodProxyWithPathValidateBeforeCall(name, namespace, path, path2, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectDeleteNamespacedServiceProxy
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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 connectDeleteNamespacedServiceProxyCall(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/namespaces/{namespace}/services/{name}/proxy"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectDeleteNamespacedServiceProxyValidateBeforeCall(String name, String namespace, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectDeleteNamespacedServiceProxy(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectDeleteNamespacedServiceProxy(Async)");
}
com.squareup.okhttp.Call call = connectDeleteNamespacedServiceProxyCall(name, namespace, path, progressListener, progressRequestListener);
return call;
}
/**
*
* connect DELETE requests to proxy of Service
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectDeleteNamespacedServiceProxy(String name, String namespace, String path) throws ApiException {
ApiResponse resp = connectDeleteNamespacedServiceProxyWithHttpInfo(name, namespace, path);
return resp.getData();
}
/**
*
* connect DELETE requests to proxy of Service
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectDeleteNamespacedServiceProxyWithHttpInfo(String name, String namespace, String path) throws ApiException {
com.squareup.okhttp.Call call = connectDeleteNamespacedServiceProxyValidateBeforeCall(name, namespace, path, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect DELETE requests to proxy of Service
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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 callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectDeleteNamespacedServiceProxyAsync(String name, String namespace, String path, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectDeleteNamespacedServiceProxyValidateBeforeCall(name, namespace, path, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* 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 localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path2));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectDeleteNamespacedServiceProxyWithPathValidateBeforeCall(String name, String namespace, String path, String path2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectDeleteNamespacedServiceProxyWithPath(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectDeleteNamespacedServiceProxyWithPath(Async)");
}
// verify the required parameter 'path' is set
if (path == null) {
throw new ApiException("Missing the required parameter 'path' when calling connectDeleteNamespacedServiceProxyWithPath(Async)");
}
com.squareup.okhttp.Call call = connectDeleteNamespacedServiceProxyWithPathCall(name, namespace, path, path2, progressListener, progressRequestListener);
return call;
}
/**
*
* connect DELETE requests to proxy of Service
* @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)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectDeleteNamespacedServiceProxyWithPath(String name, String namespace, String path, String path2) throws ApiException {
ApiResponse resp = connectDeleteNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2);
return resp.getData();
}
/**
*
* connect DELETE requests to proxy of Service
* @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)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectDeleteNamespacedServiceProxyWithPathWithHttpInfo(String name, String namespace, String path, String path2) throws ApiException {
com.squareup.okhttp.Call call = connectDeleteNamespacedServiceProxyWithPathValidateBeforeCall(name, namespace, path, path2, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect DELETE requests to proxy of Service
* @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 callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectDeleteNamespacedServiceProxyWithPathAsync(String name, String namespace, String path, String path2, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectDeleteNamespacedServiceProxyWithPathValidateBeforeCall(name, namespace, path, path2, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectDeleteNodeProxy
* @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 connectDeleteNodeProxyCall(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 localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectDeleteNodeProxyValidateBeforeCall(String name, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectDeleteNodeProxy(Async)");
}
com.squareup.okhttp.Call call = connectDeleteNodeProxyCall(name, path, progressListener, progressRequestListener);
return call;
}
/**
*
* connect DELETE requests to proxy of Node
* @param name name of the Node (required)
* @param path Path is the URL path to use for the current proxy request to node. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectDeleteNodeProxy(String name, String path) throws ApiException {
ApiResponse resp = connectDeleteNodeProxyWithHttpInfo(name, path);
return resp.getData();
}
/**
*
* connect DELETE requests to proxy of Node
* @param name name of the Node (required)
* @param path Path is the URL path to use for the current proxy request to node. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectDeleteNodeProxyWithHttpInfo(String name, String path) throws ApiException {
com.squareup.okhttp.Call call = connectDeleteNodeProxyValidateBeforeCall(name, path, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect DELETE requests to proxy of Node
* @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 callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectDeleteNodeProxyAsync(String name, String path, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectDeleteNodeProxyValidateBeforeCall(name, path, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectDeleteNodeProxyWithPath
* @param name name of the Node (required)
* @param path path to the resource (required)
* @param path2 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 connectDeleteNodeProxyWithPathCall(String name, 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/nodes/{name}/proxy/{path}"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path2));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectDeleteNodeProxyWithPathValidateBeforeCall(String name, String path, String path2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectDeleteNodeProxyWithPath(Async)");
}
// verify the required parameter 'path' is set
if (path == null) {
throw new ApiException("Missing the required parameter 'path' when calling connectDeleteNodeProxyWithPath(Async)");
}
com.squareup.okhttp.Call call = connectDeleteNodeProxyWithPathCall(name, path, path2, progressListener, progressRequestListener);
return call;
}
/**
*
* connect DELETE requests to proxy of Node
* @param name name of the Node (required)
* @param path path to the resource (required)
* @param path2 Path is the URL path to use for the current proxy request to node. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectDeleteNodeProxyWithPath(String name, String path, String path2) throws ApiException {
ApiResponse resp = connectDeleteNodeProxyWithPathWithHttpInfo(name, path, path2);
return resp.getData();
}
/**
*
* connect DELETE requests to proxy of Node
* @param name name of the Node (required)
* @param path path to the resource (required)
* @param path2 Path is the URL path to use for the current proxy request to node. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectDeleteNodeProxyWithPathWithHttpInfo(String name, String path, String path2) throws ApiException {
com.squareup.okhttp.Call call = connectDeleteNodeProxyWithPathValidateBeforeCall(name, path, path2, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect DELETE requests to proxy of Node
* @param name name of the Node (required)
* @param path path to the resource (required)
* @param path2 Path is the URL path to use for the current proxy request to node. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectDeleteNodeProxyWithPathAsync(String name, String path, String path2, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectDeleteNodeProxyWithPathValidateBeforeCall(name, path, path2, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectGetNamespacedPodAttach
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod. (optional)
* @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. (optional)
* @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. (optional)
* @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. (optional)
* @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. (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 connectGetNamespacedPodAttachCall(String name, String namespace, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/namespaces/{namespace}/pods/{name}/attach"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (container != null)
localVarQueryParams.addAll(apiClient.parameterToPair("container", container));
if (stderr != null)
localVarQueryParams.addAll(apiClient.parameterToPair("stderr", stderr));
if (stdin != null)
localVarQueryParams.addAll(apiClient.parameterToPair("stdin", stdin));
if (stdout != null)
localVarQueryParams.addAll(apiClient.parameterToPair("stdout", stdout));
if (tty != null)
localVarQueryParams.addAll(apiClient.parameterToPair("tty", tty));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectGetNamespacedPodAttachValidateBeforeCall(String name, String namespace, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectGetNamespacedPodAttach(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectGetNamespacedPodAttach(Async)");
}
com.squareup.okhttp.Call call = connectGetNamespacedPodAttachCall(name, namespace, container, stderr, stdin, stdout, tty, progressListener, progressRequestListener);
return call;
}
/**
*
* connect GET requests to attach of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod. (optional)
* @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. (optional)
* @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. (optional)
* @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. (optional)
* @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectGetNamespacedPodAttach(String name, String namespace, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty) throws ApiException {
ApiResponse resp = connectGetNamespacedPodAttachWithHttpInfo(name, namespace, container, stderr, stdin, stdout, tty);
return resp.getData();
}
/**
*
* connect GET requests to attach of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod. (optional)
* @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. (optional)
* @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. (optional)
* @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. (optional)
* @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectGetNamespacedPodAttachWithHttpInfo(String name, String namespace, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty) throws ApiException {
com.squareup.okhttp.Call call = connectGetNamespacedPodAttachValidateBeforeCall(name, namespace, container, stderr, stdin, stdout, tty, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect GET requests to attach of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod. (optional)
* @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. (optional)
* @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. (optional)
* @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. (optional)
* @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectGetNamespacedPodAttachAsync(String name, String namespace, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectGetNamespacedPodAttachValidateBeforeCall(name, namespace, container, stderr, stdin, stdout, tty, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectGetNamespacedPodExec
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param command Command is the remote command to execute. argv array. Not executed within a shell. (optional)
* @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod. (optional)
* @param stderr Redirect the standard error stream of the pod for this call. Defaults to true. (optional)
* @param stdin Redirect the standard input stream of the pod for this call. Defaults to false. (optional)
* @param stdout Redirect the standard output stream of the pod for this call. Defaults to true. (optional)
* @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. (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 connectGetNamespacedPodExecCall(String name, String namespace, String command, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/namespaces/{namespace}/pods/{name}/exec"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (command != null)
localVarQueryParams.addAll(apiClient.parameterToPair("command", command));
if (container != null)
localVarQueryParams.addAll(apiClient.parameterToPair("container", container));
if (stderr != null)
localVarQueryParams.addAll(apiClient.parameterToPair("stderr", stderr));
if (stdin != null)
localVarQueryParams.addAll(apiClient.parameterToPair("stdin", stdin));
if (stdout != null)
localVarQueryParams.addAll(apiClient.parameterToPair("stdout", stdout));
if (tty != null)
localVarQueryParams.addAll(apiClient.parameterToPair("tty", tty));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectGetNamespacedPodExecValidateBeforeCall(String name, String namespace, String command, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectGetNamespacedPodExec(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectGetNamespacedPodExec(Async)");
}
com.squareup.okhttp.Call call = connectGetNamespacedPodExecCall(name, namespace, command, container, stderr, stdin, stdout, tty, progressListener, progressRequestListener);
return call;
}
/**
*
* connect GET requests to exec of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param command Command is the remote command to execute. argv array. Not executed within a shell. (optional)
* @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod. (optional)
* @param stderr Redirect the standard error stream of the pod for this call. Defaults to true. (optional)
* @param stdin Redirect the standard input stream of the pod for this call. Defaults to false. (optional)
* @param stdout Redirect the standard output stream of the pod for this call. Defaults to true. (optional)
* @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectGetNamespacedPodExec(String name, String namespace, String command, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty) throws ApiException {
ApiResponse resp = connectGetNamespacedPodExecWithHttpInfo(name, namespace, command, container, stderr, stdin, stdout, tty);
return resp.getData();
}
/**
*
* connect GET requests to exec of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param command Command is the remote command to execute. argv array. Not executed within a shell. (optional)
* @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod. (optional)
* @param stderr Redirect the standard error stream of the pod for this call. Defaults to true. (optional)
* @param stdin Redirect the standard input stream of the pod for this call. Defaults to false. (optional)
* @param stdout Redirect the standard output stream of the pod for this call. Defaults to true. (optional)
* @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectGetNamespacedPodExecWithHttpInfo(String name, String namespace, String command, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty) throws ApiException {
com.squareup.okhttp.Call call = connectGetNamespacedPodExecValidateBeforeCall(name, namespace, command, container, stderr, stdin, stdout, tty, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect GET requests to exec of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param command Command is the remote command to execute. argv array. Not executed within a shell. (optional)
* @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod. (optional)
* @param stderr Redirect the standard error stream of the pod for this call. Defaults to true. (optional)
* @param stdin Redirect the standard input stream of the pod for this call. Defaults to false. (optional)
* @param stdout Redirect the standard output stream of the pod for this call. Defaults to true. (optional)
* @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectGetNamespacedPodExecAsync(String name, String namespace, String command, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectGetNamespacedPodExecValidateBeforeCall(name, namespace, command, container, stderr, stdin, stdout, tty, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectGetNamespacedPodPortforward
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param ports List of ports to forward Required when using WebSockets (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 connectGetNamespacedPodPortforwardCall(String name, String namespace, Integer ports, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/namespaces/{namespace}/pods/{name}/portforward"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (ports != null)
localVarQueryParams.addAll(apiClient.parameterToPair("ports", ports));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectGetNamespacedPodPortforwardValidateBeforeCall(String name, String namespace, Integer ports, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectGetNamespacedPodPortforward(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectGetNamespacedPodPortforward(Async)");
}
com.squareup.okhttp.Call call = connectGetNamespacedPodPortforwardCall(name, namespace, ports, progressListener, progressRequestListener);
return call;
}
/**
*
* connect GET requests to portforward of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param ports List of ports to forward Required when using WebSockets (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectGetNamespacedPodPortforward(String name, String namespace, Integer ports) throws ApiException {
ApiResponse resp = connectGetNamespacedPodPortforwardWithHttpInfo(name, namespace, ports);
return resp.getData();
}
/**
*
* connect GET requests to portforward of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param ports List of ports to forward Required when using WebSockets (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectGetNamespacedPodPortforwardWithHttpInfo(String name, String namespace, Integer ports) throws ApiException {
com.squareup.okhttp.Call call = connectGetNamespacedPodPortforwardValidateBeforeCall(name, namespace, ports, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect GET requests to portforward of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param ports List of ports to forward Required when using WebSockets (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectGetNamespacedPodPortforwardAsync(String name, String namespace, Integer ports, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectGetNamespacedPodPortforwardValidateBeforeCall(name, namespace, ports, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectGetNamespacedPodProxy
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (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 connectGetNamespacedPodProxyCall(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/namespaces/{namespace}/pods/{name}/proxy"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectGetNamespacedPodProxyValidateBeforeCall(String name, String namespace, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectGetNamespacedPodProxy(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectGetNamespacedPodProxy(Async)");
}
com.squareup.okhttp.Call call = connectGetNamespacedPodProxyCall(name, namespace, path, progressListener, progressRequestListener);
return call;
}
/**
*
* connect GET requests to proxy of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectGetNamespacedPodProxy(String name, String namespace, String path) throws ApiException {
ApiResponse resp = connectGetNamespacedPodProxyWithHttpInfo(name, namespace, path);
return resp.getData();
}
/**
*
* connect GET requests to proxy of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectGetNamespacedPodProxyWithHttpInfo(String name, String namespace, String path) throws ApiException {
com.squareup.okhttp.Call call = connectGetNamespacedPodProxyValidateBeforeCall(name, namespace, path, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect GET requests to proxy of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectGetNamespacedPodProxyAsync(String name, String namespace, String path, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectGetNamespacedPodProxyValidateBeforeCall(name, namespace, path, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectGetNamespacedPodProxyWithPath
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (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 connectGetNamespacedPodProxyWithPathCall(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}/pods/{name}/proxy/{path}"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()))
.replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path2));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectGetNamespacedPodProxyWithPathValidateBeforeCall(String name, String namespace, String path, String path2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectGetNamespacedPodProxyWithPath(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectGetNamespacedPodProxyWithPath(Async)");
}
// verify the required parameter 'path' is set
if (path == null) {
throw new ApiException("Missing the required parameter 'path' when calling connectGetNamespacedPodProxyWithPath(Async)");
}
com.squareup.okhttp.Call call = connectGetNamespacedPodProxyWithPathCall(name, namespace, path, path2, progressListener, progressRequestListener);
return call;
}
/**
*
* connect GET requests to proxy of Pod
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectGetNamespacedPodProxyWithPath(String name, String namespace, String path, String path2) throws ApiException {
ApiResponse resp = connectGetNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2);
return resp.getData();
}
/**
*
* connect GET requests to proxy of Pod
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectGetNamespacedPodProxyWithPathWithHttpInfo(String name, String namespace, String path, String path2) throws ApiException {
com.squareup.okhttp.Call call = connectGetNamespacedPodProxyWithPathValidateBeforeCall(name, namespace, path, path2, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect GET requests to proxy of Pod
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectGetNamespacedPodProxyWithPathAsync(String name, String namespace, String path, String path2, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectGetNamespacedPodProxyWithPathValidateBeforeCall(name, namespace, path, path2, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectGetNamespacedServiceProxy
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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 connectGetNamespacedServiceProxyCall(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/namespaces/{namespace}/services/{name}/proxy"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectGetNamespacedServiceProxyValidateBeforeCall(String name, String namespace, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectGetNamespacedServiceProxy(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectGetNamespacedServiceProxy(Async)");
}
com.squareup.okhttp.Call call = connectGetNamespacedServiceProxyCall(name, namespace, path, progressListener, progressRequestListener);
return call;
}
/**
*
* connect GET requests to proxy of Service
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectGetNamespacedServiceProxy(String name, String namespace, String path) throws ApiException {
ApiResponse resp = connectGetNamespacedServiceProxyWithHttpInfo(name, namespace, path);
return resp.getData();
}
/**
*
* connect GET requests to proxy of Service
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectGetNamespacedServiceProxyWithHttpInfo(String name, String namespace, String path) throws ApiException {
com.squareup.okhttp.Call call = connectGetNamespacedServiceProxyValidateBeforeCall(name, namespace, path, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect GET requests to proxy of Service
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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 callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectGetNamespacedServiceProxyAsync(String name, String namespace, String path, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectGetNamespacedServiceProxyValidateBeforeCall(name, namespace, path, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectGetNamespacedServiceProxyWithPath
* @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 connectGetNamespacedServiceProxyWithPathCall(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 localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path2));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectGetNamespacedServiceProxyWithPathValidateBeforeCall(String name, String namespace, String path, String path2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectGetNamespacedServiceProxyWithPath(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectGetNamespacedServiceProxyWithPath(Async)");
}
// verify the required parameter 'path' is set
if (path == null) {
throw new ApiException("Missing the required parameter 'path' when calling connectGetNamespacedServiceProxyWithPath(Async)");
}
com.squareup.okhttp.Call call = connectGetNamespacedServiceProxyWithPathCall(name, namespace, path, path2, progressListener, progressRequestListener);
return call;
}
/**
*
* connect GET requests to proxy of Service
* @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)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectGetNamespacedServiceProxyWithPath(String name, String namespace, String path, String path2) throws ApiException {
ApiResponse resp = connectGetNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2);
return resp.getData();
}
/**
*
* connect GET requests to proxy of Service
* @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)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectGetNamespacedServiceProxyWithPathWithHttpInfo(String name, String namespace, String path, String path2) throws ApiException {
com.squareup.okhttp.Call call = connectGetNamespacedServiceProxyWithPathValidateBeforeCall(name, namespace, path, path2, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect GET requests to proxy of Service
* @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 callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectGetNamespacedServiceProxyWithPathAsync(String name, String namespace, String path, String path2, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectGetNamespacedServiceProxyWithPathValidateBeforeCall(name, namespace, path, path2, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectGetNodeProxy
* @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 connectGetNodeProxyCall(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 localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectGetNodeProxyValidateBeforeCall(String name, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectGetNodeProxy(Async)");
}
com.squareup.okhttp.Call call = connectGetNodeProxyCall(name, path, progressListener, progressRequestListener);
return call;
}
/**
*
* connect GET requests to proxy of Node
* @param name name of the Node (required)
* @param path Path is the URL path to use for the current proxy request to node. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectGetNodeProxy(String name, String path) throws ApiException {
ApiResponse resp = connectGetNodeProxyWithHttpInfo(name, path);
return resp.getData();
}
/**
*
* connect GET requests to proxy of Node
* @param name name of the Node (required)
* @param path Path is the URL path to use for the current proxy request to node. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectGetNodeProxyWithHttpInfo(String name, String path) throws ApiException {
com.squareup.okhttp.Call call = connectGetNodeProxyValidateBeforeCall(name, path, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect GET requests to proxy of Node
* @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 callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectGetNodeProxyAsync(String name, String path, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectGetNodeProxyValidateBeforeCall(name, path, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectGetNodeProxyWithPath
* @param name name of the Node (required)
* @param path path to the resource (required)
* @param path2 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 connectGetNodeProxyWithPathCall(String name, 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/nodes/{name}/proxy/{path}"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path2));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectGetNodeProxyWithPathValidateBeforeCall(String name, String path, String path2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectGetNodeProxyWithPath(Async)");
}
// verify the required parameter 'path' is set
if (path == null) {
throw new ApiException("Missing the required parameter 'path' when calling connectGetNodeProxyWithPath(Async)");
}
com.squareup.okhttp.Call call = connectGetNodeProxyWithPathCall(name, path, path2, progressListener, progressRequestListener);
return call;
}
/**
*
* connect GET requests to proxy of Node
* @param name name of the Node (required)
* @param path path to the resource (required)
* @param path2 Path is the URL path to use for the current proxy request to node. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectGetNodeProxyWithPath(String name, String path, String path2) throws ApiException {
ApiResponse resp = connectGetNodeProxyWithPathWithHttpInfo(name, path, path2);
return resp.getData();
}
/**
*
* connect GET requests to proxy of Node
* @param name name of the Node (required)
* @param path path to the resource (required)
* @param path2 Path is the URL path to use for the current proxy request to node. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectGetNodeProxyWithPathWithHttpInfo(String name, String path, String path2) throws ApiException {
com.squareup.okhttp.Call call = connectGetNodeProxyWithPathValidateBeforeCall(name, path, path2, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect GET requests to proxy of Node
* @param name name of the Node (required)
* @param path path to the resource (required)
* @param path2 Path is the URL path to use for the current proxy request to node. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectGetNodeProxyWithPathAsync(String name, String path, String path2, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectGetNodeProxyWithPathValidateBeforeCall(name, path, path2, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectHeadNamespacedPodProxy
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (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 connectHeadNamespacedPodProxyCall(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/namespaces/{namespace}/pods/{name}/proxy"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectHeadNamespacedPodProxyValidateBeforeCall(String name, String namespace, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectHeadNamespacedPodProxy(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectHeadNamespacedPodProxy(Async)");
}
com.squareup.okhttp.Call call = connectHeadNamespacedPodProxyCall(name, namespace, path, progressListener, progressRequestListener);
return call;
}
/**
*
* connect HEAD requests to proxy of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectHeadNamespacedPodProxy(String name, String namespace, String path) throws ApiException {
ApiResponse resp = connectHeadNamespacedPodProxyWithHttpInfo(name, namespace, path);
return resp.getData();
}
/**
*
* connect HEAD requests to proxy of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectHeadNamespacedPodProxyWithHttpInfo(String name, String namespace, String path) throws ApiException {
com.squareup.okhttp.Call call = connectHeadNamespacedPodProxyValidateBeforeCall(name, namespace, path, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect HEAD requests to proxy of Pod
* @param name name of the Pod (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path Path is the URL path to use for the current proxy request to pod. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectHeadNamespacedPodProxyAsync(String name, String namespace, String path, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectHeadNamespacedPodProxyValidateBeforeCall(name, namespace, path, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectHeadNamespacedPodProxyWithPath
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (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 connectHeadNamespacedPodProxyWithPathCall(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}/pods/{name}/proxy/{path}"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()))
.replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path2));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectHeadNamespacedPodProxyWithPathValidateBeforeCall(String name, String namespace, String path, String path2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectHeadNamespacedPodProxyWithPath(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectHeadNamespacedPodProxyWithPath(Async)");
}
// verify the required parameter 'path' is set
if (path == null) {
throw new ApiException("Missing the required parameter 'path' when calling connectHeadNamespacedPodProxyWithPath(Async)");
}
com.squareup.okhttp.Call call = connectHeadNamespacedPodProxyWithPathCall(name, namespace, path, path2, progressListener, progressRequestListener);
return call;
}
/**
*
* connect HEAD requests to proxy of Pod
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectHeadNamespacedPodProxyWithPath(String name, String namespace, String path, String path2) throws ApiException {
ApiResponse resp = connectHeadNamespacedPodProxyWithPathWithHttpInfo(name, namespace, path, path2);
return resp.getData();
}
/**
*
* connect HEAD requests to proxy of Pod
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectHeadNamespacedPodProxyWithPathWithHttpInfo(String name, String namespace, String path, String path2) throws ApiException {
com.squareup.okhttp.Call call = connectHeadNamespacedPodProxyWithPathValidateBeforeCall(name, namespace, path, path2, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect HEAD requests to proxy of Pod
* @param name name of the Pod (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 URL path to use for the current proxy request to pod. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectHeadNamespacedPodProxyWithPathAsync(String name, String namespace, String path, String path2, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectHeadNamespacedPodProxyWithPathValidateBeforeCall(name, namespace, path, path2, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectHeadNamespacedServiceProxy
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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 connectHeadNamespacedServiceProxyCall(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/namespaces/{namespace}/services/{name}/proxy"
.replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()))
.replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectHeadNamespacedServiceProxyValidateBeforeCall(String name, String namespace, String path, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectHeadNamespacedServiceProxy(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectHeadNamespacedServiceProxy(Async)");
}
com.squareup.okhttp.Call call = connectHeadNamespacedServiceProxyCall(name, namespace, path, progressListener, progressRequestListener);
return call;
}
/**
*
* connect HEAD requests to proxy of Service
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectHeadNamespacedServiceProxy(String name, String namespace, String path) throws ApiException {
ApiResponse resp = connectHeadNamespacedServiceProxyWithHttpInfo(name, namespace, path);
return resp.getData();
}
/**
*
* connect HEAD requests to proxy of Service
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectHeadNamespacedServiceProxyWithHttpInfo(String name, String namespace, String path) throws ApiException {
com.squareup.okhttp.Call call = connectHeadNamespacedServiceProxyValidateBeforeCall(name, namespace, path, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect HEAD requests to proxy of Service
* @param name name of the Service (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param path 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 callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectHeadNamespacedServiceProxyAsync(String name, String namespace, String path, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectHeadNamespacedServiceProxyValidateBeforeCall(name, namespace, path, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for connectHeadNamespacedServiceProxyWithPath
* @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 connectHeadNamespacedServiceProxyWithPathCall(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 localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (path2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("path", path2));
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
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);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call connectHeadNamespacedServiceProxyWithPathValidateBeforeCall(String name, String namespace, String path, String path2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'name' is set
if (name == null) {
throw new ApiException("Missing the required parameter 'name' when calling connectHeadNamespacedServiceProxyWithPath(Async)");
}
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling connectHeadNamespacedServiceProxyWithPath(Async)");
}
// verify the required parameter 'path' is set
if (path == null) {
throw new ApiException("Missing the required parameter 'path' when calling connectHeadNamespacedServiceProxyWithPath(Async)");
}
com.squareup.okhttp.Call call = connectHeadNamespacedServiceProxyWithPathCall(name, namespace, path, path2, progressListener, progressRequestListener);
return call;
}
/**
*
* connect HEAD requests to proxy of Service
* @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)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public String connectHeadNamespacedServiceProxyWithPath(String name, String namespace, String path, String path2) throws ApiException {
ApiResponse resp = connectHeadNamespacedServiceProxyWithPathWithHttpInfo(name, namespace, path, path2);
return resp.getData();
}
/**
*
* connect HEAD requests to proxy of Service
* @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)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse connectHeadNamespacedServiceProxyWithPathWithHttpInfo(String name, String namespace, String path, String path2) throws ApiException {
com.squareup.okhttp.Call call = connectHeadNamespacedServiceProxyWithPathValidateBeforeCall(name, namespace, path, path2, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* (asynchronously)
* connect HEAD requests to proxy of Service
* @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 callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call connectHeadNamespacedServiceProxyWithPathAsync(String name, String namespace, String path, String path2, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = connectHeadNamespacedServiceProxyWithPathValidateBeforeCall(name, namespace, path, path2, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* 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 localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList