Search in sources :

Example 16 with ProgressResponseBody

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

the class AppsV1beta2Api method replaceNamespacedDaemonSetCall.

/**
 * Build call for replaceNamespacedDaemonSet
 * @param name name of the DaemonSet (required)
 * @param namespace object name and auth scope, such as for teams and projects (required)
 * @param body  (required)
 * @param pretty If 'true', then the output is pretty printed. (optional)
 * @param progressListener Progress listener
 * @param progressRequestListener Progress request listener
 * @return Call to execute
 * @throws ApiException If fail to serialize the request body object
 */
public com.squareup.okhttp.Call replaceNamespacedDaemonSetCall(String name, String namespace, V1beta2DaemonSet body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
    Object localVarPostBody = body;
    // create path and map variables
    String localVarPath = "/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}".replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())).replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    if (pretty != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null)
        localVarHeaderParams.put("Accept", localVarAccept);
    final String[] localVarContentTypes = { "*/*" };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);
    if (progressListener != null) {
        apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {

            @Override
            public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
            }
        });
    }
    String[] localVarAuthNames = new String[] { "BearerToken" };
    return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
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 17 with ProgressResponseBody

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

the class AuthenticationApi 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/authentication.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 18 with ProgressResponseBody

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

the class AuthorizationV1beta1Api method createSubjectAccessReviewCall.

/**
 * Build call for createSubjectAccessReview
 * @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 createSubjectAccessReviewCall(V1beta1SubjectAccessReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
    Object localVarPostBody = body;
    // create path and map variables
    String localVarPath = "/apis/authorization.k8s.io/v1beta1/subjectaccessreviews";
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    if (pretty != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null)
        localVarHeaderParams.put("Accept", localVarAccept);
    final String[] localVarContentTypes = { "*/*" };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);
    if (progressListener != null) {
        apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {

            @Override
            public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
            }
        });
    }
    String[] localVarAuthNames = new String[] { "BearerToken" };
    return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
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 19 with ProgressResponseBody

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

the class AuthorizationV1beta1Api method createSelfSubjectRulesReviewCall.

/**
 * Build call for createSelfSubjectRulesReview
 * @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 createSelfSubjectRulesReviewCall(V1beta1SelfSubjectRulesReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
    Object localVarPostBody = body;
    // create path and map variables
    String localVarPath = "/apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews";
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    if (pretty != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null)
        localVarHeaderParams.put("Accept", localVarAccept);
    final String[] localVarContentTypes = { "*/*" };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);
    if (progressListener != null) {
        apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {

            @Override
            public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
            }
        });
    }
    String[] localVarAuthNames = new String[] { "BearerToken" };
    return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
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 20 with ProgressResponseBody

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

the class AuthorizationV1beta1Api method createNamespacedLocalSubjectAccessReviewCall.

/**
 * Build call for createNamespacedLocalSubjectAccessReview
 * @param namespace object name and auth scope, such as for teams and projects (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 createNamespacedLocalSubjectAccessReviewCall(String namespace, V1beta1LocalSubjectAccessReview body, String pretty, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
    Object localVarPostBody = body;
    // create path and map variables
    String localVarPath = "/apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews".replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    if (pretty != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("pretty", pretty));
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null)
        localVarHeaderParams.put("Accept", localVarAccept);
    final String[] localVarContentTypes = { "*/*" };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);
    if (progressListener != null) {
        apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {

            @Override
            public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
            }
        });
    }
    String[] localVarAuthNames = new String[] { "BearerToken" };
    return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
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