Search in sources :

Example 6 with ProgressResponseBody

use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.

the class AdmissionregistrationV1alpha1Api method readExternalAdmissionHookConfigurationCall.

/**
 * Build call for readExternalAdmissionHookConfiguration
 * @param name name of the ExternalAdmissionHookConfiguration (required)
 * @param pretty If 'true', then the output is pretty printed. (optional)
 * @param exact Should the export be exact.  Exact export maintains cluster-specific fields like 'Namespace'. (optional)
 * @param export Should this value be exported.  Export strips fields that a user can not specify. (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 readExternalAdmissionHookConfigurationCall(String name, String pretty, Boolean exact, Boolean export, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
    Object localVarPostBody = null;
    // create path and map variables
    String localVarPath = "/apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations/{name}".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    if (pretty != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
    if (exact != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("exact", exact));
    if (export != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("export", export));
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null)
        localVarHeaderParams.put("Accept", localVarAccept);
    final String[] localVarContentTypes = { "*/*" };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);
    if (progressListener != null) {
        apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {

            @Override
            public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
            }
        });
    }
    String[] localVarAuthNames = new String[] { "BearerToken" };
    return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) IOException(java.io.IOException) ProgressResponseBody(io.kubernetes.client.ProgressResponseBody) ApiResponse(io.kubernetes.client.ApiResponse) Pair(io.kubernetes.client.Pair)

Example 7 with ProgressResponseBody

use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.

the class ApiextensionsV1beta1Api method readCustomResourceDefinitionCall.

/**
 * Build call for readCustomResourceDefinition
 * @param name name of the CustomResourceDefinition (required)
 * @param pretty If &#39;true&#39;, then the output is pretty printed. (optional)
 * @param exact Should the export be exact.  Exact export maintains cluster-specific fields like &#39;Namespace&#39;. (optional)
 * @param export Should this value be exported.  Export strips fields that a user can not specify. (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 readCustomResourceDefinitionCall(String name, String pretty, Boolean exact, Boolean export, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
    Object localVarPostBody = null;
    // create path and map variables
    String localVarPath = "/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    if (pretty != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
    if (exact != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("exact", exact));
    if (export != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("export", export));
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null)
        localVarHeaderParams.put("Accept", localVarAccept);
    final String[] localVarContentTypes = { "*/*" };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);
    if (progressListener != null) {
        apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {

            @Override
            public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
            }
        });
    }
    String[] localVarAuthNames = new String[] { "BearerToken" };
    return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) IOException(java.io.IOException) ProgressResponseBody(io.kubernetes.client.ProgressResponseBody) ApiResponse(io.kubernetes.client.ApiResponse) Pair(io.kubernetes.client.Pair)

Example 8 with ProgressResponseBody

use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.

the class AdmissionregistrationApi method getAPIGroupCall.

/**
 * Build call for getAPIGroup
 * @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 getAPIGroupCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
    Object localVarPostBody = null;
    // create path and map variables
    String localVarPath = "/apis/admissionregistration.k8s.io/";
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null)
        localVarHeaderParams.put("Accept", localVarAccept);
    final String[] localVarContentTypes = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    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);
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) IOException(java.io.IOException) ProgressResponseBody(io.kubernetes.client.ProgressResponseBody) ApiResponse(io.kubernetes.client.ApiResponse) Pair(io.kubernetes.client.Pair)

Example 9 with ProgressResponseBody

use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.

the class ApiregistrationV1beta1Api method readAPIServiceCall.

/**
 * Build call for readAPIService
 * @param name name of the APIService (required)
 * @param pretty If &#39;true&#39;, then the output is pretty printed. (optional)
 * @param exact Should the export be exact.  Exact export maintains cluster-specific fields like &#39;Namespace&#39;. (optional)
 * @param export Should this value be exported.  Export strips fields that a user can not specify. (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 readAPIServiceCall(String name, String pretty, Boolean exact, Boolean export, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
    Object localVarPostBody = null;
    // create path and map variables
    String localVarPath = "/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    if (pretty != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
    if (exact != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("exact", exact));
    if (export != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("export", export));
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null)
        localVarHeaderParams.put("Accept", localVarAccept);
    final String[] localVarContentTypes = { "*/*" };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);
    if (progressListener != null) {
        apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {

            @Override
            public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
            }
        });
    }
    String[] localVarAuthNames = new String[] { "BearerToken" };
    return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) IOException(java.io.IOException) ProgressResponseBody(io.kubernetes.client.ProgressResponseBody) ApiResponse(io.kubernetes.client.ApiResponse) Pair(io.kubernetes.client.Pair)

Example 10 with ProgressResponseBody

use of io.kubernetes.client.ProgressResponseBody in project java by kubernetes-client.

the class ApiregistrationV1beta1Api method patchAPIServiceCall.

/**
 * Build call for patchAPIService
 * @param name name of the APIService (required)
 * @param body  (required)
 * @param pretty If &#39;true&#39;, then the output is pretty printed. (optional)
 * @param progressListener Progress listener
 * @param progressRequestListener Progress request listener
 * @return Call to execute
 * @throws ApiException If fail to serialize the request body object
 */
public com.squareup.okhttp.Call patchAPIServiceCall(String name, Object body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
    Object localVarPostBody = body;
    // create path and map variables
    String localVarPath = "/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString()));
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    if (pretty != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null)
        localVarHeaderParams.put("Accept", localVarAccept);
    final String[] localVarContentTypes = { "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json" };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);
    if (progressListener != null) {
        apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {

            @Override
            public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
            }
        });
    }
    String[] localVarAuthNames = new String[] { "BearerToken" };
    return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) IOException(java.io.IOException) ProgressResponseBody(io.kubernetes.client.ProgressResponseBody) ApiResponse(io.kubernetes.client.ApiResponse) Pair(io.kubernetes.client.Pair)

Aggregations

ApiResponse (io.kubernetes.client.ApiResponse)707 Pair (io.kubernetes.client.Pair)707 ProgressResponseBody (io.kubernetes.client.ProgressResponseBody)707 IOException (java.io.IOException)707 ArrayList (java.util.ArrayList)707 HashMap (java.util.HashMap)707