All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.kubernetes.client.openapi.apis.AdmissionregistrationV1Api Maven / Gradle / Ivy

The newest version!
/*
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package io.kubernetes.client.openapi.apis;

import io.kubernetes.client.openapi.ApiCallback;
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.ApiResponse;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.Pair;
import io.kubernetes.client.openapi.ProgressRequestBody;
import io.kubernetes.client.openapi.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import io.kubernetes.client.openapi.models.V1APIResourceList;
import io.kubernetes.client.openapi.models.V1DeleteOptions;
import io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration;
import io.kubernetes.client.openapi.models.V1MutatingWebhookConfigurationList;
import io.kubernetes.client.custom.V1Patch;
import io.kubernetes.client.openapi.models.V1Status;
import io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicy;
import io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicyBinding;
import io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicyBindingList;
import io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicyList;
import io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration;
import io.kubernetes.client.openapi.models.V1ValidatingWebhookConfigurationList;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AdmissionregistrationV1Api {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public AdmissionregistrationV1Api() {
        this(Configuration.getDefaultApiClient());
    }

    public AdmissionregistrationV1Api(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    private okhttp3.Call createMutatingWebhookConfigurationCall(V1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        if (pretty != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));
        }

        if (dryRun != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun));
        }

        if (fieldManager != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager));
        }

        if (fieldValidation != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation));
        }

        final String[] localVarAccepts = {
            "application/json",
            "application/yaml",
            "application/vnd.kubernetes.protobuf"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "BearerToken" };
        return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call createMutatingWebhookConfigurationValidateBeforeCall(V1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'body' is set
        if (body == null) {
            throw new ApiException("Missing the required parameter 'body' when calling createMutatingWebhookConfiguration(Async)");
        }

        return createMutatingWebhookConfigurationCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback);

    }


    private ApiResponse createMutatingWebhookConfigurationWithHttpInfo(V1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException {
        okhttp3.Call localVarCall = createMutatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call createMutatingWebhookConfigurationAsync(V1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException {

        okhttp3.Call localVarCall = createMutatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback);
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class APIcreateMutatingWebhookConfigurationRequest {
        private final V1MutatingWebhookConfiguration body;
        private String pretty;
        private String dryRun;
        private String fieldManager;
        private String fieldValidation;

        private APIcreateMutatingWebhookConfigurationRequest(V1MutatingWebhookConfiguration body) {
            this.body = body;
        }

        /**
         * Set pretty
         * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
         * @return APIcreateMutatingWebhookConfigurationRequest
         */
        public APIcreateMutatingWebhookConfigurationRequest pretty(String pretty) {
            this.pretty = pretty;
            return this;
        }

        /**
         * Set dryRun
         * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
         * @return APIcreateMutatingWebhookConfigurationRequest
         */
        public APIcreateMutatingWebhookConfigurationRequest dryRun(String dryRun) {
            this.dryRun = dryRun;
            return this;
        }

        /**
         * Set fieldManager
         * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
         * @return APIcreateMutatingWebhookConfigurationRequest
         */
        public APIcreateMutatingWebhookConfigurationRequest fieldManager(String fieldManager) {
            this.fieldManager = fieldManager;
            return this;
        }

        /**
         * Set fieldValidation
         * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
         * @return APIcreateMutatingWebhookConfigurationRequest
         */
        public APIcreateMutatingWebhookConfigurationRequest fieldValidation(String fieldValidation) {
            this.fieldValidation = fieldValidation;
            return this;
        }

        /**
         * Build call for createMutatingWebhookConfiguration
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createMutatingWebhookConfigurationCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute createMutatingWebhookConfiguration request * @return V1MutatingWebhookConfiguration * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public V1MutatingWebhookConfiguration execute() throws ApiException { ApiResponse localVarResp = createMutatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute createMutatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1MutatingWebhookConfiguration> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return createMutatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute createMutatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createMutatingWebhookConfigurationAsync(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * create a MutatingWebhookConfiguration * @param body (required) * @return APIcreateMutatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public APIcreateMutatingWebhookConfigurationRequest createMutatingWebhookConfiguration(V1MutatingWebhookConfiguration body) { return new APIcreateMutatingWebhookConfigurationRequest(body); } private okhttp3.Call createValidatingAdmissionPolicyCall(V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createValidatingAdmissionPolicyValidateBeforeCall(V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createValidatingAdmissionPolicy(Async)"); } return createValidatingAdmissionPolicyCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse createValidatingAdmissionPolicyWithHttpInfo(V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = createValidatingAdmissionPolicyValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call createValidatingAdmissionPolicyAsync(V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createValidatingAdmissionPolicyValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIcreateValidatingAdmissionPolicyRequest { private final V1ValidatingAdmissionPolicy body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIcreateValidatingAdmissionPolicyRequest(V1ValidatingAdmissionPolicy body) { this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIcreateValidatingAdmissionPolicyRequest */ public APIcreateValidatingAdmissionPolicyRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIcreateValidatingAdmissionPolicyRequest */ public APIcreateValidatingAdmissionPolicyRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) * @return APIcreateValidatingAdmissionPolicyRequest */ public APIcreateValidatingAdmissionPolicyRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIcreateValidatingAdmissionPolicyRequest */ public APIcreateValidatingAdmissionPolicyRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for createValidatingAdmissionPolicy * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createValidatingAdmissionPolicyCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute createValidatingAdmissionPolicy request * @return V1ValidatingAdmissionPolicy * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicy execute() throws ApiException { ApiResponse localVarResp = createValidatingAdmissionPolicyWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute createValidatingAdmissionPolicy request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicy> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return createValidatingAdmissionPolicyWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute createValidatingAdmissionPolicy request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createValidatingAdmissionPolicyAsync(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * create a ValidatingAdmissionPolicy * @param body (required) * @return APIcreateValidatingAdmissionPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public APIcreateValidatingAdmissionPolicyRequest createValidatingAdmissionPolicy(V1ValidatingAdmissionPolicy body) { return new APIcreateValidatingAdmissionPolicyRequest(body); } private okhttp3.Call createValidatingAdmissionPolicyBindingCall(V1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createValidatingAdmissionPolicyBindingValidateBeforeCall(V1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createValidatingAdmissionPolicyBinding(Async)"); } return createValidatingAdmissionPolicyBindingCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse createValidatingAdmissionPolicyBindingWithHttpInfo(V1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = createValidatingAdmissionPolicyBindingValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call createValidatingAdmissionPolicyBindingAsync(V1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createValidatingAdmissionPolicyBindingValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIcreateValidatingAdmissionPolicyBindingRequest { private final V1ValidatingAdmissionPolicyBinding body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIcreateValidatingAdmissionPolicyBindingRequest(V1ValidatingAdmissionPolicyBinding body) { this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIcreateValidatingAdmissionPolicyBindingRequest */ public APIcreateValidatingAdmissionPolicyBindingRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIcreateValidatingAdmissionPolicyBindingRequest */ public APIcreateValidatingAdmissionPolicyBindingRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) * @return APIcreateValidatingAdmissionPolicyBindingRequest */ public APIcreateValidatingAdmissionPolicyBindingRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIcreateValidatingAdmissionPolicyBindingRequest */ public APIcreateValidatingAdmissionPolicyBindingRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for createValidatingAdmissionPolicyBinding * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createValidatingAdmissionPolicyBindingCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute createValidatingAdmissionPolicyBinding request * @return V1ValidatingAdmissionPolicyBinding * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicyBinding execute() throws ApiException { ApiResponse localVarResp = createValidatingAdmissionPolicyBindingWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute createValidatingAdmissionPolicyBinding request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicyBinding> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return createValidatingAdmissionPolicyBindingWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute createValidatingAdmissionPolicyBinding request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createValidatingAdmissionPolicyBindingAsync(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * create a ValidatingAdmissionPolicyBinding * @param body (required) * @return APIcreateValidatingAdmissionPolicyBindingRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public APIcreateValidatingAdmissionPolicyBindingRequest createValidatingAdmissionPolicyBinding(V1ValidatingAdmissionPolicyBinding body) { return new APIcreateValidatingAdmissionPolicyBindingRequest(body); } private okhttp3.Call createValidatingWebhookConfigurationCall(V1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createValidatingWebhookConfigurationValidateBeforeCall(V1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createValidatingWebhookConfiguration(Async)"); } return createValidatingWebhookConfigurationCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse createValidatingWebhookConfigurationWithHttpInfo(V1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = createValidatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call createValidatingWebhookConfigurationAsync(V1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createValidatingWebhookConfigurationValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIcreateValidatingWebhookConfigurationRequest { private final V1ValidatingWebhookConfiguration body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIcreateValidatingWebhookConfigurationRequest(V1ValidatingWebhookConfiguration body) { this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIcreateValidatingWebhookConfigurationRequest */ public APIcreateValidatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIcreateValidatingWebhookConfigurationRequest */ public APIcreateValidatingWebhookConfigurationRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) * @return APIcreateValidatingWebhookConfigurationRequest */ public APIcreateValidatingWebhookConfigurationRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIcreateValidatingWebhookConfigurationRequest */ public APIcreateValidatingWebhookConfigurationRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for createValidatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createValidatingWebhookConfigurationCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute createValidatingWebhookConfiguration request * @return V1ValidatingWebhookConfiguration * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public V1ValidatingWebhookConfiguration execute() throws ApiException { ApiResponse localVarResp = createValidatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute createValidatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1ValidatingWebhookConfiguration> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return createValidatingWebhookConfigurationWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute createValidatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createValidatingWebhookConfigurationAsync(body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * create a ValidatingWebhookConfiguration * @param body (required) * @return APIcreateValidatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
*/ public APIcreateValidatingWebhookConfigurationRequest createValidatingWebhookConfiguration(V1ValidatingWebhookConfiguration body) { return new APIcreateValidatingWebhookConfigurationRequest(body); } private okhttp3.Call deleteCollectionMutatingWebhookConfigurationCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (_continue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); } if (gracePeriodSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); } if (labelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (orphanDependents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); } if (propagationPolicy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); } if (resourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); } if (resourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); } if (sendInitialEvents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); } if (timeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteCollectionMutatingWebhookConfigurationValidateBeforeCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { return deleteCollectionMutatingWebhookConfigurationCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } private ApiResponse deleteCollectionMutatingWebhookConfigurationWithHttpInfo(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteCollectionMutatingWebhookConfigurationValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteCollectionMutatingWebhookConfigurationAsync(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteCollectionMutatingWebhookConfigurationValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteCollectionMutatingWebhookConfigurationRequest { private String pretty; private String _continue; private String dryRun; private String fieldSelector; private Integer gracePeriodSeconds; private String labelSelector; private Integer limit; private Boolean orphanDependents; private String propagationPolicy; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private V1DeleteOptions body; private APIdeleteCollectionMutatingWebhookConfigurationRequest() { } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set _continue * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest _continue(String _continue) { this._continue = _continue; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldSelector * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest fieldSelector(String fieldSelector) { this.fieldSelector = fieldSelector; return this; } /** * Set gracePeriodSeconds * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest gracePeriodSeconds(Integer gracePeriodSeconds) { this.gracePeriodSeconds = gracePeriodSeconds; return this; } /** * Set labelSelector * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest labelSelector(String labelSelector) { this.labelSelector = labelSelector; return this; } /** * Set limit * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set orphanDependents * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest orphanDependents(Boolean orphanDependents) { this.orphanDependents = orphanDependents; return this; } /** * Set propagationPolicy * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set resourceVersion * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest resourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; return this; } /** * Set resourceVersionMatch * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest resourceVersionMatch(String resourceVersionMatch) { this.resourceVersionMatch = resourceVersionMatch; return this; } /** * Set sendInitialEvents * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest sendInitialEvents(Boolean sendInitialEvents) { this.sendInitialEvents = sendInitialEvents; return this; } /** * Set timeoutSeconds * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set body * @param body (optional) * @return APIdeleteCollectionMutatingWebhookConfigurationRequest */ public APIdeleteCollectionMutatingWebhookConfigurationRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteCollectionMutatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteCollectionMutatingWebhookConfigurationCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } /** * Execute deleteCollectionMutatingWebhookConfiguration request * @return V1Status * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1Status execute() throws ApiException { ApiResponse localVarResp = deleteCollectionMutatingWebhookConfigurationWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); return localVarResp.getData(); } /** * Execute deleteCollectionMutatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteCollectionMutatingWebhookConfigurationWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); } /** * Execute deleteCollectionMutatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteCollectionMutatingWebhookConfigurationAsync(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } } /** * * delete collection of MutatingWebhookConfiguration * @return APIdeleteCollectionMutatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIdeleteCollectionMutatingWebhookConfigurationRequest deleteCollectionMutatingWebhookConfiguration() { return new APIdeleteCollectionMutatingWebhookConfigurationRequest(); } private okhttp3.Call deleteCollectionValidatingAdmissionPolicyCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (_continue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); } if (gracePeriodSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); } if (labelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (orphanDependents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); } if (propagationPolicy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); } if (resourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); } if (resourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); } if (sendInitialEvents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); } if (timeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteCollectionValidatingAdmissionPolicyValidateBeforeCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { return deleteCollectionValidatingAdmissionPolicyCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } private ApiResponse deleteCollectionValidatingAdmissionPolicyWithHttpInfo(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteCollectionValidatingAdmissionPolicyAsync(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteCollectionValidatingAdmissionPolicyRequest { private String pretty; private String _continue; private String dryRun; private String fieldSelector; private Integer gracePeriodSeconds; private String labelSelector; private Integer limit; private Boolean orphanDependents; private String propagationPolicy; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private V1DeleteOptions body; private APIdeleteCollectionValidatingAdmissionPolicyRequest() { } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set _continue * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest _continue(String _continue) { this._continue = _continue; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldSelector * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest fieldSelector(String fieldSelector) { this.fieldSelector = fieldSelector; return this; } /** * Set gracePeriodSeconds * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest gracePeriodSeconds(Integer gracePeriodSeconds) { this.gracePeriodSeconds = gracePeriodSeconds; return this; } /** * Set labelSelector * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest labelSelector(String labelSelector) { this.labelSelector = labelSelector; return this; } /** * Set limit * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set orphanDependents * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest orphanDependents(Boolean orphanDependents) { this.orphanDependents = orphanDependents; return this; } /** * Set propagationPolicy * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set resourceVersion * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest resourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; return this; } /** * Set resourceVersionMatch * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest resourceVersionMatch(String resourceVersionMatch) { this.resourceVersionMatch = resourceVersionMatch; return this; } /** * Set sendInitialEvents * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest sendInitialEvents(Boolean sendInitialEvents) { this.sendInitialEvents = sendInitialEvents; return this; } /** * Set timeoutSeconds * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set body * @param body (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyRequest */ public APIdeleteCollectionValidatingAdmissionPolicyRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteCollectionValidatingAdmissionPolicy * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteCollectionValidatingAdmissionPolicyCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } /** * Execute deleteCollectionValidatingAdmissionPolicy request * @return V1Status * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1Status execute() throws ApiException { ApiResponse localVarResp = deleteCollectionValidatingAdmissionPolicyWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); return localVarResp.getData(); } /** * Execute deleteCollectionValidatingAdmissionPolicy request with HTTP info returned * @return ApiResponse<V1Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteCollectionValidatingAdmissionPolicyWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); } /** * Execute deleteCollectionValidatingAdmissionPolicy request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteCollectionValidatingAdmissionPolicyAsync(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } } /** * * delete collection of ValidatingAdmissionPolicy * @return APIdeleteCollectionValidatingAdmissionPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIdeleteCollectionValidatingAdmissionPolicyRequest deleteCollectionValidatingAdmissionPolicy() { return new APIdeleteCollectionValidatingAdmissionPolicyRequest(); } private okhttp3.Call deleteCollectionValidatingAdmissionPolicyBindingCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (_continue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); } if (gracePeriodSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); } if (labelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (orphanDependents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); } if (propagationPolicy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); } if (resourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); } if (resourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); } if (sendInitialEvents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); } if (timeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteCollectionValidatingAdmissionPolicyBindingValidateBeforeCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { return deleteCollectionValidatingAdmissionPolicyBindingCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } private ApiResponse deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyBindingValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteCollectionValidatingAdmissionPolicyBindingAsync(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyBindingValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteCollectionValidatingAdmissionPolicyBindingRequest { private String pretty; private String _continue; private String dryRun; private String fieldSelector; private Integer gracePeriodSeconds; private String labelSelector; private Integer limit; private Boolean orphanDependents; private String propagationPolicy; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private V1DeleteOptions body; private APIdeleteCollectionValidatingAdmissionPolicyBindingRequest() { } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set _continue * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest _continue(String _continue) { this._continue = _continue; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldSelector * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest fieldSelector(String fieldSelector) { this.fieldSelector = fieldSelector; return this; } /** * Set gracePeriodSeconds * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest gracePeriodSeconds(Integer gracePeriodSeconds) { this.gracePeriodSeconds = gracePeriodSeconds; return this; } /** * Set labelSelector * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest labelSelector(String labelSelector) { this.labelSelector = labelSelector; return this; } /** * Set limit * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set orphanDependents * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest orphanDependents(Boolean orphanDependents) { this.orphanDependents = orphanDependents; return this; } /** * Set propagationPolicy * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set resourceVersion * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest resourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; return this; } /** * Set resourceVersionMatch * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest resourceVersionMatch(String resourceVersionMatch) { this.resourceVersionMatch = resourceVersionMatch; return this; } /** * Set sendInitialEvents * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest sendInitialEvents(Boolean sendInitialEvents) { this.sendInitialEvents = sendInitialEvents; return this; } /** * Set timeoutSeconds * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set body * @param body (optional) * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest */ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteCollectionValidatingAdmissionPolicyBinding * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteCollectionValidatingAdmissionPolicyBindingCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } /** * Execute deleteCollectionValidatingAdmissionPolicyBinding request * @return V1Status * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1Status execute() throws ApiException { ApiResponse localVarResp = deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); return localVarResp.getData(); } /** * Execute deleteCollectionValidatingAdmissionPolicyBinding request with HTTP info returned * @return ApiResponse<V1Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); } /** * Execute deleteCollectionValidatingAdmissionPolicyBinding request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteCollectionValidatingAdmissionPolicyBindingAsync(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } } /** * * delete collection of ValidatingAdmissionPolicyBinding * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIdeleteCollectionValidatingAdmissionPolicyBindingRequest deleteCollectionValidatingAdmissionPolicyBinding() { return new APIdeleteCollectionValidatingAdmissionPolicyBindingRequest(); } private okhttp3.Call deleteCollectionValidatingWebhookConfigurationCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (_continue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); } if (gracePeriodSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); } if (labelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (orphanDependents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); } if (propagationPolicy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); } if (resourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); } if (resourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); } if (sendInitialEvents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); } if (timeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteCollectionValidatingWebhookConfigurationValidateBeforeCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { return deleteCollectionValidatingWebhookConfigurationCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } private ApiResponse deleteCollectionValidatingWebhookConfigurationWithHttpInfo(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteCollectionValidatingWebhookConfigurationValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteCollectionValidatingWebhookConfigurationAsync(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteCollectionValidatingWebhookConfigurationValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteCollectionValidatingWebhookConfigurationRequest { private String pretty; private String _continue; private String dryRun; private String fieldSelector; private Integer gracePeriodSeconds; private String labelSelector; private Integer limit; private Boolean orphanDependents; private String propagationPolicy; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private V1DeleteOptions body; private APIdeleteCollectionValidatingWebhookConfigurationRequest() { } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set _continue * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest _continue(String _continue) { this._continue = _continue; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldSelector * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest fieldSelector(String fieldSelector) { this.fieldSelector = fieldSelector; return this; } /** * Set gracePeriodSeconds * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest gracePeriodSeconds(Integer gracePeriodSeconds) { this.gracePeriodSeconds = gracePeriodSeconds; return this; } /** * Set labelSelector * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest labelSelector(String labelSelector) { this.labelSelector = labelSelector; return this; } /** * Set limit * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set orphanDependents * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest orphanDependents(Boolean orphanDependents) { this.orphanDependents = orphanDependents; return this; } /** * Set propagationPolicy * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set resourceVersion * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest resourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; return this; } /** * Set resourceVersionMatch * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest resourceVersionMatch(String resourceVersionMatch) { this.resourceVersionMatch = resourceVersionMatch; return this; } /** * Set sendInitialEvents * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest sendInitialEvents(Boolean sendInitialEvents) { this.sendInitialEvents = sendInitialEvents; return this; } /** * Set timeoutSeconds * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set body * @param body (optional) * @return APIdeleteCollectionValidatingWebhookConfigurationRequest */ public APIdeleteCollectionValidatingWebhookConfigurationRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteCollectionValidatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteCollectionValidatingWebhookConfigurationCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } /** * Execute deleteCollectionValidatingWebhookConfiguration request * @return V1Status * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1Status execute() throws ApiException { ApiResponse localVarResp = deleteCollectionValidatingWebhookConfigurationWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); return localVarResp.getData(); } /** * Execute deleteCollectionValidatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteCollectionValidatingWebhookConfigurationWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); } /** * Execute deleteCollectionValidatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteCollectionValidatingWebhookConfigurationAsync(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); } } /** * * delete collection of ValidatingWebhookConfiguration * @return APIdeleteCollectionValidatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIdeleteCollectionValidatingWebhookConfigurationRequest deleteCollectionValidatingWebhookConfiguration() { return new APIdeleteCollectionValidatingWebhookConfigurationRequest(); } private okhttp3.Call deleteMutatingWebhookConfigurationCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (gracePeriodSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); } if (orphanDependents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); } if (propagationPolicy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteMutatingWebhookConfigurationValidateBeforeCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteMutatingWebhookConfiguration(Async)"); } return deleteMutatingWebhookConfigurationCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } private ApiResponse deleteMutatingWebhookConfigurationWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteMutatingWebhookConfigurationValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteMutatingWebhookConfigurationAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteMutatingWebhookConfigurationValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteMutatingWebhookConfigurationRequest { private final String name; private String pretty; private String dryRun; private Integer gracePeriodSeconds; private Boolean orphanDependents; private String propagationPolicy; private V1DeleteOptions body; private APIdeleteMutatingWebhookConfigurationRequest(String name) { this.name = name; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIdeleteMutatingWebhookConfigurationRequest */ public APIdeleteMutatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIdeleteMutatingWebhookConfigurationRequest */ public APIdeleteMutatingWebhookConfigurationRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set gracePeriodSeconds * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) * @return APIdeleteMutatingWebhookConfigurationRequest */ public APIdeleteMutatingWebhookConfigurationRequest gracePeriodSeconds(Integer gracePeriodSeconds) { this.gracePeriodSeconds = gracePeriodSeconds; return this; } /** * Set orphanDependents * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) * @return APIdeleteMutatingWebhookConfigurationRequest */ public APIdeleteMutatingWebhookConfigurationRequest orphanDependents(Boolean orphanDependents) { this.orphanDependents = orphanDependents; return this; } /** * Set propagationPolicy * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) * @return APIdeleteMutatingWebhookConfigurationRequest */ public APIdeleteMutatingWebhookConfigurationRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set body * @param body (optional) * @return APIdeleteMutatingWebhookConfigurationRequest */ public APIdeleteMutatingWebhookConfigurationRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteMutatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteMutatingWebhookConfigurationCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } /** * Execute deleteMutatingWebhookConfiguration request * @return V1Status * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public V1Status execute() throws ApiException { ApiResponse localVarResp = deleteMutatingWebhookConfigurationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); return localVarResp.getData(); } /** * Execute deleteMutatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteMutatingWebhookConfigurationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); } /** * Execute deleteMutatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteMutatingWebhookConfigurationAsync(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } } /** * * delete a MutatingWebhookConfiguration * @param name name of the MutatingWebhookConfiguration (required) * @return APIdeleteMutatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public APIdeleteMutatingWebhookConfigurationRequest deleteMutatingWebhookConfiguration(String name) { return new APIdeleteMutatingWebhookConfigurationRequest(name); } private okhttp3.Call deleteValidatingAdmissionPolicyCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (gracePeriodSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); } if (orphanDependents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); } if (propagationPolicy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteValidatingAdmissionPolicyValidateBeforeCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteValidatingAdmissionPolicy(Async)"); } return deleteValidatingAdmissionPolicyCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } private ApiResponse deleteValidatingAdmissionPolicyWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteValidatingAdmissionPolicyAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteValidatingAdmissionPolicyRequest { private final String name; private String pretty; private String dryRun; private Integer gracePeriodSeconds; private Boolean orphanDependents; private String propagationPolicy; private V1DeleteOptions body; private APIdeleteValidatingAdmissionPolicyRequest(String name) { this.name = name; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIdeleteValidatingAdmissionPolicyRequest */ public APIdeleteValidatingAdmissionPolicyRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIdeleteValidatingAdmissionPolicyRequest */ public APIdeleteValidatingAdmissionPolicyRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set gracePeriodSeconds * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) * @return APIdeleteValidatingAdmissionPolicyRequest */ public APIdeleteValidatingAdmissionPolicyRequest gracePeriodSeconds(Integer gracePeriodSeconds) { this.gracePeriodSeconds = gracePeriodSeconds; return this; } /** * Set orphanDependents * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) * @return APIdeleteValidatingAdmissionPolicyRequest */ public APIdeleteValidatingAdmissionPolicyRequest orphanDependents(Boolean orphanDependents) { this.orphanDependents = orphanDependents; return this; } /** * Set propagationPolicy * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) * @return APIdeleteValidatingAdmissionPolicyRequest */ public APIdeleteValidatingAdmissionPolicyRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set body * @param body (optional) * @return APIdeleteValidatingAdmissionPolicyRequest */ public APIdeleteValidatingAdmissionPolicyRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteValidatingAdmissionPolicy * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteValidatingAdmissionPolicyCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } /** * Execute deleteValidatingAdmissionPolicy request * @return V1Status * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public V1Status execute() throws ApiException { ApiResponse localVarResp = deleteValidatingAdmissionPolicyWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); return localVarResp.getData(); } /** * Execute deleteValidatingAdmissionPolicy request with HTTP info returned * @return ApiResponse<V1Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteValidatingAdmissionPolicyWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); } /** * Execute deleteValidatingAdmissionPolicy request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteValidatingAdmissionPolicyAsync(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } } /** * * delete a ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @return APIdeleteValidatingAdmissionPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public APIdeleteValidatingAdmissionPolicyRequest deleteValidatingAdmissionPolicy(String name) { return new APIdeleteValidatingAdmissionPolicyRequest(name); } private okhttp3.Call deleteValidatingAdmissionPolicyBindingCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (gracePeriodSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); } if (orphanDependents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); } if (propagationPolicy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteValidatingAdmissionPolicyBindingValidateBeforeCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteValidatingAdmissionPolicyBinding(Async)"); } return deleteValidatingAdmissionPolicyBindingCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } private ApiResponse deleteValidatingAdmissionPolicyBindingWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyBindingValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteValidatingAdmissionPolicyBindingAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyBindingValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteValidatingAdmissionPolicyBindingRequest { private final String name; private String pretty; private String dryRun; private Integer gracePeriodSeconds; private Boolean orphanDependents; private String propagationPolicy; private V1DeleteOptions body; private APIdeleteValidatingAdmissionPolicyBindingRequest(String name) { this.name = name; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIdeleteValidatingAdmissionPolicyBindingRequest */ public APIdeleteValidatingAdmissionPolicyBindingRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIdeleteValidatingAdmissionPolicyBindingRequest */ public APIdeleteValidatingAdmissionPolicyBindingRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set gracePeriodSeconds * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) * @return APIdeleteValidatingAdmissionPolicyBindingRequest */ public APIdeleteValidatingAdmissionPolicyBindingRequest gracePeriodSeconds(Integer gracePeriodSeconds) { this.gracePeriodSeconds = gracePeriodSeconds; return this; } /** * Set orphanDependents * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) * @return APIdeleteValidatingAdmissionPolicyBindingRequest */ public APIdeleteValidatingAdmissionPolicyBindingRequest orphanDependents(Boolean orphanDependents) { this.orphanDependents = orphanDependents; return this; } /** * Set propagationPolicy * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) * @return APIdeleteValidatingAdmissionPolicyBindingRequest */ public APIdeleteValidatingAdmissionPolicyBindingRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set body * @param body (optional) * @return APIdeleteValidatingAdmissionPolicyBindingRequest */ public APIdeleteValidatingAdmissionPolicyBindingRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteValidatingAdmissionPolicyBinding * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteValidatingAdmissionPolicyBindingCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } /** * Execute deleteValidatingAdmissionPolicyBinding request * @return V1Status * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public V1Status execute() throws ApiException { ApiResponse localVarResp = deleteValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); return localVarResp.getData(); } /** * Execute deleteValidatingAdmissionPolicyBinding request with HTTP info returned * @return ApiResponse<V1Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); } /** * Execute deleteValidatingAdmissionPolicyBinding request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteValidatingAdmissionPolicyBindingAsync(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } } /** * * delete a ValidatingAdmissionPolicyBinding * @param name name of the ValidatingAdmissionPolicyBinding (required) * @return APIdeleteValidatingAdmissionPolicyBindingRequest * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public APIdeleteValidatingAdmissionPolicyBindingRequest deleteValidatingAdmissionPolicyBinding(String name) { return new APIdeleteValidatingAdmissionPolicyBindingRequest(name); } private okhttp3.Call deleteValidatingWebhookConfigurationCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (gracePeriodSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); } if (orphanDependents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); } if (propagationPolicy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteValidatingWebhookConfigurationValidateBeforeCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling deleteValidatingWebhookConfiguration(Async)"); } return deleteValidatingWebhookConfigurationCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } private ApiResponse deleteValidatingWebhookConfigurationWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { okhttp3.Call localVarCall = deleteValidatingWebhookConfigurationValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteValidatingWebhookConfigurationAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteValidatingWebhookConfigurationValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteValidatingWebhookConfigurationRequest { private final String name; private String pretty; private String dryRun; private Integer gracePeriodSeconds; private Boolean orphanDependents; private String propagationPolicy; private V1DeleteOptions body; private APIdeleteValidatingWebhookConfigurationRequest(String name) { this.name = name; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIdeleteValidatingWebhookConfigurationRequest */ public APIdeleteValidatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIdeleteValidatingWebhookConfigurationRequest */ public APIdeleteValidatingWebhookConfigurationRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set gracePeriodSeconds * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) * @return APIdeleteValidatingWebhookConfigurationRequest */ public APIdeleteValidatingWebhookConfigurationRequest gracePeriodSeconds(Integer gracePeriodSeconds) { this.gracePeriodSeconds = gracePeriodSeconds; return this; } /** * Set orphanDependents * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) * @return APIdeleteValidatingWebhookConfigurationRequest */ public APIdeleteValidatingWebhookConfigurationRequest orphanDependents(Boolean orphanDependents) { this.orphanDependents = orphanDependents; return this; } /** * Set propagationPolicy * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) * @return APIdeleteValidatingWebhookConfigurationRequest */ public APIdeleteValidatingWebhookConfigurationRequest propagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; return this; } /** * Set body * @param body (optional) * @return APIdeleteValidatingWebhookConfigurationRequest */ public APIdeleteValidatingWebhookConfigurationRequest body(V1DeleteOptions body) { this.body = body; return this; } /** * Build call for deleteValidatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteValidatingWebhookConfigurationCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } /** * Execute deleteValidatingWebhookConfiguration request * @return V1Status * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public V1Status execute() throws ApiException { ApiResponse localVarResp = deleteValidatingWebhookConfigurationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); return localVarResp.getData(); } /** * Execute deleteValidatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteValidatingWebhookConfigurationWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); } /** * Execute deleteValidatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteValidatingWebhookConfigurationAsync(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); } } /** * * delete a ValidatingWebhookConfiguration * @param name name of the ValidatingWebhookConfiguration (required) * @return APIdeleteValidatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
*/ public APIdeleteValidatingWebhookConfigurationRequest deleteValidatingWebhookConfiguration(String name) { return new APIdeleteValidatingWebhookConfigurationRequest(name); } private okhttp3.Call getAPIResourcesCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAPIResourcesValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getAPIResourcesCall(_callback); } private ApiResponse getAPIResourcesWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getAPIResourcesValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getAPIResourcesAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAPIResourcesValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetAPIResourcesRequest { private APIgetAPIResourcesRequest() { } /** * Build call for getAPIResources * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getAPIResourcesCall(_callback); } /** * Execute getAPIResources request * @return V1APIResourceList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1APIResourceList execute() throws ApiException { ApiResponse localVarResp = getAPIResourcesWithHttpInfo(); return localVarResp.getData(); } /** * Execute getAPIResources request with HTTP info returned * @return ApiResponse<V1APIResourceList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return getAPIResourcesWithHttpInfo(); } /** * Execute getAPIResources request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getAPIResourcesAsync(_callback); } } /** * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIgetAPIResourcesRequest getAPIResources() { return new APIgetAPIResourcesRequest(); } private okhttp3.Call listMutatingWebhookConfigurationCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (allowWatchBookmarks != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks)); } if (_continue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); } if (fieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); } if (labelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (resourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); } if (resourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); } if (sendInitialEvents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); } if (timeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); } if (watch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listMutatingWebhookConfigurationValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { return listMutatingWebhookConfigurationCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } private ApiResponse listMutatingWebhookConfigurationWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { okhttp3.Call localVarCall = listMutatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listMutatingWebhookConfigurationAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listMutatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistMutatingWebhookConfigurationRequest { private String pretty; private Boolean allowWatchBookmarks; private String _continue; private String fieldSelector; private String labelSelector; private Integer limit; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private Boolean watch; private APIlistMutatingWebhookConfigurationRequest() { } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set allowWatchBookmarks * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest allowWatchBookmarks(Boolean allowWatchBookmarks) { this.allowWatchBookmarks = allowWatchBookmarks; return this; } /** * Set _continue * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest _continue(String _continue) { this._continue = _continue; return this; } /** * Set fieldSelector * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest fieldSelector(String fieldSelector) { this.fieldSelector = fieldSelector; return this; } /** * Set labelSelector * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest labelSelector(String labelSelector) { this.labelSelector = labelSelector; return this; } /** * Set limit * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set resourceVersion * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest resourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; return this; } /** * Set resourceVersionMatch * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest resourceVersionMatch(String resourceVersionMatch) { this.resourceVersionMatch = resourceVersionMatch; return this; } /** * Set sendInitialEvents * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest sendInitialEvents(Boolean sendInitialEvents) { this.sendInitialEvents = sendInitialEvents; return this; } /** * Set timeoutSeconds * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set watch * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) * @return APIlistMutatingWebhookConfigurationRequest */ public APIlistMutatingWebhookConfigurationRequest watch(Boolean watch) { this.watch = watch; return this; } /** * Build call for listMutatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listMutatingWebhookConfigurationCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } /** * Execute listMutatingWebhookConfiguration request * @return V1MutatingWebhookConfigurationList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1MutatingWebhookConfigurationList execute() throws ApiException { ApiResponse localVarResp = listMutatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); return localVarResp.getData(); } /** * Execute listMutatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1MutatingWebhookConfigurationList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listMutatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); } /** * Execute listMutatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listMutatingWebhookConfigurationAsync(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } } /** * * list or watch objects of kind MutatingWebhookConfiguration * @return APIlistMutatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIlistMutatingWebhookConfigurationRequest listMutatingWebhookConfiguration() { return new APIlistMutatingWebhookConfigurationRequest(); } private okhttp3.Call listValidatingAdmissionPolicyCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (allowWatchBookmarks != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks)); } if (_continue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); } if (fieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); } if (labelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (resourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); } if (resourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); } if (sendInitialEvents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); } if (timeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); } if (watch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listValidatingAdmissionPolicyValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { return listValidatingAdmissionPolicyCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } private ApiResponse listValidatingAdmissionPolicyWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { okhttp3.Call localVarCall = listValidatingAdmissionPolicyValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listValidatingAdmissionPolicyAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listValidatingAdmissionPolicyValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistValidatingAdmissionPolicyRequest { private String pretty; private Boolean allowWatchBookmarks; private String _continue; private String fieldSelector; private String labelSelector; private Integer limit; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private Boolean watch; private APIlistValidatingAdmissionPolicyRequest() { } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set allowWatchBookmarks * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest allowWatchBookmarks(Boolean allowWatchBookmarks) { this.allowWatchBookmarks = allowWatchBookmarks; return this; } /** * Set _continue * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest _continue(String _continue) { this._continue = _continue; return this; } /** * Set fieldSelector * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest fieldSelector(String fieldSelector) { this.fieldSelector = fieldSelector; return this; } /** * Set labelSelector * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest labelSelector(String labelSelector) { this.labelSelector = labelSelector; return this; } /** * Set limit * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set resourceVersion * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest resourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; return this; } /** * Set resourceVersionMatch * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest resourceVersionMatch(String resourceVersionMatch) { this.resourceVersionMatch = resourceVersionMatch; return this; } /** * Set sendInitialEvents * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest sendInitialEvents(Boolean sendInitialEvents) { this.sendInitialEvents = sendInitialEvents; return this; } /** * Set timeoutSeconds * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set watch * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) * @return APIlistValidatingAdmissionPolicyRequest */ public APIlistValidatingAdmissionPolicyRequest watch(Boolean watch) { this.watch = watch; return this; } /** * Build call for listValidatingAdmissionPolicy * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listValidatingAdmissionPolicyCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } /** * Execute listValidatingAdmissionPolicy request * @return V1ValidatingAdmissionPolicyList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicyList execute() throws ApiException { ApiResponse localVarResp = listValidatingAdmissionPolicyWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); return localVarResp.getData(); } /** * Execute listValidatingAdmissionPolicy request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicyList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listValidatingAdmissionPolicyWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); } /** * Execute listValidatingAdmissionPolicy request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listValidatingAdmissionPolicyAsync(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } } /** * * list or watch objects of kind ValidatingAdmissionPolicy * @return APIlistValidatingAdmissionPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIlistValidatingAdmissionPolicyRequest listValidatingAdmissionPolicy() { return new APIlistValidatingAdmissionPolicyRequest(); } private okhttp3.Call listValidatingAdmissionPolicyBindingCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (allowWatchBookmarks != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks)); } if (_continue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); } if (fieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); } if (labelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (resourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); } if (resourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); } if (sendInitialEvents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); } if (timeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); } if (watch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listValidatingAdmissionPolicyBindingValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { return listValidatingAdmissionPolicyBindingCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } private ApiResponse listValidatingAdmissionPolicyBindingWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { okhttp3.Call localVarCall = listValidatingAdmissionPolicyBindingValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listValidatingAdmissionPolicyBindingAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listValidatingAdmissionPolicyBindingValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistValidatingAdmissionPolicyBindingRequest { private String pretty; private Boolean allowWatchBookmarks; private String _continue; private String fieldSelector; private String labelSelector; private Integer limit; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private Boolean watch; private APIlistValidatingAdmissionPolicyBindingRequest() { } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set allowWatchBookmarks * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest allowWatchBookmarks(Boolean allowWatchBookmarks) { this.allowWatchBookmarks = allowWatchBookmarks; return this; } /** * Set _continue * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest _continue(String _continue) { this._continue = _continue; return this; } /** * Set fieldSelector * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest fieldSelector(String fieldSelector) { this.fieldSelector = fieldSelector; return this; } /** * Set labelSelector * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest labelSelector(String labelSelector) { this.labelSelector = labelSelector; return this; } /** * Set limit * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set resourceVersion * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest resourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; return this; } /** * Set resourceVersionMatch * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest resourceVersionMatch(String resourceVersionMatch) { this.resourceVersionMatch = resourceVersionMatch; return this; } /** * Set sendInitialEvents * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest sendInitialEvents(Boolean sendInitialEvents) { this.sendInitialEvents = sendInitialEvents; return this; } /** * Set timeoutSeconds * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set watch * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) * @return APIlistValidatingAdmissionPolicyBindingRequest */ public APIlistValidatingAdmissionPolicyBindingRequest watch(Boolean watch) { this.watch = watch; return this; } /** * Build call for listValidatingAdmissionPolicyBinding * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listValidatingAdmissionPolicyBindingCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } /** * Execute listValidatingAdmissionPolicyBinding request * @return V1ValidatingAdmissionPolicyBindingList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicyBindingList execute() throws ApiException { ApiResponse localVarResp = listValidatingAdmissionPolicyBindingWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); return localVarResp.getData(); } /** * Execute listValidatingAdmissionPolicyBinding request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicyBindingList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listValidatingAdmissionPolicyBindingWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); } /** * Execute listValidatingAdmissionPolicyBinding request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listValidatingAdmissionPolicyBindingAsync(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } } /** * * list or watch objects of kind ValidatingAdmissionPolicyBinding * @return APIlistValidatingAdmissionPolicyBindingRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIlistValidatingAdmissionPolicyBindingRequest listValidatingAdmissionPolicyBinding() { return new APIlistValidatingAdmissionPolicyBindingRequest(); } private okhttp3.Call listValidatingWebhookConfigurationCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (allowWatchBookmarks != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks)); } if (_continue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); } if (fieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); } if (labelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (resourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); } if (resourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); } if (sendInitialEvents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); } if (timeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); } if (watch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listValidatingWebhookConfigurationValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { return listValidatingWebhookConfigurationCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } private ApiResponse listValidatingWebhookConfigurationWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { okhttp3.Call localVarCall = listValidatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listValidatingWebhookConfigurationAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listValidatingWebhookConfigurationValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistValidatingWebhookConfigurationRequest { private String pretty; private Boolean allowWatchBookmarks; private String _continue; private String fieldSelector; private String labelSelector; private Integer limit; private String resourceVersion; private String resourceVersionMatch; private Boolean sendInitialEvents; private Integer timeoutSeconds; private Boolean watch; private APIlistValidatingWebhookConfigurationRequest() { } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set allowWatchBookmarks * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest allowWatchBookmarks(Boolean allowWatchBookmarks) { this.allowWatchBookmarks = allowWatchBookmarks; return this; } /** * Set _continue * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest _continue(String _continue) { this._continue = _continue; return this; } /** * Set fieldSelector * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest fieldSelector(String fieldSelector) { this.fieldSelector = fieldSelector; return this; } /** * Set labelSelector * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest labelSelector(String labelSelector) { this.labelSelector = labelSelector; return this; } /** * Set limit * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set resourceVersion * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest resourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; return this; } /** * Set resourceVersionMatch * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest resourceVersionMatch(String resourceVersionMatch) { this.resourceVersionMatch = resourceVersionMatch; return this; } /** * Set sendInitialEvents * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest sendInitialEvents(Boolean sendInitialEvents) { this.sendInitialEvents = sendInitialEvents; return this; } /** * Set timeoutSeconds * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest timeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Set watch * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) * @return APIlistValidatingWebhookConfigurationRequest */ public APIlistValidatingWebhookConfigurationRequest watch(Boolean watch) { this.watch = watch; return this; } /** * Build call for listValidatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listValidatingWebhookConfigurationCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } /** * Execute listValidatingWebhookConfiguration request * @return V1ValidatingWebhookConfigurationList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1ValidatingWebhookConfigurationList execute() throws ApiException { ApiResponse localVarResp = listValidatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); return localVarResp.getData(); } /** * Execute listValidatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1ValidatingWebhookConfigurationList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listValidatingWebhookConfigurationWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); } /** * Execute listValidatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listValidatingWebhookConfigurationAsync(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); } } /** * * list or watch objects of kind ValidatingWebhookConfiguration * @return APIlistValidatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIlistValidatingWebhookConfigurationRequest listValidatingWebhookConfiguration() { return new APIlistValidatingWebhookConfigurationRequest(); } private okhttp3.Call patchMutatingWebhookConfigurationCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } if (force != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call patchMutatingWebhookConfigurationValidateBeforeCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling patchMutatingWebhookConfiguration(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling patchMutatingWebhookConfiguration(Async)"); } return patchMutatingWebhookConfigurationCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } private ApiResponse patchMutatingWebhookConfigurationWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { okhttp3.Call localVarCall = patchMutatingWebhookConfigurationValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call patchMutatingWebhookConfigurationAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = patchMutatingWebhookConfigurationValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIpatchMutatingWebhookConfigurationRequest { private final String name; private final V1Patch body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private Boolean force; private APIpatchMutatingWebhookConfigurationRequest(String name, V1Patch body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIpatchMutatingWebhookConfigurationRequest */ public APIpatchMutatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIpatchMutatingWebhookConfigurationRequest */ public APIpatchMutatingWebhookConfigurationRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) * @return APIpatchMutatingWebhookConfigurationRequest */ public APIpatchMutatingWebhookConfigurationRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIpatchMutatingWebhookConfigurationRequest */ public APIpatchMutatingWebhookConfigurationRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Set force * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) * @return APIpatchMutatingWebhookConfigurationRequest */ public APIpatchMutatingWebhookConfigurationRequest force(Boolean force) { this.force = force; return this; } /** * Build call for patchMutatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return patchMutatingWebhookConfigurationCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } /** * Execute patchMutatingWebhookConfiguration request * @return V1MutatingWebhookConfiguration * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1MutatingWebhookConfiguration execute() throws ApiException { ApiResponse localVarResp = patchMutatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); return localVarResp.getData(); } /** * Execute patchMutatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1MutatingWebhookConfiguration> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return patchMutatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); } /** * Execute patchMutatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return patchMutatingWebhookConfigurationAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } } /** * * partially update the specified MutatingWebhookConfiguration * @param name name of the MutatingWebhookConfiguration (required) * @param body (required) * @return APIpatchMutatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIpatchMutatingWebhookConfigurationRequest patchMutatingWebhookConfiguration(String name, V1Patch body) { return new APIpatchMutatingWebhookConfigurationRequest(name, body); } private okhttp3.Call patchValidatingAdmissionPolicyCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } if (force != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call patchValidatingAdmissionPolicyValidateBeforeCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling patchValidatingAdmissionPolicy(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling patchValidatingAdmissionPolicy(Async)"); } return patchValidatingAdmissionPolicyCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } private ApiResponse patchValidatingAdmissionPolicyWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { okhttp3.Call localVarCall = patchValidatingAdmissionPolicyValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call patchValidatingAdmissionPolicyAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = patchValidatingAdmissionPolicyValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIpatchValidatingAdmissionPolicyRequest { private final String name; private final V1Patch body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private Boolean force; private APIpatchValidatingAdmissionPolicyRequest(String name, V1Patch body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIpatchValidatingAdmissionPolicyRequest */ public APIpatchValidatingAdmissionPolicyRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIpatchValidatingAdmissionPolicyRequest */ public APIpatchValidatingAdmissionPolicyRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) * @return APIpatchValidatingAdmissionPolicyRequest */ public APIpatchValidatingAdmissionPolicyRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIpatchValidatingAdmissionPolicyRequest */ public APIpatchValidatingAdmissionPolicyRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Set force * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) * @return APIpatchValidatingAdmissionPolicyRequest */ public APIpatchValidatingAdmissionPolicyRequest force(Boolean force) { this.force = force; return this; } /** * Build call for patchValidatingAdmissionPolicy * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return patchValidatingAdmissionPolicyCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } /** * Execute patchValidatingAdmissionPolicy request * @return V1ValidatingAdmissionPolicy * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicy execute() throws ApiException { ApiResponse localVarResp = patchValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); return localVarResp.getData(); } /** * Execute patchValidatingAdmissionPolicy request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicy> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return patchValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); } /** * Execute patchValidatingAdmissionPolicy request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return patchValidatingAdmissionPolicyAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } } /** * * partially update the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @param body (required) * @return APIpatchValidatingAdmissionPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIpatchValidatingAdmissionPolicyRequest patchValidatingAdmissionPolicy(String name, V1Patch body) { return new APIpatchValidatingAdmissionPolicyRequest(name, body); } private okhttp3.Call patchValidatingAdmissionPolicyBindingCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } if (force != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call patchValidatingAdmissionPolicyBindingValidateBeforeCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling patchValidatingAdmissionPolicyBinding(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling patchValidatingAdmissionPolicyBinding(Async)"); } return patchValidatingAdmissionPolicyBindingCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } private ApiResponse patchValidatingAdmissionPolicyBindingWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { okhttp3.Call localVarCall = patchValidatingAdmissionPolicyBindingValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call patchValidatingAdmissionPolicyBindingAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = patchValidatingAdmissionPolicyBindingValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIpatchValidatingAdmissionPolicyBindingRequest { private final String name; private final V1Patch body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private Boolean force; private APIpatchValidatingAdmissionPolicyBindingRequest(String name, V1Patch body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIpatchValidatingAdmissionPolicyBindingRequest */ public APIpatchValidatingAdmissionPolicyBindingRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIpatchValidatingAdmissionPolicyBindingRequest */ public APIpatchValidatingAdmissionPolicyBindingRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) * @return APIpatchValidatingAdmissionPolicyBindingRequest */ public APIpatchValidatingAdmissionPolicyBindingRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIpatchValidatingAdmissionPolicyBindingRequest */ public APIpatchValidatingAdmissionPolicyBindingRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Set force * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) * @return APIpatchValidatingAdmissionPolicyBindingRequest */ public APIpatchValidatingAdmissionPolicyBindingRequest force(Boolean force) { this.force = force; return this; } /** * Build call for patchValidatingAdmissionPolicyBinding * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return patchValidatingAdmissionPolicyBindingCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } /** * Execute patchValidatingAdmissionPolicyBinding request * @return V1ValidatingAdmissionPolicyBinding * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicyBinding execute() throws ApiException { ApiResponse localVarResp = patchValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); return localVarResp.getData(); } /** * Execute patchValidatingAdmissionPolicyBinding request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicyBinding> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return patchValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); } /** * Execute patchValidatingAdmissionPolicyBinding request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return patchValidatingAdmissionPolicyBindingAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } } /** * * partially update the specified ValidatingAdmissionPolicyBinding * @param name name of the ValidatingAdmissionPolicyBinding (required) * @param body (required) * @return APIpatchValidatingAdmissionPolicyBindingRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIpatchValidatingAdmissionPolicyBindingRequest patchValidatingAdmissionPolicyBinding(String name, V1Patch body) { return new APIpatchValidatingAdmissionPolicyBindingRequest(name, body); } private okhttp3.Call patchValidatingAdmissionPolicyStatusCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } if (force != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call patchValidatingAdmissionPolicyStatusValidateBeforeCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling patchValidatingAdmissionPolicyStatus(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling patchValidatingAdmissionPolicyStatus(Async)"); } return patchValidatingAdmissionPolicyStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } private ApiResponse patchValidatingAdmissionPolicyStatusWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { okhttp3.Call localVarCall = patchValidatingAdmissionPolicyStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call patchValidatingAdmissionPolicyStatusAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = patchValidatingAdmissionPolicyStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIpatchValidatingAdmissionPolicyStatusRequest { private final String name; private final V1Patch body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private Boolean force; private APIpatchValidatingAdmissionPolicyStatusRequest(String name, V1Patch body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIpatchValidatingAdmissionPolicyStatusRequest */ public APIpatchValidatingAdmissionPolicyStatusRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIpatchValidatingAdmissionPolicyStatusRequest */ public APIpatchValidatingAdmissionPolicyStatusRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) * @return APIpatchValidatingAdmissionPolicyStatusRequest */ public APIpatchValidatingAdmissionPolicyStatusRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIpatchValidatingAdmissionPolicyStatusRequest */ public APIpatchValidatingAdmissionPolicyStatusRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Set force * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) * @return APIpatchValidatingAdmissionPolicyStatusRequest */ public APIpatchValidatingAdmissionPolicyStatusRequest force(Boolean force) { this.force = force; return this; } /** * Build call for patchValidatingAdmissionPolicyStatus * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return patchValidatingAdmissionPolicyStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } /** * Execute patchValidatingAdmissionPolicyStatus request * @return V1ValidatingAdmissionPolicy * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicy execute() throws ApiException { ApiResponse localVarResp = patchValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); return localVarResp.getData(); } /** * Execute patchValidatingAdmissionPolicyStatus request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicy> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return patchValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); } /** * Execute patchValidatingAdmissionPolicyStatus request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return patchValidatingAdmissionPolicyStatusAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } } /** * * partially update status of the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @param body (required) * @return APIpatchValidatingAdmissionPolicyStatusRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIpatchValidatingAdmissionPolicyStatusRequest patchValidatingAdmissionPolicyStatus(String name, V1Patch body) { return new APIpatchValidatingAdmissionPolicyStatusRequest(name, body); } private okhttp3.Call patchValidatingWebhookConfigurationCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } if (force != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call patchValidatingWebhookConfigurationValidateBeforeCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling patchValidatingWebhookConfiguration(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling patchValidatingWebhookConfiguration(Async)"); } return patchValidatingWebhookConfigurationCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } private ApiResponse patchValidatingWebhookConfigurationWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { okhttp3.Call localVarCall = patchValidatingWebhookConfigurationValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call patchValidatingWebhookConfigurationAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = patchValidatingWebhookConfigurationValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIpatchValidatingWebhookConfigurationRequest { private final String name; private final V1Patch body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private Boolean force; private APIpatchValidatingWebhookConfigurationRequest(String name, V1Patch body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIpatchValidatingWebhookConfigurationRequest */ public APIpatchValidatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIpatchValidatingWebhookConfigurationRequest */ public APIpatchValidatingWebhookConfigurationRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) * @return APIpatchValidatingWebhookConfigurationRequest */ public APIpatchValidatingWebhookConfigurationRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIpatchValidatingWebhookConfigurationRequest */ public APIpatchValidatingWebhookConfigurationRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Set force * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) * @return APIpatchValidatingWebhookConfigurationRequest */ public APIpatchValidatingWebhookConfigurationRequest force(Boolean force) { this.force = force; return this; } /** * Build call for patchValidatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return patchValidatingWebhookConfigurationCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } /** * Execute patchValidatingWebhookConfiguration request * @return V1ValidatingWebhookConfiguration * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1ValidatingWebhookConfiguration execute() throws ApiException { ApiResponse localVarResp = patchValidatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); return localVarResp.getData(); } /** * Execute patchValidatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1ValidatingWebhookConfiguration> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return patchValidatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); } /** * Execute patchValidatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return patchValidatingWebhookConfigurationAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); } } /** * * partially update the specified ValidatingWebhookConfiguration * @param name name of the ValidatingWebhookConfiguration (required) * @param body (required) * @return APIpatchValidatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIpatchValidatingWebhookConfigurationRequest patchValidatingWebhookConfiguration(String name, V1Patch body) { return new APIpatchValidatingWebhookConfigurationRequest(name, body); } private okhttp3.Call readMutatingWebhookConfigurationCall(String name, String pretty, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call readMutatingWebhookConfigurationValidateBeforeCall(String name, String pretty, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling readMutatingWebhookConfiguration(Async)"); } return readMutatingWebhookConfigurationCall(name, pretty, _callback); } private ApiResponse readMutatingWebhookConfigurationWithHttpInfo(String name, String pretty) throws ApiException { okhttp3.Call localVarCall = readMutatingWebhookConfigurationValidateBeforeCall(name, pretty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call readMutatingWebhookConfigurationAsync(String name, String pretty, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = readMutatingWebhookConfigurationValidateBeforeCall(name, pretty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreadMutatingWebhookConfigurationRequest { private final String name; private String pretty; private APIreadMutatingWebhookConfigurationRequest(String name) { this.name = name; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreadMutatingWebhookConfigurationRequest */ public APIreadMutatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Build call for readMutatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return readMutatingWebhookConfigurationCall(name, pretty, _callback); } /** * Execute readMutatingWebhookConfiguration request * @return V1MutatingWebhookConfiguration * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1MutatingWebhookConfiguration execute() throws ApiException { ApiResponse localVarResp = readMutatingWebhookConfigurationWithHttpInfo(name, pretty); return localVarResp.getData(); } /** * Execute readMutatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1MutatingWebhookConfiguration> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return readMutatingWebhookConfigurationWithHttpInfo(name, pretty); } /** * Execute readMutatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return readMutatingWebhookConfigurationAsync(name, pretty, _callback); } } /** * * read the specified MutatingWebhookConfiguration * @param name name of the MutatingWebhookConfiguration (required) * @return APIreadMutatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIreadMutatingWebhookConfigurationRequest readMutatingWebhookConfiguration(String name) { return new APIreadMutatingWebhookConfigurationRequest(name); } private okhttp3.Call readValidatingAdmissionPolicyCall(String name, String pretty, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call readValidatingAdmissionPolicyValidateBeforeCall(String name, String pretty, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling readValidatingAdmissionPolicy(Async)"); } return readValidatingAdmissionPolicyCall(name, pretty, _callback); } private ApiResponse readValidatingAdmissionPolicyWithHttpInfo(String name, String pretty) throws ApiException { okhttp3.Call localVarCall = readValidatingAdmissionPolicyValidateBeforeCall(name, pretty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call readValidatingAdmissionPolicyAsync(String name, String pretty, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = readValidatingAdmissionPolicyValidateBeforeCall(name, pretty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreadValidatingAdmissionPolicyRequest { private final String name; private String pretty; private APIreadValidatingAdmissionPolicyRequest(String name) { this.name = name; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreadValidatingAdmissionPolicyRequest */ public APIreadValidatingAdmissionPolicyRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Build call for readValidatingAdmissionPolicy * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return readValidatingAdmissionPolicyCall(name, pretty, _callback); } /** * Execute readValidatingAdmissionPolicy request * @return V1ValidatingAdmissionPolicy * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicy execute() throws ApiException { ApiResponse localVarResp = readValidatingAdmissionPolicyWithHttpInfo(name, pretty); return localVarResp.getData(); } /** * Execute readValidatingAdmissionPolicy request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicy> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return readValidatingAdmissionPolicyWithHttpInfo(name, pretty); } /** * Execute readValidatingAdmissionPolicy request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return readValidatingAdmissionPolicyAsync(name, pretty, _callback); } } /** * * read the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @return APIreadValidatingAdmissionPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIreadValidatingAdmissionPolicyRequest readValidatingAdmissionPolicy(String name) { return new APIreadValidatingAdmissionPolicyRequest(name); } private okhttp3.Call readValidatingAdmissionPolicyBindingCall(String name, String pretty, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call readValidatingAdmissionPolicyBindingValidateBeforeCall(String name, String pretty, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling readValidatingAdmissionPolicyBinding(Async)"); } return readValidatingAdmissionPolicyBindingCall(name, pretty, _callback); } private ApiResponse readValidatingAdmissionPolicyBindingWithHttpInfo(String name, String pretty) throws ApiException { okhttp3.Call localVarCall = readValidatingAdmissionPolicyBindingValidateBeforeCall(name, pretty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call readValidatingAdmissionPolicyBindingAsync(String name, String pretty, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = readValidatingAdmissionPolicyBindingValidateBeforeCall(name, pretty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreadValidatingAdmissionPolicyBindingRequest { private final String name; private String pretty; private APIreadValidatingAdmissionPolicyBindingRequest(String name) { this.name = name; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreadValidatingAdmissionPolicyBindingRequest */ public APIreadValidatingAdmissionPolicyBindingRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Build call for readValidatingAdmissionPolicyBinding * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return readValidatingAdmissionPolicyBindingCall(name, pretty, _callback); } /** * Execute readValidatingAdmissionPolicyBinding request * @return V1ValidatingAdmissionPolicyBinding * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicyBinding execute() throws ApiException { ApiResponse localVarResp = readValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty); return localVarResp.getData(); } /** * Execute readValidatingAdmissionPolicyBinding request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicyBinding> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return readValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty); } /** * Execute readValidatingAdmissionPolicyBinding request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return readValidatingAdmissionPolicyBindingAsync(name, pretty, _callback); } } /** * * read the specified ValidatingAdmissionPolicyBinding * @param name name of the ValidatingAdmissionPolicyBinding (required) * @return APIreadValidatingAdmissionPolicyBindingRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIreadValidatingAdmissionPolicyBindingRequest readValidatingAdmissionPolicyBinding(String name) { return new APIreadValidatingAdmissionPolicyBindingRequest(name); } private okhttp3.Call readValidatingAdmissionPolicyStatusCall(String name, String pretty, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call readValidatingAdmissionPolicyStatusValidateBeforeCall(String name, String pretty, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling readValidatingAdmissionPolicyStatus(Async)"); } return readValidatingAdmissionPolicyStatusCall(name, pretty, _callback); } private ApiResponse readValidatingAdmissionPolicyStatusWithHttpInfo(String name, String pretty) throws ApiException { okhttp3.Call localVarCall = readValidatingAdmissionPolicyStatusValidateBeforeCall(name, pretty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call readValidatingAdmissionPolicyStatusAsync(String name, String pretty, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = readValidatingAdmissionPolicyStatusValidateBeforeCall(name, pretty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreadValidatingAdmissionPolicyStatusRequest { private final String name; private String pretty; private APIreadValidatingAdmissionPolicyStatusRequest(String name) { this.name = name; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreadValidatingAdmissionPolicyStatusRequest */ public APIreadValidatingAdmissionPolicyStatusRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Build call for readValidatingAdmissionPolicyStatus * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return readValidatingAdmissionPolicyStatusCall(name, pretty, _callback); } /** * Execute readValidatingAdmissionPolicyStatus request * @return V1ValidatingAdmissionPolicy * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicy execute() throws ApiException { ApiResponse localVarResp = readValidatingAdmissionPolicyStatusWithHttpInfo(name, pretty); return localVarResp.getData(); } /** * Execute readValidatingAdmissionPolicyStatus request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicy> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return readValidatingAdmissionPolicyStatusWithHttpInfo(name, pretty); } /** * Execute readValidatingAdmissionPolicyStatus request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return readValidatingAdmissionPolicyStatusAsync(name, pretty, _callback); } } /** * * read status of the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @return APIreadValidatingAdmissionPolicyStatusRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIreadValidatingAdmissionPolicyStatusRequest readValidatingAdmissionPolicyStatus(String name) { return new APIreadValidatingAdmissionPolicyStatusRequest(name); } private okhttp3.Call readValidatingWebhookConfigurationCall(String name, String pretty, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call readValidatingWebhookConfigurationValidateBeforeCall(String name, String pretty, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling readValidatingWebhookConfiguration(Async)"); } return readValidatingWebhookConfigurationCall(name, pretty, _callback); } private ApiResponse readValidatingWebhookConfigurationWithHttpInfo(String name, String pretty) throws ApiException { okhttp3.Call localVarCall = readValidatingWebhookConfigurationValidateBeforeCall(name, pretty, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call readValidatingWebhookConfigurationAsync(String name, String pretty, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = readValidatingWebhookConfigurationValidateBeforeCall(name, pretty, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreadValidatingWebhookConfigurationRequest { private final String name; private String pretty; private APIreadValidatingWebhookConfigurationRequest(String name) { this.name = name; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreadValidatingWebhookConfigurationRequest */ public APIreadValidatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Build call for readValidatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return readValidatingWebhookConfigurationCall(name, pretty, _callback); } /** * Execute readValidatingWebhookConfiguration request * @return V1ValidatingWebhookConfiguration * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public V1ValidatingWebhookConfiguration execute() throws ApiException { ApiResponse localVarResp = readValidatingWebhookConfigurationWithHttpInfo(name, pretty); return localVarResp.getData(); } /** * Execute readValidatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1ValidatingWebhookConfiguration> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return readValidatingWebhookConfigurationWithHttpInfo(name, pretty); } /** * Execute readValidatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return readValidatingWebhookConfigurationAsync(name, pretty, _callback); } } /** * * read the specified ValidatingWebhookConfiguration * @param name name of the ValidatingWebhookConfiguration (required) * @return APIreadValidatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
*/ public APIreadValidatingWebhookConfigurationRequest readValidatingWebhookConfiguration(String name) { return new APIreadValidatingWebhookConfigurationRequest(name); } private okhttp3.Call replaceMutatingWebhookConfigurationCall(String name, V1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call replaceMutatingWebhookConfigurationValidateBeforeCall(String name, V1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling replaceMutatingWebhookConfiguration(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling replaceMutatingWebhookConfiguration(Async)"); } return replaceMutatingWebhookConfigurationCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse replaceMutatingWebhookConfigurationWithHttpInfo(String name, V1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = replaceMutatingWebhookConfigurationValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call replaceMutatingWebhookConfigurationAsync(String name, V1MutatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceMutatingWebhookConfigurationValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreplaceMutatingWebhookConfigurationRequest { private final String name; private final V1MutatingWebhookConfiguration body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIreplaceMutatingWebhookConfigurationRequest(String name, V1MutatingWebhookConfiguration body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreplaceMutatingWebhookConfigurationRequest */ public APIreplaceMutatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIreplaceMutatingWebhookConfigurationRequest */ public APIreplaceMutatingWebhookConfigurationRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) * @return APIreplaceMutatingWebhookConfigurationRequest */ public APIreplaceMutatingWebhookConfigurationRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIreplaceMutatingWebhookConfigurationRequest */ public APIreplaceMutatingWebhookConfigurationRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for replaceMutatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return replaceMutatingWebhookConfigurationCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute replaceMutatingWebhookConfiguration request * @return V1MutatingWebhookConfiguration * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1MutatingWebhookConfiguration execute() throws ApiException { ApiResponse localVarResp = replaceMutatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute replaceMutatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1MutatingWebhookConfiguration> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return replaceMutatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute replaceMutatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return replaceMutatingWebhookConfigurationAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * replace the specified MutatingWebhookConfiguration * @param name name of the MutatingWebhookConfiguration (required) * @param body (required) * @return APIreplaceMutatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIreplaceMutatingWebhookConfigurationRequest replaceMutatingWebhookConfiguration(String name, V1MutatingWebhookConfiguration body) { return new APIreplaceMutatingWebhookConfigurationRequest(name, body); } private okhttp3.Call replaceValidatingAdmissionPolicyCall(String name, V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call replaceValidatingAdmissionPolicyValidateBeforeCall(String name, V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling replaceValidatingAdmissionPolicy(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling replaceValidatingAdmissionPolicy(Async)"); } return replaceValidatingAdmissionPolicyCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse replaceValidatingAdmissionPolicyWithHttpInfo(String name, V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call replaceValidatingAdmissionPolicyAsync(String name, V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreplaceValidatingAdmissionPolicyRequest { private final String name; private final V1ValidatingAdmissionPolicy body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIreplaceValidatingAdmissionPolicyRequest(String name, V1ValidatingAdmissionPolicy body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreplaceValidatingAdmissionPolicyRequest */ public APIreplaceValidatingAdmissionPolicyRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIreplaceValidatingAdmissionPolicyRequest */ public APIreplaceValidatingAdmissionPolicyRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) * @return APIreplaceValidatingAdmissionPolicyRequest */ public APIreplaceValidatingAdmissionPolicyRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIreplaceValidatingAdmissionPolicyRequest */ public APIreplaceValidatingAdmissionPolicyRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for replaceValidatingAdmissionPolicy * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return replaceValidatingAdmissionPolicyCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute replaceValidatingAdmissionPolicy request * @return V1ValidatingAdmissionPolicy * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicy execute() throws ApiException { ApiResponse localVarResp = replaceValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute replaceValidatingAdmissionPolicy request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicy> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return replaceValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute replaceValidatingAdmissionPolicy request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return replaceValidatingAdmissionPolicyAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * replace the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @param body (required) * @return APIreplaceValidatingAdmissionPolicyRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIreplaceValidatingAdmissionPolicyRequest replaceValidatingAdmissionPolicy(String name, V1ValidatingAdmissionPolicy body) { return new APIreplaceValidatingAdmissionPolicyRequest(name, body); } private okhttp3.Call replaceValidatingAdmissionPolicyBindingCall(String name, V1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call replaceValidatingAdmissionPolicyBindingValidateBeforeCall(String name, V1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling replaceValidatingAdmissionPolicyBinding(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling replaceValidatingAdmissionPolicyBinding(Async)"); } return replaceValidatingAdmissionPolicyBindingCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse replaceValidatingAdmissionPolicyBindingWithHttpInfo(String name, V1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyBindingValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call replaceValidatingAdmissionPolicyBindingAsync(String name, V1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyBindingValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreplaceValidatingAdmissionPolicyBindingRequest { private final String name; private final V1ValidatingAdmissionPolicyBinding body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIreplaceValidatingAdmissionPolicyBindingRequest(String name, V1ValidatingAdmissionPolicyBinding body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreplaceValidatingAdmissionPolicyBindingRequest */ public APIreplaceValidatingAdmissionPolicyBindingRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIreplaceValidatingAdmissionPolicyBindingRequest */ public APIreplaceValidatingAdmissionPolicyBindingRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) * @return APIreplaceValidatingAdmissionPolicyBindingRequest */ public APIreplaceValidatingAdmissionPolicyBindingRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIreplaceValidatingAdmissionPolicyBindingRequest */ public APIreplaceValidatingAdmissionPolicyBindingRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for replaceValidatingAdmissionPolicyBinding * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return replaceValidatingAdmissionPolicyBindingCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute replaceValidatingAdmissionPolicyBinding request * @return V1ValidatingAdmissionPolicyBinding * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicyBinding execute() throws ApiException { ApiResponse localVarResp = replaceValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute replaceValidatingAdmissionPolicyBinding request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicyBinding> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return replaceValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute replaceValidatingAdmissionPolicyBinding request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return replaceValidatingAdmissionPolicyBindingAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * replace the specified ValidatingAdmissionPolicyBinding * @param name name of the ValidatingAdmissionPolicyBinding (required) * @param body (required) * @return APIreplaceValidatingAdmissionPolicyBindingRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIreplaceValidatingAdmissionPolicyBindingRequest replaceValidatingAdmissionPolicyBinding(String name, V1ValidatingAdmissionPolicyBinding body) { return new APIreplaceValidatingAdmissionPolicyBindingRequest(name, body); } private okhttp3.Call replaceValidatingAdmissionPolicyStatusCall(String name, V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call replaceValidatingAdmissionPolicyStatusValidateBeforeCall(String name, V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling replaceValidatingAdmissionPolicyStatus(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling replaceValidatingAdmissionPolicyStatus(Async)"); } return replaceValidatingAdmissionPolicyStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse replaceValidatingAdmissionPolicyStatusWithHttpInfo(String name, V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call replaceValidatingAdmissionPolicyStatusAsync(String name, V1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreplaceValidatingAdmissionPolicyStatusRequest { private final String name; private final V1ValidatingAdmissionPolicy body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIreplaceValidatingAdmissionPolicyStatusRequest(String name, V1ValidatingAdmissionPolicy body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreplaceValidatingAdmissionPolicyStatusRequest */ public APIreplaceValidatingAdmissionPolicyStatusRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIreplaceValidatingAdmissionPolicyStatusRequest */ public APIreplaceValidatingAdmissionPolicyStatusRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) * @return APIreplaceValidatingAdmissionPolicyStatusRequest */ public APIreplaceValidatingAdmissionPolicyStatusRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIreplaceValidatingAdmissionPolicyStatusRequest */ public APIreplaceValidatingAdmissionPolicyStatusRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for replaceValidatingAdmissionPolicyStatus * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return replaceValidatingAdmissionPolicyStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute replaceValidatingAdmissionPolicyStatus request * @return V1ValidatingAdmissionPolicy * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1ValidatingAdmissionPolicy execute() throws ApiException { ApiResponse localVarResp = replaceValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute replaceValidatingAdmissionPolicyStatus request with HTTP info returned * @return ApiResponse<V1ValidatingAdmissionPolicy> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return replaceValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute replaceValidatingAdmissionPolicyStatus request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return replaceValidatingAdmissionPolicyStatusAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * replace status of the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @param body (required) * @return APIreplaceValidatingAdmissionPolicyStatusRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIreplaceValidatingAdmissionPolicyStatusRequest replaceValidatingAdmissionPolicyStatus(String name, V1ValidatingAdmissionPolicy body) { return new APIreplaceValidatingAdmissionPolicyStatusRequest(name, body); } private okhttp3.Call replaceValidatingWebhookConfigurationCall(String name, V1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pretty != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); } if (dryRun != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); } if (fieldManager != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); } if (fieldValidation != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); } final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "BearerToken" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call replaceValidatingWebhookConfigurationValidateBeforeCall(String name, V1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling replaceValidatingWebhookConfiguration(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling replaceValidatingWebhookConfiguration(Async)"); } return replaceValidatingWebhookConfigurationCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } private ApiResponse replaceValidatingWebhookConfigurationWithHttpInfo(String name, V1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { okhttp3.Call localVarCall = replaceValidatingWebhookConfigurationValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call replaceValidatingWebhookConfigurationAsync(String name, V1ValidatingWebhookConfiguration body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replaceValidatingWebhookConfigurationValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIreplaceValidatingWebhookConfigurationRequest { private final String name; private final V1ValidatingWebhookConfiguration body; private String pretty; private String dryRun; private String fieldManager; private String fieldValidation; private APIreplaceValidatingWebhookConfigurationRequest(String name, V1ValidatingWebhookConfiguration body) { this.name = name; this.body = body; } /** * Set pretty * @param pretty If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional) * @return APIreplaceValidatingWebhookConfigurationRequest */ public APIreplaceValidatingWebhookConfigurationRequest pretty(String pretty) { this.pretty = pretty; return this; } /** * Set dryRun * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) * @return APIreplaceValidatingWebhookConfigurationRequest */ public APIreplaceValidatingWebhookConfigurationRequest dryRun(String dryRun) { this.dryRun = dryRun; return this; } /** * Set fieldManager * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) * @return APIreplaceValidatingWebhookConfigurationRequest */ public APIreplaceValidatingWebhookConfigurationRequest fieldManager(String fieldManager) { this.fieldManager = fieldManager; return this; } /** * Set fieldValidation * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) * @return APIreplaceValidatingWebhookConfigurationRequest */ public APIreplaceValidatingWebhookConfigurationRequest fieldValidation(String fieldValidation) { this.fieldValidation = fieldValidation; return this; } /** * Build call for replaceValidatingWebhookConfiguration * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return replaceValidatingWebhookConfigurationCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } /** * Execute replaceValidatingWebhookConfiguration request * @return V1ValidatingWebhookConfiguration * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public V1ValidatingWebhookConfiguration execute() throws ApiException { ApiResponse localVarResp = replaceValidatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); return localVarResp.getData(); } /** * Execute replaceValidatingWebhookConfiguration request with HTTP info returned * @return ApiResponse<V1ValidatingWebhookConfiguration> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return replaceValidatingWebhookConfigurationWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); } /** * Execute replaceValidatingWebhookConfiguration request (asynchronously) * @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 * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return replaceValidatingWebhookConfigurationAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); } } /** * * replace the specified ValidatingWebhookConfiguration * @param name name of the ValidatingWebhookConfiguration (required) * @param body (required) * @return APIreplaceValidatingWebhookConfigurationRequest * @http.response.details
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
*/ public APIreplaceValidatingWebhookConfigurationRequest replaceValidatingWebhookConfiguration(String name, V1ValidatingWebhookConfiguration body) { return new APIreplaceValidatingWebhookConfigurationRequest(name, body); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy