Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
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.V1CertificateSigningRequest;
import io.kubernetes.client.openapi.models.V1CertificateSigningRequestList;
import io.kubernetes.client.openapi.models.V1DeleteOptions;
import io.kubernetes.client.custom.V1Patch;
import io.kubernetes.client.openapi.models.V1Status;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CertificatesV1Api {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public CertificatesV1Api() {
this(Configuration.getDefaultApiClient());
}
public CertificatesV1Api(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 createCertificateSigningRequestCall(V1CertificateSigningRequest 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/certificates.k8s.io/v1/certificatesigningrequests";
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 createCertificateSigningRequestValidateBeforeCall(V1CertificateSigningRequest 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 createCertificateSigningRequest(Async)");
}
return createCertificateSigningRequestCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
private ApiResponse createCertificateSigningRequestWithHttpInfo(V1CertificateSigningRequest body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException {
okhttp3.Call localVarCall = createCertificateSigningRequestValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createCertificateSigningRequestAsync(V1CertificateSigningRequest body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createCertificateSigningRequestValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcreateCertificateSigningRequestRequest {
private final V1CertificateSigningRequest body;
private String pretty;
private String dryRun;
private String fieldManager;
private String fieldValidation;
private APIcreateCertificateSigningRequestRequest(V1CertificateSigningRequest 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 APIcreateCertificateSigningRequestRequest
*/
public APIcreateCertificateSigningRequestRequest 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 APIcreateCertificateSigningRequestRequest
*/
public APIcreateCertificateSigningRequestRequest 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 APIcreateCertificateSigningRequestRequest
*/
public APIcreateCertificateSigningRequestRequest 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 APIcreateCertificateSigningRequestRequest
*/
public APIcreateCertificateSigningRequestRequest fieldValidation(String fieldValidation) {
this.fieldValidation = fieldValidation;
return this;
}
/**
* Build call for createCertificateSigningRequest
* @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 createCertificateSigningRequestCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
/**
* Execute createCertificateSigningRequest request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = createCertificateSigningRequestWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation);
return localVarResp.getData();
}
/**
* Execute createCertificateSigningRequest request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 createCertificateSigningRequestWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation);
}
/**
* Execute createCertificateSigningRequest 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
*/
public APIcreateCertificateSigningRequestRequest createCertificateSigningRequest(V1CertificateSigningRequest body) {
return new APIcreateCertificateSigningRequestRequest(body);
}
private okhttp3.Call deleteCertificateSigningRequestCall(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/certificates.k8s.io/v1/certificatesigningrequests/{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 deleteCertificateSigningRequestValidateBeforeCall(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 deleteCertificateSigningRequest(Async)");
}
return deleteCertificateSigningRequestCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback);
}
private ApiResponse deleteCertificateSigningRequestWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException {
okhttp3.Call localVarCall = deleteCertificateSigningRequestValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call deleteCertificateSigningRequestAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteCertificateSigningRequestValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIdeleteCertificateSigningRequestRequest {
private final String name;
private String pretty;
private String dryRun;
private Integer gracePeriodSeconds;
private Boolean orphanDependents;
private String propagationPolicy;
private V1DeleteOptions body;
private APIdeleteCertificateSigningRequestRequest(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 APIdeleteCertificateSigningRequestRequest
*/
public APIdeleteCertificateSigningRequestRequest 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 APIdeleteCertificateSigningRequestRequest
*/
public APIdeleteCertificateSigningRequestRequest 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 APIdeleteCertificateSigningRequestRequest
*/
public APIdeleteCertificateSigningRequestRequest 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 APIdeleteCertificateSigningRequestRequest
*/
public APIdeleteCertificateSigningRequestRequest 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 APIdeleteCertificateSigningRequestRequest
*/
public APIdeleteCertificateSigningRequestRequest propagationPolicy(String propagationPolicy) {
this.propagationPolicy = propagationPolicy;
return this;
}
/**
* Set body
* @param body (optional)
* @return APIdeleteCertificateSigningRequestRequest
*/
public APIdeleteCertificateSigningRequestRequest body(V1DeleteOptions body) {
this.body = body;
return this;
}
/**
* Build call for deleteCertificateSigningRequest
* @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 deleteCertificateSigningRequestCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback);
}
/**
* Execute deleteCertificateSigningRequest 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 = deleteCertificateSigningRequestWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body);
return localVarResp.getData();
}
/**
* Execute deleteCertificateSigningRequest 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 deleteCertificateSigningRequestWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body);
}
/**
* Execute deleteCertificateSigningRequest 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 deleteCertificateSigningRequestAsync(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback);
}
}
/**
*
* delete a CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @return APIdeleteCertificateSigningRequestRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
202
Accepted
-
401
Unauthorized
-
*/
public APIdeleteCertificateSigningRequestRequest deleteCertificateSigningRequest(String name) {
return new APIdeleteCertificateSigningRequestRequest(name);
}
private okhttp3.Call deleteCollectionCertificateSigningRequestCall(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/certificates.k8s.io/v1/certificatesigningrequests";
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 deleteCollectionCertificateSigningRequestValidateBeforeCall(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 deleteCollectionCertificateSigningRequestCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback);
}
private ApiResponse deleteCollectionCertificateSigningRequestWithHttpInfo(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 = deleteCollectionCertificateSigningRequestValidateBeforeCall(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 deleteCollectionCertificateSigningRequestAsync(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 = deleteCollectionCertificateSigningRequestValidateBeforeCall(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 APIdeleteCollectionCertificateSigningRequestRequest {
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 APIdeleteCollectionCertificateSigningRequestRequest() {
}
/**
* 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest _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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest 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 APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest timeoutSeconds(Integer timeoutSeconds) {
this.timeoutSeconds = timeoutSeconds;
return this;
}
/**
* Set body
* @param body (optional)
* @return APIdeleteCollectionCertificateSigningRequestRequest
*/
public APIdeleteCollectionCertificateSigningRequestRequest body(V1DeleteOptions body) {
this.body = body;
return this;
}
/**
* Build call for deleteCollectionCertificateSigningRequest
* @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 deleteCollectionCertificateSigningRequestCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback);
}
/**
* Execute deleteCollectionCertificateSigningRequest 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 = deleteCollectionCertificateSigningRequestWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body);
return localVarResp.getData();
}
/**
* Execute deleteCollectionCertificateSigningRequest 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 deleteCollectionCertificateSigningRequestWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body);
}
/**
* Execute deleteCollectionCertificateSigningRequest 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
*/
public APIdeleteCollectionCertificateSigningRequestRequest deleteCollectionCertificateSigningRequest() {
return new APIdeleteCollectionCertificateSigningRequestRequest();
}
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/certificates.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 listCertificateSigningRequestCall(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/certificates.k8s.io/v1/certificatesigningrequests";
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 listCertificateSigningRequestValidateBeforeCall(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 listCertificateSigningRequestCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback);
}
private ApiResponse listCertificateSigningRequestWithHttpInfo(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 = listCertificateSigningRequestValidateBeforeCall(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 listCertificateSigningRequestAsync(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 = listCertificateSigningRequestValidateBeforeCall(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 APIlistCertificateSigningRequestRequest {
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 APIlistCertificateSigningRequestRequest() {
}
/**
* 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest _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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest 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 APIlistCertificateSigningRequestRequest
*/
public APIlistCertificateSigningRequestRequest watch(Boolean watch) {
this.watch = watch;
return this;
}
/**
* Build call for listCertificateSigningRequest
* @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 listCertificateSigningRequestCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback);
}
/**
* Execute listCertificateSigningRequest request
* @return V1CertificateSigningRequestList
* @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 V1CertificateSigningRequestList execute() throws ApiException {
ApiResponse localVarResp = listCertificateSigningRequestWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch);
return localVarResp.getData();
}
/**
* Execute listCertificateSigningRequest request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequestList>
* @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 listCertificateSigningRequestWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch);
}
/**
* Execute listCertificateSigningRequest 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 listCertificateSigningRequestAsync(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback);
}
}
/**
*
* list or watch objects of kind CertificateSigningRequest
* @return APIlistCertificateSigningRequestRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
*/
public APIlistCertificateSigningRequestRequest listCertificateSigningRequest() {
return new APIlistCertificateSigningRequestRequest();
}
private okhttp3.Call patchCertificateSigningRequestCall(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/certificates.k8s.io/v1/certificatesigningrequests/{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 patchCertificateSigningRequestValidateBeforeCall(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 patchCertificateSigningRequest(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling patchCertificateSigningRequest(Async)");
}
return patchCertificateSigningRequestCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
}
private ApiResponse patchCertificateSigningRequestWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException {
okhttp3.Call localVarCall = patchCertificateSigningRequestValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call patchCertificateSigningRequestAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = patchCertificateSigningRequestValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIpatchCertificateSigningRequestRequest {
private final String name;
private final V1Patch body;
private String pretty;
private String dryRun;
private String fieldManager;
private String fieldValidation;
private Boolean force;
private APIpatchCertificateSigningRequestRequest(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 APIpatchCertificateSigningRequestRequest
*/
public APIpatchCertificateSigningRequestRequest 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 APIpatchCertificateSigningRequestRequest
*/
public APIpatchCertificateSigningRequestRequest 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 APIpatchCertificateSigningRequestRequest
*/
public APIpatchCertificateSigningRequestRequest 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 APIpatchCertificateSigningRequestRequest
*/
public APIpatchCertificateSigningRequestRequest 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 APIpatchCertificateSigningRequestRequest
*/
public APIpatchCertificateSigningRequestRequest force(Boolean force) {
this.force = force;
return this;
}
/**
* Build call for patchCertificateSigningRequest
* @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 patchCertificateSigningRequestCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
}
/**
* Execute patchCertificateSigningRequest request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = patchCertificateSigningRequestWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force);
return localVarResp.getData();
}
/**
* Execute patchCertificateSigningRequest request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 patchCertificateSigningRequestWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force);
}
/**
* Execute patchCertificateSigningRequest 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 patchCertificateSigningRequestAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
}
}
/**
*
* partially update the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @param body (required)
* @return APIpatchCertificateSigningRequestRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
201
Created
-
401
Unauthorized
-
*/
public APIpatchCertificateSigningRequestRequest patchCertificateSigningRequest(String name, V1Patch body) {
return new APIpatchCertificateSigningRequestRequest(name, body);
}
private okhttp3.Call patchCertificateSigningRequestApprovalCall(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/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval"
.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 patchCertificateSigningRequestApprovalValidateBeforeCall(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 patchCertificateSigningRequestApproval(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling patchCertificateSigningRequestApproval(Async)");
}
return patchCertificateSigningRequestApprovalCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
}
private ApiResponse patchCertificateSigningRequestApprovalWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException {
okhttp3.Call localVarCall = patchCertificateSigningRequestApprovalValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call patchCertificateSigningRequestApprovalAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = patchCertificateSigningRequestApprovalValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIpatchCertificateSigningRequestApprovalRequest {
private final String name;
private final V1Patch body;
private String pretty;
private String dryRun;
private String fieldManager;
private String fieldValidation;
private Boolean force;
private APIpatchCertificateSigningRequestApprovalRequest(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 APIpatchCertificateSigningRequestApprovalRequest
*/
public APIpatchCertificateSigningRequestApprovalRequest 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 APIpatchCertificateSigningRequestApprovalRequest
*/
public APIpatchCertificateSigningRequestApprovalRequest 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 APIpatchCertificateSigningRequestApprovalRequest
*/
public APIpatchCertificateSigningRequestApprovalRequest 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 APIpatchCertificateSigningRequestApprovalRequest
*/
public APIpatchCertificateSigningRequestApprovalRequest 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 APIpatchCertificateSigningRequestApprovalRequest
*/
public APIpatchCertificateSigningRequestApprovalRequest force(Boolean force) {
this.force = force;
return this;
}
/**
* Build call for patchCertificateSigningRequestApproval
* @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 patchCertificateSigningRequestApprovalCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
}
/**
* Execute patchCertificateSigningRequestApproval request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = patchCertificateSigningRequestApprovalWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force);
return localVarResp.getData();
}
/**
* Execute patchCertificateSigningRequestApproval request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 patchCertificateSigningRequestApprovalWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force);
}
/**
* Execute patchCertificateSigningRequestApproval 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 patchCertificateSigningRequestApprovalAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
}
}
/**
*
* partially update approval of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @param body (required)
* @return APIpatchCertificateSigningRequestApprovalRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
201
Created
-
401
Unauthorized
-
*/
public APIpatchCertificateSigningRequestApprovalRequest patchCertificateSigningRequestApproval(String name, V1Patch body) {
return new APIpatchCertificateSigningRequestApprovalRequest(name, body);
}
private okhttp3.Call patchCertificateSigningRequestStatusCall(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/certificates.k8s.io/v1/certificatesigningrequests/{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 patchCertificateSigningRequestStatusValidateBeforeCall(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 patchCertificateSigningRequestStatus(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling patchCertificateSigningRequestStatus(Async)");
}
return patchCertificateSigningRequestStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
}
private ApiResponse patchCertificateSigningRequestStatusWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException {
okhttp3.Call localVarCall = patchCertificateSigningRequestStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call patchCertificateSigningRequestStatusAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = patchCertificateSigningRequestStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIpatchCertificateSigningRequestStatusRequest {
private final String name;
private final V1Patch body;
private String pretty;
private String dryRun;
private String fieldManager;
private String fieldValidation;
private Boolean force;
private APIpatchCertificateSigningRequestStatusRequest(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 APIpatchCertificateSigningRequestStatusRequest
*/
public APIpatchCertificateSigningRequestStatusRequest 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 APIpatchCertificateSigningRequestStatusRequest
*/
public APIpatchCertificateSigningRequestStatusRequest 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 APIpatchCertificateSigningRequestStatusRequest
*/
public APIpatchCertificateSigningRequestStatusRequest 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 APIpatchCertificateSigningRequestStatusRequest
*/
public APIpatchCertificateSigningRequestStatusRequest 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 APIpatchCertificateSigningRequestStatusRequest
*/
public APIpatchCertificateSigningRequestStatusRequest force(Boolean force) {
this.force = force;
return this;
}
/**
* Build call for patchCertificateSigningRequestStatus
* @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 patchCertificateSigningRequestStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
}
/**
* Execute patchCertificateSigningRequestStatus request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = patchCertificateSigningRequestStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force);
return localVarResp.getData();
}
/**
* Execute patchCertificateSigningRequestStatus request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 patchCertificateSigningRequestStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force);
}
/**
* Execute patchCertificateSigningRequestStatus 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 patchCertificateSigningRequestStatusAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback);
}
}
/**
*
* partially update status of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @param body (required)
* @return APIpatchCertificateSigningRequestStatusRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
201
Created
-
401
Unauthorized
-
*/
public APIpatchCertificateSigningRequestStatusRequest patchCertificateSigningRequestStatus(String name, V1Patch body) {
return new APIpatchCertificateSigningRequestStatusRequest(name, body);
}
private okhttp3.Call readCertificateSigningRequestCall(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/certificates.k8s.io/v1/certificatesigningrequests/{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 readCertificateSigningRequestValidateBeforeCall(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 readCertificateSigningRequest(Async)");
}
return readCertificateSigningRequestCall(name, pretty, _callback);
}
private ApiResponse readCertificateSigningRequestWithHttpInfo(String name, String pretty) throws ApiException {
okhttp3.Call localVarCall = readCertificateSigningRequestValidateBeforeCall(name, pretty, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call readCertificateSigningRequestAsync(String name, String pretty, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = readCertificateSigningRequestValidateBeforeCall(name, pretty, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIreadCertificateSigningRequestRequest {
private final String name;
private String pretty;
private APIreadCertificateSigningRequestRequest(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 APIreadCertificateSigningRequestRequest
*/
public APIreadCertificateSigningRequestRequest pretty(String pretty) {
this.pretty = pretty;
return this;
}
/**
* Build call for readCertificateSigningRequest
* @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 readCertificateSigningRequestCall(name, pretty, _callback);
}
/**
* Execute readCertificateSigningRequest request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = readCertificateSigningRequestWithHttpInfo(name, pretty);
return localVarResp.getData();
}
/**
* Execute readCertificateSigningRequest request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 readCertificateSigningRequestWithHttpInfo(name, pretty);
}
/**
* Execute readCertificateSigningRequest 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 readCertificateSigningRequestAsync(name, pretty, _callback);
}
}
/**
*
* read the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @return APIreadCertificateSigningRequestRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
*/
public APIreadCertificateSigningRequestRequest readCertificateSigningRequest(String name) {
return new APIreadCertificateSigningRequestRequest(name);
}
private okhttp3.Call readCertificateSigningRequestApprovalCall(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/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval"
.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 readCertificateSigningRequestApprovalValidateBeforeCall(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 readCertificateSigningRequestApproval(Async)");
}
return readCertificateSigningRequestApprovalCall(name, pretty, _callback);
}
private ApiResponse readCertificateSigningRequestApprovalWithHttpInfo(String name, String pretty) throws ApiException {
okhttp3.Call localVarCall = readCertificateSigningRequestApprovalValidateBeforeCall(name, pretty, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call readCertificateSigningRequestApprovalAsync(String name, String pretty, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = readCertificateSigningRequestApprovalValidateBeforeCall(name, pretty, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIreadCertificateSigningRequestApprovalRequest {
private final String name;
private String pretty;
private APIreadCertificateSigningRequestApprovalRequest(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 APIreadCertificateSigningRequestApprovalRequest
*/
public APIreadCertificateSigningRequestApprovalRequest pretty(String pretty) {
this.pretty = pretty;
return this;
}
/**
* Build call for readCertificateSigningRequestApproval
* @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 readCertificateSigningRequestApprovalCall(name, pretty, _callback);
}
/**
* Execute readCertificateSigningRequestApproval request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = readCertificateSigningRequestApprovalWithHttpInfo(name, pretty);
return localVarResp.getData();
}
/**
* Execute readCertificateSigningRequestApproval request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 readCertificateSigningRequestApprovalWithHttpInfo(name, pretty);
}
/**
* Execute readCertificateSigningRequestApproval 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 readCertificateSigningRequestApprovalAsync(name, pretty, _callback);
}
}
/**
*
* read approval of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @return APIreadCertificateSigningRequestApprovalRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
*/
public APIreadCertificateSigningRequestApprovalRequest readCertificateSigningRequestApproval(String name) {
return new APIreadCertificateSigningRequestApprovalRequest(name);
}
private okhttp3.Call readCertificateSigningRequestStatusCall(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/certificates.k8s.io/v1/certificatesigningrequests/{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 readCertificateSigningRequestStatusValidateBeforeCall(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 readCertificateSigningRequestStatus(Async)");
}
return readCertificateSigningRequestStatusCall(name, pretty, _callback);
}
private ApiResponse readCertificateSigningRequestStatusWithHttpInfo(String name, String pretty) throws ApiException {
okhttp3.Call localVarCall = readCertificateSigningRequestStatusValidateBeforeCall(name, pretty, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call readCertificateSigningRequestStatusAsync(String name, String pretty, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = readCertificateSigningRequestStatusValidateBeforeCall(name, pretty, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIreadCertificateSigningRequestStatusRequest {
private final String name;
private String pretty;
private APIreadCertificateSigningRequestStatusRequest(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 APIreadCertificateSigningRequestStatusRequest
*/
public APIreadCertificateSigningRequestStatusRequest pretty(String pretty) {
this.pretty = pretty;
return this;
}
/**
* Build call for readCertificateSigningRequestStatus
* @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 readCertificateSigningRequestStatusCall(name, pretty, _callback);
}
/**
* Execute readCertificateSigningRequestStatus request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = readCertificateSigningRequestStatusWithHttpInfo(name, pretty);
return localVarResp.getData();
}
/**
* Execute readCertificateSigningRequestStatus request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 readCertificateSigningRequestStatusWithHttpInfo(name, pretty);
}
/**
* Execute readCertificateSigningRequestStatus 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 readCertificateSigningRequestStatusAsync(name, pretty, _callback);
}
}
/**
*
* read status of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @return APIreadCertificateSigningRequestStatusRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
*/
public APIreadCertificateSigningRequestStatusRequest readCertificateSigningRequestStatus(String name) {
return new APIreadCertificateSigningRequestStatusRequest(name);
}
private okhttp3.Call replaceCertificateSigningRequestCall(String name, V1CertificateSigningRequest 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/certificates.k8s.io/v1/certificatesigningrequests/{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 replaceCertificateSigningRequestValidateBeforeCall(String name, V1CertificateSigningRequest 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 replaceCertificateSigningRequest(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling replaceCertificateSigningRequest(Async)");
}
return replaceCertificateSigningRequestCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
private ApiResponse replaceCertificateSigningRequestWithHttpInfo(String name, V1CertificateSigningRequest body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException {
okhttp3.Call localVarCall = replaceCertificateSigningRequestValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call replaceCertificateSigningRequestAsync(String name, V1CertificateSigningRequest body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = replaceCertificateSigningRequestValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIreplaceCertificateSigningRequestRequest {
private final String name;
private final V1CertificateSigningRequest body;
private String pretty;
private String dryRun;
private String fieldManager;
private String fieldValidation;
private APIreplaceCertificateSigningRequestRequest(String name, V1CertificateSigningRequest 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 APIreplaceCertificateSigningRequestRequest
*/
public APIreplaceCertificateSigningRequestRequest 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 APIreplaceCertificateSigningRequestRequest
*/
public APIreplaceCertificateSigningRequestRequest 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 APIreplaceCertificateSigningRequestRequest
*/
public APIreplaceCertificateSigningRequestRequest 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 APIreplaceCertificateSigningRequestRequest
*/
public APIreplaceCertificateSigningRequestRequest fieldValidation(String fieldValidation) {
this.fieldValidation = fieldValidation;
return this;
}
/**
* Build call for replaceCertificateSigningRequest
* @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 replaceCertificateSigningRequestCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
/**
* Execute replaceCertificateSigningRequest request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = replaceCertificateSigningRequestWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation);
return localVarResp.getData();
}
/**
* Execute replaceCertificateSigningRequest request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 replaceCertificateSigningRequestWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation);
}
/**
* Execute replaceCertificateSigningRequest 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 replaceCertificateSigningRequestAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
}
/**
*
* replace the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @param body (required)
* @return APIreplaceCertificateSigningRequestRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
201
Created
-
401
Unauthorized
-
*/
public APIreplaceCertificateSigningRequestRequest replaceCertificateSigningRequest(String name, V1CertificateSigningRequest body) {
return new APIreplaceCertificateSigningRequestRequest(name, body);
}
private okhttp3.Call replaceCertificateSigningRequestApprovalCall(String name, V1CertificateSigningRequest 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/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval"
.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 replaceCertificateSigningRequestApprovalValidateBeforeCall(String name, V1CertificateSigningRequest 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 replaceCertificateSigningRequestApproval(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling replaceCertificateSigningRequestApproval(Async)");
}
return replaceCertificateSigningRequestApprovalCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
private ApiResponse replaceCertificateSigningRequestApprovalWithHttpInfo(String name, V1CertificateSigningRequest body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException {
okhttp3.Call localVarCall = replaceCertificateSigningRequestApprovalValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call replaceCertificateSigningRequestApprovalAsync(String name, V1CertificateSigningRequest body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = replaceCertificateSigningRequestApprovalValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIreplaceCertificateSigningRequestApprovalRequest {
private final String name;
private final V1CertificateSigningRequest body;
private String pretty;
private String dryRun;
private String fieldManager;
private String fieldValidation;
private APIreplaceCertificateSigningRequestApprovalRequest(String name, V1CertificateSigningRequest 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 APIreplaceCertificateSigningRequestApprovalRequest
*/
public APIreplaceCertificateSigningRequestApprovalRequest 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 APIreplaceCertificateSigningRequestApprovalRequest
*/
public APIreplaceCertificateSigningRequestApprovalRequest 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 APIreplaceCertificateSigningRequestApprovalRequest
*/
public APIreplaceCertificateSigningRequestApprovalRequest 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 APIreplaceCertificateSigningRequestApprovalRequest
*/
public APIreplaceCertificateSigningRequestApprovalRequest fieldValidation(String fieldValidation) {
this.fieldValidation = fieldValidation;
return this;
}
/**
* Build call for replaceCertificateSigningRequestApproval
* @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 replaceCertificateSigningRequestApprovalCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
/**
* Execute replaceCertificateSigningRequestApproval request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = replaceCertificateSigningRequestApprovalWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation);
return localVarResp.getData();
}
/**
* Execute replaceCertificateSigningRequestApproval request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 replaceCertificateSigningRequestApprovalWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation);
}
/**
* Execute replaceCertificateSigningRequestApproval 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 replaceCertificateSigningRequestApprovalAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
}
/**
*
* replace approval of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @param body (required)
* @return APIreplaceCertificateSigningRequestApprovalRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
201
Created
-
401
Unauthorized
-
*/
public APIreplaceCertificateSigningRequestApprovalRequest replaceCertificateSigningRequestApproval(String name, V1CertificateSigningRequest body) {
return new APIreplaceCertificateSigningRequestApprovalRequest(name, body);
}
private okhttp3.Call replaceCertificateSigningRequestStatusCall(String name, V1CertificateSigningRequest 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/certificates.k8s.io/v1/certificatesigningrequests/{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 replaceCertificateSigningRequestStatusValidateBeforeCall(String name, V1CertificateSigningRequest 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 replaceCertificateSigningRequestStatus(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling replaceCertificateSigningRequestStatus(Async)");
}
return replaceCertificateSigningRequestStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
private ApiResponse replaceCertificateSigningRequestStatusWithHttpInfo(String name, V1CertificateSigningRequest body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException {
okhttp3.Call localVarCall = replaceCertificateSigningRequestStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call replaceCertificateSigningRequestStatusAsync(String name, V1CertificateSigningRequest body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = replaceCertificateSigningRequestStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIreplaceCertificateSigningRequestStatusRequest {
private final String name;
private final V1CertificateSigningRequest body;
private String pretty;
private String dryRun;
private String fieldManager;
private String fieldValidation;
private APIreplaceCertificateSigningRequestStatusRequest(String name, V1CertificateSigningRequest 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 APIreplaceCertificateSigningRequestStatusRequest
*/
public APIreplaceCertificateSigningRequestStatusRequest 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 APIreplaceCertificateSigningRequestStatusRequest
*/
public APIreplaceCertificateSigningRequestStatusRequest 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 APIreplaceCertificateSigningRequestStatusRequest
*/
public APIreplaceCertificateSigningRequestStatusRequest 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 APIreplaceCertificateSigningRequestStatusRequest
*/
public APIreplaceCertificateSigningRequestStatusRequest fieldValidation(String fieldValidation) {
this.fieldValidation = fieldValidation;
return this;
}
/**
* Build call for replaceCertificateSigningRequestStatus
* @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 replaceCertificateSigningRequestStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
/**
* Execute replaceCertificateSigningRequestStatus request
* @return V1CertificateSigningRequest
* @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 V1CertificateSigningRequest execute() throws ApiException {
ApiResponse localVarResp = replaceCertificateSigningRequestStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation);
return localVarResp.getData();
}
/**
* Execute replaceCertificateSigningRequestStatus request with HTTP info returned
* @return ApiResponse<V1CertificateSigningRequest>
* @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 replaceCertificateSigningRequestStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation);
}
/**
* Execute replaceCertificateSigningRequestStatus 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 replaceCertificateSigningRequestStatusAsync(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback);
}
}
/**
*
* replace status of the specified CertificateSigningRequest
* @param name name of the CertificateSigningRequest (required)
* @param body (required)
* @return APIreplaceCertificateSigningRequestStatusRequest
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
201
Created
-
401
Unauthorized
-
*/
public APIreplaceCertificateSigningRequestStatusRequest replaceCertificateSigningRequestStatus(String name, V1CertificateSigningRequest body) {
return new APIreplaceCertificateSigningRequestStatusRequest(name, body);
}
}